INNER CODE UNIT · TypeScript
getSwarmAgents
ZaxbyHub/opencode-swarm · src/agents/index.ts:263
export function getSwarmAgents(
swarmId?: string,
):
| Record<
string,
{ model?: string; fallback_models?: string[]; disabled?: boolean }
>
| undefined {
const id = swarmId ?? 'default';
return _swarmAgentsMap.get(id);
}
/**
* Check if an agent is disabled in swarm config
*/
function isAgentDisabled(
agentName: string,
swarmAgents?: Record<string, { disabled?: boolean }>,