From ca4270b31fe93c180f7321cb4006cb5e7307d889 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 1 Apr 2026 19:30:58 +0300 Subject: feat: add authoritative pi hook integration --- src/events.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/events.rs') diff --git a/src/events.rs b/src/events.rs index 58b16863..c1c45a0e 100644 --- a/src/events.rs +++ b/src/events.rs @@ -11,12 +11,31 @@ use crate::layout::PaneId; pub enum AppEvent { /// A pane's child process exited. PaneDied { pane_id: PaneId }, - /// Agent state changed in a pane (detected by the PTY reader). + /// Fallback detector state changed in a pane. StateChanged { pane_id: PaneId, agent: Option, state: AgentState, }, + /// Hook-authoritative agent state was reported for a pane. + HookStateReported { + pane_id: PaneId, + source: String, + agent: Agent, + state: AgentState, + message: Option, + }, + /// Hook authority was explicitly cleared for a pane. + HookAuthorityCleared { + pane_id: PaneId, + source: Option, + }, + /// The current detected agent gracefully released this pane back to the shell. + HookAgentReleased { + pane_id: PaneId, + source: String, + agent: Agent, + }, /// A new version was downloaded and installed. Restart to use it. UpdateReady { version: String }, } -- cgit v1.2.3