hivectl: make --socket a global flag instead of per-verb
The host admin socket path was duplicated on every daemon-assisted verb (agents restart/restart-all, stop, start). Hoist it to a single global arg on the top-level Cli (`--socket`, default DEFAULT_HOST_SOCKET, accepted before or after the subcommand) and thread cli.socket through dispatch. Verbs that don't talk to the daemon ignore it. Pure CLI-ergonomics change; no wire/behaviour change. Regenerated docs/tools/hivectl-cli.md.
This commit is contained in:
parent
03ea5d601b
commit
ae1bdd084a
2 changed files with 20 additions and 43 deletions
|
|
@ -28,7 +28,7 @@ This document contains the help content for the `hivectl` command-line program.
|
|||
|
||||
Sibling to the `hive-c0re` daemon binary. Covers host-side admin operations that don't go through the broker — manual user provisioning on the bundled forge + matrix containers, plus future recovery / debugging verbs.
|
||||
|
||||
**Usage:** `hivectl <COMMAND>`
|
||||
**Usage:** `hivectl [OPTIONS] <COMMAND>`
|
||||
|
||||
###### **Subcommands:**
|
||||
|
||||
|
|
@ -40,6 +40,12 @@ Sibling to the `hive-c0re` daemon binary. Covers host-side admin operations that
|
|||
* `stop` — Stop containers hive-wide in one operator action. Bare `hivectl stop` stops **everything** — all sub-agents plus the ci, forge, gateway, and matrix infra containers. Narrow it with scope flags: `--agents` (all sub-agents), `--ci` / `--forge` / `--gateway` / `--matrix` (named infra), and `--agent <name>` (repeatable) for specific sub-agents. Flags are additive (e.g. `--agents --matrix`). Requires the hive-c0re daemon (connects to the host admin socket). hive-c0re itself is never stopped — it services the request
|
||||
* `start` — Start containers hive-wide — the inverse of `hivectl stop`. Bare `hivectl start` starts everything back up; the same scope flags as `stop` narrow it (`--agents`, `--ci`, `--forge`, `--gateway`, `--matrix`, `--agent <name>`). Requires the hive-c0re daemon
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--socket <SOCKET>` — Path to the hive-c0re host admin socket, used by the daemon-assisted verbs (`agents`, `stop`, `start`). Global: accepted before or after the subcommand. Verbs that don't talk to the daemon ignore it
|
||||
|
||||
Default value: `/run/hyperhive/host.sock`
|
||||
|
||||
|
||||
|
||||
## `hivectl forge`
|
||||
|
|
@ -251,31 +257,19 @@ Agent container management. Requires the hive-c0re daemon to be running (connect
|
|||
|
||||
Stop and start a single agent container without rebuilding config. Useful for "kick the container" when the process is stuck or the container needs a clean restart without changing the NixOS config
|
||||
|
||||
**Usage:** `hivectl agents restart [OPTIONS] <NAME>`
|
||||
**Usage:** `hivectl agents restart <NAME>`
|
||||
|
||||
###### **Arguments:**
|
||||
|
||||
* `<NAME>` — Agent name (e.g. `damocles`, `ruth`)
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--socket <SOCKET>` — Path to the hive-c0re host admin socket
|
||||
|
||||
Default value: `/run/hyperhive/host.sock`
|
||||
|
||||
|
||||
|
||||
## `hivectl agents restart-all`
|
||||
|
||||
Stop and restart ALL managed agent containers in sequence. Iterates the live container list and restarts each one. Any per-agent failure is reported at the end rather than stopping mid-run, so all containers get a restart attempt
|
||||
|
||||
**Usage:** `hivectl agents restart-all [OPTIONS]`
|
||||
|
||||
###### **Options:**
|
||||
|
||||
* `--socket <SOCKET>` — Path to the hive-c0re host admin socket
|
||||
|
||||
Default value: `/run/hyperhive/host.sock`
|
||||
**Usage:** `hivectl agents restart-all`
|
||||
|
||||
|
||||
|
||||
|
|
@ -318,9 +312,6 @@ Stop containers hive-wide in one operator action. Bare `hivectl stop` stops **ev
|
|||
* `--graceful` — Gracefully quiesce each agent (finish the current turn, drain the inbox) before stopping, instead of a hard stop.
|
||||
|
||||
NOTE: not yet effective — the per-agent quiesce is still being implemented (see the graceful-agent-stop tracker), so today this falls through to a hard stop. The flag is accepted now so the wire/CLI shape is stable when the quiesce lands.
|
||||
* `--socket <SOCKET>` — Path to the hive-c0re host admin socket
|
||||
|
||||
Default value: `/run/hyperhive/host.sock`
|
||||
|
||||
|
||||
|
||||
|
|
@ -338,9 +329,6 @@ Start containers hive-wide — the inverse of `hivectl stop`. Bare `hivectl star
|
|||
* `--forge` — The forge container (`hive-forge`)
|
||||
* `--gateway` — The gateway container (`hive-gateway`)
|
||||
* `--matrix` — The matrix container (`hive-matrix`)
|
||||
* `--socket <SOCKET>` — Path to the hive-c0re host admin socket
|
||||
|
||||
Default value: `/run/hyperhive/host.sock`
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue