Skip to content

v0.1.42

Choose a tag to compare

@github-actions github-actions released this 25 Nov 10:08
· 45 commits to main since this release
v0.1.42
c03acf0

Added

  • An application decides what an agent may do. Mark a control whose action destroys work with ControlMetadata::destructive(true) or Field::destructive(true); the agent snapshot shows it as destructive. By default Agent::act holds a request that would change such a control and returns ActError::NeedsConfirmation(id); Agent::awaiting() lists held requests for the app to put to the person, Agent::confirm(&hits, id) queues one after checking that the same control is still there and enabled, and Agent::decline(id) drops it. Agent::allow(hook) replaces the default with the app's own rule: the hook answers Permission::Allow, Deny (ActError::Denied, nothing queued) or Confirm, and can fall back on Permission::default_for. Focusing a control never needs confirmation.

Changed

  • Breaking: AgentControl has a destructive field, and ActError has Denied and NeedsConfirmation. Code that builds an AgentControl with a struct literal adds destructive: false; a match on ActError already needs a wildcard arm.