Skip to main content

Module sensitive_window

Module sensitive_window 

Source
Expand description

The countdown for an approved sensitive request (SPEC_SUPER_AGENT_2026_10_25.md §5), beside pending_shutdown’s window for stops and closes. open starts the clock; the person can veto it, or approve it now to skip the wait. No click is needed to let it proceed: at the deadline the operation runs as the super agent’s approved act on behalf of the requester, through the runner registered for its operation. Each operation’s own code path runs unchanged, so no new power is added; only who may trigger it changes.

A veto or an approve-now is the person’s, and only the person’s: the RPC below accepts them only from the proven AgentMux window (operator_only), never from an agent. The banner, toast and chime that tell the person arrive with the next steps of the spec’s §9; the events here carry what they show.

The Sensitive routes start a countdown when the super agent approves. The runners, the code that does each operation, arrive with the later steps of that spec’s §9; an operation with none is not approved.

Structs§

CommandSensitiveDecideData
Data for sensitive.decide: the countdown’s request_id (from sensitive:pending).
Entry 🔒
SensitiveClearedEvent
sensitive:cleared: the countdown ended, and how.
SensitiveDecideResult
How the person’s decision came out: too_late when the countdown had begun or ended.
SensitiveView
A countdown as the person’s banner shows it.

Constants§

COMMAND_SENSITIVE_DECIDE
The person’s veto or approve-now of a countdown.
EVENT_SENSITIVE_CLEARED
EVENT_SENSITIVE_PENDING
KEEP_FINISHED_MS 🔒
A settled window stays answerable this long, then is dropped.
REPLAY_EVENTS 🔒
How many of each event are kept for a window that opens mid-countdown: more than the countdowns that can overlap in the longest wait.
TOAST_GROUP_PREFIX
The notification group of a countdown’s toast: there is no pane, so the request is its own.

Statics§

ENTRIES 🔒
RUNNERS 🔒

Functions§

answered_by_another
Something else did what the open requests for op (whose fact key is value) asked for, for example the person’s own request started the same upgrade: end them, their countdowns included, so none runs it a second time, and tell the agents that asked.
approve_now
The person approves it now, skipping the rest of the wait: approved_now, or too_late once it has begun or ended.
approver_label 🔒
How an audit row names the approver: an agent with its prefix, so none can read as the person; the fallback’s own words stay as they are.
audit 🔒
One audit row for a step of the window: the person’s veto, or the run. facts are the request’s, when known, for the typed audit fields (§4.6); os_prompt_answer is the only op with prompt, answer and level among them today, so every other op’s row carries none of the three.
audit_step
One audit row for a step of a request, done by actor (the agent that did it, or “no super agent” for the fallback): the request, the approval, the denial, the withdrawal.
begin 🔒
pending → proceeding, atomically.
cancelled
The request was withdrawn (see Registry::cancel) while the countdown ran: end it, so the banner stops counting for an operation that will not run. cancelled, or too_late once it has begun or ended.
cleared 🔒
entries 🔒
has_runner
Whether something runs op when its window runs out.
open
Start the countdown for the approved request request_id, running window. One already counting for the request is returned as it is: the clock never restarts.
pending
The countdowns still running, for a window that opens during one.
raise_toast 🔒
The OS notification for a countdown: what will happen, the seconds left, and its two buttons (cancel and do it now), which notify.ack accepts only with the launcher’s proof.
ran_note 🔒
What the agents that asked are told when the countdown ended and the operation ran, or could not.
register
sensitive.decide: only the AgentMux window, proven, may veto or approve a countdown now. An agent’s connection is refused whatever it holds.
register_default_runner
Say what runs op unless something already says: how the real runners are registered, so registering them again (each connection does) never replaces one a test put there.
register_runner
Say what runs op when its window runs out.
run 🔒
Run the operation in a task of its own, so one that panics settles the window as failed instead of leaving it counted as under way.
runner_for 🔒
set_status 🔒
status
tell_askers
Tell every agent that asked for a request, those that joined included. An agent that isn’t running is not an error.
tell_one
Tell one asker, from AgentMux; whether the note was delivered. An agent of another machine (remote:agent@machine) has no pane here to put a note in, and srv can’t speak as one of that machine’s agents: it is not told from here, and that is no failure. Its own machine reads where the request stands (app.upgrade with status) and tells it how it ended (remote_ops::upgrade_watch); the agent can read the same itself.
toast_group 🔒
toast_text 🔒
What the OS notification says: the title (what will happen, from the operation’s table, not from any request text) and the body (who asked and who approved, by display name). The request’s facts are left out on purpose: a toast also lands in the Action Center and on a lock screen, and a fact can be a path or an address. The banner in AgentMux shows them.
veto
The person vetoes the countdown: vetoed, or too_late once it has begun or ended.
vetoed_note 🔒
What they are told when the person vetoed it.

Type Aliases§

RunFuture
What runs an operation when its window runs out.
Runner