@ag-ui/core 1.0.0-canary.1789569879.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","names":["z","EventType"],"sources":["../src/generated/schemas.ts","../src/schemas.ts"],"sourcesContent":["// @generated by spec/generator — DO NOT EDIT.\n// Source: https://ag-ui.com/spec/draft/schema.json\n// Regenerate: pnpm --filter @ag-ui/spec generate\n/* eslint-disable */\n\nimport { z } from \"zod/v4\";\nimport { EventType } from \"./types\";\n\n/**\n * The discriminator carried by every event.\n */\nexport const EventTypeSchema = z.enum(EventType);\n\n/**\n * Extra information attached to an event, a message, a tool call, a tool, an\n * interrupt or a resume entry. Open by key: any JSON value is allowed under a\n * key, including null, because a null there is meaningful data. The object\n * itself may be absent but is never null when present. The key ag-ui is\n * reserved for the protocol's own use; reservation is by convention, since\n * validating the shape of a key's value would contradict being open by key.\n */\nexport const MetadataSchema = z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n);\n\n/**\n * An opaque handle for one subagent invocation, not a reusable name for a\n * subagent definition: two invocations of the same subagent carry two\n * different values. Named to mirror runId one level down, the way the\n * subagent's name mirrors agentId.\n */\nexport const SubagentRunIdSchema = z.string();\n\n/**\n * The roles a streamed text message may take. Excludes tool, which is carried\n * by TOOL_CALL_RESULT rather than streamed as text.\n */\nexport const TextMessageRoleSchema = z.enum([\"developer\", \"system\", \"assistant\", \"user\"]);\n\n/**\n * Opens a streamed text message. The content arrives as TEXT_MESSAGE_CONTENT\n * events and the message closes with TEXT_MESSAGE_END.\n */\nexport const TextMessageStartEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n role: TextMessageRoleSchema.optional(),\n name: z.string().optional(),\n});\n\n/**\n * Appends a fragment to a streamed text message.\n */\nexport const TextMessageContentEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_CONTENT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a streamed text message.\n */\nexport const TextMessageEndEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a start, content and end sequence, for\n * producers that cannot know in advance where a message begins. Every field is\n * optional because a continuation chunk omits what has not changed; which\n * message a field-less chunk continues is a sequence question the prose\n * specification answers.\n */\nexport const TextMessageChunkEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string().optional(),\n role: TextMessageRoleSchema.optional(),\n delta: z.string().optional(),\n name: z.string().optional(),\n});\n\n/**\n * Opens a tool call. The arguments arrive as TOOL_CALL_ARGS events and the\n * call closes with TOOL_CALL_END.\n */\nexport const ToolCallStartEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n toolCallName: z.string(),\n parentMessageId: z.string().optional(),\n});\n\n/**\n * Appends a fragment of a tool call's arguments.\n */\nexport const ToolCallArgsEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_ARGS),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a tool call, meaning its arguments are complete.\n */\nexport const ToolCallEndEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a tool call's start, args and end sequence.\n * Every field is optional for the same reason as TEXT_MESSAGE_CHUNK.\n */\nexport const ToolCallChunkEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string().optional(),\n toolCallName: z.string().optional(),\n parentMessageId: z.string().optional(),\n delta: z.string().optional(),\n});\n\n/**\n * A text part.\n */\nexport const TextPartSchema = z.looseObject({\n type: z.literal(\"text\"),\n id: z.string().optional(),\n text: z.string(),\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * Bytes carried inline.\n */\nexport const DataSourceSchema = z.looseObject({\n type: z.literal(\"data\"),\n value: z.string(),\n mimeType: z.string(),\n});\n\n/**\n * Bytes referenced by URL, fetched by whoever needs them.\n */\nexport const UrlSourceSchema = z.looseObject({\n type: z.literal(\"url\"),\n value: z.string(),\n mimeType: z.string().optional(),\n});\n\n/**\n * Bytes already at the provider, named by a handle the provider issued: an\n * OpenAI or Anthropic file id, a Gemini file URI, a storage URL only that\n * provider can read. No bytes travel and nothing is fetched. Only the provider\n * that minted the handle can resolve it; a peer that cannot drops the part as\n * it drops any part it cannot use.\n */\nexport const FileSourceSchema = z.looseObject({\n type: z.literal(\"file\"),\n value: z.string(),\n provider: z.string().optional(),\n mimeType: z.string().optional(),\n});\n\n/**\n * Where a media part's bytes come from: carried inline, referenced by URL, or\n * already at the provider under a handle it issued.\n */\nexport const PartSourceSchema = z.discriminatedUnion(\"type\", [\n DataSourceSchema,\n UrlSourceSchema,\n FileSourceSchema,\n]);\n\n/**\n * An image part.\n */\nexport const ImagePartSchema = z.looseObject({\n type: z.literal(\"image\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * An audio part.\n */\nexport const AudioPartSchema = z.looseObject({\n type: z.literal(\"audio\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * A video part.\n */\nexport const VideoPartSchema = z.looseObject({\n type: z.literal(\"video\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * A document part.\n */\nexport const DocumentPartSchema = z.looseObject({\n type: z.literal(\"document\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * One part of a message body: what a person sends in a user message, or what a\n * tool returns in a tool message. Discriminated by type. Named by what the\n * part is rather than by direction, because the same part travels into the\n * model inside a user message and back out of the stream inside a tool result.\n */\nexport const ContentPartSchema = z.discriminatedUnion(\"type\", [\n TextPartSchema,\n ImagePartSchema,\n AudioPartSchema,\n VideoPartSchema,\n DocumentPartSchema,\n]);\n\n/**\n * Carries what a tool returned. Mints a tool message rather than appending to\n * an existing one, which is why it has its own messageId.\n */\nexport const ToolCallResultEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_RESULT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n toolCallId: z.string(),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n role: z.literal(\"tool\").optional(),\n});\n\n/**\n * Agent state. Any JSON value: the protocol carries state without interpreting\n * it, so an object, an array, a string and a number are all valid.\n */\nexport const StateSchema = z.any();\n\n/**\n * Replaces the agent state wholesale. Sent when a delta cannot express the\n * change, or to resynchronise a consumer.\n */\nexport const StateSnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.STATE_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n snapshot: StateSchema.refine((value) => value !== undefined),\n});\n\n/**\n * A JSON Pointer as defined by RFC 6901. Either the empty string, meaning the\n * whole document, or a sequence of slash-prefixed reference tokens in which a\n * tilde is escaped as ~0 and a slash as ~1. A value with no leading slash, or\n * a tilde followed by anything other than 0 or 1, is not a JSON Pointer.\n */\nexport const JsonPointerSchema = z.string().regex(new RegExp(\"^(/([^/~]|~[01])*)*$\"));\n\n/**\n * Inserts value at path. RFC 6902 section 4.1.\n */\nexport const AddOperationSchema = z\n .looseObject({\n op: z.literal(\"add\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * Removes the value at path. RFC 6902 section 4.2.\n */\nexport const RemoveOperationSchema = z\n .looseObject({\n op: z.literal(\"remove\"),\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Replaces the value at path. RFC 6902 section 4.3.\n */\nexport const ReplaceOperationSchema = z\n .looseObject({\n op: z.literal(\"replace\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * Moves the value at from to path. RFC 6902 section 4.4.\n */\nexport const MoveOperationSchema = z\n .looseObject({\n op: z.literal(\"move\"),\n from: JsonPointerSchema,\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Copies the value at from to path. RFC 6902 section 4.5.\n */\nexport const CopyOperationSchema = z\n .looseObject({\n op: z.literal(\"copy\"),\n from: JsonPointerSchema,\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Asserts that the value at path equals value. RFC 6902 section 4.6.\n */\nexport const TestOperationSchema = z\n .looseObject({\n op: z.literal(\"test\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * A single RFC 6902 operation. Exactly one of the operation shapes must match,\n * discriminated by op. Unlike the protocol's own objects, the operations are\n * open: RFC 6902 section 4 requires members an operation does not define to be\n * ignored rather than rejected, so a remove carrying a leftover value is a\n * valid patch. Two of the RFC's rules are relations between values rather than\n * shapes, so no static schema can express them and neither is checked here: a\n * move whose from is a proper prefix of its path (section 4.4), and any\n * operation whose pointer does not resolve in the target document. Both are\n * the applier's to reject.\n */\nexport const JsonPatchOperationSchema = z.discriminatedUnion(\"op\", [\n AddOperationSchema,\n RemoveOperationSchema,\n ReplaceOperationSchema,\n MoveOperationSchema,\n CopyOperationSchema,\n TestOperationSchema,\n]);\n\n/**\n * A JSON Patch document as defined by RFC 6902, referenced by\n * STATE_DELTA.delta and ACTIVITY_DELTA.patch: an ordered sequence of\n * operations applied to a target document. An empty array is a valid no-op\n * patch. Whether the operations actually apply to the document they target is\n * a runtime question RFC 6902 leaves to the applier; structural validity here\n * says nothing about it.\n */\nexport const JsonPatchSchema = z.array(JsonPatchOperationSchema);\n\n/**\n * Changes the agent state incrementally.\n */\nexport const StateDeltaEventSchema = z.looseObject({\n type: z.literal(EventType.STATE_DELTA),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n delta: JsonPatchSchema,\n});\n\n/**\n * Instructions from the application developer.\n */\nexport const DeveloperMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"developer\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string(),\n});\n\n/**\n * Instructions from the system.\n */\nexport const SystemMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"system\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string(),\n});\n\n/**\n * The name and arguments of a tool call.\n */\nexport const FunctionCallSchema = z.looseObject({\n name: z.string(),\n arguments: z.string(),\n});\n\n/**\n * A call an assistant message made. Carries no subagent attribution of its own\n * and inherits its containing message's, since several calls can share one\n * parent.\n */\nexport const ToolCallSchema = z.looseObject({\n id: z.string(),\n type: z.literal(\"function\"),\n function: FunctionCallSchema,\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A message from the agent. Content is optional because a turn may consist\n * only of tool calls.\n */\nexport const AssistantMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"assistant\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string().optional(),\n toolCalls: z.array(ToolCallSchema).optional(),\n});\n\n/**\n * A message from the person using the application.\n */\nexport const UserMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"user\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n});\n\n/**\n * What a tool returned, as a message in the conversation. Stands alone rather\n * than composing BaseMessage, because it carries no name.\n */\nexport const ToolMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"tool\"),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n toolCallId: z.string(),\n error: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Structured progress that is not conversation content, materialised as a\n * message so it keeps its place in the sequence. Stands alone rather than\n * composing BaseMessage, because its content is an object rather than a\n * string.\n */\nexport const ActivityMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"activity\"),\n activityType: z.string(),\n content: z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n ),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A span of the agent's reasoning, materialised as a message. Stands alone\n * rather than composing BaseMessage, because it carries no name.\n */\nexport const ReasoningMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"reasoning\"),\n content: z.string(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Any message in a conversation. Discriminated by role.\n */\nexport const MessageSchema = z.discriminatedUnion(\"role\", [\n DeveloperMessageSchema,\n SystemMessageSchema,\n AssistantMessageSchema,\n UserMessageSchema,\n ToolMessageSchema,\n ActivityMessageSchema,\n ReasoningMessageSchema,\n]);\n\n/**\n * The complete set of messages the producer owns, in order. Conversation-wide\n * rather than a plain overwrite: a consumer may keep messages of its own that\n * no producer tracks, so exactly how a snapshot reconciles with those is\n * behavioural and belongs in the prose. Being conversation-wide it cannot\n * belong to a single subagent, so it carries no attribution; it does establish\n * which subagent owns each message it contains, through the messages\n * themselves.\n */\nexport const MessagesSnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.MESSAGES_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n messages: z.array(MessageSchema),\n});\n\n/**\n * Reports structured progress that is not conversation content, such as a step\n * a UI renders as its own widget.\n */\nexport const ActivitySnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.ACTIVITY_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n activityType: z.string(),\n content: z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n ),\n replace: z.boolean().optional(),\n});\n\n/**\n * Changes an activity message's content incrementally.\n */\nexport const ActivityDeltaEventSchema = z.looseObject({\n type: z.literal(EventType.ACTIVITY_DELTA),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n activityType: z.string(),\n patch: JsonPatchSchema,\n});\n\n/**\n * Passes a provider-native event through untranslated, for consumers that need\n * detail the protocol does not model.\n */\nexport const RawEventSchema = z.looseObject({\n type: z.literal(EventType.RAW),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n event: z.any().refine((value) => value !== undefined),\n source: z.string().optional(),\n});\n\n/**\n * The protocol's extension point for an application's own events. Anything a\n * consumer does with one is outside the protocol.\n */\nexport const CustomEventSchema = z.looseObject({\n type: z.literal(EventType.CUSTOM),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n name: z.string(),\n value: z.any().refine((value) => value !== undefined),\n});\n\n/**\n * A tool the agent may call.\n */\nexport const ToolSchema = z.looseObject({\n name: z.string(),\n description: z.string(),\n parameters: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A named piece of ambient information given to the agent for the run,\n * distinct from the conversation.\n */\nexport const ContextSchema = z.looseObject({\n description: z.string(),\n value: z.string(),\n});\n\n/**\n * An answer to one interrupt, sent on the run that continues from it.\n */\nexport const ResumeEntrySchema = z.looseObject({\n interruptId: z.string(),\n status: z.enum([\"resolved\", \"cancelled\"]),\n payload: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A request to run an agent. Also echoed back as RUN_STARTED.input. Only\n * threadId, runId and messages are required: those are the three the SDKs\n * already agree on, and for tools and context an absent key and an empty array\n * mean the same thing, so requiring them would catch nothing a producer could\n * get wrong.\n */\nexport const RunAgentInputSchema = z.looseObject({\n threadId: z.string(),\n runId: z.string(),\n protocolVersion: z.string().optional(),\n parentRunId: z.string().optional(),\n state: StateSchema.refine((value) => value !== null)\n .nullable()\n .transform((value) => value ?? undefined)\n .optional(),\n messages: z.array(MessageSchema),\n tools: z.array(ToolSchema).default(() => []),\n context: z.array(ContextSchema).default(() => []),\n forwardedProps: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n resume: z.array(ResumeEntrySchema).optional(),\n});\n\n/**\n * Opens a run. Run-scoped, so it carries no subagent attribution.\n */\nexport const RunStartedEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n threadId: z.string(),\n runId: z.string(),\n protocolVersion: z.string().optional(),\n parentRunId: z.string().optional(),\n input: RunAgentInputSchema.optional(),\n});\n\n/**\n * The run completed. Equivalent to an absent outcome. Closed like every other\n * object, which is also what keeps it from carrying the suspended sibling's\n * interrupts — a success with an interrupt still pending would be a\n * contradiction, not an extension. A completed run may still have left\n * frontend tool calls for the application to answer; pendingToolCallIds names\n * them.\n */\nexport const RunFinishedSuccessOutcomeSchema = z.looseObject({\n type: z.literal(\"success\"),\n pendingToolCallIds: z.array(z.string()).optional(),\n});\n\n/**\n * Something a run needs from outside before it can continue, such as an\n * approval or a missing value.\n */\nexport const InterruptSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n reason: z.string(),\n message: z.string().optional(),\n toolCallId: z.string().optional(),\n responseSchema: z\n .custom<\n Record<string, any>\n >((value) => typeof value === \"object\" && value !== null && !Array.isArray(value))\n .optional(),\n expiresAt: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * The run is paused, waiting for something outside it. Resuming means starting\n * a new run whose resume entries answer these interrupts.\n */\nexport const RunFinishedInterruptOutcomeSchema = z.looseObject({\n type: z.literal(\"interrupt\"),\n interrupts: z.array(InterruptSchema).min(1),\n});\n\n/**\n * The run was stopped before it completed, by whoever was running it, and did\n * not fail. Neither success nor interrupt: nothing was produced as a result,\n * and nothing is waited for, so the next run on the thread is an ordinary new\n * run rather than a resume. Closed like its siblings: a cancelled run has no\n * interrupts to carry. Named in the schema before 1.0 because an outcome a\n * consumer does not recognise is stripped and read as success — a cancellation\n * added later would reach every 1.0 consumer as a completed run.\n */\nexport const RunFinishedCancelledOutcomeSchema = z.looseObject({\n type: z.literal(\"cancelled\"),\n});\n\n/**\n * Why a run ended.\n */\nexport const RunFinishedOutcomeSchema = z.discriminatedUnion(\"type\", [\n RunFinishedSuccessOutcomeSchema,\n RunFinishedInterruptOutcomeSchema,\n RunFinishedCancelledOutcomeSchema,\n]);\n\n/**\n * Token counts for one provider and model, in the protocol's own accounting:\n * every count is either a total or a named part of one, so entries from\n * different providers add up without double-counting. inputTokens and\n * outputTokens are the totals; reasoningTokens, cachedInputTokens and\n * cacheWriteInputTokens are parts of them, never additions to them;\n * totalTokens is the two totals summed. Every field is a label or a number —\n * nothing content-bearing or identifying, no prompts, completions, messages,\n * or thread, run and user identifiers.\n */\nexport const TokenUsageSchema = z.looseObject({\n provider: z.string().optional(),\n model: z.string().optional(),\n inputTokens: z.int().min(0).max(9007199254740991).optional(),\n outputTokens: z.int().min(0).max(9007199254740991).optional(),\n totalTokens: z.int().min(0).max(9007199254740991).optional(),\n reasoningTokens: z.int().min(0).max(9007199254740991).optional(),\n cachedInputTokens: z.int().min(0).max(9007199254740991).optional(),\n cacheWriteInputTokens: z.int().min(0).max(9007199254740991).optional(),\n});\n\n/**\n * Closes a run that did not fail. Run-scoped, so it carries no subagent\n * attribution.\n */\nexport const RunFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n threadId: z.string(),\n runId: z.string(),\n result: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n outcome: RunFinishedOutcomeSchema.optional(),\n usage: z.array(TokenUsageSchema).optional(),\n});\n\n/**\n * Ends a run that failed. Run-scoped, so it carries no subagent attribution; a\n * subagent that fails without ending the run reports SUBAGENT_ERROR instead.\n */\nexport const RunErrorEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_ERROR),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n message: z.string(),\n code: z.string().optional(),\n usage: z.array(TokenUsageSchema).optional(),\n});\n\n/**\n * Opens a named step within a run, for producers whose frameworks have a step\n * concept worth surfacing.\n */\nexport const StepStartedEventSchema = z.looseObject({\n type: z.literal(EventType.STEP_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n stepName: z.string(),\n});\n\n/**\n * Closes a named step.\n */\nexport const StepFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.STEP_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n stepName: z.string(),\n});\n\n/**\n * Opens a span of reasoning. A span may contain several reasoning messages.\n */\nexport const ReasoningStartEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * Opens a streamed reasoning message.\n */\nexport const ReasoningMessageStartEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n role: z.literal(\"reasoning\"),\n});\n\n/**\n * Appends a fragment to a streamed reasoning message.\n */\nexport const ReasoningMessageContentEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_CONTENT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a streamed reasoning message.\n */\nexport const ReasoningMessageEndEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a reasoning message's start, content and end\n * sequence.\n */\nexport const ReasoningMessageChunkEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string().optional(),\n delta: z.string().optional(),\n});\n\n/**\n * Closes a span of reasoning.\n */\nexport const ReasoningEndEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * Whether a REASONING_ENCRYPTED_VALUE belongs to a message or to a tool call.\n */\nexport const ReasoningEncryptedValueSubtypeSchema = z.enum([\"tool-call\", \"message\"]);\n\n/**\n * Carries a provider's opaque, encrypted reasoning artefact, which a consumer\n * stores and returns on a later turn without being able to read it.\n */\nexport const ReasoningEncryptedValueEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_ENCRYPTED_VALUE),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n subtype: ReasoningEncryptedValueSubtypeSchema,\n entityId: z.string(),\n encryptedValue: z.string(),\n});\n\n/**\n * Announces that a subagent invocation has begun. Everything the subagent\n * produces afterwards is attributed by carrying its subagentRunId, so a\n * consumer can group the work without replaying the stream. Composed from\n * BaseEvent alone rather than Attributable, because here subagentRunId\n * identifies the subagent rather than attributing the event to one;\n * attribution to an enclosing subagent is parentSubagentRunId.\n */\nexport const SubagentStartedEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n name: z.string(),\n description: z.string().optional(),\n parentSubagentRunId: SubagentRunIdSchema.optional(),\n parentToolCallId: z.string().optional(),\n parentMessageId: z.string().optional(),\n});\n\n/**\n * The subagent completed its work. Equivalent to an absent outcome.\n */\nexport const SubagentFinishedSuccessOutcomeSchema = z.looseObject({\n type: z.literal(\"success\"),\n});\n\n/**\n * The subagent is paused awaiting outside input. Terminal for this stream, not\n * for the subagent: a later run may continue the same invocation once the\n * interrupts are answered.\n */\nexport const SubagentFinishedSuspendedOutcomeSchema = z.looseObject({\n type: z.literal(\"suspended\"),\n interruptIds: z.array(z.string()).optional(),\n});\n\n/**\n * Why a subagent's segment of a run ended. Mirrors RunFinishedOutcome one\n * level down.\n */\nexport const SubagentFinishedOutcomeSchema = z.discriminatedUnion(\"type\", [\n SubagentFinishedSuccessOutcomeSchema,\n SubagentFinishedSuspendedOutcomeSchema,\n]);\n\n/**\n * Ends a subagent invocation's segment of this run, either because the work\n * completed or because it is suspended awaiting outside input.\n */\nexport const SubagentFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n result: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n outcome: SubagentFinishedOutcomeSchema.optional(),\n});\n\n/**\n * Reports that a subagent invocation failed. The run may continue: a parent\n * agent is free to handle a failed subagent, which is why this is not\n * RUN_ERROR.\n */\nexport const SubagentErrorEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_ERROR),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n message: z.string(),\n code: z.string().optional(),\n});\n\n/**\n * Any AG-UI event. Every member is normative: there is no optional tier and no\n * event a consumer may decline to implement. Discriminated by the type\n * property.\n */\nexport const EventSchema = z.discriminatedUnion(\"type\", [\n TextMessageStartEventSchema,\n TextMessageContentEventSchema,\n TextMessageEndEventSchema,\n TextMessageChunkEventSchema,\n ToolCallStartEventSchema,\n ToolCallArgsEventSchema,\n ToolCallEndEventSchema,\n ToolCallChunkEventSchema,\n ToolCallResultEventSchema,\n StateSnapshotEventSchema,\n StateDeltaEventSchema,\n MessagesSnapshotEventSchema,\n ActivitySnapshotEventSchema,\n ActivityDeltaEventSchema,\n RawEventSchema,\n CustomEventSchema,\n RunStartedEventSchema,\n RunFinishedEventSchema,\n RunErrorEventSchema,\n StepStartedEventSchema,\n StepFinishedEventSchema,\n ReasoningStartEventSchema,\n ReasoningMessageStartEventSchema,\n ReasoningMessageContentEventSchema,\n ReasoningMessageEndEventSchema,\n ReasoningMessageChunkEventSchema,\n ReasoningEndEventSchema,\n ReasoningEncryptedValueEventSchema,\n SubagentStartedEventSchema,\n SubagentFinishedEventSchema,\n SubagentErrorEventSchema,\n]);\n\n/**\n * Every role a materialised message may have.\n */\nexport const RoleSchema = z.enum([\n \"developer\",\n \"system\",\n \"assistant\",\n \"user\",\n \"tool\",\n \"activity\",\n \"reasoning\",\n]);\n\n/**\n * Describes a subagent that can be invoked by a parent agent.\n */\nexport const SubagentInfoSchema = z.looseObject({\n name: z.string(),\n description: z.string().optional(),\n});\n\n/**\n * Basic metadata about the agent. Useful for discovery UIs, agent\n * marketplaces, and debugging. Set these when you want clients to display\n * agent information or when multiple agents are available and users need to\n * pick one.\n */\nexport const IdentityCapabilitiesSchema = z.looseObject({\n name: z.string().optional(),\n type: z.string().optional(),\n description: z.string().optional(),\n version: z.string().optional(),\n provider: z.string().optional(),\n documentationUrl: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Declares which transport mechanisms the agent supports. Clients use this to\n * pick the best connection strategy. Only set flags to true for transports\n * your agent actually handles — omit or set false for unsupported ones.\n */\nexport const TransportCapabilitiesSchema = z.looseObject({\n streaming: z.boolean().optional(),\n websocket: z.boolean().optional(),\n httpBinary: z.boolean().optional(),\n pushNotifications: z.boolean().optional(),\n resumable: z.boolean().optional(),\n});\n\n/**\n * Tool calling capabilities. Distinguishes between tools the agent itself\n * provides (listed in items) and tools the client passes at runtime via\n * RunAgentInput.tools. Enable this when your agent can call functions, search\n * the web, execute code, etc.\n */\nexport const ToolsCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n items: z.array(ToolSchema).optional(),\n parallelCalls: z.boolean().optional(),\n clientProvided: z.boolean().optional(),\n});\n\n/**\n * Output format support. Enable structuredOutput when your agent can return\n * responses conforming to a JSON schema, which is useful for programmatic\n * consumption.\n */\nexport const OutputCapabilitiesSchema = z.looseObject({\n structuredOutput: z.boolean().optional(),\n supportedMimeTypes: z.array(z.string()).optional(),\n});\n\n/**\n * State and memory management capabilities. These tell the client how the\n * agent handles shared state and whether conversation context persists across\n * runs.\n */\nexport const StateCapabilitiesSchema = z.looseObject({\n snapshots: z.boolean().optional(),\n deltas: z.boolean().optional(),\n memory: z.boolean().optional(),\n persistentState: z.boolean().optional(),\n});\n\n/**\n * Multi-agent coordination capabilities. Enable these when your agent can\n * orchestrate or hand off work to other agents.\n */\nexport const MultiAgentCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n delegation: z.boolean().optional(),\n handoffs: z.boolean().optional(),\n subagents: z.array(SubagentInfoSchema).optional(),\n});\n\n/**\n * Reasoning and thinking capabilities. Enable these when your agent exposes\n * its internal thought process (e.g., chain-of-thought, extended thinking).\n */\nexport const ReasoningCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n streaming: z.boolean().optional(),\n encrypted: z.boolean().optional(),\n});\n\n/**\n * Modalities the agent can accept as input. Clients use this to show or hide\n * file upload buttons, audio recorders, image pickers, etc.\n */\nexport const MultimodalInputCapabilitiesSchema = z.looseObject({\n image: z.boolean().optional(),\n audio: z.boolean().optional(),\n video: z.boolean().optional(),\n pdf: z.boolean().optional(),\n file: z.boolean().optional(),\n});\n\n/**\n * Modalities the agent can produce as output. Clients use this to anticipate\n * rich content in the agent's response.\n */\nexport const MultimodalOutputCapabilitiesSchema = z.looseObject({\n image: z.boolean().optional(),\n audio: z.boolean().optional(),\n});\n\n/**\n * Multimodal input and output support. Organized into input and output\n * sub-objects so clients can independently query what the agent accepts versus\n * what it produces.\n */\nexport const MultimodalCapabilitiesSchema = z.looseObject({\n input: MultimodalInputCapabilitiesSchema.optional(),\n output: MultimodalOutputCapabilitiesSchema.optional(),\n});\n\n/**\n * Execution control and limits. Declare these so clients can set expectations\n * about how long or how many steps an agent run might take.\n */\nexport const ExecutionCapabilitiesSchema = z.looseObject({\n codeExecution: z.boolean().optional(),\n sandboxed: z.boolean().optional(),\n maxIterations: z.int().min(0).max(9007199254740991).optional(),\n maxExecutionTime: z.int().min(0).max(9007199254740991).optional(),\n});\n\n/**\n * Human-in-the-loop interaction support. Enable these when your agent can\n * pause execution to request human input, approval, or feedback before\n * continuing.\n */\nexport const HumanInTheLoopCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n approvals: z.boolean().optional(),\n interventions: z.boolean().optional(),\n feedback: z.boolean().optional(),\n interrupts: z.boolean().optional(),\n approveWithEdits: z.boolean().optional(),\n});\n\n/**\n * A typed, categorized snapshot of an agent's current capabilities. All fields\n * are optional — agents only declare what they support. An omitted field means\n * the capability is not declared (unknown), not that it is unsupported. The\n * custom field is an escape hatch for integration-specific capabilities that\n * do not fit into the standard categories.\n */\nexport const AgentCapabilitiesSchema = z.looseObject({\n identity: IdentityCapabilitiesSchema.optional(),\n transport: TransportCapabilitiesSchema.optional(),\n tools: ToolsCapabilitiesSchema.optional(),\n output: OutputCapabilitiesSchema.optional(),\n state: StateCapabilitiesSchema.optional(),\n multiAgent: MultiAgentCapabilitiesSchema.optional(),\n reasoning: ReasoningCapabilitiesSchema.optional(),\n multimodal: MultimodalCapabilitiesSchema.optional(),\n execution: ExecutionCapabilitiesSchema.optional(),\n humanInTheLoop: HumanInTheLoopCapabilitiesSchema.optional(),\n custom: z\n .custom<\n Record<string, any>\n >((value) => typeof value === \"object\" && value !== null && !Array.isArray(value))\n .optional(),\n});\n\n/**\n * Composed into everything that can belong to a subagent's work: the events\n * that describe content or progress, the message types, and each interrupt.\n * Run-scoped events omit it — RUN_STARTED, RUN_FINISHED and RUN_ERROR describe\n * the run itself and MESSAGES_SNAPSHOT is conversation-wide, so none of them\n * can belong to one subagent. A tool call omits it too and inherits its\n * containing message's attribution.\n */\nexport const AttributableSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n});\n\n/**\n * The fields every event carries, whatever its type. Composed into each event\n * definition rather than repeated, so a change here reaches every event at\n * once.\n */\nexport const BaseEventSchema = z.looseObject({\n type: EventTypeSchema,\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * The fields shared by the developer, system, assistant and user messages.\n * Deliberately excludes content, because a user message's content may be an\n * array while the others are strings, and composition here intersects rather\n * than overrides: a base that constrained content to a string would make an\n * array content invalid. The tool, activity and reasoning messages do not\n * compose this, because they carry no name.\n */\nexport const BaseMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.string(),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n","// The `@ag-ui/core/schemas` subpath: the zod validators, and nothing else.\n// Type-only consumers import the main entry; runtime validation imports this.\n// Regenerate the generated source with `pnpm --filter @ag-ui/spec generate`.\n//\n// This is the ONLY entry of this package that touches zod, which is what lets\n// zod be an optional peer dependency: an application that never validates\n// never has to install it.\nimport { MetadataSchema } from \"./generated/schemas\";\n\nexport * from \"./generated/schemas\";\nexport { PROTOCOL_VERSION } from \"./generated/version\";\n\n/** The discriminated union of every event validator, under its historic name. */\nexport { EventSchema as EventSchemas } from \"./generated/schemas\";\n\n/**\n * The names the content part validators carried before 1.0 renamed the parts\n * (InputContent -> ContentPart, TextInputContent -> TextPart, and so on): the\n * same parts now sit on tool messages as well as user messages, so they are\n * named by what they are rather than by direction. The wire is unchanged —\n * every `type` value is the same — and so is every validator behind these\n * names; only the spelling moved. Kept for one release, see DEPRECATIONS.md.\n *\n * @deprecated Use the ...Part names.\n */\nexport {\n ContentPartSchema as InputContentSchema,\n TextPartSchema as TextInputContentSchema,\n ImagePartSchema as ImageInputContentSchema,\n AudioPartSchema as AudioInputContentSchema,\n VideoPartSchema as VideoInputContentSchema,\n DocumentPartSchema as DocumentInputContentSchema,\n PartSourceSchema as InputContentSourceSchema,\n DataSourceSchema as InputContentDataSourceSchema,\n UrlSourceSchema as InputContentUrlSourceSchema,\n} from \"./generated/schemas\";\n\n/**\n * Historic aliases for the media part validators: this package has always\n * also exported them as ...InputPart.\n */\nexport {\n ImagePartSchema as ImageInputPartSchema,\n AudioPartSchema as AudioInputPartSchema,\n VideoPartSchema as VideoInputPartSchema,\n DocumentPartSchema as DocumentInputPartSchema,\n} from \"./generated/schemas\";\n\n/**\n * How metadata is declared on events and messages.\n *\n * The object itself is absent or an object, never `null` — and parsing enforces\n * that invariant rather than coercing a `null` to absent. The schema pinning it\n * now lives in the generated source (MetadataSchema in\n * src/generated/schemas.ts); this comment survives as the recorded reasoning.\n *\n * Historically tolerated whole optional nulls are translated to absence in\n * the client's compatibility boundary before validation. That includes the\n * legacy `parentMessageId` and `outcome` cases and optional JSON fields such as\n * `rawEvent`, `result`, and media content-part `metadata`; see the repo-root\n * DEPRECATIONS.md for the exact list. Event and message metadata already\n * rejected a whole `null`, so their restriction remains. Compatibility for\n * media content-part metadata does not broaden this shared metadata schema.\n *\n * A `null` *value under a key* is meaningful data and is preserved. Only a\n * `null` in place of the whole object is a contract violation.\n */\nexport const OptionalMetadataSchema = MetadataSchema.optional();\n"],"mappings":";;;;;;;AAWA,MAAa,kBAAkBA,SAAE,KAAKC,0BAAU;;;;;;;;;AAUhD,MAAa,iBAAiBD,SAAE,QAC7B,UAAU,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM,CAChF;;;;;;;AAQD,MAAa,sBAAsBA,SAAE,QAAQ;;;;;AAM7C,MAAa,wBAAwBA,SAAE,KAAK;CAAC;CAAa;CAAU;CAAa;CAAO,CAAC;;;;;AAMzF,MAAa,8BAA8BA,SAAE,YAAY;CACvD,MAAMA,SAAE,QAAQC,0BAAU,mBAAmB;CAC7C,WAAWD,SAAE,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,UAAU;CAC1E,UAAUA,SACP,KAAK,CACL,QAAQ,UAAU,UAAU,KAAK,CACjC,UAAU;CACb,UAAU,eAAe,UAAU;CACnC,eAAe,oBAAoB,UAAU;CAC7C,WAAWA,SAAE,QAAQ;CACrB,MAAM,sBAAsB,UAAU;CACtC,MAAMA,SAAE,QAAQ,CAAC,UAAU;CAC5B,CAAC;;;;AAKF,MAAa,gCAAgCA,SAAE,YAAY;CACzD,MAAMA,SAAE,QAAQC,0BAAU,qBAAqB;CAC/C,WAAWD,SAAE,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,UAAU;CAC1E,UAAUA,SACP,KAAK,CACL,QAAQ,UAAU,UAAU,KAAK,CACjC,UAAU;CACb,UAAU,eAAe,UAAU;CACnC,eAAe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;;;;AAUF,MAAa,qBAAqBA,SAAE,YAAY,EAC9C,eAAe,oBAAoB,UAAU,EAC9C,CAAC;;;;;;AAOF,MAAa,kBAAkBA,SAAE,YAAY;CAC3C,MAAM;CACN,WAAWA,SAAE,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,UAAU;CAC1E,UAAUA,SACP,KAAK,CACL,QAAQ,UAAU,UAAU,KAAK,CACjC,UAAU;CACb,UAAU,eAAe,UAAU;CACpC,CAAC;;;;;;;;;AAUF,MAAa,oBAAoBA,SAAE,YAAY;CAC7C,eAAe,oBAAoB,UAAU;CAC7C,IAAIA,SAAE,QAAQ;CACd,MAAMA,SAAE,QAAQ;CAChB,MAAMA,SAAE,QAAQ,CAAC,UAAU;CAC3B,gBAAgBA,SAAE,QAAQ,CAAC,UAAU;CACrC,UAAU,eAAe,UAAU;CACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;AC1yCF,MAAa,yBAAyB,eAAe,UAAU"}
1
+ {"version":3,"file":"schemas.js","names":["z","EventType"],"sources":["../src/generated/schemas.ts","../src/schemas.ts"],"sourcesContent":["// @generated by spec/generator — DO NOT EDIT.\n// Source: https://ag-ui.com/spec/1.0/schema.json\n// Regenerate: pnpm --filter @ag-ui/spec generate\n/* eslint-disable */\n\nimport { z } from \"zod/v4\";\nimport { EventType } from \"./types\";\n\n/**\n * The discriminator carried by every event.\n */\nexport const EventTypeSchema = z.enum(EventType);\n\n/**\n * Extra information attached to an event, a message, a tool call, a tool, an\n * interrupt or a resume entry. Open by key: any JSON value is allowed under a\n * key, including null, because a null there is meaningful data. The object\n * itself may be absent but is never null when present. The key ag-ui is\n * reserved for the protocol's own use; reservation is by convention, since\n * validating the shape of a key's value would contradict being open by key.\n */\nexport const MetadataSchema = z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n);\n\n/**\n * An opaque handle for one subagent invocation, not a reusable name for a\n * subagent definition: two invocations of the same subagent carry two\n * different values. Named to mirror runId one level down, the way the\n * subagent's name mirrors agentId.\n */\nexport const SubagentRunIdSchema = z.string();\n\n/**\n * The roles a streamed text message may take. Excludes tool, which is carried\n * by TOOL_CALL_RESULT rather than streamed as text.\n */\nexport const TextMessageRoleSchema = z.enum([\"developer\", \"system\", \"assistant\", \"user\"]);\n\n/**\n * Opens a streamed text message. The content arrives as TEXT_MESSAGE_CONTENT\n * events and the message closes with TEXT_MESSAGE_END.\n */\nexport const TextMessageStartEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n role: TextMessageRoleSchema.optional(),\n name: z.string().optional(),\n});\n\n/**\n * Appends a fragment to a streamed text message.\n */\nexport const TextMessageContentEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_CONTENT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a streamed text message.\n */\nexport const TextMessageEndEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a start, content and end sequence, for\n * producers that cannot know in advance where a message begins. Every field is\n * optional because a continuation chunk omits what has not changed; which\n * message a field-less chunk continues is a sequence question the prose\n * specification answers.\n */\nexport const TextMessageChunkEventSchema = z.looseObject({\n type: z.literal(EventType.TEXT_MESSAGE_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string().optional(),\n role: TextMessageRoleSchema.optional(),\n delta: z.string().optional(),\n name: z.string().optional(),\n});\n\n/**\n * Opens a tool call. The arguments arrive as TOOL_CALL_ARGS events and the\n * call closes with TOOL_CALL_END.\n */\nexport const ToolCallStartEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n toolCallName: z.string(),\n parentMessageId: z.string().optional(),\n});\n\n/**\n * Appends a fragment of a tool call's arguments.\n */\nexport const ToolCallArgsEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_ARGS),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a tool call, meaning its arguments are complete.\n */\nexport const ToolCallEndEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a tool call's start, args and end sequence.\n * Every field is optional for the same reason as TEXT_MESSAGE_CHUNK.\n */\nexport const ToolCallChunkEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n toolCallId: z.string().optional(),\n toolCallName: z.string().optional(),\n parentMessageId: z.string().optional(),\n delta: z.string().optional(),\n});\n\n/**\n * A text part.\n */\nexport const TextPartSchema = z.looseObject({\n type: z.literal(\"text\"),\n id: z.string().optional(),\n text: z.string(),\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * Bytes carried inline.\n */\nexport const DataSourceSchema = z.looseObject({\n type: z.literal(\"data\"),\n value: z.string(),\n mimeType: z.string(),\n});\n\n/**\n * Bytes referenced by URL, fetched by whoever needs them.\n */\nexport const UrlSourceSchema = z.looseObject({\n type: z.literal(\"url\"),\n value: z.string(),\n mimeType: z.string().optional(),\n});\n\n/**\n * Bytes already at the provider, named by a handle the provider issued: an\n * OpenAI or Anthropic file id, a Gemini file URI, a storage URL only that\n * provider can read. No bytes travel and nothing is fetched. Only the provider\n * that minted the handle can resolve it; a peer that cannot drops the part as\n * it drops any part it cannot use.\n */\nexport const FileSourceSchema = z.looseObject({\n type: z.literal(\"file\"),\n value: z.string(),\n provider: z.string().optional(),\n mimeType: z.string().optional(),\n});\n\n/**\n * Where a media part's bytes come from: carried inline, referenced by URL, or\n * already at the provider under a handle it issued.\n */\nexport const PartSourceSchema = z.discriminatedUnion(\"type\", [\n DataSourceSchema,\n UrlSourceSchema,\n FileSourceSchema,\n]);\n\n/**\n * An image part.\n */\nexport const ImagePartSchema = z.looseObject({\n type: z.literal(\"image\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * An audio part.\n */\nexport const AudioPartSchema = z.looseObject({\n type: z.literal(\"audio\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * A video part.\n */\nexport const VideoPartSchema = z.looseObject({\n type: z.literal(\"video\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * A document part.\n */\nexport const DocumentPartSchema = z.looseObject({\n type: z.literal(\"document\"),\n id: z.string().optional(),\n source: PartSourceSchema,\n metadata: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n});\n\n/**\n * One part of a message body: what a person sends in a user message, or what a\n * tool returns in a tool message. Discriminated by type. Named by what the\n * part is rather than by direction, because the same part travels into the\n * model inside a user message and back out of the stream inside a tool result.\n */\nexport const ContentPartSchema = z.discriminatedUnion(\"type\", [\n TextPartSchema,\n ImagePartSchema,\n AudioPartSchema,\n VideoPartSchema,\n DocumentPartSchema,\n]);\n\n/**\n * Carries what a tool returned. Mints a tool message rather than appending to\n * an existing one, which is why it has its own messageId.\n */\nexport const ToolCallResultEventSchema = z.looseObject({\n type: z.literal(EventType.TOOL_CALL_RESULT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n toolCallId: z.string(),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n role: z.literal(\"tool\").optional(),\n});\n\n/**\n * Agent state. Any JSON value: the protocol carries state without interpreting\n * it, so an object, an array, a string and a number are all valid.\n */\nexport const StateSchema = z.any();\n\n/**\n * Replaces the agent state wholesale. Sent when a delta cannot express the\n * change, or to resynchronise a consumer.\n */\nexport const StateSnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.STATE_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n snapshot: StateSchema.refine((value) => value !== undefined),\n});\n\n/**\n * A JSON Pointer as defined by RFC 6901. Either the empty string, meaning the\n * whole document, or a sequence of slash-prefixed reference tokens in which a\n * tilde is escaped as ~0 and a slash as ~1. A value with no leading slash, or\n * a tilde followed by anything other than 0 or 1, is not a JSON Pointer.\n */\nexport const JsonPointerSchema = z.string().regex(new RegExp(\"^(/([^/~]|~[01])*)*$\"));\n\n/**\n * Inserts value at path. RFC 6902 section 4.1.\n */\nexport const AddOperationSchema = z\n .looseObject({\n op: z.literal(\"add\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * Removes the value at path. RFC 6902 section 4.2.\n */\nexport const RemoveOperationSchema = z\n .looseObject({\n op: z.literal(\"remove\"),\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Replaces the value at path. RFC 6902 section 4.3.\n */\nexport const ReplaceOperationSchema = z\n .looseObject({\n op: z.literal(\"replace\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * Moves the value at from to path. RFC 6902 section 4.4.\n */\nexport const MoveOperationSchema = z\n .looseObject({\n op: z.literal(\"move\"),\n from: JsonPointerSchema,\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Copies the value at from to path. RFC 6902 section 4.5.\n */\nexport const CopyOperationSchema = z\n .looseObject({\n op: z.literal(\"copy\"),\n from: JsonPointerSchema,\n path: JsonPointerSchema,\n })\n .meta({ specOpen: true });\n\n/**\n * Asserts that the value at path equals value. RFC 6902 section 4.6.\n */\nexport const TestOperationSchema = z\n .looseObject({\n op: z.literal(\"test\"),\n path: JsonPointerSchema,\n value: z.any().refine((value) => value !== undefined),\n })\n .meta({ specOpen: true });\n\n/**\n * A single RFC 6902 operation. Exactly one of the operation shapes must match,\n * discriminated by op. Unlike the protocol's own objects, the operations are\n * open: RFC 6902 section 4 requires members an operation does not define to be\n * ignored rather than rejected, so a remove carrying a leftover value is a\n * valid patch. Two of the RFC's rules are relations between values rather than\n * shapes, so no static schema can express them and neither is checked here: a\n * move whose from is a proper prefix of its path (section 4.4), and any\n * operation whose pointer does not resolve in the target document. Both are\n * the applier's to reject.\n */\nexport const JsonPatchOperationSchema = z.discriminatedUnion(\"op\", [\n AddOperationSchema,\n RemoveOperationSchema,\n ReplaceOperationSchema,\n MoveOperationSchema,\n CopyOperationSchema,\n TestOperationSchema,\n]);\n\n/**\n * A JSON Patch document as defined by RFC 6902, referenced by\n * STATE_DELTA.delta and ACTIVITY_DELTA.patch: an ordered sequence of\n * operations applied to a target document. An empty array is a valid no-op\n * patch. Whether the operations actually apply to the document they target is\n * a runtime question RFC 6902 leaves to the applier; structural validity here\n * says nothing about it.\n */\nexport const JsonPatchSchema = z.array(JsonPatchOperationSchema);\n\n/**\n * Changes the agent state incrementally.\n */\nexport const StateDeltaEventSchema = z.looseObject({\n type: z.literal(EventType.STATE_DELTA),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n delta: JsonPatchSchema,\n});\n\n/**\n * Instructions from the application developer.\n */\nexport const DeveloperMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"developer\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string(),\n});\n\n/**\n * Instructions from the system.\n */\nexport const SystemMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"system\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string(),\n});\n\n/**\n * The name and arguments of a tool call.\n */\nexport const FunctionCallSchema = z.looseObject({\n name: z.string(),\n arguments: z.string(),\n});\n\n/**\n * A call an assistant message made. Carries no subagent attribution of its own\n * and inherits its containing message's, since several calls can share one\n * parent.\n */\nexport const ToolCallSchema = z.looseObject({\n id: z.string(),\n type: z.literal(\"function\"),\n function: FunctionCallSchema,\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A message from the agent. Content is optional because a turn may consist\n * only of tool calls.\n */\nexport const AssistantMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"assistant\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.string().optional(),\n toolCalls: z.array(ToolCallSchema).optional(),\n});\n\n/**\n * A message from the person using the application.\n */\nexport const UserMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"user\"),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n});\n\n/**\n * What a tool returned, as a message in the conversation. Stands alone rather\n * than composing BaseMessage, because it carries no name.\n */\nexport const ToolMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"tool\"),\n content: z.union([z.string(), z.array(ContentPartSchema)]),\n toolCallId: z.string(),\n error: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Structured progress that is not conversation content, materialised as a\n * message so it keeps its place in the sequence. Stands alone rather than\n * composing BaseMessage, because its content is an object rather than a\n * string.\n */\nexport const ActivityMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"activity\"),\n activityType: z.string(),\n content: z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n ),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A span of the agent's reasoning, materialised as a message. Stands alone\n * rather than composing BaseMessage, because it carries no name.\n */\nexport const ReasoningMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.literal(\"reasoning\"),\n content: z.string(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Any message in a conversation. Discriminated by role.\n */\nexport const MessageSchema = z.discriminatedUnion(\"role\", [\n DeveloperMessageSchema,\n SystemMessageSchema,\n AssistantMessageSchema,\n UserMessageSchema,\n ToolMessageSchema,\n ActivityMessageSchema,\n ReasoningMessageSchema,\n]);\n\n/**\n * The complete set of messages the producer owns, in order. Conversation-wide\n * rather than a plain overwrite: a consumer may keep messages of its own that\n * no producer tracks, so exactly how a snapshot reconciles with those is\n * behavioural and belongs in the prose. Being conversation-wide it cannot\n * belong to a single subagent, so it carries no attribution; it does establish\n * which subagent owns each message it contains, through the messages\n * themselves.\n */\nexport const MessagesSnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.MESSAGES_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n messages: z.array(MessageSchema),\n});\n\n/**\n * Reports structured progress that is not conversation content, such as a step\n * a UI renders as its own widget.\n */\nexport const ActivitySnapshotEventSchema = z.looseObject({\n type: z.literal(EventType.ACTIVITY_SNAPSHOT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n activityType: z.string(),\n content: z.custom<Record<string, any>>(\n (value) => typeof value === \"object\" && value !== null && !Array.isArray(value),\n ),\n replace: z.boolean().optional(),\n});\n\n/**\n * Changes an activity message's content incrementally.\n */\nexport const ActivityDeltaEventSchema = z.looseObject({\n type: z.literal(EventType.ACTIVITY_DELTA),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n activityType: z.string(),\n patch: JsonPatchSchema,\n});\n\n/**\n * Passes a provider-native event through untranslated, for consumers that need\n * detail the protocol does not model.\n */\nexport const RawEventSchema = z.looseObject({\n type: z.literal(EventType.RAW),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n event: z.any().refine((value) => value !== undefined),\n source: z.string().optional(),\n});\n\n/**\n * The protocol's extension point for an application's own events. Anything a\n * consumer does with one is outside the protocol.\n */\nexport const CustomEventSchema = z.looseObject({\n type: z.literal(EventType.CUSTOM),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n name: z.string(),\n value: z.any().refine((value) => value !== undefined),\n});\n\n/**\n * A tool the agent may call.\n */\nexport const ToolSchema = z.looseObject({\n name: z.string(),\n description: z.string(),\n parameters: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A named piece of ambient information given to the agent for the run,\n * distinct from the conversation.\n */\nexport const ContextSchema = z.looseObject({\n description: z.string(),\n value: z.string(),\n});\n\n/**\n * An answer to one interrupt, sent on the run that continues from it.\n */\nexport const ResumeEntrySchema = z.looseObject({\n interruptId: z.string(),\n status: z.enum([\"resolved\", \"cancelled\"]),\n payload: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * A request to run an agent. Also echoed back as RUN_STARTED.input. Only\n * threadId, runId and messages are required: those are the three the SDKs\n * already agree on, and for tools and context an absent key and an empty array\n * mean the same thing, so requiring them would catch nothing a producer could\n * get wrong.\n */\nexport const RunAgentInputSchema = z.looseObject({\n threadId: z.string(),\n runId: z.string(),\n protocolVersion: z.string().optional(),\n parentRunId: z.string().optional(),\n state: StateSchema.refine((value) => value !== null)\n .nullable()\n .transform((value) => value ?? undefined)\n .optional(),\n messages: z.array(MessageSchema),\n tools: z.array(ToolSchema).default(() => []),\n context: z.array(ContextSchema).default(() => []),\n forwardedProps: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n resume: z.array(ResumeEntrySchema).optional(),\n});\n\n/**\n * Opens a run. Run-scoped, so it carries no subagent attribution.\n */\nexport const RunStartedEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n threadId: z.string(),\n runId: z.string(),\n protocolVersion: z.string().optional(),\n parentRunId: z.string().optional(),\n input: RunAgentInputSchema.optional(),\n});\n\n/**\n * The run completed. Equivalent to an absent outcome. Closed like every other\n * object, which is also what keeps it from carrying the suspended sibling's\n * interrupts — a success with an interrupt still pending would be a\n * contradiction, not an extension. A completed run may still have left\n * frontend tool calls for the application to answer; pendingToolCallIds names\n * them.\n */\nexport const RunFinishedSuccessOutcomeSchema = z.looseObject({\n type: z.literal(\"success\"),\n pendingToolCallIds: z.array(z.string()).optional(),\n});\n\n/**\n * Something a run needs from outside before it can continue, such as an\n * approval or a missing value.\n */\nexport const InterruptSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n reason: z.string(),\n message: z.string().optional(),\n toolCallId: z.string().optional(),\n responseSchema: z\n .custom<\n Record<string, any>\n >((value) => typeof value === \"object\" && value !== null && !Array.isArray(value))\n .optional(),\n expiresAt: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * The run is paused, waiting for something outside it. Resuming means starting\n * a new run whose resume entries answer these interrupts.\n */\nexport const RunFinishedInterruptOutcomeSchema = z.looseObject({\n type: z.literal(\"interrupt\"),\n interrupts: z.array(InterruptSchema).min(1),\n});\n\n/**\n * The run was stopped before it completed, by whoever was running it, and did\n * not fail. Neither success nor interrupt: nothing was produced as a result,\n * and nothing is waited for, so the next run on the thread is an ordinary new\n * run rather than a resume. Closed like its siblings: a cancelled run has no\n * interrupts to carry. Named in the schema before 1.0 because an outcome a\n * consumer does not recognise is stripped and read as success — a cancellation\n * added later would reach every 1.0 consumer as a completed run.\n */\nexport const RunFinishedCancelledOutcomeSchema = z.looseObject({\n type: z.literal(\"cancelled\"),\n});\n\n/**\n * Why a run ended.\n */\nexport const RunFinishedOutcomeSchema = z.discriminatedUnion(\"type\", [\n RunFinishedSuccessOutcomeSchema,\n RunFinishedInterruptOutcomeSchema,\n RunFinishedCancelledOutcomeSchema,\n]);\n\n/**\n * Token counts for one provider and model, in the protocol's own accounting:\n * every count is either a total or a named part of one, so entries from\n * different providers add up without double-counting. inputTokens and\n * outputTokens are the totals; reasoningTokens, cachedInputTokens and\n * cacheWriteInputTokens are parts of them, never additions to them;\n * totalTokens is the two totals summed. Every field is a label or a number —\n * nothing content-bearing or identifying, no prompts, completions, messages,\n * or thread, run and user identifiers.\n */\nexport const TokenUsageSchema = z.looseObject({\n provider: z.string().optional(),\n model: z.string().optional(),\n inputTokens: z.int().min(0).max(9007199254740991).optional(),\n outputTokens: z.int().min(0).max(9007199254740991).optional(),\n totalTokens: z.int().min(0).max(9007199254740991).optional(),\n reasoningTokens: z.int().min(0).max(9007199254740991).optional(),\n cachedInputTokens: z.int().min(0).max(9007199254740991).optional(),\n cacheWriteInputTokens: z.int().min(0).max(9007199254740991).optional(),\n});\n\n/**\n * Closes a run that did not fail. Run-scoped, so it carries no subagent\n * attribution.\n */\nexport const RunFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n threadId: z.string(),\n runId: z.string(),\n result: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n outcome: RunFinishedOutcomeSchema.optional(),\n usage: z.array(TokenUsageSchema).optional(),\n});\n\n/**\n * Ends a run that failed. Run-scoped, so it carries no subagent attribution; a\n * subagent that fails without ending the run reports SUBAGENT_ERROR instead.\n */\nexport const RunErrorEventSchema = z.looseObject({\n type: z.literal(EventType.RUN_ERROR),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n message: z.string(),\n code: z.string().optional(),\n usage: z.array(TokenUsageSchema).optional(),\n});\n\n/**\n * Opens a named step within a run, for producers whose frameworks have a step\n * concept worth surfacing.\n */\nexport const StepStartedEventSchema = z.looseObject({\n type: z.literal(EventType.STEP_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n stepName: z.string(),\n});\n\n/**\n * Closes a named step.\n */\nexport const StepFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.STEP_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n stepName: z.string(),\n});\n\n/**\n * Opens a span of reasoning. A span may contain several reasoning messages.\n */\nexport const ReasoningStartEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * Opens a streamed reasoning message.\n */\nexport const ReasoningMessageStartEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_START),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n role: z.literal(\"reasoning\"),\n});\n\n/**\n * Appends a fragment to a streamed reasoning message.\n */\nexport const ReasoningMessageContentEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_CONTENT),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n delta: z.string(),\n});\n\n/**\n * Closes a streamed reasoning message.\n */\nexport const ReasoningMessageEndEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * A shorthand that stands in for a reasoning message's start, content and end\n * sequence.\n */\nexport const ReasoningMessageChunkEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_MESSAGE_CHUNK),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string().optional(),\n delta: z.string().optional(),\n});\n\n/**\n * Closes a span of reasoning.\n */\nexport const ReasoningEndEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_END),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n messageId: z.string(),\n});\n\n/**\n * Whether a REASONING_ENCRYPTED_VALUE belongs to a message or to a tool call.\n */\nexport const ReasoningEncryptedValueSubtypeSchema = z.enum([\"tool-call\", \"message\"]);\n\n/**\n * Carries a provider's opaque, encrypted reasoning artefact, which a consumer\n * stores and returns on a later turn without being able to read it.\n */\nexport const ReasoningEncryptedValueEventSchema = z.looseObject({\n type: z.literal(EventType.REASONING_ENCRYPTED_VALUE),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema.optional(),\n subtype: ReasoningEncryptedValueSubtypeSchema,\n entityId: z.string(),\n encryptedValue: z.string(),\n});\n\n/**\n * Announces that a subagent invocation has begun. Everything the subagent\n * produces afterwards is attributed by carrying its subagentRunId, so a\n * consumer can group the work without replaying the stream. Composed from\n * BaseEvent alone rather than Attributable, because here subagentRunId\n * identifies the subagent rather than attributing the event to one;\n * attribution to an enclosing subagent is parentSubagentRunId.\n */\nexport const SubagentStartedEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_STARTED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n name: z.string(),\n description: z.string().optional(),\n parentSubagentRunId: SubagentRunIdSchema.optional(),\n parentToolCallId: z.string().optional(),\n parentMessageId: z.string().optional(),\n});\n\n/**\n * The subagent completed its work. Equivalent to an absent outcome.\n */\nexport const SubagentFinishedSuccessOutcomeSchema = z.looseObject({\n type: z.literal(\"success\"),\n});\n\n/**\n * The subagent is paused awaiting outside input. Terminal for this stream, not\n * for the subagent: a later run may continue the same invocation once the\n * interrupts are answered.\n */\nexport const SubagentFinishedSuspendedOutcomeSchema = z.looseObject({\n type: z.literal(\"suspended\"),\n interruptIds: z.array(z.string()).optional(),\n});\n\n/**\n * Why a subagent's segment of a run ended. Mirrors RunFinishedOutcome one\n * level down.\n */\nexport const SubagentFinishedOutcomeSchema = z.discriminatedUnion(\"type\", [\n SubagentFinishedSuccessOutcomeSchema,\n SubagentFinishedSuspendedOutcomeSchema,\n]);\n\n/**\n * Ends a subagent invocation's segment of this run, either because the work\n * completed or because it is suspended awaiting outside input.\n */\nexport const SubagentFinishedEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_FINISHED),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n result: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n outcome: SubagentFinishedOutcomeSchema.optional(),\n});\n\n/**\n * Reports that a subagent invocation failed. The run may continue: a parent\n * agent is free to handle a failed subagent, which is why this is not\n * RUN_ERROR.\n */\nexport const SubagentErrorEventSchema = z.looseObject({\n type: z.literal(EventType.SUBAGENT_ERROR),\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n subagentRunId: SubagentRunIdSchema,\n message: z.string(),\n code: z.string().optional(),\n});\n\n/**\n * Any AG-UI event. Every member is normative: there is no optional tier and no\n * event a consumer may decline to implement. Discriminated by the type\n * property.\n */\nexport const EventSchema = z.discriminatedUnion(\"type\", [\n TextMessageStartEventSchema,\n TextMessageContentEventSchema,\n TextMessageEndEventSchema,\n TextMessageChunkEventSchema,\n ToolCallStartEventSchema,\n ToolCallArgsEventSchema,\n ToolCallEndEventSchema,\n ToolCallChunkEventSchema,\n ToolCallResultEventSchema,\n StateSnapshotEventSchema,\n StateDeltaEventSchema,\n MessagesSnapshotEventSchema,\n ActivitySnapshotEventSchema,\n ActivityDeltaEventSchema,\n RawEventSchema,\n CustomEventSchema,\n RunStartedEventSchema,\n RunFinishedEventSchema,\n RunErrorEventSchema,\n StepStartedEventSchema,\n StepFinishedEventSchema,\n ReasoningStartEventSchema,\n ReasoningMessageStartEventSchema,\n ReasoningMessageContentEventSchema,\n ReasoningMessageEndEventSchema,\n ReasoningMessageChunkEventSchema,\n ReasoningEndEventSchema,\n ReasoningEncryptedValueEventSchema,\n SubagentStartedEventSchema,\n SubagentFinishedEventSchema,\n SubagentErrorEventSchema,\n]);\n\n/**\n * Every role a materialised message may have.\n */\nexport const RoleSchema = z.enum([\n \"developer\",\n \"system\",\n \"assistant\",\n \"user\",\n \"tool\",\n \"activity\",\n \"reasoning\",\n]);\n\n/**\n * Describes a subagent that can be invoked by a parent agent.\n */\nexport const SubagentInfoSchema = z.looseObject({\n name: z.string(),\n description: z.string().optional(),\n});\n\n/**\n * Basic metadata about the agent. Useful for discovery UIs, agent\n * marketplaces, and debugging. Set these when you want clients to display\n * agent information or when multiple agents are available and users need to\n * pick one.\n */\nexport const IdentityCapabilitiesSchema = z.looseObject({\n name: z.string().optional(),\n type: z.string().optional(),\n description: z.string().optional(),\n version: z.string().optional(),\n provider: z.string().optional(),\n documentationUrl: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * Declares which transport mechanisms the agent supports. Clients use this to\n * pick the best connection strategy. Only set flags to true for transports\n * your agent actually handles — omit or set false for unsupported ones.\n */\nexport const TransportCapabilitiesSchema = z.looseObject({\n streaming: z.boolean().optional(),\n websocket: z.boolean().optional(),\n httpBinary: z.boolean().optional(),\n pushNotifications: z.boolean().optional(),\n resumable: z.boolean().optional(),\n});\n\n/**\n * Tool calling capabilities. Distinguishes between tools the agent itself\n * provides (listed in items) and tools the client passes at runtime via\n * RunAgentInput.tools. Enable this when your agent can call functions, search\n * the web, execute code, etc.\n */\nexport const ToolsCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n items: z.array(ToolSchema).optional(),\n parallelCalls: z.boolean().optional(),\n clientProvided: z.boolean().optional(),\n});\n\n/**\n * Output format support. Enable structuredOutput when your agent can return\n * responses conforming to a JSON schema, which is useful for programmatic\n * consumption.\n */\nexport const OutputCapabilitiesSchema = z.looseObject({\n structuredOutput: z.boolean().optional(),\n supportedMimeTypes: z.array(z.string()).optional(),\n});\n\n/**\n * State and memory management capabilities. These tell the client how the\n * agent handles shared state and whether conversation context persists across\n * runs.\n */\nexport const StateCapabilitiesSchema = z.looseObject({\n snapshots: z.boolean().optional(),\n deltas: z.boolean().optional(),\n memory: z.boolean().optional(),\n persistentState: z.boolean().optional(),\n});\n\n/**\n * Multi-agent coordination capabilities. Enable these when your agent can\n * orchestrate or hand off work to other agents.\n */\nexport const MultiAgentCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n delegation: z.boolean().optional(),\n handoffs: z.boolean().optional(),\n subagents: z.array(SubagentInfoSchema).optional(),\n});\n\n/**\n * Reasoning and thinking capabilities. Enable these when your agent exposes\n * its internal thought process (e.g., chain-of-thought, extended thinking).\n */\nexport const ReasoningCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n streaming: z.boolean().optional(),\n encrypted: z.boolean().optional(),\n});\n\n/**\n * Modalities the agent can accept as input. Clients use this to show or hide\n * file upload buttons, audio recorders, image pickers, etc.\n */\nexport const MultimodalInputCapabilitiesSchema = z.looseObject({\n image: z.boolean().optional(),\n audio: z.boolean().optional(),\n video: z.boolean().optional(),\n pdf: z.boolean().optional(),\n file: z.boolean().optional(),\n});\n\n/**\n * Modalities the agent can produce as output. Clients use this to anticipate\n * rich content in the agent's response.\n */\nexport const MultimodalOutputCapabilitiesSchema = z.looseObject({\n image: z.boolean().optional(),\n audio: z.boolean().optional(),\n});\n\n/**\n * Multimodal input and output support. Organized into input and output\n * sub-objects so clients can independently query what the agent accepts versus\n * what it produces.\n */\nexport const MultimodalCapabilitiesSchema = z.looseObject({\n input: MultimodalInputCapabilitiesSchema.optional(),\n output: MultimodalOutputCapabilitiesSchema.optional(),\n});\n\n/**\n * Execution control and limits. Declare these so clients can set expectations\n * about how long or how many steps an agent run might take.\n */\nexport const ExecutionCapabilitiesSchema = z.looseObject({\n codeExecution: z.boolean().optional(),\n sandboxed: z.boolean().optional(),\n maxIterations: z.int().min(0).max(9007199254740991).optional(),\n maxExecutionTime: z.int().min(0).max(9007199254740991).optional(),\n});\n\n/**\n * Human-in-the-loop interaction support. Enable these when your agent can\n * pause execution to request human input, approval, or feedback before\n * continuing.\n */\nexport const HumanInTheLoopCapabilitiesSchema = z.looseObject({\n supported: z.boolean().optional(),\n approvals: z.boolean().optional(),\n interventions: z.boolean().optional(),\n feedback: z.boolean().optional(),\n interrupts: z.boolean().optional(),\n approveWithEdits: z.boolean().optional(),\n});\n\n/**\n * A typed, categorized snapshot of an agent's current capabilities. All fields\n * are optional — agents only declare what they support. An omitted field means\n * the capability is not declared (unknown), not that it is unsupported. The\n * custom field is an escape hatch for integration-specific capabilities that\n * do not fit into the standard categories.\n */\nexport const AgentCapabilitiesSchema = z.looseObject({\n identity: IdentityCapabilitiesSchema.optional(),\n transport: TransportCapabilitiesSchema.optional(),\n tools: ToolsCapabilitiesSchema.optional(),\n output: OutputCapabilitiesSchema.optional(),\n state: StateCapabilitiesSchema.optional(),\n multiAgent: MultiAgentCapabilitiesSchema.optional(),\n reasoning: ReasoningCapabilitiesSchema.optional(),\n multimodal: MultimodalCapabilitiesSchema.optional(),\n execution: ExecutionCapabilitiesSchema.optional(),\n humanInTheLoop: HumanInTheLoopCapabilitiesSchema.optional(),\n custom: z\n .custom<\n Record<string, any>\n >((value) => typeof value === \"object\" && value !== null && !Array.isArray(value))\n .optional(),\n});\n\n/**\n * Composed into everything that can belong to a subagent's work: the events\n * that describe content or progress, the message types, and each interrupt.\n * Run-scoped events omit it — RUN_STARTED, RUN_FINISHED and RUN_ERROR describe\n * the run itself and MESSAGES_SNAPSHOT is conversation-wide, so none of them\n * can belong to one subagent. A tool call omits it too and inherits its\n * containing message's attribution.\n */\nexport const AttributableSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n});\n\n/**\n * The fields every event carries, whatever its type. Composed into each event\n * definition rather than repeated, so a change here reaches every event at\n * once.\n */\nexport const BaseEventSchema = z.looseObject({\n type: EventTypeSchema,\n timestamp: z.int().min(-9007199254740991).max(9007199254740991).optional(),\n rawEvent: z\n .any()\n .refine((value) => value !== null)\n .optional(),\n metadata: MetadataSchema.optional(),\n});\n\n/**\n * The fields shared by the developer, system, assistant and user messages.\n * Deliberately excludes content, because a user message's content may be an\n * array while the others are strings, and composition here intersects rather\n * than overrides: a base that constrained content to a string would make an\n * array content invalid. The tool, activity and reasoning messages do not\n * compose this, because they carry no name.\n */\nexport const BaseMessageSchema = z.looseObject({\n subagentRunId: SubagentRunIdSchema.optional(),\n id: z.string(),\n role: z.string(),\n name: z.string().optional(),\n encryptedValue: z.string().optional(),\n metadata: MetadataSchema.optional(),\n});\n","// The `@ag-ui/core/schemas` subpath: the zod validators, and nothing else.\n// Type-only consumers import the main entry; runtime validation imports this.\n// Regenerate the generated source with `pnpm --filter @ag-ui/spec generate`.\n//\n// This is the ONLY entry of this package that touches zod, which is what lets\n// zod be an optional peer dependency: an application that never validates\n// never has to install it.\nimport { MetadataSchema } from \"./generated/schemas\";\n\nexport * from \"./generated/schemas\";\nexport { PROTOCOL_VERSION } from \"./generated/version\";\n\n/** The discriminated union of every event validator, under its historic name. */\nexport { EventSchema as EventSchemas } from \"./generated/schemas\";\n\n/**\n * The names the content part validators carried before 1.0 renamed the parts\n * (InputContent -> ContentPart, TextInputContent -> TextPart, and so on): the\n * same parts now sit on tool messages as well as user messages, so they are\n * named by what they are rather than by direction. The wire is unchanged —\n * every `type` value is the same — and so is every validator behind these\n * names; only the spelling moved. Kept for one release, see DEPRECATIONS.md.\n *\n * @deprecated Use the ...Part names.\n */\nexport {\n ContentPartSchema as InputContentSchema,\n TextPartSchema as TextInputContentSchema,\n ImagePartSchema as ImageInputContentSchema,\n AudioPartSchema as AudioInputContentSchema,\n VideoPartSchema as VideoInputContentSchema,\n DocumentPartSchema as DocumentInputContentSchema,\n PartSourceSchema as InputContentSourceSchema,\n DataSourceSchema as InputContentDataSourceSchema,\n UrlSourceSchema as InputContentUrlSourceSchema,\n} from \"./generated/schemas\";\n\n/**\n * Historic aliases for the media part validators: this package has always\n * also exported them as ...InputPart.\n */\nexport {\n ImagePartSchema as ImageInputPartSchema,\n AudioPartSchema as AudioInputPartSchema,\n VideoPartSchema as VideoInputPartSchema,\n DocumentPartSchema as DocumentInputPartSchema,\n} from \"./generated/schemas\";\n\n/**\n * How metadata is declared on events and messages.\n *\n * The object itself is absent or an object, never `null` — and parsing enforces\n * that invariant rather than coercing a `null` to absent. The schema pinning it\n * now lives in the generated source (MetadataSchema in\n * src/generated/schemas.ts); this comment survives as the recorded reasoning.\n *\n * Historically tolerated whole optional nulls are translated to absence in\n * the client's compatibility boundary before validation. That includes the\n * legacy `parentMessageId` and `outcome` cases and optional JSON fields such as\n * `rawEvent`, `result`, and media content-part `metadata`; see the repo-root\n * DEPRECATIONS.md for the exact list. Event and message metadata already\n * rejected a whole `null`, so their restriction remains. Compatibility for\n * media content-part metadata does not broaden this shared metadata schema.\n *\n * A `null` *value under a key* is meaningful data and is preserved. Only a\n * `null` in place of the whole object is a contract violation.\n */\nexport const OptionalMetadataSchema = MetadataSchema.optional();\n"],"mappings":";;;;;;;AAWA,MAAa,kBAAkBA,SAAE,KAAKC,0BAAU;;;;;;;;;AAUhD,MAAa,iBAAiBD,SAAE,QAC7B,UAAU,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM,CAChF;;;;;;;AAQD,MAAa,sBAAsBA,SAAE,QAAQ;;;;;AAM7C,MAAa,wBAAwBA,SAAE,KAAK;CAAC;CAAa;CAAU;CAAa;CAAO,CAAC;;;;;AAMzF,MAAa,8BAA8BA,SAAE,YAAY;CACvD,MAAMA,SAAE,QAAQC,0BAAU,mBAAmB;CAC7C,WAAWD,SAAE,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,UAAU;C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C,kBAAkBA,SAAE,SAAS,CAAC,UAAU;CACzC,CAAC;;;;;;;;AASF,MAAa,0BAA0BA,SAAE,YAAY;CACnD,UAAU,2BAA2B,UAAU;CAC/C,WAAW,4BAA4B,UAAU;CACjD,OAAO,wBAAwB,UAAU;CACzC,QAAQ,yBAAyB,UAAU;CAC3C,OAAO,wBAAwB,UAAU;CACzC,YAAY,6BAA6B,UAAU;CACnD,WAAW,4BAA4B,UAAU;CACjD,YAAY,6BAA6B,UAAU;CACnD,WAAW,4BAA4B,UAAU;CACjD,gBAAgB,iCAAiC,UAAU;CAC3D,QAAQA,SACL,QAEE,UAAU,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,MAAM,CAAC,CACjF,UAAU;CACd,CAAC;;;;;;;;;AAUF,MAAa,qBAAqBA,SAAE,YAAY,EAC9C,eAAe,oBAAoB,UAAU,EAC9C,CAAC;;;;;;AAOF,MAAa,kBAAkBA,SAAE,YAAY;CAC3C,MAAM;CACN,WAAWA,SAAE,KAAK,CAAC,IAAI,kBAAkB,CAAC,IAAI,iBAAiB,CAAC,UAAU;CAC1E,UAAUA,SACP,KAAK,CACL,QAAQ,UAAU,UAAU,KAAK,CACjC,UAAU;CACb,UAAU,eAAe,UAAU;CACpC,CAAC;;;;;;;;;AAUF,MAAa,oBAAoBA,SAAE,YAAY;CAC7C,eAAe,oBAAoB,UAAU;CAC7C,IAAIA,SAAE,QAAQ;CACd,MAAMA,SAAE,QAAQ;CAChB,MAAMA,SAAE,QAAQ,CAAC,UAAU;CAC3B,gBAAgBA,SAAE,QAAQ,CAAC,UAAU;CACrC,UAAU,eAAe,UAAU;CACpC,CAAC;;;;;;;;;;;;;;;;;;;;;;;AC1yCF,MAAa,yBAAyB,eAAe,UAAU"}
package/dist/schemas.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as EventType, t as PROTOCOL_VERSION } from "./version-DQ7V2LqS.mjs";
1
+ import { n as EventType, t as PROTOCOL_VERSION } from "./version-CTNE2I0_.mjs";
2
2
  import { z } from "zod/v4";
3
3
 
4
4
  //#region src/generated/schemas.ts