import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpInvalidateCacheScope = "server" | "resources" | "tools" | "all";
export type McpInvalidateCachePermission = "mcp:cache:invalidate";
export type McpInvalidateCacheContext = {
    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 McpInvalidateCachePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpInvalidateCacheTarget = {
    serverId: string;
    scope: McpInvalidateCacheScope;
    cacheKey?: string;
    reason?: string;
};
export type McpInvalidateCacheRequest = {
    target?: Partial<McpInvalidateCacheTarget> | null;
    context?: McpInvalidateCacheContext;
};
export type McpInvalidateCacheProviderRequest = McpInvalidateCacheTarget;
export type McpInvalidateCacheProviderResult = {
    scope?: McpInvalidateCacheScope;
    cacheKey?: string;
    status: "invalidated" | "not_found" | "pending";
    invalidatedCount?: number;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpInvalidateCacheProvider = (request: McpInvalidateCacheProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpInvalidateCacheProviderResult> | McpInvalidateCacheProviderResult;
export type McpCacheInvalidationEnvelope = {
    serverId: string;
    scope: McpInvalidateCacheScope;
    cacheKey?: string;
    reason?: string;
    invalidationState: "planned" | "invalidated" | "not_found" | "pending";
    state: "planned" | "invalidated" | "not_found" | "pending";
    invalidatedCount?: number;
    source: "mockable-envelope" | "runtime-provider";
};
export type McpInvalidateCacheOutput = {
    kind: "agentCore.basicTool.mcp.invalidateCache";
    target: McpInvalidateCacheTarget;
    operationPreview: McpCacheInvalidationEnvelope;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpInvalidateCachePermission[];
    unsafeSideEffects: true;
    acceptedScopes: readonly string[];
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpInvalidateCacheErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "MISSING_SCOPE" | "INVALID_SCOPE" | "INVALID_CACHE_KEY" | "INVALID_REASON" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpInvalidateCacheResult = McpToolResult<McpInvalidateCacheOutput, McpInvalidateCacheErrorCode>;
export declare const mcpInvalidateCacheDescriptor: {
    readonly toolId: "mcp.invalidateCache";
    readonly capability: "invalidate-mcp-cache";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.cache";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly runtimeOwnsMcpClient: true;
    readonly permissionsRequired: readonly ["mcp:cache:invalidate"];
    readonly unsafeSideEffects: true;
    readonly providerBoundary: "BaseToolExecutorPort.mcp.invalidateCache";
};
export declare function planMcpCacheInvalidation(request?: unknown): McpInvalidateCacheResult;
export declare function executeMcpCacheInvalidation(request?: unknown, provider?: McpInvalidateCacheProvider): Promise<McpInvalidateCacheResult>;
