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 asks for standing access to a capability (files, email, repo, billing), scope by scope, with why and expiry. Grant / Deny, then one line.
Standing access, scope by scope. Not ApprovalCard. Not Switch.
Grant or deny. Grant goes through granting to one line.
Research agent wants standing access, not a single action. It applies to every run until you revoke it or it expires.
Standing access. Every future run can send email without asking again. Revoke any time in Settings → Agents.
PermissionRequest grants access that lasts. Name every scope, its access level, why and its expiry. One action is an ApprovalCard.
import { PermissionRequest } from "agentic-ds-kit";From contracts/permissionrequest.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 | No | Permission request | — |
| description | string | No | — | — |
| scopes | array | Yes | — | { id, resource, access: "read" | "write" | "admin", reason?, limit?, expiry?, icon? }[]. limit says how far the access goes, e.g. "$500 per refund". The access Badge reads Read, Write or Admin. |
| status | enum | No | pending | granted / denied / expired render one line. pending | granting | error | granted | denied | expired |
| warning | string | No | — | Standing-access warning, a kit Alert (warning). |
| errorMessage | string | No | Couldn't save the grant. | A small kit LoadError with Retry. |
| requestedAt | string | No | — | e.g. "requested 14:02", in mono at the start of the footer. With badge it sits beside the badge instead. |
| badge | string | No | — | A warning kit Badge with a Hand icon on a row above the title, e.g. "Needs you". requestedAt moves onto that row and the scope count is left out. |
| summary | array | No | — | { label, value }[], two to four cells, e.g. [{ label: "For", value: "30 days, until 22 Dec" }]. A dl strip under the description: columns, or label and value rows when the card is under 40rem. |
| resolvedNote | string | No | — | Resolved row detail, e.g. "until 17 Nov". |
| resolvedAction | slot | No | — | One small control at the end of the resolved row, e.g. a kit Button (ghost, sm) "Change level" that opens the same edit flow as the page. Granted, denied and expired only. |
| onGrant | function | No | — | Grant (Check icon), the one solid primary. ⌘/Ctrl+Enter inside the card. |
| onDeny | function | No | — | Deny, outline. Escape while focus is in the card but not on another control. |
| onRetry | function | No | — | Error row Retry. Falls back to onGrant. |
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.
Immediate on/off setting.
Must-choose overlay that interrupts until the user cancels or confirms.
Inline status banner that stays on the page.