export const mcpInvalidateCacheDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.invalidateCache", kind: "service", required: true, description: "Runtime-owned MCP cache invalidation support. BaseTool shapes server/scope/key/reason and never evicts runtime material directly." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit runtime guard approval before cache invalidation." },
    { dependencyId: "runtime.mcp.cacheStore", kind: "runtime", required: true, description: "Cache indexes, eviction, tenant boundaries, and invalidation fan-out remain with runtime." },
];
export function createHostExecutorMcpInvalidateCacheProvider(executor) {
    const invalidateCache = executor?.mcp?.invalidateCache;
    if (invalidateCache === undefined)
        return undefined;
    return async (request, context) => {
        const result = await invalidateCache({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
