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:
parent
ca51bb9d54
commit
1779fa0568
2 changed files with 388 additions and 1 deletions
|
|
@ -117,6 +117,7 @@ swarm-queue-client = { workspace = true, features = [
|
|||
"kv",
|
||||
"agent-permissions",
|
||||
"subagent-term",
|
||||
"bash-task",
|
||||
"agent-term",
|
||||
"forge-events",
|
||||
] }
|
||||
|
|
|
|||
|
|
@ -79,7 +79,20 @@ pub(crate) fn spawn(client: async_nats::Client, wanted: Arc<WantedWriter>, hives
|
|||
"subagent status: opening the bucket failed; next pass"
|
||||
);
|
||||
}
|
||||
if let Err(e) = swarm_queue_client::bash_task::open_status(&client).await {
|
||||
tracing::warn!(
|
||||
error = %swarm_queue_client::chain(&e),
|
||||
"bash task status: opening the bucket failed; next pass"
|
||||
);
|
||||
}
|
||||
for agent in live_agents(&wanted, &hives).await {
|
||||
if let Err(e) = swarm_queue_client::bash_task::open_output(&client, &agent).await {
|
||||
tracing::warn!(
|
||||
%agent,
|
||||
error = %swarm_queue_client::chain(&e),
|
||||
"bash task output: creating the agent's stream failed; next pass"
|
||||
);
|
||||
}
|
||||
if let Err(e) =
|
||||
swarm_queue_client::subagent_term::open_or_create(&client, &agent).await
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue