import { type UseChatOptions } from "@ai-sdk/react"; import { type UIMessage } from "ai"; import * as z from "zod/v4"; import "./polyfills/fetch"; type Tool = { description: string; zodSchema: T; execute?: (input: z.infer) => Promise | string; }; /** Compatibility API for existing apps. Use an official AI SDK for new apps. */ export declare function createRorkTool(tool: Tool): Tool; type TextPart = { type: "text"; text: string; }; type ImagePart = { type: "image"; image: string; }; type UserMessage = { role: "user"; content: string | (TextPart | ImagePart)[]; }; type AssistantMessage = { role: "assistant"; content: string | TextPart[]; }; /** Compatibility API for existing apps. Use Toolkit v2 for new apps. */ export declare function generateObject(params: { messages: (UserMessage | AssistantMessage)[]; schema: T; }): Promise>; /** Compatibility API for existing apps. Use Toolkit v2 for new apps. */ export declare function generateText(params: string | { messages: (UserMessage | AssistantMessage)[]; }): Promise; /** Compatibility API for existing apps. Use an official AI SDK with Toolkit v2 for new apps. */ export declare function useRorkAgent>>(options: Omit, "transport"> & { tools: T; }): { status: import("ai").ChatStatus; regenerate: ({ messageId, ...options }?: { messageId?: string; } & import("ai").ChatRequestOptions) => Promise; resumeStream: (options?: import("ai").ChatRequestOptions) => Promise; clearError: () => void; stop: () => Promise; id: string; setMessages: (messages: UIMessage[] | ((messages: UIMessage[]) => UIMessage[])) => void; error: Error | undefined; sendMessage: (message: string | Parameters<(message?: { text: string; files?: FileList | import("ai").FileUIPart[]; metadata?: unknown; parts?: never; messageId?: string; } | { files: FileList | import("ai").FileUIPart[]; metadata?: unknown; parts?: never; messageId?: string; } | (Omit, "id" | "role"> & { id?: string | undefined; role?: "assistant" | "system" | "user" | undefined; } & { text?: never; files?: never; messageId?: string; }) | undefined, options?: import("ai").ChatRequestOptions) => Promise>[0]) => void; messages: { id: string; role: 'system' | 'user' | 'assistant'; metadata?: unknown; parts: (import("ai").TextUIPart | { toolCallId: string; providerExecuted?: boolean; state: 'input-streaming'; input: unknown; output?: never; errorText?: never; type: "tool"; toolName: string; } | { toolCallId: string; providerExecuted?: boolean; state: 'input-available'; input: unknown; output?: never; errorText?: never; callProviderMetadata?: import("ai").ProviderMetadata; type: "tool"; toolName: string; } | { toolCallId: string; providerExecuted?: boolean; state: 'output-available'; input: unknown; output: unknown; errorText?: never; callProviderMetadata?: import("ai").ProviderMetadata; preliminary?: boolean; type: "tool"; toolName: string; } | { toolCallId: string; providerExecuted?: boolean; state: 'output-error'; input: unknown; rawInput?: unknown; output?: never; errorText: string; callProviderMetadata?: import("ai").ProviderMetadata; type: "tool"; toolName: string; })[]; }[]; addToolResult: ({ state, tool, toolCallId, output, errorText, }: { state?: "output-available"; tool: TOOL; toolCallId: string; output: unknown; errorText?: never; } | { state: "output-error"; tool: TOOL; toolCallId: string; output?: never; errorText: string; }) => Promise; addToolOutput: ({ state, tool, toolCallId, output, errorText, }: { state?: "output-available"; tool: TOOL; toolCallId: string; output: unknown; errorText?: never; } | { state: "output-error"; tool: TOOL; toolCallId: string; output?: never; errorText: string; }) => Promise; }; export {}; //# sourceMappingURL=agent.d.ts.map