import { z } from "@hono/zod-openapi"; //#region src/validation/stream-event-schemas.d.ts /** * Vercel AI SDK Data Stream Protocol Event Schemas * * These schemas define the structure of events sent by the Inkeep Agents Run API. * They are used by both the streaming backend and AI SDK providers to ensure type safety. */ /** * Marks the beginning of a text stream */ declare const TextStartEventSchema: z.ZodObject<{ type: z.ZodLiteral<"text-start">; id: z.ZodString; }, z.core.$strip>; /** * Represents a chunk of streaming text */ declare const TextDeltaEventSchema: z.ZodObject<{ type: z.ZodLiteral<"text-delta">; id: z.ZodString; delta: z.ZodString; }, z.core.$strip>; /** * Marks the end of a text stream */ declare const TextEndEventSchema: z.ZodObject<{ type: z.ZodLiteral<"text-end">; id: z.ZodString; }, z.core.$strip>; /** * Data component event - structured data in the stream * Used for artifacts, visualizations, or other structured outputs */ declare const DataComponentStreamEventSchema: z.ZodObject<{ type: z.ZodLiteral<"data-component">; id: z.ZodString; data: z.ZodOptional; }, z.core.$strip>; /** * Data operation event - agent operations and state changes * Wraps operation events (agent_initializing, completion, etc.) */ declare const DataOperationStreamEventSchema: z.ZodObject<{ type: z.ZodLiteral<"data-operation">; data: z.ZodOptional; }, z.core.$strip>; /** * Data summary event - progress summaries and status updates */ declare const DataSummaryStreamEventSchema: z.ZodObject<{ type: z.ZodLiteral<"data-summary">; data: z.ZodOptional; }, z.core.$strip>; /** * Stream error event */ declare const StreamErrorEventSchema: z.ZodObject<{ type: z.ZodLiteral<"error">; error: z.ZodString; }, z.core.$strip>; /** * Stream finish event with usage statistics */ declare const StreamFinishEventSchema: z.ZodObject<{ type: z.ZodLiteral<"finish">; finishReason: z.ZodOptional; usage: z.ZodOptional; completionTokens: z.ZodOptional; totalTokens: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; /** * Tool input start event - marks beginning of tool input streaming */ declare const ToolInputStartEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-input-start">; toolCallId: z.ZodString; toolName: z.ZodString; }, z.core.$strip>; /** * Tool input delta event - streaming chunks of tool input */ declare const ToolInputDeltaEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-input-delta">; toolCallId: z.ZodString; inputTextDelta: z.ZodString; }, z.core.$strip>; /** * Tool input available event - complete tool input is available */ declare const ToolInputAvailableEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-input-available">; toolCallId: z.ZodString; toolName: z.ZodString; input: z.ZodOptional; providerMetadata: z.ZodOptional; }, z.core.$strip>; /** * Tool output available event - tool execution result */ declare const ToolOutputAvailableEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-output-available">; toolCallId: z.ZodString; output: z.ZodOptional; }, z.core.$strip>; /** * Tool output error event - tool execution failed */ declare const ToolOutputErrorEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-output-error">; toolCallId: z.ZodString; errorText: z.ZodString; }, z.core.$strip>; /** * Tool approval request event - requesting user approval for tool execution */ declare const ToolApprovalRequestEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-approval-request">; approvalId: z.ZodString; toolCallId: z.ZodString; toolName: z.ZodOptional; input: z.ZodOptional>; }, z.core.$strip>; /** * Tool output denied event - tool execution was denied by user */ declare const ToolOutputDeniedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"tool-output-denied">; toolCallId: z.ZodString; }, z.core.$strip>; /** * Union of all stream event types * This is the main schema used for validating incoming stream events */ declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text-start">; id: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text-delta">; id: z.ZodString; delta: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text-end">; id: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data-component">; id: z.ZodString; data: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data-operation">; data: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data-summary">; data: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"error">; error: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"finish">; finishReason: z.ZodOptional; usage: z.ZodOptional; completionTokens: z.ZodOptional; totalTokens: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-input-start">; toolCallId: z.ZodString; toolName: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-input-delta">; toolCallId: z.ZodString; inputTextDelta: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-input-available">; toolCallId: z.ZodString; toolName: z.ZodString; input: z.ZodOptional; providerMetadata: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-output-available">; toolCallId: z.ZodString; output: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-output-error">; toolCallId: z.ZodString; errorText: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-approval-request">; approvalId: z.ZodString; toolCallId: z.ZodString; toolName: z.ZodOptional; input: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"tool-output-denied">; toolCallId: z.ZodString; }, z.core.$strip>], "type">; type TextStartEvent = z.infer; type TextDeltaEvent = z.infer; type TextEndEvent = z.infer; type DataComponentStreamEvent = z.infer; type DataOperationStreamEvent = z.infer; type DataSummaryStreamEvent = z.infer; type StreamErrorEvent = z.infer; type StreamFinishEvent = z.infer; type ToolInputStartEvent = z.infer; type ToolInputDeltaEvent = z.infer; type ToolInputAvailableEvent = z.infer; type ToolOutputAvailableEvent = z.infer; type ToolOutputErrorEvent = z.infer; type ToolApprovalRequestEvent = z.infer; type ToolOutputDeniedEvent = z.infer; /** * Union type of all possible stream events */ type StreamEvent = z.infer; //#endregion export { DataComponentStreamEvent, DataComponentStreamEventSchema, DataOperationStreamEvent, DataOperationStreamEventSchema, DataSummaryStreamEvent, DataSummaryStreamEventSchema, StreamErrorEvent, StreamErrorEventSchema, StreamEvent, StreamEventSchema, StreamFinishEvent, StreamFinishEventSchema, TextDeltaEvent, TextDeltaEventSchema, TextEndEvent, TextEndEventSchema, TextStartEvent, TextStartEventSchema, ToolApprovalRequestEvent, ToolApprovalRequestEventSchema, ToolInputAvailableEvent, ToolInputAvailableEventSchema, ToolInputDeltaEvent, ToolInputDeltaEventSchema, ToolInputStartEvent, ToolInputStartEventSchema, ToolOutputAvailableEvent, ToolOutputAvailableEventSchema, ToolOutputDeniedEvent, ToolOutputDeniedEventSchema, ToolOutputErrorEvent, ToolOutputErrorEventSchema };