fix(agents): wire useTaskSystem config flag into Sisyphus and Hephaestus
The experimental.task_system flag was defined in config but never passed through to agent creation, so the task system prompt switch was always off.
This commit is contained in:
@@ -63,7 +63,8 @@ export async function createBuiltinAgents(
|
||||
customAgentSummaries?: unknown,
|
||||
browserProvider?: BrowserAutomationProvider,
|
||||
uiSelectedModel?: string,
|
||||
disabledSkills?: Set<string>
|
||||
disabledSkills?: Set<string>,
|
||||
useTaskSystem = false
|
||||
): Promise<Record<string, AgentConfig>> {
|
||||
const connectedProviders = readConnectedProvidersCache()
|
||||
// IMPORTANT: Do NOT call OpenCode client APIs during plugin initialization.
|
||||
@@ -134,6 +135,7 @@ export async function createBuiltinAgents(
|
||||
mergedCategories,
|
||||
directory,
|
||||
userCategories: categories,
|
||||
useTaskSystem,
|
||||
})
|
||||
if (sisyphusConfig) {
|
||||
result["sisyphus"] = sisyphusConfig
|
||||
@@ -150,6 +152,7 @@ export async function createBuiltinAgents(
|
||||
availableCategories,
|
||||
mergedCategories,
|
||||
directory,
|
||||
useTaskSystem,
|
||||
})
|
||||
if (hephaestusConfig) {
|
||||
result["hephaestus"] = hephaestusConfig
|
||||
|
||||
@@ -17,6 +17,7 @@ export function maybeCreateAtlasConfig(input: {
|
||||
availableSkills: AvailableSkill[]
|
||||
mergedCategories: Record<string, CategoryConfig>
|
||||
userCategories?: CategoriesConfig
|
||||
useTaskSystem?: boolean
|
||||
}): AgentConfig | undefined {
|
||||
const {
|
||||
disabledAgents,
|
||||
|
||||
@@ -22,6 +22,7 @@ export function collectPendingBuiltinAgents(input: {
|
||||
uiSelectedModel?: string
|
||||
availableModels: Set<string>
|
||||
disabledSkills?: Set<string>
|
||||
useTaskSystem?: boolean
|
||||
}): { pendingAgentConfigs: Map<string, AgentConfig>; availableAgents: AvailableAgent[] } {
|
||||
const {
|
||||
agentSources,
|
||||
|
||||
@@ -19,6 +19,7 @@ export function maybeCreateHephaestusConfig(input: {
|
||||
availableCategories: AvailableCategory[]
|
||||
mergedCategories: Record<string, CategoryConfig>
|
||||
directory?: string
|
||||
useTaskSystem: boolean
|
||||
}): AgentConfig | undefined {
|
||||
const {
|
||||
disabledAgents,
|
||||
@@ -31,6 +32,7 @@ export function maybeCreateHephaestusConfig(input: {
|
||||
availableCategories,
|
||||
mergedCategories,
|
||||
directory,
|
||||
useTaskSystem,
|
||||
} = input
|
||||
|
||||
if (disabledAgents.includes("hephaestus")) return undefined
|
||||
@@ -66,7 +68,8 @@ export function maybeCreateHephaestusConfig(input: {
|
||||
availableAgents,
|
||||
undefined,
|
||||
availableSkills,
|
||||
availableCategories
|
||||
availableCategories,
|
||||
useTaskSystem
|
||||
)
|
||||
|
||||
hephaestusConfig = { ...hephaestusConfig, variant: hephaestusResolvedVariant ?? "medium" }
|
||||
|
||||
@@ -21,6 +21,7 @@ export function maybeCreateSisyphusConfig(input: {
|
||||
mergedCategories: Record<string, CategoryConfig>
|
||||
directory?: string
|
||||
userCategories?: CategoriesConfig
|
||||
useTaskSystem: boolean
|
||||
}): AgentConfig | undefined {
|
||||
const {
|
||||
disabledAgents,
|
||||
@@ -34,6 +35,7 @@ export function maybeCreateSisyphusConfig(input: {
|
||||
availableCategories,
|
||||
mergedCategories,
|
||||
directory,
|
||||
useTaskSystem,
|
||||
} = input
|
||||
|
||||
const sisyphusOverride = agentOverrides["sisyphus"]
|
||||
@@ -67,7 +69,8 @@ export function maybeCreateSisyphusConfig(input: {
|
||||
availableAgents,
|
||||
undefined,
|
||||
availableSkills,
|
||||
availableCategories
|
||||
availableCategories,
|
||||
useTaskSystem
|
||||
)
|
||||
|
||||
if (sisyphusResolvedVariant) {
|
||||
|
||||
@@ -58,6 +58,7 @@ export async function applyAgentConfig(params: {
|
||||
params.pluginConfig.browser_automation_engine?.provider ?? "playwright";
|
||||
const currentModel = params.config.model as string | undefined;
|
||||
const disabledSkills = new Set<string>(params.pluginConfig.disabled_skills ?? []);
|
||||
const useTaskSystem = params.pluginConfig.experimental?.task_system ?? false;
|
||||
|
||||
const builtinAgents = await createBuiltinAgents(
|
||||
migratedDisabledAgents,
|
||||
@@ -71,6 +72,7 @@ export async function applyAgentConfig(params: {
|
||||
browserProvider,
|
||||
currentModel,
|
||||
disabledSkills,
|
||||
useTaskSystem,
|
||||
);
|
||||
|
||||
const includeClaudeAgents = params.pluginConfig.claude_code?.agents ?? true;
|
||||
@@ -101,7 +103,6 @@ export async function applyAgentConfig(params: {
|
||||
sisyphus: builtinAgents.sisyphus,
|
||||
};
|
||||
|
||||
const useTaskSystem = params.pluginConfig.experimental?.task_system ?? false;
|
||||
agentConfig["sisyphus-junior"] = createSisyphusJuniorAgentWithOverrides(
|
||||
params.pluginConfig.agents?.["sisyphus-junior"],
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user