Write to production database
high riskThe migration agent needs write access to apply the pending schema change to the users table.
Requested scope
db:writedb:schema
- db:write → postgres/prod/users
- db:schema → ALTER TABLE users
Docs / Permissions and trust /
Full permission gate: action description, scope pills, approve/deny controls, and risk context.
High risk
Medium risk
Low risk
Atoms — ApprovalCardBase
Atoms — ApprovalActions
Static preview mode
| Prop | Type | Description |
|---|---|---|
| title* | string | Short headline for the requested permission. |
| rationale* | string | One- or two-sentence justification from the agent. |
| scopes* | PermissionScope[] | Array of scope labels (and optional detail strings) to render as tags. |
| risk | "low" | "medium" | "high" | Risk tier badge. Defaults to "medium". |
| staticPreview | boolean | Disables action buttons — use in docs or design previews. |
| onApprove | () => void | Called when the user taps Approve. |
| onDeny | () => void | Called when the user taps Deny. |
| onAlwaysAllow | () => void | Called when the user taps "Always allow for this agent". |
| onEdit | () => void | When provided, renders an Edit button inside the scope block. |
| className | string | Additional CSS classes for the card root. |
* required.
import { PermissionRequest } from "@/components/agent/permission-request";
<PermissionRequest
title="Write to production database"
rationale="Migration agent needs write access to apply the pending schema change."
scopes={[
{ label: "db:write", detail: "→ postgres/prod/users" },
{ label: "db:schema", detail: "→ ALTER TABLE users" },
]}
risk="high"
onApprove={() => {}}
onDeny={() => {}}
onAlwaysAllow={() => {}}
/>