Expand description
The published consumer contract of the embedded Rehydration Kernel.
Sibling of kmp-plugin-api, pointing the other way: that crate is
what a plugin may know about the kernel, this one is what an embedding
product may know. It holds plain views, a capability report, an error
vocabulary and two traits — recall and record, held separately on purpose —
no domain aggregates, no ports, no storage, no transports. A consumer that
compiles against this crate alone can be tested with a stub and swapped
onto any implementation that honours the contract.
Versioned deliberately. CONTRACT_VERSION moves when the meaning of this
surface changes, independently of the kernel’s own release number: two
builds of one release can differ in features, and a consumer that guessed
capabilities from a version string would find out mid-run. Consumers check
ApiCapabilities at startup instead.
The kernel owns this contract, and its vocabulary is the kernel’s — abouts, memory, wake, ask, record. A consuming product maps these to its own terms at its own boundary; nothing of any consumer’s vocabulary appears here.
Structs§
- ApiCapabilities
- What an implementation says it is and what it can do.
- Memory
AskRequest - Ask one question of the memory.
- Memory
Coordinate Spec - Where an entry sits in one dimension.
- Memory
Detail View - Full detail for one node, with the hash that makes it citable.
- Memory
Dimension Spec - A dimension the memory files things under.
- Memory
Entry Spec - One thing the memory should hold.
- Memory
Evidence Spec - What backs an entry up.
- Memory
Node View - One node of a recalled bundle, as a consumer sees it.
- Memory
Provenance Spec - Who put this into the memory, and on the strength of what.
- Memory
Quality View - How well the rendering served its budget.
- Memory
Recall View - What one recall returned.
- Memory
Record Request - Put something into the memory of one about.
- Memory
Relation Spec - A directed link between two things the memory holds.
- Memory
Relationship View - One relationship between recalled nodes.
- Memory
Wake Request - Recall the bounded context of one about.
- Recorded
Memory View - What became of a record.
- Rendered
Memory View - The rendered context, ready for a reader.
Enums§
- ApiError
- How this contract fails.
- Memory
Answer Policy - How
askmay answer when the evidence is thin. - Memory
Tier - How much of the memory a recall may resolve.
Constants§
- CONTRACT_
VERSION - The revision of this contract.
Traits§
- Memory
Recall Api - What an embedding product may ask of the kernel.
- Memory
Record Api - What an embedding product may put into the kernel.