Skip to content
Back

Permission RequestPro

An agent asks for one specific right: who, why and exactly what will happen. Allow it once, for an hour or always; it folds into one line with the time left and Revoke. Destructive requests turn Allow red and drop Always.

oxyn add permission-request
R
Release bot wants to push to main
acme/web · Claude Sonnet 5.5
risky
CI is green on release/2.4 and the changelog is merged; tagging needs main.
What will happen
Merge release/2.4 into main+412 −96
Tag v2.4.0
Trigger the production deployVercel
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • One agent asks for one specific right: who (agent, model), what (“wants to push to main”), where (target with the tool's mark), why (its own words) and exactly what will happen (preview rows with right-aligned meta, “N more”).
  • Allow it once, for a while (default 60 min) or always; after a decision it folds into one line with the time left and Revoke (or Ask again once expired or denied).
  • Destructive requests turn Allow red and leave out Always.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Permission Request is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add permission-request

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Risky

Once, for 1 h or always.

R
Release bot wants to push to main
acme/web · Claude Sonnet 5.5
risky
CI is green on release/2.4 and the changelog is merged; tagging needs main.
What will happen
Merge release/2.4 into main+412 −96
Tag v2.4.0
Trigger the production deployVercel
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Destructive

Red Allow, no Always.

R
Release bot wants to force-push to main
acme/web · Claude Sonnet 5.5
destructive
CI is green on release/2.4 and the changelog is merged; tagging needs main.
What will happen
Merge release/2.4 into main+412 −96
Tag v2.4.0
Trigger the production deployVercel
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Timed

Folded: allowed with the time left and Revoke.

Release bot · push to main · acme/webAllowed · 58 min left
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Once

One scope hides the switch.

R
Release bot wants to push to main
acme/web · Claude Sonnet 5.5
CI is green on release/2.4 and the changelog is merged; tagging needs main.
What will happen
Merge release/2.4 into main+412 −96
Tag v2.4.0
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

PermissionRequest

PropTypeDefaultDescription
reqrequiredPermModel—Model.
nowrequiredClockMs—Shared clock.
preview_titleString"What will happen"Preview heading.
on_scopeEventHandler<Scope>—Scope picked.
on_allowEventHandler<()>—Allow pressed.
on_denyEventHandler<()>—Deny pressed.
on_revokeEventHandler<()>—Revoke, Change or Ask again.
on_moreEventHandler<()>—"N more" pressed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabScope radios, Deny, Allow
EscapeDeny

Accessibility

  • Named “<agent> wants to <action>”; the scope switch is a radiogroup.
  • The folded line is a status with the time left as text.
From the spec
  • Group named “<agent> wants to <action>”; scopes are a radiogroup; folded line is role=status.

Motion & interaction

Timing
  • Folding fades the line in (240 ms); time left ticks with the host clock.
  • Reduced motion: no fade.

Responsive behaviour

  • Max 440 px; the footer wraps the scope switch above the buttons when narrow.
Edge cases (spec)
  • Max 440 px; the footer wraps when narrow.

Notes for AI

  • Import PermissionRequest from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: PermissionRequestEl in oxyn_gpui.
  • Props to set first: req, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI