feat(agents): prevent all subagents from accessing background_task tool
Restrict background_task tool access for all spawned subagents (oracle, explore, librarian, frontend-ui-ux-engineer, document-writer, multimodal-looker) to prevent potential infinite recursion and unintended background task creation. 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -5,6 +5,7 @@ export const documentWriterAgent: AgentConfig = {
|
|||||||
"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.",
|
"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",
|
mode: "subagent",
|
||||||
model: "google/gemini-3-pro-preview",
|
model: "google/gemini-3-pro-preview",
|
||||||
|
tools: { background_task: false },
|
||||||
prompt: `<role>
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const exploreAgent: AgentConfig = {
|
|||||||
mode: "subagent",
|
mode: "subagent",
|
||||||
model: "opencode/grok-code",
|
model: "opencode/grok-code",
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
tools: { write: false, edit: false, bash: true, read: true },
|
tools: { write: false, edit: false, bash: true, read: true, background_task: false },
|
||||||
prompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
|
prompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
|
||||||
|
|
||||||
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const frontendUiUxEngineerAgent: AgentConfig = {
|
|||||||
"A designer-turned-developer who crafts stunning UI/UX even without design mockups. Code may be a bit messy, but the visual output is always fire.",
|
"A designer-turned-developer who crafts stunning UI/UX even without design mockups. Code may be a bit messy, but the visual output is always fire.",
|
||||||
mode: "subagent",
|
mode: "subagent",
|
||||||
model: "google/gemini-3-pro-preview",
|
model: "google/gemini-3-pro-preview",
|
||||||
|
tools: { background_task: false },
|
||||||
prompt: `<role>
|
prompt: `<role>
|
||||||
You are a DESIGNER-TURNED-DEVELOPER with an innate sense of aesthetics and user experience. You have an eye for details that pure developers miss - spacing, color harmony, micro-interactions, and that indefinable "feel" that makes interfaces memorable.
|
You are a DESIGNER-TURNED-DEVELOPER with an innate sense of aesthetics and user experience. You have an eye for details that pure developers miss - spacing, color harmony, micro-interactions, and that indefinable "feel" that makes interfaces memorable.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const librarianAgent: AgentConfig = {
|
|||||||
mode: "subagent",
|
mode: "subagent",
|
||||||
model: "opencode/big-pickle",
|
model: "opencode/big-pickle",
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
tools: { write: false, edit: false, bash: true, read: true },
|
tools: { write: false, edit: false, bash: true, read: true, background_task: false },
|
||||||
prompt: `# THE LIBRARIAN
|
prompt: `# THE LIBRARIAN
|
||||||
|
|
||||||
You are **THE LIBRARIAN**, a specialized codebase understanding agent that helps users answer questions about large, complex codebases across repositories.
|
You are **THE LIBRARIAN**, a specialized codebase understanding agent that helps users answer questions about large, complex codebases across repositories.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const multimodalLookerAgent: AgentConfig = {
|
|||||||
mode: "subagent",
|
mode: "subagent",
|
||||||
model: "google/gemini-2.5-flash",
|
model: "google/gemini-2.5-flash",
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
tools: { Read: true },
|
tools: { Read: true, background_task: false },
|
||||||
prompt: `You interpret media files that cannot be read as plain text.
|
prompt: `You interpret media files that cannot be read as plain text.
|
||||||
|
|
||||||
Your job: examine the attached file and extract ONLY what was requested.
|
Your job: examine the attached file and extract ONLY what was requested.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export const oracleAgent: AgentConfig = {
|
|||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
reasoningEffort: "medium",
|
reasoningEffort: "medium",
|
||||||
textVerbosity: "high",
|
textVerbosity: "high",
|
||||||
tools: { write: false, edit: false, read: true, task: false, call_omo_agent: true },
|
tools: { write: false, edit: false, read: true, task: false, call_omo_agent: true, background_task: false },
|
||||||
prompt: `You are a strategic technical advisor with deep reasoning capabilities, operating as a specialized consultant within an AI-assisted development environment.
|
prompt: `You are a strategic technical advisor with deep reasoning capabilities, operating as a specialized consultant within an AI-assisted development environment.
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|||||||
Reference in New Issue
Block a user