From 4e7c0842f899e6a9b7f04c78b34068008dbffc39 Mon Sep 17 00:00:00 2001 From: jesse Date: Sun, 15 Mar 2026 19:35:18 +0000 Subject: feat: add Cursor-compatible hooks and fix platform detection Add hooks/hooks-cursor.json with Cursor's camelCase format (sessionStart, version: 1) and update .cursor-plugin/plugin.json to reference it. Uses ${CURSOR_PLUGIN_ROOT} and run-hook.cmd for cross-platform support. Fix session-start platform detection: check CURSOR_PLUGIN_ROOT first (Cursor may also set CLAUDE_PLUGIN_ROOT), ensuring correct output format for each platform. Based on PR #709 with fixes for: wrong filename (.sh extension), missing Windows support, fragile relative paths, and incorrect platform detection. Co-Authored-By: Claude Opus 4.6 --- hooks/hooks-cursor.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 hooks/hooks-cursor.json (limited to 'hooks/hooks-cursor.json') diff --git a/hooks/hooks-cursor.json b/hooks/hooks-cursor.json new file mode 100644 index 0000000..70f22ad --- /dev/null +++ b/hooks/hooks-cursor.json @@ -0,0 +1,10 @@ +{ + "version": 1, + "hooks": { + "sessionStart": [ + { + "command": "\"${CURSOR_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start" + } + ] + } +} -- cgit From 2b25774f313ba22c54ed3bbe5f46201efdbf44d4 Mon Sep 17 00:00:00 2001 From: jesse Date: Sun, 15 Mar 2026 19:35:36 +0000 Subject: Update changelog with Cursor hooks support (#709) Co-Authored-By: Claude Opus 4.6 --- hooks/hooks-cursor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hooks/hooks-cursor.json') diff --git a/hooks/hooks-cursor.json b/hooks/hooks-cursor.json index 70f22ad..6df4461 100644 --- a/hooks/hooks-cursor.json +++ b/hooks/hooks-cursor.json @@ -3,7 +3,7 @@ "hooks": { "sessionStart": [ { - "command": "\"${CURSOR_PLUGIN_ROOT}/hooks/run-hook.cmd\" session-start" + "command": "./hooks/session-start" } ] } -- cgit