Class AgentStopHookInput

java.lang.Object
com.github.copilot.rpc.AgentStopHookInput

public class AgentStopHookInput extends Object
Input for an agent-stop hook.
Since:
1.0.9
  • Constructor Details

    • AgentStopHookInput

      public AgentStopHookInput()
  • Method Details

    • getSessionId

      public String getSessionId()
      Gets the runtime session ID of the session that triggered the hook.
      Returns:
      the session ID
    • setSessionId

      public AgentStopHookInput setSessionId(String sessionId)
      Sets the runtime session ID of the session that triggered the hook.
      Parameters:
      sessionId - the session ID
      Returns:
      this instance for method chaining
    • getTimestamp

      public long getTimestamp()
      Gets the timestamp of the hook invocation.
      Returns:
      the timestamp in milliseconds
    • setTimestamp

      public AgentStopHookInput setTimestamp(long timestamp)
      Sets the timestamp of the hook invocation.
      Parameters:
      timestamp - the timestamp in milliseconds
      Returns:
      this instance for method chaining
    • getCwd

      public String getCwd()
      Gets the current working directory.
      Returns:
      the working directory path
    • setCwd

      public AgentStopHookInput setCwd(String cwd)
      Sets the current working directory.
      Parameters:
      cwd - the working directory path
      Returns:
      this instance for method chaining
    • getStopReason

      public String getStopReason()
      Gets the reason the agent stopped.
      Returns:
      the stop reason
    • setStopReason

      public AgentStopHookInput setStopReason(String stopReason)
      Sets the reason the agent stopped.
      Parameters:
      stopReason - the stop reason
      Returns:
      this instance for method chaining
    • getTranscriptPath

      public String getTranscriptPath()
      Gets the path to the on-disk session transcript.
      Returns:
      the transcript path
    • setTranscriptPath

      public AgentStopHookInput setTranscriptPath(String transcriptPath)
      Sets the path to the on-disk session transcript.
      Parameters:
      transcriptPath - the transcript path
      Returns:
      this instance for method chaining
    • getStopHookActive

      public Boolean getStopHookActive()
      Gets whether this stop follows a previous block decision.
      Returns:
      true when the stop hook is already active
    • setStopHookActive

      public AgentStopHookInput setStopHookActive(Boolean stopHookActive)
      Sets whether this stop follows a previous block decision.
      Parameters:
      stopHookActive - whether the stop hook is already active
      Returns:
      this instance for method chaining