/** * The screen kinds a prompt observation publishes (Issue #3755, #3746 A-3). * * ## Why a vocabulary of its own * * `promptData.type` (`yes_no` / `multiple_choice` / `unclassified`) says how a * parsed prompt is answered, and agy's status detector * (`detection/tools/antigravity/detect.ts`) publishes the folder-trust screen, * the `/model` picker and the slash popup under ONE reason * (`antigravity_selection_list`). Neither can say "this is the trust screen and * not the picker", which is exactly what a caller about to answer one of them * has to be sure of (#3746 P4-1). So the values a caller may branch on — and * that the strict `respond` (#3756) may make a send condition — live here, and * are never mixed into `promptData.type` or read back from the detector's * reason. * * A kind is added only for a screen whose reading is pinned to a measured * frame. Everything else that waits on a human is `unknown`: an unmeasured * screen must not borrow a measured screen's name. * * ## No imports, on purpose * * The CLI (`tsconfig.cli.json`) compiles with `"paths": {}` and reaches a * module under `src/lib` only by a relative path whose graph uses no `@/` * alias (the arrangement `lib/session/prompt-view` documents). `prompt` and * `wait` import these values from here rather than restating them. * * @module lib/prompt-observation/kinds */ /** `schemaVersion` of the observation payload. Bumped when a field changes meaning. */ export declare const PROMPT_OBSERVATION_SCHEMA_VERSION = 1; /** * Every kind an observation can publish. * * - `antigravity-trust` — agy's first-run folder trust screen (`Do you trust * the contents of this project?` over `> Yes, I trust this folder` / * `No, exit`). Unnumbered; Enter confirms the highlighted row. * - `antigravity-model-picker` — agy's `/model` picker (`Switch Model`): the * 1.1.27 layout (`antigravity-live-2364/picker-switch-model.txt`) and the * 1.4 one with a search box (`prompt-observation-3797/`, Issue #3797). * - `antigravity-permission` — agy's numbered permission dialog (command * execution, file creation; `tests/fixtures/antigravity-live-2364/dialog-*`), * ending on its `tab Amend` footer. agy's numbered login-method screen is * not one (`unknown`). * - `antigravity-slash-menu` — agy's slash-command popup. * - `composer` — no confirmation: the agent sits at its input box. * - `none` — no confirmation, and not at the input box either (working). * - `unknown` — something waits on a human and no measured reading names it. */ export declare const PROMPT_OBSERVATION_KINDS: readonly ["antigravity-trust", "antigravity-model-picker", "antigravity-permission", "antigravity-slash-menu", "composer", "none", "unknown"]; export type PromptObservationKind = (typeof PROMPT_OBSERVATION_KINDS)[number]; /** The two kinds that mean "nothing on screen is asking for a decision". */ export declare const NO_PROMPT_OBSERVATION_KINDS: readonly PromptObservationKind[]; /** Whether `value` is one of {@link PROMPT_OBSERVATION_KINDS}. */ export declare function isPromptObservationKind(value: unknown): value is PromptObservationKind; /** Whether `kind` is a screen that asks for a decision (neither `composer` nor `none`). */ export declare function isDecisionKind(kind: PromptObservationKind): boolean; /** * The kinds the strict `respond` (Issue #3756) answers. Every other kind is * refused before a key: the `/model` picker's effort slider is not read, the * slash popup is a menu of the composer, and `unknown` is never answered. */ export declare const STRICT_RESPOND_KINDS: readonly ["antigravity-trust", "antigravity-permission"]; export type StrictRespondKind = (typeof STRICT_RESPOND_KINDS)[number]; /** Whether `kind` is one of {@link STRICT_RESPOND_KINDS}. */ export declare function isStrictRespondKind(kind: unknown): kind is StrictRespondKind; /** * Strict kinds whose rows carry no number: answered only by a label, which is * sent as ↑/↓ and Enter. An option number or `--default` is refused there. */ export declare const UNNUMBERED_STRICT_RESPOND_KINDS: readonly StrictRespondKind[]; /** * Per strict kind, the answer whose consequence is the agent exiting (Issue * #3788): its 1-based position, valid only on a screen that shows exactly * `optionCount` options AND whose row at that position reads `label`. agy's * trust screen offers `Yes, I trust this folder` then `No, exit` (measured: * `tests/fixtures/prompt-observation-3755/antigravity-trust.txt`, * `antigravity-live-2364/trust-dialog.txt`), and agy exits on the second. * * The three conditions only narrow: a screen drawn in another order, with * another number of rows, or with another wording has no exiting answer, and * its outcome stays `indeterminate` (exit 41). * * Only after such an answer may a shell back in front of the pane be read as * the session having ended: after any other answer it is the agent falling * over (a crash, a failed start), which the answer did not ask for. A kind * absent here has no exiting answer. */ export declare const EXITING_STRICT_ANSWERS: Readonly>>; /** * Whether answering option `position` (1-based) of a `kind` screen showing * `options` (labels in draw order) exits the agent: the declared position, the * declared number of options, and the declared label at that position (runs of * spaces folded, ends trimmed; case kept). */ export declare function isExitingStrictAnswer(kind: StrictRespondKind, position: number, options: readonly string[]): boolean; //# sourceMappingURL=kinds.d.ts.map