NSC Labs
README

Copr Gateway

Last updated: 2026-04-18

Copr Gateway is a commercial container image product for running the copr bounded runtime behind a small HTTP gateway. It is designed for single-container deployment, exposes a compact JSON control surface, and uses SQLite-backed continuity under /data.

Status: Private distribution

Go + Rust + SQLite Container-first Thin status Step-driven

License summary

copr_gateway is licensed, not sold.

The license covers the purchasing customer and its affiliates under common control.

Service providers may operate the software on the customer’s behalf, but do not receive independent license rights.

copr_gateway may be used in the customer group’s business operations, including internet-facing deployments and customer-serving systems.

copr_gateway itself may not be resold, sublicensed, or transferred as a standalone product without written permission.

Purchase or subscription does not guarantee future updates, upgrades, downgrades, bug-fix releases, support, or continued development unless expressly stated in the applicable order, Marketplace offer, or Seller support policy.

Use of copr_gateway is governed by the applicable order and the EULA.

What it is

Bounded runtime

Small HTTP surface over a bounded runtime with explicit session and step control.

Continuity

SQLite-backed continuity across calls and restarts through /data.

Container-friendly

Single-container deployment model with stable JSON responses for wrappers and tooling.

What it does

Deployment model

copr_gateway is intended to run as a single container.

Default runtime configuration:

Environment variables:

Quick start

Build the container:

docker build -f nsc_mai/crates/copr_gateway/Dockerfile -t copr_gateway:2026.1.0 .

Run it:

docker run --rm \
  -p 8080:8080 \
  -v $(pwd)/data:/data \
  -e COPR_BIND_ADDR=:8080 \
  -e COPR_API_BIN=/usr/local/bin/copr_api \
  -e COPR_DB_PATH=/data/copr.sqlite3 \
  -e COPR_STATUS_THIN=true \
  copr_gateway:2026.1.0

API overview

GET /health

Minimal liveness check.

{"ok":true}

GET /status

Returns grouped runtime status.

Current top-level groups:

The status surface is intentionally thin by default.

POST /open-note

Open or re-enter a note session.

{"note_id":42}

POST /step

Advance the runtime by one bounded step.

{}
{"max_edges":4,"max_results":4}

POST /close-session

Close the active session.

Example calls

curl -s http://127.0.0.1:8080/health
curl -s http://127.0.0.1:8080/status
curl -s -X POST http://127.0.0.1:8080/open-note \
  -H 'Content-Type: application/json' \
  -d '{"note_id":42}'
curl -s -X POST http://127.0.0.1:8080/step \
  -H 'Content-Type: application/json' \
  -d '{}'
curl -s -X POST http://127.0.0.1:8080/close-session

Persistence

The runtime uses SQLite for continuity across calls.

Default container path:

This lets the runtime preserve session and state information across subprocess-style API calls.

Scope

This package is:

This package is not:

Version