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-requestCI is green on release/2.4 and the changelog is merged; tagging needs main.
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.
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.
oxyn add permission-requestUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Risky
Once, for 1 h or always.
CI is green on release/2.4 and the changelog is merged; tagging needs main.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Destructive
Red Allow, no Always.
CI is green on release/2.4 and the changelog is merged; tagging needs main.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Timed
Folded: allowed with the time left and Revoke.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Once
One scope hides the switch.
CI is green on release/2.4 and the changelog is merged; tagging needs main.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
PermissionRequest
| Prop | Type | Default | Description |
|---|---|---|---|
reqrequired | PermModel | — | Model. |
nowrequired | ClockMs | — | Shared clock. |
preview_title | String | "What will happen" | Preview heading. |
on_scope | EventHandler<Scope> | — | Scope picked. |
on_allow | EventHandler<()> | — | Allow pressed. |
on_deny | EventHandler<()> | — | Deny pressed. |
on_revoke | EventHandler<()> | — | Revoke, Change or Ask again. |
on_more | EventHandler<()> | — | "N more" pressed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Scope radios, Deny, Allow |
| Escape | Deny |
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
PermissionRequestfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
PermissionRequestElinoxyn_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.