docs: the handbook follows the three layers: swarm, hives, agents
The handbook's sections were agent-lifecycle, integrations, swarm, tools, trust-boundary and web-ui, which do not follow how the system is built, so a reader could not tell which layer a page is about. Its pages now sit in swarm/, hives/ and agents/, with the accounts an agent can hold outside the system in external-accounts/. - swarm/: forge, matrix and the knowledge repo join the swarm pages, and so does the swarmctl reference. - hives/: the dashboard, hivectl and its reference, and the operator/agent boundary, with a README that takes over the old web-ui and tools pages. - agents/: the roster, persistence, config changes, the agent's own web page (was web-ui/agent) and the security model, with a README. - external-accounts/: GitHub and GitLab. Pages are moved whole; none is split yet. Every reference follows: relative links in the docs, `docs/2-handbook/...` paths in code comments, the nix checks that regenerate the CLI references and the ignore list, and docs/README.md, whose handbook section is now by layer.
This commit is contained in:
parent
263b21021a
commit
0e84fe8bc4
6 changed files with 393 additions and 363 deletions
|
|
@ -88,7 +88,7 @@ fn effort_from(configured: Option<&str>, file: Option<String>) -> (String, Sourc
|
|||
// (`hyperhive-rate-limited`, `hyperhive-needs-login`) that grew organically
|
||||
// and had no shared schema. A single JSON file is self-documenting, atomic
|
||||
// to write, and cheaper for hive-c0re to read on each sweep (one fopen vs
|
||||
// two stat calls). See `docs/2-handbook/agent-lifecycle/persistence.md::Harness state files`.
|
||||
// two stat calls). See `docs/2-handbook/agents/persistence.md::Harness state files`.
|
||||
//
|
||||
// Legacy sentinel files written by older harness builds are still honoured
|
||||
// by `read_harness_state` so in-place upgrades don't lose state (the new
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ pub fn default_dir() -> PathBuf {
|
|||
/// exactly these to force re-login while preserving session-history files —
|
||||
/// so boot detection ([`has_session`]) and logout agree by construction.
|
||||
/// Rationale + the previous wholesale-wipe shape we replaced live in
|
||||
/// `docs/2-handbook/web-ui/agent.md::Per-agent endpoints`
|
||||
/// `docs/2-handbook/agents/web-page.md::Per-agent endpoints`
|
||||
/// (the `/api/logout` bullet).
|
||||
///
|
||||
/// `.credentials.json` is the actual OAuth session; `mcp-needs-auth-cache.json`
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
//! Claude credentials live at `$HOME/.claude` (resolves to
|
||||
//! `/home/<agent-name>/.claude` because the harness service runs as a
|
||||
//! non-root unix user matching the agent label — see
|
||||
//! `docs/2-handbook/agent-lifecycle/persistence.md::First-boot agent-user migration`).
|
||||
//! `docs/2-handbook/agents/persistence.md::First-boot agent-user migration`).
|
||||
//!
|
||||
//! All three paths can be overridden via env vars (`HYPERHIVE_STATE_DIR`,
|
||||
//! `HYPERHIVE_HARNESS_DIR`, `HYPERHIVE_CLAUDE_DIR`) for dev / test scenarios.
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
//! Trade-off (accepted — issue tracker "perms borked"): a misbehaving harness
|
||||
//! could skip its own cleanup, which the host-side version was meant to
|
||||
//! prevent. But a compromised harness is already inside the container trust
|
||||
//! boundary (`docs/2-handbook/trust-boundary/security.md`), and these are ephemeral local artifacts — so
|
||||
//! boundary (`docs/2-handbook/agents/security.md`), and these are ephemeral local artifacts — so
|
||||
//! the honest fix is to clean them up where they live.
|
||||
|
||||
use std::path::Path;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ use super::AppState;
|
|||
/// resumes when a fresh credentials file appears (the swarm login stores
|
||||
/// one and `claude_credentials` installs it).
|
||||
/// Always returns 200 with a body describing what happened. See
|
||||
/// `docs/2-handbook/web-ui/agent.md::Per-agent endpoints`
|
||||
/// `docs/2-handbook/agents/web-page.md::Per-agent endpoints`
|
||||
/// (the `/api/logout` bullet) for the three-step rationale +
|
||||
/// preservation invariants.
|
||||
pub(super) async fn post_logout(State(state): State<AppState>) -> Response {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ pub(super) struct StateSnapshot {
|
|||
/// Navigation links for this agent page. Also served via
|
||||
/// `DashboardState.links` (`GET /api/dashboard-state`) for the
|
||||
/// dashboard card's icon strip. Both are produced by `agent_links()`
|
||||
/// — single source of truth. See [`docs/2-handbook/web-ui/dashboard.md::Container row`]
|
||||
/// — single source of truth. See [`docs/2-handbook/hives/dashboard.md::Container row`]
|
||||
/// for the frontend resolver + which links appear in which conditions.
|
||||
links: Vec<AgentLink>,
|
||||
/// Public URL of the forge (e.g.
|
||||
|
|
@ -276,7 +276,7 @@ fn read_own_status() -> (Option<String>, Option<i64>) {
|
|||
/// for `External`; the frontend resolves each against its `kind`
|
||||
/// against the right base so the backend never has to guess the
|
||||
/// operator's browser host. See
|
||||
/// `docs/2-handbook/web-ui/dashboard.md::Container row` for
|
||||
/// `docs/2-handbook/hives/dashboard.md::Container row` for
|
||||
/// the resolver + how `deployed:<sha>` ships alongside.
|
||||
///
|
||||
/// Icons are real emoji, not unicode arrow/geometric glyphs — mara:
|
||||
|
|
|
|||
Loading…
Reference in a new issue