Add presentation hint for quiet managed hooks

This commit is contained in:
Abhinav Vedmala
2026-05-13 12:14:03 +00:00
parent 27e67a8c2a
commit c2a65edb6e
37 changed files with 465 additions and 1 deletions
+2
View File
@@ -1550,6 +1550,8 @@ For linked Git worktrees, project hook declarations come from the matching `.cod
Hooks are returned even when disabled so clients can render and re-enable them. User-controlled state lives under `hooks.state`. Managed hooks are non-configurable, and user entries for managed hook keys are ignored during loading.
Hook execution notifications still report every started and completed run. `HookRunSummary.visibilityHint` is a presentation-only hint (`default` or `hidden`) that clients may use to quiet routine managed-hook rendering without suppressing consequential outcomes.
For unmanaged hooks, `currentHash` and `trustStatus` describe whether the current definition is first-seen, approved, or changed since approval. Only trusted unmanaged hooks become runnable. Hook keys combine the source identity with a trailing event/group/handler selector that is currently positional.
```json
@@ -500,6 +500,7 @@ fn map_hook_handler_to_api(handler: CoreHookHandlerConfig) -> ConfiguredHookHand
timeout_sec,
r#async,
status_message,
..
} => ConfiguredHookHandler::Command {
command,
command_windows,
@@ -57,6 +57,7 @@ fn command_hook_hash(
timeout_sec: Some(timeout_sec),
r#async: false,
status_message: status_message.map(ToOwned::to_owned),
visibility_hint: Default::default(),
}],
},
};