fabro/lib/crates/fabro-cli
Bryan Helmkamp b4bc9a0506
refactor(auth): extract ApiCredential::from_api_key
The "Anthropic uses x-api-key header, everyone else uses Bearer" logic
was written three times: env_source (env-based construction), resolve
(vault-based construction), and provider_auth (CLI key validation).
Any future header rename would need three edits.

Add ApiCredential::from_api_key(provider, key) as a canonical
constructor. Each callsite now builds via the helper and overrides only
the fields specific to its path (env base URLs, vault-sourced org/project
IDs, codex mode, etc.).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 09:05:54 -04:00
..
src refactor(auth): extract ApiCredential::from_api_key 2026-04-24 09:05:54 -04:00
tests/it Merge origin/main (preserving RunServices architecture) 2026-04-24 00:10:01 -04:00
build.rs feat(cli): surface debug build profile in version output 2026-04-18 09:44:54 -04:00
Cargo.toml test(cli): suppress browser launch under spawned fabro test subprocesses 2026-04-22 07:50:34 -04:00