Skip to main content

Crate kmp_memory_api

Crate kmp_memory_api 

Source
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.
MemoryAskRequest
Ask one question of the memory.
MemoryCoordinateSpec
Where an entry sits in one dimension.
MemoryDetailView
Full detail for one node, with the hash that makes it citable.
MemoryDimensionSpec
A dimension the memory files things under.
MemoryEntrySpec
One thing the memory should hold.
MemoryEvidenceSpec
What backs an entry up.
MemoryNodeView
One node of a recalled bundle, as a consumer sees it.
MemoryProvenanceSpec
Who put this into the memory, and on the strength of what.
MemoryQualityView
How well the rendering served its budget.
MemoryRecallView
What one recall returned.
MemoryRecordRequest
Put something into the memory of one about.
MemoryRelationSpec
A directed link between two things the memory holds.
MemoryRelationshipView
One relationship between recalled nodes.
MemoryWakeRequest
Recall the bounded context of one about.
RecordedMemoryView
What became of a record.
RenderedMemoryView
The rendered context, ready for a reader.

Enums§

ApiError
How this contract fails.
MemoryAnswerPolicy
How ask may answer when the evidence is thin.
MemoryTier
How much of the memory a recall may resolve.

Constants§

CONTRACT_VERSION
The revision of this contract.

Traits§

MemoryRecallApi
What an embedding product may ask of the kernel.
MemoryRecordApi
What an embedding product may put into the kernel.