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§

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.
NoteKindSpec
Kind-level schema specification for a note kind.
NoteLifecycleSpec
Lifecycle specification for a note kind.
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).
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.
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.

Traits§

DispatchHook
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
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.
PackRuntime
Async dispatch trait for packs.

Functions§

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.