agent prompt: tell sub-agents they can ask manager for config changes

This commit is contained in:
müde 2026-05-15 16:01:58 +02:00
parent dfbcf2b9d1
commit f83c0aa717

View file

@ -217,6 +217,9 @@ fn emit_turn_end(bus: &Bus, outcome: &turn::TurnOutcome) {
/// about it and the MCP tools, and is expected to drive any further /// about it and the MCP tools, and is expected to drive any further
/// recv/send itself. /// recv/send itself.
fn format_wake_prompt(label: &str, from: &str, body: &str) -> String { fn format_wake_prompt(label: &str, from: &str, body: &str) -> String {
// Manager broker name. Lifecycle calls it `hm1nd` (container), broker
// calls it `manager`. Sub-agents address the manager via `manager`.
let manager = hive_sh4re::MANAGER_AGENT;
format!( format!(
"You are hyperhive agent `{label}` in a multi-agent system.\n\ "You are hyperhive agent `{label}` in a multi-agent system.\n\
\n\ \n\
@ -231,6 +234,14 @@ fn format_wake_prompt(label: &str, from: &str, body: &str) -> String {
- `mcp__hyperhive__send(to, body)` message a peer (by their name) \ - `mcp__hyperhive__send(to, body)` message a peer (by their name) \
or the operator (recipient `operator`, surfaces in the dashboard).\n\ or the operator (recipient `operator`, surfaces in the dashboard).\n\
\n\ \n\
Need new packages, env vars, or other NixOS config for yourself? \
You can't edit your own config directly message the manager \
(recipient `{manager}`) describing what you need. The manager \
edits `/agents/{label}/config/agent.nix` on your behalf, commits, \
and submits an approval that the operator can accept on the \
dashboard; on approve hive-c0re rebuilds your container with the \
new config.\n\
\n\
Handle the inbox, then stop. Don't narrate intent act." Handle the inbox, then stop. Don't narrate intent act."
) )
} }