@hanzlaa/rcode 4.12.0 → 4.12.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "4.12.0",
3
+ "version": "4.12.1",
4
4
  "description": "rcode — the AI team that never forgets. Persistent memory, specialist agents, and slash commands for AI IDEs. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up. prompt-router (UserPromptSubmit) is advisory emits additionalContext to nudge toward the right rcode command; never blocks. session-start (SessionStart) emits a one-line project status primer at session open.",
2
+ "_comment": "pre-edit hook is currently advisory (logs warning, does not block). Full session-read tracking requires PostToolUse Read hook to write state file. Implemented in follow-up. prompt-router (UserPromptSubmit) is advisory \u2014 emits additionalContext to nudge toward the right rcode command; never blocks. session-start (SessionStart) emits a one-line project status primer at session open.",
3
3
  "hooks": {
4
4
  "PreToolUse": [
5
5
  {
@@ -7,11 +7,11 @@
7
7
  "hooks": [
8
8
  {
9
9
  "type": "command",
10
- "command": "node .rcode/bin/rcode-hooks.cjs pre-edit"
10
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" pre-edit || exit 0'"
11
11
  },
12
12
  {
13
13
  "type": "command",
14
- "command": "node .rcode/bin/rcode-hooks.cjs compact-nudge"
14
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" compact-nudge || exit 0'"
15
15
  }
16
16
  ]
17
17
  },
@@ -20,7 +20,7 @@
20
20
  "hooks": [
21
21
  {
22
22
  "type": "command",
23
- "command": "node .rcode/bin/rcode-hooks.cjs pre-workflow"
23
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" pre-workflow || exit 0'"
24
24
  }
25
25
  ]
26
26
  },
@@ -29,7 +29,7 @@
29
29
  "hooks": [
30
30
  {
31
31
  "type": "command",
32
- "command": "node .rcode/bin/rcode-hooks.cjs bash-guard"
32
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" bash-guard || exit 0'"
33
33
  }
34
34
  ]
35
35
  }
@@ -40,7 +40,7 @@
40
40
  "hooks": [
41
41
  {
42
42
  "type": "command",
43
- "command": "node .rcode/bin/rcode-hooks.cjs post-commit"
43
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" post-commit || exit 0'"
44
44
  }
45
45
  ]
46
46
  }
@@ -51,7 +51,7 @@
51
51
  "hooks": [
52
52
  {
53
53
  "type": "command",
54
- "command": "node .rcode/bin/rcode-hooks.cjs pre-compact"
54
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" pre-compact || exit 0'"
55
55
  }
56
56
  ]
57
57
  }
@@ -62,15 +62,15 @@
62
62
  "hooks": [
63
63
  {
64
64
  "type": "command",
65
- "command": "node .rcode/bin/rcode-hooks.cjs stop-verify"
65
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" stop-verify || exit 0'"
66
66
  },
67
67
  {
68
68
  "type": "command",
69
- "command": "node .rcode/bin/rcode-hooks.cjs cost-track"
69
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" cost-track || exit 0'"
70
70
  },
71
71
  {
72
72
  "type": "command",
73
- "command": "node .rcode/bin/rcode-hooks.cjs stop"
73
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" stop || exit 0'"
74
74
  }
75
75
  ]
76
76
  }
@@ -81,7 +81,7 @@
81
81
  "hooks": [
82
82
  {
83
83
  "type": "command",
84
- "command": "node .rcode/bin/rcode-hooks.cjs prompt-router"
84
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" prompt-router || exit 0'"
85
85
  }
86
86
  ]
87
87
  }
@@ -92,7 +92,7 @@
92
92
  "hooks": [
93
93
  {
94
94
  "type": "command",
95
- "command": "node .rcode/bin/rcode-hooks.cjs session-start"
95
+ "command": "sh -c 'H=\".rcode/bin/rcode-hooks.cjs\"; [ -f \"$H\" ] || { G=$(git rev-parse --git-common-dir 2>/dev/null) && H=\"$(cd \"$(dirname \"$G\")\" 2>/dev/null && pwd)/.rcode/bin/rcode-hooks.cjs\"; }; [ -f \"$H\" ] && exec node \"$H\" session-start || exit 0'"
96
96
  }
97
97
  ]
98
98
  }
@@ -90,6 +90,12 @@ Enabled guardrails:
90
90
  • session-start: Greets the session with one-line phase status and suggested next command
91
91
 
92
92
  To disable, remove the hooks section from .claude/settings.json or edit .rcode/templates/settings-hooks.json and re-run.
93
+
94
+ Note: .rcode/bin/ is gitignored by design, so a `git worktree add` checkout
95
+ won't have it — each hook command resolves this automatically via
96
+ `git rev-parse --git-common-dir` (finds the main checkout's .rcode/bin/ and
97
+ runs from there), falling back to a silent no-op if genuinely not found
98
+ anywhere. No action needed in worktrees; this is handled for you.
93
99
  ```
94
100
 
95
101
  ## Success Criteria