Variable ServerMessageSchemaConst
ServerMessageSchema: z.ZodDiscriminatedUnion<
[
z.ZodObject<
{
audioFormat: z.ZodString;
sampleRate: z.ZodNumber;
sessionId: z.ZodOptional<z.ZodString>;
ttsSampleRate: z.ZodNumber;
type: z.ZodLiteral<"config">;
},
z.core.$strip,
>,
z.ZodObject<{ type: z.ZodLiteral<"audio_done"> }, z.core.$strip>,
z.ZodObject<{ type: z.ZodLiteral<"speech_started"> }, z.core.$strip>,
z.ZodObject<{ type: z.ZodLiteral<"speech_stopped"> }, z.core.$strip>,
z.ZodObject<
{ text: z.ZodString; type: z.ZodLiteral<"user_transcript"> },
z.core.$strip,
>,
z.ZodObject<
{ text: z.ZodString; type: z.ZodLiteral<"user_transcript_partial"> },
z.core.$strip,
>,
z.ZodObject<
{ text: z.ZodString; type: z.ZodLiteral<"agent_transcript"> },
z.core.$strip,
>,
z.ZodObject<
{
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
toolCallId: z.ZodString;
toolName: z.ZodString;
type: z.ZodLiteral<"tool_call">;
},
z.core.$strip,
>,
z.ZodObject<
{
result: z.ZodString;
toolCallId: z.ZodString;
type: z.ZodLiteral<"tool_call_done">;
},
z.core.$strip,
>,
z.ZodObject<{ type: z.ZodLiteral<"reply_done"> }, z.core.$strip>,
z.ZodObject<{ type: z.ZodLiteral<"cancelled"> }, z.core.$strip>,
z.ZodObject<{ type: z.ZodLiteral<"reset"> }, z.core.$strip>,
z.ZodObject<{ type: z.ZodLiteral<"idle_timeout"> }, z.core.$strip>,
z.ZodObject<
{
code: z.ZodEnum<
{
audio: "audio";
connection: "connection";
internal: "internal";
llm: "llm";
protocol: "protocol";
stt: "stt";
tool: "tool";
tts: "tts";
},
>;
fatal: z.ZodOptional<z.ZodBoolean>;
message: z.ZodString;
type: z.ZodLiteral<"error">;
},
z.core.$strip,
>,
z.ZodObject<
{
data: z.ZodUnknown;
event: z.ZodString;
type: z.ZodLiteral<"custom_event">;
},
z.core.$strip,
>,
z.ZodObject<
{ state: z.ZodUnknown; type: z.ZodLiteral<"agent_state"> },
z.core.$strip,
>,
],
"type",
>
Zod schema for server→client text messages.