pub struct DiscoveredHook {
pub disable_key: Option<String>,
pub enabled: bool,
pub hook_type: HookType,
pub id: String,
pub origin: HookOrigin,
pub project_path: Option<String>,
pub source: Option<String>,
}Expand description
One server-discovered hook action from user, repository, plugin, or managed-policy configuration.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§disable_key: Option<String>Durable content hash used by hook enablement. Identical actions may intentionally share this key. Omitted when changing the user’s disabled-hooks setting cannot change the action’s current server-discovered state, including managed-policy hooks, session-start prompt actions, actions suppressed by disable-all settings, and projectless plugin actions that require project-directory expansion.
enabled: boolWhether this action is enabled under the server-side discovery settings. Concrete sessions may differ because they can add session-specific directories, plugins, or trust. False when its disable key is present in the user’s disabled-hooks setting or disable-all settings suppress the action.
hook_type: HookTypeHook event that invokes this action.
id: StringDeterministic identifier for this server-discovered action row. It remains stable while the project, origin, source, event, action content, and duplicate ordinal are unchanged. This is row identity, not the key persisted in disabledHooks.
origin: HookOriginConfiguration tier that contributed this hook action.
project_path: Option<String>Input project path for which this server-side action was resolved. Set on every row returned for project-scoped discovery, including repeated user and policy actions.
source: Option<String>Human-readable source label, such as a hook file path, settings source, or plugin name.
Trait Implementations§
Source§impl Clone for DiscoveredHook
impl Clone for DiscoveredHook
Source§fn clone(&self) -> DiscoveredHook
fn clone(&self) -> DiscoveredHook
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more