import type { CheckpointEdit } from "../../runtime/state/checkpointPatch/index.js"; import type { PaneName, PaneRow, RowKind, StopView } from "./rows.js"; /** Whether an action is offered on a row, or why not, which the footer * prints. */ export type Offered = { offered: true; } | { offered: false; reason: string; }; /** The one value an action asks the person to type, if any: the message * text, a local's value as JSON, a guard's amount. */ export type Asks = { label: string; kind: "text" | "json" | "amount"; }; /** An edit the debugger offers, anchored to the pane row it acts on. * The terminal reads the table to put the key on the row, print the * footer hint, and run the edit; `agency debug session` exposes each * row as an `edit` verb. Neither names an action. */ export type EditAction = { /** The verb: `append-message`, and the row's id in `--json`. */ name: string; /** The pane and the kind of row the edit sits on. */ anchor: { pane: PaneName; row: RowKind; }; /** The key on that row, which the footer prints. */ key: string; /** The footer word for the row: "send", "set", "disarm". */ hint: (row: PaneRow, view: StopView) => string; /** The palette sentence, of the row: "disarm the guard research". */ sentence: (row: PaneRow, view: StopView) => string; applies: (row: PaneRow, view: StopView) => Offered; asks?: Asks; /** The edits the row and the typed value mean. */ toEdits: (row: PaneRow, value: unknown, view: StopView) => CheckpointEdit[]; }; /** Every edit the debugger offers. A new edit is one record here and * one test; the panes and the verbs read the table. */ export declare const EDIT_ACTIONS: EditAction[]; /** The actions offered on `row` at `view`, in table order. */ export declare function actionsFor(row: PaneRow, view: StopView): EditAction[]; export declare function actionByName(name: string): EditAction | undefined; /** The label the one-line form shows for `action` on `row`: the field's * own words, after the row's name when the field is a value. */ export declare function askLabel(action: EditAction, row: PaneRow): string;