Agent ApprovalNew
An agent asks before it acts: the action, its risk and a preview of the change, then Allow once, Always allow or Deny.
Pro pattern · recorded from Pro
The SwiftUI source comes with SwiftPieces Pro.
Every Pro pattern installs with one command once your license is signed in, and re-skins with Pro's design system.
Open it in the Pro library ↗Needs a SwiftPieces Pro license: npx swiftpieces login first.
- Type
- AgentApprovalBlock
- Inside
- Action with a risk chip, Preview of the change, Allow once, always or deny, Optional countdown
- Install, with a Pro license
- npx swiftpieces add AgentApprovalBlock
- Depends on
- Pro's Design System, which installs with it
The permission prompt for an agent about to act. A card names the agent and tool with a tinted risk chip, states the action and why, counts down to an automatic deny when it has a deadline, and previews the change as an email, a list of affected items or a value before and after. Each answer runs your closure in place, and the block folds to a one-line outcome.
Its SwiftUI source comes with SwiftPieces Pro: Agent Approval in the Pro library.