Skip to main content

Module browser_dialog

Module browser_dialog 

Source
Expand description

A page’s own dialogs (alert, confirm, prompt, “Leave site?”) in a browser pane an agent drives (docs/specs/SPEC_BROWSER_PANE_NATIVE_DIALOGS_2026_10_17.md). The host parks each one and asks here (/api/v1/host/browser_dialog); this decides by policy (§5), or asks the person in the pane and answers the host later. The agent can never accept a confirm itself: only Auto-approve, for the confirm that follows its own click, or the person.

Structs§

Click 🔒

Enums§

Decision 🔒
DialogKind 🔒
How 🔒

Constants§

ASK_TIMEOUT 🔒
How long the person has to answer. The host gives up a minute later.
LOG_MAX 🔒
Dialog outcomes kept per agent until its next Browser call reads them.
MESSAGE_MAX 🔒
The page’s words kept and shown: no more than this.
PAIR_WINDOW 🔒
How long after a committing click a confirm still counts as its own (§5.2).

Functions§

about_a_secret 🔒
Words that mean a dialog is about a secret. Such a dialog is never answered for the agent: it only ever turns an accept into a question (§5.3).
answer_host 🔒
Tell the host how a parked dialog was answered.
audit_download 🔒
One Audit row for a download the host saved into an agent’s workspace without a dialog, or refused: the site (the pane’s page), the file and its size, as the host worded them in message. The agent is standing for it: the person’s setting allowed it, nothing was asked. Nothing was opened or run.
chooser_decision 🔒
A page’s own file chooser: kept for the agent when its grant has the uploads power, else cancelled by the host, and the agent is told what to do instead. Answers the host’s decision.
chooser_message 🔒
What the agent reads about a file chooser the page opened: what it asked for, and its title.
chooser_reason 🔒
Why the chooser was cancelled, and what to do. Only a file the agent puts in an input with set_files goes up; a folder has no such door from a pane the agent drives. (A Save As is never cancelled: a download opens it.)
clicks 🔒
clip 🔒
decide 🔒
The policy (§5.1). paired is the click the dialog follows, if any; covered says whether Auto-approve covers the site that showed it.
drain 🔒
The dialogs agent’s panes showed since it last asked, oldest first.
ended 🔒
Dialogs the host said ended (navigation, close) while srv was asking or about to ask about them: their question’s outcome isn’t the person’s answer, and the host has nothing left to answer. Bounded: an id stays only until its question notices, or until it is old.
handle_host_browser_dialog 🔒
POST /api/v1/host/browser_dialog — the host parked a page’s dialog in an agent-driven pane and asks what to do (dialogs spec §4.2). Body {id, target, kind, message, origin}; answers accept, cancel, or parked (the person is asked; the answer goes to the host’s dialog_answer later). {id, target, ended: true}: the dialog ended on its own (navigation, close), so a question about it comes down. suppressed: the host cancelled it as one of a flood, and only reports it. Host only.
handle_ui_browser_dialogs 🔒
POST /api/v1/ui/browser/dialogs — the page dialogs the calling agent’s panes showed since it last asked, and what became of each. Its Browser tool reads it after every action, so the agent hears of each one; it works while a pane is paused, which is when it matters.
log 🔒
mark_ended 🔒
note_approved_click 🔒
note_click for a click the person approved in the banner; ask is the approval it was shown as.
note_click 🔒
Remember a committing click about to be made on target (a pane or popup window), so the confirm it opens can be matched to it. Called before the click is sent: the page shows its confirm while the click is still running.
notice_decision 🔒
What the log says became of a notice: saved or answered are not refusals, and waiting is not either.
notice_words 🔒
What the agent reads about a refusal the host reports, and what to do about it. shown is only a scheme or a host.
pair 🔒
The click a dialog on target belongs to: one made there within the window and not matched to a dialog yet. One click, one confirm.
record 🔒
take_ended 🔒
Whether dialog id ended; forgets it once asked.