Skip to main content

Crate kcode_k1_daemon_cli

Crate kcode_k1_daemon_cli 

Source
Expand description

§K1 daemon CLI

kcode-k1-daemon-cli is the local process-command owner for the thin K1 runner. Its sole public API is run(PathBuf) -> ExitCode.

With no process arguments, run delegates directly to kcode_k1_daemon_lib::run, retaining the daemon’s single Vault prompt. The only administrative forms are set-secrets <name>, remove-secrets <name>, and list-secrets. Invalid shapes and non-UTF-8 commands or names fail before prompting or opening state.

Administrative commands are offline and local. Stop the normal daemon first because K1 has one trusted exclusive state owner. Each command prompts once for Unlock K1 vault: . Set additionally prompts, without echo, for Value for <name>: and Confirm secret value: . Empty or mismatched values are rejected. Passphrases and values are never accepted in arguments or environment variables and are never printed, logged, or sent to a subprocess or API.

Administrative state opens in order beneath <root>/state: transaction ordering, Peering, then Vault. Set performs one synchronous K1Vault::set; remove performs K1Vault::remove and distinguishes an absent name; list returns sorted names and never values. All failures use one fixed secret-free command error. An empty Vault has no encrypted item with which to verify a password, so its first Set establishes encrypted state; populated Vaults reject a wrong password.

This package adds no lock, PID file, process probe, socket, listener, network operation, retry, migration, recovery, rotation, hot update, online administration, aliases, flags, or password input through arguments or environment variables.

§Version 0.1.12

No-argument startup selects published kcode-k1-daemon-lib 0.12.4, eliminating the duplicate Launch Nodes and Codex WebSearch type lines exposed by 0.12.3. Every CLI and offline-administration API, prompt, state boundary, and behavior remains unchanged. Publication is not local adoption, rebuild, restart, deployment, or live proof.

Functions§

run
Runs either the normal K1 daemon or one exact offline secrets command.