hive-sh4re + docs: extract Wake-injection prose (#717 batch 5)
This commit is contained in:
parent
e1bc9e42f1
commit
18d0fbfecb
2 changed files with 23 additions and 13 deletions
|
|
@ -21,6 +21,23 @@ bind-mount." A sub-agent only sees its own `/run/hive/mcp.sock`; the
|
||||||
manager has access to its privileged socket; hive-c0re owns the host
|
manager has access to its privileged socket; hive-c0re owns the host
|
||||||
admin socket.
|
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.
|
||||||
|
|
||||||
|
Identity = socket means anything that can connect to
|
||||||
|
`/run/hive/mcp.sock` is implicitly trusted to inject wakes. That's
|
||||||
|
fine: the bind-mount only exposes the socket inside the agent's own
|
||||||
|
container, so the trust boundary is the container's process
|
||||||
|
namespace, not the wire surface.
|
||||||
|
|
||||||
## Recipient sentinels
|
## Recipient sentinels
|
||||||
|
|
||||||
A few recipient names are reserved by the broker and have special
|
A few recipient names are reserved by the broker and have special
|
||||||
|
|
|
||||||
|
|
@ -328,15 +328,10 @@ pub enum AgentRequest {
|
||||||
/// per-agent equivalent of the old dashboard T4LK form, but scoped to
|
/// per-agent equivalent of the old dashboard T4LK form, but scoped to
|
||||||
/// the agent whose page the operator is on.
|
/// the agent whose page the operator is on.
|
||||||
OperatorMsg { body: String },
|
OperatorMsg { body: String },
|
||||||
/// Wake-up event injected from inside the container — typically an
|
/// Wake-up event injected from inside the container. Recipient is
|
||||||
/// extra MCP server (matrix, scraper, webhook bridge) signalling
|
/// implicit (this agent); `from` is caller-chosen. See
|
||||||
/// that external work has arrived for this agent. Recipient is
|
/// `docs/conventions.md::Wake injection` for the trust model and
|
||||||
/// implicit (this agent); `from` is caller-chosen so the wake
|
/// typical callers.
|
||||||
/// prompt can label the source ("matrix: new message in
|
|
||||||
/// #general"). Identity = socket means anything that can connect
|
|
||||||
/// to `/run/hive/mcp.sock` is implicitly trusted to inject these,
|
|
||||||
/// which is fine: the bind-mount is restricted to the agent's
|
|
||||||
/// own container.
|
|
||||||
Wake { from: String, body: String },
|
Wake { from: String, body: String },
|
||||||
/// Last `limit` messages addressed to this agent, newest-first.
|
/// Last `limit` messages addressed to this agent, newest-first.
|
||||||
/// Non-mutating — pulls from the broker without delivering. The
|
/// Non-mutating — pulls from the broker without delivering. The
|
||||||
|
|
@ -835,10 +830,8 @@ pub enum ManagerRequest {
|
||||||
/// Mirror of `AgentRequest::RequeueInflight` on the manager
|
/// Mirror of `AgentRequest::RequeueInflight` on the manager
|
||||||
/// surface — fired exactly once on manager harness boot.
|
/// surface — fired exactly once on manager harness boot.
|
||||||
RequeueInflight,
|
RequeueInflight,
|
||||||
/// Mirror of `AgentRequest::Wake` on the manager surface. Used by
|
/// Mirror of `AgentRequest::Wake` on the manager surface. See
|
||||||
/// in-container background tasks (e.g. `forge_notify`) to push a
|
/// `docs/conventions.md::Wake injection`.
|
||||||
/// message into the manager's own broker inbox. `from` is caller-
|
|
||||||
/// chosen; `body` becomes the wake prompt body.
|
|
||||||
Wake { from: String, body: String },
|
Wake { from: String, body: String },
|
||||||
/// Queue an approval to run `nix flake update [inputs...]` on the
|
/// Queue an approval to run `nix flake update [inputs...]` on the
|
||||||
/// meta flake. `inputs` is the list of named inputs to update
|
/// meta flake. `inputs` is the list of named inputs to update
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue