Skip to main content

Crate kcode_k1_daemon_lib

Crate kcode_k1_daemon_lib 

Source
Expand description

§kcode-k1-daemon-lib 0.14.2

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. This release preserves Chat Service 0.11.0, HTTP Chat 0.7.3, and Daemon Provider Config 0.2.0, so Chat uses an empty provider instruction string, registers exactly call_ktool and message_user, and receives all startup guidance as ordinary main-chat prefix text assembled by the browser. 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.

Before invite-stock reconciliation, listener binding, or readiness output, startup opens the canonical Loom bootstrap state, retains the Rust projection from Daemon Code Services, and runs the first-run Loom bootstrap. An incomplete bootstrap requires and validates <k1_root>/bootstrap/k1-rust-code.zip, resumes exact matching state, and must complete before the daemon can become ready. A completed bootstrap returns without reading the ZIP or prompting.

Ordinary startup failures preserve their complete safe child errors. Vault and Gemini-key initialization deliberately remain redacted. Existing authentication, replay, CORS, shutdown, invite, Chat-prefix, message_user, and readiness behavior is otherwise unchanged.

The package performs no dependency selection, host deployment, local rebuild/restart, live code-tool call, browser integration, UI selection, proxy, or TLS work. Source publication does not prove blank-state bootstrap, local process adoption, browser login, cache-only Build, executable launch, or deployment.

Functions§

run