claude-code keeps its MCP servers in state, not events (novox/hq ADR 0202)

One key per registration in the module's servers bucket — all.<server> or
<node>.<server> — watched by every node, so a node assigned after a
registration takes it at start, which the mcp.registered event could not do.
Also narrows apply()'s refusal by hand: the builder compiles without strict,
where the discriminated union does not narrow and the build failed.
This commit is contained in:
jochen
2026-10-04 03:48:41 +02:00
parent 295cc59e1e
commit 3668b02b94
6 changed files with 211 additions and 77 deletions
+3 -6
View File
@@ -11,16 +11,13 @@
"binds": {
"mcp-endpoint": "${dir:state}/mcp-endpoint.json"
},
"emits": [
"mcp.registered",
"mcp.unregistered"
],
"consumes": [
"claude-code.mcp.registered",
"claude-code.mcp.unregistered",
"claude-licence-manager.licence.rotated",
"claude-licence-manager.licence.switched"
],
"state": [
"servers"
],
"tools": [
"claude_code_status",
"claude_code_render",