ApprovalCard
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 presents a choice mid-run and waits: options with a recommended one, or a free-text answer. Confirm or skip, then one line.
The agent asks and waits. Not ApprovalCard. Not AlertDialog.
Pick an option, confirm (⌘/Ctrl+Enter), and the card resolves to one line.
The v1 invoices endpoint has 3 callers. What should I do with it?
DecisionCard pauses the agent for a choice. The recommended option comes first, starts selected, and keeps its quiet badge. Confirm is the one solid primary; one action to approve is an ApprovalCard.
import { DecisionCard } from "agentic-ds-kit";From contracts/decisioncard.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 |
|---|---|---|---|---|
| title | string | Yes | — | Who asks, e.g. "Billing refactor asks". |
| question | string | Yes | — | — |
| meta | string | No | — | e.g. "paused · 0:42". |
| options | array | No | — | { id, label, description?, recommended?, disabled?, disabledReason? }[] as a kit RadioGroup (card layout). recommended shows a quiet Badge. A disabled option stays in the group and shows disabledReason in place of its description. |
| allowFreeText | boolean | No | false | Free text when there are no options. |
| freeTextLabel | string | No | Your answer | — |
| freeTextHint | string | No | One or two sentences is enough. | — |
| value | string | No | — | Option id or free-text answer. Confirm is disabled until set. |
| onValueChange | function | No | — | (value) => void |
| status | enum | No | pending | resolved and skipped render one line. pending | sending | error | resolved | skipped |
| errorMessage | string | No | The answer was not sent. | — |
| resolvedLabel | string | No | — | Line text; default the chosen option's label. |
| resolvedAt | string | No | — | — |
| onConfirm | function | No | — | Confirm (⌘⏎ key chip, no icon), the one solid primary while it waits; outline while sending or after an error. ⌘/Ctrl+Enter inside the card. |
| onSkip | function | No | — | Skip for now (ghost). Escape while focus is in the card but not on another control. |
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.
Must-choose overlay that interrupts until the user cancels or confirms.
One labeled control with optional hint and an error or success message.