strata-ctl: Rust control layer for the Strata engine (OpenAI-compatible API)

From-scratch rewrite of the Python serve (Python kept as behavioral spec).

- engine: line-protocol supervisor (GEN/T/DONE/STOP/QUIT), silence watchdog,
  abort, is_idle probe.
- config: tolerant shared-JSON loader; foreign keys ignored so one file drives
  strata-ctl and uostream; CLI --config/--host/--port/--serve.
- inkling: o200k tokenizer wrapper + incremental UTF-8-safe detok; chat template
  via minijinja; channel-token dialect (reasoning streamed live); image bridge
  (in-process Vision, image=<path>); formatter assembling the API seam.
- api: /v1/chat/completions (stream SSE + non-stream), /v1/models, /health;
  reasoning_content; structured tool_calls (llama.cpp --jinja style, client-side
  execution); stop sequences with hold-back; abort on client disconnect.

69 tests green + 2 real-file ignored; clippy clean. Text, images and tools
validated live against the real Inkling engine.
This commit is contained in:
adm committed 2026-11-24 05:28:56 +01:00
commit 597ac432e1
30 files changed
+7541

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
//! Inkling-2-Mini model dialect: the output channel state machine.
//!
//! [`dialect`] ports the streaming reasoning/content/tool translator. The
//! tokenizer + chat template (prompt side) land here next, so `InklingFormatter`
//! can implement [`crate::api::formatter::Formatter`] end to end.
pub mod dialect;
pub mod formatter;
pub mod images;
pub mod template;
pub mod tokenizer;
pub use dialect::{InklingDialect, Kind, Out, Tag};
pub use formatter::InklingFormatter;
pub use template::{finish_prompt, prepare_messages, ChatTemplate, TemplateError};
pub use tokenizer::{Detok, InklingTokenizer, TokError};