/** * InstrumentedToolRegistrar — wraps a ToolRegistrar and records all registered tools. * * The code-mode module needs a snapshot of all registered tools (name, description, * inputSchema, handler) to build the sandbox tool bridge. This class wraps the real * ToolRegistrar, delegating every registration call to it while also recording each * tool in an internal list. * * Usage in the composition root: * const instrumented = new InstrumentedToolRegistrar(adapter); * registry.registerAll(instrumented); // all 49 tools recorded * const tools = instrumented.getTools(); // snapshot passed to CodeModeProvider */ import type { ToolRegistrar } from '../providers/types.js'; import type { ToolEntry } from './types.js'; /** * Derive the sandbox namespace and function name from an MCP tool name. * * Mapping rules: * - 'gitlab_*' → namespace='gitlab', functionName='*' * - 'atlassian_jira_*' → namespace='jira', functionName='*' * - 'atlassian_confluence_*' → namespace='confluence', functionName='*' * - anything else → namespace='tools', functionName=sanitized(name) */ export declare function deriveNamespaceAndFunction(toolName: string): { namespace: string; functionName: string; }; /** Replace non-alphanumeric/underscore characters with underscores. */ export declare function sanitizeIdentifier(name: string): string; /** * Wraps a ToolRegistrar, records every tool registration, and delegates * registration to the underlying registrar. */ export declare class InstrumentedToolRegistrar implements ToolRegistrar { private readonly delegate; private readonly tools; constructor(delegate: ToolRegistrar); registerTool(name: string, schema: unknown, handler: unknown): void; registerResource(template: unknown, handler: unknown): void; /** Return a snapshot of all registered tools. */ getTools(): ToolEntry[]; } //# sourceMappingURL=tool-registry.d.ts.map