README: the Messages backend and the CLI's subscription-only credential

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-11-29 20:44:45 +01:00
commit eeddca1bb0

View file

@ -50,15 +50,12 @@ Crate `crates/claude-connector` (library and the `claude-connector` binary that
- Reasoning state is a session handle (`ClaudeCodeHandle`) authenticated with a connector secret
and bound to the caller it was minted for; a handle that cannot be proven to match the request
and its caller re-seeds from the caller's transcript, and every resume forks.
- `MessagesBackend` implements `ProviderBackend` for provider `anthropic-messages` when the config document says `auth` is an API key (`config init --auth api-key`; one choice for the whole connector, held in the credential `--token-credential` names). One non-streaming `POST /v1/messages` per call: tools, tool calls and results, thinking blocks (replayed unchanged as reasoning state), `cache_control` (5 minutes, or 1 hour for long retention) and cache read and write usage map natively. The key is read from the systemd credential at every call and travels only as the `x-api-key` header. A request's output schema is `output_config.format`; `Required` tool choice is a system sentence, because the current Sonnet and Opus reject a forced tool choice. A key has no plan: no meter runs, the plan windows stay empty, and a key document refuses leases.
- `ProcessPort` is the one OS seam (`StdProcessPort`, unix, kills the child's whole process
group); `SessionStore` and `StderrSink` are the other ports. `ClaudeCodeConfig` is what the
binary hands in; the credential is read from a systemd credential and reaches the child on a
pipe, never in an environment: `CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR` by default, or
`CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR` when the config document says `auth` is an API key
(`config init --auth api-key`; one choice for the whole connector, held in the credential
`--token-credential` names). `QuotaCell` keeps the plan windows the CLI's `rate_limit_event`s
report, for the usage readout and the lease grant; on an API key there is no plan, no meter
runs and the cell stays empty.
binary hands in; the subscription token is read from a systemd credential and reaches the child on a
pipe, never in an environment (`CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR`). `QuotaCell` keeps the
plan windows the CLI's `rate_limit_event`s report, for the usage readout and the lease grant.
## Asking for one no-tools completion