Watch
0
0
Fork
You've already forked hyperhive
0

swarm: subagent-status KV bucket, the run state of each subagent

One key per subagent (<agent>.<subagent>) holding running/finished, since,
exit, model, effort and the publish time. The controller creates the bucket,
and the agent credential may publish its own keys. Nothing reads or writes
it yet; the daemon publisher and the controller list follow.
This commit is contained in:
iris 2026-11-15 14:39:37 +01:00 • committed by mara
commit c7d7f0df55
2 changed files with 214 additions and 0 deletions

View file

@ -988,6 +988,13 @@ in
# `term-sub-{agent}` stream that keeps them, so its subjects
# and limits are never the agent's to choose.
"--agent-token-publish-subject ${lib.escapeShellArg "\$\$SWARM.term.{agent}.sub.>"}"
# One key per subagent in the `subagent-status` KV bucket
# (`swarm_wire::subagent_status`): whether it is running.
# The key is `{agent}.<subagent>`, so `*` is exactly one
# subagent token. As for the icon, a KV put is one publish
# and swarm-controller creates the bucket, so no
# `$$JS.API.*` subject.
"--agent-token-publish-subject ${lib.escapeShellArg "\$\$KV.subagent-status.{agent}.*"}"
# 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

@ -544,6 +544,7 @@ let
"'$$KV.agent-icons.{agent}'"
"'$$KV.agents-md.{agent}'"
"'$$SWARM.term.{agent}.sub.>'"
"'$$KV.subagent-status.{agent}.*'"
"'$$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}'"