Class PostToolUseHookInput

java.lang.Object
com.github.copilot.sdk.json.PostToolUseHookInput

public class PostToolUseHookInput extends Object
Input for a post-tool-use hook.
Since:
1.0.6
  • Constructor Details

    • PostToolUseHookInput

      public PostToolUseHookInput()
  • Method Details

    • getTimestamp

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

      public PostToolUseHookInput 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 PostToolUseHookInput setCwd(String cwd)
      Sets the current working directory.
      Parameters:
      cwd - the working directory path
      Returns:
      this instance for method chaining
    • getToolName

      public String getToolName()
      Gets the name of the tool that was invoked.
      Returns:
      the tool name
    • setToolName

      public PostToolUseHookInput setToolName(String toolName)
      Sets the name of the tool that was invoked.
      Parameters:
      toolName - the tool name
      Returns:
      this instance for method chaining
    • getToolArgs

      public com.fasterxml.jackson.databind.JsonNode getToolArgs()
      Gets the arguments passed to the tool.
      Returns:
      the tool arguments as a JSON node
    • setToolArgs

      public PostToolUseHookInput setToolArgs(com.fasterxml.jackson.databind.JsonNode toolArgs)
      Sets the arguments passed to the tool.
      Parameters:
      toolArgs - the tool arguments as a JSON node
      Returns:
      this instance for method chaining
    • getToolResult

      public com.fasterxml.jackson.databind.JsonNode getToolResult()
      Gets the result returned by the tool.
      Returns:
      the tool result as a JSON node
    • setToolResult

      public PostToolUseHookInput setToolResult(com.fasterxml.jackson.databind.JsonNode toolResult)
      Sets the result returned by the tool.
      Parameters:
      toolResult - the tool result as a JSON node
      Returns:
      this instance for method chaining