refactor(types): replace GetAgentResponse interface with zod schema

Use zod schema for better type safety and validation
This commit is contained in:
icarus 2025-09-18 12:59:49 +08:00
parent 62d2da3815
commit 0a82955e91

View File

@ -120,9 +120,11 @@ export const CreateAgentResponseSchema = AgentEntitySchema
export interface UpdateAgentRequest extends Partial<AgentBase> {}
export interface GetAgentResponse extends AgentEntity {
built_in_tools?: Tool[] // Built-in tools available to the agent
}
export const GetAgentResponseSchema = AgentEntitySchema.extend({
built_in_tools: z.array(ToolSchema).optional() // Built-in tools available to the agent
})
export type GetAgentResponse = z.infer<typeof GetAgentResponseSchema>
export type CreateSessionRequest = AgentBase