kcode-k1-daemon-code-services 0.1.1

Open the daemon's process-owned RustCode and WebCode services
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
# K1 daemon code services

`CodeServices::open` constructs the daemon's one process-owned RustCode service and one process-owned WebCode service. It opens the public Rust projection from `<state_root>/rust/projection` and `<state_root>/rust/control`, uses disposable per-user caches beneath `<state_root>/rust/code-cache` and `<state_root>/web/code-cache`, and gives WebCode the same projection already retained by the daemon's Web HTTP composition.

The caller supplies the existing process Ordering, Peering, Groups, Objects, and shared Web projection. `into_parts` returns the RustCode service followed by the WebCode service for the full Chat Service constructor.

At startup the package finds the executable file named `podman` on the system `PATH`, canonicalizes its absolute path, and uses that same executable for RustCode and WebCode. There is no Podman-specific environment override.

Startup requires deployment-owned environment values for `K1_RUST_CODE_SCHEMA_REVISION`, `K1_RUST_CODE_TOOLCHAIN_POLICY_REVISION`, `K1_RUST_CODE_IMAGE`, `K1_RUST_CODE_CHECK_POLICY_REVISION`, `K1_RUST_TARGET_TRIPLE`, `K1_RUST_CODE_COMMAND_POLICY_REVISION`, `K1_WEB_CODE_IMAGE`, `K1_WEB_CHECKER_EXECUTABLE`, `K1_WEB_CHROMIUM`, `K1_WEB_CHROMIUM_VERSION`, `K1_WEB_CPU_MILLIS`, `K1_WEB_MEMORY_BYTES`, `K1_WEB_PIDS_LIMIT`, `K1_WEB_TMPFS_BYTES`, `K1_WEB_SHM_BYTES`, `K1_WEB_CHECKER_TIMEOUT_MS`, `K1_WEB_WALL_TIMEOUT_MS`, `K1_WEB_CODE_BOOT_REVISION`, `K1_WEB_CODE_SCHEMA_REVISION`, `K1_WEB_CODE_ROUTE_REVISION`, `K1_WEB_CODE_HARNESS_REVISION`, and `K1_WEB_CODE_CHECK_POLICY_REVISION`. Paths, image identities, and revisions retain their dependency contracts. Numeric values must be nonzero, and the Web wall timeout must exceed the checker timeout. Values are never defaulted or logged.

Rust uses toolchain 1.97; its image, target triple, and cache/check identities remain deployment inputs. Changing a revision intentionally invalidates only the corresponding disposable derived state or receipt identity.

The package performs no check, publication, provider call, listener work, deployment, retry, migration, or cleanup. Opening validates the Web Podman configuration and creates only its fixed state-root directories before constructing the services. Public source and durable publication remain KTO-backed; all code-service caches are disposable.