Context
Part of #415 Phase 1, item 2. Agents need a way to opt in/out of auth profile credential injection.
Design
Add auth field to agent list entries and defaults:
// In agent list config type
auth?: false | string | string[];
Semantics:
false (default) — skip auth profile injection, rely on CLI-native auth / runtimeEnv / process.env
"anthropic:default" — single profile, resolve key and inject as env var
["anthropic:key1", "anthropic:key2"] — round-robin rotation across invocations
Config examples:
agents:
defaults:
runtime: claude
auth: "anthropic:default" # default for all agents
list:
- id: agent_A
auth: ["anthropic:key1", "anthropic:key2"] # override: rotation
- id: agent_B
auth: false # override: CLI-native
Scope
- Add
auth field to AgentListEntryConfig type (src/config/types.agent-defaults.ts or equivalent)
- Add
auth field to AgentDefaultsConfig type (for agents.defaults.auth)
- Add to Zod schema for validation
- Resolution: agent entry
auth overrides agents.defaults.auth
auth: false is explicit opt-out (not the same as undefined/missing — undefined inherits from defaults)
Tests
- Schema validation accepts
false, string, and string array
- Agent entry
auth overrides defaults auth
- Missing
auth inherits from defaults
- Explicit
auth: false on entry overrides defaults even when defaults has a value
Depends on
Related
Context
Part of #415 Phase 1, item 2. Agents need a way to opt in/out of auth profile credential injection.
Design
Add
authfield to agent list entries and defaults:Semantics:
false(default) — skip auth profile injection, rely on CLI-native auth /runtimeEnv/process.env"anthropic:default"— single profile, resolve key and inject as env var["anthropic:key1", "anthropic:key2"]— round-robin rotation across invocationsConfig examples:
Scope
authfield toAgentListEntryConfigtype (src/config/types.agent-defaults.tsor equivalent)authfield toAgentDefaultsConfigtype (foragents.defaults.auth)authoverridesagents.defaults.authauth: falseis explicit opt-out (not the same as undefined/missing — undefined inherits from defaults)Tests
false, string, and string arrayauthoverrides defaultsauthauthinherits from defaultsauth: falseon entry overrides defaults even when defaults has a valueDepends on
Related