/** * prompt Command - Read the screen an agent is stopped on, once (Issue #3755) * * `commandmate prompt [--instance ] [--json]` prints one * observation (`GET /api/worktrees/:id/current-output?observe=1`, field * `promptObservation`): which kind of * screen is open (`lib/prompt-observation/kinds`), what it asks, an * observation token bound to it, and Auto-Yes as it bears on it. A supervising * agent reads this instead of guessing from `capture --pane` (#3746 P4-4). * * Exit codes: * - 0: the screen was read — including when nothing on it asks (`composer` / * `none`) and when no reader names it (`unknown`) * - 21: the instance has no running session, so there was no screen to read * (the NOT_STARTED value `wait` uses for the same fact) * - 1 / 2 / 99: infrastructure errors, as every other command */ import { Command } from 'commander'; import type { PromptObservation } from '../../lib/prompt-observation/types'; /** * The `current-output` request that carries an observation: `?observe=1`, and * the instance first so a reader of the URL sees the target where every other * poll puts it. */ export declare function observedCurrentOutputPath(worktreeId: string, instanceId?: string): string; /** * Whether a value is an observation this CLI can read. * * Checked rather than cast: a daemon older than the field sends none, and that * is "no observation", never a payload of another shape passed on as one. A * newer `schemaVersion` passes: `--json` and `wait` hand it on verbatim. */ export declare function isPromptObservation(value: unknown): value is PromptObservation; /** * The last send in the words a human reads (Issue #3759), or null when the * server holds no record or is older than the field. */ export declare function formatLastSend(lastSend: PromptObservation['lastSend'], now?: number): string | null; /** The observation in the words a human reads. */ export declare function formatPromptObservation(observation: PromptObservation, now?: number): string; export declare function createPromptCommand(): Command; //# sourceMappingURL=prompt.d.ts.map