Record Class LocalAgentRequest
java.lang.Object
java.lang.Record
com.shaft.pilot.agent.LocalAgentRequest
- Record Components:
client- local agent clientmode- Autobot modeprompt- prompt written to the local agent stdinworkingDirectory- command working directorycommand- optional custom command; defaults are used when emptyenvironment- additional process environment variablestimeout- maximum execution timeallowSourceMutation- explicit approval for agent mode to edit local source
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionLocalAgentRequest(LocalAgentClient client, LocalAgentMode mode, String prompt, Path workingDirectory, List<String> command, Map<String, String> environment, Duration timeout, boolean allowSourceMutation) Creates and defensively copies a request. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowSourceMutationrecord component.static LocalAgentRequest.Builderbuilder(LocalAgentClient client, LocalAgentMode mode, String prompt) Starts a request builder.client()Returns the value of theclientrecord component.command()Returns the value of thecommandrecord component.Returns the value of theenvironmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.prompt()Returns the value of thepromptrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkingDirectoryrecord component.
-
Constructor Details
-
LocalAgentRequest
public LocalAgentRequest(LocalAgentClient client, LocalAgentMode mode, String prompt, Path workingDirectory, List<String> command, Map<String, String> environment, Duration timeout, boolean allowSourceMutation) Creates and defensively copies a request.
-
-
Method Details
-
builder
public static LocalAgentRequest.Builder builder(LocalAgentClient client, LocalAgentMode mode, String prompt) Starts a request builder.- Parameters:
client- local agent clientmode- Autobot modeprompt- prompt text- Returns:
- request builder
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
client
-
mode
-
prompt
-
workingDirectory
Returns the value of theworkingDirectoryrecord component.- Returns:
- the value of the
workingDirectoryrecord component
-
command
-
environment
Returns the value of theenvironmentrecord component.- Returns:
- the value of the
environmentrecord component
-
timeout
-
allowSourceMutation
public boolean allowSourceMutation()Returns the value of theallowSourceMutationrecord component.- Returns:
- the value of the
allowSourceMutationrecord component
-