/** * ask Command - one round trip to another agent session (Issue #2376) * * commandmate ask "" [--instance ] * [--agent ] [--timeout ] [--json] * * ## Why this exists next to send / wait / capture * * Delegation between two agent sessions was a HARNESS, not a command. Session A * had to `send`, then `wait`, then branch on four exit codes, then `capture` and * work out which part of the pane was the reply — and every one of those steps * is a place to get it wrong in a way that fails quietly. Dropping the `wait` * spins; reading the pane without one reads the previous turn; answering the * other session's prompt with `respond` picks whatever option happened to be * highlighted (#1681). * * `ask` is those three steps with the branch already taken. It is deliberately * NOT a new mechanism: the send is the same POST, the wait is `wait`'s own * {@link pollWorktree}, and the exit codes are `wait`'s exit codes. What it adds * is the last step nothing had — turning "the turn ended" into "here is what * they said" — and the two guarantees the brief in the GUI promises: `--auto-yes` * is not offered, and a prompt is reported rather than answered. * * ## Where the reply comes from (Issue #4344) * * The ask's own id, never "the newest reply". Before the send `ask` reads the * server's attribution table (`GET /api/asks/capabilities`); on a tool it marks * true the send names a fresh id, the server stamps an envelope on the typed * text, and after the turn `ask` reads that id's attribution * (`GET /api/asks/:askId`). The reply is printed only when it is `matched` — * the transcript tied this input to the completed turn that answered it alone. * Every other outcome prints `reply: null` with the state and the reason, and * exits 0: a tool the table marks false (`tool_unsupported`), a server with no * table (`server_unsupported`, sent with the old body), a command body * (`slash_command`), a shared or unfinished turn. The pane is never read for a * reply (the human decision of 2026-11-13, design * `docs/design/ask-attribution-4344.md` §0.2・§7): the screen picked another * turn's answer twice (#4315). `--json`'s `source` is `history` or `none`. */ import { Command } from 'commander'; export declare function createAskCommand(): Command; //# sourceMappingURL=ask.d.ts.map