import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback, RenderResultOptions, ToolApprovalDecision } from "@oh-my-pi/pi-agent-core";
import type { ToolExample } from "@oh-my-pi/pi-ai";
import { type Component } from "@oh-my-pi/pi-tui";
import { type DapBreakpointRecord, type DapContinueOutcome, type DapDataBreakpointInfoResponse, type DapDataBreakpointRecord, type DapDisassembledInstruction, type DapEvaluateResponse, type DapFunctionBreakpointRecord, type DapInstructionBreakpointRecord, type DapModule, type DapScope, type DapSessionSummary, type DapSource, type DapStackFrame, type DapThread, type DapVariable } from "../dap/index.js";
import type { Theme } from "../modes/theme/theme.js";
import type { ToolSession } from "./index.js";
import type { OutputMeta } from "./output-meta.js";
/**
 * DAP debug actions that only read program state (no mutation, no execution).
 * Execution-side actions (`launch`, `attach`, `continue`, `step_*`, `pause`,
 * `evaluate`, breakpoint mutations, memory writes) are exec-tier.
 */
export declare const DEBUG_READONLY_ACTIONS: ReadonlySet<string>;
declare const debugSchema: import("arktype/internal/variants/object.ts").ObjectType<{
    action: "attach" | "continue" | "custom_request" | "data_breakpoint_info" | "disassemble" | "evaluate" | "launch" | "loaded_sources" | "modules" | "output" | "pause" | "read_memory" | "remove_breakpoint" | "remove_data_breakpoint" | "remove_instruction_breakpoint" | "scopes" | "sessions" | "set_breakpoint" | "set_data_breakpoint" | "set_instruction_breakpoint" | "stack_trace" | "step_in" | "step_out" | "step_over" | "terminate" | "threads" | "variables" | "write_memory";
    program?: string | undefined;
    args?: string[] | undefined;
    adapter?: string | undefined;
    cwd?: string | undefined;
    file?: string | undefined;
    line?: number | undefined;
    function?: string | undefined;
    name?: string | undefined;
    condition?: string | undefined;
    hit_condition?: string | undefined;
    expression?: string | undefined;
    context?: string | undefined;
    frame_id?: number | undefined;
    scope_id?: number | undefined;
    variable_ref?: number | undefined;
    pid?: number | undefined;
    port?: number | undefined;
    host?: string | undefined;
    levels?: number | undefined;
    memory_reference?: string | undefined;
    instruction_reference?: string | undefined;
    instruction_count?: number | undefined;
    instruction_offset?: number | undefined;
    count?: number | undefined;
    data?: string | undefined;
    data_id?: string | undefined;
    access_type?: "read" | "readWrite" | "write" | undefined;
    command?: string | undefined;
    arguments?: {
        [x: string]: unknown;
    } | undefined;
    offset?: number | undefined;
    resolve_symbols?: boolean | undefined;
    allow_partial?: boolean | undefined;
    start_module?: number | undefined;
    module_count?: number | undefined;
    timeout?: number | undefined;
}, {}>;
export type DebugParams = typeof debugSchema.infer;
export type DebugAction = DebugParams["action"];
interface DebugToolDetails {
    action: DebugAction;
    success: boolean;
    snapshot?: DapSessionSummary;
    sessions?: DapSessionSummary[];
    stackFrames?: DapStackFrame[];
    threads?: DapThread[];
    scopes?: DapScope[];
    variables?: DapVariable[];
    sources?: DapSource[];
    modules?: DapModule[];
    evaluation?: DapEvaluateResponse;
    breakpoints?: DapBreakpointRecord[];
    functionBreakpoints?: DapFunctionBreakpointRecord[];
    instructionBreakpoints?: DapInstructionBreakpointRecord[];
    dataBreakpoints?: DapDataBreakpointRecord[];
    dataBreakpointInfo?: DapDataBreakpointInfoResponse;
    disassembly?: DapDisassembledInstruction[];
    memoryAddress?: string;
    memoryData?: string;
    unreadableBytes?: number;
    bytesWritten?: number;
    customBody?: unknown;
    output?: string;
    adapter?: string;
    state?: DapContinueOutcome["state"];
    timedOut?: boolean;
    meta?: OutputMeta;
}
interface DebugRenderArgs extends Partial<DebugParams> {
}
export declare const debugToolRenderer: {
    animatedPartialResult: boolean;
    renderCall(args: DebugRenderArgs, _options: RenderResultOptions, theme: Theme): Component;
    renderResult(result: {
        content: Array<{
            type: string;
            text?: string;
        }>;
        details?: DebugToolDetails;
        isError?: boolean;
    }, options: RenderResultOptions, theme: Theme, args?: DebugRenderArgs): Component;
    mergeCallAndResult: boolean;
    inline: boolean;
};
export declare class DebugTool implements AgentTool<typeof debugSchema, DebugToolDetails> {
    private readonly session;
    readonly name = "debug";
    readonly approval: (args: unknown) => ToolApprovalDecision;
    readonly formatApprovalDetails: (args: unknown) => string[];
    readonly label = "Debug";
    readonly summary = "Debug a running process with DAP (debugger adapter protocol)";
    readonly description: string;
    readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
        action: "attach" | "continue" | "custom_request" | "data_breakpoint_info" | "disassemble" | "evaluate" | "launch" | "loaded_sources" | "modules" | "output" | "pause" | "read_memory" | "remove_breakpoint" | "remove_data_breakpoint" | "remove_instruction_breakpoint" | "scopes" | "sessions" | "set_breakpoint" | "set_data_breakpoint" | "set_instruction_breakpoint" | "stack_trace" | "step_in" | "step_out" | "step_over" | "terminate" | "threads" | "variables" | "write_memory";
        program?: string | undefined;
        args?: string[] | undefined;
        adapter?: string | undefined;
        cwd?: string | undefined;
        file?: string | undefined;
        line?: number | undefined;
        function?: string | undefined;
        name?: string | undefined;
        condition?: string | undefined;
        hit_condition?: string | undefined;
        expression?: string | undefined;
        context?: string | undefined;
        frame_id?: number | undefined;
        scope_id?: number | undefined;
        variable_ref?: number | undefined;
        pid?: number | undefined;
        port?: number | undefined;
        host?: string | undefined;
        levels?: number | undefined;
        memory_reference?: string | undefined;
        instruction_reference?: string | undefined;
        instruction_count?: number | undefined;
        instruction_offset?: number | undefined;
        count?: number | undefined;
        data?: string | undefined;
        data_id?: string | undefined;
        access_type?: "read" | "readWrite" | "write" | undefined;
        command?: string | undefined;
        arguments?: {
            [x: string]: unknown;
        } | undefined;
        offset?: number | undefined;
        resolve_symbols?: boolean | undefined;
        allow_partial?: boolean | undefined;
        start_module?: number | undefined;
        module_count?: number | undefined;
        timeout?: number | undefined;
    }, {}>;
    readonly strict = true;
    readonly examples: readonly ToolExample<typeof debugSchema.infer>[];
    readonly concurrency = "exclusive";
    readonly loadMode = "discoverable";
    constructor(session: ToolSession);
    static createIf(session: ToolSession): DebugTool | null;
    execute(_toolCallId: string, params: DebugParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<DebugToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<DebugToolDetails>>;
}
export {};
