Sending to Claude (Anthropic API)
What will be sent
Summarise this ticket and draft a reply. From: <> Order 48213 was charged twice to card . Please call me on or reply to . Our integration still uses key — is that why?
Shows exactly what is about to leave the product for a model or outside tool, with sensitive values masked by type and a mask rule per type, before it is sent. Send, then one line.
What leaves for a model or tool, masked by type, before it goes. Not ContextWindow. Not ApprovalCard.
Flip a rule, reveal a chip, then Send. onSend gets the masked text.
What will be sent
Summarise this ticket and draft a reply. From: <> Order 48213 was charged twice to card . Please call me on or reply to . Our integration still uses key — is that why?
RedactionPreview sits between an agent and the model or tool it calls. Pass the exact payload and the sensitive spans your detector found; the person sees what leaves and can loosen rules, but never for secrets.
import { RedactionPreview } from "agentic-ds-kit";From contracts/redactionpreview.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| destination | string | Yes | — | Where the data goes. Title reads "Sending to <destination>". |
| region | string | No | — | Data region of the destination, a Badge ("EU region"). |
| payload | string | Yes | — | Exactly what will be sent, as plain text. Shown read-only in mono. |
| spans | array | Yes | — | { start, end, type }[] character ranges of sensitive values, e.g. type "email", "card", "apiKey". Overlaps are dropped. |
| rules | object | No | — | { [type]: boolean } mask on or off. Types not listed are masked. |
| lockedTypes | array | No | ["apiKey","password","secret"] | Always masked; their Switch is locked on with lockedReason as the hint. |
| lockedReason | string | No | Secrets always stay masked. They are never sent to a model or outside tool. | — |
| typeLabels | object | No | — | { [type]: label }. Common types (email, phone, card, apiKey…) have defaults. |
| onRulesChange | function | No | — | (rules) => void when a mask Switch flips. |
| onSend | function | No | — | (maskedPayload) => void. Send, the one solid primary. Masked values are replaced by "[type]", or "[Label •••• tail]" with keepLast. |
| onCancel | function | No | — | Cancel, outline. |
| status | pending | sent | cancelled | error | No | pending | sent folds to one line ("Sent to … with 10 values masked"); cancelled to "Not sent"; error keeps the card with a danger Alert ("Couldn't send. Nothing left the product.") and Send becomes Try again. |
| errorText | string | No | — | status error: why it failed, the Alert body. |
| onRetry | function | No | — | status error: Try again, outline neutral. Falls back to onSend. |
| layout | inline | split | No | inline | split: Before (only you see it; secrets stay masked) and After (exactly what is sent) side by side; on a narrow card After shows first and Before sits behind "Show before". |
| keepLast | object | No | — | { [type]: number } characters kept at the end of a masked value, e.g. { card: 4 } sends "[Card number •••• 4242]". Never applies to lockedTypes. |
How full the prompt context is and what uses the space, by segment, with a warning near the limit, Trim oldest and compaction with Undo.
The agent asks before it acts: risk, what will happen in words, an exact preview of the command or diff, and Approve (⌘/Ctrl+Enter) / Deny (Escape) with an optional auto-deny countdown.
An agent asks for standing access to a capability (files, email, repo, billing), scope by scope, with why and expiry.
Framed tile with optional header, body, and footer actions.