java.lang.Object
com.github.copilot.rpc.PostToolUseHookInput
Input for a post-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 that was invoked.com.fasterxml.jackson.databind.JsonNodeGets the result returned by the tool.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 that was invoked.setToolResult(com.fasterxml.jackson.databind.JsonNode toolResult) Sets the result returned by the tool.
-
Constructor Details
-
PostToolUseHookInput
public PostToolUseHookInput()
-
-
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 that was invoked.- Returns:
- the tool name
-
setToolName
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
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
Sets the result returned by the tool.- Parameters:
toolResult- the tool result as a JSON node- Returns:
- this instance for method chaining
-