import { Context, Effect, Layer } from 'effect'; import type { Tool, ToolSchemaMetadata } from './tool'; import { ToolNotFoundError, ToolAlreadyExistsError, ToolValidationError } from './errors'; /** Variance-free view used to accept differently typed tools in one batch. */ type BatchTool = Omit & { readonly schema?: { readonly input: unknown; readonly success: unknown; readonly failure?: unknown; readonly metadata?: ToolSchemaMetadata; }; readonly execute: (args: never) => unknown; }; /** * ToolRegistryService interface for Effect-based tool management */ export interface ToolRegistryService { /** * Register a tool in the registry */ registerTool(tool: Tool): Effect.Effect; /** * Register multiple tools at once */ registerTools(tools: Tools): Effect.Effect; /** * Get a tool by ID */ getTool(id: string): Effect.Effect; /** * Get multiple tools by their IDs (returns only found tools) */ getTools(ids: string[]): Effect.Effect; /** * Get missing tool IDs from a list */ getMissingToolIds(ids: string[]): Effect.Effect; /** * Get all registered tools */ getAllTools(): Effect.Effect; /** * Check if a tool exists */ hasTool(id: string): Effect.Effect; /** * Remove a tool from the registry */ removeTool(id: string): Effect.Effect; /** * Clear all tools from the registry */ clear(): Effect.Effect; /** * Get the number of registered tools */ size(): Effect.Effect; /** * Get normalized tools for AI execution */ normalizeTools(ids: string[]): Effect.Effect; /** * Backwards-compatible alias for normalized tools as Record */ toAISDKTools(ids: string[]): Effect.Effect>; } export declare const ToolRegistryService: Context.Tag; /** * Live layer providing ToolRegistryService */ export declare const ToolRegistryServiceLive: Layer.Layer; export {}; //# sourceMappingURL=service.d.ts.map