Class PreToolUseHookInput

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

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

    • PreToolUseHookInput

      public PreToolUseHookInput()
  • Method Details

    • getAgentId

      public String getAgentId()
    • setAgentId

      public PreToolUseHookInput setAgentId(String agentId)
    • getAgentType

      public String getAgentType()
    • setAgentType

      public PreToolUseHookInput setAgentType(String agentType)
    • getParentAgentId

      public String getParentAgentId()
    • setParentAgentId

      public PreToolUseHookInput setParentAgentId(String parentAgentId)
    • getSessionId

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

      public PreToolUseHookInput 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 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