refactor(athena): use z.infer types from Zod schema, delete manual interfaces

This commit is contained in:
ismeth 2026-02-20 14:29:24 +01:00 committed by YeonGyu-Kim
parent c4deb6bc5d
commit f9fdd08481
5 changed files with 5 additions and 13 deletions

View File

@ -1,4 +1,3 @@
export * from "./types"
export * from "./agent"
export * from "./council-member-agent"

View File

@ -1,10 +0,0 @@
export interface CouncilMemberConfig {
model: string
variant?: string
name: string
temperature?: number
}
export interface CouncilConfig {
members: CouncilMemberConfig[]
}

View File

@ -31,7 +31,7 @@ import { maybeCreateAtlasConfig } from "./builtin-agents/atlas-agent"
import { buildCustomAgentMetadata, parseRegisteredAgentSummaries } from "./custom-agent-summaries"
import { registerCouncilMemberAgents } from "./builtin-agents/council-member-agents"
import { appendMissingCouncilPrompt } from "./builtin-agents/athena-council-guard"
import type { CouncilConfig } from "./athena/types"
import type { CouncilConfig } from "../config/schema/athena"
type AgentSource = AgentFactory | AgentConfig

View File

@ -1,5 +1,5 @@
import type { AgentConfig } from "@opencode-ai/sdk"
import type { CouncilConfig, CouncilMemberConfig } from "../athena/types"
import type { CouncilConfig, CouncilMemberConfig } from "../../config/schema/athena"
import { createCouncilMemberAgent } from "../athena/council-member-agent"
import { parseModelString } from "../../tools/delegate-task/model-string-parser"
import { log } from "../../shared/logger"

View File

@ -21,6 +21,9 @@ export const CouncilConfigSchema = z.object({
members: z.array(CouncilMemberSchema).min(2),
}).strict()
export type CouncilMemberConfig = z.infer<typeof CouncilMemberSchema>
export type CouncilConfig = z.infer<typeof CouncilConfigSchema>
export const AthenaConfigSchema = z.object({
model: z.string().optional(),
council: CouncilConfigSchema,