fix(athena): add permission restrictions to council-member agent
Add explicit tool denials (write, edit, task, call_omo_agent, athena_council) matching Oracle/Librarian pattern. Simplify static prompt to one-liner since council-prompt.ts provides full instructions. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
197dada95e
commit
750db54468
@ -1,24 +1,28 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
import type { AgentMode } from "../types"
|
import type { AgentMode } from "../types"
|
||||||
|
import { createAgentToolRestrictions } from "../../shared/permission-compat"
|
||||||
|
|
||||||
const MODE: AgentMode = "subagent"
|
const MODE: AgentMode = "subagent"
|
||||||
|
|
||||||
const COUNCIL_MEMBER_PROMPT = `You are an independent code analyst in a multi-model council. Your role is to provide thorough, evidence-based analysis of the question you receive.
|
const COUNCIL_MEMBER_PROMPT =
|
||||||
|
"You are an independent code analyst in a multi-model council. Provide thorough, evidence-based analysis."
|
||||||
## Instructions
|
|
||||||
- Search the codebase using available tools (Read, Grep, Glob, LSP)
|
|
||||||
- Report findings with evidence: file paths, line numbers, code snippets
|
|
||||||
- For each finding, state severity (critical/high/medium/low) and confidence (high/medium/low)
|
|
||||||
- Focus on real issues backed by evidence, not hypothetical concerns
|
|
||||||
- Be concise but thorough — quality over quantity`
|
|
||||||
|
|
||||||
export function createCouncilMemberAgent(model: string): AgentConfig {
|
export function createCouncilMemberAgent(model: string): AgentConfig {
|
||||||
|
const restrictions = createAgentToolRestrictions([
|
||||||
|
"write",
|
||||||
|
"edit",
|
||||||
|
"task",
|
||||||
|
"call_omo_agent",
|
||||||
|
"athena_council",
|
||||||
|
])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
description: "Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)",
|
description: "Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)",
|
||||||
mode: MODE,
|
mode: MODE,
|
||||||
model,
|
model,
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
prompt: COUNCIL_MEMBER_PROMPT,
|
prompt: COUNCIL_MEMBER_PROMPT,
|
||||||
|
...restrictions,
|
||||||
} as AgentConfig
|
} as AgentConfig
|
||||||
}
|
}
|
||||||
createCouncilMemberAgent.mode = MODE
|
createCouncilMemberAgent.mode = MODE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user