2026-02-17 12:33:49 +01:00
|
|
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
|
|
|
|
import type { AgentMode } from "../types"
|
2026-02-18 23:32:08 +01:00
|
|
|
import { isGptModel } from "../types"
|
2026-02-18 20:55:19 +01:00
|
|
|
import { createAgentToolRestrictions } from "../../shared/permission-compat"
|
2026-02-17 12:33:49 +01:00
|
|
|
|
|
|
|
|
const MODE: AgentMode = "subagent"
|
|
|
|
|
|
2026-02-18 20:55:19 +01:00
|
|
|
const COUNCIL_MEMBER_PROMPT =
|
|
|
|
|
"You are an independent code analyst in a multi-model council. Provide thorough, evidence-based analysis."
|
2026-02-17 12:33:49 +01:00
|
|
|
|
|
|
|
|
export function createCouncilMemberAgent(model: string): AgentConfig {
|
2026-02-18 20:55:19 +01:00
|
|
|
const restrictions = createAgentToolRestrictions([
|
|
|
|
|
"write",
|
|
|
|
|
"edit",
|
|
|
|
|
"task",
|
|
|
|
|
"call_omo_agent",
|
|
|
|
|
"athena_council",
|
|
|
|
|
])
|
|
|
|
|
|
2026-02-18 23:32:08 +01:00
|
|
|
const base = {
|
|
|
|
|
description:
|
|
|
|
|
"Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)",
|
2026-02-17 12:33:49 +01:00
|
|
|
mode: MODE,
|
|
|
|
|
model,
|
|
|
|
|
temperature: 0.1,
|
|
|
|
|
prompt: COUNCIL_MEMBER_PROMPT,
|
2026-02-18 20:55:19 +01:00
|
|
|
...restrictions,
|
2026-02-18 23:32:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isGptModel(model)) {
|
|
|
|
|
return { ...base, reasoningEffort: "medium" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return { ...base, thinking: { type: "enabled", budgetTokens: 32000 } }
|
2026-02-17 12:33:49 +01:00
|
|
|
}
|
|
|
|
|
createCouncilMemberAgent.mode = MODE
|