import type { InvocationOptions } from "../runtime/invocationOptions.js"; import { FrameRecorder, type Frame, type InputSource, type KeyEvent } from "../tui/index.js"; import { DebuggerDriver } from "./driver.js"; import { DebuggerUI } from "./ui.js"; import type { Checkpoint } from "../runtime/state/checkpointStore.js"; /** * An InputSource a test feeds keys to. It gives no idle signal: the UI * reads a key while the program runs too, for the pause key, so a read * does not mean the person is being asked for anything. The session waits * on `DebuggerUI.waitForPerson` instead. */ export declare class TestInput implements InputSource { private keyQueue; private keyWaiters; feedKey(key: KeyEvent): void; nextKey(): Promise; nextLine(_prompt: string): Promise; destroy(): void; } type TestSessionOpts = { mod: any; args?: unknown[]; checkpoints?: Checkpoint[]; width?: number; height?: number; /** The policy and budget the run is started with, as `agency debug`'s * run flags give them; passed on every resume and rewind too. */ invocation?: InvocationOptions; }; /** * Thin wrapper that creates a DebuggerUI wired to test infrastructure. * Provides a step-at-a-time API for feeding keys and inspecting frames. */ export declare class DebuggerTestSession { private input; private labelingOutput; readonly recorder: FrameRecorder; readonly ui: DebuggerUI; readonly driver: DebuggerDriver; private runPromise; private result; private finished; private pressCount; private constructor(); static create(opts: TestSessionOpts): Promise; press(key: string, opts?: { times?: number; shift?: boolean; ctrl?: boolean; }): Promise; type(str: string): Promise; frame(): Frame; quit(): Promise; returnValue(): any; writeHTML(path: string): void; get isFinished(): boolean; /** Start the driver loop in the background and wait for it to ask the * person for its first command. */ private startDriver; } export {};