@agentconsent/react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2292 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1047 -0
- package/dist/index.d.ts +1047 -0
- package/dist/index.js +2243 -0
- package/dist/index.js.map +1 -0
- package/package.json +74 -0
- package/src/theme.css +1711 -0
- package/src/tokens.css +145 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/action-preview/action-preview.tsx","../src/irreversibility-gate/irreversibility-gate.tsx","../src/scoped-grant/scoped-grant.tsx","../src/progressive-scope/progressive-scope.tsx","../src/batch-approval/batch-approval.tsx","../src/consent-memory/consent-memory.tsx","../src/authority-boundary/authority-boundary.tsx","../src/spend-limits/spend-limits.tsx","../src/credential-handoff/credential-handoff.tsx","../src/action-receipt/action-receipt.tsx","../src/injection-flag/injection-flag.tsx","../src/connection-card/connection-card.tsx"],"sourcesContent":["export { ActionPreview } from \"./action-preview/action-preview\";\nexport type {\n ActionPreviewConsequence,\n ActionPreviewRootProps,\n ActionPreviewHeaderProps,\n ActionPreviewIconProps,\n ActionPreviewTitleProps,\n ActionPreviewFieldsProps,\n ActionPreviewFieldProps,\n ActionPreviewContentProps,\n ActionPreviewSourceProps,\n ActionPreviewActionsProps,\n ActionPreviewButtonProps,\n} from \"./action-preview/action-preview\";\n\nexport { IrreversibilityGate } from \"./irreversibility-gate/irreversibility-gate\";\nexport type {\n IrreversibilitySeverity,\n IrreversibilityGateRootProps,\n IrreversibilityGateHeaderProps,\n IrreversibilityGateIconProps,\n IrreversibilityGateTitleProps,\n IrreversibilityGateDescriptionProps,\n IrreversibilityGateConsequencesProps,\n IrreversibilityGateConsequenceProps,\n IrreversibilityGateConfirmFieldProps,\n IrreversibilityGateActionsProps,\n IrreversibilityGateButtonProps,\n} from \"./irreversibility-gate/irreversibility-gate\";\n\nexport { ScopedGrant } from \"./scoped-grant/scoped-grant\";\nexport type {\n ScopeAccess,\n ScopedGrantRootProps,\n ScopedGrantHeaderProps,\n ScopedGrantIconProps,\n ScopedGrantTitleProps,\n ScopedGrantDescriptionProps,\n ScopedGrantGroupProps,\n ScopedGrantScopeProps,\n ScopedGrantActionsProps,\n ScopedGrantGrantProps,\n ScopedGrantCancelProps,\n} from \"./scoped-grant/scoped-grant\";\n\nexport { ProgressiveScope } from \"./progressive-scope/progressive-scope\";\nexport type {\n ProgressiveScopeRootProps,\n ProgressiveScopeHeaderProps,\n ProgressiveScopeIconProps,\n ProgressiveScopeTitleProps,\n ProgressiveScopeReasonProps,\n ProgressiveScopeRequestProps,\n ProgressiveScopeCurrentProps,\n ProgressiveScopeActionsProps,\n ProgressiveScopeButtonProps,\n} from \"./progressive-scope/progressive-scope\";\n\nexport { BatchApproval } from \"./batch-approval/batch-approval\";\nexport type {\n BatchApprovalItem,\n BatchApprovalRootProps,\n BatchApprovalHeaderProps,\n BatchApprovalIconProps,\n BatchApprovalTitleProps,\n BatchApprovalDescriptionProps,\n BatchApprovalToolbarProps,\n BatchApprovalSelectAllProps,\n BatchApprovalSelectionCountProps,\n BatchApprovalButtonProps,\n BatchApprovalListProps,\n BatchApprovalItemProps,\n} from \"./batch-approval/batch-approval\";\n\nexport { ConsentMemory } from \"./consent-memory/consent-memory\";\nexport type {\n ConsentDurability,\n ConsentMemoryRootProps,\n ConsentMemoryHeaderProps,\n ConsentMemoryIconProps,\n ConsentMemoryTitleProps,\n ConsentMemoryDescriptionProps,\n ConsentMemoryOptionsProps,\n ConsentMemoryOptionProps,\n ConsentMemoryActionsProps,\n ConsentMemoryAllowProps,\n ConsentMemoryDenyProps,\n} from \"./consent-memory/consent-memory\";\n\nexport { AuthorityBoundary, AUTHORITY_LEVELS } from \"./authority-boundary/authority-boundary\";\nexport type {\n AuthorityLevel,\n AuthorityBoundaryRootProps,\n AuthorityBoundaryHeaderProps,\n AuthorityBoundaryIconProps,\n AuthorityBoundaryTitleProps,\n AuthorityBoundaryDescriptionProps,\n AuthorityBoundarySummaryProps,\n AuthorityBoundaryListProps,\n AuthorityBoundaryCapabilityProps,\n} from \"./authority-boundary/authority-boundary\";\n\nexport { SpendLimits } from \"./spend-limits/spend-limits\";\nexport type {\n SpendLimitKind,\n SpendLimitPeriod,\n SpendLimitState,\n SpendLimitUsage,\n SpendLimitsRootProps,\n SpendLimitsHeaderProps,\n SpendLimitsIconProps,\n SpendLimitsTitleProps,\n SpendLimitsDescriptionProps,\n SpendLimitsSummaryProps,\n SpendLimitsListProps,\n SpendLimitsLimitProps,\n} from \"./spend-limits/spend-limits\";\n\nexport { CredentialHandoff } from \"./credential-handoff/credential-handoff\";\nexport type {\n HandoffHandlerKind,\n CredentialHandoffRootProps,\n CredentialHandoffHeaderProps,\n CredentialHandoffIconProps,\n CredentialHandoffTitleProps,\n CredentialHandoffDescriptionProps,\n CredentialHandoffHandlerProps,\n CredentialHandoffBoundaryProps,\n CredentialHandoffReturnsProps,\n CredentialHandoffReturnProps,\n CredentialHandoffActionsProps,\n CredentialHandoffButtonProps,\n} from \"./credential-handoff/credential-handoff\";\n\nexport { ActionReceipt } from \"./action-receipt/action-receipt\";\nexport type {\n ReceiptOutcome,\n ReceiptReversibility,\n ActionReceiptRootProps,\n ActionReceiptHeaderProps,\n ActionReceiptIconProps,\n ActionReceiptTitleProps,\n ActionReceiptOutcomeProps,\n ActionReceiptDetailsProps,\n ActionReceiptDetailProps,\n ActionReceiptAuthorityProps,\n ActionReceiptMetaProps,\n ActionReceiptMetaItemProps,\n ActionReceiptActionsProps,\n ActionReceiptUndoProps,\n} from \"./action-receipt/action-receipt\";\n\nexport { InjectionFlag } from \"./injection-flag/injection-flag\";\nexport type {\n InjectionFlagRootProps,\n InjectionFlagHeaderProps,\n InjectionFlagIconProps,\n InjectionFlagTitleProps,\n InjectionFlagDescriptionProps,\n InjectionFlagSourceProps,\n InjectionFlagQuoteProps,\n InjectionFlagConsequenceProps,\n InjectionFlagActionsProps,\n InjectionFlagButtonProps,\n} from \"./injection-flag/injection-flag\";\n\nexport { ConnectionCard } from \"./connection-card/connection-card\";\nexport type {\n ConnectionStatus,\n ConnectionCardRootProps,\n ConnectionCardHeaderProps,\n ConnectionCardIconProps,\n ConnectionCardTitleProps,\n ConnectionCardStatusProps,\n ConnectionCardScopesProps,\n ConnectionCardScopeProps,\n ConnectionCardMetaProps,\n ConnectionCardMetaItemProps,\n ConnectionCardActionsProps,\n ConnectionCardActionProps,\n} from \"./connection-card/connection-card\";\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialog from \"@radix-ui/react-alert-dialog\";\n\n/**\n * Action Preview — show exactly what an agent is about to do before it\n * executes, and collect an explicit approve/reject decision.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Two render modes:\n * - inline (default): a card inside the conversation/task surface\n * - modal (`asModal`): a Radix AlertDialog — focus is trapped, initial\n * focus lands on the reject (least destructive) action, and Escape\n * rejects. Modal mode is controlled via `open` / `onOpenChange`.\n */\n\nexport type ActionPreviewConsequence = \"reversible\" | \"irreversible\";\n\ninterface ActionPreviewContextValue {\n consequence: ActionPreviewConsequence;\n onApprove: () => void;\n onReject: () => void;\n asModal: boolean;\n titleId: string;\n}\n\nconst ActionPreviewContext =\n React.createContext<ActionPreviewContextValue | null>(null);\n\nfunction useActionPreviewContext(part: string): ActionPreviewContextValue {\n const ctx = React.useContext(ActionPreviewContext);\n if (!ctx) {\n throw new Error(\n `ActionPreview.${part} must be rendered inside ActionPreview.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ActionPreviewRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** Called when the user approves the action. */\n onApprove: () => void;\n /** Called when the user rejects the action (button, or Escape in modal mode). */\n onReject: () => void;\n /**\n * How hard the action is to undo. Irreversible consequence shifts the\n * approve button to destructive styling and changes nothing else —\n * friction weighting beyond that belongs to the Irreversibility Gate\n * pattern.\n */\n consequence?: ActionPreviewConsequence;\n /** Render as a modal AlertDialog instead of an inline card. */\n asModal?: boolean;\n /** Modal mode only: whether the dialog is open (controlled). */\n open?: boolean;\n /** Modal mode only: called when the dialog requests an open-state change. */\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, ActionPreviewRootProps>(\n function ActionPreviewRoot(\n {\n onApprove,\n onReject,\n consequence = \"reversible\",\n asModal = false,\n open,\n onOpenChange,\n children,\n ...rest\n },\n ref\n ) {\n const titleId = React.useId();\n const ctx = React.useMemo(\n () => ({ consequence, onApprove, onReject, asModal, titleId }),\n [consequence, onApprove, onReject, asModal, titleId]\n );\n\n if (asModal) {\n return (\n <ActionPreviewContext.Provider value={ctx}>\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Portal>\n <AlertDialog.Overlay data-acp=\"overlay\" />\n <AlertDialog.Content\n ref={ref as React.Ref<HTMLDivElement>}\n data-acp=\"root\"\n data-modal=\"\"\n data-consequence={consequence}\n aria-describedby={undefined}\n onEscapeKeyDown={onReject}\n {...rest}\n >\n {children}\n </AlertDialog.Content>\n </AlertDialog.Portal>\n </AlertDialog.Root>\n </ActionPreviewContext.Provider>\n );\n }\n\n return (\n <ActionPreviewContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-consequence={consequence}\n {...rest}\n >\n {children}\n </section>\n </ActionPreviewContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ActionPreviewHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ActionPreviewHeaderProps) {\n useActionPreviewContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type ActionPreviewIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ActionPreviewIconProps) {\n useActionPreviewContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ActionPreviewTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The action, stated as a verb phrase: \"Send email to Dana Ito\". */\nfunction Title(props: ActionPreviewTitleProps) {\n const { asModal, titleId } = useActionPreviewContext(\"Title\");\n if (asModal) {\n // Radix wires the dialog's aria-labelledby to its own Title id; don't override it.\n return <AlertDialog.Title data-acp=\"title\" {...props} />;\n }\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\n/* ── Fields ───────────────────────────────────────────────────────── */\n\nexport type ActionPreviewFieldsProps = React.HTMLAttributes<HTMLDListElement>;\n\nfunction Fields(props: ActionPreviewFieldsProps) {\n useActionPreviewContext(\"Fields\");\n return <dl data-acp=\"fields\" {...props} />;\n}\n\nexport interface ActionPreviewFieldProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The fact's name: \"To\", \"Amount\", \"File\". */\n label: React.ReactNode;\n /** The fact's exact value — never a summary. */\n children: React.ReactNode;\n}\n\nfunction Field({ label, children, ...rest }: ActionPreviewFieldProps) {\n useActionPreviewContext(\"Field\");\n return (\n <div data-acp=\"field\" {...rest}>\n <dt data-acp=\"field-label\">{label}</dt>\n <dd data-acp=\"field-value\">{children}</dd>\n </div>\n );\n}\n\n/* ── Content (long payloads, collapsible) ─────────────────────────── */\n\nexport interface ActionPreviewContentProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Toggle label: \"Message body\", \"Full diff\". */\n label: React.ReactNode;\n defaultExpanded?: boolean;\n children: React.ReactNode;\n}\n\nfunction Content({\n label,\n defaultExpanded = false,\n children,\n ...rest\n}: ActionPreviewContentProps) {\n useActionPreviewContext(\"Content\");\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const bodyId = React.useId();\n return (\n <div data-acp=\"content\" data-expanded={expanded ? \"\" : undefined} {...rest}>\n <button\n type=\"button\"\n data-acp=\"content-toggle\"\n aria-expanded={expanded}\n aria-controls={bodyId}\n onClick={() => setExpanded((v) => !v)}\n >\n {label}\n </button>\n <div id={bodyId} data-acp=\"content-body\" hidden={!expanded}>\n {children}\n </div>\n </div>\n );\n}\n\n/* ── Source (who is asking, under what authority) ─────────────────── */\n\nexport interface ActionPreviewSourceProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The agent requesting approval: \"Inbox Assistant\". */\n agent: React.ReactNode;\n /** The authority it acts under: task name, grant, or trigger. */\n authority?: React.ReactNode;\n}\n\nfunction Source({ agent, authority, children, ...rest }: ActionPreviewSourceProps) {\n useActionPreviewContext(\"Source\");\n return (\n <div data-acp=\"source\" {...rest}>\n <span data-acp=\"source-agent\">{agent}</span>\n {authority != null && (\n <span data-acp=\"source-authority\">{authority}</span>\n )}\n {children}\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type ActionPreviewActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ActionPreviewActionsProps) {\n useActionPreviewContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport type ActionPreviewButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Approve = React.forwardRef<HTMLButtonElement, ActionPreviewButtonProps>(\n function ActionPreviewApprove({ onClick, ...rest }, ref) {\n const { onApprove, asModal, consequence } =\n useActionPreviewContext(\"Approve\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onApprove();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"approve\"\n data-consequence={consequence}\n onClick={handleClick}\n {...rest}\n />\n );\n // AlertDialog.Action closes the dialog after click; approval must never\n // receive initial focus, which Radix guarantees by focusing Cancel.\n return asModal ? (\n <AlertDialog.Action asChild>{button}</AlertDialog.Action>\n ) : (\n button\n );\n }\n);\n\nconst Reject = React.forwardRef<HTMLButtonElement, ActionPreviewButtonProps>(\n function ActionPreviewReject({ onClick, ...rest }, ref) {\n const { onReject, asModal } = useActionPreviewContext(\"Reject\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onReject();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"reject\"\n onClick={handleClick}\n {...rest}\n />\n );\n return asModal ? (\n <AlertDialog.Cancel asChild>{button}</AlertDialog.Cancel>\n ) : (\n button\n );\n }\n);\n\nexport const ActionPreview = {\n Root,\n Header,\n Icon,\n Title,\n Fields,\n Field,\n Content,\n Source,\n Actions,\n Approve,\n Reject,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialog from \"@radix-ui/react-alert-dialog\";\n\n/**\n * Irreversibility Gate — a confirmation whose friction scales with the\n * consequence of the action. Reversible actions confirm in a click;\n * irreversible ones require a deliberate, legible gesture.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * The friction ladder is driven by `severity`:\n * - \"reversible\": confirm is enabled immediately, neutral styling.\n * - \"undoable\": confirm is enabled, but the gate advertises the undo\n * window so the user knows the action is recoverable.\n * - \"irreversible\": confirm styling turns destructive, and — when a\n * `confirmPhrase` is supplied — stays disabled until the user types\n * that exact phrase. Type-to-confirm is the accessible, deliberate\n * alternative to hold-to-confirm (which is invisible to screen readers\n * and punishing for motor impairments).\n *\n * Two render modes mirror Action Preview:\n * - inline (default): a `role=\"group\"` card\n * - modal (`asModal`): a Radix AlertDialog — focus is trapped, initial\n * focus lands on cancel (the least destructive action), and Escape\n * cancels. Controlled via `open` / `onOpenChange`.\n */\n\nexport type IrreversibilitySeverity =\n | \"reversible\"\n | \"undoable\"\n | \"irreversible\";\n\ninterface IrreversibilityGateContextValue {\n severity: IrreversibilitySeverity;\n onConfirm: () => void;\n onCancel: () => void;\n asModal: boolean;\n titleId: string;\n descId: string;\n fieldId: string;\n /** The phrase the user must type before confirming, or null if none. */\n requirePhrase: string | null;\n typed: string;\n setTyped: (value: string) => void;\n canConfirm: boolean;\n}\n\nconst IrreversibilityGateContext =\n React.createContext<IrreversibilityGateContextValue | null>(null);\n\nfunction useGateContext(part: string): IrreversibilityGateContextValue {\n const ctx = React.useContext(IrreversibilityGateContext);\n if (!ctx) {\n throw new Error(\n `IrreversibilityGate.${part} must be rendered inside IrreversibilityGate.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface IrreversibilityGateRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** Called when the user confirms the action. */\n onConfirm: () => void;\n /** Called when the user backs out (button, or Escape in modal mode). */\n onCancel: () => void;\n /**\n * How hard the action is to undo. Scales the gate's friction and the\n * confirm button's styling. Defaults to \"irreversible\" — the case this\n * pattern exists for.\n */\n severity?: IrreversibilitySeverity;\n /**\n * When set and `severity` is \"irreversible\", the confirm action stays\n * disabled until the user types this exact phrase. Ignored at lower\n * severities, where type-to-confirm would be gratuitous friction.\n */\n confirmPhrase?: string;\n /** Render as a modal AlertDialog instead of an inline card. */\n asModal?: boolean;\n /** Modal mode only: whether the dialog is open (controlled). */\n open?: boolean;\n /** Modal mode only: called when the dialog requests an open-state change. */\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, IrreversibilityGateRootProps>(\n function IrreversibilityGateRoot(\n {\n onConfirm,\n onCancel,\n severity = \"irreversible\",\n confirmPhrase,\n asModal = false,\n open,\n onOpenChange,\n children,\n ...rest\n },\n ref\n ) {\n const titleId = React.useId();\n const descId = React.useId();\n const fieldId = React.useId();\n const [typed, setTyped] = React.useState(\"\");\n\n const requirePhrase =\n severity === \"irreversible\" && confirmPhrase ? confirmPhrase : null;\n const canConfirm =\n requirePhrase === null || typed.trim() === requirePhrase;\n\n // Reset the typed phrase whenever a modal gate closes, so a reopened\n // gate never starts pre-satisfied from a previous attempt. Done during\n // render (React's sanctioned \"reset state on prop change\" pattern)\n // rather than in an effect, which would cause a redundant re-render.\n const [prevOpen, setPrevOpen] = React.useState(open);\n if (asModal && open !== prevOpen) {\n setPrevOpen(open);\n if (open === false && typed !== \"\") setTyped(\"\");\n }\n\n const ctx = React.useMemo<IrreversibilityGateContextValue>(\n () => ({\n severity,\n onConfirm,\n onCancel,\n asModal,\n titleId,\n descId,\n fieldId,\n requirePhrase,\n typed,\n setTyped,\n canConfirm,\n }),\n [\n severity,\n onConfirm,\n onCancel,\n asModal,\n titleId,\n descId,\n fieldId,\n requirePhrase,\n typed,\n canConfirm,\n ]\n );\n\n if (asModal) {\n return (\n <IrreversibilityGateContext.Provider value={ctx}>\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Portal>\n <AlertDialog.Overlay data-acp=\"overlay\" />\n <AlertDialog.Content\n ref={ref as React.Ref<HTMLDivElement>}\n data-acp=\"root\"\n data-gate=\"\"\n data-modal=\"\"\n data-severity={severity}\n aria-describedby={undefined}\n onEscapeKeyDown={onCancel}\n {...rest}\n >\n {children}\n </AlertDialog.Content>\n </AlertDialog.Portal>\n </AlertDialog.Root>\n </IrreversibilityGateContext.Provider>\n );\n }\n\n return (\n <IrreversibilityGateContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-gate=\"\"\n data-severity={severity}\n {...rest}\n >\n {children}\n </section>\n </IrreversibilityGateContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type IrreversibilityGateHeaderProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: IrreversibilityGateHeaderProps) {\n useGateContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type IrreversibilityGateIconProps =\n React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: IrreversibilityGateIconProps) {\n const { severity } = useGateContext(\"Icon\");\n return <span aria-hidden data-acp=\"gate-icon\" data-severity={severity} {...props} />;\n}\n\nexport type IrreversibilityGateTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The action, stated as a verb phrase: \"Delete 1,240 files\". */\nfunction Title(props: IrreversibilityGateTitleProps) {\n const { asModal, titleId } = useGateContext(\"Title\");\n if (asModal) {\n // Radix wires the dialog's aria-labelledby to its own Title id.\n return <AlertDialog.Title data-acp=\"title\" {...props} />;\n }\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type IrreversibilityGateDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/** One line of framing above the enumerated consequences. */\nfunction Description(props: IrreversibilityGateDescriptionProps) {\n const { descId } = useGateContext(\"Description\");\n return <p id={descId} data-acp=\"gate-description\" {...props} />;\n}\n\n/* ── Consequences ─────────────────────────────────────────────────── */\n\nexport type IrreversibilityGateConsequencesProps =\n React.HTMLAttributes<HTMLUListElement>;\n\nfunction Consequences(props: IrreversibilityGateConsequencesProps) {\n useGateContext(\"Consequences\");\n return <ul data-acp=\"gate-consequences\" {...props} />;\n}\n\nexport type IrreversibilityGateConsequenceProps =\n React.LiHTMLAttributes<HTMLLIElement>;\n\n/** One concrete, specific effect: \"Permanently deletes 1,240 files\". */\nfunction Consequence({ children, ...rest }: IrreversibilityGateConsequenceProps) {\n useGateContext(\"Consequence\");\n return (\n <li data-acp=\"gate-consequence\" {...rest}>\n <span aria-hidden data-acp=\"gate-consequence-marker\" />\n <span data-acp=\"gate-consequence-text\">{children}</span>\n </li>\n );\n}\n\n/* ── Type-to-confirm field ────────────────────────────────────────── */\n\nexport type IrreversibilityGateConfirmFieldProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"value\" | \"onChange\" | \"id\"\n>;\n\n/**\n * The type-to-confirm input. Renders only when the gate actually requires\n * a phrase (severity \"irreversible\" + a `confirmPhrase`); otherwise it\n * renders nothing, so demos can leave it in the tree unconditionally.\n */\nfunction ConfirmField({\n children,\n ...rest\n}: IrreversibilityGateConfirmFieldProps & { children?: React.ReactNode }) {\n const { requirePhrase, typed, setTyped, fieldId } =\n useGateContext(\"ConfirmField\");\n if (requirePhrase === null) return null;\n return (\n <div data-acp=\"confirm-field\">\n <label htmlFor={fieldId} data-acp=\"confirm-field-label\">\n {children ?? (\n <>\n Type <code data-acp=\"confirm-field-phrase\">{requirePhrase}</code> to\n confirm\n </>\n )}\n </label>\n <input\n id={fieldId}\n data-acp=\"confirm-field-input\"\n type=\"text\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n value={typed}\n onChange={(event) => setTyped(event.target.value)}\n {...rest}\n />\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type IrreversibilityGateActionsProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: IrreversibilityGateActionsProps) {\n useGateContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport type IrreversibilityGateButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Confirm = React.forwardRef<\n HTMLButtonElement,\n IrreversibilityGateButtonProps\n>(function IrreversibilityGateConfirm(\n { onClick, disabled, ...rest },\n ref\n) {\n const { onConfirm, asModal, severity, canConfirm } =\n useGateContext(\"Confirm\");\n const isDisabled = disabled || !canConfirm;\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onConfirm();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"confirm\"\n data-severity={severity}\n disabled={isDisabled}\n aria-disabled={isDisabled || undefined}\n onClick={handleClick}\n {...rest}\n />\n );\n // AlertDialog.Action closes the dialog after click and never receives\n // initial focus (Radix focuses Cancel), so confirm is always deliberate.\n return asModal ? (\n <AlertDialog.Action asChild>{button}</AlertDialog.Action>\n ) : (\n button\n );\n});\n\nconst Cancel = React.forwardRef<\n HTMLButtonElement,\n IrreversibilityGateButtonProps\n>(function IrreversibilityGateCancel({ onClick, ...rest }, ref) {\n const { onCancel, asModal } = useGateContext(\"Cancel\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onCancel();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"cancel\"\n onClick={handleClick}\n {...rest}\n />\n );\n return asModal ? (\n <AlertDialog.Cancel asChild>{button}</AlertDialog.Cancel>\n ) : (\n button\n );\n});\n\nexport const IrreversibilityGate = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Consequences,\n Consequence,\n ConfirmField,\n Actions,\n Confirm,\n Cancel,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Scoped Grant — the consent screen for connecting an agent to a service.\n * Where an OAuth scope list says \"access your email\", this pattern makes the\n * capability granularity legible: which resources, and read vs. write vs.\n * delete, each as an individually reviewable, toggleable permission.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Selection is a set of granted scope ids, controllable via `value` /\n * `onValueChange` or uncontrolled via `defaultValue`. Mandatory scopes are\n * declared once at the root (`requiredScopes`) so the grant payload has a\n * single source of truth and children never need to self-register.\n */\n\nexport type ScopeAccess = \"read\" | \"write\" | \"delete\";\n\ninterface ScopedGrantContextValue {\n isGranted: (id: string) => boolean;\n isRequired: (id: string) => boolean;\n toggle: (id: string) => void;\n granted: string[];\n count: number;\n onGrant: (ids: string[]) => void;\n onCancel?: () => void;\n titleId: string;\n}\n\nconst ScopedGrantContext =\n React.createContext<ScopedGrantContextValue | null>(null);\n\nfunction useScopedGrantContext(part: string): ScopedGrantContextValue {\n const ctx = React.useContext(ScopedGrantContext);\n if (!ctx) {\n throw new Error(\n `ScopedGrant.${part} must be rendered inside ScopedGrant.Root`\n );\n }\n return ctx;\n}\n\n/** Controllable set state without pulling in a dependency. */\nfunction useGrantedSet(\n value: string[] | undefined,\n defaultValue: string[] | undefined,\n onValueChange: ((ids: string[]) => void) | undefined\n): [Set<string>, (updater: (prev: Set<string>) => Set<string>) => void] {\n const isControlled = value !== undefined;\n const [internal, setInternal] = React.useState<Set<string>>(\n () => new Set(defaultValue ?? [])\n );\n const current = React.useMemo(\n () => (isControlled ? new Set(value) : internal),\n [isControlled, value, internal]\n );\n const setValue = React.useCallback(\n (updater: (prev: Set<string>) => Set<string>) => {\n const next = updater(current);\n if (!isControlled) setInternal(next);\n onValueChange?.([...next]);\n },\n [current, isControlled, onValueChange]\n );\n return [current, setValue];\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ScopedGrantRootProps\n extends Omit<React.FormHTMLAttributes<HTMLFormElement>, \"onSubmit\"> {\n /** Granted scope ids (controlled). */\n value?: string[];\n /** Initial granted scope ids (uncontrolled). */\n defaultValue?: string[];\n /** Called whenever the granted set changes. */\n onValueChange?: (ids: string[]) => void;\n /**\n * Scope ids that are mandatory for the connection to function. They are\n * always granted, render as locked, and are always present in the grant\n * payload — declared here so payload/count have one source of truth.\n */\n requiredScopes?: string[];\n /** Called with the final granted ids when the user confirms the grant. */\n onGrant: (ids: string[]) => void;\n /** Called when the user declines to connect. */\n onCancel?: () => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLFormElement, ScopedGrantRootProps>(\n function ScopedGrantRoot(\n {\n value,\n defaultValue,\n onValueChange,\n requiredScopes,\n onGrant,\n onCancel,\n children,\n ...rest\n },\n ref\n ) {\n const titleId = React.useId();\n const [selected, setSelected] = useGrantedSet(\n value,\n defaultValue,\n onValueChange\n );\n\n const requiredSet = React.useMemo(\n () => new Set(requiredScopes ?? []),\n [requiredScopes]\n );\n\n // Effective grant = user selection ∪ required scopes.\n const granted = React.useMemo(() => {\n const set = new Set(selected);\n for (const id of requiredSet) set.add(id);\n return [...set];\n }, [selected, requiredSet]);\n\n const ctx = React.useMemo<ScopedGrantContextValue>(() => {\n const grantedSet = new Set(granted);\n return {\n isGranted: (id) => grantedSet.has(id),\n isRequired: (id) => requiredSet.has(id),\n toggle: (id) => {\n if (requiredSet.has(id)) return; // locked\n setSelected((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n },\n granted,\n count: grantedSet.size,\n onGrant,\n onCancel,\n titleId,\n };\n }, [granted, requiredSet, setSelected, onGrant, onCancel, titleId]);\n\n return (\n <ScopedGrantContext.Provider value={ctx}>\n <form\n ref={ref}\n data-acp=\"root\"\n data-grant=\"\"\n aria-labelledby={titleId}\n onSubmit={(event) => {\n event.preventDefault();\n onGrant(granted);\n }}\n {...rest}\n >\n {children}\n </form>\n </ScopedGrantContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ScopedGrantHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ScopedGrantHeaderProps) {\n useScopedGrantContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type ScopedGrantIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ScopedGrantIconProps) {\n useScopedGrantContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ScopedGrantTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\n\n/** What is being connected to what: \"Connect Inbox Assistant to Gmail\". */\nfunction Title(props: ScopedGrantTitleProps) {\n const { titleId } = useScopedGrantContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type ScopedGrantDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\nfunction Description(props: ScopedGrantDescriptionProps) {\n useScopedGrantContext(\"Description\");\n return <p data-acp=\"grant-description\" {...props} />;\n}\n\n/* ── Group (per-resource scoping) ─────────────────────────────────── */\n\nexport interface ScopedGrantGroupProps\n extends Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, \"resource\"> {\n /** The resource this cluster of scopes applies to: \"Gmail\". */\n label: React.ReactNode;\n /** How the resource is narrowed: \"Board 2026 label only\". */\n resource?: React.ReactNode;\n}\n\n/**\n * Clusters scopes by the resource they touch, so \"read\" against one folder\n * and \"delete\" against the whole account are never conflated. Renders a\n * fieldset/legend so assistive tech announces the grouping.\n */\nfunction Group({ label, resource, children, ...rest }: ScopedGrantGroupProps) {\n useScopedGrantContext(\"Group\");\n return (\n <fieldset data-acp=\"grant-group\" {...rest}>\n <legend data-acp=\"grant-group-legend\">\n <span data-acp=\"grant-group-label\">{label}</span>\n {resource != null && (\n <span data-acp=\"grant-group-resource\">{resource}</span>\n )}\n </legend>\n {children}\n </fieldset>\n );\n}\n\n/* ── Scope (one capability) ───────────────────────────────────────── */\n\nexport interface ScopedGrantScopeProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"id\"> {\n /** Stable id used in the granted set and `requiredScopes`. */\n id: string;\n /** Power level of this capability — surfaced as a text badge, never color alone. */\n access: ScopeAccess;\n /** Plain-language capability name: \"Send messages on your behalf\". */\n label: React.ReactNode;\n /** What granting it actually lets the agent do. */\n description?: React.ReactNode;\n}\n\nconst ACCESS_LABEL: Record<ScopeAccess, string> = {\n read: \"Read\",\n write: \"Write\",\n delete: \"Delete\",\n};\n\nfunction Scope({\n id,\n access,\n label,\n description,\n ...rest\n}: ScopedGrantScopeProps) {\n const { isGranted, isRequired, toggle } = useScopedGrantContext(\"Scope\");\n const inputId = React.useId();\n const descId = React.useId();\n const granted = isGranted(id);\n const required = isRequired(id);\n return (\n <div\n data-acp=\"scope\"\n data-access={access}\n data-granted={granted ? \"\" : undefined}\n data-required={required ? \"\" : undefined}\n {...rest}\n >\n <input\n type=\"checkbox\"\n id={inputId}\n data-acp=\"scope-checkbox\"\n checked={granted}\n disabled={required}\n aria-describedby={description != null ? descId : undefined}\n onChange={() => toggle(id)}\n />\n <div data-acp=\"scope-body\">\n <label htmlFor={inputId} data-acp=\"scope-label\">\n <span data-acp=\"scope-access\" data-access={access}>\n {ACCESS_LABEL[access]}\n </span>\n <span data-acp=\"scope-name\">{label}</span>\n {required && (\n <span data-acp=\"scope-required-tag\"> · required</span>\n )}\n </label>\n {description != null && (\n <p id={descId} data-acp=\"scope-description\">\n {description}\n </p>\n )}\n </div>\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type ScopedGrantActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ScopedGrantActionsProps) {\n useScopedGrantContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport interface ScopedGrantGrantProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /**\n * Button content. As a render function it receives the live grant count,\n * so the label can read \"Grant 3 permissions\" without lifting state.\n */\n children:\n | React.ReactNode\n | ((state: { count: number }) => React.ReactNode);\n}\n\nconst Grant = React.forwardRef<HTMLButtonElement, ScopedGrantGrantProps>(\n function ScopedGrantGrant({ children, ...rest }, ref) {\n const { count } = useScopedGrantContext(\"Grant\");\n return (\n <button ref={ref} type=\"submit\" data-acp=\"grant\" {...rest}>\n {typeof children === \"function\" ? children({ count }) : children}\n </button>\n );\n }\n);\n\nexport type ScopedGrantCancelProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Cancel = React.forwardRef<HTMLButtonElement, ScopedGrantCancelProps>(\n function ScopedGrantCancel({ onClick, ...rest }, ref) {\n const { onCancel } = useScopedGrantContext(\"Cancel\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onCancel?.();\n };\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"cancel\"\n onClick={handleClick}\n {...rest}\n />\n );\n }\n);\n\nexport const ScopedGrant = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Group,\n Scope,\n Actions,\n Grant,\n Cancel,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialog from \"@radix-ui/react-alert-dialog\";\n\nimport type { ScopeAccess } from \"../scoped-grant/scoped-grant\";\n\n/**\n * Progressive Scope — the in-context escalation request. Rather than asking\n * for every permission upfront (see Scoped Grant), the agent starts minimal\n * and asks for one more capability at the exact moment it needs it, tied to\n * the concrete action it's blocked on and justified in place.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * The distinct decision is breadth, not just yes/no: grant the capability for\n * only this blocked action (`onAllowOnce`), escalate it into the standing\n * grant (`onAllowAlways`), or refuse (`onDeny`). The time-duration ladder in\n * full (\"for this task\", \"for an hour\"…) belongs to Consent Memory.\n *\n * Two render modes mirror the other patterns:\n * - inline (default): a `role=\"group\"` card in the task surface — the\n * in-context default.\n * - modal (`asModal`): a Radix AlertDialog — focus is trapped, initial focus\n * lands on deny (the least escalation), and Escape denies.\n */\n\nexport type { ScopeAccess };\n\ninterface ProgressiveScopeContextValue {\n access: ScopeAccess;\n onAllowOnce: () => void;\n onAllowAlways: () => void;\n onDeny: () => void;\n asModal: boolean;\n titleId: string;\n}\n\nconst ProgressiveScopeContext =\n React.createContext<ProgressiveScopeContextValue | null>(null);\n\nfunction useProgressiveScopeContext(\n part: string\n): ProgressiveScopeContextValue {\n const ctx = React.useContext(ProgressiveScopeContext);\n if (!ctx) {\n throw new Error(\n `ProgressiveScope.${part} must be rendered inside ProgressiveScope.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ProgressiveScopeRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** Power level of the newly requested capability — surfaced as a text badge. */\n access?: ScopeAccess;\n /** Grant the capability for only the blocked action. */\n onAllowOnce: () => void;\n /** Escalate the capability into the standing grant. */\n onAllowAlways: () => void;\n /** Refuse the escalation (button, or Escape in modal mode). */\n onDeny: () => void;\n /** Render as a modal AlertDialog instead of an inline card. */\n asModal?: boolean;\n /** Modal mode only: whether the dialog is open (controlled). */\n open?: boolean;\n /** Modal mode only: called when the dialog requests an open-state change. */\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, ProgressiveScopeRootProps>(\n function ProgressiveScopeRoot(\n {\n access = \"read\",\n onAllowOnce,\n onAllowAlways,\n onDeny,\n asModal = false,\n open,\n onOpenChange,\n children,\n ...rest\n },\n ref\n ) {\n const titleId = React.useId();\n const ctx = React.useMemo<ProgressiveScopeContextValue>(\n () => ({\n access,\n onAllowOnce,\n onAllowAlways,\n onDeny,\n asModal,\n titleId,\n }),\n [access, onAllowOnce, onAllowAlways, onDeny, asModal, titleId]\n );\n\n if (asModal) {\n return (\n <ProgressiveScopeContext.Provider value={ctx}>\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Portal>\n <AlertDialog.Overlay data-acp=\"overlay\" />\n <AlertDialog.Content\n ref={ref as React.Ref<HTMLDivElement>}\n data-acp=\"root\"\n data-escalation=\"\"\n data-modal=\"\"\n data-access={access}\n aria-describedby={undefined}\n onEscapeKeyDown={onDeny}\n {...rest}\n >\n {children}\n </AlertDialog.Content>\n </AlertDialog.Portal>\n </AlertDialog.Root>\n </ProgressiveScopeContext.Provider>\n );\n }\n\n return (\n <ProgressiveScopeContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-escalation=\"\"\n data-access={access}\n {...rest}\n >\n {children}\n </section>\n </ProgressiveScopeContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ProgressiveScopeHeaderProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ProgressiveScopeHeaderProps) {\n useProgressiveScopeContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type ProgressiveScopeIconProps =\n React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ProgressiveScopeIconProps) {\n useProgressiveScopeContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ProgressiveScopeTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The ask, stated plainly: \"Inbox Assistant needs to send email\". */\nfunction Title(props: ProgressiveScopeTitleProps) {\n const { asModal, titleId } = useProgressiveScopeContext(\"Title\");\n if (asModal) {\n return <AlertDialog.Title data-acp=\"title\" {...props} />;\n }\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\n/* ── Context (what triggered the request) ─────────────────────────── */\n\nexport type ProgressiveScopeReasonProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * Why the agent is asking now — tied to the concrete, blocked action.\n * \"To reply to the vendor, it needs to send email on your behalf.\"\n */\nfunction Reason(props: ProgressiveScopeReasonProps) {\n useProgressiveScopeContext(\"Reason\");\n return <p data-acp=\"escalation-reason\" {...props} />;\n}\n\n/* ── Request (the specific new capability) ────────────────────────── */\n\nexport interface ProgressiveScopeRequestProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** Plain-language capability being requested: \"Send email on your behalf\". */\n label: React.ReactNode;\n /** What granting it lets the agent do. */\n description?: React.ReactNode;\n}\n\nconst ACCESS_LABEL: Record<ScopeAccess, string> = {\n read: \"Read\",\n write: \"Write\",\n delete: \"Delete\",\n};\n\nfunction Request({ label, description, ...rest }: ProgressiveScopeRequestProps) {\n const { access } = useProgressiveScopeContext(\"Request\");\n return (\n <div data-acp=\"request\" data-access={access} {...rest}>\n <div data-acp=\"request-head\">\n <span data-acp=\"request-access\" data-access={access}>\n {ACCESS_LABEL[access]}\n </span>\n <span data-acp=\"request-name\">{label}</span>\n </div>\n {description != null && (\n <p data-acp=\"request-description\">{description}</p>\n )}\n </div>\n );\n}\n\n/* ── Current (what the agent already has) ─────────────────────────── */\n\nexport type ProgressiveScopeCurrentProps =\n React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * Frames the escalation as additive by naming the standing grant it builds\n * on: \"Inbox Assistant can already read this label.\"\n */\nfunction Current({ children, ...rest }: ProgressiveScopeCurrentProps) {\n useProgressiveScopeContext(\"Current\");\n return (\n <div data-acp=\"escalation-current\" {...rest}>\n <span aria-hidden data-acp=\"escalation-current-marker\" />\n <span>{children}</span>\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type ProgressiveScopeActionsProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ProgressiveScopeActionsProps) {\n useProgressiveScopeContext(\"Actions\");\n return <div data-acp=\"actions\" data-escalation-actions=\"\" {...props} />;\n}\n\nexport type ProgressiveScopeButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nfunction makeAllowButton(\n displayName: string,\n hook: \"allow-once\" | \"allow-always\",\n pick: (\n ctx: ProgressiveScopeContextValue\n ) => () => void\n) {\n const Component = React.forwardRef<\n HTMLButtonElement,\n ProgressiveScopeButtonProps\n >(function AllowButton({ onClick, ...rest }, ref) {\n const ctx = useProgressiveScopeContext(displayName);\n const action = pick(ctx);\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) action();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp={hook}\n onClick={handleClick}\n {...rest}\n />\n );\n return ctx.asModal ? (\n <AlertDialog.Action asChild>{button}</AlertDialog.Action>\n ) : (\n button\n );\n });\n Component.displayName = displayName;\n return Component;\n}\n\nconst AllowOnce = makeAllowButton(\n \"ProgressiveScopeAllowOnce\",\n \"allow-once\",\n (ctx) => ctx.onAllowOnce\n);\n\nconst AllowAlways = makeAllowButton(\n \"ProgressiveScopeAllowAlways\",\n \"allow-always\",\n (ctx) => ctx.onAllowAlways\n);\n\nconst Deny = React.forwardRef<HTMLButtonElement, ProgressiveScopeButtonProps>(\n function ProgressiveScopeDeny({ onClick, ...rest }, ref) {\n const { onDeny, asModal } = useProgressiveScopeContext(\"Deny\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onDeny();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"deny\"\n onClick={handleClick}\n {...rest}\n />\n );\n return asModal ? (\n <AlertDialog.Cancel asChild>{button}</AlertDialog.Cancel>\n ) : (\n button\n );\n }\n);\n\nexport const ProgressiveScope = {\n Root,\n Header,\n Icon,\n Title,\n Reason,\n Request,\n Current,\n Actions,\n AllowOnce,\n AllowAlways,\n Deny,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Batch Approval — a review queue for a run of agent-proposed actions.\n * Reviewing agent work one modal at a time causes approval fatigue: the user\n * falls into a rhythm and starts rubber-stamping. Batch Approval gives the\n * queue triage affordances — select many, approve or reject as a group — while\n * deliberately refusing to let the highest-stakes items be swept up in a bulk\n * \"approve all\".\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * The queue is declared once at the root (`items`) so selection eligibility\n * and counts have a single source of truth — mirroring Scoped Grant's\n * `requiredScopes`. An item flagged `requiresReview` is excluded from\n * select-all and from batch actions: it can only be approved or rejected\n * on its own row, so the item that most needs a human never gets a group pass.\n *\n * Selection is a set of item ids, controllable via `value` / `onValueChange`\n * or uncontrolled via `defaultValue`.\n */\n\nexport interface BatchApprovalItem {\n /** Stable id used in the selection set and in approve/reject payloads. */\n id: string;\n /**\n * When true the item is high-stakes: it is never selectable in bulk and is\n * excluded from select-all and the batch actions. It must be decided on its\n * own row. Irreversible or ambiguous actions belong here.\n */\n requiresReview?: boolean;\n}\n\ninterface BatchApprovalContextValue {\n isSelected: (id: string) => boolean;\n toggle: (id: string) => void;\n requiresReview: (id: string) => boolean;\n /** Ids eligible for bulk selection (every item that isn't requiresReview). */\n selectableIds: string[];\n selectedIds: string[];\n selectedCount: number;\n selectableCount: number;\n /** True when every selectable item is selected (and there is at least one). */\n allSelected: boolean;\n /** True when some — but not all — selectable items are selected. */\n someSelected: boolean;\n setAllSelected: (checked: boolean) => void;\n approve: (ids: string[]) => void;\n reject: (ids: string[]) => void;\n titleId: string;\n}\n\nconst BatchApprovalContext =\n React.createContext<BatchApprovalContextValue | null>(null);\n\nfunction useBatchApprovalContext(part: string): BatchApprovalContextValue {\n const ctx = React.useContext(BatchApprovalContext);\n if (!ctx) {\n throw new Error(\n `BatchApproval.${part} must be rendered inside BatchApproval.Root`\n );\n }\n return ctx;\n}\n\n/** Per-row context so Item's action buttons know which id they act on. */\nconst BatchApprovalItemContext = React.createContext<{ id: string } | null>(\n null\n);\n\nfunction useItemId(part: string): string {\n const ctx = React.useContext(BatchApprovalItemContext);\n if (!ctx) {\n throw new Error(\n `BatchApproval.${part} must be rendered inside BatchApproval.Item`\n );\n }\n return ctx.id;\n}\n\n/** Controllable set state without pulling in a dependency. */\nfunction useSelectedSet(\n value: string[] | undefined,\n defaultValue: string[] | undefined,\n onValueChange: ((ids: string[]) => void) | undefined\n): [Set<string>, (updater: (prev: Set<string>) => Set<string>) => void] {\n const isControlled = value !== undefined;\n const [internal, setInternal] = React.useState<Set<string>>(\n () => new Set(defaultValue ?? [])\n );\n const current = React.useMemo(\n () => (isControlled ? new Set(value) : internal),\n [isControlled, value, internal]\n );\n const setValue = React.useCallback(\n (updater: (prev: Set<string>) => Set<string>) => {\n const next = updater(current);\n if (!isControlled) setInternal(next);\n onValueChange?.([...next]);\n },\n [current, isControlled, onValueChange]\n );\n return [current, setValue];\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface BatchApprovalRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /**\n * The queue, declared once so selection eligibility and counts have one\n * source of truth. Order is presentation-only; children still render each\n * row. Items marked `requiresReview` are excluded from bulk selection.\n */\n items: BatchApprovalItem[];\n /** Selected item ids (controlled). */\n value?: string[];\n /** Initial selected item ids (uncontrolled). */\n defaultValue?: string[];\n /** Called whenever the selection changes. */\n onValueChange?: (ids: string[]) => void;\n /** Called with the ids the user approved (one id per row, many for batch). */\n onApprove: (ids: string[]) => void;\n /** Called with the ids the user rejected. */\n onReject: (ids: string[]) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, BatchApprovalRootProps>(\n function BatchApprovalRoot(\n {\n items,\n value,\n defaultValue,\n onValueChange,\n onApprove,\n onReject,\n children,\n ...rest\n },\n ref\n ) {\n const titleId = React.useId();\n const [selected, setSelected] = useSelectedSet(\n value,\n defaultValue,\n onValueChange\n );\n\n const reviewSet = React.useMemo(\n () => new Set(items.filter((i) => i.requiresReview).map((i) => i.id)),\n [items]\n );\n const selectableIds = React.useMemo(\n () => items.filter((i) => !i.requiresReview).map((i) => i.id),\n [items]\n );\n\n const ctx = React.useMemo<BatchApprovalContextValue>(() => {\n // Only selectable ids count toward selection state; a requiresReview id\n // can never enter the set (toggle guards it), but intersect defensively.\n const selectedSelectable = selectableIds.filter((id) =>\n selected.has(id)\n );\n const selectedCount = selectedSelectable.length;\n const selectableCount = selectableIds.length;\n const clearFrom = (prev: Set<string>, ids: string[]) => {\n const next = new Set(prev);\n for (const id of ids) next.delete(id);\n return next;\n };\n return {\n isSelected: (id) => selected.has(id),\n toggle: (id) => {\n if (reviewSet.has(id)) return; // never bulk-selectable\n setSelected((prev) => {\n const next = new Set(prev);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n return next;\n });\n },\n requiresReview: (id) => reviewSet.has(id),\n selectableIds,\n selectedIds: selectedSelectable,\n selectedCount,\n selectableCount,\n allSelected: selectableCount > 0 && selectedCount === selectableCount,\n someSelected: selectedCount > 0 && selectedCount < selectableCount,\n setAllSelected: (checked) => {\n setSelected((prev) => {\n if (!checked) return clearFrom(prev, selectableIds);\n const next = new Set(prev);\n for (const id of selectableIds) next.add(id);\n return next;\n });\n },\n approve: (ids) => {\n onApprove(ids);\n setSelected((prev) => clearFrom(prev, ids));\n },\n reject: (ids) => {\n onReject(ids);\n setSelected((prev) => clearFrom(prev, ids));\n },\n titleId,\n };\n }, [\n selected,\n selectableIds,\n reviewSet,\n setSelected,\n onApprove,\n onReject,\n titleId,\n ]);\n\n return (\n <BatchApprovalContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-batch=\"\"\n {...rest}\n >\n {children}\n </section>\n </BatchApprovalContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type BatchApprovalHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: BatchApprovalHeaderProps) {\n useBatchApprovalContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type BatchApprovalIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: BatchApprovalIconProps) {\n useBatchApprovalContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type BatchApprovalTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** What the queue is: \"Agent proposed 6 actions\". */\nfunction Title(props: BatchApprovalTitleProps) {\n const { titleId } = useBatchApprovalContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type BatchApprovalDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\nfunction Description(props: BatchApprovalDescriptionProps) {\n useBatchApprovalContext(\"Description\");\n return <p data-acp=\"batch-description\" {...props} />;\n}\n\n/* ── Toolbar (batch triage) ───────────────────────────────────────── */\n\nexport type BatchApprovalToolbarProps = React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * The batch triage bar. Holds `SelectAll`, a live `SelectionCount`, and the\n * batch `Approve` / `Reject` buttons — all scoped to the selectable items.\n */\nfunction Toolbar(props: BatchApprovalToolbarProps) {\n useBatchApprovalContext(\"Toolbar\");\n return <div data-acp=\"batch-toolbar\" role=\"group\" {...props} />;\n}\n\nexport type BatchApprovalSelectAllProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"children\"\n> & {\n /** Label content; defaults to \"Select all reviewable\". */\n children?: React.ReactNode;\n};\n\n/**\n * Selects every *selectable* item at once — items marked `requiresReview` are\n * never included, so \"select all\" can never sweep up the item that most needs\n * a person. Reflects the mixed state as `indeterminate`.\n */\nfunction SelectAll({ children, ...rest }: BatchApprovalSelectAllProps) {\n const { allSelected, someSelected, setAllSelected, selectableCount } =\n useBatchApprovalContext(\"SelectAll\");\n const inputRef = React.useRef<HTMLInputElement>(null);\n const inputId = React.useId();\n\n // indeterminate is a DOM-only property, not an attribute — set it on the\n // node after render. Reading from context (not state) so no extra render.\n React.useEffect(() => {\n if (inputRef.current) inputRef.current.indeterminate = someSelected;\n }, [someSelected]);\n\n return (\n <div data-acp=\"batch-select-all\" {...rest}>\n <input\n ref={inputRef}\n id={inputId}\n type=\"checkbox\"\n data-acp=\"batch-select-all-checkbox\"\n checked={allSelected}\n disabled={selectableCount === 0}\n onChange={(event) => setAllSelected(event.target.checked)}\n />\n <label htmlFor={inputId} data-acp=\"batch-select-all-label\">\n {children ?? \"Select all reviewable\"}\n </label>\n </div>\n );\n}\n\nexport interface BatchApprovalSelectionCountProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"children\"> {\n /**\n * Render function receiving the live counts, so a label can read\n * \"3 of 5 selected\" without lifting state. Defaults to \"{n} selected\".\n */\n children?: (state: {\n selectedCount: number;\n selectableCount: number;\n }) => React.ReactNode;\n}\n\n/** Live, polite count of what a batch action would touch. */\nfunction SelectionCount({ children, ...rest }: BatchApprovalSelectionCountProps) {\n const { selectedCount, selectableCount } =\n useBatchApprovalContext(\"SelectionCount\");\n return (\n <span data-acp=\"batch-selection-count\" aria-live=\"polite\" {...rest}>\n {children\n ? children({ selectedCount, selectableCount })\n : `${selectedCount} selected`}\n </span>\n );\n}\n\nexport type BatchApprovalButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n/** Batch-approve every selected item. Disabled when nothing is selected. */\nconst BatchApprove = React.forwardRef<\n HTMLButtonElement,\n BatchApprovalButtonProps\n>(function BatchApprovalBatchApprove({ onClick, disabled, ...rest }, ref) {\n const { approve, selectedIds, selectedCount } =\n useBatchApprovalContext(\"BatchApprove\");\n const isDisabled = disabled || selectedCount === 0;\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"approve\"\n data-batch-action=\"approve\"\n disabled={isDisabled}\n aria-disabled={isDisabled || undefined}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) approve(selectedIds);\n }}\n {...rest}\n />\n );\n});\n\n/** Batch-reject every selected item. Disabled when nothing is selected. */\nconst BatchReject = React.forwardRef<\n HTMLButtonElement,\n BatchApprovalButtonProps\n>(function BatchApprovalBatchReject({ onClick, disabled, ...rest }, ref) {\n const { reject, selectedIds, selectedCount } =\n useBatchApprovalContext(\"BatchReject\");\n const isDisabled = disabled || selectedCount === 0;\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"reject\"\n data-batch-action=\"reject\"\n disabled={isDisabled}\n aria-disabled={isDisabled || undefined}\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) reject(selectedIds);\n }}\n {...rest}\n />\n );\n});\n\n/* ── List + Item ──────────────────────────────────────────────────── */\n\nexport type BatchApprovalListProps = React.HTMLAttributes<HTMLUListElement>;\n\nfunction List(props: BatchApprovalListProps) {\n useBatchApprovalContext(\"List\");\n return <ul data-acp=\"batch-list\" {...props} />;\n}\n\nexport interface BatchApprovalItemProps\n extends Omit<React.LiHTMLAttributes<HTMLLIElement>, \"id\" | \"title\"> {\n /** Stable id; must appear in the root's `items`. */\n id: string;\n /** The proposed action, as a verb phrase: \"Send reply to Dana Okafor\". */\n title: React.ReactNode;\n /** One line of specifics under the title. */\n detail?: React.ReactNode;\n}\n\n/**\n * One row of the queue. Renders its own selection checkbox — disabled and\n * replaced with a \"review individually\" flag when the item `requiresReview`.\n * Per-row action buttons (`Item.Approve` / `Item.Reject`) go in `children`.\n */\nfunction Item({ id, title, detail, children, ...rest }: BatchApprovalItemProps) {\n const { isSelected, toggle, requiresReview } =\n useBatchApprovalContext(\"Item\");\n const inputId = React.useId();\n const detailId = React.useId();\n const selected = isSelected(id);\n const review = requiresReview(id);\n const itemCtx = React.useMemo(() => ({ id }), [id]);\n\n return (\n <BatchApprovalItemContext.Provider value={itemCtx}>\n <li\n data-acp=\"batch-item\"\n data-selected={selected ? \"\" : undefined}\n data-review={review ? \"\" : undefined}\n {...rest}\n >\n <div data-acp=\"batch-item-select\">\n {review ? (\n <span data-acp=\"batch-item-flag\">Review individually</span>\n ) : (\n <input\n id={inputId}\n type=\"checkbox\"\n data-acp=\"batch-item-checkbox\"\n checked={selected}\n aria-describedby={detail != null ? detailId : undefined}\n onChange={() => toggle(id)}\n />\n )}\n </div>\n <div data-acp=\"batch-item-body\">\n {review ? (\n <span data-acp=\"batch-item-title\">{title}</span>\n ) : (\n <label htmlFor={inputId} data-acp=\"batch-item-title\">\n {title}\n </label>\n )}\n {detail != null && (\n <p id={detailId} data-acp=\"batch-item-detail\">\n {detail}\n </p>\n )}\n </div>\n {children != null && (\n <div data-acp=\"batch-item-actions\">{children}</div>\n )}\n </li>\n </BatchApprovalItemContext.Provider>\n );\n}\n\n/** Approve just this row. */\nconst ItemApprove = React.forwardRef<\n HTMLButtonElement,\n BatchApprovalButtonProps\n>(function BatchApprovalItemApprove({ onClick, ...rest }, ref) {\n const { approve } = useBatchApprovalContext(\"Item.Approve\");\n const id = useItemId(\"Item.Approve\");\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"batch-item-approve\"\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) approve([id]);\n }}\n {...rest}\n />\n );\n});\n\n/** Reject just this row. */\nconst ItemReject = React.forwardRef<\n HTMLButtonElement,\n BatchApprovalButtonProps\n>(function BatchApprovalItemReject({ onClick, ...rest }, ref) {\n const { reject } = useBatchApprovalContext(\"Item.Reject\");\n const id = useItemId(\"Item.Reject\");\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"batch-item-reject\"\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) reject([id]);\n }}\n {...rest}\n />\n );\n});\n\nexport const BatchApproval = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Toolbar,\n SelectAll,\n SelectionCount,\n BatchApprove,\n BatchReject,\n List,\n Item,\n ItemApprove,\n ItemReject,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Consent Memory — the choice of *how long* a permission lasts, made legible.\n * When an agent asks to do something, \"Always allow\" is the fastest way out of\n * the prompt, so users pick it under task focus without registering that they\n * just signed a standing grant. This pattern turns durability into a first-\n * class, reviewable decision: every option spells out the future it commits\n * you to, and the least-standing choice is the resting default.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * The selected option is controllable via `value` / `onValueChange` or\n * uncontrolled via `defaultValue`. The confirm button reports the chosen\n * durability so its label and the payload have a single source of truth.\n */\n\n/**\n * How long the grant persists. `once` is the safe default; the others are\n * standing to increasing degrees — `scoped` binds to a narrow condition,\n * `always` is an unconditional standing grant.\n */\nexport type ConsentDurability = \"once\" | \"session\" | \"scoped\" | \"always\";\n\ninterface ConsentMemoryContextValue {\n value: string | null;\n /** Register an option's durability so the confirm label can read it. */\n register: (value: string, durability: ConsentDurability) => void;\n /** Durability of the currently selected option, or null if none. */\n getDurability: () => ConsentDurability | null;\n select: (value: string) => void;\n name: string;\n onAllow: (value: string) => void;\n onDeny: () => void;\n titleId: string;\n}\n\nconst ConsentMemoryContext =\n React.createContext<ConsentMemoryContextValue | null>(null);\n\nfunction useConsentMemoryContext(part: string): ConsentMemoryContextValue {\n const ctx = React.useContext(ConsentMemoryContext);\n if (!ctx) {\n throw new Error(\n `ConsentMemory.${part} must be rendered inside ConsentMemory.Root`\n );\n }\n return ctx;\n}\n\n/** Controllable single-value state without a dependency. */\nfunction useControllableValue(\n value: string | undefined,\n defaultValue: string | undefined,\n onValueChange: ((value: string) => void) | undefined\n): [string | undefined, (next: string) => void] {\n const isControlled = value !== undefined;\n const [internal, setInternal] = React.useState(defaultValue);\n const current = isControlled ? value : internal;\n const setValue = React.useCallback(\n (next: string) => {\n if (!isControlled) setInternal(next);\n onValueChange?.(next);\n },\n [isControlled, onValueChange]\n );\n return [current, setValue];\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ConsentMemoryRootProps\n extends Omit<React.FormHTMLAttributes<HTMLFormElement>, \"onSubmit\"> {\n /** Selected option value (controlled). */\n value?: string;\n /** Initial selected option value (uncontrolled). Point it at the `once` option. */\n defaultValue?: string;\n /** Called when the selected durability option changes. */\n onValueChange?: (value: string) => void;\n /** Called with the chosen option value when the user confirms. */\n onAllow: (value: string) => void;\n /** Called when the user declines entirely. */\n onDeny: () => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLFormElement, ConsentMemoryRootProps>(\n function ConsentMemoryRoot(\n { value, defaultValue, onValueChange, onAllow, onDeny, children, ...rest },\n ref\n ) {\n const titleId = React.useId();\n const name = React.useId();\n const [selected, setSelected] = useControllableValue(\n value,\n defaultValue,\n onValueChange\n );\n // Options register their durability as they render (they render before\n // Actions in tree order, so the confirm button can read the selected\n // option's durability in the same pass). A ref map, not state — writing\n // it during render is idempotent and never triggers a re-render.\n const durabilityRef = React.useRef<Map<string, ConsentDurability>>(\n new Map()\n );\n\n const ctx = React.useMemo<ConsentMemoryContextValue>(\n () => ({\n value: selected ?? null,\n register: (next, durability) => {\n durabilityRef.current.set(next, durability);\n },\n getDurability: () =>\n selected != null\n ? durabilityRef.current.get(selected) ?? null\n : null,\n select: setSelected,\n name,\n onAllow,\n onDeny,\n titleId,\n }),\n [selected, setSelected, name, onAllow, onDeny, titleId]\n );\n\n return (\n <ConsentMemoryContext.Provider value={ctx}>\n <form\n ref={ref}\n data-acp=\"root\"\n data-memory=\"\"\n aria-labelledby={titleId}\n onSubmit={(event) => {\n event.preventDefault();\n if (selected != null) onAllow(selected);\n }}\n {...rest}\n >\n {children}\n </form>\n </ConsentMemoryContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ConsentMemoryHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ConsentMemoryHeaderProps) {\n useConsentMemoryContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type ConsentMemoryIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ConsentMemoryIconProps) {\n useConsentMemoryContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ConsentMemoryTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The permission being asked about: \"Allow Inbox Assistant to send email?\". */\nfunction Title(props: ConsentMemoryTitleProps) {\n const { titleId } = useConsentMemoryContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type ConsentMemoryDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/** The concrete action prompting the request, above the durability choice. */\nfunction Description(props: ConsentMemoryDescriptionProps) {\n useConsentMemoryContext(\"Description\");\n return <p data-acp=\"memory-description\" {...props} />;\n}\n\n/* ── Options ──────────────────────────────────────────────────────── */\n\nexport type ConsentMemoryOptionsProps =\n React.FieldsetHTMLAttributes<HTMLFieldSetElement> & {\n /** Legend for the durability choice; defaults to \"Apply this decision:\". */\n legend?: React.ReactNode;\n };\n\n/**\n * The set of durability choices, as a radio group. Renders a fieldset/legend\n * so assistive tech announces \"how long should this apply\" as one grouping.\n */\nfunction Options({ legend, children, ...rest }: ConsentMemoryOptionsProps) {\n useConsentMemoryContext(\"Options\");\n return (\n <fieldset data-acp=\"memory-options\" {...rest}>\n <legend data-acp=\"memory-options-legend\">\n {legend ?? \"Apply this decision:\"}\n </legend>\n {children}\n </fieldset>\n );\n}\n\nexport interface ConsentMemoryOptionProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n /** Stable value passed to `onAllow` when this option is selected. */\n value: string;\n /** How standing this grant is — drives styling and the confirm label. */\n durability: ConsentDurability;\n /** The choice itself: \"Always, for this recipient\". */\n label: React.ReactNode;\n /**\n * The future this choice commits to, in plain language: \"The agent can email\n * Dana any time without asking again.\" This is the point of the pattern.\n */\n consequence: React.ReactNode;\n}\n\nconst DURABILITY_HINT: Record<ConsentDurability, string> = {\n once: \"This time\",\n session: \"This session\",\n scoped: \"Standing · scoped\",\n always: \"Standing · always\",\n};\n\n/**\n * One durability choice. The radio and its consequence are bound together so\n * the standing implication is never more than a line from the choice itself.\n */\nfunction Option({\n value,\n durability,\n label,\n consequence,\n ...rest\n}: ConsentMemoryOptionProps) {\n const { value: selected, select, register, name } =\n useConsentMemoryContext(\"Option\");\n register(value, durability);\n const inputId = React.useId();\n const consequenceId = React.useId();\n const checked = selected === value;\n return (\n <div\n data-acp=\"memory-option\"\n data-durability={durability}\n data-selected={checked ? \"\" : undefined}\n {...rest}\n >\n <input\n id={inputId}\n type=\"radio\"\n name={name}\n value={value}\n data-acp=\"memory-option-radio\"\n checked={checked}\n aria-describedby={consequenceId}\n onChange={() => select(value)}\n />\n <div data-acp=\"memory-option-body\">\n <label htmlFor={inputId} data-acp=\"memory-option-label\">\n <span data-acp=\"memory-option-name\">{label}</span>\n <span data-acp=\"memory-option-hint\" data-durability={durability}>\n {DURABILITY_HINT[durability]}\n </span>\n </label>\n <p id={consequenceId} data-acp=\"memory-option-consequence\">\n {consequence}\n </p>\n </div>\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type ConsentMemoryActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ConsentMemoryActionsProps) {\n useConsentMemoryContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport interface ConsentMemoryAllowProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /**\n * Button content. As a render function it receives the selected durability,\n * so the label can read \"Allow always\" vs \"Allow once\" without lifting state.\n */\n children:\n | React.ReactNode\n | ((state: { durability: ConsentDurability | null }) => React.ReactNode);\n}\n\nconst Allow = React.forwardRef<HTMLButtonElement, ConsentMemoryAllowProps>(\n function ConsentMemoryAllow({ children, ...rest }, ref) {\n const { getDurability } = useConsentMemoryContext(\"Allow\");\n const durability = getDurability();\n return (\n <button\n ref={ref}\n type=\"submit\"\n data-acp=\"allow-once\"\n data-memory-allow=\"\"\n data-durability={durability ?? undefined}\n {...rest}\n >\n {typeof children === \"function\" ? children({ durability }) : children}\n </button>\n );\n }\n);\n\nexport type ConsentMemoryDenyProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nconst Deny = React.forwardRef<HTMLButtonElement, ConsentMemoryDenyProps>(\n function ConsentMemoryDeny({ onClick, ...rest }, ref) {\n const { onDeny } = useConsentMemoryContext(\"Deny\");\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"deny\"\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) onDeny();\n }}\n {...rest}\n />\n );\n }\n);\n\nexport const ConsentMemory = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Options,\n Option,\n Actions,\n Allow,\n Deny,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport type { ScopeAccess } from \"../scoped-grant/scoped-grant\";\n\n/**\n * Authority Boundary — the single settings surface that answers, for one\n * agent: what may it ever do on its own, and what must it always ask about?\n * Standing authority tends to accrete across scattered prompts and toggles\n * until no one can say what the agent is actually allowed to do unattended.\n * This pattern gathers every capability into one place and puts each on an\n * explicit authority level.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * The level map is controllable via `value` / `onValueChange` or uncontrolled\n * via `defaultValue` (a record of capability id → level). A capability with no\n * entry defaults to the safest level, `ask`.\n */\n\nexport type { ScopeAccess };\n\n/**\n * How much standing authority a capability carries.\n * - `auto`: the agent may do it unattended.\n * - `ask`: the agent must ask for confirmation each time (the safe default).\n * - `never`: the agent may not do it at all.\n */\nexport type AuthorityLevel = \"auto\" | \"ask\" | \"never\";\n\nexport const AUTHORITY_LEVELS: AuthorityLevel[] = [\"auto\", \"ask\", \"never\"];\n\nconst LEVEL_LABEL: Record<AuthorityLevel, string> = {\n auto: \"Automatic\",\n ask: \"Ask first\",\n never: \"Never\",\n};\n\ninterface AuthorityBoundaryContextValue {\n getLevel: (id: string) => AuthorityLevel;\n setLevel: (id: string, level: AuthorityLevel) => void;\n counts: Record<AuthorityLevel, number>;\n titleId: string;\n}\n\nconst AuthorityBoundaryContext =\n React.createContext<AuthorityBoundaryContextValue | null>(null);\n\nfunction useAuthorityBoundaryContext(\n part: string\n): AuthorityBoundaryContextValue {\n const ctx = React.useContext(AuthorityBoundaryContext);\n if (!ctx) {\n throw new Error(\n `AuthorityBoundary.${part} must be rendered inside AuthorityBoundary.Root`\n );\n }\n return ctx;\n}\n\n/** Controllable record state without a dependency. */\nfunction useControllableMap(\n value: Record<string, AuthorityLevel> | undefined,\n defaultValue: Record<string, AuthorityLevel> | undefined,\n onValueChange: ((value: Record<string, AuthorityLevel>) => void) | undefined\n): [\n Record<string, AuthorityLevel>,\n (id: string, level: AuthorityLevel) => void,\n] {\n const isControlled = value !== undefined;\n const [internal, setInternal] = React.useState<\n Record<string, AuthorityLevel>\n >(() => defaultValue ?? {});\n const current = isControlled ? value : internal;\n const setLevel = React.useCallback(\n (id: string, level: AuthorityLevel) => {\n const next = { ...current, [id]: level };\n if (!isControlled) setInternal(next);\n onValueChange?.(next);\n },\n [current, isControlled, onValueChange]\n );\n return [current, setLevel];\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface AuthorityBoundaryRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\" | \"defaultValue\"> {\n /** Capability id → authority level (controlled). */\n value?: Record<string, AuthorityLevel>;\n /** Initial capability id → authority level (uncontrolled). */\n defaultValue?: Record<string, AuthorityLevel>;\n /** Called with the full level map whenever any capability changes. */\n onValueChange?: (value: Record<string, AuthorityLevel>) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, AuthorityBoundaryRootProps>(\n function AuthorityBoundaryRoot(\n { value, defaultValue, onValueChange, children, ...rest },\n ref\n ) {\n const titleId = React.useId();\n const [levels, setLevel] = useControllableMap(\n value,\n defaultValue,\n onValueChange\n );\n\n const ctx = React.useMemo<AuthorityBoundaryContextValue>(() => {\n // Counts derive from the level map, so they're correct regardless of\n // where Summary sits relative to the list. The map is the settings\n // surface's single source of truth — give every capability an entry.\n const counts: Record<AuthorityLevel, number> = {\n auto: 0,\n ask: 0,\n never: 0,\n };\n for (const level of Object.values(levels)) counts[level] += 1;\n return {\n getLevel: (id) => levels[id] ?? \"ask\",\n setLevel,\n counts,\n titleId,\n };\n }, [levels, setLevel, titleId]);\n\n return (\n <AuthorityBoundaryContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-authority=\"\"\n {...rest}\n >\n {children}\n </section>\n </AuthorityBoundaryContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type AuthorityBoundaryHeaderProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: AuthorityBoundaryHeaderProps) {\n useAuthorityBoundaryContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type AuthorityBoundaryIconProps =\n React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: AuthorityBoundaryIconProps) {\n useAuthorityBoundaryContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type AuthorityBoundaryTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The question the surface answers: \"What can Inbox Assistant do on its own?\". */\nfunction Title(props: AuthorityBoundaryTitleProps) {\n const { titleId } = useAuthorityBoundaryContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type AuthorityBoundaryDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\nfunction Description(props: AuthorityBoundaryDescriptionProps) {\n useAuthorityBoundaryContext(\"Description\");\n return <p data-acp=\"authority-description\" {...props} />;\n}\n\n/* ── Summary ──────────────────────────────────────────────────────── */\n\nexport interface AuthorityBoundarySummaryProps\n extends Omit<React.HTMLAttributes<HTMLParagraphElement>, \"children\"> {\n /**\n * Render function receiving the live per-level counts, so the surface can\n * state \"3 automatic · 2 ask first · 1 never\" at a glance.\n */\n children: (counts: Record<AuthorityLevel, number>) => React.ReactNode;\n}\n\n/** A live, at-a-glance tally of how much standing authority is granted. */\nfunction Summary({ children, ...rest }: AuthorityBoundarySummaryProps) {\n const { counts } = useAuthorityBoundaryContext(\"Summary\");\n return (\n <p data-acp=\"authority-summary\" aria-live=\"polite\" {...rest}>\n {children(counts)}\n </p>\n );\n}\n\n/* ── List + Capability ────────────────────────────────────────────── */\n\nexport type AuthorityBoundaryListProps =\n React.HTMLAttributes<HTMLUListElement>;\n\nfunction List(props: AuthorityBoundaryListProps) {\n useAuthorityBoundaryContext(\"List\");\n return <ul data-acp=\"authority-list\" {...props} />;\n}\n\nexport interface AuthorityBoundaryCapabilityProps\n extends Omit<React.LiHTMLAttributes<HTMLLIElement>, \"id\"> {\n /** Stable id used as the key in the level map. */\n id: string;\n /** Power level of this capability — a text badge, never color alone. */\n access: ScopeAccess;\n /** Plain-language capability name: \"Send email on your behalf\". */\n label: React.ReactNode;\n /** What the agent does with this capability. */\n description?: React.ReactNode;\n /**\n * Levels this capability may not be set to. Use it to forbid `auto` on an\n * irreversible capability, so the UI can't grant standing authority to\n * something that should always be confirmed.\n */\n disallow?: AuthorityLevel[];\n}\n\nconst ACCESS_LABEL: Record<ScopeAccess, string> = {\n read: \"Read\",\n write: \"Write\",\n delete: \"Delete\",\n};\n\n/**\n * One capability row with its segmented authority control. The control is a\n * real radio group (a fieldset with a screen-reader legend naming the\n * capability), so each capability's authority is an independent, labelled\n * choice.\n */\nfunction Capability({\n id,\n access,\n label,\n description,\n disallow,\n ...rest\n}: AuthorityBoundaryCapabilityProps) {\n const { getLevel, setLevel } = useAuthorityBoundaryContext(\"Capability\");\n const name = React.useId();\n const descId = React.useId();\n const level = getLevel(id);\n const disallowed = new Set(disallow ?? []);\n\n return (\n <li\n data-acp=\"authority-capability\"\n data-access={access}\n data-level={level}\n {...rest}\n >\n <div data-acp=\"authority-capability-body\">\n <span data-acp=\"authority-capability-head\">\n <span data-acp=\"authority-access\" data-access={access}>\n {ACCESS_LABEL[access]}\n </span>\n <span data-acp=\"authority-capability-name\">{label}</span>\n </span>\n {description != null && (\n <p id={descId} data-acp=\"authority-capability-description\">\n {description}\n </p>\n )}\n </div>\n <fieldset\n data-acp=\"authority-control\"\n aria-describedby={description != null ? descId : undefined}\n >\n <legend data-acp=\"authority-control-legend\">\n Authority for {typeof label === \"string\" ? label : \"this capability\"}\n </legend>\n {AUTHORITY_LEVELS.map((option) => {\n const optionId = `${name}-${option}`;\n const blocked = disallowed.has(option);\n return (\n <React.Fragment key={option}>\n <input\n id={optionId}\n type=\"radio\"\n name={name}\n value={option}\n data-acp=\"authority-radio\"\n data-level={option}\n checked={level === option}\n disabled={blocked}\n onChange={() => setLevel(id, option)}\n />\n <label\n htmlFor={optionId}\n data-acp=\"authority-level-label\"\n data-level={option}\n >\n {LEVEL_LABEL[option]}\n </label>\n </React.Fragment>\n );\n })}\n </fieldset>\n </li>\n );\n}\n\nexport const AuthorityBoundary = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Summary,\n List,\n Capability,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Spend & Rate Limits — numeric guardrails treated as consent primitives, not\n * billing settings. A budget cap, an action count, a time window: each is a\n * standing decision about how far an agent may go before it has to come back\n * and ask. This pattern gives those numbers one surface, shows each cap against\n * live usage so the boundary is legible, and makes clear that reaching a cap is\n * a *consent* event — the agent pauses and asks rather than silently stopping.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Usage facts (`limits`) are declared once at the Root — the single source of\n * truth for consumption and the summary tally. The caps are controllable via\n * `value` / `onValueChange` or uncontrolled via `defaultValue` (a record of\n * limit id → cap). A limit with no cap entry is treated as having no limit set.\n */\n\n/** Whether a limit meters money (`spend`) or a count of actions (`rate`). */\nexport type SpendLimitKind = \"spend\" | \"rate\";\n\n/** The window a cap resets over. */\nexport type SpendLimitPeriod = \"day\" | \"week\" | \"month\";\n\n/**\n * How a limit stands against its cap.\n * - `none`: no cap set — the agent is unbounded on this axis.\n * - `ok`: comfortably under the cap.\n * - `warning`: at or past 80% of the cap.\n * - `reached`: at or over the cap; the agent must ask before doing more.\n */\nexport type SpendLimitState = \"none\" | \"ok\" | \"warning\" | \"reached\";\n\n/** A consumption fact: how much of a limit has been used so far this window. */\nexport interface SpendLimitUsage {\n /** Stable id, keyed to a `Limit` child and to the cap map. */\n id: string;\n /** Amount consumed this window — dollars for `spend`, a count for `rate`. */\n used: number;\n}\n\ninterface SpendLimitsSummary {\n total: number;\n ok: number;\n warning: number;\n reached: number;\n}\n\ninterface SpendLimitsContextValue {\n getUsed: (id: string) => number;\n getCap: (id: string) => number | null;\n setCap: (id: string, cap: number) => void;\n getState: (id: string) => SpendLimitState;\n summary: SpendLimitsSummary;\n titleId: string;\n}\n\nconst SpendLimitsContext =\n React.createContext<SpendLimitsContextValue | null>(null);\n\nfunction useSpendLimitsContext(part: string): SpendLimitsContextValue {\n const ctx = React.useContext(SpendLimitsContext);\n if (!ctx) {\n throw new Error(\n `SpendLimits.${part} must be rendered inside SpendLimits.Root`\n );\n }\n return ctx;\n}\n\n/** Controllable record state without a dependency. */\nfunction useControllableMap(\n value: Record<string, number> | undefined,\n defaultValue: Record<string, number> | undefined,\n onValueChange: ((value: Record<string, number>) => void) | undefined\n): [Record<string, number>, (id: string, cap: number) => void] {\n const isControlled = value !== undefined;\n const [internal, setInternal] = React.useState<Record<string, number>>(\n () => defaultValue ?? {}\n );\n const current = isControlled ? value : internal;\n const setCap = React.useCallback(\n (id: string, cap: number) => {\n const next = { ...current, [id]: cap };\n if (!isControlled) setInternal(next);\n onValueChange?.(next);\n },\n [current, isControlled, onValueChange]\n );\n return [current, setCap];\n}\n\n/** The share of the cap consumed, above which a limit reads as \"near\". */\nconst WARNING_RATIO = 0.8;\n\nfunction stateFor(used: number, cap: number | null): SpendLimitState {\n // Only an *absent* cap is unbounded. A cap of 0 is the tightest guardrail\n // there is — nothing more allowed — so it fails closed as \"reached\", never\n // open as \"no limit set\".\n if (cap == null) return \"none\";\n if (used >= cap) return \"reached\";\n if (used / cap >= WARNING_RATIO) return \"warning\";\n return \"ok\";\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface SpendLimitsRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\" | \"defaultValue\"> {\n /**\n * Consumption facts, one per limit — the single source of truth for usage and\n * the summary tally. Declare every limit you render a `Limit` for.\n */\n limits: SpendLimitUsage[];\n /** Limit id → cap (controlled). */\n value?: Record<string, number>;\n /** Initial limit id → cap (uncontrolled). */\n defaultValue?: Record<string, number>;\n /** Called with the full cap map whenever any cap changes. */\n onValueChange?: (value: Record<string, number>) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, SpendLimitsRootProps>(\n function SpendLimitsRoot(\n { limits, value, defaultValue, onValueChange, children, ...rest },\n ref\n ) {\n const titleId = React.useId();\n const [caps, setCap] = useControllableMap(\n value,\n defaultValue,\n onValueChange\n );\n\n const ctx = React.useMemo<SpendLimitsContextValue>(() => {\n const usage = new Map(limits.map((l) => [l.id, l.used]));\n const getUsed = (id: string) => usage.get(id) ?? 0;\n const getCap = (id: string) =>\n Object.prototype.hasOwnProperty.call(caps, id) ? caps[id]! : null;\n // The summary counts what's actually in force: it walks the declared\n // limits (not the cap map), so a limit left uncapped still shows up and\n // the tally can never overstate how bounded the agent really is.\n const summary: SpendLimitsSummary = {\n total: limits.length,\n ok: 0,\n warning: 0,\n reached: 0,\n };\n for (const limit of limits) {\n const state = stateFor(limit.used, getCap(limit.id));\n if (state === \"ok\") summary.ok += 1;\n else if (state === \"warning\") summary.warning += 1;\n else if (state === \"reached\") summary.reached += 1;\n }\n return {\n getUsed,\n getCap,\n setCap,\n getState: (id) => stateFor(getUsed(id), getCap(id)),\n summary,\n titleId,\n };\n }, [limits, caps, setCap, titleId]);\n\n return (\n <SpendLimitsContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-limits=\"\"\n {...rest}\n >\n {children}\n </section>\n </SpendLimitsContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type SpendLimitsHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: SpendLimitsHeaderProps) {\n useSpendLimitsContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type SpendLimitsIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: SpendLimitsIconProps) {\n useSpendLimitsContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type SpendLimitsTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The question the surface answers: \"How far can Shopping Agent go alone?\". */\nfunction Title(props: SpendLimitsTitleProps) {\n const { titleId } = useSpendLimitsContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type SpendLimitsDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\nfunction Description(props: SpendLimitsDescriptionProps) {\n useSpendLimitsContext(\"Description\");\n return <p data-acp=\"limits-description\" {...props} />;\n}\n\n/* ── Summary ──────────────────────────────────────────────────────── */\n\nexport interface SpendLimitsSummaryProps\n extends Omit<React.HTMLAttributes<HTMLParagraphElement>, \"children\"> {\n /**\n * Render function receiving the live per-state counts, so the surface can\n * state \"1 cap reached · 1 near cap\" at a glance.\n */\n children: (summary: SpendLimitsSummary) => React.ReactNode;\n}\n\n/** A live, at-a-glance read of how close the agent is to its guardrails. */\nfunction Summary({ children, ...rest }: SpendLimitsSummaryProps) {\n const { summary } = useSpendLimitsContext(\"Summary\");\n return (\n <p data-acp=\"limits-summary\" aria-live=\"polite\" {...rest}>\n {children(summary)}\n </p>\n );\n}\n\n/* ── List + Limit ─────────────────────────────────────────────────── */\n\nexport type SpendLimitsListProps = React.HTMLAttributes<HTMLUListElement>;\n\nfunction List(props: SpendLimitsListProps) {\n useSpendLimitsContext(\"List\");\n return <ul data-acp=\"limits-list\" {...props} />;\n}\n\nconst KIND_LABEL: Record<SpendLimitKind, string> = {\n spend: \"Budget\",\n rate: \"Rate\",\n};\n\nconst STATE_NOTE: Record<SpendLimitState, string | null> = {\n none: null,\n ok: null,\n warning: \"Near cap\",\n reached: \"Cap reached — agent will ask before doing more\",\n};\n\nconst PERIOD_PHRASE: Record<SpendLimitPeriod, string> = {\n day: \"today\",\n week: \"this week\",\n month: \"this month\",\n};\n\nfunction formatAmount(\n kind: SpendLimitKind,\n unit: string,\n n: number\n): string {\n return kind === \"spend\"\n ? `${unit}${n.toLocaleString()}`\n : `${n.toLocaleString()} ${unit}`;\n}\n\n/** \"used of cap\" without repeating the unit noun for a rate limit. */\nfunction formatRange(\n kind: SpendLimitKind,\n unit: string,\n used: number,\n cap: number\n): string {\n return kind === \"spend\"\n ? `${unit}${used.toLocaleString()} of ${unit}${cap.toLocaleString()}`\n : `${used.toLocaleString()} of ${cap.toLocaleString()} ${unit}`;\n}\n\nexport interface SpendLimitsLimitProps\n extends Omit<React.LiHTMLAttributes<HTMLLIElement>, \"id\"> {\n /** Stable id used to look up usage and the cap. */\n id: string;\n /** Whether this limit meters money or a count of actions. */\n kind: SpendLimitKind;\n /**\n * The unit. For `spend`, a currency symbol shown before the amount (\"$\").\n * For `rate`, the noun shown after it (\"emails\", \"API calls\").\n */\n unit: string;\n /** The window this cap resets over. */\n period: SpendLimitPeriod;\n /** Plain-language name for the guardrail: \"Purchases\". */\n label: React.ReactNode;\n /** What the agent spends this budget on. */\n description?: React.ReactNode;\n}\n\n/**\n * One guardrail row: a labelled cap, a meter of usage against it, and an\n * editable number so the user can tighten or loosen the boundary in place. The\n * cap is a real number input, labelled per limit, so the guardrail is a single,\n * legible, keyboard-accessible control.\n */\nfunction Limit({\n id,\n kind,\n unit,\n period,\n label,\n description,\n ...rest\n}: SpendLimitsLimitProps) {\n const { getUsed, getCap, setCap, getState } = useSpendLimitsContext(\"Limit\");\n const descId = React.useId();\n const capId = React.useId();\n const readoutId = React.useId();\n const used = getUsed(id);\n const cap = getCap(id);\n const state = getState(id);\n // A zero cap has no room at all — the meter reads full, not empty.\n const pct =\n cap == null ? 0 : cap > 0 ? Math.min(100, (used / cap) * 100) : 100;\n const readout =\n cap != null\n ? `${formatRange(kind, unit, used, cap)} ${PERIOD_PHRASE[period]}`\n : `${formatAmount(kind, unit, used)} used · no limit set`;\n const note = STATE_NOTE[state];\n const labelText = typeof label === \"string\" ? label : \"this limit\";\n\n return (\n <li\n data-acp=\"limits-limit\"\n data-kind={kind}\n data-state={state}\n {...rest}\n >\n <div data-acp=\"limits-limit-body\">\n <span data-acp=\"limits-limit-head\">\n <span data-acp=\"limits-kind\" data-kind={kind}>\n {KIND_LABEL[kind]}\n </span>\n <span data-acp=\"limits-limit-name\">{label}</span>\n </span>\n {description != null && (\n <p id={descId} data-acp=\"limits-limit-description\">\n {description}\n </p>\n )}\n <div data-acp=\"limits-meter\" data-state={state}>\n <span data-acp=\"limits-meter-track\" aria-hidden=\"true\">\n <span\n data-acp=\"limits-meter-fill\"\n data-state={state}\n style={{ width: `${pct}%` }}\n />\n </span>\n <span id={readoutId} data-acp=\"limits-meter-readout\">\n {readout}\n </span>\n </div>\n {note != null && (\n <p data-acp=\"limits-status\" data-state={state}>\n {note}\n </p>\n )}\n </div>\n <div data-acp=\"limits-cap\">\n <label htmlFor={capId} data-acp=\"limits-cap-label\">\n Cap\n </label>\n <span data-acp=\"limits-cap-field\">\n {kind === \"spend\" && (\n <span data-acp=\"limits-cap-unit\" aria-hidden=\"true\">\n {unit}\n </span>\n )}\n <input\n id={capId}\n type=\"number\"\n min={0}\n inputMode=\"numeric\"\n data-acp=\"limits-cap-input\"\n aria-label={`${labelText} cap, per ${period}`}\n aria-describedby={description != null ? descId : undefined}\n value={cap ?? \"\"}\n onChange={(event) => {\n // A cleared or negative field becomes a cap of 0 — the tightest\n // guardrail — so bad input always fails closed, never unbounded.\n const next = event.target.valueAsNumber;\n setCap(id, Number.isNaN(next) ? 0 : Math.max(0, next));\n }}\n />\n {kind === \"rate\" && (\n <span data-acp=\"limits-cap-unit\">{unit}</span>\n )}\n <span data-acp=\"limits-cap-period\">per {period}</span>\n </span>\n </div>\n </li>\n );\n}\n\nexport const SpendLimits = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Summary,\n List,\n Limit,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Credential Handoff — an agent should never see a password or a card number.\n * When a task needs a secret, the agent steps aside and hands the exchange to a\n * trusted holder — a password manager, a passkey, the provider's own payment\n * page — which returns a scoped credential (a signed-in session, a one-time\n * token) rather than the secret itself. This surface makes that boundary\n * legible: it names who will hold the secret, states plainly that the agent is\n * excluded, and shows what comes back instead.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * A decision surface: `onHandoff` continues into the trusted holder,\n * `onCancel` backs out. It is deliberately not a form — it never collects the\n * secret itself.\n */\n\n/** What kind of trusted holder the secret is handed to. */\nexport type HandoffHandlerKind =\n | \"password-manager\"\n | \"passkey\"\n | \"payment\"\n | \"provider\";\n\ninterface CredentialHandoffContextValue {\n onHandoff: () => void;\n onCancel: () => void;\n titleId: string;\n}\n\nconst CredentialHandoffContext =\n React.createContext<CredentialHandoffContextValue | null>(null);\n\nfunction useCredentialHandoffContext(\n part: string\n): CredentialHandoffContextValue {\n const ctx = React.useContext(CredentialHandoffContext);\n if (!ctx) {\n throw new Error(\n `CredentialHandoff.${part} must be rendered inside CredentialHandoff.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface CredentialHandoffRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** Called when the user continues into the trusted holder. */\n onHandoff: () => void;\n /** Called when the user backs out without handing off. */\n onCancel: () => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, CredentialHandoffRootProps>(\n function CredentialHandoffRoot({ onHandoff, onCancel, children, ...rest }, ref) {\n const titleId = React.useId();\n const ctx = React.useMemo(\n () => ({ onHandoff, onCancel, titleId }),\n [onHandoff, onCancel, titleId]\n );\n return (\n <CredentialHandoffContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-handoff=\"\"\n {...rest}\n >\n {children}\n </section>\n </CredentialHandoffContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type CredentialHandoffHeaderProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: CredentialHandoffHeaderProps) {\n useCredentialHandoffContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type CredentialHandoffIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: CredentialHandoffIconProps) {\n useCredentialHandoffContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type CredentialHandoffTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The task needing a secret: \"Sign in to Delta\" or \"Pay Delta $340.00\". */\nfunction Title(props: CredentialHandoffTitleProps) {\n const { titleId } = useCredentialHandoffContext(\"Title\");\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type CredentialHandoffDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\nfunction Description(props: CredentialHandoffDescriptionProps) {\n useCredentialHandoffContext(\"Description\");\n return <p data-acp=\"handoff-description\" {...props} />;\n}\n\n/* ── Handler (who will hold the secret) ───────────────────────────── */\n\nconst HANDLER_LABEL: Record<HandoffHandlerKind, string> = {\n \"password-manager\": \"Password manager\",\n passkey: \"Passkey\",\n payment: \"Payment\",\n provider: \"Provider\",\n};\n\nexport interface CredentialHandoffHandlerProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** What kind of holder this is — surfaced as a text badge. */\n kind: HandoffHandlerKind;\n /** The holder's name: \"1Password\", \"Apple Pay\", \"Delta's payment page\". */\n name: React.ReactNode;\n}\n\n/**\n * The trusted holder the secret goes to. Naming it — and its kind — is how the\n * user knows the exchange leaves the agent for something they already trust.\n */\nfunction Handler({ kind, name, children, ...rest }: CredentialHandoffHandlerProps) {\n useCredentialHandoffContext(\"Handler\");\n return (\n <div data-acp=\"handoff-handler\" data-kind={kind} {...rest}>\n <span data-acp=\"handoff-handler-kind\" data-kind={kind}>\n {HANDLER_LABEL[kind]}\n </span>\n <span data-acp=\"handoff-handler-name\">{name}</span>\n {children}\n </div>\n );\n}\n\n/* ── Boundary (the agent is excluded) ─────────────────────────────── */\n\nexport type CredentialHandoffBoundaryProps =\n React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * The pattern's distinct element: an explicit statement that the agent is\n * outside this exchange. Rendered as a `note` so assistive tech announces the\n * exclusion, not just the visual fence.\n */\nfunction Boundary(props: CredentialHandoffBoundaryProps) {\n useCredentialHandoffContext(\"Boundary\");\n return <div role=\"note\" data-acp=\"handoff-boundary\" {...props} />;\n}\n\n/* ── Returns (what the agent gets back instead) ───────────────────── */\n\nexport type CredentialHandoffReturnsProps =\n React.HTMLAttributes<HTMLUListElement> & {\n /** Heading for the list; defaults to \"The agent receives:\". */\n legend?: React.ReactNode;\n };\n\n/**\n * What the agent gets back in place of the secret — a scoped session, a\n * one-time token, a confirmation. Never the secret itself.\n */\nfunction Returns({ legend, children, ...rest }: CredentialHandoffReturnsProps) {\n useCredentialHandoffContext(\"Returns\");\n const labelId = React.useId();\n return (\n <div data-acp=\"handoff-returns\">\n <p id={labelId} data-acp=\"handoff-returns-legend\">\n {legend ?? \"The agent receives:\"}\n </p>\n <ul aria-labelledby={labelId} data-acp=\"handoff-returns-list\" {...rest}>\n {children}\n </ul>\n </div>\n );\n}\n\nexport type CredentialHandoffReturnProps =\n React.LiHTMLAttributes<HTMLLIElement>;\n\nfunction Return(props: CredentialHandoffReturnProps) {\n useCredentialHandoffContext(\"Return\");\n return <li data-acp=\"handoff-return\" {...props} />;\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type CredentialHandoffActionsProps =\n React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: CredentialHandoffActionsProps) {\n useCredentialHandoffContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport type CredentialHandoffButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n/** Continue into the trusted holder — the primary path. */\nconst Handoff = React.forwardRef<\n HTMLButtonElement,\n CredentialHandoffButtonProps\n>(function CredentialHandoffHandoff({ onClick, ...rest }, ref) {\n const { onHandoff } = useCredentialHandoffContext(\"Handoff\");\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"handoff-continue\"\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) onHandoff();\n }}\n {...rest}\n />\n );\n});\n\n/** Back out without handing off. */\nconst Cancel = React.forwardRef<\n HTMLButtonElement,\n CredentialHandoffButtonProps\n>(function CredentialHandoffCancel({ onClick, ...rest }, ref) {\n const { onCancel } = useCredentialHandoffContext(\"Cancel\");\n return (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"handoff-cancel\"\n onClick={(event) => {\n onClick?.(event);\n if (!event.defaultPrevented) onCancel();\n }}\n {...rest}\n />\n );\n});\n\nexport const CredentialHandoff = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Handler,\n Boundary,\n Returns,\n Return,\n Actions,\n Handoff,\n Cancel,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\n/**\n * Action Receipt — consent doesn't end at approval. After an agent acts, the\n * user needs a durable record of what it did, under what authority, and when —\n * with a way to undo it where the action allows. Without a receipt, an approval\n * (or a standing grant firing on its own) vanishes the moment it executes, and\n * the user has no surface to notice, question, or reverse it.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Like Connection Card, this is a display surface: it takes no decision\n * callbacks of its own. The one interactive part, `Undo`, is wired to your\n * handler — and it renders as an inert note (not a button) when the action was\n * irreversible or has already been undone, so the receipt can never offer an\n * undo it can't honour.\n */\n\n/** How the action turned out. Drives the outcome badge and styling. */\nexport type ReceiptOutcome = \"completed\" | \"undone\" | \"failed\";\n\n/** Whether the action can be reversed — governs whether Undo is offered. */\nexport type ReceiptReversibility = \"reversible\" | \"irreversible\";\n\ninterface ActionReceiptContextValue {\n outcome: ReceiptOutcome;\n reversibility: ReceiptReversibility;\n titleId: string;\n}\n\nconst ActionReceiptContext =\n React.createContext<ActionReceiptContextValue | null>(null);\n\nfunction useActionReceiptContext(part: string): ActionReceiptContextValue {\n const ctx = React.useContext(ActionReceiptContext);\n if (!ctx) {\n throw new Error(\n `ActionReceipt.${part} must be rendered inside ActionReceipt.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ActionReceiptRootProps\n extends React.HTMLAttributes<HTMLElement> {\n /** How the action turned out. Defaults to `completed`. */\n outcome?: ReceiptOutcome;\n /**\n * Whether the action can be reversed. Defaults to `reversible`. An\n * `irreversible` receipt renders no undo button — only an honest note.\n */\n reversibility?: ReceiptReversibility;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, ActionReceiptRootProps>(\n function ActionReceiptRoot(\n { outcome = \"completed\", reversibility = \"reversible\", children, ...rest },\n ref\n ) {\n const titleId = React.useId();\n const ctx = React.useMemo<ActionReceiptContextValue>(\n () => ({ outcome, reversibility, titleId }),\n [outcome, reversibility, titleId]\n );\n return (\n <ActionReceiptContext.Provider value={ctx}>\n <article\n ref={ref as React.Ref<HTMLElement>}\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-receipt=\"\"\n data-outcome={outcome}\n {...rest}\n >\n {children}\n </article>\n </ActionReceiptContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ActionReceiptHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ActionReceiptHeaderProps) {\n useActionReceiptContext(\"Header\");\n return <div data-acp=\"header\" data-receipt-header=\"\" {...props} />;\n}\n\nexport type ActionReceiptIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ActionReceiptIconProps) {\n useActionReceiptContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ActionReceiptTitleProps = React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * What the agent did, in the past tense: \"Sent email to Dana Ito\". A non-heading\n * element with an id, so a receipt slots into an activity log at any depth\n * without imposing a heading level.\n */\nfunction Title(props: ActionReceiptTitleProps) {\n const { titleId } = useActionReceiptContext(\"Title\");\n return <div id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type ActionReceiptOutcomeProps = React.HTMLAttributes<HTMLSpanElement>;\n\nconst OUTCOME_LABEL: Record<ReceiptOutcome, string> = {\n completed: \"Completed\",\n undone: \"Undone\",\n failed: \"Failed\",\n};\n\n/**\n * The outcome badge, as text (never color alone). Pass children to override the\n * wording.\n */\nfunction Outcome({ children, ...rest }: ActionReceiptOutcomeProps) {\n const { outcome } = useActionReceiptContext(\"Outcome\");\n return (\n <span data-acp=\"receipt-outcome\" data-outcome={outcome} {...rest}>\n {children ?? OUTCOME_LABEL[outcome]}\n </span>\n );\n}\n\n/* ── Details (what was done) ──────────────────────────────────────── */\n\nexport type ActionReceiptDetailsProps =\n React.HTMLAttributes<HTMLDListElement>;\n\nfunction Details(props: ActionReceiptDetailsProps) {\n useActionReceiptContext(\"Details\");\n return <dl data-acp=\"receipt-details\" {...props} />;\n}\n\nexport interface ActionReceiptDetailProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The fact's name: \"To\", \"Amount\", \"File\". */\n label: React.ReactNode;\n /** The exact value acted on — never a summary. */\n children: React.ReactNode;\n}\n\nfunction Detail({ label, children, ...rest }: ActionReceiptDetailProps) {\n useActionReceiptContext(\"Detail\");\n return (\n <div data-acp=\"receipt-detail\" {...rest}>\n <dt data-acp=\"receipt-detail-label\">{label}</dt>\n <dd data-acp=\"receipt-detail-value\">{children}</dd>\n </div>\n );\n}\n\n/* ── Authority (what permitted the action) ────────────────────────── */\n\nexport interface ActionReceiptAuthorityProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The grant, approval, or standing rule the action ran under. */\n grant: React.ReactNode;\n /** How that authority was established: \"you approved · Jul 8\", \"always-allow\". */\n via?: React.ReactNode;\n}\n\n/**\n * Under what authority the action was taken — the receipt's distinct job. It\n * ties the act back to the consent that permitted it, so a user reviewing the\n * log can see *why* the agent was allowed to do this, not just that it did.\n */\nfunction Authority({ grant, via, children, ...rest }: ActionReceiptAuthorityProps) {\n useActionReceiptContext(\"Authority\");\n return (\n <div data-acp=\"receipt-authority\" {...rest}>\n <span data-acp=\"receipt-authority-label\">Under authority</span>\n <span data-acp=\"receipt-authority-grant\">{grant}</span>\n {via != null && <span data-acp=\"receipt-authority-via\">{via}</span>}\n {children}\n </div>\n );\n}\n\n/* ── Meta (when, and other facts) ─────────────────────────────────── */\n\nexport type ActionReceiptMetaProps = React.HTMLAttributes<HTMLDListElement>;\n\nfunction Meta(props: ActionReceiptMetaProps) {\n useActionReceiptContext(\"Meta\");\n return <dl data-acp=\"receipt-meta\" {...props} />;\n}\n\nexport interface ActionReceiptMetaItemProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The fact's name: \"When\", \"Reference\". */\n label: React.ReactNode;\n children: React.ReactNode;\n}\n\nfunction MetaItem({ label, children, ...rest }: ActionReceiptMetaItemProps) {\n useActionReceiptContext(\"MetaItem\");\n return (\n <div data-acp=\"receipt-meta-item\" {...rest}>\n <dt data-acp=\"receipt-meta-label\">{label}</dt>\n <dd data-acp=\"receipt-meta-value\">{children}</dd>\n </div>\n );\n}\n\n/* ── Actions + Undo ───────────────────────────────────────────────── */\n\nexport type ActionReceiptActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ActionReceiptActionsProps) {\n useActionReceiptContext(\"Actions\");\n return <div data-acp=\"actions\" data-receipt-actions=\"\" {...props} />;\n}\n\nexport interface ActionReceiptUndoProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /**\n * Note shown in place of the button when the action can't be undone.\n * Defaults to \"Can't be undone\".\n */\n irreversibleNote?: React.ReactNode;\n /** Note shown once the action has already been undone. Defaults to \"Undone\". */\n undoneNote?: React.ReactNode;\n}\n\n/**\n * Reverse the action. Renders as a button only when the receipt is reversible\n * and not already undone; otherwise it's an inert note. This way the surface\n * never dangles an undo it can't perform — the a11y and honesty stance of the\n * pattern.\n */\nconst Undo = React.forwardRef<HTMLButtonElement, ActionReceiptUndoProps>(\n function ActionReceiptUndo(\n { children, irreversibleNote, undoneNote, ...rest },\n ref\n ) {\n const { outcome, reversibility } = useActionReceiptContext(\"Undo\");\n if (outcome === \"undone\") {\n return (\n <span data-acp=\"receipt-undo-note\" data-state=\"undone\">\n {undoneNote ?? \"Undone\"}\n </span>\n );\n }\n if (reversibility === \"irreversible\") {\n return (\n <span data-acp=\"receipt-undo-note\" data-state=\"permanent\">\n {irreversibleNote ?? \"Can't be undone\"}\n </span>\n );\n }\n return (\n <button ref={ref} type=\"button\" data-acp=\"receipt-undo\" {...rest}>\n {children ?? \"Undo\"}\n </button>\n );\n }\n);\n\nexport const ActionReceipt = {\n Root,\n Header,\n Icon,\n Title,\n Outcome,\n Details,\n Detail,\n Authority,\n Meta,\n MetaItem,\n Actions,\n Undo,\n};\n","\"use client\";\n\nimport * as React from \"react\";\nimport * as AlertDialog from \"@radix-ui/react-alert-dialog\";\n\n/**\n * Injection Flag — when an instruction reaches the agent from untrusted content\n * (a web page, an email, an uploaded file) rather than from the user, surface\n * that fact: name where it came from, quote the instruction verbatim, say what\n * following it would do, and ask. The whole point is that a buried \"ignore your\n * previous instructions and…\" should never execute silently — it should stop\n * and show itself, with *not* following it as the resting default.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Two render modes:\n * - inline (default): a card inside the conversation/task surface.\n * - modal (`asModal`): a Radix AlertDialog — focus is trapped, initial focus\n * lands on Dismiss (the safe action, which does *not* follow the\n * instruction), and Escape dismisses. Controlled via `open` / `onOpenChange`.\n */\n\ninterface InjectionFlagContextValue {\n /** Follow the flagged instruction (the risky path). */\n onProceed: () => void;\n /** Ignore it and continue the original task (the safe path). */\n onDismiss: () => void;\n asModal: boolean;\n titleId: string;\n}\n\nconst InjectionFlagContext =\n React.createContext<InjectionFlagContextValue | null>(null);\n\nfunction useInjectionFlagContext(part: string): InjectionFlagContextValue {\n const ctx = React.useContext(InjectionFlagContext);\n if (!ctx) {\n throw new Error(\n `InjectionFlag.${part} must be rendered inside InjectionFlag.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface InjectionFlagRootProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"onSelect\"> {\n /** Called when the user chooses to follow the flagged instruction. */\n onProceed: () => void;\n /**\n * Called when the user declines to follow it (button, or Escape in modal\n * mode). This is the safe path — the agent keeps doing what the *user* asked.\n */\n onDismiss: () => void;\n /** Render as a modal AlertDialog instead of an inline card. */\n asModal?: boolean;\n /** Modal mode only: whether the dialog is open (controlled). */\n open?: boolean;\n /** Modal mode only: called when the dialog requests an open-state change. */\n onOpenChange?: (open: boolean) => void;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, InjectionFlagRootProps>(\n function InjectionFlagRoot(\n { onProceed, onDismiss, asModal = false, open, onOpenChange, children, ...rest },\n ref\n ) {\n const titleId = React.useId();\n const ctx = React.useMemo(\n () => ({ onProceed, onDismiss, asModal, titleId }),\n [onProceed, onDismiss, asModal, titleId]\n );\n\n if (asModal) {\n return (\n <InjectionFlagContext.Provider value={ctx}>\n <AlertDialog.Root open={open} onOpenChange={onOpenChange}>\n <AlertDialog.Portal>\n <AlertDialog.Overlay data-acp=\"overlay\" />\n <AlertDialog.Content\n ref={ref as React.Ref<HTMLDivElement>}\n data-acp=\"root\"\n data-injection=\"\"\n data-modal=\"\"\n aria-describedby={undefined}\n onEscapeKeyDown={onDismiss}\n {...rest}\n >\n {children}\n </AlertDialog.Content>\n </AlertDialog.Portal>\n </AlertDialog.Root>\n </InjectionFlagContext.Provider>\n );\n }\n\n return (\n <InjectionFlagContext.Provider value={ctx}>\n <section\n ref={ref as React.Ref<HTMLElement>}\n role=\"group\"\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-injection=\"\"\n {...rest}\n >\n {children}\n </section>\n </InjectionFlagContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type InjectionFlagHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: InjectionFlagHeaderProps) {\n useInjectionFlagContext(\"Header\");\n return <div data-acp=\"header\" {...props} />;\n}\n\nexport type InjectionFlagIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: InjectionFlagIconProps) {\n useInjectionFlagContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type InjectionFlagTitleProps =\n React.HTMLAttributes<HTMLHeadingElement>;\n\n/** The situation, stated plainly: \"An instruction came from untrusted content\". */\nfunction Title(props: InjectionFlagTitleProps) {\n const { asModal, titleId } = useInjectionFlagContext(\"Title\");\n if (asModal) {\n // Radix wires the dialog's aria-labelledby to its own Title id; don't override.\n return <AlertDialog.Title data-acp=\"title\" {...props} />;\n }\n return <h2 id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type InjectionFlagDescriptionProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/** Plain-language framing of why this is being surfaced. */\nfunction Description(props: InjectionFlagDescriptionProps) {\n useInjectionFlagContext(\"Description\");\n return <p data-acp=\"injection-description\" {...props} />;\n}\n\n/* ── Source (provenance of the instruction) ───────────────────────── */\n\nexport interface InjectionFlagSourceProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The untrusted origin type: \"a web page\", \"an email\", \"an uploaded file\". */\n origin: React.ReactNode;\n /** A specific pointer to it: a URL, a sender, a filename. */\n location?: React.ReactNode;\n}\n\n/**\n * Where the instruction came from — the provenance that makes it untrusted.\n * Carried in text (and an untrusted accent), never implied by styling alone.\n */\nfunction Source({ origin, location, children, ...rest }: InjectionFlagSourceProps) {\n useInjectionFlagContext(\"Source\");\n return (\n <div data-acp=\"injection-source\" {...rest}>\n <span data-acp=\"injection-source-label\">Came from</span>\n <span data-acp=\"injection-origin\">{origin}</span>\n {location != null && (\n <span data-acp=\"injection-location\">{location}</span>\n )}\n {children}\n </div>\n );\n}\n\n/* ── Quote (the instruction, verbatim) ────────────────────────────── */\n\nexport interface InjectionFlagQuoteProps\n extends React.HTMLAttributes<HTMLQuoteElement> {\n /** Label above the quote; defaults to \"The instruction reads:\". */\n label?: React.ReactNode;\n /** The flagged instruction, quoted exactly as it appeared. */\n children: React.ReactNode;\n}\n\n/**\n * The injected instruction, quoted verbatim and visually fenced. Showing the\n * literal text — not a paraphrase — is the heart of the pattern: the user sees\n * exactly what is trying to steer the agent.\n */\nfunction Quote({ label, children, ...rest }: InjectionFlagQuoteProps) {\n useInjectionFlagContext(\"Quote\");\n const labelId = React.useId();\n return (\n <figure data-acp=\"injection-quote-figure\">\n <figcaption id={labelId} data-acp=\"injection-quote-label\">\n {label ?? \"The instruction reads:\"}\n </figcaption>\n <blockquote\n data-acp=\"injection-quote\"\n aria-labelledby={labelId}\n {...rest}\n >\n {children}\n </blockquote>\n </figure>\n );\n}\n\n/* ── Consequence (what following it would do) ─────────────────────── */\n\nexport type InjectionFlagConsequenceProps =\n React.HTMLAttributes<HTMLParagraphElement>;\n\n/**\n * What the agent would do if it followed the instruction, stated concretely so\n * the stakes of \"Proceed\" are legible: \"I would forward your inbox to an\n * outside address.\"\n */\nfunction Consequence(props: InjectionFlagConsequenceProps) {\n useInjectionFlagContext(\"Consequence\");\n return <p data-acp=\"injection-consequence\" {...props} />;\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type InjectionFlagActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: InjectionFlagActionsProps) {\n useInjectionFlagContext(\"Actions\");\n return <div data-acp=\"actions\" {...props} />;\n}\n\nexport type InjectionFlagButtonProps =\n React.ButtonHTMLAttributes<HTMLButtonElement>;\n\n/**\n * Follow the flagged instruction — the risky path, styled subordinate so the UI\n * never nudges toward obeying untrusted content.\n */\nconst Proceed = React.forwardRef<HTMLButtonElement, InjectionFlagButtonProps>(\n function InjectionFlagProceed({ onClick, ...rest }, ref) {\n const { onProceed, asModal } = useInjectionFlagContext(\"Proceed\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onProceed();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"injection-proceed\"\n onClick={handleClick}\n {...rest}\n />\n );\n return asModal ? (\n <AlertDialog.Action asChild>{button}</AlertDialog.Action>\n ) : (\n button\n );\n }\n);\n\n/**\n * Ignore the instruction and keep doing what the user asked — the safe path.\n * In modal mode this is the AlertDialog cancel, so Radix gives it initial focus\n * and it never sits under the pointer of an accidental proceed.\n */\nconst Dismiss = React.forwardRef<HTMLButtonElement, InjectionFlagButtonProps>(\n function InjectionFlagDismiss({ onClick, ...rest }, ref) {\n const { onDismiss, asModal } = useInjectionFlagContext(\"Dismiss\");\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (!event.defaultPrevented) onDismiss();\n };\n const button = (\n <button\n ref={ref}\n type=\"button\"\n data-acp=\"injection-dismiss\"\n onClick={handleClick}\n {...rest}\n />\n );\n return asModal ? (\n <AlertDialog.Cancel asChild>{button}</AlertDialog.Cancel>\n ) : (\n button\n );\n }\n);\n\nexport const InjectionFlag = {\n Root,\n Header,\n Icon,\n Title,\n Description,\n Source,\n Quote,\n Consequence,\n Actions,\n Proceed,\n Dismiss,\n};\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport type { ScopeAccess } from \"../scoped-grant/scoped-grant\";\n\n/**\n * Connection Card — the settings tile that makes a standing grant visible\n * after the fact. Once an agent is connected to a service, the connection\n * tends to vanish from the user's awareness; this card keeps it legible:\n * current grant state, recency of use, status, and a revoke affordance.\n *\n * Headless compound component. All parts render unstyled with `data-acp`\n * attributes as styling hooks; import `@agentconsent/react/theme.css`\n * for the default theme.\n *\n * Unlike the decision-flow patterns, this is a display surface: it takes no\n * approve/reject callbacks of its own. Wire the management buttons\n * (`Action`) to your own handlers — a destructive revoke can compose with the\n * Irreversibility Gate.\n */\n\nexport type { ScopeAccess };\n\nexport type ConnectionStatus =\n | \"active\"\n | \"paused\"\n | \"needs-reauth\"\n | \"expired\";\n\ninterface ConnectionCardContextValue {\n status: ConnectionStatus;\n titleId: string;\n}\n\nconst ConnectionCardContext =\n React.createContext<ConnectionCardContextValue | null>(null);\n\nfunction useConnectionCardContext(part: string): ConnectionCardContextValue {\n const ctx = React.useContext(ConnectionCardContext);\n if (!ctx) {\n throw new Error(\n `ConnectionCard.${part} must be rendered inside ConnectionCard.Root`\n );\n }\n return ctx;\n}\n\n/* ── Root ─────────────────────────────────────────────────────────── */\n\nexport interface ConnectionCardRootProps\n extends React.HTMLAttributes<HTMLElement> {\n /** Lifecycle state of the connection — drives the status badge + styling. */\n status?: ConnectionStatus;\n children: React.ReactNode;\n}\n\nconst Root = React.forwardRef<HTMLElement, ConnectionCardRootProps>(\n function ConnectionCardRoot({ status = \"active\", children, ...rest }, ref) {\n const titleId = React.useId();\n const ctx = React.useMemo<ConnectionCardContextValue>(\n () => ({ status, titleId }),\n [status, titleId]\n );\n return (\n <ConnectionCardContext.Provider value={ctx}>\n <article\n ref={ref as React.Ref<HTMLElement>}\n aria-labelledby={titleId}\n data-acp=\"root\"\n data-connection=\"\"\n data-status={status}\n {...rest}\n >\n {children}\n </article>\n </ConnectionCardContext.Provider>\n );\n }\n);\n\n/* ── Header parts ─────────────────────────────────────────────────── */\n\nexport type ConnectionCardHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Header(props: ConnectionCardHeaderProps) {\n useConnectionCardContext(\"Header\");\n return <div data-acp=\"header\" data-connection-header=\"\" {...props} />;\n}\n\nexport type ConnectionCardIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction Icon(props: ConnectionCardIconProps) {\n useConnectionCardContext(\"Icon\");\n return <span aria-hidden data-acp=\"icon\" {...props} />;\n}\n\nexport type ConnectionCardTitleProps = React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * Who is connected to what: \"Inbox Assistant → Gmail\". Rendered as a\n * non-heading element with an id so the card's accessible name works at any\n * position in a settings list without imposing a heading level.\n */\nfunction Title(props: ConnectionCardTitleProps) {\n const { titleId } = useConnectionCardContext(\"Title\");\n return <div id={titleId} data-acp=\"title\" {...props} />;\n}\n\nexport type ConnectionCardStatusProps =\n React.HTMLAttributes<HTMLSpanElement>;\n\nconst STATUS_LABEL: Record<ConnectionStatus, string> = {\n active: \"Active\",\n paused: \"Paused\",\n \"needs-reauth\": \"Needs re-auth\",\n expired: \"Expired\",\n};\n\n/**\n * The lifecycle badge. Defaults to the status label as text (never color\n * alone); pass children to override the wording.\n */\nfunction Status({ children, ...rest }: ConnectionCardStatusProps) {\n const { status } = useConnectionCardContext(\"Status\");\n return (\n <span data-acp=\"connection-status\" data-status={status} {...rest}>\n {children ?? STATUS_LABEL[status]}\n </span>\n );\n}\n\n/* ── Scope summary ────────────────────────────────────────────────── */\n\nexport type ConnectionCardScopesProps = React.HTMLAttributes<HTMLUListElement>;\n\nfunction Scopes(props: ConnectionCardScopesProps) {\n useConnectionCardContext(\"Scopes\");\n return <ul data-acp=\"connection-scopes\" {...props} />;\n}\n\nconst ACCESS_LABEL: Record<ScopeAccess, string> = {\n read: \"Read\",\n write: \"Write\",\n delete: \"Delete\",\n};\n\nexport interface ConnectionCardScopeProps\n extends React.LiHTMLAttributes<HTMLLIElement> {\n /** Access level of this active capability — surfaced as a text badge. */\n access: ScopeAccess;\n /** Plain-language capability name: \"Send messages\". */\n children: React.ReactNode;\n}\n\nfunction Scope({ access, children, ...rest }: ConnectionCardScopeProps) {\n useConnectionCardContext(\"Scope\");\n return (\n <li data-acp=\"connection-scope\" data-access={access} {...rest}>\n <span data-acp=\"connection-access\" data-access={access}>\n {ACCESS_LABEL[access]}\n </span>\n <span data-acp=\"connection-scope-name\">{children}</span>\n </li>\n );\n}\n\n/* ── Meta (recency, dates) ────────────────────────────────────────── */\n\nexport type ConnectionCardMetaProps = React.HTMLAttributes<HTMLDListElement>;\n\nfunction Meta(props: ConnectionCardMetaProps) {\n useConnectionCardContext(\"Meta\");\n return <dl data-acp=\"connection-meta\" {...props} />;\n}\n\nexport interface ConnectionCardMetaItemProps\n extends React.HTMLAttributes<HTMLDivElement> {\n /** The fact's name: \"Last used\", \"Connected\". */\n label: React.ReactNode;\n children: React.ReactNode;\n}\n\nfunction MetaItem({ label, children, ...rest }: ConnectionCardMetaItemProps) {\n useConnectionCardContext(\"MetaItem\");\n return (\n <div data-acp=\"connection-meta-item\" {...rest}>\n <dt data-acp=\"connection-meta-label\">{label}</dt>\n <dd data-acp=\"connection-meta-value\">{children}</dd>\n </div>\n );\n}\n\n/* ── Actions ──────────────────────────────────────────────────────── */\n\nexport type ConnectionCardActionsProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction Actions(props: ConnectionCardActionsProps) {\n useConnectionCardContext(\"Actions\");\n return <div data-acp=\"actions\" data-connection-actions=\"\" {...props} />;\n}\n\nexport interface ConnectionCardActionProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** \"danger\" styles a destructive management action such as revoke. */\n tone?: \"default\" | \"danger\";\n}\n\nconst Action = React.forwardRef<HTMLButtonElement, ConnectionCardActionProps>(\n function ConnectionCardAction({ tone = \"default\", type, ...rest }, ref) {\n useConnectionCardContext(\"Action\");\n return (\n <button\n ref={ref}\n type={type ?? \"button\"}\n data-acp=\"connection-action\"\n data-tone={tone}\n {...rest}\n />\n );\n }\n);\n\nexport const ConnectionCard = {\n Root,\n Header,\n Icon,\n Title,\n Status,\n Scopes,\n Scope,\n Meta,\n MetaItem,\n Actions,\n Action,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,YAAuB;AACvB,kBAA6B;AAwFjB;AA7DZ,IAAM,uBACE,oBAAgD,IAAI;AAE5D,SAAS,wBAAwB,MAAyC;AACxE,QAAM,MAAY,iBAAW,oBAAoB;AACjD,MAAI,CAAC,KAAK;AACR,UAAM,IAAI;AAAA,MACR,iBAAiB,IAAI;AAAA,IACvB;AAAA,EACF;AACA,SAAO;AACT;AA0BA,IAAMA,QAAa;AAAA,EACjB,SAAS,kBACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,UAAM,UAAgB,YAA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OAAO,UAAU,GAAG,KAAK,GAAgC;AAC3E,2BAAyB,UAAU;AACnC,SACE,+CAAC,SAAI,YAAS,wBAAwB,GAAG,MACvC;AAAA,kDAAC,QAAG,YAAS,yBAAyB,iBAAM;AAAA,IAC5C,8CAAC,QAAG,YAAS,yBAAyB,UAAS;AAAA,KACjD;AAEJ;AAMA,SAASC,SAAQ,OAAmC;AAClD,2BAAyB,SAAS;AAClC,SAAO,8CAAC,SAAI,YAAS,WAAU,2BAAwB,IAAI,GAAG,OAAO;AACvE;AAQA,IAAMC,UAAe;AAAA,EACnB,SAAS,qBAAqB,EAAE,OAAO,WAAW,MAAM,GAAG,KAAK,GAAG,KAAK;AACtE,6BAAyB,QAAQ;AACjC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAM,QAAQ;AAAA,QACd,YAAS;AAAA,QACT,aAAW;AAAA,QACV,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEO,IAAM,iBAAiB;AAAA,EAC5B,MAAAT;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAAE;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AACF;","names":["Root","Title","Content","React","AlertDialog","import_jsx_runtime","Root","Header","Icon","Title","Actions","Cancel","React","import_jsx_runtime","Root","Header","Icon","Title","Description","Actions","Cancel","React","AlertDialog","import_jsx_runtime","Root","Header","Icon","Title","ACCESS_LABEL","Actions","React","import_jsx_runtime","Root","Header","Icon","Title","Description","React","import_jsx_runtime","Root","Header","Icon","Title","Description","Actions","Deny","React","import_jsx_runtime","Root","Header","Icon","Title","Description","List","ACCESS_LABEL","React","import_jsx_runtime","useControllableMap","Root","Header","Icon","Title","Description","Summary","List","React","import_jsx_runtime","Root","Header","Icon","Title","Description","Actions","Cancel","React","import_jsx_runtime","Root","Header","Icon","Title","Actions","React","AlertDialog","import_jsx_runtime","Root","Header","Icon","Title","Description","Source","Consequence","Actions","React","import_jsx_runtime","Root","Header","Icon","Title","ACCESS_LABEL","Scope","Meta","MetaItem","Actions","Action"]}
|