SafeDefaultAiToolPolicy class
Safe default policy for development and low-risk tools.
The policy allows a tool when:
- allowedTools contains the tool name.
- allowedCapabilities satisfies the tool's required capabilities.
- allowEnabledByDefault is true and the tool opts into AiTool.enabledByDefault.
Set requireUserBinding to true when even development tools must have a user id attached to the run.
- Implemented types
Constructors
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
invocationmay 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