# Project operations: Linux runtime network and evidence

Project operations use ordinary Agent Plane chat and workflow runtimes. Agent Plane requests
`projectOperationsRequired: true` when preparing and spawning a runtime whose frozen toolset grants
`project_operation_request`. A direct launcher, older isolator, or missing model observer refuses that
start. The signed turn authority also requires live root checks on prepare, activate, and prompt
admission, including a retained runtime. A launch flag alone never supplies evidence.

CLI 0.17.0 packages the source and installer for isolator 0.5.0. Follow the
[separate service upgrade procedure](../isolator/README.md); npm installation alone does not replace
the root service or activate a network policy. Capabilities and live evidence, rather than a version
comparison, remain the admission boundary.

The optional root-owned isolator configuration is:

```json
{
  "networkIsolation": {
    "policyId": "boujot-project-operations-v1",
    "gateways": [
      { "id": "model_proxy", "port": 18001 },
      { "id": "happy_gateway", "port": 18002 }
    ]
  }
}
```

This exact policy serializes to SHA-256
`591460ef40832576432d407b34c0845d5d2468bee2cde9af4940e532ac3006dd`.
Agent Plane must pin the owner-approved policy to the machine. The root service adds the current
daemon control and Conduit ports from the daemon-owned published state. All destinations are exact
host-loopback ports; the gateways must enforce their own fixed upstreams and safe request routes.

The root-configured `model_proxy` relay allows 630 seconds without a read in either direction:
the model gateway buffers output until validated completion and has a ten-minute upstream bound,
with 30 seconds left for transport. All other relays retain 60-second read limits. Connection
establishment remains bounded at two seconds, writes at 60 seconds, and a runtime at 128 active
forwarded connections. This changes no destinations, token checks or model evidence requirements.

Input images use `/runtime-image` on the existing daemon control relay. The bootstrap wrapper
holds the runtime capability outside provider environments. Before downloading, the daemon
requires the exact process, session incarnation, armed/active turn and prompt identity, then
allows only a signed artifact download from that authority's Plane origin and account. It sends
no MCP or account bearer upstream, rejects redirects, bounds time/bytes, verifies image type,
size and hash, and rechecks authority before returning bytes. Live input uses the same path.
An authoritative prompt whose image cannot be resolved gets a durable `prompt_not_run` terminal
before the inbox advances; it can be recovered without blocking subsequent messages.

Each protected runtime gets a distinct network namespace. Only loopback is usable; there is no
external interface, default route, or DNS relay. Inert, unaddressed kernel tunnel templates are
permitted only when their initial shape remains unchanged. Root owns the exact TCP relay sockets.
Systemd and an inherited seccomp filter deny Unix sockets and io_uring socket bypasses. Child code
cannot acquire host network descriptors through these relays. Child-local socket pairs still work.

The unit runs actual positive and negative probes before its program starts. The root
`network_evidence` RPC rechecks the running PID, process birth, cgroup, namespace inode, unit command,
successful pre-start probe, inherited filter, relay listeners, interface shape, routes, and live
TCP/DNS probes. Namespace changes invalidate the next observation. The `hello.networkEvidenceVersion`
field advertises protocol availability only.

Systemd clears `ExecStartPre` execution metadata on a manager reload while a runtime can stay alive.
After a complete successful observation, root retains the startup result in memory, bound to the
runtime ID, PID, process birth and systemd invocation ID. Only the exact cleared-metadata shape may
reuse that witness. Changed commands, ignored failures, unsuccessful probes, a new process or missing
proof still refuse admission. All current unit, syscall and network checks run again on every read;
the witness replaces only lost historical bookkeeping. Forgetting the runtime removes its witness,
and restarting root loses it along with the network gates.

The daemon configures `BOUJOT_PROJECT_OPERATIONS_GATEWAY_SOCKET` and
`BOUJOT_PROJECT_OPERATIONS_MODEL`. The former must name a private daemon/root Unix socket outside the
runtime. Each launched runtime gets a fresh `BOUJOT_MODEL_GATEWAY_TOKEN`; root's environment allowlist
must include that exact variable. The provider login stays in the gateway. The daemon registers only
the token hash and exact runtime incarnation, then activates the exact authority before prompt
admission. The gateway observes the actual provider response model. Every observation read has a
fresh nonce and the complete runtime and turn tuple. The private protocol is newline-delimited JSON
version 1 with `register`, `activate`, `observe`, and `revoke` operations.
This implementation supports OpenAI Responses and one explicitly selected model per active turn.
It proves the observed provider response belongs to the active runtime and turn; it does not prove
that every later tool-call argument was authored by that model. The executor still enforces the
runtime's grant independently. Other providers need their own trusted response observer.

Authenticated machine RPC `read-project-operation-runtime-evidence` accepts
`{type:"project_operation_runtime_evidence_request",version:1,identity}`. It reads root protection
before and after the model observer, rechecks active authority, and returns a 15-second receipt or a
typed refusal. It never accepts model or protection facts from the child. A root service restart
loses its live gate handles; a daemon restart loses runtime token hashes. Both require a fresh
protected runtime before project operations can resume. Missing evidence never falls back to trust
in the launch setting.

