SafeDefaultAiToolPolicy class

Safe default policy for development and low-risk tools.

The policy allows a tool when:

Set requireUserBinding to true when even development tools must have a user id attached to the run.

Implemented types

Constructors

SafeDefaultAiToolPolicy({Set<String> allowedTools = const {}, Set<String> allowedCapabilities = const {}, bool requireUserBinding = false, bool allowEnabledByDefault = true})
const

Properties

allowedCapabilities Set<String>
Capabilities that are globally allowed by this policy.
final
allowedTools Set<String>
Tool names that are always allowed by this policy.
final
allowEnabledByDefault bool
Whether tools marked AiTool.enabledByDefault are allowed.
final
hashCode int
The hash code for this object.
no setterinherited
requireUserBinding bool
Whether AiToolInvocation.userId must be present.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canExecute(AiToolInvocation invocation) Future<bool>
Returns whether invocation may execute.
override
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