import { Checkpoint, CheckpointStore } from "../runtime/state/checkpointStore.js"; import type { RuntimeContext } from "../runtime/state/context.js"; import { CheckpointArgs, SourceLocationOpts } from "../runtime/state/checkpointStore.js"; import type { AttachedDebugger } from "../runtime/attachedDebugger.js"; import type { BusyEntry } from "../runtime/waits.js"; export declare class DebuggerState { private mode; /** Told what the program is waiting on, a model request or a tool * call, each time that changes: the whole list of open waits * (`waits.ts`). The driver sets it; the runtime calls it. */ onWait?: (entries: BusyEntry[]) => void; /** The tokens of the waits last reported, so the same list is not * sent twice (`reportWaits`). */ reportedWaits: number[]; /** Set when this debugger was installed on a program something else is * running. The runtime's public entry points hand it every batch of * debug stops (`settleStops`), so the caller never sees one. */ attached?: AttachedDebugger; /** Attached: the key of the run being debugged (`debugRun.ts`), or * null when none has stopped yet. A step in any other run is let * through. */ ownedRun: string | null; /** The key of the run debugged last, so a new owner is told from the * same run taking the debugger again after a stop. */ private lastOwner; /** Whether a step in the run `key` is this debugger's to stop at. * Not attached, every run is; attached, the first run to ask claims * the debugger. A context with no key is treated as the run's own. A * run other than the last one starts clean: the rolling window and * the step target were the last run's, and a step back from the new * run's first stop must not land in the old run's state. The last * run's own continuation is not another run: a caller's resume of it * carries a new key and the one it came from (`resumedFrom`), and * keeps the window, so a step back reaches before the interrupt the * caller answered. */ owns(key: string | undefined, resumedFrom?: string): boolean; /** Whether a wait in the run `key` is shown: not attached, every * run's; attached with no owner yet, every run's, since the debugger * is nobody's and what the process is doing is what it should show; * attached with an owner, that run's only. Read-only, unlike `owns`: * a wait must never make its run the debugged one. */ showsRun(key: string): boolean; checkpoints: CheckpointStore; /** The depth of the step the debugger is stopped at: how many Agency * calls deep it is, with the node's statements at 0. The driver sets it * from the stop it shows (`DebugStopData.depth`); the stepping commands * set their targets from it. */ stopDepth: number; stepTarget: { type: "stepIn" | "stepOut" | "next"; targetDepth: number; } | null; private readonly rewindSize; constructor(rewindSize: number); stepping(): void; running(): void; isStepping(): boolean; isRunning(): boolean; /** Whether a step at `depth` is one the current command stops at: any * step when the command set no target (`step`), else a step no deeper * than the target. A deeper step is inside a call the command runs * over. */ shouldStopAt(depth: number): boolean; /** Record the depth of the step the debugger is stopping at. */ stoppedAt(depth: number): void; reset(): void; getMode(): "stepping" | "running"; stepIn(): void; stepNext(): void; stepOut(): void; loadCheckpoints(checkpoints: Checkpoint[]): void; pinCheckpoint(checkpointId: number, label?: string): void; cloneCheckpoint(checkpoint: Checkpoint, opts?: Partial): number; createRollingCheckpoint(ctx: RuntimeContext, opts: SourceLocationOpts): number; createPinnedCheckpoint(ctx: RuntimeContext, opts: SourceLocationOpts & { label: string | null; }): number; getCheckpoint(id: number): Checkpoint | undefined; getCheckpoints(): Checkpoint[]; findCheckpoint(location: SourceLocationOpts): Checkpoint | null; findBefore(beforeId: number, location: SourceLocationOpts): Checkpoint | null; prettyPrint(): string; deleteAfterCheckpoint(checkpointId: number): void; }