/**
 * @fileoverview Encapsulates the registration of all tool definitions with an McpServer.
 * Supports ToolDefinition (standard and auto-task via `task: true`) and TaskToolDefinition
 * (escape hatch for custom task lifecycle).
 * @module src/mcp-server/tools/tool-registration
 */
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import type { ZodObject, ZodRawShape } from 'zod';
import { type TaskToolDefinition } from '../../mcp-server/tasks/utils/taskToolDefinition.js';
import type { AnyToolDefinition } from '../../mcp-server/tools/utils/toolDefinition.js';
import { type HandlerFactoryServices } from '../../mcp-server/tools/utils/toolHandlerFactory.js';
/** Union of all accepted tool definition shapes. */
export type AnyToolDef = AnyToolDefinition | TaskToolDefinition<ZodObject<ZodRawShape>, ZodObject<ZodRawShape>>;
export declare class ToolRegistry {
    private toolDefs;
    private services?;
    /** Tracks registered tool names to detect duplicates at startup. */
    private readonly registeredNames;
    constructor(toolDefs: AnyToolDef[], services?: HandlerFactoryServices | undefined);
    /**
     * Registers all tool definitions with the provided McpServer instance.
     * Automatically detects standard tools, auto-task tools (task: true),
     * and escape-hatch TaskToolDefinitions.
     */
    registerAll(server: McpServer): Promise<void>;
    /** Throws at startup if a tool with the same name was already registered. */
    private assertUniqueName;
    private deriveTitleFromName;
    /**
     * Registers a standard tool definition.
     * Requires `services` to have been passed to the constructor for Context creation.
     */
    private registerTool;
    /**
     * Registers a tool with `task: true` via the experimental Tasks API.
     * Auto-generates task handlers from the definition's `handler` function.
     * The framework manages the full task lifecycle: create, background run, store result.
     */
    private registerAutoTaskTool;
    /**
     * Runs a tool handler as a background task.
     * Creates Context with `progress` and `signal`, stores result/error on completion.
     * Enforces a deadline matching the task entry TTL to prevent leaked resources.
     */
    private runAutoTaskHandler;
    /**
     * Registers a task-based tool with the MCP server via the experimental Tasks API.
     * Task tools support long-running async operations with polling for status and results.
     *
     * @experimental
     */
    private registerTaskTool;
}
//# sourceMappingURL=tool-registration.d.ts.map