hive-subagent-mcp: run an agent's subagents on its runtime
The subagent daemon now reads the parent agent's runtime at startup (`hive_runtime::RuntimeSpec`, from the harness's `HIVE_RUNTIME` / `HIVE_ACP_*`, which `mcp.nix` forwards onto its unit). On claude nothing changes. On ACP, each run drives an `AcpRuntime` whose session id is kept per name under the harness dir: `start` archives the old one, `continue` loads it (and fails when none is recorded), `interrupt` sends `session/cancel`, a role goes in front of the first prompt, and permission requests get the answers a claude subagent's tool list gives. The unit loads `backendEnvironmentFile` on ACP only, so the agent can authenticate. The end-of-turn handling moves out of the claude loop into `after_turn` unchanged, so both loops share it. Refs #4391
This commit is contained in:
parent
a483b23ccf
commit
84d4808d54
10 changed files with 689 additions and 71 deletions
|
|
@ -228,6 +228,10 @@ in
|
|||
On `"acp"`, `model`, `effortLevel` and `autoCompact` have no effect
|
||||
(the model is whatever the agent is configured with), and neither the
|
||||
web UI's cancel button nor `/compact` works yet.
|
||||
|
||||
Subagents (`hive-subagent-daemon`) run on the same runtime. On
|
||||
`"acp"`, each subagent run spawns its own copy of the ACP agent, which
|
||||
also gets `services.hyperhive.agent.backendEnvironmentFile`.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue