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; /** * Error shape for custom chat implementations that still surface a * `data-guardrail-violation` chunk through the error UI. The `message` carries * the service-provided `fallbackResponse`, which is authored for end-user * display. * * Detection across package boundaries should rely on `error.name` rather than * `instanceof` to avoid issues with mixed module copies in bundled apps. */ export declare class GuardrailViolationError extends Error { constructor(message: string); } /** * 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;