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
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.
Optional operational surfaces may be offered separately from time to time. If an optional capability is offered for a separate fee, it is included only when expressly covered by 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
Small HTTP surface over a bounded runtime with explicit session and step control.
SQLite-backed continuity across calls and restarts through /data.
Single-container deployment model with stable JSON responses for wrappers and internal tooling.
What it does
- check liveness
- return grouped runtime status
- open or re-enter a note session
- advance the runtime by one bounded step
- close the current session explicitly
Deployment model
copr_gateway is intended to run as a single container.
Default runtime configuration:
- bind address:
:8080 - runtime binary:
/usr/local/bin/copr_api - SQLite path:
/data/copr.sqlite3 - thin status posture:
true - replay routes exposed:
false
Environment variables:
COPR_BIND_ADDRCOPR_API_BINCOPR_DB_PATHCOPR_RECOVERY_ENABLEDCOPR_RECOVERY_DB_PATHCOPR_REPLAY_ENABLEDCOPR_REPLAY_DB_PATH
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_RECOVERY_ENABLED=0 \
-e COPR_RECOVERY_DB_PATH=/data/copr_recover.sqlite3 \
-e COPR_REPLAY_ENABLED=0 \
-e COPR_REPLAY_DB_PATH=/data/copr_replay.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:
sessionsemanticzipruntime
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.
Request with defaults:
{}
Request with explicit bounds:
{"max_edges":4,"max_results":4}
POST /step-with-replay
Advance the runtime by one bounded step and append replay through the replay add-on surface.
Request with defaults:
{}
Request with explicit bounds:
{"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/step-with-replay \
-H 'Content-Type: application/json' \
-d '{}'
curl -s -X POST http://127.0.0.1:8080/close-session
Replay examples
These examples apply only when the replay add-on is licensed and replay routes are enabled.
curl -s -X POST http://127.0.0.1:8080/step-with-replay \
-H 'Content-Type: application/json' \
-d '{}'
curl -s http://127.0.0.1:8080/replay/entries
curl -s http://127.0.0.1:8080/replay/latest
curl -s -X POST http://127.0.0.1:8080/replay/stop-admitting
curl -s -X POST http://127.0.0.1:8080/replay/start-admitting
Persistence
The runtime uses SQLite for continuity across calls.
Default container path:
/data/copr.sqlite3
When recovery or replay are enabled, deployments may also set separate recovery and replay SQLite paths.
This lets the runtime preserve session and state information across subprocess-style API calls.
Operational notes
- the gateway is intentionally thin
- the bundled runtime remains the source of runtime truth
- status is sparse by default for cloud-facing use
- the package is designed for container deployment rather than source-based customer builds
- replay-enabled stepping, where offered, is exposed as an optional add-on route rather than replacing the plain step path
Scope
This package is:
- a containerized HTTP gateway over a bounded runtime surface
- step-driven and inspectable
- suitable for controlled deployments and private packaging
- able to sit alongside separately licensed recovery and replay add-ons where offered
This package is not:
- a general orchestration platform
- a host-wide control plane
- a cluster scheduler
Version
2026.1.0