Skip to main content

Module browser_agent_calls

Module browser_agent_calls 

Source
Expand description

When an agent last drove each browser pane, from srv’s own record, so a click in a pane can be told from the person’s and the agent’s.

A pane an agent limited to some sites (browser_allowlist) stops its page going anywhere else, which is right for what the agent does there and wrong for the person: an email link clicked in such a pane opens a popup that inherited the limit, and the first redirect hop off the list left a blank pane (the Microsoft sign-in from a Gmail pane, #18229). The agent’s own clicks are real input events too, so the page can’t say who clicked; srv can: every Browser call resolves its pane through ui_handlers::target_block_id, which notes it here. Kept in memory, like ownership.

Constants§

AGENT_CLICK_WINDOW 🔒
How long after an agent’s last call on a pane a click there may still be the agent’s. A click that opens a window does it within the page’s own handler, well inside this; a person’s click after the agent has gone quiet is theirs.
MAX_NOTED 🔒
More panes than anyone has open: past it the oldest notes go.

Functions§

agent_was_there 🔒
calls 🔒
forget 🔒
pane closed: nothing to remember.
lock 🔒
note 🔒
An agent called Browser on pane (the pane whose banner holds, for a popup window).
note_at 🔒
person_clicked 🔒
Did the person open the popup opener’s page asked for? A click (user_gesture) while no agent had called Browser on the pane within AGENT_CLICK_WINDOW. When both are possible it counts as the agent’s, so the limit stays.