fix(athena): enforce strict schema validation for council members
Add .strict() to CouncilMemberSchema to reject unknown fields like temperature. Remove unused Zod-inferred type exports. Add test verifying unknown fields are rejected. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -16,7 +16,7 @@ export const CouncilMemberSchema = z.object({
|
||||
model: ModelStringSchema,
|
||||
variant: z.string().optional(),
|
||||
name: z.string().optional(),
|
||||
})
|
||||
}).strict()
|
||||
|
||||
export const CouncilConfigSchema = z.object({
|
||||
members: z.array(CouncilMemberSchema).min(2),
|
||||
@@ -26,7 +26,3 @@ export const AthenaConfigSchema = z.object({
|
||||
model: z.string().optional(),
|
||||
council: CouncilConfigSchema,
|
||||
})
|
||||
|
||||
export type CouncilMemberSchemaType = z.infer<typeof CouncilMemberSchema>
|
||||
export type CouncilConfigSchemaType = z.infer<typeof CouncilConfigSchema>
|
||||
export type AthenaConfigSchemaType = z.infer<typeof AthenaConfigSchema>
|
||||
|
||||
Reference in New Issue
Block a user