Secret cardPro
A key the agent can use but never sees: masked to its last four characters, the chat only gets a handle, Show needs a confirm and hides itself after five seconds, Rotate swaps it with a progress bar and Revoke pauses the routines that used it, with Undo.
oxyn add secret-cardI'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.
sk_live_••••••••••••4f2a- Refund routine6 min ago
- Weekly revenue report1d ago
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Let an agent use an API key without the key ever entering the conversation: the chat gets a handle, the person keeps control of showing, rotating and revoking it.
When not to use
- An agent asks before it acts: use Approval Card instead.
- Several open requests in one card: use Approval pager instead.
- An agent's question in its own card above the composer: use Decision Card instead.
Installation
Secret card is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add secret-cardUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Active
An active key with its scopes and routines.
I'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.
sk_live_••••••••••••4f2a- Refund routine6 min ago
- Weekly revenue report1d ago
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Compact
Key row and actions only (Oxyn extra).
sk_live_••••••••••••4f2aCode Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Revoked
Revoked, routines paused, with Restore.
I'll issue the refund with {{secrets.STRIPE_SECRET_KEY}}. The key itself never enters this chat.
sk_live_••••••••••••4f2a- Refund routinePaused
- Weekly revenue reportPaused
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
SecretCard
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
revoked | bool | Default::default() | Start revoked. |
show_chat | bool | true | Show the chat line where the agent refers to the key by handle. |
compact | bool | Default::default() | Hide scopes and routines. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Enter | Confirm the pending action |
| Escape | Cancel a confirm, or hide the shown key |
Accessibility
- The masked value is labelled as hidden except its last four characters.
- Every confirm is an alert dialog with its consequence spelled out.
- State changes (shown, rotating, revoked, restored) are announced.
From the spec
The masked value is labelled as hidden except its last four characters; confirms are alert dialogs that say the consequence; Enter confirms, Escape cancels or hides. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
The masked value keeps its last four characters; a shown key gets an amber outline and a countdown in the status line; rotation swaps the tail when the bar fills; revoking turns the routine dots amber with Paused.
Timing
Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Reveal | 5000 ms (REVEAL_MS) | — |
| Rotate | 1600 ms (ROTATE_MS) | linear |
| Undo window | 5000 ms (UNDO_MS) | — |
Reduced motion: CSS motion is cut to a frame; decorative bands and rings are hidden or still; state and text changes stay.
Responsive behaviour
- Actions wrap under the status line; the key value truncates inside its box.
Edge cases (spec)
The value truncates inside its own box; actions wrap under the status line; the Stripe mark sits on a white tile in both themes. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the official coloured brand marks.
Notes for AI
- Import
SecretCardfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
XPostViewinoxyn_gpui. - Props to set first:
now. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.