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: before release, every applicable output policy
evaluates the channel's whole text once more, including the held tail.
A host evaluator receives this call even when the text is unchanged;
a host cadence evaluator must decide for itself whether to classify.
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 or 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 snapshotted at construction and evaluated in array order.
OptionalresourceAudit resource. Defaults to the stable processor identifier.
Configuration for
PolicyEngine.