import { type ToolSet } from "ai"; import type { Vendo } from "./server.js"; /** * `@vendoai/vendo/ai-sdk` — the BYO-agent seam for AI SDK loops (frozen * contract — see this file's exported shape and tests). * One thin format shim over the framework-neutral tool pack in `./pack.js`, * executing through `vendo.guardedTools` — the guard-bound * registry Vendo's own loop shares, decorated to park pending-approval calls * so `` can resume them over the wire — plus the composed * away runner behind `vendo_delegate`. No tool reachable from the host loop has * an unguarded route. */ export { VENDO_DELEGATE_TOOL, VENDO_MAKE_TOOL, VENDO_TOOL_PACK_PREFIX, type VendoDelegateResult, type VendoToolPackFilter, type VendoToolPackOptions, } from "./tool-pack.js"; import type { VendoToolPackOptions } from "./tool-pack.js"; /** * Build the Vendo tool pack as an AI SDK `ToolSet` for `streamText`/ * `generateText`. Built PER REQUEST: tool execution needs a principal-scoped * RunContext, so resolve the caller's principal first and spread the result * into your route handler's `tools`: * * ```ts * const result = streamText({ * model, * messages, * tools: { ...myTools, ...(await vendoTools(vendo, { principal })) }, * }); * ``` * * A `vendo_*` tool returns either a versioned envelope — `vendo/app-ref@1` * (render with ``) or `vendo/approval-ref@1` (parks server-side; * render with ``) — or plain data, meaning the guarded call * executed cleanly. `options.sessionId` carries the host session id into audit; * unset, the shim mints one per pack build. */ export declare function vendoTools(vendo: Vendo, options: VendoToolPackOptions): Promise;