HookResult
Defined in the hooks module.Rust AI Agent SDK Result from a hook execution
Fields
| Name | Type | Description |
|---|---|---|
decision | HookDecision | Decision (allow, deny, block, ask) |
reason | Option<String> | Reason for the decision |
modified_input | Option<HashMap<String | Modified input data (optional) |
serde_json | :Value>> | Modified input data (optional) |
additional_context | Option<String> | Additional context |
suppress_output | bool | Whether to suppress output |
Methods
allow
allow_with_reason
| Name | Type |
|---|---|
reason | impl Into<String> |
deny
| Name | Type |
|---|---|
reason | impl Into<String> |
block
| Name | Type |
|---|---|
reason | impl Into<String> |
ask
| Name | Type |
|---|---|
reason | impl Into<String> |
is_allowed
is_denied
with_modified_input
| Name | Type |
|---|---|
input | HashMap<String |
serde_json | :Value> |
with_context
| Name | Type |
|---|---|
context | impl Into<String> |
suppress
Source
View on GitHub
praisonai/src/hooks/mod.rs at line 177
