Skip to main content

Crate kmp_plugin_api

Crate kmp_plugin_api 

Source
Expand description

Public plugin API for the Rehydration Kernel.

This crate is intentionally small. A plugin implementation can depend on it without depending on kernel domain aggregates, ports, adapters, storage clients, gRPC, MCP, or runtime infrastructure.

The kernel owns this contract. Runtime crates may re-export it through kmp_domain::plugins, but external plugin crates should prefer depending on kmp-plugin-api directly.

Current plugin contracts are compile-time Rust traits. They are reusable crate boundaries, not a dynamic ABI or runtime plugin registry.

Architecture:

  • value plugins implement EvidenceValuePlugin and convert retrieved evidence fragments into typed mentions;
  • derivation plugins implement EvidenceDerivationPlugin and compute deterministic results from explicit operands;
  • readers or agents decide which mentions are included, excluded, or kept as context for the current question;
  • the kernel remains responsible for storage, traversal, refs, provenance, trace, and inspect, not for domain arithmetic or preference semantics.

Structs§

CalendarDate
CurrencyCode
DerivationOperand
DerivationRequest
DerivationResult
EvidenceFragment
EvidenceInterpretationInput
EvidenceInterpretationOutput
InterpretationError
InterpretedValueMention
TextSpan

Enums§

DerivationOperation
EvidenceSegmentKind
InterpretedValue
MathExpressionNotation
OperandLabel
OperandRole
SourceCodeSegmentKind

Traits§

EvidenceDerivationPlugin
EvidenceValuePlugin