@codyswann/lisa 2.124.5 → 2.124.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  3. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  4. package/plugins/lisa-agy/plugin.json +1 -1
  5. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  6. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  7. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  8. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  9. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  12. package/plugins/lisa-cursor/hooks/hooks.json +3 -3
  13. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  14. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  15. package/plugins/lisa-expo-agy/plugin.json +1 -1
  16. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  19. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  20. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  21. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  26. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs-cursor/hooks/hooks.json +1 -1
  29. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  32. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-rails-agy/plugin.json +1 -1
  37. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-rails-cursor/hooks/hooks.json +2 -2
  40. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  43. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-typescript-cursor/hooks/hooks.json +4 -4
  46. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  49. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  51. package/scripts/generate-cursor-plugin-artifacts.mjs +4 -2
  52. package/scripts/lib/per-agent-hook-filter.mjs +22 -17
package/package.json CHANGED
@@ -83,7 +83,7 @@
83
83
  "lodash": ">=4.18.1"
84
84
  },
85
85
  "name": "@codyswann/lisa",
86
- "version": "2.124.5",
86
+ "version": "2.124.6",
87
87
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
88
88
  "main": "dist/index.js",
89
89
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -3,17 +3,17 @@
3
3
  "hooks": {
4
4
  "preToolUse": [
5
5
  {
6
- "command": "./hooks/block-no-verify.sh",
6
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-no-verify.sh",
7
7
  "matcher": "Bash"
8
8
  }
9
9
  ],
10
10
  "sessionStart": [
11
11
  {
12
- "command": "./hooks/install-pkgs.sh",
12
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/install-pkgs.sh",
13
13
  "matcher": "startup"
14
14
  },
15
15
  {
16
- "command": "./hooks/setup-jira-cli.sh"
16
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/setup-jira-cli.sh"
17
17
  }
18
18
  ]
19
19
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -3,7 +3,7 @@
3
3
  "hooks": {
4
4
  "preToolUse": [
5
5
  {
6
- "command": "./hooks/block-migration-edits.sh",
6
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-migration-edits.sh",
7
7
  "matcher": "Write|Edit"
8
8
  }
9
9
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -3,11 +3,11 @@
3
3
  "hooks": {
4
4
  "postToolUse": [
5
5
  {
6
- "command": "./hooks/rubocop-on-edit.sh",
6
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/rubocop-on-edit.sh",
7
7
  "matcher": "Write|Edit"
8
8
  },
9
9
  {
10
- "command": "./hooks/sg-scan-on-edit.sh",
10
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/sg-scan-on-edit.sh",
11
11
  "matcher": "Write|Edit"
12
12
  }
13
13
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -3,21 +3,21 @@
3
3
  "hooks": {
4
4
  "preToolUse": [
5
5
  {
6
- "command": "./hooks/block-suppress-directives.sh",
6
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/block-suppress-directives.sh",
7
7
  "matcher": "Write|Edit"
8
8
  }
9
9
  ],
10
10
  "postToolUse": [
11
11
  {
12
- "command": "./hooks/format-on-edit.sh",
12
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/format-on-edit.sh",
13
13
  "matcher": "Write|Edit"
14
14
  },
15
15
  {
16
- "command": "./hooks/sg-scan-on-edit.sh",
16
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/sg-scan-on-edit.sh",
17
17
  "matcher": "Write|Edit"
18
18
  },
19
19
  {
20
- "command": "./hooks/lint-on-edit.sh",
20
+ "command": "${CURSOR_PLUGIN_ROOT}/hooks/lint-on-edit.sh",
21
21
  "matcher": "Write|Edit"
22
22
  }
23
23
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.124.5",
3
+ "version": "2.124.6",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -21,8 +21,10 @@
21
21
  * `-reference` suffix avoids a same-path collision: eager and reference share
22
22
  * all base names.
23
23
  * - Hooks: emitted as a Cursor-native `hooks/hooks.json` (flattened schema,
24
- * camelCase event names, relative `./hooks/` command paths) NOT inline in
25
- * the manifest. `inject-rules.sh` is dropped because rules now ship as native
24
+ * camelCase event names, `${CURSOR_PLUGIN_ROOT}/hooks/` command paths —
25
+ * plugin hooks run with the project root as cwd, so the plugin-root token is
26
+ * required, not a bare `./`) — NOT inline in the manifest. `inject-rules.sh`
27
+ * is dropped because rules now ship as native
26
28
  * `.mdc` (the single delivery path; injecting would double-deliver);
27
29
  * `enforce-team-first.sh` (Claude-team-specific) and the
28
30
  * `entire hooks claude-code *` analytics calls (Claude-only) are dropped too.
@@ -14,8 +14,8 @@
14
14
  * ship list — this module is not invoked for Codex; Codex uses the existing
15
15
  * generate-codex-plugin-artifacts.mjs path)
16
16
  * - Cursor: emit hooks to a Cursor-native hooks/hooks.json (camelCase events,
17
- * flattened {command, matcher} entries, relative ./hooks/ command paths) via
18
- * buildCursorHooksJson; strip inject-rules.sh (rules ship as native
17
+ * flattened {command, matcher} entries, ${CURSOR_PLUGIN_ROOT}/hooks/ command
18
+ * paths) via buildCursorHooksJson; strip inject-rules.sh (rules ship as native
19
19
  * rules/*.mdc — the single delivery path; injecting would double-deliver),
20
20
  * Claude-team-specific scripts, and `entire hooks claude-code *` calls
21
21
  * - agy: this filter is NOT consumed for agy. agy hooks ship as a
@@ -114,27 +114,30 @@ const scriptNameFromCommand = cmd => {
114
114
  };
115
115
 
116
116
  /**
117
- * Rewrite a Claude hook command to the Cursor plugin-relative form: the
118
- * `${CLAUDE_PLUGIN_ROOT}/` prefix becomes `./` (e.g.
119
- * `${CLAUDE_PLUGIN_ROOT}/hooks/block-no-verify.sh` → `./hooks/block-no-verify.sh`).
117
+ * Rewrite a Claude hook command to the Cursor plugin-root form: the
118
+ * `${CLAUDE_PLUGIN_ROOT}/` (or `${CURSOR_PLUGIN_ROOT}/`) prefix is normalized to
119
+ * `${CURSOR_PLUGIN_ROOT}/` (e.g. `${CLAUDE_PLUGIN_ROOT}/hooks/block-no-verify.sh`
120
+ * → `${CURSOR_PLUGIN_ROOT}/hooks/block-no-verify.sh`).
120
121
  *
121
- * Path-resolution caveat (issue #1055 security review): Cursor exposes NO
122
- * plugin-root token for hook commands its hooks reference documents only
123
- * `CURSOR_PROJECT_DIR` / `CLAUDE_PROJECT_DIR` (workspace root), and is silent on
124
- * how plugin-bundled `hooks/hooks.json` commands resolve. `./` is therefore the
125
- * only plugin-relative form available, and is what the Cursor plugin structure
126
- * implies for a plugin-bundled file. Plugin-hook FIRING (and thus the exact CWD
127
- * these resolve against) is not verifiable via `cursor-agent --plugin-dir` — it
128
- * is an IDE/marketplace concern tracked as a PR follow-up. If a future Cursor
129
- * release resolves plugin-hook `./` against the project root rather than the
130
- * plugin root, a malicious repo could shadow a guard hook; revisit this then.
122
+ * Why the token, not a bare `./` (issue #1055, CodeRabbit security review):
123
+ * Cursor plugin hook commands execute with the OPENED PROJECT ROOT as their cwd
124
+ * NOT the plugin directory (confirmed by a Cursor maintainer on the forum:
125
+ * https://forum.cursor.com/t/inconsistent-working-directory-for-plugin-hook-commands/153236).
126
+ * A bare `./hooks/<script>.sh` would therefore (a) fail to resolve to the
127
+ * plugin's bundled script and (b) let a malicious repo shadow a guard hook with
128
+ * its own project-root `./hooks/*`. `${CURSOR_PLUGIN_ROOT}` is the maintainer-
129
+ * endorsed placeholder for the plugin install dir (`${CLAUDE_PLUGIN_ROOT}` also
130
+ * works in Cursor, but we normalize to the Cursor-native name).
131
131
  *
132
132
  * @param {string} command
133
133
  * @returns {string}
134
134
  */
135
135
  const toCursorCommandPath = command =>
136
136
  typeof command === "string"
137
- ? command.replace(/\$\{CLAUDE_PLUGIN_ROOT\}\//g, "./")
137
+ ? command.replace(
138
+ /\$\{(?:CLAUDE|CURSOR)_PLUGIN_ROOT\}\//g,
139
+ "${CURSOR_PLUGIN_ROOT}/"
140
+ )
138
141
  : command;
139
142
 
140
143
  /** Claude PascalCase → Copilot event-name map (per Copilot's docs). */
@@ -327,7 +330,9 @@ export function filterScriptsForAgent(scriptFilenames, agent) {
327
330
  * 3. Flattens each matcher-group into one `{ command, matcher? }` per surviving
328
331
  * handler (unwrapping Claude's `{ type: "command", command }`).
329
332
  * 4. Rewrites `${CLAUDE_PLUGIN_ROOT}/hooks/<x>` command paths to the
330
- * Cursor-relative `./hooks/<x>`.
333
+ * Cursor plugin-root form `${CURSOR_PLUGIN_ROOT}/hooks/<x>` (plugin hooks
334
+ * run with the project root as cwd, so a bare `./` would not resolve to the
335
+ * bundled script and could be shadowed by a repo-local `./hooks/*`).
331
336
  *
332
337
  * Note: this intentionally re-walks the hook block rather than sharing a
333
338
  * skeleton with `filterHooksForAgent`. The DRY extraction was deferred (issue