From e608a75159fc5cca70485d83ffb8ee681c9da385 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 24 Jul 2026 02:49:33 +0300 Subject: fix: make known-agent exit process-owned refs #1792 refs #1648 --- src/integration/assets/mastracode/herdr-agent-state.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/integration/assets/mastracode') diff --git a/src/integration/assets/mastracode/herdr-agent-state.sh b/src/integration/assets/mastracode/herdr-agent-state.sh index b8e0a26a..39a8461b 100644 --- a/src/integration/assets/mastracode/herdr-agent-state.sh +++ b/src/integration/assets/mastracode/herdr-agent-state.sh @@ -3,7 +3,7 @@ # managed by herdr; reinstalling or updating the integration overwrites this file. # add custom hooks beside this file instead of editing it. # HERDR_INTEGRATION_ID=mastracode -# HERDR_INTEGRATION_VERSION=1 +# HERDR_INTEGRATION_VERSION=2 set -eu @@ -13,7 +13,7 @@ trap 'rm -f "$hook_input_file"' EXIT HUP INT TERM cat >"$hook_input_file" 2>/dev/null || true case "$action" in - working|idle|blocked|release) ;; + session|working|idle|blocked) ;; *) exit 0 ;; esac @@ -55,14 +55,18 @@ if isinstance(session_id, str) and session_id: agent_session_id = session_id else: agent_session_id = None -if action == "release": +if action == "session": + if not agent_session_id: + raise SystemExit(0) request = { "id": request_id, - "method": "pane.release_agent", + "method": "pane.report_agent_session", "params": { "pane_id": pane_id, "source": source, "agent": "mastracode", + "agent_session_id": agent_session_id, + "session_start_source": "startup", "seq": report_seq, }, } -- cgit v1.2.3