java.lang.Object
com.github.copilot.rpc.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.Gets the runtime session ID of the session that triggered the hook.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.setSessionId(String sessionId) Sets the runtime session ID of the session that triggered the hook.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
-
getSessionId
Gets the runtime session ID of the session that triggered the hook.- Returns:
- the session ID
-
setSessionId
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
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
-