AgentScope class final

What an invocation may touch. Immutable once made; least privilege by construction.

Constructors

AgentScope({Set<String>? allowedIds, Set<String>? allowedKinds, bool allowWrite = true})

Properties

allowedIds → Set<String>?
Null admits any id (still bounded by allowedKinds and allowWrite); otherwise exactly these ids.
final
allowedKinds → Set<String>?
The target kinds that may be touched; null admits every kind.
final
allowWrite → bool
False is a read-only scope: every write is refused at gate 2.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

admitsKind(String kind) → bool
Whether kind is admitted at gate 3.
covers(Iterable<String> kinds) → bool
Whether this scope admits every target of the given kinds: any id, and each of the kinds. An operation that reaches a whole resource rather than the targets it names is admitted only under such a scope.
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