import { t as ToolBinding } from "../shared-BIYAGyxd.js"; import { t as CreateToolsOptions } from "../shared-g0aFrtd0.js"; import { a as createGrepTool, c as createReadTool, i as createFindTool, l as createWriteTool, n as createEditTool, o as createListTool, r as createExecTool, s as createPublishTool, t as createDeleteTool } from "../shared-BAcOKgPO.js"; import { ToolSet } from "ai"; //#region src/tools/ai-sdk/bindings.d.ts /** * Bindings for `createToolBindings` from an AI SDK tool set. * * Tools with no `execute` function run in the browser, and tools that * set `needsApproval` wait for a person; neither can run from code, so * both are left out. * * A call is checked against the tool's `inputSchema` before it runs, as * the AI SDK checks a model's call, and the tool gets the parsed value, * so a schema's defaults apply. Arguments that fail the check reject the * call. A streaming tool resolves with its last value. A result shaped * `{ error: string }`, which is how this package's tools report a * failure, resolves with `isError: true` and the message as the text. * * Pass a function when the tool set changes, such as an agent's tools * for the current turn. The function is read when a backend connects, * to list the tools, and again on every call, so a call always runs the * tool as it is now. * * @param tools - The tool set, or a function returning it. * @returns A function returning the bindings, called each time a * backend connects. */ declare function forAISDKTools(tools: ToolSet | (() => ToolSet)): () => ToolBinding[]; //#endregion //#region src/tools/ai-sdk/index.d.ts /** Options for {@link createAITools}. */ type CreateAIToolsOptions = CreateToolsOptions; /** * Build the AI SDK tool set for a Workspace: `read`, `ls`, `find`, and * `grep`, plus `write`, `edit`, `delete`, `exec`, and `publish` unless * the set is read-only. `exec` offers every backend the Workspace has * unless `exec` picks them. * * @param options - The Workspace and per-tool options. * @returns An AI SDK `ToolSet` for `generateText`, `streamText`, or an agent's `getTools()`. */ declare function createAITools(options: CreateAIToolsOptions): ToolSet; //#endregion export { CreateAIToolsOptions, createAITools, createDeleteTool, createEditTool, createExecTool, createFindTool, createGrepTool, createListTool, createPublishTool, createReadTool, createWriteTool, forAISDKTools }; //# sourceMappingURL=ai-sdk.d.ts.map