/** * SDK Executor * * Provides direct tool execution without MCP orchestration overhead. * This is a lightweight execution path for SDK consumers who don't * need MCP protocol support, chain hints, or policy enforcement. * * Design: Minimal wrapper that creates context and calls tool handler. */ import type { ZodTypeAny } from 'zod'; import { type Result } from '../types/core'; import type { Tool } from '../types/tool'; import type { SDKOptions } from './types.js'; /** * Testing utilities exported for test files. * @internal */ export declare const _testing: { /** Reset knowledge loader state for test isolation */ resetKnowledgeState: () => void; /** Check if knowledge is loaded (for assertions) */ isKnowledgeLoaded: () => boolean; }; /** * Execute a tool directly without MCP orchestration. * * This function provides the core SDK execution path: * 1. Ensures knowledge base is loaded (for tools that need it) * 2. Creates a minimal ToolContext * 3. Parses and validates input via Zod * 4. Calls the tool handler * 5. Returns the Result directly * * @param tool - The tool to execute * @param input - Tool input parameters (will be validated) * @param options - SDK options for customization * @returns Promise resolving to Result * * @example * ```typescript * import { executeTool } from 'containerization-assist-mcp/sdk'; * import analyzeRepoTool from '../tools/analyze-repo/tool'; * * const result = await executeTool( * analyzeRepoTool, * { repositoryPath: './my-app' }, * { onProgress: (msg) => console.log(msg) } * ); * * if (result.ok) { * console.log('Modules:', result.value.modules); * } else { * console.error('Error:', result.error); * } * ``` */ export declare function executeTool(tool: Tool, input: unknown, options?: SDKOptions): Promise>; //# sourceMappingURL=executor.d.ts.map