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

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → int
Number of registered entries.
no setter

Methods

has(String toolName) → bool
Whether toolName has a registered risk level.
lookup(String toolName, {RiskLevel? fallback}) → RiskLevel
Looks up the risk level for toolName. Falls back to fallback (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 toolName is 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