import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpUnsubscribePermission = "mcp:subscription:write";
export type McpUnsubscribeContext = {
    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 McpUnsubscribePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpUnsubscribeTarget = {
    serverId: string;
    subscriptionId: string;
    reason?: string;
};
export type McpUnsubscribeProviderRequest = McpUnsubscribeTarget;
export type McpUnsubscribeRequest = {
    target?: Partial<McpUnsubscribeTarget> | null;
    context?: McpUnsubscribeContext;
};
export type McpUnsubscribeEnvelope = {
    subscriptionId: string;
    serverId: string;
    state: "cancel-planned" | "unsubscribed" | "not_found" | "already_unsubscribed";
    reason?: string;
    status?: string;
};
export type McpUnsubscribeProviderResult = {
    subscriptionId?: string;
    status: "unsubscribed" | "not_found" | "already_unsubscribed";
    serverId?: string;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpUnsubscribeProvider = (request: McpUnsubscribeProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpUnsubscribeProviderResult> | McpUnsubscribeProviderResult;
export type McpUnsubscribeOutput = {
    kind: "agentCore.basicTool.mcp.unsubscribe";
    target: McpUnsubscribeTarget;
    unsubscribeEnvelope: McpUnsubscribeEnvelope;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpUnsubscribePermission[];
    unsafeSideEffects: true;
    acceptedScopes: readonly string[];
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpUnsubscribeErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "MISSING_SUBSCRIPTION_ID" | "INVALID_SUBSCRIPTION_ID" | "INVALID_REASON" | "SCOPE_DENIED" | "PERMISSION_DENIED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpUnsubscribeResult = McpToolResult<McpUnsubscribeOutput, McpUnsubscribeErrorCode>;
export declare const mcpUnsubscribeDescriptor: {
    readonly toolId: "mcp.unsubscribe";
    readonly capability: "unsubscribe-mcp-events-or-resources";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.subscription";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["mcp:subscription:write"];
    readonly unsafeSideEffects: true;
};
export declare function planMcpUnsubscribe(request?: unknown): McpUnsubscribeResult;
export declare function executeMcpUnsubscribe(request?: unknown, provider?: McpUnsubscribeProvider): Promise<McpUnsubscribeResult>;
