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
+4 -6
View File
@@ -1,14 +1,12 @@
import { z } from "zod"
import { parseModelString } from "../../agents/athena/model-parser"
/** Validates model string format: "provider/model-id" (e.g., "openai/gpt-5.3-codex"). */
const ModelStringSchema = z
.string()
.min(1)
.refine(
(model) => {
const slashIndex = model.indexOf("/")
return slashIndex > 0 && slashIndex < model.length - 1
},
(model) => parseModelString(model) !== null,
{ message: 'Model must be in "provider/model-id" format (e.g., "openai/gpt-5.3-codex")' }
)
@@ -20,9 +18,9 @@ export const CouncilMemberSchema = z.object({
export const CouncilConfigSchema = z.object({
members: z.array(CouncilMemberSchema).min(2),
})
}).strict()
export const AthenaConfigSchema = z.object({
model: z.string().optional(),
council: CouncilConfigSchema,
})
}).strict()