Skip to main content

Module browser_allowlist

Module browser_allowlist 

Source
Expand description

The sites an agent limited its browser pane to with OpenBrowser({allowed_origins}) (docs/specs/SPEC_BROWSER_PANE_ALLOWED_ORIGINS_2026_10_09.md).

One list per chain of panes: the pane OpenBrowser opened (the root) and every popup pane opened from it, or from those. Like the owner map, this is srv’s own record, kept in memory and in a file across a restart (browser_pane_records): the block’s browser:allowed_origins meta key mirrors it for the pane’s header, and clients can’t write it. The host keeps a copy of every member’s list, pushed with the owned-pane set (browser_host_sync), and stops navigations off it.

Structs§

Lists 🔒
Stopped 🔒
A navigation the host stopped: in pane’s chain, by target, to url, a navigate or a popup.

Enums§

FrameSlot 🔒
What taking a pane’s frame-notice slot came to.
Settled 🔒
How a stopped navigation ended (RCA §7.1). Each one loads, asks, or shows why: none leaves the pane where the cancel left it.

Constants§

ALLOWED_META_KEY 🔒
Block meta key mirroring a pane’s list, for its header.
ASK_TIMEOUT 🔒
How long the person has to answer a question about a navigation.

Functions§

allow 🔒
Add origin to pane’s chain’s list: the person allowed it. Returns the list after, and the chain’s members, whose header shows it.
allow_and_load 🔒
The person allowed origin: add it to the chain’s list, show the longer list, and load the stopped address.
ask_about_frame 🔒
A snapshot found a frame from origin, a site off the pane’s list (forms-in-frames spec §5.3): tell the person in the pane’s banner, with Allow. It is a notice, not a question about a navigation, because nothing is stopped and the agent’s tools on the pane must not pause for an incidental frame; the frame stays unactable until Allow, and the agent takes a new snapshot after. Allow adds the site and loads nothing.
chains 🔒
Every limited pane’s chain root, and each chain’s list, for browser_pane_records.
confirm_unlimited 🔒
Record that pane has no list although the host holds one for it.
confirmed_unlimited 🔒
The panes srv has found the host holds a stale list for.
drop_pane 🔒
pane was closed or taken over: it leaves its chain. The others keep the list, even when pane was the root: a popup pane can outlive its opener and still be the agent’s, and must not lose its limit with it. The list goes when its last pane does. Returns whether pane had a list.
frame_notices 🔒
The site each pane’s frame notice is showing now, if it has one.
handle_host_browser_navigation 🔒
POST /api/v1/host/browser_navigation — the host stopped a navigation off a pane’s site list (allowed-origins spec §4). Body {pane, target, url, kind}: pane is the pane the list belongs to, target the pane or popup window that was navigating, kind navigate (replayed on Allow) or popup (not: the person or agent clicks again). Only the host calls it. Answers at once, with how the attempt was settled (settled); a question runs on its own. The host shows its own notice for anything it doesn’t recognise there, so a stopped navigation never ends in a blank pane.
join 🔒
pane, a popup pane opener just opened, joins opener’s chain, if it has a list. Returns the list it now shares.
leave_chain 🔒
pane leaves its chain for good, and any popup panes still in it keep the list it had: they stay one agent’s, and a new list for pane (another agent took it over, take_control) must not change what they may reach. drop_pane leaves the list under the root’s own name, which a new set on that pane would overwrite.
limit_new_pane 🔒
Limit pane, which OpenBrowser just opened, to list if one was given, and send it to the host at once, not on the next sync: the host must have it before the pane’s first navigation can leave it.
list_for 🔒
pane’s list, if its chain has one.
list_for_open 🔒
Check OpenBrowser’s allowed_origins: None when not given, the list in its normal form when it is, or why it can’t be used.
lists 🔒
lock 🔒
mirror 🔒
Mirror a new pane’s list (if any) into the meta it’s created with.
notice_outcome 🔒
The log line’s outcome for a notice shown after a question.
opener_list 🔒
The site list of the pane pane was opened from as a popup, from srv’s own records (browser:popup_of, which only srv writes). Covers the moment between a popup pane opening and joining its chain: a navigation the host stopped then is still asked about, not replayed.
publish 🔒
Write list (or nothing) to each of panes’ headers.
push_then_replay 🔒
Send the host the current lists, then load what it stopped, if it was a navigation (a popup is clicked again).
refuse_agent_navigation 🔒
Why an agent’s own BrowserNavigate of pane to url is refused, if it is: the pane is limited to some sites and url isn’t on them (§3).
refuse_popup 🔒
Why a popup pane to url from opener isn’t opened, if it isn’t: the host asks before offering one off the opener’s list, and this checks again from srv’s own record.
release_frame_slot 🔒
Free pane’s slot, only if it still holds origin: a notice that was replaced mustn’t free the slot of the one that replaced it.
replay_navigation 🔒
Load url in target (a pane or popup window), as the navigation the host stopped would have. A plain load: a form’s data isn’t sent again.
reserve_frame_slot 🔒
Take pane’s slot for origin, in the same step as the check.
restore 🔒
Put back pane’s place in the chain of root and the chain’s list, as browser_pane_records kept them across a restart. A chain that is already there keeps its list.
set 🔒
Limit root (a pane OpenBrowser just opened) to list.
settle_popup_pane 🔒
pane, a popup pane that joined its opener’s chain (list) as soon as it opened, once its ownership is settled: with an owner it shares the chain’s limit, in its header and on the host; with none (the opener was taken over meanwhile) it leaves the chain. The host push waits until here, so nothing yields between opening the pane and settling who owns it.
settle_stopped_navigation 🔒
Where a stopped navigation goes, decided in one place, so every branch replays, asks, or shows a notice. A question waits up to timeout.
show_notice 🔒
Show in the pane why stopped didn’t load (RCA §6.2), with Back, and Allow while its site (origin) can still be added. Allow adds it and loads the address; Back and Dismiss only take the notice down.
snapshot 🔒
Every member pane’s list, for the host.
window_of 🔒
The popup window stopped was in, by its address, if it was in one.