- fix(hooks): skip todo continuation when agent has pending question (#1888) Add pending-question-detection module that walks messages backwards to detect unanswered question tool_use, preventing CONTINUATION_PROMPT injection while awaiting user response. - fix(config): allow custom agent names in disabled_agents (#1693) Change disabled_agents schema from BuiltinAgentNameSchema to z.string() and add filterDisabledAgents helper in agent-config-handler to filter user, project, and plugin agents with case-insensitive matching. - fix(agents): change primary agents mode to 'all' (#1891) Update Sisyphus, Hephaestus, and Atlas agent modes from 'primary' to 'all' so they are available for @mention routing and task() delegation in addition to direct chat.
This commit is contained in:
@@ -106,6 +106,15 @@ export async function applyAgentConfig(params: {
|
||||
]),
|
||||
);
|
||||
|
||||
const disabledAgentNames = new Set(
|
||||
(migratedDisabledAgents ?? []).map(a => a.toLowerCase())
|
||||
);
|
||||
|
||||
const filterDisabledAgents = (agents: Record<string, unknown>) =>
|
||||
Object.fromEntries(
|
||||
Object.entries(agents).filter(([name]) => !disabledAgentNames.has(name.toLowerCase()))
|
||||
);
|
||||
|
||||
const isSisyphusEnabled = params.pluginConfig.sisyphus_agent?.disabled !== true;
|
||||
const builderEnabled =
|
||||
params.pluginConfig.sisyphus_agent?.default_builder_enabled ?? false;
|
||||
@@ -194,9 +203,9 @@ export async function applyAgentConfig(params: {
|
||||
...Object.fromEntries(
|
||||
Object.entries(builtinAgents).filter(([key]) => key !== "sisyphus"),
|
||||
),
|
||||
...userAgents,
|
||||
...projectAgents,
|
||||
...pluginAgents,
|
||||
...filterDisabledAgents(userAgents),
|
||||
...filterDisabledAgents(projectAgents),
|
||||
...filterDisabledAgents(pluginAgents),
|
||||
...filteredConfigAgents,
|
||||
build: { ...migratedBuild, mode: "subagent", hidden: true },
|
||||
...(planDemoteConfig ? { plan: planDemoteConfig } : {}),
|
||||
@@ -204,9 +213,9 @@ export async function applyAgentConfig(params: {
|
||||
} else {
|
||||
params.config.agent = {
|
||||
...builtinAgents,
|
||||
...userAgents,
|
||||
...projectAgents,
|
||||
...pluginAgents,
|
||||
...filterDisabledAgents(userAgents),
|
||||
...filterDisabledAgents(projectAgents),
|
||||
...filterDisabledAgents(pluginAgents),
|
||||
...configAgent,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user