Public dependency access is optional and remains disabled until its coordinated production
qualification. `BOUJOT_DEPENDENCY_GATEWAY_CONFIG` names a daemon/root-owned JSON file with a private
`socketPath`, child-visible public `npmConfigPath`, and `maximumBytes`, `maximumRequests` and
`maximumConcurrent` limits. A configured dependency service requires this protected launcher and
the exact turn-admission path; it cannot enable host networking on the ordinary launcher.

Each new runtime gets a distinct `BOUJOT_DEPENDENCY_GATEWAY_TOKEN` and `NPM_CONFIG_USERCONFIG`.
Root must explicitly admit those environment names and mount the public npm configuration and
gateway certificate read-only. The npm configuration uses the token through environment substitution;
neither its TLS private key nor its control socket belongs in runtime mounts. The new
`dependency_gateway` relay needs a separately reviewed network-policy hash and matching broker
registration. It allows five minutes plus a finite completion margin for complete package downloads.

The daemon registers only the runtime token hash. Activation binds the exact process birth and turn
identity, with expiry no later than the turn's authority (and at most 24 hours). Repeat admission keeps
the same grant. Completion, cancellation and child exit revoke access; failures in one gateway do
not prevent an attempted revocation of the others. A failed revocation remains pending for the
normal close retry. Admission cannot finish while any required service is unavailable. These
changes do not by themselves qualify private packages, additional package managers or installer
downloads outside the public npm adapter.

Run `cargo test --locked` in `isolator/`. On a disposable root Linux/systemd host with namespaces and
cgroup v2, run `node isolator/tests/network-suite.mjs <isolator-binary>`. The latter launches an actual
DynamicUser runtime, proves the approved relays, refuses host/LAN/WireGuard/metadata/public/IPv6/Unix
access, verifies evidence survives a systemd manager reload for the same process, and proves live
namespace tampering still invalidates evidence after reload. Its owned units and files are
removed afterwards. It is not a production deployment script.

For relay changes, also run `cargo test --locked relay::tests::model_response_survives_sixty_seconds_of_silence_in_both_directions -- --ignored`.
For dependency activation, also run `cargo test --locked relay::tests::dependency_download_survives_sixty_seconds_of_silence_in_both_directions -- --ignored`.
This explicit 65-second loopback test calls the production TCP relay and checks both the quiet request
direction and delayed response. It needs no provider, credentials, root service or namespace setup.

On 23 October 2026, the disposable Linux proof ran 19 checks and the Rust suite passed 53 tests.
The focused TypeScript suites passed 235 tests, including 51 conduit/observer tests after adding closed
diagnostic codes. A normal Agent Plane chat then ran the actual `gpt-6-astra` model through the private
gateway. Its [live root observation](../dev/project-operations-demo/evidence/root-live-chat-20261023.json)
shows the installed policy, actual runtime process/cgroup/namespace, allowed relays and denied network
probes. This observation was read directly from the root service; it is not a synthetic producer receipt.

The first combined attempts found two model-gateway sequencing issues: normal client disconnect after
a completed response removed the observation, and streaming a tool call before terminal completion
could expose it before evidence existed. Agent Plane's gateway now buffers a bounded response until
its terminal completion has been validated and the observation published. This delays streamed output
until completion; it does not trust a requested model or an incomplete response.

The [connected live proof](../dev/project-operations-demo/evidence/connected-live-proof-20261023.json)
records a normal chat whose project operation passed daemon and broker admission and completed
`service.status` over SSH. Its actual native shell result also proves selected legacy SSH/workflow
handler refusal and kernel denial of the reachable disposable target, Vault and confirmation relay.
The shell's namespace and script hash match the independent root report and reviewed source. During
that turn, seven evidence RPC reads completed with no evidence refusal or gateway error. A separate
real restart reached owner approval at that stage.

The owner then revoked only the probe's AP access grant. Its next normal `service.status` call returned
`project_access_denied`, with no new executor operation. This [live revocation proof](../dev/project-operations-demo/evidence/access-revocation-live-proof-20261023.json)
is distinct from revoking executor-owned delegated authority. On 24 October, the connected disposable
Agent Plane acceptance also completed physical owner passkey approval, an Ask restart, two automatic
chat restarts under one standing grant, a workflow's stopped-service recovery and independent check,
exact completed-request replay without a second effect, and executor grant revocation. The subsequent
automatic request waited for confirmation with no SSH stage and was cancelled. Global workflow Stop
and Stop after a completed turn also prevented the pending action while allowing a genuinely new
read. Those executor receipts and reduced proof artifacts are retained with Agent Plane's
`dev/project-operations-demo/` source. This is disposable acceptance, not a production rollout;
no production deployment or B1092 cleanup was performed by that proof.

The [bound-runtime probe guide](../dev/project-operations-demo/README.md) separates live visibility and
network checks from selected-tool execution-handler cutoffs. Neither probe mode creates an approval.
