Skip to main content

Module untrusted

Module untrusted 

Source
Expand description

Untrusted web-text wrapping: external text reaches a model only inside a tamper-evident boundary that declares it data, never instructions. Ported from CodeRight browser_fetch::wrap_untrusted_web_text.

Structs§

WrapOptions

Constants§

BOUNDARY_CLOSE
BOUNDARY_OPEN

Functions§

injection_signals
Cheap heuristics for common instruction-override phrasing. Advisory only.
truncate_utf8_with_marker
Truncate to at most max bytes on a char boundary and append a marker.
wrap_untrusted_web_text
Wrap text under default options.
wrap_untrusted_web_text_with