import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpDisconnectPermission = "mcp:disconnect";
export type McpDisconnectContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: {
        accepted?: boolean;
        allowed?: boolean;
        reason?: string;
    };
    allowedServerIds?: readonly string[];
    grantedPermissions?: readonly McpDisconnectPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpDisconnectTarget = {
    serverId: string;
    connectionId?: string;
    reason?: string;
    force: boolean;
};
export type McpDisconnectProviderRequest = McpDisconnectTarget;
export type McpDisconnectRequest = {
    target?: Partial<McpDisconnectTarget> | null;
    context?: McpDisconnectContext;
};
export type McpDisconnectEnvelope = {
    serverId: string;
    connectionId?: string;
    reason?: string;
    force: boolean;
    connectionState: "disconnect-planned" | "disconnected" | "not_found" | "already_disconnected";
    status?: string;
};
export type McpDisconnectProviderResult = {
    connectionId?: string;
    status: "disconnected" | "not_found" | "already_disconnected";
    serverId?: string;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpDisconnectProvider = (request: McpDisconnectProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpDisconnectProviderResult> | McpDisconnectProviderResult;
export type McpDisconnectOutput = {
    kind: "agentCore.basicTool.mcp.disconnect";
    target: McpDisconnectTarget;
    operationPreview: McpDisconnectEnvelope;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpDisconnectPermission[];
    unsafeSideEffects: true;
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpDisconnectErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "INVALID_CONNECTION_ID" | "INVALID_REASON" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpDisconnectResult = McpToolResult<McpDisconnectOutput, McpDisconnectErrorCode>;
export declare const mcpDisconnectDescriptor: {
    readonly toolId: "mcp.disconnect";
    readonly capability: "disconnect-mcp-server";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.connection";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly permissionsRequired: readonly ["mcp:disconnect"];
};
export declare function planMcpDisconnect(request?: unknown): McpDisconnectResult;
export declare function executeMcpDisconnect(request?: unknown, provider?: McpDisconnectProvider): Promise<McpDisconnectResult>;
