Skip to main content

Module pack

Module pack 

Source
Expand description

Pack trait — the declarative composition unit for khive.

A pack declares vocabulary (note kinds, entity kinds), verbs, and edge endpoint rules. This is purely static metadata — no I/O, no async. Runtime dispatch lives in khive-runtime (PackRuntime trait + VerbRegistry).

This trait lives in khive-types (no_std, zero deps) so downstream crates can reference pack metadata without pulling in the full runtime.

Structs§

EdgeEndpointRule
A pack-declared endpoint rule for a specific edge relation.
HandlerDef
Handler metadata for discovery and documentation.
NoteKindSpec
Kind-level schema specification for a note kind.
NoteLifecycleSpec
Lifecycle specification for a note kind.
PackSchemaPlan
DDL statements the pack needs applied to the auxiliary schema.
ParamDef
Parameter type for help=true schema envelopes.

Enums§

AtomicRejectionReason
Why a verb was rejected from an --atomic op list (ADR-099 D3, migration step 2). Distinguishes the two named rejection classes from a generic “not yet admitted” fallback so callers can produce an actionable message.
EndpointKind
Match spec for one end of an EdgeEndpointRule.
VerbCategory
Illocutionary force classification for a verb handler.
VerbPresentationPolicy
Presentation override for a verb handler.
Visibility
Visibility tier for a handler.

Constants§

ATOMIC_ADMISSIBLE_VERBS
ADR-099 D3 — the v1 atomic-admissible verb set for --atomic bulk apply.
ATOMIC_KNOWN_UNIMPLEMENTED_VERBS
Verbs that ADR-099 D3 lists as conceptually admissible (they remain on ATOMIC_ADMISSIBLE_VERBS — the ADR intends each to eventually gain a prepare/apply seam) but for which no full-parity seam exists yet in this slice, so they are rejected up front rather than admitted with a gap:
ATOMIC_MAX_OPS_DEFAULT
Conservative default maximum op count for one --atomic unit (ADR-099 migration step 7 / B3). The ADR does not pin an exact number — D2 defers the precise threshold to harness measurement (“a recommended default on the order of a few thousand ops … configurable with a conservative default”, Open Question 2) — so this constant is an explicit interim choice, not a value read out of the ADR text. Rationale for 2000: it is inside D2’s “a few thousand” band, comfortably bounds the duration of the single cross-process BEGIN IMMEDIATE hold an atomic unit takes on the daemon’s writer lock (ADR-099 D5 daemon-coexistence), and is cheap to override per invocation (kkernel exec --atomic --atomic-max-ops N) without touching this default. Revisit once the load-harness (ADR-067 Component A) has real per-op-count latency data under contention.

Traits§

Pack
A composable module that contributes vocabulary, verbs, and edge endpoint rules to the khive runtime.

Functions§

atomic_admissibility
Static admissibility classification for verb_name under ADR-099 --atomic bulk apply.

Type Aliases§

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