import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback, RenderResultOptions } from "@oh-my-pi/pi-agent-core"; import { type Component } from "@oh-my-pi/pi-tui"; import * as z from "zod/v4"; 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"; import type { Theme } from "../modes/theme/theme"; import type { ToolSession } from "."; import type { OutputMeta } from "./output-meta"; declare const debugSchema: z.ZodObject<{ action: z.ZodEnum<{ attach: "attach"; continue: "continue"; custom_request: "custom_request"; data_breakpoint_info: "data_breakpoint_info"; disassemble: "disassemble"; evaluate: "evaluate"; launch: "launch"; loaded_sources: "loaded_sources"; modules: "modules"; output: "output"; pause: "pause"; read_memory: "read_memory"; remove_breakpoint: "remove_breakpoint"; remove_data_breakpoint: "remove_data_breakpoint"; remove_instruction_breakpoint: "remove_instruction_breakpoint"; scopes: "scopes"; sessions: "sessions"; set_breakpoint: "set_breakpoint"; set_data_breakpoint: "set_data_breakpoint"; set_instruction_breakpoint: "set_instruction_breakpoint"; stack_trace: "stack_trace"; step_in: "step_in"; step_out: "step_out"; step_over: "step_over"; terminate: "terminate"; threads: "threads"; variables: "variables"; write_memory: "write_memory"; }>; program: z.ZodOptional; args: z.ZodOptional>; adapter: z.ZodOptional; cwd: z.ZodOptional; file: z.ZodOptional; line: z.ZodOptional; function: z.ZodOptional; name: z.ZodOptional; condition: z.ZodOptional; hit_condition: z.ZodOptional; expression: z.ZodOptional; context: z.ZodOptional; frame_id: z.ZodOptional; scope_id: z.ZodOptional; variable_ref: z.ZodOptional; pid: z.ZodOptional; port: z.ZodOptional; host: z.ZodOptional; levels: z.ZodOptional; memory_reference: z.ZodOptional; instruction_reference: z.ZodOptional; instruction_count: z.ZodOptional; instruction_offset: z.ZodOptional; count: z.ZodOptional; data: z.ZodOptional; data_id: z.ZodOptional; access_type: z.ZodOptional>; command: z.ZodOptional; arguments: z.ZodOptional>; offset: z.ZodOptional; resolve_symbols: z.ZodOptional; allow_partial: z.ZodOptional; start_module: z.ZodOptional; module_count: z.ZodOptional; timeout: z.ZodOptional; }, z.core.$strip>; export type DebugParams = z.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 { } export declare const debugToolRenderer: { 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 { private readonly session; readonly name = "debug"; readonly label = "Debug"; readonly summary = "Debug a running process with DAP (debugger adapter protocol)"; readonly description: string; readonly parameters: z.ZodObject<{ action: z.ZodEnum<{ attach: "attach"; continue: "continue"; custom_request: "custom_request"; data_breakpoint_info: "data_breakpoint_info"; disassemble: "disassemble"; evaluate: "evaluate"; launch: "launch"; loaded_sources: "loaded_sources"; modules: "modules"; output: "output"; pause: "pause"; read_memory: "read_memory"; remove_breakpoint: "remove_breakpoint"; remove_data_breakpoint: "remove_data_breakpoint"; remove_instruction_breakpoint: "remove_instruction_breakpoint"; scopes: "scopes"; sessions: "sessions"; set_breakpoint: "set_breakpoint"; set_data_breakpoint: "set_data_breakpoint"; set_instruction_breakpoint: "set_instruction_breakpoint"; stack_trace: "stack_trace"; step_in: "step_in"; step_out: "step_out"; step_over: "step_over"; terminate: "terminate"; threads: "threads"; variables: "variables"; write_memory: "write_memory"; }>; program: z.ZodOptional; args: z.ZodOptional>; adapter: z.ZodOptional; cwd: z.ZodOptional; file: z.ZodOptional; line: z.ZodOptional; function: z.ZodOptional; name: z.ZodOptional; condition: z.ZodOptional; hit_condition: z.ZodOptional; expression: z.ZodOptional; context: z.ZodOptional; frame_id: z.ZodOptional; scope_id: z.ZodOptional; variable_ref: z.ZodOptional; pid: z.ZodOptional; port: z.ZodOptional; host: z.ZodOptional; levels: z.ZodOptional; memory_reference: z.ZodOptional; instruction_reference: z.ZodOptional; instruction_count: z.ZodOptional; instruction_offset: z.ZodOptional; count: z.ZodOptional; data: z.ZodOptional; data_id: z.ZodOptional; access_type: z.ZodOptional>; command: z.ZodOptional; arguments: z.ZodOptional>; offset: z.ZodOptional; resolve_symbols: z.ZodOptional; allow_partial: z.ZodOptional; start_module: z.ZodOptional; module_count: z.ZodOptional; timeout: z.ZodOptional; }, z.core.$strip>; readonly strict = true; readonly concurrency = "exclusive"; readonly loadMode = "discoverable"; constructor(session: ToolSession); static createIf(session: ToolSession): DebugTool | null; execute(_toolCallId: string, params: DebugParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback, _context?: AgentToolContext): Promise>; } export {};