UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

34 lines 1.8 kB
import type { z } from 'zod/v4'; import type { Tool } from '../tools/Tool'; /** * Read-only registry that provides curated collections of tools. * * All methods are synchronous — the one-time async work (plugin loading) is * handled by {@link createDefaultToolRegistry} before the registry is created. * Tests can supply a plain object literal that satisfies this interface. */ export interface ToolRegistry { /** Tools loaded from external plugins. */ pluginTools(): Tool<z.ZodObject, z.ZodObject>[]; /** The minimal set of tools that every flow must include (objective bookkeeping). */ minimalTools(): Tool<z.ZodObject, z.ZodObject>[]; /** All built-in (prepackaged) tools shipped with Donobu. */ prepackagedTools(): Tool<z.ZodObject, z.ZodObject>[]; /** Curated default tool set for web targets (prepackaged + plugin overrides). */ defaultTools(): Tool<z.ZodObject, z.ZodObject>[]; /** Every available tool: prepackaged + plugins, with plugin overrides applied. */ allTools(): Tool<z.ZodObject, z.ZodObject>[]; /** All tools compatible with the given target type (e.g. `'web'`, `'mobile'`). */ toolsForTarget(targetType: string): Tool<z.ZodObject, z.ZodObject>[]; } /** * Creates the default {@link ToolRegistry} by loading plugins and eagerly * computing every tool collection. This is the only async entry point — * once the registry is created, all access is synchronous. * * @param preloadedPluginTools Plugin tools that have already been loaded * (e.g. by the server entry point). When provided, the factory skips * the filesystem scan entirely. */ export declare function createDefaultToolRegistry(preloadedPluginTools?: Tool<z.ZodObject, z.ZodObject>[]): Promise<ToolRegistry>; //# sourceMappingURL=ToolRegistry.d.ts.map