specweave 1.0.320 → 1.0.322

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": "specweave",
3
- "version": "1.0.320",
3
+ "version": "1.0.322",
4
4
  "description": "Spec-driven development framework for AI coding agents. Works with Claude Code, Codex, Antigravity, Cursor, Copilot & more. 100+ skills, 49 CLI commands, verified skill certification, autonomous execution, and living documentation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -95,6 +95,9 @@ command -v jq >/dev/null 2>&1 || exit 0
95
95
 
96
96
  # Use shared provider detection (supports PROFILES, LEGACY DIRECT, LEGACY PROVIDER formats)
97
97
  HANDLER_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
98
+ # Derive package root from script location (works for both npm install and dev):
99
+ # handlers/ → v2/ → hooks/ → specweave/ → plugins/ → package root (5 levels up)
100
+ PKG_ROOT="$(cd "$HANDLER_DIR/../../../../.." 2>/dev/null && pwd)"
98
101
  SHARED_LIB="$HANDLER_DIR/../lib/check-provider-enabled.sh"
99
102
  if [[ -f "$SHARED_LIB" ]]; then
100
103
  source "$SHARED_LIB"
@@ -134,14 +137,9 @@ log "Creating external items for $INC_ID (github=$GH_ENABLED jira=$JIRA_ENABLED
134
137
  # ============================================================================
135
138
 
136
139
  if [[ "$GH_ENABLED" == "true" ]]; then
137
- # Derive specweave package root from script location (works for both dev and npm)
138
- # Script is at: plugins/specweave/hooks/v2/handlers/ → 5 levels up = package root
139
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
140
- PKG_ROOT="$(cd "$SCRIPT_DIR/../../../../.." 2>/dev/null && pwd)"
141
-
142
140
  GITHUB_HANDLER=""
143
- # 1. Sibling plugin dir (works for both npm and dev: plugins/specweave-github/hooks/)
144
- CANDIDATE="$SCRIPT_DIR/../../../../specweave-github/hooks/github-auto-create-handler.sh"
141
+ # 1. Sibling plugin dir — handlers/../../../../ = plugins/ (works for both npm and dev)
142
+ CANDIDATE="$HANDLER_DIR/../../../../specweave-github/hooks/github-auto-create-handler.sh"
145
143
  [[ -f "$CANDIDATE" ]] && GITHUB_HANDLER="$CANDIDATE"
146
144
  # 2. Fallback: PROJECT_ROOT/plugins/ (dev-only, when running from source repo)
147
145
  if [[ -z "$GITHUB_HANDLER" ]]; then
@@ -153,7 +151,7 @@ if [[ "$GH_ENABLED" == "true" ]]; then
153
151
  CANDIDATE="${PROJECT_ROOT}/node_modules/specweave/plugins/specweave-github/hooks/github-auto-create-handler.sh"
154
152
  [[ -f "$CANDIDATE" ]] && GITHUB_HANDLER="$CANDIDATE"
155
153
  fi
156
- if [[ -n "$GITHUB_HANDLER" && -f "$GITHUB_HANDLER" ]]; then
154
+ if [[ -n "$GITHUB_HANDLER" ]]; then
157
155
  log "Delegating GitHub auto-create to handler at $GITHUB_HANDLER"
158
156
  bash "$GITHUB_HANDLER" "$INC_ID" &
159
157
  GH_PID=$!
@@ -182,8 +180,11 @@ if [[ "$JIRA_ENABLED" == "true" || "$ADO_ENABLED" == "true" ]]; then
182
180
  [[ -f "$CANDIDATE" ]] && CREATE_MODULE="$CANDIDATE"
183
181
  fi
184
182
  # 2. Vendor directory (self-contained plugin)
183
+ # handlers/../../../ = plugins/specweave/ (3 levels up), then lib/vendor/
184
+ # NOTE: vendor path only works for GitHub-only users; JIRA/ADO dynamic imports
185
+ # (jira-client.js, ado-client.js) are NOT vendored and will fail if this path is used.
185
186
  if [[ -z "$CREATE_MODULE" ]]; then
186
- CANDIDATE="$HANDLER_DIR/../../lib/vendor/core/universal-auto-create.js"
187
+ CANDIDATE="$HANDLER_DIR/../../../lib/vendor/core/universal-auto-create.js"
187
188
  [[ -f "$CANDIDATE" ]] && CREATE_MODULE="$(cd "$(dirname "$CANDIDATE")" && pwd)/$(basename "$CANDIDATE")"
188
189
  fi
189
190
  # 3. node_modules/specweave/ (direct npm install)
@@ -254,7 +255,9 @@ fi
254
255
 
255
256
  # Wait for GitHub handler if started
256
257
  if [[ -n "${GH_PID:-}" ]]; then
257
- wait "$GH_PID" 2>/dev/null || true
258
+ wait "$GH_PID" 2>/dev/null
259
+ GH_EXIT=$?
260
+ [[ $GH_EXIT -ne 0 ]] && log "GitHub handler exited with code $GH_EXIT (check github-auto-create.log for details)"
258
261
  fi
259
262
 
260
263
  log "Universal auto-create finished for $INC_ID"