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() // Note: Atlas is handled specially in createBuiltinAgents()
// because it needs OrchestratorContext, not just a model string // because it needs OrchestratorContext, not just a model string
atlas: createAtlasAgent as AgentFactory, 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, categories?: CategoriesConfig,
gitMasterConfig?: GitMasterConfig, gitMasterConfig?: GitMasterConfig,
discoveredSkills: LoadedSkill[] = [], discoveredSkills: LoadedSkill[] = [],
customAgentSummaries?: unknown, _customAgentSummaries?: unknown,
browserProvider?: BrowserAutomationProvider, browserProvider?: BrowserAutomationProvider,
uiSelectedModel?: string, uiSelectedModel?: string,
disabledSkills?: Set<string>, disabledSkills?: Set<string>,
useTaskSystem = false, useTaskSystem = false,
disableOmoEnv = false disableOmoEnv = false,
teamModeEnabled = false,
): Promise<Record<string, AgentConfig>> { ): Promise<Record<string, AgentConfig>> {
const connectedProviders = readConnectedProvidersCache() const connectedProviders = readConnectedProvidersCache()
@@ -99,7 +100,7 @@ export async function createBuiltinAgents(
description: categories?.[name]?.description ?? CATEGORY_DESCRIPTIONS[name] ?? "General tasks", 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 // Collect general agents first (for availableAgents), but don't add to result yet
const { pendingAgentConfigs, availableAgents } = collectPendingBuiltinAgents({ const { pendingAgentConfigs, availableAgents } = collectPendingBuiltinAgents({
@@ -116,6 +117,7 @@ export async function createBuiltinAgents(
availableModels, availableModels,
isFirstRunNoCache, isFirstRunNoCache,
disabledSkills, disabledSkills,
teamModeEnabled,
disableOmoEnv, disableOmoEnv,
}) })
+4 -2
View File
@@ -25,6 +25,7 @@ export function collectPendingBuiltinAgents(input: {
availableModels: Set<string> availableModels: Set<string>
isFirstRunNoCache: boolean isFirstRunNoCache: boolean
disabledSkills?: Set<string> disabledSkills?: Set<string>
teamModeEnabled?: boolean
useTaskSystem?: boolean useTaskSystem?: boolean
disableOmoEnv?: boolean disableOmoEnv?: boolean
}): { pendingAgentConfigs: Map<string, AgentConfig>; availableAgents: AvailableAgent[] } { }): { pendingAgentConfigs: Map<string, AgentConfig>; availableAgents: AvailableAgent[] } {
@@ -40,8 +41,9 @@ export function collectPendingBuiltinAgents(input: {
browserProvider, browserProvider,
uiSelectedModel, uiSelectedModel,
availableModels, availableModels,
isFirstRunNoCache, isFirstRunNoCache: _isFirstRunNoCache,
disabledSkills, disabledSkills,
teamModeEnabled,
disableOmoEnv = false, disableOmoEnv = false,
} = input } = input
@@ -105,7 +107,7 @@ export function collectPendingBuiltinAgents(input: {
} }
config = applyOverrides(config, override, mergedCategories, directory) 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 // Store for later - will be added after sisyphus and hephaestus
pendingAgentConfigs.set(name, config) pendingAgentConfigs.set(name, config)