import { type McpToolResult } from "../../_shared/baseToolAdapter.js";
export type McpNativeExecutePermission = "mcp:native-execute" | "mcp:raw";
export type McpNativeExecuteErrorBoundary = "input" | "context" | "scope" | "permission" | "governance" | "contract" | "provider";
export type McpNativeExecuteContext = {
    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 McpNativeExecutePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type McpNativeExecuteTarget = {
    serverId: string;
    method: string;
    params: Readonly<Record<string, unknown>>;
    protocolVersion?: string;
    idempotencyKey?: string;
};
export type McpNativeExecuteRequest = {
    target?: {
        serverId?: unknown;
        method?: unknown;
        params?: unknown;
        protocolVersion?: unknown;
        idempotencyKey?: unknown;
    } | null;
    context?: McpNativeExecuteContext;
};
export type McpNativeExecuteProviderRequest = McpNativeExecuteTarget;
export type McpNativeExecuteProviderResult = {
    status: "executed" | "pending" | "rejected";
    result?: unknown;
    providerMetadata?: Readonly<Record<string, unknown>>;
    raw?: unknown;
};
export type McpNativeExecuteProvider = (request: McpNativeExecuteProviderRequest, context: Readonly<Record<string, unknown>>) => Promise<McpNativeExecuteProviderResult> | McpNativeExecuteProviderResult;
export type McpNativeExecuteEnvelope = {
    transport: "mcp";
    operation: "nativeExecute";
    serverId: string;
    method: string;
    params: Readonly<Record<string, unknown>>;
    protocolVersion?: string;
    idempotencyKey?: string;
    state: "planned" | "executed" | "pending" | "rejected";
    result?: unknown;
};
export type McpNativeExecuteOutput = {
    kind: "agentCore.basicTool.mcp.nativeExecute";
    target: McpNativeExecuteTarget;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly McpNativeExecutePermission[];
    unsafeSideEffects: true;
    acceptedScopes: readonly string[];
    nativeEnvelope: McpNativeExecuteEnvelope;
    providerMetadata?: Readonly<Record<string, unknown>>;
};
export type McpNativeExecuteErrorCode = "INVALID_REQUEST" | "INVALID_CONTEXT" | "MISSING_SERVER_ID" | "INVALID_SERVER_ID" | "MISSING_METHOD" | "INVALID_METHOD" | "INVALID_PARAMS" | "INVALID_PROTOCOL_VERSION" | "INVALID_IDEMPOTENCY_KEY" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "REAL_EXECUTION_BLOCKED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type McpNativeExecuteResult = McpToolResult<McpNativeExecuteOutput, McpNativeExecuteErrorCode>;
export declare const mcpNativeExecuteDescriptor: {
    readonly toolId: "mcp.nativeExecute";
    readonly capability: "execute-native-mcp-call";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.mcpBase.execution";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly runtimeOwnsMcpClient: true;
    readonly permissionsRequired: readonly ["mcp:native-execute", "mcp:raw"];
    readonly unsafeSideEffects: true;
    readonly providerBoundary: "BaseToolExecutorPort.mcp.nativeExecute";
};
export declare function planMcpNativeExecute(request?: unknown): McpNativeExecuteResult;
export declare function executeMcpNativeExecute(request?: unknown, provider?: McpNativeExecuteProvider): Promise<McpNativeExecuteResult>;
