export const mcpUpdateToolDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.updateTool", kind: "service", required: true, description: "Runtime-owned MCP tool update support. BaseTool shapes the patch and does not own registry state." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit guard approval before updating runtime MCP registry state." },
];
export function createHostExecutorMcpUpdateToolProvider(executor) {
    const updateTool = executor?.mcp?.updateTool;
    if (updateTool === undefined)
        return undefined;
    return async (request, context) => {
        const result = await updateTool({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
