mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
8f5efee837
Add three new extension events that allow extensions to gate destructive session operations and compaction: - OnBeforeFork: fires before branching in the tree selector; handler can cancel with reason (e.g. dirty-repo guard) - OnBeforeSessionSwitch: fires before /new resets the session branch; handler can cancel with reason - OnBeforeCompact: fires before context compaction (auto or manual); handler receives token stats and IsAutomatic flag, can cancel Includes SDK hook registry (beforeCompact), extension bridge, UI callbacks threaded through AppModelOptions, and two example extensions: - confirm-destructive.go: git dirty check + fork confirmation - compact-notify.go: compaction notification + auto-compact gating