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§
- Edge
Endpoint Rule - A pack-declared endpoint rule for a specific edge relation.
- Handler
Def - Handler metadata for discovery and documentation.
- Note
Kind Spec - Kind-level schema specification for a note kind.
- Note
Lifecycle Spec - Lifecycle specification for a note kind.
- Pack
Schema Plan - DDL statements the pack needs applied to the auxiliary schema.
- Param
Def - Parameter type for
help=trueschema envelopes.
Enums§
- Atomic
Rejection Reason - Why a verb was rejected from an
--atomicop 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. - Endpoint
Kind - Match spec for one end of an
EdgeEndpointRule. - 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§
- ATOMIC_
ADMISSIBLE_ VERBS - ADR-099 D3 — the v1 atomic-admissible verb set for
--atomicbulk 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
--atomicunit (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-processBEGIN IMMEDIATEhold 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_nameunder ADR-099--atomicbulk apply.
Type Aliases§
- VerbDef
Deprecated - Backward-compatible type alias. Existing code that names
VerbDefstill compiles; new code should useHandlerDefdirectly.