import type { BaseToolDebugStackFrame, BaseToolDebugVariable } from "../../../../../agentCore/agent_executionEngine/basic_toolLayer/baseTools/baseToolExecutorPort.js";
import type { CodeToolResult } from "../../_shared/baseToolAdapter.js";
export type CodeDebugCaptureStateBoundary = "input" | "contract" | "governance" | "scope" | "provider";
export type CodeDebugCaptureTargetKind = "debug-session" | "process" | "test-run" | "workspace";
export type CodeDebugCaptureTarget = {
    kind?: CodeDebugCaptureTargetKind;
    id?: string;
    cwd?: string;
};
export type CodeDebugCaptureOptions = {
    includeStack?: boolean;
    includeVariables?: boolean;
    includeBreakpoints?: boolean;
    maxVariables?: number;
};
export type CodeDebugGate = {
    accepted?: boolean;
    allowed?: boolean;
    reason?: string;
};
export type CodeDebugContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: CodeDebugGate;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type CodeDebugCaptureStateRequest = {
    context?: CodeDebugContext;
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    target?: CodeDebugCaptureTarget;
    capture?: CodeDebugCaptureOptions;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    guard?: CodeDebugGate;
    contract?: CodeDebugGate;
    governance?: CodeDebugGate;
    provider?: CodeDebugCaptureStateProvider;
};
export type CodeDebugCaptureStateErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_TARGET" | "MISSING_TARGET_ID" | "INVALID_CAPTURE_LIMIT" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_DEBUG_CAPTURE_NOT_ALLOWED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_FAILURE";
export type CodeDebugCaptureStateError = {
    code: CodeDebugCaptureStateErrorCode;
    message: string;
    boundary: CodeDebugCaptureStateBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type CodeDebugCaptureStatePlan = {
    toolName: "code.debugCaptureState";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    target: {
        kind: CodeDebugCaptureTargetKind;
        id: string;
        cwd?: string;
    };
    permissions: readonly ["debug:read"];
    capture: Required<CodeDebugCaptureOptions>;
    execution: {
        dryRun: true;
        captured: false;
        unsafeSideEffects: false;
    };
    audit: {
        governanceRequired: true;
        tapHandoffReady: true;
    };
    storage: {
        logic: {
            persisted: false;
        };
        records: readonly {
            toolName: "code.debugCaptureState";
        }[];
    };
};
export type CodeDebugCaptureStateOutput = {
    kind: "agentCore.basicTool.code.debugCaptureState.output";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    target: {
        kind: CodeDebugCaptureTargetKind;
        id: string;
        cwd?: string;
    };
    capture: Required<CodeDebugCaptureOptions>;
    runtimeEntry: {
        owner: "runtime";
        port: "BaseToolExecutorPort.debug.captureState";
        method: "captureState";
    };
    dryRun: boolean;
    providerCalled: boolean;
    state: "running" | "paused" | "stopped" | "unknown" | "planned";
    stack: readonly BaseToolDebugStackFrame[];
    variables: readonly BaseToolDebugVariable[];
    breakpoints: readonly Readonly<Record<string, unknown>>[];
    truncated: boolean;
    unsafeSideEffects: false;
};
export type CodeDebugCaptureStateResult = {
    ok: true;
    plan: CodeDebugCaptureStatePlan;
    events: readonly string[];
} | {
    ok: false;
    error: CodeDebugCaptureStateError;
    events: readonly string[];
};
export type CodeDebugCaptureStateProvider = (request: {
    target: {
        kind: CodeDebugCaptureTargetKind;
        id: string;
        cwd?: string;
    };
    capture: Required<CodeDebugCaptureOptions>;
}, context: CodeDebugContext) => Promise<{
    state: "running" | "paused" | "stopped" | "unknown";
    stack?: readonly BaseToolDebugStackFrame[];
    variables?: readonly BaseToolDebugVariable[];
    breakpoints?: readonly Readonly<Record<string, unknown>>[];
}> | {
    state: "running" | "paused" | "stopped" | "unknown";
    stack?: readonly BaseToolDebugStackFrame[];
    variables?: readonly BaseToolDebugVariable[];
    breakpoints?: readonly Readonly<Record<string, unknown>>[];
};
export declare const codeDebugCaptureStateDescriptor: {
    readonly toolName: "code.debugCaptureState";
    readonly toolId: "code.debugCaptureState";
    readonly toolFamily: "codeBase.debugCode";
    readonly purpose: "capture debug state through runtime-owned debug support";
    readonly dryRunOnly: false;
    readonly unsafeSideEffects: false;
};
export declare function planCodeDebugCaptureState(request?: CodeDebugCaptureStateRequest): CodeDebugCaptureStateResult;
export declare function executeCodeDebugCaptureState(request?: CodeDebugCaptureStateRequest): Promise<CodeToolResult<CodeDebugCaptureStateOutput, CodeDebugCaptureStateErrorCode>>;
