export const mcpCacheDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.cache", kind: "service", required: true, description: "Runtime-owned MCP cache support. BaseTool shapes cache key/valueRef/TTL/tags and never stores cache material directly." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit runtime guard approval before writing runtime MCP cache entries." },
    { dependencyId: "runtime.mcp.cacheStore", kind: "runtime", required: true, description: "Cache persistence, eviction, tenant isolation, and value material ownership remain with runtime." },
];
export function createHostExecutorMcpCacheProvider(executor) {
    const cache = executor?.mcp?.cache;
    if (cache === undefined)
        return undefined;
    return async (request, context) => {
        const result = await cache({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
