Expand description
§K1 daemon library 0.10.3
kcode-k1-daemon-lib is the library-only composition root exposing run(PathBuf) -> ExitCode. Startup creates the multithreaded runtime, prompts once for the protected Vault passphrase, opens established state beneath <k1_root>/state, preserves readiness, slow-start, invite-stock, safe-error, and graceful-shutdown behavior, then binds 127.0.0.1:4450.
K1Http owns signing, authentication, replay protection, CORS, nosniff, body collection, and authenticated /api nesting. The daemon opens current Access at state/access, concrete Profiles at state/access-profiles, and one private Authority Filters facade at state/authority-filters.
Chat, Persons, Audio, and Audio Artifacts receive immutable request-local access contexts backed by that shared Filters facade. The daemon selects GPT-5.6 Sol for Chat authorization, Gemini 3.1 Pro for Persons authorization, and GPT-5.6 Terra for Audio authorization. People receives the same facade for private Filter management but does not select or persist a product filter. Audio and Audio Artifacts share the same Audio context helper.
Chat selects HTTP Chat 0.4.0, Chat Service 0.5.1, and Provider Config 0.1.4, including the service’s Chat Persistence 0.3.0 and Chat Thread Main Actor 0.7.0 chain. The service opens exclusively at state/chat-v2. Chat opens shared Kmap at state/kmap. Its Codex profile registers exactly one native tool named call_ktool; a generic base instruction explains that one inner Ktool is selected through name and receives JSON-object arguments. Inner Ktool names and argument contracts remain supplied by the user or conversation and are not separately advertised. The profile does not directly register CurrentTime or any Kmap operation. Existing Chat Thread Actions dispatch still supports inner CurrentTime plus the five user-prompted Kmap operations. This is the codec-v2 clean-reset boundary: the daemon does not read, delete, migrate, transform, or fall back to old state/chat data, so those old bytes remain inert. Chat snapshots preserve generic five-field boxes, including hidden_type and hidden_contents; the hidden fields are exposed to authenticated clients, omitted from the provider projection only for token efficiency, and are not secret.
Provider composition remains Gemini 3.1 Pro plus one isolated Codex app-server with Audio on GPT-5.6 Terra and Chat on GPT-5.6 Sol. Startup preserves the current Audio projection at state/audio-classification-v2, every unrelated state path, listener, origins, Vault, Accounts, Invites, provider behavior, and public run API.
Startup reports fixed secret-safe stages, with the existing bounded safe child detail for Codex Adapter, Audio Classification, and Chat. Public daemon startup is blocking and process-lifetime; checks start no listener or provider. This release performs no state deletion or migration, provider call, browser update, local dependency selection, rebuild, restart, deployment, live canary, or live traffic.