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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
blocked | readonly | boolean | Set 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 |
body | readonly | string | Final body that flows downstream. | packages/tools/src/inbound/sanitize.ts:43 |
bytesStripped | readonly | number | Net 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 |
modified | readonly | boolean | Whether the body was modified relative to the input. | packages/tools/src/inbound/sanitize.ts:45 |
patternsHit | readonly | readonly string[] | Pattern names that fired during the scan. | packages/tools/src/inbound/sanitize.ts:47 |
scanDurationUs | readonly | number | Time spent on the scan in microseconds. | packages/tools/src/inbound/sanitize.ts:60 |
scanTimedOut | readonly | boolean | Whether the scan timed out (best-effort fallthrough). | packages/tools/src/inbound/sanitize.ts:62 |
stripped | readonly | boolean | Whether matches were stripped. | packages/tools/src/inbound/sanitize.ts:51 |
wrapped | readonly | boolean | Whether the body is wrapped in the untrusted-content envelope. | packages/tools/src/inbound/sanitize.ts:49 |