/** * One of the app's tools a reply's UI can run, such as to load data on this device, described * as the agent's model reads it. It is apart from the tools the agent itself calls. The * counterpart of `AIClientTool` in StreamChatAI. */ export type AIUIClientToolDefinition = { name: string; /** What it does, for the agent's model. */ description?: string; /** The JSON Schema of its arguments, for the agent's model. */ inputSchema?: Record; /** * Whether it only reads, so the UI may run it whenever it asks, such as to show its output. * One that changes something runs only from something the person did, such as a tap. */ readOnly?: boolean; }; export type AIUIClientTool = AIUIClientToolDefinition & { /** Runs the tool. What it returns, as JSON, is the output the UI gets. */ run: (args: Record) => unknown; }; /** Why one of the app's tools didn't give a reply's UI its output. */ export declare class AIUIToolError extends Error { readonly toolName: string; constructor(toolName: string, message: string, options?: { cause?: unknown; }); } /** A tool as the agent's backend reads it, in the shape of an MCP tool. */ export declare const aiUIClientToolJSON: ({ description, inputSchema, name, readOnly, }: AIUIClientToolDefinition) => { inputSchema: Record; name: string; description?: string | undefined; annotations: { readOnlyHint: boolean; }; }; /** * Whether the person is acting on the page right now, such as having just tapped, as the * browser tells it. The browser's activation is page-wide and lasts a few seconds, so it can't * tell a tap on a reply's UI from sending a message: the renderers ask whether the person * pressed a control in the reply itself instead. */ export declare const isPersonActing: () => boolean; export declare const isJSONValue: (value: unknown) => boolean; //# sourceMappingURL=AIUITools.d.ts.map