java.lang.Object
java.lang.Record
com.agentforge4j.core.command.ToolInvocationCommand
- Record Components:
toolInvocationId- stable invocation id; generated if absentcapability- non-blank logical capability id, for example"github.create_pull_request"arguments- tool arguments as a JSON object; nevernull(defaults to empty)llmRationale- model rationale for audit, ornull
- All Implemented Interfaces:
LlmCommand
public record ToolInvocationCommand(String toolInvocationId, String capability, Map<String,Object> arguments, String llmRationale)
extends Record
implements LlmCommand
Request from the LLM to invoke a logical tool capability. An
LlmCommand that always flows
through the runtime's ToolExecutionService chokepoint, never directly to an external
system.
toolInvocationId correlates audit events and approval resume. The LLM omits it when
emitting the command, so the compact constructor generates a UUID when it is null or
blank — leaving an explicitly supplied id untouched.
arguments is a JSON object: the LLM emits it as a structured object, not an escaped
JSON string. The runtime serializes it to JSON text at the ToolProvider boundary,
preserving the opaque-string contract there.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.Returns the value of thecapabilityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thellmRationalerecord component.Returns the value of thetoolInvocationIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
toolInvocationId
Returns the value of thetoolInvocationIdrecord component.- Returns:
- the value of the
toolInvocationIdrecord component
-
capability
Returns the value of thecapabilityrecord component.- Returns:
- the value of the
capabilityrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
llmRationale
Returns the value of thellmRationalerecord component.- Returns:
- the value of the
llmRationalerecord component
-