feat(runtime): expose matched approval rule metadata

Harvests the explainability slice from PR #2971 without changing the public HookEvent constructor shape. Runtime API approval.required frames now carry matched_rule metadata when an execpolicy rule caused the prompt.

Co-authored-by: greyfreedom <11493871+greyfreedom@users.noreply.github.com>
This commit is contained in:
Hunter B
2026-06-12 01:46:41 -07:00
parent c16a32150e
commit 10e41b1153
6 changed files with 49 additions and 0 deletions
+4
View File
@@ -28,6 +28,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
metadata now lives in `commands/registry.rs`, slash parsing in
`commands/parse.rs`, and handlers under group-owned command areas, preserving
the existing dispatch surface while reducing future `commands/mod.rs` churn.
- **Approval-rule source metadata (#1186/#2971).** Runtime API
`approval.required` events now include optional `matched_rule` metadata when
an execution-policy rule caused the prompt. Thanks @greyfreedom for the PR
and @Ram9199 for the audit-semantics discussion.
### Fixed