import type { Tool } from "ai"; import { type ToolCategory } from "./filter.ts"; export interface RouterOptions { /** All available tools */ tools: Record; /** Tool categories available for routing */ categories?: ToolCategory[]; } /** * Create a two-stage router for managing large tool sets. * * Stage 1: Agent sees only `select_tool_category` and `list_categories`. * Stage 2: After selecting a category, the relevant tools are activated. * * Designed for use with the AI SDK's `prepareStep` callback: * ```ts * const allTools = createTikTokTools({ accessToken, businessId }); * const router = createRouter({ tools: allTools }); * * const result = await generateText({ * model, * tools: router.routerTools, * prepareStep: () => ({ tools: router.getSelectedTools() }), * prompt: "Publish a video and reply to the latest comment", * }); * ``` */ export declare function createRouter(opts: RouterOptions): { /** Router tools (give these to the agent in step 1) */ routerTools: { select_tool_category: Tool<{ categories: string[]; }, { activated: ToolCategory[]; availableTools: string[]; count: number; message: string; }>; list_categories: Tool, { categories: Record; }>; }; /** Get the currently selected tools (use in prepareStep) */ getSelectedTools(): Record; /** Get selected categories */ getSelectedCategories(): ToolCategory[]; /** Reset selection */ reset(): void; }; //# sourceMappingURL=router.d.ts.map