2026-08-14 14:54:59 +08:00

23 lines
525 B
TypeScript

import { z } from "zod";
export const runEventSchema = z.object({
runId: z.string(),
sequence: z.number().int().positive(),
timestamp: z.string(),
type: z.enum([
"run.started",
"message.started",
"message.delta",
"message.completed",
"interaction.requested",
"interaction.resolved",
"interaction.cancelled",
"run.completed",
"run.failed",
"run.cancelled",
]),
payload: z.record(z.string(), z.unknown()),
});
export type RunEventResponse = z.infer<typeof runEventSchema>;