import type { UIMessage } from './types'; export declare function generateId(): string; export declare function lastAssistantMessageIsCompleteWithToolCalls({ messages, }: { messages: UIMessage[]; }): boolean; export declare class SerialJobExecutor { private queue; private isRunning; run(job: () => Promise): Promise; private processQueue; } export declare function resolveValue(value: T | (() => T) | (() => Promise) | undefined): Promise; /** * Reads a non-empty `message` field off a JSON-serialized error envelope. * * Both transports backing `AbstractChat` (stream `error` chunks and HTTP error * responses) serialize errors as `{"message": "...", ...}` — the same shape as * the shared `ErrorResponse` on the API side. Returns the trimmed message if * the input is such a JSON object, otherwise `undefined`. */ export declare function tryParseErrorMessage(text: string): string | undefined;