feat(agents): register team-mode in builtin and general agent definitions

This commit is contained in:
YeonGyu-Kim
2026-04-28 10:47:51 +09:00
parent 6327a7aca7
commit a110c739e1
2 changed files with 10 additions and 6 deletions
+6 -4
View File
@@ -41,7 +41,7 @@ const agentSources: Record<BuiltinAgentName, AgentSource> = {
// Note: Atlas is handled specially in createBuiltinAgents()
// because it needs OrchestratorContext, not just a model string
atlas: createAtlasAgent as AgentFactory,
"sisyphus-junior": createSisyphusJuniorAgentWithOverrides as unknown as AgentFactory,
"sisyphus-junior": createSisyphusJuniorAgentWithOverrides as AgentFactory,
}
/**
@@ -66,12 +66,13 @@ export async function createBuiltinAgents(
categories?: CategoriesConfig,
gitMasterConfig?: GitMasterConfig,
discoveredSkills: LoadedSkill[] = [],
customAgentSummaries?: unknown,
_customAgentSummaries?: unknown,
browserProvider?: BrowserAutomationProvider,
uiSelectedModel?: string,
disabledSkills?: Set<string>,
useTaskSystem = false,
disableOmoEnv = false
disableOmoEnv = false,
teamModeEnabled = false,
): Promise<Record<string, AgentConfig>> {
const connectedProviders = readConnectedProvidersCache()
@@ -99,7 +100,7 @@ export async function createBuiltinAgents(
description: categories?.[name]?.description ?? CATEGORY_DESCRIPTIONS[name] ?? "General tasks",
}))
const availableSkills = buildAvailableSkills(discoveredSkills, browserProvider, disabledSkills)
const availableSkills = buildAvailableSkills(discoveredSkills, browserProvider, disabledSkills, teamModeEnabled)
// Collect general agents first (for availableAgents), but don't add to result yet
const { pendingAgentConfigs, availableAgents } = collectPendingBuiltinAgents({
@@ -116,6 +117,7 @@ export async function createBuiltinAgents(
availableModels,
isFirstRunNoCache,
disabledSkills,
teamModeEnabled,
disableOmoEnv,
})
+4 -2
View File
@@ -25,6 +25,7 @@ export function collectPendingBuiltinAgents(input: {
availableModels: Set<string>
isFirstRunNoCache: boolean
disabledSkills?: Set<string>
teamModeEnabled?: boolean
useTaskSystem?: boolean
disableOmoEnv?: boolean
}): { pendingAgentConfigs: Map<string, AgentConfig>; availableAgents: AvailableAgent[] } {
@@ -40,8 +41,9 @@ export function collectPendingBuiltinAgents(input: {
browserProvider,
uiSelectedModel,
availableModels,
isFirstRunNoCache,
isFirstRunNoCache: _isFirstRunNoCache,
disabledSkills,
teamModeEnabled,
disableOmoEnv = false,
} = input
@@ -105,7 +107,7 @@ export function collectPendingBuiltinAgents(input: {
}
config = applyOverrides(config, override, mergedCategories, directory)
config = resolveAgentSkills(config, { gitMasterConfig, browserProvider, disabledSkills })
config = resolveAgentSkills(config, { gitMasterConfig, browserProvider, disabledSkills, teamModeEnabled })
// Store for later - will be added after sisyphus and hephaestus
pendingAgentConfigs.set(name, config)