hive-c0re: let request_init_config spawn a brand-new sub-agent under its requester

This commit is contained in:
damocles 2026-06-21 22:15:41 +02:00 committed by mara
commit b3d002e4a7
8 changed files with 254 additions and 23 deletions

View file

@ -115,7 +115,8 @@ pub async fn sync_agents(hive: &HiveEnv, agents: &[AgentSpec]) -> Result<()> {
// only fills in missing entries. Idempotent; when nothing changed
// the file isn't touched.
let agent_names: Vec<String> = agents.iter().map(|a| a.name.clone()).collect();
crate::topology::reconcile(&agent_names)
let pending = crate::coordinator::Coordinator::pending_init_names();
crate::topology::reconcile(&agent_names, &pending)
.with_context(|| format!("reconcile {}", crate::topology::topology_path().display()))?;
// Refresh /var/lib/hyperhive/run/agent-ports.json so the hive-gateway