Expand description
Pack runtime trait and verb registry.
PackRuntime mirrors Pack’s const associated items as methods for object safety.
Build a VerbRegistry via VerbRegistryBuilder::build(); registration is builder-only.
Structs§
- Channel
Ingest Capability - Factory for creating pack instances registered via
inventoryat link time. Each pack crate submits a&'static dyn PackFactorywrapped in aPackRegistration; the binary’s linker collects them all into a single slice iterable at runtime. - Edge
Endpoint Rule - A pack-declared endpoint rule for a specific edge relation.
- Entity
Type Def - One entry in the registry: a canonical subtype name for a specific kind, together with any accepted aliases.
- Handler
Def - Handler metadata for discovery and documentation.
- Intercepted
Dispatch Result - Result of an operation handled outside normal pack dispatch, paired with typed transport metadata that must survive the gate/audit boundary.
- Note
Kind Spec - Kind-level schema specification for a note kind.
- Note
Lifecycle Spec - Lifecycle specification for a note kind.
- Pack
Column Addition - An idempotent nullable-column addition to a pack-owned auxiliary table.
- Pack
Install - Output of
PackFactory::create_install— bundles the pack runtime with its optional by-ID resolver and dispatch hook so a factory can hand back all three built from one shared instance (seeBrainPackFactoryfor why this matters: the dispatch hook must observe the same state the runtime mutates, not a second unrelated instance). - Pack
Metadata Registry - Pack metadata with no executable registry capability.
- Pack
Registration - Newtype wrapper collected by
inventoryso pack crates can submit&'static dyn PackFactoryreferences without the type-ascription syntax thatinventory::submit!does not support for bare trait-object references. - Pack
Registry - Registry of pack factories discovered via
inventoryat link time. - Pack
Schema Collision Error - Error returned by
VerbRegistry::apply_schema_plans_with_mapwhen two packs on the same backend declare the same auxiliary table (ADR-028 §7). - Pack
Schema Plan - DDL statements the pack needs applied to the auxiliary schema.
- Param
Def - Parameter type for
help=trueschema envelopes. - Request
Identity - Per-request identity context that overrides a
VerbRegistry’s construction-bakeddefault_namespace/actor_id/visible_namespacesfor exactly oneVerbRegistry::dispatch_with_identitycall (ADR-096 Fork 1 — warm-daemon per-request identity). - Schema
Plan - Pack-auxiliary schema plan.
- Verb
Registry - Immutable registry that dispatches verb calls to registered packs.
- Verb
Registry Builder - Builder for constructing a
VerbRegistry. - Verified
Actor - A non-blank, out-of-band authenticated principal for
VerbRegistry::dispatch_as.
Enums§
- Endpoint
Kind - Match spec for one end of an
EdgeEndpointRule. - IdResolution
Mode - How a
uuidorarray of uuidparameter resolves a caller-supplied identifier — full UUID and short hex-prefix acceptance, and whether either form is checked against a namespace. This is a property of the handler’s own resolution code, declared explicitly per parameter soVerbRegistry::describe_verb’s rendered contract can never drift from what the handler actually does (see khive-runtime’spack.rsIdResolutionModerendering table for the exact wording per variant). - Ingest
Audit Store - Whether
PackRegistry::build_ingest_registryattaches the runtime’s event store to the registry it builds. - Note
Update Effect - A kind-owned graph mutation committed with its note update. SQL and deferred callbacks are deliberately not part of this interface.
- Pack
Column Affinity - SQLite storage type for a nullable pack-auxiliary column addition.
- Pack
Load Error - Error returned by
PackRegistry::register_packswhen boot validation fails. - Verb
Category - Illocutionary force classification for a verb handler.
- Verb
Presentation Policy - Presentation override for a verb handler.
- Visibility
- Visibility tier for a handler.
Constants§
- AUDIT_
PERSISTENCE_ SKIPPED_ READ_ ONLY - Stable advisory code emitted when a successful inspection cannot persist its dispatch audit because the configured audit backend is read-only.
- GENERIC_
CRUD_ PACK - Name of the pack providing the shared CRUD verbs and the general-purpose note kinds those verbs exist to serve.
- RESERVED_
ENVELOPE_ ARGS - Argument names owned by the outer request envelope rather than verb handlers.
Traits§
- Dispatch
Hook - Best-effort hook called after every successful verb dispatch.
- Kind
Hook - Per-kind specialization for shared CRUD.
- Pack
ById Resolver - Optional sub-trait for packs that own private SQL tables and issue UUIDs
that must be reachable through the generic
get(id)anddelete(id)verbs. - Pack
Factory - Pack
Runtime - Async dispatch trait for packs.
Functions§
- audit_
admission_ refused_ obligation_ count - audit_
admission_ refused_ obligation_ last_ at_ ms Noneuntil the counter first moves in this process.- audit_
admission_ unresolved_ obligation_ count - audit_
admission_ unresolved_ obligation_ last_ at_ ms Noneuntil the counter first moves in this process.- json_
type_ name - JSON type name for error messages: describes a present-but-malformed
namespacevalue without echoing its contents. - resolve_
explicit_ namespace - Resolve and validate a caller-supplied
namespaceargument the same way on every MCP ingress path.
Type Aliases§
- VerbDef
Deprecated - Backward-compatible type alias. Existing code that names
VerbDefstill compiles; new code should useHandlerDefdirectly.