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 "./agent"
|
||||||
export * from "./council-member-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 { buildCustomAgentMetadata, parseRegisteredAgentSummaries } from "./custom-agent-summaries"
|
||||||
import { registerCouncilMemberAgents } from "./builtin-agents/council-member-agents"
|
import { registerCouncilMemberAgents } from "./builtin-agents/council-member-agents"
|
||||||
import { appendMissingCouncilPrompt } from "./builtin-agents/athena-council-guard"
|
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
|
type AgentSource = AgentFactory | AgentConfig
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
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 { createCouncilMemberAgent } from "../athena/council-member-agent"
|
||||||
import { parseModelString } from "../../tools/delegate-task/model-string-parser"
|
import { parseModelString } from "../../tools/delegate-task/model-string-parser"
|
||||||
import { log } from "../../shared/logger"
|
import { log } from "../../shared/logger"
|
||||||
|
|||||||
@ -21,6 +21,9 @@ export const CouncilConfigSchema = z.object({
|
|||||||
members: z.array(CouncilMemberSchema).min(2),
|
members: z.array(CouncilMemberSchema).min(2),
|
||||||
}).strict()
|
}).strict()
|
||||||
|
|
||||||
|
export type CouncilMemberConfig = z.infer<typeof CouncilMemberSchema>
|
||||||
|
export type CouncilConfig = z.infer<typeof CouncilConfigSchema>
|
||||||
|
|
||||||
export const AthenaConfigSchema = z.object({
|
export const AthenaConfigSchema = z.object({
|
||||||
model: z.string().optional(),
|
model: z.string().optional(),
|
||||||
council: CouncilConfigSchema,
|
council: CouncilConfigSchema,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user