swarm: the commands and skills an agent's message box offers
GET /api/agents/{name}/commands answers with the swarm's own commands, a table
in the controller, then the skills the agent's harness published to its key of
the agent-commands bucket. The published part is untrusted and cut down: plain
names only, no repeats, never a command's name, a capped list and one short line
per description. The agent credential may publish its own key. Nothing publishes
yet; the harness half and the swarm UI menu follow.
This commit is contained in:
parent
06c338ff40
commit
8f11a38d17
1 changed files with 389 additions and 7 deletions
|
|
@ -26,13 +26,13 @@ use crate::jobq::{
|
|||
use crate::routes::hives::{HiveEntry, ServiceLink};
|
||||
use crate::routes::{self, AppState, agents, config_prs, forge_admin, hives, jobq_graph};
|
||||
use crate::{
|
||||
agent_control, agent_custom, agent_icon, agent_input, agent_limits, agent_login,
|
||||
agent_permissions, agent_renewal, agent_state_stream, agent_status, agents_md, alerts,
|
||||
archetypes, auth, backend_env, bash_task, builder, claude_login, config_drift, config_pr,
|
||||
egress_allow, egress_deny, forge, forge_account, github_account, gitlab_account, inference,
|
||||
issue_report, linked_accounts, matrix_account, message_stream, notify_flows, notify_router_api,
|
||||
pause_hold, pr_report, pulls, queue_identity, review_classifier, schedules, status,
|
||||
subagent_term, term_stream, wanted, webhook,
|
||||
agent_commands, agent_control, agent_custom, agent_icon, agent_input, agent_limits,
|
||||
agent_login, agent_permissions, agent_renewal, agent_state_stream, agent_status, agents_md,
|
||||
alerts, archetypes, auth, backend_env, bash_task, builder, claude_login, config_drift,
|
||||
config_pr, egress_allow, egress_deny, forge, forge_account, github_account, gitlab_account,
|
||||
inference, issue_report, linked_accounts, matrix_account, message_stream, notify_flows,
|
||||
notify_router_api, pause_hold, pr_report, pulls, queue_identity, review_classifier, schedules,
|
||||
status, subagent_term, term_stream, wanted, webhook,
|
||||
};
|
||||
|
||||
/// Where the daemon binds, overridable via `SWARM_CONTROLLER_SOCKET`.
|
||||
|
|
@ -666,6 +666,7 @@ pub(crate) fn build_app(state: AppState) -> axum::Router {
|
|||
.routes(routes!(message_stream::stream_messages))
|
||||
.routes(routes!(subagent_term::list_subagents))
|
||||
.routes(routes!(bash_task::list_bash_tasks))
|
||||
.routes(routes!(agent_commands::list_commands))
|
||||
.routes(routes!(subagent_term::stream_subagent_term))
|
||||
.routes(routes!(agent_state_stream::stream_agent_state))
|
||||
.routes(routes!(agent_input::post_agent_input))
|
||||
|
|
|
|||
Loading…
Reference in a new issue