@claudetools/tools 0.3.3 → 0.3.4

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/dist/setup.js +8 -7
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -527,10 +527,11 @@ PROJECT_ID=""
527
527
  PROJECT_NAME=""
528
528
 
529
529
  if [ -f "$PROJECTS_FILE" ]; then
530
- # Find project by path prefix match
531
- PROJECT_DATA=$(jq -r --arg cwd "$CWD" '
532
- .bindings[]? | select(.local_path != null) |
533
- select($cwd | startswith(.local_path)) |
530
+ # Find project by path prefix match (use variable binding for jq startswith)
531
+ # Use -c for compact output so head -1 gets complete JSON object
532
+ PROJECT_DATA=$(jq -c --arg cwd "$CWD" '
533
+ .bindings[]? | select(.local_path) |
534
+ . as $b | select($cwd | startswith($b.local_path)) |
534
535
  {project_id, project_name}' "$PROJECTS_FILE" 2>/dev/null | head -1)
535
536
 
536
537
  if [ -n "$PROJECT_DATA" ]; then
@@ -626,10 +627,10 @@ CWD=$(pwd)
626
627
  PROJECT_ID=""
627
628
 
628
629
  if [ -f "$PROJECT_FILE" ]; then
629
- # Try to find project by path prefix
630
+ # Try to find project by path prefix (use variable binding for jq startswith)
630
631
  PROJECT_ID=$(jq -r --arg cwd "$CWD" '
631
- .bindings[]? | select(.local_path != null) |
632
- select($cwd | startswith(.local_path)) |
632
+ .bindings[]? | select(.local_path) |
633
+ . as $b | select($cwd | startswith($b.local_path)) |
633
634
  .project_id' "$PROJECT_FILE" 2>/dev/null | head -1)
634
635
  fi
635
636
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claudetools/tools",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Persistent AI memory, task management, and codebase intelligence for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",