import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpCachePermission = "mcp:read" | "mcp:write" | "cache:write";
export type McpCacheContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        accepted?: boolean;
        allowed?: boolean;
        reason?: string;
    };
    contract?: {
        accepted?: boolean;
        reason?: string;
    };
    governance?: {
        accepted?: boolean;
        reason?: string;
    };
    allowedServerIds?: readonly string[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    grantedPermissions?: readonly McpCachePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpCacheTarget = {
    serverId: string;
    cacheKey: string;
    valueRef: string;
    ttlSeconds?: number;
    tags: readonly string[];
};
export type McpCacheRequest = {
    target?: Partial<McpCacheTarget> | null;
    context?: McpCacheContext;
};
export type McpCacheProviderRequest = {
    serverId: string;
    cacheKey: string;
    valueRef: string;
    ttlSeconds?: number;
    tags: readonly string[];
};
export type McpCacheProviderResult = {
    cacheKey?: string;
    status: "cached" | "already_cached" | "pending";
    expiresAt?: string;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpCacheProvider = (request: McpCacheProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpCacheProviderResult> | McpCacheProviderResult;
export type McpCacheEnvelope = {
    serverId: string;
    cacheKey: string;
    valueRef: string;
    ttlSeconds?: number;
    tags: readonly string[];
    state: "planned" | "cached" | "already_cached" | "pending";
    writesCache: boolean;
    expiresAt?: string;
    source: "mockable-envelope" | "runtime-provider";
};
export type McpCacheOutput = {
    kind: "agentCore.basicTool.mcp.cache";
    target: McpCacheTarget;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpCachePermission[];
    unsafeSideEffects: true;
    acceptedScopes: readonly string[];
    writesCache: boolean;
    cachePlan: {
        serverId: string;
        cacheKey: string;
        valueRef: string;
        ttlSeconds?: number;
        tags: readonly string[];
    };
    cacheEnvelope: McpCacheEnvelope;
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpCacheErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "MISSING_CACHE_KEY" | "INVALID_CACHE_KEY" | "MISSING_CACHE_VALUE_REF" | "INVALID_CACHE_VALUE_REF" | "INVALID_CACHE_TTL" | "INVALID_TAGS" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpCacheResult = McpToolResult<McpCacheOutput, McpCacheErrorCode>;
export declare const mcpCacheDescriptor: {
    readonly toolId: "mcp.cache";
    readonly capability: "cache-mcp-data";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.cache";
    readonly permissionsRequired: readonly ["mcp:read", "mcp:write", "cache:write"];
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly runtimeOwnsMcpClient: true;
    readonly permissionsRequiredForCacheWrite: readonly ["mcp:read", "mcp:write", "cache:write"];
    readonly unsafeSideEffects: true;
    readonly providerBoundary: "BaseToolExecutorPort.mcp.cache";
};
export declare function planMcpCache(request?: unknown): McpCacheResult;
export declare function executeMcpCache(request?: unknown, provider?: McpCacheProvider): Promise<McpCacheResult>;
