pub struct BaseHookInput {
pub session_id: String,
pub transcript_path: String,
pub cwd: String,
pub permission_mode: Option<String>,
pub effort: Option<EffortInfo>,
}Expand description
Fields shared by every hook input the CLI emits. Every concrete
input type below flattens this struct so callbacks can access
session_id, transcript_path, cwd, and (optionally)
permission_mode without reaching back into
super::HookContext.
Fields§
§session_id: StringSession identifier the hook fired in.
transcript_path: StringFilesystem path of the session transcript JSONL file.
cwd: StringWorking directory of the CLI when the hook fired.
permission_mode: Option<String>Permission mode active for the call (e.g. "default",
"bypassPermissions"). Absent for hook frames that predate this
field or where the CLI omits it.
effort: Option<EffortInfo>Active effort level at the moment the hook fired (CLI 2.1.133+).
None for older CLI versions or hook frames that predate the
field. The wire shape is {"effort": {"level": "max"}} per the
2.1.133 changelog (“Hooks now receive the active effort level
via the effort.level JSON input field”). Defensive Option lets
older baselines decode without the field present.
Trait Implementations§
Source§impl Clone for BaseHookInput
impl Clone for BaseHookInput
Source§fn clone(&self) -> BaseHookInput
fn clone(&self) -> BaseHookInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more