Revert "fix(agents): use createAgentToolRestrictions for Sisyphus call_omo_agent deny"

This reverts commit 9011111eb0575fcdc630fd33043e5524640adfe0.
This commit is contained in:
YeonGyu-Kim 2026-01-13 21:00:00 +09:00
parent 8916a32ea0
commit 0c996669b0

View File

@ -1,5 +1,4 @@
import type { AgentConfig } from "@opencode-ai/sdk" import type { AgentConfig } from "@opencode-ai/sdk"
import { createAgentToolRestrictions } from "../shared/permission-compat"
import { isGptModel } from "./types" import { isGptModel } from "./types"
import type { AvailableAgent, AvailableTool, AvailableSkill } from "./sisyphus-prompt-builder" import type { AvailableAgent, AvailableTool, AvailableSkill } from "./sisyphus-prompt-builder"
import { import {
@ -622,7 +621,6 @@ export function createSisyphusAgent(
// Note: question permission allows agent to ask user questions via OpenCode's QuestionTool // Note: question permission allows agent to ask user questions via OpenCode's QuestionTool
// SDK type doesn't include 'question' yet, but OpenCode runtime supports it // SDK type doesn't include 'question' yet, but OpenCode runtime supports it
const permission = { question: "allow" } as AgentConfig["permission"] const permission = { question: "allow" } as AgentConfig["permission"]
const restrictions = createAgentToolRestrictions(["call_omo_agent"])
const base = { const base = {
description: description:
"Sisyphus - Powerful AI orchestrator from OhMyOpenCode. Plans obsessively with todos, assesses search complexity before exploration, delegates strategically to specialized agents. Uses explore for internal code (parallel-friendly), librarian only for external docs, and always delegates UI work to frontend engineer.", "Sisyphus - Powerful AI orchestrator from OhMyOpenCode. Plans obsessively with todos, assesses search complexity before exploration, delegates strategically to specialized agents. Uses explore for internal code (parallel-friendly), librarian only for external docs, and always delegates UI work to frontend engineer.",
@ -632,7 +630,7 @@ export function createSisyphusAgent(
prompt, prompt,
color: "#00CED1", color: "#00CED1",
permission, permission,
...restrictions, tools: { call_omo_agent: false },
} }
if (isGptModel(model)) { if (isGptModel(model)) {