Watch
0
0
Fork
You've already forked hyperhive
0

docs: sort the top-level directories into five sections by what the reader wants

Every docs directory moves under 1-getting-started, 2-handbook,
4-implementation or 5-project; the options reference (section 3) comes from
the website and has no directory here. trust-boundary stays whole under the
handbook for now. web-ui, swarm and tools split between handbook and
implementation, and the command-line references move to
2-handbook/reference. Links, path references in code and nix, and the docs
index follow the moves; no page content changes.
This commit is contained in:
iris 2026-11-06 18:30:12 +01:00 • committed by mara
commit 6739bb903d
3 changed files with 736 additions and 701 deletions

View file

@ -79,7 +79,7 @@ pub(super) async fn post_login_cancel(State(state): State<AppState>) -> Response
/// The turn loop's next iteration parks into `wait_for_login` which
/// resumes when a fresh credentials file appears via `/login/code`.
/// Always returns 200 with a body describing what happened. See
/// `docs/web-ui/agent.md::Per-agent endpoints`
/// `docs/2-handbook/web-ui/agent.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 {

View file

@ -94,8 +94,8 @@ fn routes() -> Router<AppState> {
///
/// `HIVE_WEB_SOCKET` opt-in selects unix-socket vs TCP binding; the
/// dual-mode transition + gateway-side consumer live in
/// `docs/web-ui/shape.md::Listener bind` and
/// `docs/networking/gateway.md::Per-agent unix-socket upstream`.
/// `docs/4-implementation/web-ui/shape.md::Listener bind` and
/// `docs/4-implementation/networking/gateway.md::Per-agent unix-socket upstream`.
///
/// # Errors
///
@ -150,7 +150,7 @@ pub async fn serve(
// `UnixListener` at the given path. Empty string treated as
// unset so a stray `HIVE_WEB_SOCKET=` doesn't trap us into an
// un-bindable empty path. Falls through to the TCP path below
// otherwise. See docs/networking/gateway.md::Per-agent unix-socket upstream
// otherwise. See docs/4-implementation/networking/gateway.md::Per-agent unix-socket upstream
// for the gateway-side consumer.
if let Some(socket_path) = std::env::var_os("HIVE_WEB_SOCKET")
&& !socket_path.is_empty()
@ -181,7 +181,7 @@ pub async fn serve(
/// to ask.
///
/// Marker-gating + the gateway-side consumer: see
/// `docs/networking/gateway.md::Per-agent unix-socket upstream`.
/// `docs/4-implementation/networking/gateway.md::Per-agent unix-socket upstream`.
fn bind_unix(path: &Path) -> Result<tokio::net::UnixListener> {
use std::os::unix::fs::PermissionsExt;
if let Some(parent) = path.parent() {
@ -221,7 +221,7 @@ const MAX_BIND_ATTEMPTS: u32 = 12;
/// not an unbounded wait).
///
/// Retry rationale + dashboard-banner-on-real-collision:
/// see `docs/web-ui/shape.md::Listener bind`.
/// see `docs/4-implementation/web-ui/shape.md::Listener bind`.
async fn bind_with_retry(addr: SocketAddr, label: &str) -> Result<tokio::net::TcpListener> {
let mut retries = 0u32;
let bound = (|| async { try_bind(addr) })

View file

@ -164,7 +164,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/web-ui/dashboard.md::Container row`]
/// — single source of truth. See [`docs/2-handbook/web-ui/dashboard.md::Container row`]
/// for the frontend resolver + which links appear in which conditions.
links: Vec<AgentLink>,
/// Public URL of the forge (e.g.
@ -305,7 +305,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/web-ui/dashboard.md::Container row` for
/// `docs/2-handbook/web-ui/dashboard.md::Container row` for
/// the resolver + how `deployed:<sha>` ships alongside.
///
/// Icons are real emoji, not unicode arrow/geometric glyphs — mara: