Skip to main content

Module pane_confirm

Module pane_confirm 

Source
Expand description

A question srv asks the person in the pane it is about, as a modal that covers only that pane (docs/specs/SPEC_AGENT_SPAWN_NOTICE_IN_THE_PANE_2026_11_08.md §6 rows 3 and 6): add a host to the ssh config, remove or install AgentMux’s helper, end a durable session, run a system tool’s install command. Each is the confirmation of the person’s own click in a pane (Remotes, Toolchain, a terminal), so the question belongs to that pane. It used to open an approval window over the whole AgentMux window.

Unlike an agent’s notice (agent_notice), nothing goes ahead by itself: only an answered yes does. No answer in ASK_FOR, a closed pane, or no window connected all leave the thing undone.

The person’s answer comes only through pane.confirm.decide, accepted only from the proven AgentMux window (operator_only), and the modal is drawn where an agent’s UI tool can neither read nor press it. So an agent that calls one of these commands with srv’s key still can’t answer its own question, which is what the approval window was for.

Structs§

Answer
The person’s answer. answered is false when the time ran out, the pane was closed, or the caller went away.
CommandPaneConfirmDecideData
Data for pane.confirm.decide: the question’s id (from pane:confirm).
Ending 🔒
Entry 🔒
PaneConfirmDecideResult
How the answer came out: too_late when srv had stopped waiting.
PaneConfirmView
A question as the pane draws it: pending, or its end (cleared).
Question
What the person is asked. Built by srv from its own record, never from an agent’s words.

Constants§

ASK_FOR
How long the person has to answer.
COMMAND_PANE_CONFIRM_DECIDE
The person’s answer to a question.
EVENT_PANE_CONFIRM
KEEP_FINISHED_MS 🔒
A settled question stays answerable (as “too late”) this long.
REPLAY_EVENTS 🔒
How many events are kept for a window that opens while a question waits.

Statics§

ENTRIES 🔒

Functions§

ask
Ask question in pane block_id and wait for the person’s answer. Err when there is no window connected to ask in: whatever needed the answer must not happen, nor wait.
ask_for
ask that waits window for the answer.
decide
The person’s answer to question id.
entries 🔒
pending
The questions still waiting.
register
pane.confirm.decide, accepted only from the proven AgentMux window (operator_only), never from an agent: the answer is the person’s own.
settle 🔒
End question id with the person’s answer if they gave one, else unanswered. After this it answers “too late”.