fix(tool-config): share task_system resolution

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-03 17:07:48 +09:00
parent c65baa80c8
commit d65c7c0800
2 changed files with 12 additions and 1 deletions
@@ -218,6 +218,16 @@ describe("applyToolConfig", () => {
describe("#given task_system is undefined", () => {
describe("#when applying tool config", () => {
it("#then should not disable todo tools globally by default", () => {
const params = createParams({})
applyToolConfig(params)
const tools = params.config.tools as Record<string, unknown>
expect(tools.todowrite).toBeUndefined()
expect(tools.todoread).toBeUndefined()
})
it.each([
"atlas",
"sisyphus",
+2 -1
View File
@@ -1,5 +1,6 @@
import type { OhMyOpenCodeConfig } from "../config";
import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names";
import { isTaskSystemEnabled } from "../shared/task-system-enabled";
type AgentWithPermission = { permission?: Record<string, unknown> };
@@ -25,7 +26,7 @@ export function applyToolConfig(params: {
pluginConfig: OhMyOpenCodeConfig;
agentResult: Record<string, unknown>;
}): void {
const taskSystemEnabled = params.pluginConfig.experimental?.task_system ?? false
const taskSystemEnabled = isTaskSystemEnabled(params.pluginConfig)
const denyTodoTools = taskSystemEnabled
? { todowrite: "deny", todoread: "deny" }
: {}