Watch
0
0
Fork
You've already forked hyperhive
0

swarmctl: drop the controller socket target, the host has no socket to reach

This commit is contained in:
atlas 2026-11-26 15:40:29 +01:00 • committed by mara
commit 66770d71ba

View file

@ -66,7 +66,7 @@ swarm-level operator CLI
* `--users-file <PATH>` — Host-side path of authelia's users database — that is, the path inside the container, prefixed with the container's root.
This is the only user store: it's read before every change and written in place, and `swarm-authelia-bridge` writes the same file.
* `--swarm <URL>` — The swarm's domain, as `https://<domain>` or the bare domain. Given, the `agent`, `schedule` and `forge` verbs, and the agent checks and steps of `setup`, go through its gateway as the account `swarmctl login` logged in, instead of over the controller's socket. Falls back to `SWARMCTL_SWARM`; `login` then falls back to `SWARMCTL_LOGIN_DEFAULT_SWARM`. The swarm-controller nix module sets both to its host's own swarm, so there the verbs use the gateway and need `swarmctl login` once. With no swarm, they use the socket that `--controller-socket` or `SWARM_CONTROLLER_SOCKET` names; the module sets neither
* `--swarm <URL>` — The swarm's domain, as `https://<domain>` or the bare domain. Given, the `agent`, `schedule` and `forge` verbs, and the agent checks and steps of `setup`, go through its gateway as the account `swarmctl login` logged in. Falls back to `SWARMCTL_SWARM`; `login` then falls back to `SWARMCTL_LOGIN_DEFAULT_SWARM`. The swarm-controller nix module sets both to its host's own swarm, so there the verbs use the gateway and need `swarmctl login` once. The controller runs as a pod and has no socket on the host, so a verb that reaches it needs a swarm
* `--ca-file <PATH>` — A PEM CA certificate to trust beside the system roots, for a swarm whose gateway serves a certificate from the swarm's own CA. Falls back to `SWARMCTL_CA_FILE`
@ -115,9 +115,6 @@ No approval gate guards this: the caller is root on the controller's host, or lo
* `--agents-md <FILE>` — A text file the agent's `AGENTS.md` starts with.
The agent writes it on its first start, and only when it has no `AGENTS.md` yet: re-creating an agent never replaces an existing file. The controller refuses a file over 64 KiB.
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -129,18 +126,12 @@ swarm-controller does this for every agent with a store identity at start and ev
Queues and returns, the same way `agent create` does — watch the swarm UI's job view for the outcome.
**Usage:** `swarmctl agent mint-forge-token [OPTIONS] <NAME>`
**Usage:** `swarmctl agent mint-forge-token <NAME>`
###### **Arguments:**
* `<NAME>` — Name of an agent that already exists
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent set-state`
@ -164,9 +155,6 @@ No approval gate guards this: the caller is root on the controller's host, or lo
* `--hive <HIVE>` — The hive that runs the agent
* `--yes` — Confirm `destroyed`, which can't be undone
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -176,18 +164,12 @@ Follow an agent's terminal rows live: the newest retained rows, then each new on
The swarm-level counterpart of `hivectl agent watch`, read from the swarm-controller rather than from the agent's own web UI, so it works from any machine with `--swarm` and doesn't need the agent running to show what it last did. Fails when the swarm has never heard from the agent.
**Usage:** `swarmctl agent watch [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent watch <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent inference`
@ -212,18 +194,12 @@ A field the swarm sets wins over the agent's own value (its agent.nix or a `hype
Show what the swarm sets for an agent, naming the fields it doesn't set, and the model and effort the agent runs on, each with where it comes from
**Usage:** `swarmctl agent inference get [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent inference get <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent inference set`
@ -244,9 +220,6 @@ Set fields for an agent. Only the flags given change; the others keep what's sto
Possible values: `low`, `medium`, `high`, `xhigh`, `max`
* `--subagent-models <MODELS>` — The models it may start subagents on, comma-separated. Stored and shown; the agent doesn't apply it yet
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -254,18 +227,12 @@ Set fields for an agent. Only the flags given change; the others keep what's sto
Clear every field for an agent, so it goes back to its own values
**Usage:** `swarmctl agent inference clear [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent inference clear <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent permissions`
@ -288,18 +255,12 @@ The agent applies its tool permissions at its next turn; the hive running it res
Show the permissions the swarm grants an agent, or that it sets none
**Usage:** `swarmctl agent permissions get [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent permissions get <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent permissions set`
@ -319,9 +280,6 @@ Replace the permissions the swarm grants an agent; the internet flag stays unles
Possible values: `true`, `false`
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -329,18 +287,12 @@ Replace the permissions the swarm grants an agent; the internet flag stays unles
Clear the agent's permissions, so the default applies again
**Usage:** `swarmctl agent permissions clear [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent permissions clear <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent agents-md`
@ -362,18 +314,12 @@ Show an agent's AGENTS.md, or edit it with a diff.
Print an agent's AGENTS.md on stdout, and its revision on stderr
**Usage:** `swarmctl agent agents-md get [OPTIONS] <AGENT>`
**Usage:** `swarmctl agent agents-md get <AGENT>`
###### **Arguments:**
* `<AGENT>` — Agent name
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl agent agents-md apply`
@ -382,7 +328,7 @@ Apply a unified diff to an agent's AGENTS.md.
The diff names `a/AGENTS.md` and `b/AGENTS.md`, as `diff -u a/AGENTS.md b/AGENTS.md` writes it. The agent refuses it when the file is no longer at `--base`, or when it doesn't apply, and leaves the file as it was.
**Usage:** `swarmctl agent agents-md apply [OPTIONS] --base <REVISION> <AGENT> <DIFF_FILE>`
**Usage:** `swarmctl agent agents-md apply --base <REVISION> <AGENT> <DIFF_FILE>`
###### **Arguments:**
@ -392,9 +338,6 @@ The diff names `a/AGENTS.md` and `b/AGENTS.md`, as `diff -u a/AGENTS.md b/AGENTS
###### **Options:**
* `--base <REVISION>` — The revision you made the diff against, as `get` printed it. It's the git blob id of that text, so `git hash-object` of the unedited file prints it too
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -433,9 +376,6 @@ Without `--every` it fires once. Without `--at` its first fire is now.
* `--at <TIME>` — First fire time: an RFC 3339 time with its offset, such as `2026-10-05T09:00:00+02:00`, or unix seconds. Defaults to now
* `--every <DURATION>` — Time between fires: a count with a unit of `s`, `m`, `h` or `d`, such as `1h` or `7d`. Leave out for a one-shot
* `--paused` — Add it paused
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -448,9 +388,6 @@ List scheduled prompts, one row each, with their agents and next fire time
###### **Options:**
* `--agent <AGENT>` — Show only the prompts that fire in this agent
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -475,9 +412,6 @@ Only the flags given change, and the id stays. `--at` and `--every` move the fir
* `--once` — Make it a one-shot
* `--add-agent <AGENT>` — Agent to start firing it in. Repeatable
* `--remove-agent <AGENT>` — Agent to stop firing it in. Repeatable. Fails if the agent isn't a target, or if no agent would remain
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
@ -485,54 +419,36 @@ Only the flags given change, and the id stays. `--at` and `--every` move the fir
Stop a scheduled prompt firing. Times that pass while it's paused aren't fired when it resumes
**Usage:** `swarmctl schedule pause [OPTIONS] <ID>`
**Usage:** `swarmctl schedule pause <ID>`
###### **Arguments:**
* `<ID>` — The prompt's id, as `schedule list` shows it
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl schedule resume`
Let a paused scheduled prompt fire again, from its next time on
**Usage:** `swarmctl schedule resume [OPTIONS] <ID>`
**Usage:** `swarmctl schedule resume <ID>`
###### **Arguments:**
* `<ID>` — The prompt's id, as `schedule list` shows it
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl schedule rm`
Remove a scheduled prompt from every agent it names
**Usage:** `swarmctl schedule rm [OPTIONS] <ID>`
**Usage:** `swarmctl schedule rm <ID>`
###### **Arguments:**
* `<ID>` — The prompt's id, as `schedule list` shows it
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl user`
@ -631,18 +547,12 @@ Make an existing forge user a site admin.
The forge creates a human's account on their first SSO login, and this fails until that login has happened. Running it on a site admin changes nothing. Refused for an agent.
**Usage:** `swarmctl forge make-admin [OPTIONS] <NAME>`
**Usage:** `swarmctl forge make-admin <NAME>`
###### **Arguments:**
* `<NAME>` — Forge username, the same as the user's SSO username
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl setup`
@ -653,19 +563,13 @@ Run it as root, in a terminal. It checks `docs/1-getting-started/setup.md` first
For scripts, use `setup status` and the individual verbs.
**Usage:** `swarmctl setup [OPTIONS]
**Usage:** `swarmctl setup
setup <COMMAND>`
###### **Subcommands:**
* `status` — Print the first-run setup as a progress report: a count and a bar, then each step as done, not done or unknown, and what to do next
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
## `swarmctl setup status`
@ -676,13 +580,7 @@ Read-only, and needs no token. The secret store's steps come from `bao status` a
Exits 0 when every step it can see has finished, and 1 otherwise, including when a check failed to run. Step 10, another agent, is optional and never changes the exit code. The steps are those of `docs/1-getting-started/setup.md`.
**Usage:** `swarmctl setup status [OPTIONS]`
###### **Options:**
* `--controller-socket <PATH>` — swarm-controller's unix socket.
Used when `--swarm` and `SWARMCTL_SWARM` give no swarm; falls back to `SWARM_CONTROLLER_SOCKET`. The controller runs as a pod and has no socket on the host, so name the swarm instead.
**Usage:** `swarmctl setup status`