Expand description
openkind-engine: Runtime-agnostic decision engine abstractions and dispatch.
§Architecture & Responsibilities
openkind-engine defines the central execution abstractions for Jev-compatible decision inference.
Per docs/ARCHITECTURE.md, the engine layer sits between openkind-core and the transport
layers (openkind-api):
core ⇐ engine ⇐ api ⇐ server/cli.
The engine abstraction is completely transport-agnostic: it accepts a [SystemRequest] and returns
a [SystemResponse], remaining oblivious to whether evaluation was triggered over HTTP/REST or gRPC.
§Core Components
DecisionEngine: Trait implemented by inference backends (e.g.MockEngine, Candle, GGUF/llama.cpp, ONNX).EngineRegistry: Thread-safe mapping of public model aliases (e.g."jev-latest","mock") to engine instances.- [
dispatch]: Unified entrypoint that orchestrates validation, metrics recording, token estimation, and backend evaluation.
Re-exports§
pub use dispatch::dispatch;pub use engine::DecisionEngine;pub use error::EngineError;pub use error::EngineResult;pub use mock::MockEngine;pub use profile::ArtifactIdentity;pub use profile::ExecutionSemantics;pub use profile::ModelExecutionProfile;pub use profile::ParityContract;pub use profile::ProbabilitySpace;pub use profile::ProfileSource;pub use profile::ProfileValidationError;pub use registry::EngineRegistry;
Modules§
- dispatch
- Decision request dispatching, validation, and token accounting. Request dispatching, metrics tracking, and token estimation.
- engine
- DecisionEngine trait and token estimation helpers. Decision engine trait definition and token estimation helpers.
- error
- Engine-specific error types and result aliases. Errors and Result alias for engine operations and dispatch.
- mock
- In-memory mock decision engine implementation for testing.
MockEngine— Phase 1 placeholder for a real model. - profile
- Model execution profile contracts and parity specifications. Immutable model/execution identity and numerical parity contracts.
- registry
- Thread-safe registry mapping model aliases to decision engines. Engine registry for model alias routing and metadata discovery.