Expand description
openkind-server: Daemon library and entrypoint for openkindd.
§Architecture & Responsibilities
openkind-server packages the openkindd daemon binary.
Per docs/ARCHITECTURE.md, it composes:
- Configuration parsing via
clap - Structured tracing via
tracing-subscriber(env-filtered) - Shared
openkind_engine::EngineRegistryinstance - Concurrent HTTP server (
openkind_api::http) on--http-addr - Concurrent gRPC server (
openkind_api::grpc) on--grpc-addr - Coordinated graceful shutdown across both listeners on SIGINT / SIGTERM
Modules§
- grpc
- Tonic gRPC service implementation for
openkind.SystemOne. gRPC layer — tonic 0.14. - http
- Axum HTTP router and endpoint handlers. HTTP layer — axum 0.8.
Structs§
- AppState
- Shared application state passed to every axum handler and tonic method.
- Auth
Config - Optional bearer-auth state.
None⇒ no auth required. - Engine
Registry - A registry mapping model alias → engine. Lets the server dispatch by
the
modelfield in the request without the engine itself knowing. - Mock
Engine - A mock that returns distributions seeded from
(id, instructions). Always satisfies sum-to-1 and confidence-in-range so the validator passes.
Traits§
- Decision
Engine - The trait every backend implements. The engine is runtime-agnostic:
it doesn’t know it’s being served over HTTP or gRPC — that’s deliberate.
Callers pass
SystemRequestin and getSystemResponseback.