@jonit-dev/night-watch-cli 1.8.8-beta.1 → 1.8.8-beta.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.
@@ -589,6 +589,11 @@ cleanup_worktrees() {
589
589
  local project_name
590
590
  project_name=$(basename "${project_dir}")
591
591
 
592
+ # Clear stale worktree registrations first. This fixes cases where a
593
+ # worktree directory was deleted out-of-band (for example by an agent
594
+ # runtime crash), leaving Git thinking the branch is still in use.
595
+ git -C "${project_dir}" worktree prune >/dev/null 2>&1 || true
596
+
592
597
  local match_token="${project_name}-nw"
593
598
  if [ -n "${scope}" ]; then
594
599
  match_token="${scope}"
@@ -602,6 +607,10 @@ cleanup_worktrees() {
602
607
  log "CLEANUP: Removing leftover worktree ${wt}"
603
608
  git -C "${project_dir}" worktree remove --force "${wt}" 2>/dev/null || true
604
609
  done || true
610
+
611
+ # Prune again after removals so Git drops any admin entries left behind by
612
+ # force-removal or previously broken worktrees outside Night Watch naming.
613
+ git -C "${project_dir}" worktree prune >/dev/null 2>&1 || true
605
614
  }
606
615
 
607
616
  # Pick the best available ref for creating a new detached worktree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonit-dev/night-watch-cli",
3
- "version": "1.8.8-beta.1",
3
+ "version": "1.8.8-beta.2",
4
4
  "description": "AI agent that implements your specs, opens PRs, and reviews code overnight. Queue GitHub issues or PRDs, wake up to pull requests.",
5
5
  "type": "module",
6
6
  "bin": {