Package com.github.copilot.sdk.json
Class PreToolUseHookOutput
java.lang.Object
com.github.copilot.sdk.json.PreToolUseHookOutput
Output for a pre-tool-use hook.
- Since:
- 1.0.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets additional context to provide to the model.com.fasterxml.jackson.databind.JsonNodeGets the modified tool arguments.Gets the permission decision.Gets the reason for the permission decision.Returns whether to suppress output.setAdditionalContext(String additionalContext) Sets additional context to provide to the model.setModifiedArgs(com.fasterxml.jackson.databind.JsonNode modifiedArgs) Sets the modified tool arguments.setPermissionDecision(String permissionDecision) Sets the permission decision.setPermissionDecisionReason(String permissionDecisionReason) Sets the reason for the permission decision.setSuppressOutput(Boolean suppressOutput) Sets whether to suppress output.
-
Constructor Details
-
PreToolUseHookOutput
public PreToolUseHookOutput()
-
-
Method Details
-
getPermissionDecision
Gets the permission decision.- Returns:
- "allow", "deny", or "ask"
-
setPermissionDecision
Sets the permission decision.- Parameters:
permissionDecision- "allow", "deny", or "ask"- Returns:
- this instance for method chaining
-
getPermissionDecisionReason
Gets the reason for the permission decision.- Returns:
- the reason text
-
setPermissionDecisionReason
Sets the reason for the permission decision.- Parameters:
permissionDecisionReason- the reason text- Returns:
- this instance for method chaining
-
getModifiedArgs
public com.fasterxml.jackson.databind.JsonNode getModifiedArgs()Gets the modified tool arguments.- Returns:
- the modified arguments, or
nullto use original
-
setModifiedArgs
Sets the modified tool arguments.- Parameters:
modifiedArgs- the modified arguments- Returns:
- this instance for method chaining
-
getAdditionalContext
Gets additional context to provide to the model.- Returns:
- the additional context
-
setAdditionalContext
Sets additional context to provide to the model.- Parameters:
additionalContext- the additional context- Returns:
- this instance for method chaining
-
getSuppressOutput
Returns whether to suppress output.- Returns:
trueto suppress output
-
setSuppressOutput
Sets whether to suppress output.- Parameters:
suppressOutput-trueto suppress output- Returns:
- this instance for method chaining
-