Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/provider / / PromptRedactionPolicy

Interface: PromptRedactionPolicy

Defined in: packages/provider/src/middleware/with-redaction.ts:86

Full prompt-redaction policy.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
action?readonly"throw" | "redact" | "block-and-prompt-user"Action on detection. Defaults to 'redact'.packages/provider/src/middleware/with-redaction.ts:90
byTrustClass?readonlyPartial<Record<LocalProviderTrust, Partial&lt;PromptRedactionPolicy&gt;>>Per-trust-class override block.packages/provider/src/middleware/with-redaction.ts:100
detectSecretValue?readonlybooleanDetect SecretValue instances anywhere in the request.packages/provider/src/middleware/with-redaction.ts:96
failClosed?readonlybooleanThrow on the first hit instead of redacting in-place.packages/provider/src/middleware/with-redaction.ts:92
logger?readonly(message, meta?) => voidOptional logger override. Defaults to console.warn.packages/provider/src/middleware/with-redaction.ts:104
onViolation?readonly(violation) => voidSanitised violation hook (audit emission lives downstream).packages/provider/src/middleware/with-redaction.ts:102
patterns?readonlyreadonly RedactionPattern[]Pattern catalogue. Defaults to the 14 built-in patterns.packages/provider/src/middleware/with-redaction.ts:88
scanScope?readonlyPromptRedactionScanScopeRange of fields scanned. Defaults to 'all'.packages/provider/src/middleware/with-redaction.ts:94
stripCacheControlOnHit?readonlybooleanStrip Anthropic-shape cache_control markers on hit.packages/provider/src/middleware/with-redaction.ts:98
trustClassOverride?readonlyLocalProviderTrustTest hook — synthetic trust class.packages/provider/src/middleware/with-redaction.ts:106