19 lines
418 B
TypeScript
19 lines
418 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",
|
|
"run.completed",
|
|
"run.failed",
|
|
]),
|
|
payload: z.record(z.string(), z.unknown()),
|
|
});
|
|
|
|
export type RunEventResponse = z.infer<typeof runEventSchema>;
|