refactor(athena): remove type assertions and improve agent factories

- Replace 'as AgentConfig' casts with proper typing in agent.ts and council-member-agent.ts
- Extract permission into typed variable following Sisyphus pattern
- Add GPT/non-GPT model branching to council-member-agent
- Use parseModelString for schema validation instead of inline logic
- Add strict() to council and athena config schemas
- Fix athena restriction list (remove redundant athena_council deny)
- Add orchestrator logging for council execution
- Update system prompt to notification-based workflow

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
ismeth
2026-02-18 23:32:08 +01:00
committed by YeonGyu-Kim
parent bbb8fdcca7
commit 6266e70a4b
6 changed files with 43 additions and 23 deletions
+11 -3
View File
@@ -1,5 +1,6 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { AgentMode } from "../types"
import { isGptModel } from "../types"
import { createAgentToolRestrictions } from "../../shared/permission-compat"
const MODE: AgentMode = "subagent"
@@ -16,13 +17,20 @@ export function createCouncilMemberAgent(model: string): AgentConfig {
"athena_council",
])
return {
description: "Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)",
const base = {
description:
"Independent code analyst for Athena multi-model council. Read-only, evidence-based analysis. (Council Member - OhMyOpenCode)",
mode: MODE,
model,
temperature: 0.1,
prompt: COUNCIL_MEMBER_PROMPT,
...restrictions,
} as AgentConfig
}
if (isGptModel(model)) {
return { ...base, reasoningEffort: "medium" }
}
return { ...base, thinking: { type: "enabled", budgetTokens: 32000 } }
}
createCouncilMemberAgent.mode = MODE