Expand description
§kcode-k1-daemon-lib
run(PathBuf) -> ExitCode starts the complete private loopback K1 daemon beneath <k1_root>/state, writes readiness, serves port 4450, and shuts down gracefully.
The process composes KTO-backed state, Access, Audio, Chat, Launch Nodes, providers, authenticated HTTP, public Web serving, and process-owned RustCode/WebCode services. One retained K1WebHttp supplies both HTTP and WebCode with the same projection. Code-service tool images and disposable caches are prepared automatically without configuration environment variables.
Ordinary startup failures preserve their complete safe child errors. Vault and Gemini-key initialization deliberately remain redacted. Existing authentication, replay, CORS, shutdown, invite, and readiness behavior is unchanged.
The package performs no dependency selection, host deployment, local rebuild/restart, live code-tool call, browser integration, UI selection, proxy, or TLS work.