Expand description
High-level operations composing storage capabilities into user-facing verbs.
Structs§
- Entity
Create Spec - Fully specified entity creation request — input to
KhiveRuntime::create_many. - Link
Spec - Fully specified edge creation request — input to
KhiveRuntime::build_edgeandKhiveRuntime::link_many. - Note
Search Hit - A note search result with UUID, salience-weighted RRF score, and display text.
- Query
Result - Result of a GQL/SPARQL query with optional validation warnings.
Enums§
- Edge
Endpoint Kind - A by-ID edge-endpoint substrate kind, including
Edgeitself. - Resolved
- Result of resolving a UUID to its substrate kind.
Constants§
- BASE_
ENTITY_ ENDPOINT_ RULES - Base entity endpoint allowlist — the closed set of permitted entity→entity relation triples.
Functions§
- accepted_
pack_ relations_ for_ entities - Relations that a composed pack
EDGE_RULESset accepts for a given(entity_kind, entity_type)endpoint pair, using the EXACT SAMEendpoint_matchessemanticspack_rule_allowsapplies internally (EntityOfKind,EntityOfType,NoteOfKind) — never a re-filtered copy. - base_
entity_ endpoint_ rules - Returns the base entity endpoint allowlist.
- base_
entity_ rule_ allows trueif(src_kind, relation, tgt_kind)is in the base entity endpoint allowlist. Pure and DB-free — exposed alongsidebase_entity_endpoint_rulesso offline consumers (e.g.kkernel kg validate) can apply the exact same base-table membership test the live validator uses, instead of re-deriving a parallel.any()predicate over a hand-copied allowlist.- endpoint_
matches trueifspecmatches the given substrate + kind + entity_type triple.- hex_
prefix_ to_ uuid_ pattern - Re-insert hyphens at canonical UUID positions (8-4-4-4-12) into a
hyphen-free hex prefix, so a
LIKE '<pattern>%'scan against the hyphenatedidcolumn matches correctly. Prefixes that already contain a hyphen are passed through unchanged. No-op for len <= 8 (already correct). Input longer than 32 hex chars is NOT truncated: the extra hex chars are appended past the canonical 12-char final segment with no further hyphen, so the resultingLIKEpattern requires literal characters beyond position 36 that no real (36-char) UUID string can ever have — the scan naturally fails closed instead of silently resolving<valid-32-hex><extra-hex>to the valid UUID. - merge_
entry_ metadata - Merge a caller-supplied top-level
dependency_kindparam into an edge’smetadataobject, filling the key only ifmetadatadoesn’t already carry one. This is distinct frommerge_dependency_kindabove (which infers a default from endpoint entity kinds when no explicit value was given at all) — this one folds in an EXPLICITdependency_kindargument the caller passed alongsidemetadata.