plans/07-server-runtime-ga.md
The standalone server runtime was extracted from worker-service but never inherited the worker's startup, auth, deployment, and operability guarantees. It is shipped under a "beta" label, yet the gaps are not stylistic — they are structural: the server can boot into a non-functional state (no mode loaded), its auth contract disagrees with its own route middleware, its container stack has no supervision, its CLI cannot perform routine operator tasks, and there is no install/uninstall/test path for it at all. The decision is not to remove the server runtime — it is to remove the beta label, which means closing every parity and hardening gap so the server runtime is as trustworthy as the in-plugin worker.
memories:read) don't match the scopes the local route middleware actually requiresserver-beta-service never calls loadMode('code') → every generation job fails with "No mode loaded"runServerBetaCli() default start spawns a daemon and exits → unusable under systemd Type=simpleclaude-mem install has no end-to-end setup for the server runtime (Docker + pg + redis, key gen, IDE MCP injection)DEFAULT_MODEL → 404; loopback ECONNREFUSED in DockerREDIS_URL env, no credentials-file mountplatform_source/metadata/indexes), no key-scope migration tool, missing batch routeapi-key-service.ts filename hides which auth backend it implements (DX)claude-mem uninstall only knows the worker runtime; server operators must tear down manuallyapi-key/keys/jobs subcommands, no helmet hardening, no wrong-runtime guardloadMode('code') (and validate a mode is loaded) before the server accepts jobs; fail fast if not (#2443). Make start run in the foreground by default with an explicit --daemon flag (#2444).api-key/keys/jobs), add helmet, add a wrong-runtime guard; mount the Viewer UI / API compat layer on the server runtime (#2572, #2552).claude-mem install --runtime server and matching uninstall; a hook-level runtime selector so users switch worker ↔ server without reinstall (#2543, #2568, #2564).api-key-service.ts to reveal its backend (#2550, #2562). Land via the tracked PR series (#2540).| Deployment | Auth mode | Required behavior |
|---|---|---|
| Docker compose | API key | Boots with mode loaded; restart policy recovers a killed container; jobs succeed |
| Docker compose | Subscription | Auth path documented + functional; no API-key cost surprise |
systemd Type=simple | API key | start stays in foreground; unit does not flap |
Bare claude-mem install --runtime server | API key | Install wires pg+redis+keys+MCP; uninstall fully tears down |
| Switch worker→server (no reinstall) | either | Runtime selector flips; observations resume on the new runtime |
The matrix lives in CI (#2550). A server-runtime regression must fail CI before a user can file.