claude-connector: token from a systemd credential, pin before every spawn, prompts in prompt_dir, door set 401/403/429

Delete EnvLookup and the connector's own environment as a token source; a
TokenSource port reads $CREDENTIALS_DIRECTORY/<token_credential> at each use
(claude-connector-token-credential). binary_matches_pin is the one pin check,
used by ready() and before every spawn. PromptFile::create stages into the
configured prompt_dir instead of temp_dir(). The zero-bill door set is exactly
401, 403 and 429 with explicitly empty since-last usage, pinned by a table over
statuses and usage shapes. Soul s2's stderr-join probe is committed. The three
price types gain serde derives so the price table can live in the config
document.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-29 11:26:30 +01:00
commit 9a062f0846
9 changed files with 442 additions and 95 deletions

2
Cargo.lock generated
View file

@ -138,6 +138,8 @@ dependencies = [
name = "claude-connector"
version = "0.1.0"
dependencies = [
"anyhow",
"cultcache-rs",
"libc",
"model-connector",
"rmp-serde",