Expand description
§kcode-k1-daemon-lib
kcode-k1-daemon-lib 0.8.0 is the library-only composition root for the private K1 loopback daemon. Its public entry point remains pub fn run(k1_root: PathBuf) -> ExitCode.
run builds a multithreaded Tokio runtime, prompts without echo for the Vault passphrase, and opens durable state beneath <k1_root>/state. Startup retains the exact Ordering, Peering, Vault, Persons, Invites, Accounts, Users, Groups, Access Profiles, Objects, Audio Classification, Access, replay, invite-stock, Audio, and Chat composition and paths.
After every subsystem and provider is ready, the extracted HTTP Boundary binds 127.0.0.1:4450, serves /config.json plus the existing authenticated API, writes one readiness record, warns on slow startup, and handles SIGINT/SIGTERM graceful shutdown. The Vault and Chat service remain retained until serving ends. Startup and listener failures preserve the existing safe process messages and exit code 1.
The advertised public origin remains http://localhost:4450; the invite link origin and minimum 100-unused-invite gate are unchanged. Accounts, People, Persons, Audio, Terms, replay, authority enforcement, non-cacheable generated responses, safe API error contextualization, and fallback behavior remain unchanged.
Version 0.8.0 selects Provider Config 0.1.0, HTTP Boundary 0.1.0, Chat Service 0.2.0, Codex Adapter 0.5.0, and the source-compatible Speaker Analysis 0.3.4 backport with adapter-providers. Provider Config preserves K1_CODEX_EXECUTABLE with the literal codex-safe default, ffmpeg resolution from PATH, and Gemini 3.1 Pro followed by GPT-5.6 Terra model order.
Exactly one Codex app-server process is opened, with isolated profiles:
- Audio:
gpt-5.6-terra, medium reasoning, empty base instructions, and onlyrecord_speaker_labelsplusrecord_speaker_analysis. - Chat:
gpt-5.6-sol, xhigh reasoning, empty base instructions, and onlyCurrentTime.
Audio retains its existing Gemini and Terra paths, HTTP routes, authorization, persistence, classification, speaker tools, and ordering. Speaker Analysis 0.3.4 matches Audio’s 0.3-compatible closure, yielding one nominal Analyzer type.
Chat Service is opened at <k1_root>/state/chat and retained for serving. Its active-turn mailbox persistence and steering are adopted when a Chat turn is reached, but this version exposes no Chat HTTP routes.
Package checks start no listener or provider and do not prove genuine codex-safe, provider traffic, live Chat ingress, cold restart, or deployment readiness; this release makes no such deployment claim.