import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpCancelPermission = "mcp:cancel" | "mcp:control";
export type McpCancelContext = {
    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 McpCancelPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpCancelTarget = {
    serverId: string;
    executionId: string;
    reason?: string;
    force?: boolean;
};
export type McpCancelRequest = {
    target?: Partial<McpCancelTarget> | null;
    context?: McpCancelContext;
};
export type McpCancelProviderRequest = McpCancelTarget;
export type McpCancelProviderResult = {
    executionId?: string;
    status: "cancelled" | "not_found" | "already_finished" | "pending";
    serverId?: string;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpCancelProvider = (request: McpCancelProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpCancelProviderResult> | McpCancelProviderResult;
export type McpCancelEnvelope = {
    transport: "mcp";
    operation: "cancel";
    serverId: string;
    executionId: string;
    reason?: string;
    force: boolean;
    state: "planned" | "cancelled" | "not_found" | "already_finished" | "pending";
};
export type McpCancelOutput = {
    kind: "agentCore.basicTool.mcp.cancel";
    target: McpCancelTarget;
    cancelEnvelope: McpCancelEnvelope;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpCancelPermission[];
    unsafeSideEffects: true;
    acceptedScopes: readonly string[];
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpCancelErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "MISSING_EXECUTION_ID" | "INVALID_EXECUTION_ID" | "INVALID_REASON" | "INVALID_FORCE" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpCancelResult = McpToolResult<McpCancelOutput, McpCancelErrorCode>;
export declare const mcpCancelDescriptor: {
    readonly toolId: "mcp.cancel";
    readonly capability: "cancel-mcp-execution";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.execution";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly runtimeOwnsMcpClient: true;
    readonly permissionsRequired: readonly ["mcp:cancel"];
    readonly unsafeSideEffects: true;
    readonly providerBoundary: "BaseToolExecutorPort.mcp.cancelExecution";
};
export declare function planMcpCancel(request?: unknown): McpCancelResult;
export declare function executeMcpCancel(request?: unknown, provider?: McpCancelProvider): Promise<McpCancelResult>;
