UNPKG

@vfarcic/dot-ai

Version:

AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance

59 lines 2.08 kB
/** * Plugin Registry - Unified Plugin Tool Invocation * * PRD #359: Provides a single, consistent way to invoke plugin tools from anywhere * in the codebase. Replaces scattered plugin manager passing and module-level setters. * * Usage: * // At startup (src/mcp/server.ts): * initializePluginRegistry(pluginManager); * * // Anywhere in the codebase: * const response = await invokePluginTool('agentic-tools', 'vector_search', { ... }); */ import type { PluginManager } from './plugin-manager'; import type { InvokeResponse } from './plugin-types'; /** * Initialize the plugin registry with a PluginManager instance. * Must be called once at startup before any plugin tool invocations. */ export declare function initializePluginRegistry(pm: PluginManager): void; /** * Get the PluginManager instance. * Returns null if not initialized. */ export declare function getPluginManager(): PluginManager | null; /** * Check if the plugin registry is initialized. */ export declare function isPluginInitialized(): boolean; /** * Invoke a tool on a specific plugin. * * @param plugin - The plugin name (e.g., 'agentic-tools') * @param tool - The tool name (e.g., 'vector_search', 'kubectl_get_resource_json') * @param args - Tool arguments * @returns InvokeResponse with success/error status and result * @throws Error if plugin registry is not initialized * * @example * // Invoke a vector tool * const response = await invokePluginTool('agentic-tools', 'vector_search', { * collection: 'capabilities', * embedding: [...], * limit: 10 * }); * * // Invoke a kubectl tool * const response = await invokePluginTool('agentic-tools', 'kubectl_get_resource_json', { * resource: 'namespace/kube-system', * field: 'metadata' * }); */ export declare function invokePluginTool(plugin: string, tool: string, args: Record<string, unknown>): Promise<InvokeResponse>; /** * Reset the plugin registry (for testing only). * @internal */ export declare function resetPluginRegistry(): void; //# sourceMappingURL=plugin-registry.d.ts.map