Expand description
Black out a browser pane’s secret fields in a screenshot before an agent sees it (docs/specs/SPEC_BROWSER_PANE_FORMS_IN_FRAMES_AND_VISUAL_FALLBACK_2026_10_16.md §5.1 item 4). The host finds the fields and their boxes in the page’s CSS pixels; this paints them over in the image, which is in device pixels.
Constants§
- PAD 🔒
- CSS pixels added around each box: a field’s border and its focus ring.
- UNCHECKED_
REFUSAL 🔒 - Why a capture the host could not check for secret fields is not given out.
Functions§
- black_
out 🔒 - Paint every box black and return the image as PNG.
css_widthis the page’s viewport width, which scales the boxes to the image; without it the boxes can’t be placed, so it fails rather than guess. - boxes_
of 🔒 - paint 🔒
- Paint every box black on
img, in place. - redact_
host_ 🔒screenshot - The host’s screenshot answer (
data.secret_boxes,data.css_width) applied to its decoded image: unchanged when the page has no secret fields, otherwise blacked out and re-encoded.Erris the message to give instead of the image. - redact_
image 🔒 redact_host_screenshoton an image already decoded (a recording’s frame, cropped from the whole viewport): painted over in place, orErrwith what to give instead.