Files
stack/packages/model-proxy

Model proxy (P1, #1827)

The bus initializes and manages one pinned CLIProxyAPI per instance. PIN records release URLs and independently reviewable SHA256s of the archive, executable and panel. mosaic proxy fetch verifies both downloads before installing under <dataRoot>/opt/cliproxyapi/<version>/; there is no runtime panel update.

From a human terminal, with the business bus running:

mosaic proxy fetch
mosaic proxy init [--port N] [--business ID]

Init prompts twice without echo and passes the key to the bus through its path-bound human proof. An agent, tester, redirected stdin or mismatched confirmation refuses. The bus exclusively creates proxy.json beside config.json, the private management-key file and initial proxy directory. It never rewrites config.json. Init does not install/start a service. The validated system config contains proxy.port and proxy.binary only when proxy.json exists.

The management client is imported by the bus; it only GETs/PUTs the v8 list on 127.0.0.1, never follows redirects, and emits receipts with SHA256 key IDs only. Client-key values are held in memory, never returned by a bus verb. P2 adds per-agent lifecycle integration; this row creates only the sentinel.

The unit starts through a hash-checking runner with the pinned panel directory and -local-model, so catalogs require no network. Render/install is explicit; no test or acceptance script installs or starts a host unit.

Acceptance is agents/magica/work/queue-329/acceptance.sh, outside the generic gate. It uses a fresh scratch root and private network namespace. The historical v1.26.7 panel sandbox findings remain in BUILD.md. Q250 / mos-1606 drops the Console panel forward; P4 builds a native Console page. P1 retains the pinned panel asset and records Claude/Codex OAuth redirect URLs for that page.