export const mcpUnregisterToolDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.unregisterTool", kind: "service", required: true, description: "Runtime-owned MCP tool unregistration support. BaseTool validates the request and never mutates registry state itself." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit guard approval before unregistering runtime MCP tools." },
];
export function createHostExecutorMcpUnregisterToolProvider(executor) {
    const unregisterTool = executor?.mcp?.unregisterTool;
    if (unregisterTool === undefined)
        return undefined;
    return async (request, context) => {
        const result = await unregisterTool({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
