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
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
action? | readonly | "throw" | "redact" | "block-and-prompt-user" | Action on detection. Defaults to 'redact'. | packages/provider/src/middleware/with-redaction.ts:90 |
byTrustClass? | readonly | Partial<Record<LocalProviderTrust, Partial<PromptRedactionPolicy>>> | Per-trust-class override block. | packages/provider/src/middleware/with-redaction.ts:100 |
detectSecretValue? | readonly | boolean | Detect SecretValue instances anywhere in the request. | packages/provider/src/middleware/with-redaction.ts:96 |
failClosed? | readonly | boolean | Throw on the first hit instead of redacting in-place. | packages/provider/src/middleware/with-redaction.ts:92 |
logger? | readonly | (message, meta?) => void | Optional logger override. Defaults to console.warn. | packages/provider/src/middleware/with-redaction.ts:104 |
onViolation? | readonly | (violation) => void | Sanitised violation hook (audit emission lives downstream). | packages/provider/src/middleware/with-redaction.ts:102 |
patterns? | readonly | readonly RedactionPattern[] | Pattern catalogue. Defaults to the 14 built-in patterns. | packages/provider/src/middleware/with-redaction.ts:88 |
scanScope? | readonly | PromptRedactionScanScope | Range of fields scanned. Defaults to 'all'. | packages/provider/src/middleware/with-redaction.ts:94 |
stripCacheControlOnHit? | readonly | boolean | Strip Anthropic-shape cache_control markers on hit. | packages/provider/src/middleware/with-redaction.ts:98 |
trustClassOverride? | readonly | LocalProviderTrust | Test hook — synthetic trust class. | packages/provider/src/middleware/with-redaction.ts:106 |