claude-code: start only the tool servers set at the controller's terminal
mesh/merge-gate pass: builds claude-code → ace, g14, novox, shanks; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery superseded: a newer head of the same pull request

A server left in the servers state could still be put there by a holder of
the runner's credential; render mcp_servers alone and keep the state for
listing and unregistering (hq issue 340). Waits for the laptop's server to
be set at the terminal first.
This commit is contained in:
jochen
2026-10-09 09:27:11 +02:00
parent 03bb6d17b9
commit dc6a8a5cfb
6 changed files with 35 additions and 12 deletions
+3 -2
View File
@@ -46,7 +46,7 @@ must see, a node that joins later included — kept, so it carries no secret eit
| what this node holds | the module's `holdings` state, one key for this node — the account, the kind, fingerprints and expiries, never a token — written at start and whenever the credentials file changes (hq ADR 0206) |
| a person ran `/login` here | the credentials file gains a refresh token this module never writes; its next report shows it, and the licence manager asks `claude_code_grant` for it, giving its key — the one time a refresh token leaves the node, for the manager to adopt by refreshing it |
| what this node should hold | the licence manager's `bindings` state, this node's key; on a newer generation this module asks `anthropic-licence-manager.current` for its token, sealed to the key it sends, and writes it access-token-only — so the agent here never refreshes. A node that was off reads its key when it is back |
| an MCP server registered through this module before registering was refused (hq issue 340) | a key in the module's `servers` state — `all.<server>` for every node, `<node>.<server>` for one; every node watches it and renders what applies to it, a node's own entry over the one for every node. A node that joins later, or was off, reads the whole current set at start; unregistering is a delete. Nothing adds a key any more: a new tool server is the operator's, in the `mcp_servers` setting at the controller's terminal |
| an MCP server registered through this module before registering was refused (hq issue 340) | a key in the module's `servers` state — `all.<server>` for every node, `<node>.<server>` for one; every node watches it and renders what applies to it, a node's own entry over the one for every node. A node that joins later, or was off, reads the whole current set at start; unregistering is a delete. Nothing adds a key any more, and no key is rendered: a tool server is the operator's, in the `mcp_servers` setting at the controller's terminal. What is left is listed and may be unregistered |
| the agent's configuration (hq ADR 0216) | a key in the module's `config` state per registration — `mesh.<kind>.<name>` for every node, `node.<node>.<kind>.<name>` for one, `home.<node>.<kind>.<name>` for one account's own directory — the item and its files in one value, at most 256 KiB. Every node watches it and renders what applies to it, a node item over a mesh item of the same kind and name. A hook, settings, or an item that would run something by itself is never taken, whenever it was put there (hq issue 340) |
## The mesh's tools first (hq ADR 0245)
@@ -106,7 +106,8 @@ another node. So these tools refuse, and say why and how it is done instead:
reads it into the prompt. A script beside a skill is taken: it runs only when the agent runs it, through the
session's own rules.
What was registered before stays: a tool server is still rendered, and may be unregistered; a hook or settings the
What was registered before: a tool server left on the bus is listed and may be unregistered, and no longer
starts in any session (set it in `mcp_servers` at the terminal first, if it is still wanted); a hook or settings the
state still holds are never rendered, and `claude_code_hook_unregister` and `claude_code_settings_clear` remove
them. `claude_code_registrations` lists everything registered, with who registered it, when, and whether it is
rendered, beside what the operator set for this node at the terminal. Its `by` is the node whose tool runner served