`swarmctl agent create <name> --hive <hive>` POSTs `/api/agents` to swarm-controller over the daemon's unix socket and prints the queued job's node id. It deliberately does not wait. The endpoint queues a DAG whose last node *publishes* a deploy message; the hive's `hive-c0re` then converges on its own clock, out of the controller's sight. So even a fully settled graph would not mean the agent is up, and there is nothing this CLI could wait for that would let it claim otherwise. Printing the id is exactly what the response says and all of what it says. Transport is a bare hyper HTTP/1.1 client handshaked onto a tokio `UnixStream` via `hyper_util::rt::TokioIo` — the same crate family `hivectl/src/watch.rs` and `hive-agent/src/web_ui/proxy.rs` already use, all of it already workspace-pinned. The request/response shapes are a local mirror rather than a shared crate: the controller's own types are private to its binary and this crate does not link it, the same separation `hivectl` keeps from `hive-c0re`. Errors are reduced to one actionable line — the controller answers RFC 9457 problem+json, so an unknown `--hive` reaches the operator as the roster of hives that would have worked rather than a body dump. Response `warnings` are printed when non-empty. The nix module wraps the binary with `SWARM_CONTROLLER_SOCKET`, read from the same `socketPath` the daemon binds. Refs #4399
51 lines
2.5 KiB
Markdown
51 lines
2.5 KiB
Markdown
# Tools
|
|
|
|
`hivectl` is _your_ tool — the operator's own host CLI. Everything
|
|
else here documents the tool surface your **agents** get inside their
|
|
containers (the MCP tools an agent's own claude session can call).
|
|
You never call these directly, but they're the reference for what an
|
|
agent can actually do — useful when you're trying to understand or
|
|
debug agent behavior.
|
|
|
|
## For the operator
|
|
|
|
- **[hivectl](hivectl.md)** — the curated guide: provisioning forge
|
|
and matrix accounts, gateway htpasswd management, container
|
|
lifecycle shortcuts, interactive agent shell access.
|
|
- **[hivectl-cli](hivectl-cli.md)** — the exhaustive, autogenerated
|
|
flag-by-flag reference, kept in lockstep with the binary by CI.
|
|
|
|
## For the swarm operator
|
|
|
|
- **[swarmctl-cli](swarmctl-cli.md)** — the exhaustive, autogenerated
|
|
flag-by-flag reference for `swarmctl`, kept in lockstep with the
|
|
binary by CI the same way `hivectl-cli.md` is. `swarmctl` itself
|
|
runs as root on the swarm-controller host, not through `hivectl` —
|
|
see `swarmctl/README.md` for why. Two verb families today: `user`
|
|
(authelia's subject store, edited in place) and `agent create`
|
|
(queues the swarm-controller's creation job graph). No curated guide
|
|
yet; add one here if/when that grows.
|
|
|
|
## What your agents can do
|
|
|
|
- **[bash](bash.md)** — background shell execution (`mcp__bash__*`),
|
|
available on every agent unconditionally.
|
|
- **[subagent](subagent.md)** — spawn nested headless claude sessions
|
|
(`mcp__subagent__{start,continue,status,interrupt}`), shipped
|
|
default-on for every agent today alongside `bash` (expected to become a
|
|
real opt-in capability later).
|
|
- **[forge](forge.md)** — the `hive-forge` Forgejo CLI every agent has
|
|
for issues, PRs, and comments. Not an MCP tool — a binary agents
|
|
shell out to instead of ad-hoc curl.
|
|
- **[forge-cli](forge-cli.md)** — the exhaustive, autogenerated
|
|
flag-by-flag reference for `hive-forge`, kept in lockstep with the
|
|
binary by CI the same way `hivectl-cli.md` is.
|
|
- **[lifecycle](lifecycle.md)** — kill/start/restart/update for the
|
|
agents in a caller's own subtree, plus the approval-gated
|
|
config-change tools.
|
|
- **[matrix](matrix.md)** — the matrix MCP tool surface
|
|
(`mcp__matrix__*`) for agents with a matrix account, multiple
|
|
accounts per agent, and declaring extra MCP servers generally.
|
|
- **[scheduling](scheduling.md)** — scheduled prompts (operator
|
|
approval required) and the diagnostics tools (`get_logs`,
|
|
`get_host_journal`).
|