Watch
0
0
Fork
You've already forked hyperhive
0

swarm: the contract for an agent's bash task status and output

A status key per task in the bash-task-status bucket and the task's output rows
in a per-agent stream, kept apart as for subagents. The controller creates the
bucket and the streams, and the agent credential may publish its own keys and
subjects. Nothing publishes yet; the bash MCP half follows.
This commit is contained in:
iris 2026-11-15 17:23:22 +01:00 • committed by mara
commit 1779fa0568
2 changed files with 388 additions and 1 deletions

View file

@ -995,6 +995,14 @@ in
# and swarm-controller creates the bucket, so no
# `$$JS.API.*` subject.
"--agent-token-publish-subject ${lib.escapeShellArg "\$\$KV.subagent-status.{agent}.*"}"
# Its bash tasks (`swarm_wire::bash_task`): one status key per
# task in the `bash-task-status` KV bucket and the task's output
# rows. Publish only and no `$JS.API.*` subject:
# swarm-controller creates the bucket and the
# `term-bash-{agent}` stream, so their limits are never the
# agent's to choose.
"--agent-token-publish-subject ${lib.escapeShellArg "\$\$KV.bash-task-status.{agent}.*"}"
"--agent-token-publish-subject ${lib.escapeShellArg "\$\$SWARM.term.{agent}.bash.>"}"
# Reading its own key of the `agent-schedules` KV bucket
# (`swarm_queue_client::agent_schedules`), and nothing else of
# JetStream: a direct get names the key in its subject, so

View file

@ -545,6 +545,8 @@ let
"'$$KV.agents-md.{agent}'"
"'$$SWARM.term.{agent}.sub.>'"
"'$$KV.subagent-status.{agent}.*'"
"'$$KV.bash-task-status.{agent}.*'"
"'$$SWARM.term.{agent}.bash.>'"
"'$$JS.API.DIRECT.GET.KV_agent-schedules.$$KV.agent-schedules.{agent}'"
"'$$JS.API.DIRECT.GET.KV_agent-inference.$$KV.agent-inference.{agent}'"
"'$$JS.API.DIRECT.GET.KV_agent-permissions.$$KV.agent-permissions.{agent}'"