import type { PartiesMessage } from "../../debugger/attach/protocol.js"; import type { Checkpoint } from "../../runtime/state/checkpointStore.js"; import type { DebugStopData } from "../../runtime/debugger.js"; import { type FrameView } from "./readers.js"; export type WhereInput = { program: string; node: string; pid: number; parties: PartiesMessage; recent: string[]; /** The driver's line for each edit queued at the stop. */ edits: string[]; checkpoint: Checkpoint | undefined; stop: DebugStopData | undefined; /** The stop's source line, when the module's map is on disk. */ line: number | undefined; /** The statement's text, when the source is on disk. */ statement: string | undefined; /** The program's own interrupt the stop is beside, if any. */ interruptId: string | undefined; }; export type WhereJson = { pid: number; program: string; node: string; stopped: true; stop: { scope: string; label: string | null; moduleId: string; line: number | null; statement: string | null; depth: number; branchPath: string[]; } | null; stack: FrameView[]; threads: { id: string; label: string | null; parentId: string | null; messages: number; active: boolean; }[]; branches: { key: string; label: string; owner: string; status: string; path: string[]; }[]; guards: { label: string | null; dimension: string; spent: number; limit: number; disarmed: boolean; root: boolean; }[]; usage: { totalTokens: number; totalCost: number; }; parties: { terminal: boolean; cli: boolean; }; recent: string[]; edits: string[]; interruptId: string | null; }; export declare function whereJson(input: WhereInput): WhereJson; export declare function whereText(input: WhereInput): string; export declare function guardWords(guard: WhereJson["guards"][number]): string; export declare function duration(ms: number): string; /** The line `where` prints for a program that is running. */ export declare function runningText(program: string, pid: number, parties: PartiesMessage): string;