feat(fleet): onboarding-injection — comms cheat-sheet + peer roster per agent #621
Reference in New Issue
Block a user
Delete Branch "feat/fleet-comms-onboarding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fleet onboarding-injection — comms cheat-sheet + peer roster (closes #620)
Root cause of a spawned agent's failed first send: fleet agents are born not knowing how to reach their peers. This injects a
# Fleet Commsblock into each fleet agent's system prompt viacomposeContract— the runtime-agnostic path everymosaic yolo <runtime>agent hits — so it can reach the orchestrator + peers from its first turn. No-op for non-fleet launches.Acceptance criteria (Mos) — all met + tested
[host:session]+ agent-send path + peer roster-s <session>(no-H); remote →-H <ssh> -s <session>renderPeerReach; concretecoder0-0@dragon-lin=-H jwoltje@10.1.10.37 -s coder0-0-L <socket>; default/unset → no-L(matches LIVE socket, not roster-pinnedmosaic-factory)renderPeerReachsocket branchagent send --verify= ACCEPTED (not injected)-L); matches live toolingImplementation
src/fleet/comms-onboarding.ts(standalone — nofleet.tscoupling):parseRosterAgents(name/class/host/ssh/socket),renderPeerReach(data-driven command),buildFleetCommsBlock,readFleetCommsBlock(''when not a fleet member).launch.tscomposeContractappends the block only whenMOSAIC_AGENT_NAMEis set + the agent is in the roster.roster.schema.json: optional per-agenthost/ssh/socket(cross-host + socket addressing; manual cross-host listing is a documented pre-federation stopgap — W1 auto-discovers later).Verification
composeContracttests: parse (incl. socket); render local/remote/ssh-fallback/equal-host/socket-none/named/combined-L+-H; build (self excluded, orchestrator flagged); situationalreadFleetCommsBlock; and the end-to-endcomposeContractinjection (correct cross-host + socket addresses; no-op whenMOSAIC_AGENT_NAMEunset). tsc/eslint/prettier/sanitize clean.coder0-0@dragon-linand a local peer.Cheap under #619 gating (
packages/mosaic+ docs only → 0 image builds).🤖 Generated with Claude Code