PermissionRegistry class
Registry mapping tool name patterns to RiskLevels (FR-001).
Most-restrictive-wins on conflict (FR-001 edge case). Falls back to the tool's own risk metadata (passed in by the agent core) when the registry has no entry (FR-012).
Constructors
-
PermissionRegistry({Map<
String, RiskLevel> ? entries})
Properties
Methods
-
has(
String toolName) → bool -
Whether
toolNamehas a registered risk level. -
lookup(
String toolName, {RiskLevel? fallback}) → RiskLevel -
Looks up the risk level for
toolName. Falls back tofallback(the tool's self-declared risk metadata) when no entry is registered. Defaults to RiskLevel.safe if neither is present. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
String toolName, RiskLevel level) → void -
Registers a tool name → risk level mapping. If
toolNameis already registered, the most-restrictive level wins. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited