claude-code-best/src/utils/agentSwarmsEnabled.ts
unraid 59f8675fa3 feat: 添加 Windows Terminal swarm 后端及 swarm 增强
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-22 22:38:09 +08:00

18 lines
529 B
TypeScript

import { isEnvTruthy } from './envUtils.js'
/**
* Centralized runtime check for agent teams/teammate features.
* This is the single gate that should be checked everywhere teammates
* are referenced (prompts, code, tools isEnabled, UI, etc.).
*
* Fork build: enabled by default. Can be disabled via
* CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=0 if needed.
*/
export function isAgentSwarmsEnabled(): boolean {
if (isEnvTruthy(process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS_DISABLED)) {
return false
}
return true
}