internal/agenthub/store/doc.go
// Package store implements the versioned authoritative AgentHub hub and client // stores. It deliberately excludes learned directory, route, connection, and // circuit state. Callers use purpose-specific operations and read projections; // transaction callbacks and whole-state loads stay inside this package. // // Source map: // - store.go: open, lock, recovery, private commit and durable file writes. // - semantic_owner.go: pending revision consent, bounded ordered writer, // group commit, protected-file barriers and asynchronous epoch history. // - ram.go, narrow_operations.go: immutable generation/secret ownership and // path-copied authorization changes with structural work counters. // - wal_layout.go, wal_codec.go, wal_payload.go, wal_shape.go, wal_torn.go: // closed typed storage framing, payloads, bounds and interrupted tails. // - wal_disk.go, wal_heal.go: strict generation-selected recovery and // checkpoint healing while subsequent committed mutations continue. // - security_horizon.go: independent proactive time file and final-cut clock. // - catalog.go: immutable local selection and exact narrow revocation // replacement without full catalog verification on the request path. // - types.go, codec.go: persisted model and strict YAML shape. // - hub.go, client.go, validate.go, transition.go: model and transition checks. // - projections.go, private.go, public_endpoints.go: selected reads and their // ownership. Close secret-bearing results after use. // - browse*.go: bounded, revision-bound public pages and exact details. These // projections retain no cursor snapshot and expose no raw secret-bearing row. // - repair_endpoint.go: explicit higher-binding repair with exact revision, // current signer validation, one-use evidence cut and repair-only allowlist. // - operations.go: mutation outcomes, security floor, deadlines, authorization // revocation, endpoint publication and first use. // - invitation_operations.go, client_operations.go: durable invitation changes // and client installation through closed creation, preparation and approval // hooks. ceremony_policy.go owns the separate admission and endpoint // authorization outputs. invitation.go adapts invitationwire values for // store validation; it is not another wire codec or protocol session owner. // - lifecycle.go, terminal.go: state changes and erasure used by operations. // - bootstrap.go, authority.go, endpoint.go, operational.go: credential // preparation and activation. credentials.go, tls_provider.go: credential // validation and current TLS selection. // - saved.go: saved-Hub choices. pairing.go, pairing_links.go: durable // bilateral pairing transactions and Invitation-to-Pairing row links. // - clone.go, cleanup.go: owned state copies and final-owner secret erasure. // // Invitation owns proofs and ceremony sessions, invitationwire owns invitation // bytes, and store owns durable policy. See docs/internal/agenthub-storage.md // for transaction invariants and the on-disk contract. package store