/** * ToolDefinitionCompiler — Build-Time Tool Compilation Strategy * * Compiles the internal state of a GroupedToolBuilder into an MCP Tool definition. * Orchestrates all build-time strategies (description, schema, annotations, middleware) * and produces the pre-cached execution context. * * Pure-function module: receives config, returns compiled result. */ import { type ZodObject, type ZodRawShape } from 'zod'; import { type Tool as McpTool } from '@modelcontextprotocol/sdk/types.js'; import { type InternalAction, type MiddlewareFn } from '../types.js'; import { type ExecutionContext } from '../execution/ExecutionPipeline.js'; import { type CompiledChain } from '../execution/MiddlewareCompiler.js'; /** Input configuration for the compiler */ export interface CompilerInput { readonly name: string; readonly description: string | undefined; readonly discriminator: string; readonly toonMode: boolean; readonly selectEnabled: boolean; readonly hasGroup: boolean; readonly actions: readonly InternalAction[]; readonly middlewares: readonly MiddlewareFn[]; readonly commonSchema: ZodObject | undefined; readonly annotations: Record | undefined; } /** Output of the compiler: the tool definition + execution-time caches */ export interface CompilerOutput { readonly tool: McpTool; readonly executionContext: ExecutionContext; readonly compiledChain: CompiledChain; readonly actionMap: Map>; readonly validationSchemaCache: Map | null>; } export declare function compileToolDefinition(input: CompilerInput): CompilerOutput; //# sourceMappingURL=ToolDefinitionCompiler.d.ts.map