Expand description
hookSpecificOutput typed wrappers for the two hook kinds forge
answers with an input override.
Each carries a zero-sized event_name field that serde always emits
as the correct hookEventName string, so the discriminator is present
however the wrapper is serialised.
Re-exportsยง
use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use serde_json::Value;๐use super::HookKind;๐
Macrosยง
- declare_
event_ ๐name_ tag - Tag ZST helpers that serialise as a fixed
hookEventNamestring and ignore the actual value on the way back in. One ZST per event kind keeps the wrapper structsDefault,Clone, and roundtrip-safe without requiring nightly-only const-generic string parameters.
Structsยง
- PreTool
UseHook Specific Output hookSpecificOutputshape forPreToolUsehook responses.- PreTool
UseTag - Zero-sized tag that always serialises as
"PreToolUse". - User
Prompt Submit Hook Specific Output hookSpecificOutputshape forUserPromptSubmit.- User
Prompt Submit Tag - Zero-sized tag that always serialises as
"UserPromptSubmit".
Functionsยง
- encode_
updated_ input_ wrapper - Encode a
replace_inputforge_sdk::HookDecisioninto ahookSpecificOutputwrapper for the given hook kind.