()
| 22 | * 2. GrowthBook gate 'tengu_amber_flint' enabled (killswitch) |
| 23 | */ |
| 24 | export function isAgentSwarmsEnabled(): boolean { |
| 25 | // Ant: always on |
| 26 | if (process.env.USER_TYPE === 'ant') { |
| 27 | return true |
| 28 | } |
| 29 | |
| 30 | // External: require opt-in via env var or --agent-teams flag |
| 31 | if ( |
| 32 | !isEnvTruthy(process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS) && |
| 33 | !isAgentTeamsFlagSet() |
| 34 | ) { |
| 35 | return false |
| 36 | } |
| 37 | |
| 38 | // Killswitch — always respected for external users |
| 39 | if (!getFeatureValue_CACHED_MAY_BE_STALE('tengu_amber_flint', true)) { |
| 40 | return false |
| 41 | } |
| 42 | |
| 43 | return true |
| 44 | } |
| 45 |
no test coverage detected