cc-workspace 4.1.1 → 4.1.2

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 (2) hide show
  1. package/bin/cli.js +3 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -199,7 +199,9 @@ function installGlobals(force) {
199
199
  // Claude Code hook format: { matcher: { tools: [...] }, hooks: [{ type: "command", command: "...", timeout: N }] }
200
200
  // For hooks without tool matcher: { hooks: [{ type: "command", command: "...", timeout: N }] }
201
201
  function generateSettings(orchDir) {
202
- const hp = ".claude/hooks";
202
+ // Use $CLAUDE_PROJECT_DIR so hooks resolve correctly even when
203
+ // subagents run from a different CWD (e.g. worktree in sibling repo)
204
+ const hp = '${CLAUDE_PROJECT_DIR:-.}/.claude/hooks';
203
205
 
204
206
  function hook(command, timeout) {
205
207
  return { type: "command", command: `bash ${hp}/${command}`, timeout };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-workspace",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "Claude Code multi-workspace orchestrator — skills, hooks, agents, and templates for multi-service projects",
5
5
  "bin": {
6
6
  "cc-workspace": "./bin/cli.js"