import { type AsyncIterableStream, type ChunkDetector, type StreamTextTransform, type TextStreamPart, type ToolSet, type UIMessageChunk } from "ai"; import { type ProviderOptions, type StreamArgs, type StreamMessage } from "../validators.js"; import type { ActionCtx, AgentComponent, MutationCtx, QueryCtx, SyncStreamsReturnValue } from "./types.js"; export declare const vStreamMessagesReturnValue: import("convex/values").VObject<{ splitCursor?: string | null | undefined; pageStatus?: "SplitRecommended" | "SplitRequired" | null | undefined; streams?: { messages: { userId?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; format?: "UIMessageChunk" | "TextStreamPart" | undefined; status: "streaming" | "finished" | "aborted"; order: number; stepOrder: number; streamId: string; }[]; kind: "list"; } | { kind: "deltas"; deltas: { streamId: string; start: number; end: number; parts: any[]; }[]; } | undefined; page: { id?: string | undefined; userId?: string | undefined; embeddingId?: string | undefined; fileIds?: string[] | undefined; error?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; message?: { providerOptions?: Record> | undefined; role: "user"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[]; } | { providerOptions?: Record> | undefined; role: "assistant"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[]; } | { providerOptions?: Record> | undefined; role: "tool"; content: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[]; } | { providerOptions?: Record> | undefined; role: "system"; content: string; } | undefined; text?: string | undefined; providerMetadata?: Record> | undefined; reasoning?: string | undefined; usage?: { reasoningTokens?: number | undefined; cachedInputTokens?: number | undefined; promptTokens: number; completionTokens: number; totalTokens: number; } | undefined; sources?: ({ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; })[] | undefined; warnings?: ({ details?: string | undefined; type: "unsupported-setting"; setting: string; } | { details?: string | undefined; type: "unsupported-tool"; tool: any; } | { type: "other"; message: string; })[] | undefined; finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined; reasoningDetails?: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { signature?: string | undefined; type: "text"; text: string; } | { type: "redacted"; data: string; })[] | undefined; status: "pending" | "success" | "failed"; order: number; _creationTime: number; threadId: string; stepOrder: number; tool: boolean; _id: string; }[]; continueCursor: string; isDone: boolean; }, { streams: import("convex/values").VUnion<{ messages: { userId?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; format?: "UIMessageChunk" | "TextStreamPart" | undefined; status: "streaming" | "finished" | "aborted"; order: number; stepOrder: number; streamId: string; }[]; kind: "list"; } | { kind: "deltas"; deltas: { streamId: string; start: number; end: number; parts: any[]; }[]; } | undefined, [import("convex/values").VObject<{ messages: { userId?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; format?: "UIMessageChunk" | "TextStreamPart" | undefined; status: "streaming" | "finished" | "aborted"; order: number; stepOrder: number; streamId: string; }[]; kind: "list"; }, { kind: import("convex/values").VLiteral<"list", "required">; messages: import("convex/values").VArray<{ userId?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; format?: "UIMessageChunk" | "TextStreamPart" | undefined; status: "streaming" | "finished" | "aborted"; order: number; stepOrder: number; streamId: string; }[], import("convex/values").VObject<{ userId?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; format?: "UIMessageChunk" | "TextStreamPart" | undefined; status: "streaming" | "finished" | "aborted"; order: number; stepOrder: number; streamId: string; }, { streamId: import("convex/values").VString; status: import("convex/values").VUnion<"streaming" | "finished" | "aborted", [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"finished", "required">, import("convex/values").VLiteral<"aborted", "required">], "required", never>; format: import("convex/values").VUnion<"UIMessageChunk" | "TextStreamPart" | undefined, [import("convex/values").VLiteral<"UIMessageChunk", "required">, import("convex/values").VLiteral<"TextStreamPart", "required">], "optional", never>; order: import("convex/values").VFloat64; stepOrder: import("convex/values").VFloat64; userId: import("convex/values").VString; agentName: import("convex/values").VString; model: import("convex/values").VString; provider: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "status" | "userId" | "order" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "format" | "streamId">, "required">; }, "required", "messages" | "kind">, import("convex/values").VObject<{ kind: "deltas"; deltas: { streamId: string; start: number; end: number; parts: any[]; }[]; }, { kind: import("convex/values").VLiteral<"deltas", "required">; deltas: import("convex/values").VArray<{ streamId: string; start: number; end: number; parts: any[]; }[], import("convex/values").VObject<{ streamId: string; start: number; end: number; parts: any[]; }, { streamId: import("convex/values").VString; start: import("convex/values").VFloat64; end: import("convex/values").VFloat64; parts: import("convex/values").VArray, "required">; }, "required", "streamId" | "start" | "end" | "parts">, "required">; }, "required", "kind" | "deltas">], "optional", "messages" | "kind" | "deltas">; page: import("convex/values").VArray<{ id?: string | undefined; userId?: string | undefined; embeddingId?: string | undefined; fileIds?: string[] | undefined; error?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; message?: { providerOptions?: Record> | undefined; role: "user"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[]; } | { providerOptions?: Record> | undefined; role: "assistant"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[]; } | { providerOptions?: Record> | undefined; role: "tool"; content: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[]; } | { providerOptions?: Record> | undefined; role: "system"; content: string; } | undefined; text?: string | undefined; providerMetadata?: Record> | undefined; reasoning?: string | undefined; usage?: { reasoningTokens?: number | undefined; cachedInputTokens?: number | undefined; promptTokens: number; completionTokens: number; totalTokens: number; } | undefined; sources?: ({ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; })[] | undefined; warnings?: ({ details?: string | undefined; type: "unsupported-setting"; setting: string; } | { details?: string | undefined; type: "unsupported-tool"; tool: any; } | { type: "other"; message: string; })[] | undefined; finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined; reasoningDetails?: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { signature?: string | undefined; type: "text"; text: string; } | { type: "redacted"; data: string; })[] | undefined; status: "pending" | "success" | "failed"; order: number; _creationTime: number; threadId: string; stepOrder: number; tool: boolean; _id: string; }[], import("convex/values").VObject<{ id?: string | undefined; userId?: string | undefined; embeddingId?: string | undefined; fileIds?: string[] | undefined; error?: string | undefined; agentName?: string | undefined; model?: string | undefined; provider?: string | undefined; providerOptions?: Record> | undefined; message?: { providerOptions?: Record> | undefined; role: "user"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[]; } | { providerOptions?: Record> | undefined; role: "assistant"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[]; } | { providerOptions?: Record> | undefined; role: "tool"; content: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[]; } | { providerOptions?: Record> | undefined; role: "system"; content: string; } | undefined; text?: string | undefined; providerMetadata?: Record> | undefined; reasoning?: string | undefined; usage?: { reasoningTokens?: number | undefined; cachedInputTokens?: number | undefined; promptTokens: number; completionTokens: number; totalTokens: number; } | undefined; sources?: ({ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; })[] | undefined; warnings?: ({ details?: string | undefined; type: "unsupported-setting"; setting: string; } | { details?: string | undefined; type: "unsupported-tool"; tool: any; } | { type: "other"; message: string; })[] | undefined; finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined; reasoningDetails?: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { signature?: string | undefined; type: "text"; text: string; } | { type: "redacted"; data: string; })[] | undefined; status: "pending" | "success" | "failed"; order: number; _creationTime: number; threadId: string; stepOrder: number; tool: boolean; _id: string; }, { _id: import("convex/values").VString; _creationTime: import("convex/values").VFloat64; userId: import("convex/values").VString; threadId: import("convex/values").VString; order: import("convex/values").VFloat64; stepOrder: import("convex/values").VFloat64; embeddingId: import("convex/values").VString; fileIds: import("convex/values").VArray, "optional">; error: import("convex/values").VString; status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>; agentName: import("convex/values").VString; model: import("convex/values").VString; provider: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; message: import("convex/values").VUnion<{ providerOptions?: Record> | undefined; role: "user"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[]; } | { providerOptions?: Record> | undefined; role: "assistant"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[]; } | { providerOptions?: Record> | undefined; role: "tool"; content: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[]; } | { providerOptions?: Record> | undefined; role: "system"; content: string; } | undefined, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; role: "user"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[]; }, { role: import("convex/values").VLiteral<"user", "required">; content: import("convex/values").VUnion> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[], [import("convex/values").VString, import("convex/values").VArray<({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; })[], import("convex/values").VUnion<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; type: "image"; image: string | ArrayBuffer; }, { type: import("convex/values").VLiteral<"image", "required">; image: import("convex/values").VUnion, import("convex/values").VBytes], "required", never>; mediaType: import("convex/values").VString; mimeType: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mediaType" | "mimeType">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; }, { type: import("convex/values").VLiteral<"file", "required">; data: import("convex/values").VUnion, import("convex/values").VBytes], "required", never>; filename: import("convex/values").VString; mediaType: import("convex/values").VString; mimeType: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "image" | "mediaType" | "mimeType" | "data" | "filename">, "required">], "required", never>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; role: "assistant"; content: string | ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[]; }, { role: import("convex/values").VLiteral<"assistant", "required">; content: import("convex/values").VUnion> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[], [import("convex/values").VString, import("convex/values").VArray<({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; })[], import("convex/values").VUnion<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; mediaType?: string | undefined; mimeType?: string | undefined; filename?: string | undefined; type: "file"; data: string | ArrayBuffer; }, { type: import("convex/values").VLiteral<"file", "required">; data: import("convex/values").VUnion, import("convex/values").VBytes], "required", never>; filename: import("convex/values").VString; mediaType: import("convex/values").VString; mimeType: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; }, { type: import("convex/values").VLiteral<"reasoning", "required">; text: import("convex/values").VString; signature: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "signature">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "redacted-reasoning"; data: string; }, { type: import("convex/values").VLiteral<"redacted-reasoning", "required">; data: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data">, import("convex/values").VUnion<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; input: any; }, { type: import("convex/values").VLiteral<"tool-call", "required">; toolCallId: import("convex/values").VString; toolName: import("convex/values").VString; input: import("convex/values").VAny; args: import("convex/values").VAny; providerExecuted: import("convex/values").VBoolean; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; input?: any; providerExecuted?: boolean | undefined; type: "tool-call"; toolCallId: string; toolName: string; args: any; }, { type: import("convex/values").VLiteral<"tool-call", "required">; toolCallId: import("convex/values").VString; toolName: import("convex/values").VString; args: import("convex/values").VAny; input: import("convex/values").VAny; providerExecuted: import("convex/values").VBoolean; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>], "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; }, { type: import("convex/values").VLiteral<"tool-result", "required">; toolCallId: import("convex/values").VString; toolName: import("convex/values").VString; output: import("convex/values").VUnion<{ providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "text"; value: string; }, { type: import("convex/values").VLiteral<"text", "required">; value: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "json"; value: any; }, { type: import("convex/values").VLiteral<"json", "required">; value: import("convex/values").VAny; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "error-text"; value: string; }, { type: import("convex/values").VLiteral<"error-text", "required">; value: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "error-json"; value: any; }, { type: import("convex/values").VLiteral<"error-json", "required">; value: import("convex/values").VAny; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; }, { type: import("convex/values").VLiteral<"execution-denied", "required">; reason: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "reason">, import("convex/values").VObject<{ type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; }, { type: import("convex/values").VLiteral<"content", "required">; value: import("convex/values").VArray<({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[], import("convex/values").VUnion<{ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{ type: "media"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"media", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; }, "required", "type" | "mediaType" | "data">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"file-data", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; filename: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data" | "filename">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "file-url"; url: string; }, { type: import("convex/values").VLiteral<"file-url", "required">; url: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; }, { type: import("convex/values").VLiteral<"file-id", "required">; fileId: import("convex/values").VUnion, [import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VString, "required", string>], "required", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"image-data", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-url"; url: string; }, { type: import("convex/values").VLiteral<"image-url", "required">; url: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; }, { type: import("convex/values").VLiteral<"image-file-id", "required">; fileId: import("convex/values").VUnion, [import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VString, "required", string>], "required", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "custom"; }, { type: import("convex/values").VLiteral<"custom", "required">; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mediaType" | "data" | "filename" | "url" | "fileId" | `fileId.${string}`>, "required">; }, "required", "type" | "value">], "optional", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}` | "reason">; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerExecuted: import("convex/values").VBoolean; result: import("convex/values").VAny; isError: import("convex/values").VBoolean; args: import("convex/values").VAny; experimental_content: import("convex/values").VArray<({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined, import("convex/values").VUnion<{ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; }, [import("convex/values").VObject<{ type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; }, "required", "type" | "text">, import("convex/values").VObject<{ mimeType?: string | undefined; type: "image"; data: string; }, { type: import("convex/values").VLiteral<"image", "required">; data: import("convex/values").VString; mimeType: import("convex/values").VString; }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}`>, import("convex/values").VUnion<{ title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; }, [import("convex/values").VObject<{ title?: string | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; type: "source"; url: string; sourceType: "url"; }, { type: import("convex/values").VLiteral<"source", "required">; sourceType: import("convex/values").VLiteral<"url", "required">; id: import("convex/values").VString; url: import("convex/values").VString; title: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "url" | "sourceType">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; }, { type: import("convex/values").VLiteral<"source", "required">; sourceType: import("convex/values").VLiteral<"document", "required">; id: import("convex/values").VString; mediaType: import("convex/values").VString; title: import("convex/values").VString; filename: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "url" | "sourceType">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; type: "tool-approval-request"; toolCallId: string; approvalId: string; }, { type: import("convex/values").VLiteral<"tool-approval-request", "required">; approvalId: import("convex/values").VString; toolCallId: import("convex/values").VString; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "approvalId">], "required", "id" | "title" | "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "input" | "args" | "providerExecuted" | `input.${string}` | `args.${string}` | "output" | "url" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}` | "sourceType" | "approvalId">, "required">], "required", never>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; role: "tool"; content: ({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[]; }, { role: import("convex/values").VLiteral<"tool", "required">; content: import("convex/values").VArray<({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; })[], import("convex/values").VUnion<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; args?: any; providerExecuted?: boolean | undefined; output?: { providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined; result?: any; isError?: boolean | undefined; experimental_content?: ({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined; type: "tool-result"; toolCallId: string; toolName: string; }, { type: import("convex/values").VLiteral<"tool-result", "required">; toolCallId: import("convex/values").VString; toolName: import("convex/values").VString; output: import("convex/values").VUnion<{ providerOptions?: Record> | undefined; type: "text"; value: string; } | { providerOptions?: Record> | undefined; type: "json"; value: any; } | { providerOptions?: Record> | undefined; type: "error-text"; value: string; } | { providerOptions?: Record> | undefined; type: "error-json"; value: any; } | { providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; } | { type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; } | undefined, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "text"; value: string; }, { type: import("convex/values").VLiteral<"text", "required">; value: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "json"; value: any; }, { type: import("convex/values").VLiteral<"json", "required">; value: import("convex/values").VAny; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "error-text"; value: string; }, { type: import("convex/values").VLiteral<"error-text", "required">; value: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "error-json"; value: any; }, { type: import("convex/values").VLiteral<"error-json", "required">; value: import("convex/values").VAny; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; reason?: string | undefined; type: "execution-denied"; }, { type: import("convex/values").VLiteral<"execution-denied", "required">; reason: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "reason">, import("convex/values").VObject<{ type: "content"; value: ({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[]; }, { type: import("convex/values").VLiteral<"content", "required">; value: import("convex/values").VArray<({ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; })[], import("convex/values").VUnion<{ providerOptions?: Record> | undefined; type: "text"; text: string; } | { type: "media"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "file-url"; url: string; } | { providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; } | { providerOptions?: Record> | undefined; type: "image-url"; url: string; } | { providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; } | { providerOptions?: Record> | undefined; type: "custom"; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{ type: "media"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"media", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; }, "required", "type" | "mediaType" | "data">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; filename?: string | undefined; type: "file-data"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"file-data", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; filename: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data" | "filename">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "file-url"; url: string; }, { type: import("convex/values").VLiteral<"file-url", "required">; url: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "file-id"; fileId: string | Record; }, { type: import("convex/values").VLiteral<"file-id", "required">; fileId: import("convex/values").VUnion, [import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VString, "required", string>], "required", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-data"; mediaType: string; data: string; }, { type: import("convex/values").VLiteral<"image-data", "required">; data: import("convex/values").VString; mediaType: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mediaType" | "data">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-url"; url: string; }, { type: import("convex/values").VLiteral<"image-url", "required">; url: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "url">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "image-file-id"; fileId: string | Record; }, { type: import("convex/values").VLiteral<"image-file-id", "required">; fileId: import("convex/values").VUnion, [import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VString, "required", string>], "required", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "fileId" | `fileId.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; type: "custom"; }, { type: import("convex/values").VLiteral<"custom", "required">; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | `providerOptions.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mediaType" | "data" | "filename" | "url" | "fileId" | `fileId.${string}`>, "required">; }, "required", "type" | "value">], "optional", "type" | "providerOptions" | `providerOptions.${string}` | "value" | `value.${string}` | "reason">; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerExecuted: import("convex/values").VBoolean; result: import("convex/values").VAny; isError: import("convex/values").VBoolean; args: import("convex/values").VAny; experimental_content: import("convex/values").VArray<({ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; })[] | undefined, import("convex/values").VUnion<{ type: "text"; text: string; } | { mimeType?: string | undefined; type: "image"; data: string; }, [import("convex/values").VObject<{ type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; }, "required", "type" | "text">, import("convex/values").VObject<{ mimeType?: string | undefined; type: "image"; data: string; }, { type: import("convex/values").VLiteral<"image", "required">; data: import("convex/values").VString; mimeType: import("convex/values").VString; }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}`>, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; providerExecuted?: boolean | undefined; reason?: string | undefined; type: "tool-approval-response"; approvalId: string; approved: boolean; }, { type: import("convex/values").VLiteral<"tool-approval-response", "required">; approvalId: import("convex/values").VString; approved: import("convex/values").VBoolean; reason: import("convex/values").VString; providerExecuted: import("convex/values").VBoolean; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "providerExecuted" | "reason" | "approvalId" | "approved">], "required", "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "output" | "reason" | "result" | "isError" | "experimental_content" | "output.type" | "output.providerOptions" | `output.providerOptions.${string}` | "output.value" | `output.value.${string}` | "output.reason" | `result.${string}` | "approvalId" | "approved">, "required">; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; role: "system"; content: string; }, { role: import("convex/values").VLiteral<"system", "required">; content: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">; tool: import("convex/values").VBoolean; text: import("convex/values").VString; usage: import("convex/values").VObject<{ reasoningTokens?: number | undefined; cachedInputTokens?: number | undefined; promptTokens: number; completionTokens: number; totalTokens: number; } | undefined, { promptTokens: import("convex/values").VFloat64; completionTokens: import("convex/values").VFloat64; totalTokens: import("convex/values").VFloat64; reasoningTokens: import("convex/values").VFloat64; cachedInputTokens: import("convex/values").VFloat64; }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; sources: import("convex/values").VArray<({ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; })[] | undefined, import("convex/values").VUnion<{ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; } | { providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; }, [import("convex/values").VObject<{ title?: string | undefined; type?: "source" | undefined; providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; id: string; url: string; sourceType: "url"; }, { type: import("convex/values").VLiteral<"source" | undefined, "optional">; sourceType: import("convex/values").VLiteral<"url", "required">; id: import("convex/values").VString; url: import("convex/values").VString; title: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "url" | "sourceType">, import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; filename?: string | undefined; id: string; title: string; type: "source"; mediaType: string; sourceType: "document"; }, { type: import("convex/values").VLiteral<"source", "required">; sourceType: import("convex/values").VLiteral<"document", "required">; id: import("convex/values").VString; mediaType: import("convex/values").VString; title: import("convex/values").VString; filename: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "sourceType">], "required", "id" | "title" | "type" | "providerOptions" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "mediaType" | "filename" | "url" | "sourceType">, "optional">; warnings: import("convex/values").VArray<({ details?: string | undefined; type: "unsupported-setting"; setting: string; } | { details?: string | undefined; type: "unsupported-tool"; tool: any; } | { type: "other"; message: string; })[] | undefined, import("convex/values").VUnion<{ details?: string | undefined; type: "unsupported-setting"; setting: string; } | { details?: string | undefined; type: "unsupported-tool"; tool: any; } | { type: "other"; message: string; }, [import("convex/values").VObject<{ details?: string | undefined; type: "unsupported-setting"; setting: string; }, { type: import("convex/values").VLiteral<"unsupported-setting", "required">; setting: import("convex/values").VString; details: import("convex/values").VString; }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{ details?: string | undefined; type: "unsupported-tool"; tool: any; }, { type: import("convex/values").VLiteral<"unsupported-tool", "required">; tool: import("convex/values").VAny; details: import("convex/values").VString; }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{ type: "other"; message: string; }, { type: import("convex/values").VLiteral<"other", "required">; message: import("convex/values").VString; }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">; finishReason: import("convex/values").VUnion<"error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>; reasoning: import("convex/values").VString; reasoningDetails: import("convex/values").VArray<({ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { signature?: string | undefined; type: "text"; text: string; } | { type: "redacted"; data: string; })[] | undefined, import("convex/values").VUnion<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; } | { signature?: string | undefined; type: "text"; text: string; } | { type: "redacted"; data: string; }, [import("convex/values").VObject<{ providerOptions?: Record> | undefined; providerMetadata?: Record> | undefined; signature?: string | undefined; type: "reasoning"; text: string; }, { type: import("convex/values").VLiteral<"reasoning", "required">; text: import("convex/values").VString; signature: import("convex/values").VString; providerOptions: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; providerMetadata: import("convex/values").VRecord> | undefined, import("convex/values").VString, import("convex/values").VRecord, import("convex/values").VString, import("convex/values").VAny, "required", string>, "optional", string>; }, "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "signature">, import("convex/values").VObject<{ signature?: string | undefined; type: "text"; text: string; }, { type: import("convex/values").VLiteral<"text", "required">; text: import("convex/values").VString; signature: import("convex/values").VString; }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{ type: "redacted"; data: string; }, { type: import("convex/values").VLiteral<"redacted", "required">; data: import("convex/values").VString; }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "data" | "signature">, "optional">; id: import("convex/values").VString; }, "required", "id" | "status" | "userId" | "order" | "_creationTime" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | "providerMetadata" | `providerOptions.${string}` | `providerMetadata.${string}` | "reasoning" | "tool" | "usage" | "sources" | "warnings" | "finishReason" | "reasoningDetails" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens" | "_id">, "required">; continueCursor: import("convex/values").VString; isDone: import("convex/values").VBoolean; splitCursor: import("convex/values").VUnion, import("convex/values").VNull], "optional", never>; pageStatus: import("convex/values").VUnion<"SplitRecommended" | "SplitRequired" | null | undefined, [import("convex/values").VLiteral<"SplitRecommended", "required">, import("convex/values").VLiteral<"SplitRequired", "required">, import("convex/values").VNull], "optional", never>; }, "required", "page" | "continueCursor" | "isDone" | "splitCursor" | "pageStatus" | "streams" | "streams.messages" | "streams.kind" | "streams.deltas">; /** * A function that handles fetching stream deltas, used with the React hooks * `useThreadMessages` or `useStreamingThreadMessages`. * @param ctx A ctx object from a query, mutation, or action. * @param component The agent component, usually `components.agent`. * @param args.threadId The thread to sync streams for. * @param args.streamArgs The stream arguments with per-stream cursors. * @returns The deltas for each stream from their existing cursor. */ export declare function syncStreams(ctx: QueryCtx | MutationCtx | ActionCtx, component: AgentComponent, { threadId, streamArgs, includeStatuses, }: { threadId: string; streamArgs?: StreamArgs | undefined; includeStatuses?: ("streaming" | "finished" | "aborted")[]; }): Promise; export declare function abortStream(ctx: MutationCtx | ActionCtx, component: AgentComponent, args: { reason: string; } & ({ streamId: string; } | { threadId: string; order: number; })): Promise; /** * List the streaming messages for a thread. * @param ctx A ctx object from a query, mutation, or action. * @param component The agent component, usually `components.agent`. * @param args.threadId The thread to list streams for. * @param args.startOrder The order of the messages in the thread to start listing from. * @param args.includeStatuses The statuses to include in the list. * @returns The streams for the thread. */ export declare function listStreams(ctx: QueryCtx | MutationCtx | ActionCtx, component: AgentComponent, { threadId, startOrder, includeStatuses, }: { threadId: string; startOrder?: number; includeStatuses?: ("streaming" | "finished" | "aborted")[]; }): Promise; export type StreamingOptions = { /** * The minimum granularity of deltas to save. * Note: this is not a guarantee that every delta will be exactly one line. * E.g. if "line" is specified, it won't save any deltas until it encounters * a newline character. * Defaults to a regex that chunks by punctuation followed by whitespace. */ chunking?: "word" | "line" | RegExp | ChunkDetector; /** * The minimum number of milliseconds to wait between saving deltas. * Defaults to 250. */ throttleMs?: number; /** * If set to true, this will return immediately, as it would if you weren't * saving the deltas. Otherwise, the call will "consume" the stream with * .consumeStream(), which waits for the stream to finish before returning. * * When saving deltas, you're often not interactin with the stream otherwise. */ returnImmediately?: boolean; }; export declare const DEFAULT_STREAMING_OPTIONS: { chunking: RegExp; throttleMs: number; returnImmediately: false; }; /** * * @param options The options passed to `agent.streamText` to decide whether to * save deltas while streaming. * @param existing The transforms passed to `agent.streamText` to merge with. * @returns The merged transforms to pass to the underlying `streamText` call. */ export declare function mergeTransforms(options: { chunking?: StreamingOptions["chunking"]; } | boolean | undefined, existing: StreamTextTransform | Array> | undefined): StreamTextTransform | StreamTextTransform[] | undefined; /** * DeltaStreamer can be used to save a stream of "parts" by writing * batches of them in "deltas" to the database so clients can subscribe * (using the syncStreams utility and client hooks) and re-hydrate the stream. * You can optionally compress the parts, e.g. concatenating text deltas, to * optimize the data in transit. */ export declare class DeltaStreamer { #private; readonly component: AgentComponent; readonly ctx: MutationCtx | ActionCtx; readonly metadata: { threadId: string; userId?: string; order: number; stepOrder: number; agentName?: string; model?: string; provider?: string; providerOptions?: ProviderOptions; format: "UIMessageChunk" | "TextStreamPart" | undefined; }; streamId: string | undefined; readonly config: { throttleMs: number; onAsyncAbort: (reason: string) => Promise; compress: ((parts: T[]) => T[]) | null; }; abortController: AbortController; constructor(component: AgentComponent, ctx: MutationCtx | ActionCtx, config: { throttleMs: number | undefined; onAsyncAbort: (reason: string) => Promise; abortSignal: AbortSignal | undefined; compress: ((parts: T[]) => T[]) | null; }, metadata: { threadId: string; userId?: string; order: number; stepOrder: number; agentName?: string; model?: string; provider?: string; providerOptions?: ProviderOptions; format: "UIMessageChunk" | "TextStreamPart" | undefined; }); getStreamId(): Promise; addParts(parts: T[]): Promise; consumeStream(stream: AsyncIterableStream): Promise; /** * Mark the stream as being finished externally (e.g., atomically via addMessages). * When called, consumeStream() will skip calling finish() since it will be * handled elsewhere in the same mutation as message saving. */ markFinishedExternally(): void; /** * Get the stream ID, waiting for it to be created if necessary. * Useful for passing to addMessages for atomic finish. */ getOrCreateStreamId(): Promise; finish(): Promise; fail(reason: string): Promise; } /** * Compressing parts when streaming to save bandwidth in deltas. */ export declare function compressUIMessageChunks(parts: UIMessageChunk[]): UIMessageChunk[]; export declare function compressTextStreamParts(parts: TextStreamPart[]): TextStreamPart[]; //# sourceMappingURL=streaming.d.ts.map