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:
YeonGyu-Kim
2026-01-05 04:26:26 +09:00
committed by GitHub
parent 5f63aff01d
commit 09f72e2902
8 changed files with 570 additions and 3 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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,
}