import type { PendingPreview } from "../edits/rows.js"; import type { InterruptResponse } from "../../runtime/interrupts.js"; import type { DebugStopData } from "../../runtime/debugger.js"; import type { Checkpoint } from "../../runtime/state/checkpointStore.js"; import type { FunctionParameter } from "../../types.js"; import type { GuardTripData } from "../guardAnswer.js"; import { type BusyEntry, type DebuggerCommand, type DebuggerIO, type DebuggerMode } from "../types.js"; import type { Channel } from "./channel.js"; /** A checkpoint as it crosses the channel: plain JSON, native types * (dates, sets) replaced the way the trace writer and `onCheckpoint` * replace them. The driver hands `render` the checkpoint off the * interrupt, which is already JSON, and the selector the store's own * `Checkpoint` instances, so both shapes are taken. */ export declare function checkpointToWire(checkpoint: Checkpoint | object): unknown; export declare class ChannelDebuggerIO implements DebuggerIO { private readonly channel; private readonly warn; private nextId; private pending; private closed; private pauseListeners; /** `warn` takes the one line printed when the debugger at the other * end fails; the program's stderr by default. */ constructor(channel: Channel, warn?: (line: string) => void); /** A reply. One that carries the UI's error, or a result of the wrong * shape for its method, ends the session: the program must never fail * because its debugger did, so the failure becomes a detach, with one * line on stderr saying why. */ private receive; /** End the session from this side: every waiting call is rejected with * `DebuggerDetached` through the channel's close, and the program runs * on without a debugger. */ private failSession; /** Every call still waiting is told the other side is gone. */ private closeAll; /** A request keeps the process alive until its reply: the program is * stopped, waiting on the debugger, and may hold no other handle. */ private request; private notice; log(line: string): void; setMode(mode: DebuggerMode): void; setPending(preview: PendingPreview): void; setBusy(entries: BusyEntry[]): void; onPause(listener: () => void): void; render(checkpoint?: Checkpoint, stop?: DebugStopData, interruptId?: string): Promise; waitForCommand(): Promise; showRewindSelector(checkpoints: Checkpoint[]): Promise; answerGuardTrip(data: GuardTripData): Promise; showCheckpointsPanel(checkpoints: Checkpoint[]): Promise; promptForNodeArgs(parameters: FunctionParameter[]): Promise; promptForInput(prompt: string): Promise; appendStdout(text: string): void; renderActivityOnly(): void; startSpinner(): void; stopSpinner(): void; /** The UI at the other end outlives any one call; closing the channel * is how the session ends. */ destroy(): void; }