Class PreToolUseHookInput

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

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

    • PreToolUseHookInput

      public PreToolUseHookInput()
  • Method Details

    • getTimestamp

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

      public PreToolUseHookInput 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 PreToolUseHookInput 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 being invoked.
      Returns:
      the tool name
    • setToolName

      public PreToolUseHookInput setToolName(String toolName)
      Sets the name of the tool being 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 PreToolUseHookInput 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