feat: OpenCode v1.1.1 permission system compatibility (#489)
* feat: add OpenCode v1.1.1 version detection and permission compatibility utilities - Add opencode-version.ts: Detect installed OpenCode version and support API - Add permission-compat.ts: Compatibility layer for permission system migration - Add comprehensive tests (418 lines total) - Export new utilities from shared/index.ts 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) * fix: update agent permission configs for OpenCode v1.1.1 compatibility - Fix document-writer: change invalid 'permission: { background_task: deny }' to 'tools: { background_task: false }' - Fix explore: split 'permission' and 'tools' config, move tool-level denials to 'tools' key - Fix oracle: split 'permission' and 'tools' config, move tool-level denials to 'tools' key - Align all agents with v1.1.1 permission system structure 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -20,7 +20,7 @@ export function createDocumentWriterAgent(
|
||||
"A technical writer who crafts clear, comprehensive documentation. Specializes in README files, API docs, architecture docs, and user guides. MUST BE USED when executing documentation tasks from ai-todo list plans.",
|
||||
mode: "subagent" as const,
|
||||
model,
|
||||
permission: { background_task: "deny" },
|
||||
tools: { background_task: false },
|
||||
prompt: `<role>
|
||||
You are a TECHNICAL WRITER with deep engineering background who transforms complex codebases into crystal-clear documentation. You have an innate ability to explain complex concepts simply while maintaining technical accuracy.
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ export function createExploreAgent(model: string = DEFAULT_MODEL): AgentConfig {
|
||||
mode: "subagent" as const,
|
||||
model,
|
||||
temperature: 0.1,
|
||||
permission: { write: "deny", edit: "deny", background_task: "deny" },
|
||||
tools: { write: false, background_task: false },
|
||||
permission: { edit: "deny" as const },
|
||||
prompt: `You are a codebase search specialist. Your job: find files and code, return actionable results.
|
||||
|
||||
## Your Mission
|
||||
|
||||
@@ -103,7 +103,8 @@ export function createOracleAgent(model: string = DEFAULT_MODEL): AgentConfig {
|
||||
mode: "subagent" as const,
|
||||
model,
|
||||
temperature: 0.1,
|
||||
permission: { write: "deny", edit: "deny", task: "deny", background_task: "deny" },
|
||||
tools: { write: false, task: false, background_task: false },
|
||||
permission: { edit: "deny" as const },
|
||||
prompt: ORACLE_SYSTEM_PROMPT,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user