refactor(athena): use z.infer types from Zod schema, delete manual interfaces
This commit is contained in:
parent
c4deb6bc5d
commit
f9fdd08481
@ -1,4 +1,3 @@
|
||||
export * from "./types"
|
||||
export * from "./agent"
|
||||
export * from "./council-member-agent"
|
||||
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
export interface CouncilMemberConfig {
|
||||
model: string
|
||||
variant?: string
|
||||
name: string
|
||||
temperature?: number
|
||||
}
|
||||
|
||||
export interface CouncilConfig {
|
||||
members: CouncilMemberConfig[]
|
||||
}
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user