diff --git a/docs/process/conventions.md b/docs/process/conventions.md index dbb69d8e..cfd42c27 100644 --- a/docs/process/conventions.md +++ b/docs/process/conventions.md @@ -60,15 +60,18 @@ hive-c0re owns the host admin socket. ### Wake injection -`AgentRequest::Wake { from, body }` (and the manager-flavour mirror) -is the wake-event-injection surface. Recipient is implicit — the -agent the socket belongs to — and `from` is caller-chosen so the -wake prompt can label the source verbatim (`"matrix: new message in -#general"`, `"forge: PR #42 opened"`, etc.). -Typical caller: an -in-container background task (the matrix daemon, a scraper, the -forge-notify webhook subscriber) that needs to signal "external work -has arrived" without going through the broker as a peer agent. +`hive_core_agent_sock::Request::Wake { from, body }` is the +wake-event-injection surface on the host-served per-agent socket. +Recipient is implicit — the agent the socket belongs to — and `from` +is caller-chosen so the wake prompt can label the source verbatim +(`"matrix: new message in #general"`, `"forge: PR #42 opened"`, etc.). +`hive-c0re` still handles it, but no built-in +in-container producer calls it today — matrix, bash and forge +notifications all upsert a todo on the harness's in-agent socket +(`HIVE_AGENT_SOCKET`) instead, which signals the same turn loop without +a hive-c0re round-trip. See +[`docs/turn-loop/mcp.md` § Waking the agent from inside the +container](../turn-loop/mcp.md#waking-the-agent-from-inside-the-container). Identity = socket means anything that can connect to `/run/hive/mcp.sock` is implicitly trusted to inject wakes. That's diff --git a/docs/turn-loop/mcp.md b/docs/turn-loop/mcp.md index c4bae992..664a1735 100644 --- a/docs/turn-loop/mcp.md +++ b/docs/turn-loop/mcp.md @@ -180,11 +180,14 @@ hive_name?, swarm_name?, matrix_accounts? }`. `matrix_accounts` is a The built-in producers (matrix, bash, forge) no longer dial a direct wake — all three now upsert a todo on the harness's in-agent socket -(`HIVE_AGENT_SOCKET`, `UpsertTodo`, see [Inbox](#core-tools-always-available) -above): a new or changed summary makes the harness signal its own turn -loop, with no hive-c0re round-trip. An external MCP server (or any -other in-container process) can push its own todo the same way — -`subsystem` is a plain string, not a closed set. +(`HIVE_AGENT_SOCKET`, `UpsertTodo` — see +[`docs/tools/bash.md` § Completion as a todo +(loose-ends v2)](../tools/bash.md#completion-as-a-todo-loose-ends-v2) +for the full upsert/signal/clear mechanism): a new or changed summary +makes the harness signal its own turn loop, with no hive-c0re +round-trip. An external MCP server (or any other in-container process) +can push its own todo the same way — `subsystem` is a plain string, +not a closed set. The host-served per-agent socket at `/run/hive/mcp.sock` still carries a lower-level `Wake` request (`hive_core_agent_sock::Request::Wake {