docs: post-#598 catch up — hive-ag3nt/hive-m1nd → unified hive binary in turn-loop.md + CLAUDE.md
This commit is contained in:
parent
fcb5fae345
commit
d8cd3ef68c
2 changed files with 16 additions and 9 deletions
17
CLAUDE.md
17
CLAUDE.md
|
|
@ -154,7 +154,8 @@ frontend/ npm workspaces (esbuild → static dist). Built
|
|||
{index, stats, screen}.html + {app, stats}.js
|
||||
+ agent.css → dist/{*.html, static/*}.
|
||||
|
||||
hive-ag3nt/ in-container harness crate; produces TWO binaries
|
||||
hive-ag3nt/ in-container harness crate; produces ONE `hive`
|
||||
binary (post-#598) picking role from `HIVE_ROLE` env
|
||||
src/lib.rs re-exports + DEFAULT_SOCKET, DEFAULT_WEB_PORT
|
||||
src/client.rs generic JSON-line request/response over unix socket
|
||||
src/web_ui.rs per-container axum HTTP page (incl /api/cancel,
|
||||
|
|
@ -192,12 +193,14 @@ hive-ag3nt/ in-container harness crate; produces TWO binaries
|
|||
`<!-- role:manager -->` markers per
|
||||
`mcp::Flavor`; owns `write_system_prompt`
|
||||
(re-exported from turn.rs for callers).
|
||||
src/bin/hive-ag3nt.rs sub-agent main (Serve + Mcp subcommands)
|
||||
src/bin/hive-m1nd.rs manager main (Serve + Mcp subcommands)
|
||||
Static UI assets served by ServeDir from
|
||||
$HIVE_STATIC_DIR (= hyperhive.frontend
|
||||
.mergedDist — default agent dist + per-agent
|
||||
extraFiles, set per the harness-base module).
|
||||
src/bin/hive.rs unified harness main (Serve + Mcp + Wake
|
||||
subcommands); role from `HIVE_ROLE` env, picks
|
||||
agent or manager wire surface server-side. Wake
|
||||
currently agent-only (#693). Static UI assets
|
||||
served by ServeDir from $HIVE_STATIC_DIR
|
||||
(= hyperhive.frontend.mergedDist — default agent
|
||||
dist + per-agent extraFiles, set per the
|
||||
harness-base module).
|
||||
prompts/ static role/tools/settings for claude (include_str!):
|
||||
system.md — unified system prompt; shared
|
||||
sections plus `<!-- role:agent -->` /
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ claude has access to in return.
|
|||
|
||||
## The loop
|
||||
|
||||
Each agent harness (`hive-ag3nt serve` or `hive-m1nd serve`) runs:
|
||||
Each agent harness (`hive serve`, with role picked from `$HIVE_ROLE`
|
||||
— `"agent"` for sub-agents, `"manager"` for the manager; post-#598
|
||||
this is one binary not two) runs:
|
||||
|
||||
1. Long-poll `Recv` on its socket. The host-side broker
|
||||
(`broker.rs::recv_blocking_batch`) returns immediately if there's
|
||||
|
|
@ -263,10 +265,12 @@ External MCP servers (and any other in-container process) can
|
|||
inject a wake-up event into the agent's inbox via the per-agent
|
||||
socket at `/run/hive/mcp.sock`. Two equivalent paths:
|
||||
|
||||
- **Shell out to `hive-ag3nt wake --from <label> --body <text>`**
|
||||
- **Shell out to `hive wake --from <label> --body <text>`**
|
||||
(use `--body -` to read body from stdin). Already on the
|
||||
container's `PATH` since the harness binary is in
|
||||
`systemPackages`. Convenient for shell-script integrations.
|
||||
Agent-only today (refused when `HIVE_ROLE=manager`); see
|
||||
[#693](http://localhost:3000/hyperhive/hyperhive/issues/693).
|
||||
|
||||
- **Speak the wire protocol directly** — JSON-line over the
|
||||
unix socket: `{"cmd":"wake","from":"matrix","body":"new dm
|
||||
|
|
|
|||
Loading…
Reference in a new issue