OptionalauditOptional audit logger for policy decisions and evaluator failures.
OptionalholdOpt-in zero-leak streaming: hold back a trailing window of each text
channel so a violating span is caught BEFORE any of it is emitted.
Windows come from the registered policies' holdBackChars hints (per
channel, max wins). Released text arrives as modified delta chunks;
intermediate 'object' snapshots are suppressed (only a passing
'object-result' is emitted); the held tail is flushed at the channel's
end chunk ('text-end'/'reasoning-end') and, as a backstop for streams
without end chunks, at 'finish' — both through the runner's reprocess
convention, so the flush precedes its end marker. The guarantee is
therefore PER SEGMENT: everything flushed at an end chunk was evaluated
clean against all channel text so far, but a match completing across
segment boundaries (multi-step or multi-text-block runs) aborts the
stream after earlier segments were already released — bounded by the
window for string patterns, the whole prior segment for RegExp
(Infinity) policies. Default false — evaluated chunks flow through
unmodified, and already-emitted earlier chunks of a violating span may
have leaked by abort time.
Policies evaluated in array order.
OptionalresourceAudit resource. Defaults to the stable processor identifier.
Configuration for
PolicyEngine.