@jonit-dev/night-watch-cli 1.5.3 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonit-dev/night-watch-cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Autonomous PRD execution using AI Provider CLIs + cron",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,6 +24,7 @@ PROVIDER_CMD="${NW_PROVIDER_CMD:-claude}"
24
24
  RUNTIME_MIRROR_DIR=""
25
25
  RUNTIME_PROJECT_DIR=""
26
26
  PRD_DIR=""
27
+ ORIGINAL_PRD_DIR=""
27
28
  ELIGIBLE_PRD=""
28
29
  CLAIMED=0
29
30
 
@@ -60,6 +61,9 @@ cleanup_on_exit() {
60
61
 
61
62
  if [ "${CLAIMED}" = "1" ] && [ -n "${ELIGIBLE_PRD}" ] && [ -n "${PRD_DIR}" ]; then
62
63
  release_claim "${PRD_DIR}" "${ELIGIBLE_PRD}" || true
64
+ if [ -n "${ORIGINAL_PRD_DIR}" ] && [ "${ORIGINAL_PRD_DIR}" != "${PRD_DIR}" ]; then
65
+ release_claim "${ORIGINAL_PRD_DIR}" "${ELIGIBLE_PRD}" || true
66
+ fi
63
67
  fi
64
68
 
65
69
  if [ -n "${RUNTIME_MIRROR_DIR}" ] && [ -n "${RUNTIME_PROJECT_DIR}" ]; then
@@ -91,8 +95,10 @@ fi
91
95
 
92
96
  if [[ "${PRD_DIR_REL}" = /* ]]; then
93
97
  PRD_DIR="${PRD_DIR_REL}"
98
+ ORIGINAL_PRD_DIR="${PRD_DIR_REL}"
94
99
  else
95
100
  PRD_DIR="${RUNTIME_PROJECT_DIR}/${PRD_DIR_REL}"
101
+ ORIGINAL_PRD_DIR="${PROJECT_DIR}/${PRD_DIR_REL}"
96
102
  fi
97
103
 
98
104
  ELIGIBLE_PRD=$(find_eligible_prd "${PRD_DIR}" "${MAX_RUNTIME}" "${PROJECT_DIR}")
@@ -104,6 +110,10 @@ fi
104
110
 
105
111
  # Claim the PRD to prevent other runs from selecting it
106
112
  claim_prd "${PRD_DIR}" "${ELIGIBLE_PRD}"
113
+ # Also mirror claim to original project dir so the status dashboard can see it
114
+ if [ "${ORIGINAL_PRD_DIR}" != "${PRD_DIR}" ]; then
115
+ claim_prd "${ORIGINAL_PRD_DIR}" "${ELIGIBLE_PRD}" || true
116
+ fi
107
117
  CLAIMED=1
108
118
 
109
119
  PRD_NAME="${ELIGIBLE_PRD%.md}"