PolicyDecision class
A pending policy decision for one SemanticAction.
The host UI receives a PolicyDecision for each intercepted confirm-tier action, prompts the user, and calls either approve or deny. The original action is then delivered to the agent only if approved.
Constructors
- PolicyDecision.forAction(SemanticAction action)
-
factory
Properties
- action → SemanticAction
-
The action awaiting approval.
final
-
future
→ Future<
SemanticAction?> -
Completes with the approved action (with
tierpreserved) once the user approves, or withnullonce the user denies (or the gate is dropped).final - hashCode → int
-
The hash code for this object.
no setterinherited
- isDecided → bool
-
Whether the user has already decided.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
approve(
) → void - Mark the action as approved — the gate releases it for agent delivery.
-
cancel(
) → void -
Drop this decision without delivering the action (e.g. the host UI was
dismissed or the agent loop was torn down). Completes the future with
null; thewhenCompletecallback then removes it frompending. -
deny(
) → void - Mark the action as denied — the gate drops it; nothing reaches the agent.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited