diff --git a/docs/tools/hivectl-cli.md b/docs/tools/hivectl-cli.md index 8587c403..7aeacc30 100644 --- a/docs/tools/hivectl-cli.md +++ b/docs/tools/hivectl-cli.md @@ -23,7 +23,6 @@ This document contains the help content for the `hivectl` command-line program. * [`hivectl choom`↴](#hivectl-choom) * [`hivectl stop`↴](#hivectl-stop) * [`hivectl start`↴](#hivectl-start) -* [`hivectl restart`↴](#hivectl-restart) ## `hivectl` @@ -40,7 +39,6 @@ Sibling to the `hive-c0re` daemon binary. Covers host-side admin operations that * `choom` — Open an interactive Claude session inside an agent container * `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 ` (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 `). Requires the hive-c0re daemon -* `restart` — Restart containers hive-wide — `stop` then `start` over the same scope. Bare `hivectl restart` restarts **everything** (all sub-agents plus the ci/forge/gateway/matrix infra containers); the same scope flags as `stop`/`start` narrow it (`--agents`, `--ci`, `--forge`, `--gateway`, `--matrix`, `--agent `). If the stop phase reports a failure the start phase is skipped so the operator can investigate. Requires the hive-c0re daemon ###### **Options:** @@ -332,24 +330,6 @@ Start containers hive-wide — the inverse of `hivectl stop`. Bare `hivectl star -## `hivectl restart` - -Restart containers hive-wide — `stop` then `start` over the same scope. Bare `hivectl restart` restarts **everything** (all sub-agents plus the ci/forge/gateway/matrix infra containers); the same scope flags as `stop`/`start` narrow it (`--agents`, `--ci`, `--forge`, `--gateway`, `--matrix`, `--agent `). If the stop phase reports a failure the start phase is skipped so the operator can investigate. Requires the hive-c0re daemon - -**Usage:** `hivectl restart [OPTIONS]` - -###### **Options:** - -* `--agents` — All sub-agent containers -* `--agent ` — A specific sub-agent by name. Repeatable: `--agent a --agent b` -* `--ci` — The CI runner container (`hive-ci`) -* `--forge` — The forge container (`hive-forge`) -* `--gateway` — The gateway container (`hive-gateway`) -* `--matrix` — The matrix container (`hive-matrix`) -* `--graceful` — Gracefully quiesce each agent on the stop half (see `stop --graceful`). Applies to agents only - - -
diff --git a/hive-c0re/src/bin/hivectl.rs b/hive-c0re/src/bin/hivectl.rs index 618258c0..8f0529a9 100644 --- a/hive-c0re/src/bin/hivectl.rs +++ b/hive-c0re/src/bin/hivectl.rs @@ -133,21 +133,6 @@ enum Cmd { #[command(flatten)] scope: ScopeArgs, }, - /// Restart containers hive-wide — `stop` then `start` over the same - /// scope. Bare `hivectl restart` restarts **everything** (all sub-agents - /// plus the ci/forge/gateway/matrix infra containers); the same scope - /// flags as `stop`/`start` narrow it (`--agents`, `--ci`, `--forge`, - /// `--gateway`, `--matrix`, `--agent `). If the stop phase reports - /// a failure the start phase is skipped so the operator can investigate. - /// Requires the hive-c0re daemon. - Restart { - #[command(flatten)] - scope: ScopeArgs, - /// Gracefully quiesce each agent on the stop half (see - /// `stop --graceful`). Applies to agents only. - #[arg(long)] - graceful: bool, - }, /// Emit the full CLI reference as `CommonMark` to stdout. /// /// Hidden tooling command (not part of day-to-day operator admin): @@ -435,7 +420,6 @@ async fn main() -> Result<()> { }, Cmd::Stop { scope, graceful } => stop(&socket, scope.to_scope(), graceful).await, Cmd::Start { scope } => start(&socket, scope.to_scope()).await, - Cmd::Restart { scope, graceful } => restart(&socket, scope.to_scope(), graceful).await, Cmd::Choom { name, fresh } => choom(&name, fresh), Cmd::MarkdownDocs => { print!("{}", clap_markdown::help_markdown::()); @@ -907,16 +891,6 @@ async fn start(socket: &Path, scope: hive_sh4re::LifecycleScope) -> Result<()> { render_lifecycle(&resp, "started") } -/// Restart = `stop` then `start` over the same scope, composed client-side -/// from the two daemon ops (no dedicated wire op). The stop phase honours -/// `--graceful`; if it reports a failure (`stop` returns `Err`) the `?` -/// short-circuits before the start phase, so a half-stopped hive isn't -/// blindly started over — the operator sees the stop errors and can recover. -async fn restart(socket: &Path, scope: hive_sh4re::LifecycleScope, graceful: bool) -> Result<()> { - stop(socket, scope.clone(), graceful).await?; - start(socket, scope).await -} - /// Render a hive-wide stop/start response: one `: ` line per /// touched container, then surface any aggregated per-target failure as a /// non-zero exit. `verb` is the past-tense word printed per item