Class AgentStopHookOutput

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

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

    • AgentStopHookOutput

      public AgentStopHookOutput()
  • Method Details

    • getDecision

      public String getDecision()
      Gets the stop decision.
      Returns:
      "block" to keep the agent running, or null
    • setDecision

      public AgentStopHookOutput setDecision(String decision)
      Sets the stop decision.
      Parameters:
      decision - "block" to keep the agent running
      Returns:
      this instance for method chaining
    • getReason

      public String getReason()
      Gets the follow-up instruction supplied when the stop is blocked.
      Returns:
      the follow-up instruction
    • setReason

      public AgentStopHookOutput setReason(String reason)
      Sets the follow-up instruction supplied when the stop is blocked.
      Parameters:
      reason - the follow-up instruction
      Returns:
      this instance for method chaining