import { z } from 'zod'; import { type CompletionEvent, type CompletionFinal, type CompletionStats } from './completion-event.js'; import { type McpClientInput } from './mcp-adapter.js'; export declare const batchPromptSchema: z.ZodObject<{ id: z.ZodOptional; history: z.ZodArray>; attachments: z.ZodOptional>>; toolCalls: z.ZodOptional; name: z.ZodString; arguments: z.ZodRecord; }, z.core.$strip>>>; toolCallId: z.ZodOptional; toolName: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ content: string; role: string; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }, { role: string; content?: string | null | undefined; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }>>>; generationParams: z.ZodOptional; top_p: z.ZodOptional; top_k: z.ZodOptional; predict: z.ZodOptional; seed: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; repeat_penalty: z.ZodOptional; reasoning_budget: z.ZodOptional; tool_choice: z.ZodOptional; parallel_tool_calls: z.ZodOptional; }, z.core.$strict>>; responseFormat: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_object">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_schema">; json_schema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; schema: z.ZodRecord; strict: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], "type">>; tools: z.ZodOptional; name: z.ZodString; description: z.ZodString; deferLoading: z.ZodOptional; group: z.ZodOptional; parameters: z.ZodObject<{ type: z.ZodLiteral<"object">; properties: z.ZodRecord, z.ZodArray>]>>; description: z.ZodOptional; enum: z.ZodOptional>>; }, z.core.$loose>>; required: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>>; mcp: z.ZodOptional>>; }, z.core.$strict>; declare const batchPromptStreamSchema: z.ZodObject<{ id: z.ZodOptional; history: z.ZodArray>; attachments: z.ZodOptional>>; toolCalls: z.ZodOptional; name: z.ZodString; arguments: z.ZodRecord; }, z.core.$strip>>>; toolCallId: z.ZodOptional; toolName: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ content: string; role: string; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }, { role: string; content?: string | null | undefined; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }>>>; generationParams: z.ZodOptional; top_p: z.ZodOptional; top_k: z.ZodOptional; predict: z.ZodOptional; seed: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; repeat_penalty: z.ZodOptional; reasoning_budget: z.ZodOptional; tool_choice: z.ZodOptional; parallel_tool_calls: z.ZodOptional; }, z.core.$strict>>; responseFormat: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_object">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_schema">; json_schema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; schema: z.ZodRecord; strict: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], "type">>; tools: z.ZodOptional; name: z.ZodString; description: z.ZodString; deferLoading: z.ZodOptional; group: z.ZodOptional; parameters: z.ZodObject<{ type: z.ZodLiteral<"object">; properties: z.ZodRecord, z.ZodArray>]>>; description: z.ZodOptional; enum: z.ZodOptional>>; }, z.core.$loose>>; required: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>>; }, z.core.$strict>; export declare const batchCompletionClientParamsSchema: z.ZodObject<{ modelId: z.ZodString; prompts: z.ZodArray; history: z.ZodArray>; attachments: z.ZodOptional>>; toolCalls: z.ZodOptional; name: z.ZodString; arguments: z.ZodRecord; }, z.core.$strip>>>; toolCallId: z.ZodOptional; toolName: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ content: string; role: string; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }, { role: string; content?: string | null | undefined; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }>>>; generationParams: z.ZodOptional; top_p: z.ZodOptional; top_k: z.ZodOptional; predict: z.ZodOptional; seed: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; repeat_penalty: z.ZodOptional; reasoning_budget: z.ZodOptional; tool_choice: z.ZodOptional; parallel_tool_calls: z.ZodOptional; }, z.core.$strict>>; responseFormat: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_object">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_schema">; json_schema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; schema: z.ZodRecord; strict: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], "type">>; tools: z.ZodOptional; name: z.ZodString; description: z.ZodString; deferLoading: z.ZodOptional; group: z.ZodOptional; parameters: z.ZodObject<{ type: z.ZodLiteral<"object">; properties: z.ZodRecord, z.ZodArray>]>>; description: z.ZodOptional; enum: z.ZodOptional>>; }, z.core.$loose>>; required: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>>; mcp: z.ZodOptional>>; }, z.core.$strict>>; stream: z.ZodOptional; captureThinking: z.ZodOptional; emitRawDeltas: z.ZodOptional; toolDialect: z.ZodOptional>; requestId: z.ZodOptional; }, z.core.$strict>; export declare const batchCompletionStreamRequestSchema: z.ZodObject<{ modelId: z.ZodString; stream: z.ZodOptional; captureThinking: z.ZodOptional; emitRawDeltas: z.ZodOptional; toolDialect: z.ZodOptional>; requestId: z.ZodOptional; prompts: z.ZodArray; history: z.ZodArray>; attachments: z.ZodOptional>>; toolCalls: z.ZodOptional; name: z.ZodString; arguments: z.ZodRecord; }, z.core.$strip>>>; toolCallId: z.ZodOptional; toolName: z.ZodOptional; }, z.core.$strip>, z.ZodTransform<{ content: string; role: string; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }, { role: string; content?: string | null | undefined; attachments?: { path: string; }[] | undefined; toolCalls?: { name: string; arguments: Record; id?: string | undefined; }[] | undefined; toolCallId?: string | undefined; toolName?: string | undefined; }>>>; generationParams: z.ZodOptional; top_p: z.ZodOptional; top_k: z.ZodOptional; predict: z.ZodOptional; seed: z.ZodOptional; frequency_penalty: z.ZodOptional; presence_penalty: z.ZodOptional; repeat_penalty: z.ZodOptional; reasoning_budget: z.ZodOptional; tool_choice: z.ZodOptional; parallel_tool_calls: z.ZodOptional; }, z.core.$strict>>; responseFormat: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_object">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"json_schema">; json_schema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; schema: z.ZodRecord; strict: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], "type">>; tools: z.ZodOptional; name: z.ZodString; description: z.ZodString; deferLoading: z.ZodOptional; group: z.ZodOptional; parameters: z.ZodObject<{ type: z.ZodLiteral<"object">; properties: z.ZodRecord, z.ZodArray>]>>; description: z.ZodOptional; enum: z.ZodOptional>>; }, z.core.$loose>>; required: z.ZodOptional>; }, z.core.$loose>; }, z.core.$strip>>>; }, z.core.$strict>>; type: z.ZodLiteral<"batchCompletionStream">; }, z.core.$strict>; export declare const batchCompletionEventSchema: z.ZodObject<{ id: z.ZodString; event: z.ZodUnion; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"rawDelta">; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"thinkingDelta">; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolCall">; seq: z.ZodNumber; call: z.ZodObject<{ id: z.ZodString; name: z.ZodString; arguments: z.ZodRecord; raw: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolError">; seq: z.ZodNumber; error: z.ZodObject<{ code: z.ZodEnum<{ PARSE_ERROR: "PARSE_ERROR"; VALIDATION_ERROR: "VALIDATION_ERROR"; UNKNOWN_TOOL: "UNKNOWN_TOOL"; }>; message: z.ZodString; raw: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"completionStats">; seq: z.ZodNumber; stats: z.ZodObject<{ timeToFirstToken: z.ZodOptional; tokensPerSecond: z.ZodOptional; promptTokensPerSecond: z.ZodOptional; cacheTokens: z.ZodOptional; promptTokens: z.ZodOptional; generatedTokens: z.ZodOptional; emittedTokens: z.ZodOptional; avgConcurrentSeq: z.ZodOptional; toolDefinitionsDropped: z.ZodOptional; backendDevice: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"completionDone">; seq: z.ZodNumber; stopReason: z.ZodLiteral<"error">; error: z.ZodObject<{ message: z.ZodString; }, z.core.$strip>; raw: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"completionDone">; seq: z.ZodNumber; stopReason: z.ZodOptional>; raw: z.ZodOptional>; }, z.core.$strict>]>; }, z.core.$strict>; export declare const batchCompletionStreamResponseSchema: z.ZodObject<{ type: z.ZodLiteral<"batchCompletionStream">; done: z.ZodOptional; ids: z.ZodOptional>; events: z.ZodArray; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"rawDelta">; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"thinkingDelta">; seq: z.ZodNumber; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolCall">; seq: z.ZodNumber; call: z.ZodObject<{ id: z.ZodString; name: z.ZodString; arguments: z.ZodRecord; raw: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"toolError">; seq: z.ZodNumber; error: z.ZodObject<{ code: z.ZodEnum<{ PARSE_ERROR: "PARSE_ERROR"; VALIDATION_ERROR: "VALIDATION_ERROR"; UNKNOWN_TOOL: "UNKNOWN_TOOL"; }>; message: z.ZodString; raw: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"completionStats">; seq: z.ZodNumber; stats: z.ZodObject<{ timeToFirstToken: z.ZodOptional; tokensPerSecond: z.ZodOptional; promptTokensPerSecond: z.ZodOptional; cacheTokens: z.ZodOptional; promptTokens: z.ZodOptional; generatedTokens: z.ZodOptional; emittedTokens: z.ZodOptional; avgConcurrentSeq: z.ZodOptional; toolDefinitionsDropped: z.ZodOptional; backendDevice: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"completionDone">; seq: z.ZodNumber; stopReason: z.ZodLiteral<"error">; error: z.ZodObject<{ message: z.ZodString; }, z.core.$strip>; raw: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"completionDone">; seq: z.ZodNumber; stopReason: z.ZodOptional>; raw: z.ZodOptional>; }, z.core.$strict>]>; }, z.core.$strict>>; stats: z.ZodOptional; tokensPerSecond: z.ZodOptional; promptTokensPerSecond: z.ZodOptional; cacheTokens: z.ZodOptional; promptTokens: z.ZodOptional; generatedTokens: z.ZodOptional; emittedTokens: z.ZodOptional; avgConcurrentSeq: z.ZodOptional; toolDefinitionsDropped: z.ZodOptional; backendDevice: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strict>; export type BatchPrompt = z.infer; export type BatchCompletionStreamPrompt = z.infer; export type BatchCompletionClientParams = z.input; export type BatchCompletionStreamRequest = z.infer; export type BatchCompletionEvent = z.infer; export type BatchCompletionStreamResponse = z.infer; export type BatchCompletionResult = { id: string; final: CompletionFinal; }; export type BatchCompletionRun = { requestId: string; ids: Promise; events: AsyncIterable; /** * Aggregate per-prompt results in prompt order. This promise is * **all-or-nothing** for stream-level failures: if the batch handler * throws (e.g. `ContextOverflowError`) the whole run rejects and no * per-prompt finals can be recovered. For graceful terminal events such * as cancellation, each `byId(id).final` settles consistently with that * id's terminal state. */ results: Promise; /** * Batch-level decode stats (e.g. `avgConcurrentSeq`, aggregate token * counts), reported once for the whole run. The addon does not provide * per-prompt stats, so this is the only place batch metrics surface — * per-prompt `final.stats` is intentionally left undefined. Resolves to * `undefined` when the addon reported no stats. */ stats: Promise; byId(id: string): { events: AsyncIterable; final: Promise; }; }; export {};