Package com.github.copilot.sdk.json
Class PreToolUseHookInput
java.lang.Object
com.github.copilot.sdk.json.PreToolUseHookInput
Input for a pre-tool-use hook.
- Since:
- 1.0.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCwd()Gets the current working directory.longGets the timestamp of the hook invocation.com.fasterxml.jackson.databind.JsonNodeGets the arguments passed to the tool.Gets the name of the tool being invoked.Sets the current working directory.setTimestamp(long timestamp) Sets the timestamp of the hook invocation.setToolArgs(com.fasterxml.jackson.databind.JsonNode toolArgs) Sets the arguments passed to the tool.setToolName(String toolName) Sets the name of the tool being invoked.
-
Constructor Details
-
PreToolUseHookInput
public PreToolUseHookInput()
-
-
Method Details
-
getTimestamp
public long getTimestamp()Gets the timestamp of the hook invocation.- Returns:
- the timestamp in milliseconds
-
setTimestamp
Sets the timestamp of the hook invocation.- Parameters:
timestamp- the timestamp in milliseconds- Returns:
- this instance for method chaining
-
getCwd
Gets the current working directory.- Returns:
- the working directory path
-
setCwd
Sets the current working directory.- Parameters:
cwd- the working directory path- Returns:
- this instance for method chaining
-
getToolName
Gets the name of the tool being invoked.- Returns:
- the tool name
-
setToolName
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
Sets the arguments passed to the tool.- Parameters:
toolArgs- the tool arguments as a JSON node- Returns:
- this instance for method chaining
-