Skip to main content

Module browser_actions

Module browser_actions 

Source
Expand description

What an agent did in a browser pane it drives, and the person’s Pause (docs/specs/SPEC_AGENT_DRIVEN_BROWSER_PANES_2026_10_07.md §5.5, PLAN_BROWSER_DRIVER_FIXES_2026_10_17.md §5).

The log is a ring of the last RING entries per pane, in memory only: srv restarting clears it, closing the pane drops it, and Take over keeps it, so the person can still read what happened. The newest PUBLISHED are mirrored to the pane’s browser:actions meta key (srv-only, like browser:bypass) for the header’s Log. An entry never holds what was typed: a fill names its field, never the value, secret or not. The one exception is a line typed into a web terminal under the person’s grant: the Log keeps it, masked and cut short, as their record of what ran.

Pause is the person’s quick, reversible brake, where Take over is final: while a pane is paused, every agent call that resolves it is refused, and an Auto-approve grant’s clock stands still. Only the person pauses or resumes, through the host (/api/v1/host/browser_pause), so no agent can lift a pause on itself.

Structs§

Entry 🔒
Log 🔒
Note 🔒
One entry being described; Note::record adds it. Built by the handlers, one line each.
Table 🔒

Enums§

How 🔒
How it went: who let it through, or why it didn’t happen.
Kind 🔒
What was done. Kebab-case on the wire (auto-approve-on).

Constants§

ACTIONS_META_KEY 🔒
Block meta key the header’s Log reads: {count, entries}.
PAUSED_META_KEY 🔒
Block meta key the header reads to show a pane is paused.
PUBLISHED 🔒
Entries mirrored to the pane’s meta: the header shows the newest.
RING 🔒
Entries kept per pane.

Functions§

add 🔒
Add e to pane’s ring, dropping the oldest past RING.
approved_by_user 🔒
An approved click’s result, saying it was the user’s approval that let it through and how long they took: the agent can’t see the banner or a clock, and once reported “no banner appeared” for a click the user had approved (form-filling fixes plan §2.5).
audit_words 🔒
What an Audit row says of a step: its kind and how it went, and nothing the page or the agent wrote (a refusal’s reason can name an address or a label).
clip 🔒
s trimmed and cut to n characters.
drop_pane 🔒
pane was closed: its log and pause go.
entries 🔒
pane’s entries, oldest first, and how many it ever had.
forget_pause 🔒
The agent no longer drives pane (Take over): the pause goes with it, and so does the header’s browser:paused, or a later driver’s strip would read as paused. The log stays.
handle_host_browser_pause 🔒
POST /api/v1/host/browser_pause — the person’s Pause and Resume in an agent-driven pane’s header, relayed by the CEF host. Only the host can call it: an agent holding the instance auth key gets 403, so no agent can resume itself. Body {block_id, paused}.
handle_ui_browser_actions 🔒
POST /api/v1/ui/browser/actions — backs Browser’s log: the pane’s action log, for the agent that drives it (or its own pane). Read-only. Resolved without target_block_id, so it works while the pane is paused or waiting on the person.
held_for 🔒
is_paused 🔒
Is pane paused: by the person’s Pause on it, or by “Pause all agent browsing” while an agent drives it?
not_paused 🔒
For target_block_id: refuse every agent call on a pane the person paused.
note 🔒
Describe agent’s kind on pane (a pane or a popup window id).
pause_all_changed 🔒
“Pause all agent browsing” was turned on or off (already in force for is_paused), by by (None: the person): hold or release every grant’s clock, and show it on each driven pane’s header and Log, as the one who did it.
paused_alone 🔒
Did the person pause pane itself (its own Pause, not the global switch)?
paused_by 🔒
The global switch pauses a pane an agent drives, never the agent’s own pane or one nobody drives; a pane’s own Pause holds whoever drives it.
publish 🔒
Mirror pane’s newest entries to its meta, for the header’s Log.
publish_paused 🔒
reset_strips 🔒
Clear the log and pause saved with panes that srv no longer has them for. Called when the host registers: neither survives srv restarting, and the header, which reads the saved meta, must not show a stale one.
resumed_clock 🔒
Where an Auto-approve grant’s end moves to when its clock ran from paused_at to now while paused: later by exactly the paused time, both as an Instant and as the header’s epoch milliseconds.
set_paused 🔒
Pause (on) or resume pane. Returns whether that changed anything. An Auto-approve grant’s clock stops with it, and runs again on resume.
short_reason 🔒
A refusal’s gist for the log: its first clause.
table 🔒