AgentToolRegistry<C extends AgentToolContext> class
final
A set of tools a presentation renders.
where can only remove, so a set derived from a registry never holds a tool the registry does not. An application that wants its surface closed constructs its registry once and derives every other set from it.
Constructors
-
AgentToolRegistry(List<
AgentTool< tools)C> >
Properties
Methods
-
invoke(
C context, String name, Map< String, Object?> arguments) → FutureOr<Object?> -
Calls the tool
namenames witharguments— the entry a presentation uses. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
require(
String name) → AgentTool< C> -
name's tool, or a refusal. -
toString(
) → String -
A string representation of this object.
inherited
-
where(
bool test(AgentTool< C> )) → AgentToolRegistry<C> -
The subset of this set
testkeeps — the only way to derive another presentation's set, and one that can only remove.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String name) → AgentTool< C> ?
Static Methods
-
refuse(
AgentToolContext context, String name, Map< String, Object?> arguments, Object? refusal()) → FutureOr<Object?> -
Refuses a call to
namewith whateverrefusalthrows, recording the refusal as a call — for a presentation that must turn a call away without running any tool, and must not let it vanish from the trail.