kcode-k1-rust-code-ktool-service 0.1.6

Coordinate authenticated persistent K1 Rust code operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
# K1 Rust code Ktool process service

`RustCodeKtoolService` owns authenticated persistent Rust source operations and per-user disposable checking state. `create` creates only a previously absent authority/library family, persists the approved `0.0.0` worktree through KTO, and returns its unpublished selector. `open` resolves the exact selector or current family head. `latest_published` ignores unpublished heads. Published selectors are public, including a published source selected as the default head; every unpublished result requires the selected user or ordinary unfiltered shared-group authority. Create, forks, overwrites, publication, and Build likewise require that authority.

`overwrite` compares the caller's complete opened source with the current unpublished source before submitting an expected-revision overwrite. Overwriting published source creates a new branch. Every successful write returns the canonical source selected from the synchronous projection. `versioned` changes only `[package].version` and returns the exact publication candidate without mutating the worktree.

`check_fresh` and `current_check` bind opaque receipts to the authenticated user and exact complete source. `publish_checked` rejects a mismatched receipt or already-used semantic version, saves the exact publication event as a private K1 Object, reauthorizes immediately before the projection effect, and returns the KTO publication outcome. Published dependencies remain public. Per-user Podman/cache operations serialize without holding the user-map lock; different users remain independent.

`build_published(authenticated, family, version)` reauthorizes the selected user or group authority, loads only that exact published stable version, derives the binary target name from the family's logical library name, runs the existing optimized locked release builder, and returns `BinaryBuild` with its exact code-cache path and complete diagnostics. The artifact remains only in the existing per-user, authority-scoped disposable code cache; repeated builds replace the same authority/library/version/binary slot.

The service performs no retries, background work, migration, history recovery, model argument parsing, message emission, durable binary publication, Object creation for Build, deployment, execution, or cleanup. KTO is canonical for authored source; coding caches, built binaries, and projection files are disposable.