Package com.tnsai.agents.execution
Interface ToolCallBatchPartitioner.ToolCallClassifier
- Enclosing class:
ToolCallBatchPartitioner
public static interface ToolCallBatchPartitioner.ToolCallClassifier
Strategy interface: callers implement to connect their Tool/ActionMetadata
lookup with the partitioner. Provides defaults that extract paths from the
common argument keys; override when the tool's argument shape differs.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true ifcall's underlying tool is safe to run in parallel: idempotent, parallelizable, not requires-confirmation.static StringCanonicalises a path for overlap comparison.Returns the set of paths / URIs / resource IDs thatcallreads or writes.
-
Method Details
-
isParallelSafe
Returns true ifcall's underlying tool is safe to run in parallel: idempotent, parallelizable, not requires-confirmation. Unknown tools should return false (conservative default). -
pathsFor
Returns the set of paths / URIs / resource IDs thatcallreads or writes. Default implementation scansToolCallBatchPartitioner.DEFAULT_PATH_KEYSagainst. Override to handle tool-specific argument shapes (e.g. a batchinvalid reference
ToolCall#getArguments()files: [a, b, c]array). -
normalise
Canonicalises a path for overlap comparison. Lowercases (Locale.ROOT) and strips a trailing slash so"/tmp/a"and"/tmp/a/"collide as intended.
-