restore_text
Reverse SecuRedact protection locally to restore original text for trusted review using a prior restoration session.
Instructions
Reverse a prior SecuRedact protection step in a trusted, local-only context.
Use this ONLY after you previously received a restoration_session from SecuRedact (for example from prepare_for_external_ai with response_mode 'restore_capable') and now need to reconstruct the original text locally for trusted review. Restoration can reveal the original sensitive values (PII, secrets, credentials); it is a trusted-local operation, not a step to prepare data for external transmission. Never call it to sanitize or prepare text for an external AI; for that use prepare_for_external_ai. Never call it on text you did not previously protect with SecuRedact.
Security boundary: all processing is local and nothing leaves the machine. The 'mapping' form requires trusted_local_review=true and exposes raw originals, so its output must never be transmitted. Returns a JSON object with 'status' ('ok' or 'blocked'), 'restored_text' (present only on success), and 'reason_codes' describing any failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text containing SecuRedact placeholders (or a prior protected representation) to restore. Processed locally; never transmitted. | |
| mapping | No | Legacy direct mapping from placeholder token to original value. Supplying this bypasses the session vault and immediately reveals the original sensitive values. It is only honored when 'trusted_local_review' is true and 'restoration_session' is omitted. | |
| restoration_session | No | Opaque session token previously returned by SecuRedact (for example from prepare_for_external_ai with response_mode 'restore_capable'). It identifies the trusted local vault entry used to reverse protection and recover the original values. Required unless you supply 'mapping' together with trusted_local_review. | |
| trusted_local_review | No | Explicit acknowledgment that you are in a trusted local review context and accept that restoration reveals original sensitive values. Required (true) to use the 'mapping' form. It has no effect on the 'restoration_session' form. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||