PermissionRequest class
A request to perform a permissioned operation.
Created by tool executors and permission checkers, then evaluated against the active PermissionRuleSet.
Constructors
-
PermissionRequest({required PermissionScope scope, required String action, required String resource, String? toolName, required String detail, RiskLevel riskLevel = RiskLevel.medium, DateTime? timestamp, Map<
String, dynamic> metadata = const {}})
Properties
- action → String
-
The specific action within the scope (e.g., "read", "write", "execute").
final
- cacheKey → String
-
Unique key for caching purposes. Combines scope, action, and resource.
no setter
- detail → String
-
Human-readable description of what is being requested.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ Map<
String, dynamic> -
Additional metadata about the request.
final
- resource → String
-
The resource being acted upon (e.g., file path, URL, tool name).
final
- riskLevel → RiskLevel
-
Risk assessment for this request.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → PermissionScope
-
The scope of the requested operation.
final
- timestamp → DateTime
-
When this request was created.
final
- toolName → String?
-
The tool requesting the permission, if applicable.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited