Skip to main content

Module pack

Module pack 

Source
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§

ChannelIngestCapability
Factory for creating pack instances registered via inventory at link time. Each pack crate submits a &'static dyn PackFactory wrapped in a PackRegistration; the binary’s linker collects them all into a single slice iterable at runtime.
EdgeEndpointRule
A pack-declared endpoint rule for a specific edge relation.
EntityTypeDef
One entry in the registry: a canonical subtype name for a specific kind, together with any accepted aliases.
HandlerDef
Handler metadata for discovery and documentation.
InterceptedDispatchResult
Result of an operation handled outside normal pack dispatch, paired with typed transport metadata that must survive the gate/audit boundary.
NoteKindSpec
Kind-level schema specification for a note kind.
NoteLifecycleSpec
Lifecycle specification for a note kind.
PackColumnAddition
An idempotent nullable-column addition to a pack-owned auxiliary table.
PackInstall
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 (see BrainPackFactory for why this matters: the dispatch hook must observe the same state the runtime mutates, not a second unrelated instance).
PackMetadataRegistry
Pack metadata with no executable registry capability.
PackRegistration
Newtype wrapper collected by inventory so pack crates can submit &'static dyn PackFactory references without the type-ascription syntax that inventory::submit! does not support for bare trait-object references.
PackRegistry
Registry of pack factories discovered via inventory at link time.
PackSchemaCollisionError
Error returned by VerbRegistry::apply_schema_plans_with_map when two packs on the same backend declare the same auxiliary table (ADR-028 §7).
PackSchemaPlan
DDL statements the pack needs applied to the auxiliary schema.
ParamDef
Parameter type for help=true schema envelopes.
RequestIdentity
Per-request identity context that overrides a VerbRegistry’s construction-baked default_namespace / actor_id / visible_namespaces for exactly one VerbRegistry::dispatch_with_identity call (ADR-096 Fork 1 — warm-daemon per-request identity).
SchemaPlan
Pack-auxiliary schema plan.
VerbRegistry
Immutable registry that dispatches verb calls to registered packs.
VerbRegistryBuilder
Builder for constructing a VerbRegistry.
VerifiedActor
A non-blank, out-of-band authenticated principal for VerbRegistry::dispatch_as.

Enums§

EndpointKind
Match spec for one end of an EdgeEndpointRule.
IdResolutionMode
How a uuid or array of uuid parameter 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 so VerbRegistry::describe_verb’s rendered contract can never drift from what the handler actually does (see khive-runtime’s pack.rs IdResolutionMode rendering table for the exact wording per variant).
IngestAuditStore
Whether PackRegistry::build_ingest_registry attaches the runtime’s event store to the registry it builds.
NoteUpdateEffect
A kind-owned graph mutation committed with its note update. SQL and deferred callbacks are deliberately not part of this interface.
PackColumnAffinity
SQLite storage type for a nullable pack-auxiliary column addition.
PackLoadError
Error returned by PackRegistry::register_packs when boot validation fails.
VerbCategory
Illocutionary force classification for a verb handler.
VerbPresentationPolicy
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§

DispatchHook
Best-effort hook called after every successful verb dispatch.
KindHook
Per-kind specialization for shared CRUD.
PackByIdResolver
Optional sub-trait for packs that own private SQL tables and issue UUIDs that must be reachable through the generic get(id) and delete(id) verbs.
PackFactory
PackRuntime
Async dispatch trait for packs.

Functions§

audit_admission_refused_obligation_count
audit_admission_refused_obligation_last_at_ms
None until the counter first moves in this process.
audit_admission_unresolved_obligation_count
audit_admission_unresolved_obligation_last_at_ms
None until the counter first moves in this process.
json_type_name
JSON type name for error messages: describes a present-but-malformed namespace value without echoing its contents.
resolve_explicit_namespace
Resolve and validate a caller-supplied namespace argument the same way on every MCP ingress path.

Type Aliases§

VerbDefDeprecated
Backward-compatible type alias. Existing code that names VerbDef still compiles; new code should use HandlerDef directly.