docs(turn-loop): fix crate-count claim, trim historical framing
This commit is contained in:
parent
e9e4408af1
commit
f500863f2f
1 changed files with 14 additions and 22 deletions
|
|
@ -65,11 +65,10 @@ agents) runs:
|
||||||
|
|
||||||
## Harness binary shape
|
## Harness binary shape
|
||||||
|
|
||||||
Two sibling binaries out of the one `hive-ag3nt` crate, all
|
Two sibling crates, both role-agnostic (there is one role: agent —
|
||||||
role-agnostic. (The earlier split into `hive-ag3nt` + `hive-m1nd`
|
the privilege boundary lives server-side at the broker socket
|
||||||
was collapsed because the privilege boundary lives server-side at
|
(`/run/hive/mcp.sock`), which refuses `ManagerRequest` calls regardless
|
||||||
the broker socket (`/run/hive/mcp.sock`): `ManagerRequest` calls are
|
of who sends them):
|
||||||
refused by the standard agent socket regardless of who sends them.)
|
|
||||||
|
|
||||||
- `hive-agent` — long-running harness loop (the inbox poll +
|
- `hive-agent` — long-running harness loop (the inbox poll +
|
||||||
claude-pump + ack/requeue cycle described above).
|
claude-pump + ack/requeue cycle described above).
|
||||||
|
|
@ -80,18 +79,11 @@ refused by the standard agent socket regardless of who sends them.)
|
||||||
transport — no per-turn stdio child (eliminates the re-registration
|
transport — no per-turn stdio child (eliminates the re-registration
|
||||||
race).
|
race).
|
||||||
|
|
||||||
### `Surface` trait + zero-sized type tags
|
`hive-agent`'s wire types (`AgentRequest` / `AgentResponse`, aliased as
|
||||||
|
`ManagerRequest` / `ManagerResponse`) and its turn loop are factored
|
||||||
`AgentRequest` / `AgentResponse` (= `ManagerRequest` / `ManagerResponse` —
|
through a small `Surface` trait with one zero-sized impl, so the loop
|
||||||
type aliases) are the wire types. There is one role: agent.
|
itself has no per-role branches. See `hive-agent/src/main.rs`'s module
|
||||||
`bin/hive-agent.rs` factors the turn loop through a `Surface` trait
|
doc for the trait shape.
|
||||||
with one zero-sized impl (`AgentSurface`) wrapping:
|
|
||||||
|
|
||||||
- One async method per wire op: `ack_turn`, `requeue_inflight`,
|
|
||||||
`inbox_unread`, `post_turn_counts`, `send_to_parent`, `recv_next`.
|
|
||||||
|
|
||||||
`main()` calls `serve_main::<AgentSurface>` for all roles. The turn
|
|
||||||
loop (`serve_loop` / `handle_turn`) has no per-role branches.
|
|
||||||
|
|
||||||
### Boot wiring
|
### Boot wiring
|
||||||
|
|
||||||
|
|
@ -103,12 +95,12 @@ opens turn-stats sqlite, prepares the on-boot files (see
|
||||||
[claude-invocation](claude-invocation.md#on-boot-files)),
|
[claude-invocation](claude-invocation.md#on-boot-files)),
|
||||||
installs claude plugins, spawns `web_ui::serve` + `vacuum::run`,
|
installs claude plugins, spawns `web_ui::serve` + `vacuum::run`,
|
||||||
and either drops into `serve_loop` directly (`Online`) or parks on
|
and either drops into `serve_loop` directly (`Online`) or parks on
|
||||||
the login flow first (`NeedsLogin`). (The forge notification poller
|
the login flow first (`NeedsLogin`). Forge notifications are polled by
|
||||||
used to be spawned here too; it is its own process now —
|
their own process, not this loop — see `hive-forge-notify` in
|
||||||
`hive-forge-notify`, see [`forge.md`](../forge.md).)
|
[`forge.md`](../forge.md).
|
||||||
|
|
||||||
`spawn_todo_socket` opens the todos store and the socket the in-container
|
Boot also opens the todos store and the socket in-container producers
|
||||||
producers dial. Matrix / bash / forge-notify daemons and the in-process
|
dial. Matrix / bash / forge-notify daemons and the in-process
|
||||||
`disk_watch` todo producer (low state-disk space) are the built-in
|
`disk_watch` todo producer (low state-disk space) are the built-in
|
||||||
producers, but the socket accepts any `subsystem` marker — a
|
producers, but the socket accepts any `subsystem` marker — a
|
||||||
user-configured MCP server can push its own todos the same way. See
|
user-configured MCP server can push its own todos the same way. See
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue