Skip to content

Graphorin API reference v0.12.1


Graphorin API reference / @graphorin/tools / / SanitizationOutcome

Interface: SanitizationOutcome

Defined in: packages/tools/src/inbound/sanitize.ts:41

Outcome of applyInboundSanitization.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
blockedreadonlybooleanSet when failClosed: true and at least one pattern fired. The executor surfaces this as ToolError({ kind: 'inbound_sanitization_blocked' }).packages/tools/src/inbound/sanitize.ts:67
bodyreadonlystringFinal body that flows downstream.packages/tools/src/inbound/sanitize.ts:43
bytesStrippedreadonlynumberNet bytes removed by the strip pass (always >= 0). Redaction replaces each match with a mask, so this is max(0, before - after) - it is 0 when the masks are at least as long as the text they covered even though matches were stripped (see stripped / patternsHit).packages/tools/src/inbound/sanitize.ts:58
modifiedreadonlybooleanWhether the body was modified relative to the input.packages/tools/src/inbound/sanitize.ts:45
patternsHitreadonlyreadonly string[]Pattern names that fired during the scan.packages/tools/src/inbound/sanitize.ts:47
scanDurationUsreadonlynumberTime spent on the scan in microseconds.packages/tools/src/inbound/sanitize.ts:60
scanTimedOutreadonlybooleanWhether the scan timed out (best-effort fallthrough).packages/tools/src/inbound/sanitize.ts:62
strippedreadonlybooleanWhether matches were stripped.packages/tools/src/inbound/sanitize.ts:51
wrappedreadonlybooleanWhether the body is wrapped in the untrusted-content envelope.packages/tools/src/inbound/sanitize.ts:49