Repository navigation
Description
What: ContextMD's serving code becomes the knowledge side of serving (store format, check, thin hooks, OpenCode plugin, install), and matching and serving state move into the Chromeria module.
Why: The accepted design puts state, identity and settlement in Chromeria and keeps knowledge in contextmd as data, so a seam fix reloads with the store instead of needing a Chromeria release.
So what: An agent builds this beside the Chromeria module; the user approves the merge, then the planner runs the install.
Parent
#3 (design: section "Design: serving state in Chromeria"). Chromeria side: toolboxmd/chromeria#217. Part of #12.
Contribution to the Objective
It is the knowledge half of serving on all four hosts, which daily use needs before karpathy-wiki-style hand-loaded rules can go.
Outcome
Selection workersuperseded (user, 2026-10-12): the matcher runs in the Chromeria module in TypeScript; entries stay data files here.Host profiles as data heresuperseded: harness profiles live with the matcher in the module.- Pointer rules (
target:) and inline rules; read detection for Read-like tools and reader shell commands. contextmd-serve install <harness> --base <dir>: a Chromeria session fromt3 auth session issue, a thin hook (curl to the server inserver-runtime.json, then settle) or the OpenCode plugin, in the harness's user-level configuration.server.pystate and the Claude adapter are removed;keys.py,store.py,config.pyand their tests stay.
Acceptance criteria
-
The worker answers each framed requestsuperseded by the in-process matcher (chromeria#220). - Profiles reproduce the canary table (Canary: prove which served text each host reads before its next action #5) (now in the Chromeria module, chromeria#220).
- Read detection covers the reader list and
cd, with kindsread_tool,shell_full,shell_partial(now in the Chromeria module). -
installis idempotent, keeps other hooks, stores the session credential 0600, revokes the one it replaces, and refuses a directory that is not a Chromeria base. - PR feat: exact-key serving with deny-once, budget and log on Claude Code (#11) #23's segment and store tests pass unchanged; its hook-seam tests run against a Chromeria dev server through the installed hook command.
Non-goals
- Router scoring (Serving: router lane live with holdout, outage handling and rollback #13), retrieval (Serving: retrieval lane measured on real moments #14).
- Running the install on the user's machines before merge.
Blockers
None.
Required proof
Unit tests for install and the hook script; the shared contract suite against a dev Chromeria server; independent review by a different model family. PR: #27.
Elon record
- Requirements and who asked: knowledge as data plus one pure worker; host profiles reloadable with the store; install via
contextmd-serve install <host> --base ~/.t3; PR feat: exact-key serving with deny-once, budget and log on Claude Code (#11) #23's matcher library and tests kept (user, 2026-10-12, design review on Serving: deliver stored knowledge before the agent's next decision on every host #3). - Deleted:
server.py's SQLite state, the per-host Python adapter, the file-based off switch and errors log (the off file now lives in the Chromeria base directory). - Bottleneck: the Chromeria module's contract; this side only selects.
- Checked myself: merged PR feat: exact-key serving with deny-once, budget and log on Claude Code (#11) #23 code on
main; the canary table and hook formats incanary/.
Activity
fix(serve): install and OpenCode plugin review round 1 fixes
fix(serve): install and OpenCode plugin review round 2 fixes
fix(serve): install and OpenCode plugin review round 3 fixes
fix(serve): install never moves other hooks; quoted recovery command
test(serve): contract helper projects a denied call with its native i…
feat(serve): hooks forward moments to Chromeria's serving module; ins…
fix(serve): the hook prints no body on an error status (#28)