agentxchain 2.50.0 → 2.51.0

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": "agentxchain",
3
- "version": "2.50.0",
3
+ "version": "2.51.0",
4
4
  "description": "CLI for AgentXchain — governed multi-agent software delivery",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
  # Release identity creation — replaces raw `npm version <semver>`.
3
3
  # Creates version bump commit + annotated tag with fail-closed verification.
4
- # Usage: bash scripts/release-bump.sh --target-version <semver>
4
+ # Usage: bash scripts/release-bump.sh --target-version <semver> [--skip-preflight]
5
5
  set -euo pipefail
6
6
 
7
7
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@@ -10,9 +10,10 @@ REPO_ROOT="$(cd "${CLI_DIR}/.." && pwd)"
10
10
  cd "$CLI_DIR"
11
11
 
12
12
  TARGET_VERSION=""
13
+ SKIP_PREFLIGHT=0
13
14
 
14
15
  usage() {
15
- echo "Usage: bash scripts/release-bump.sh --target-version <semver>" >&2
16
+ echo "Usage: bash scripts/release-bump.sh --target-version <semver> [--skip-preflight]" >&2
16
17
  }
17
18
 
18
19
  while [[ $# -gt 0 ]]; do
@@ -31,6 +32,10 @@ while [[ $# -gt 0 ]]; do
31
32
  TARGET_VERSION="$2"
32
33
  shift 2
33
34
  ;;
35
+ --skip-preflight)
36
+ SKIP_PREFLIGHT=1
37
+ shift
38
+ ;;
34
39
  *)
35
40
  usage
36
41
  exit 1
@@ -250,8 +255,67 @@ if [[ "$COMMIT_MSG" != "$TARGET_VERSION" ]]; then
250
255
  fi
251
256
  echo " OK: commit ${RELEASE_SHA:0:7} with message '${TARGET_VERSION}'"
252
257
 
258
+ # 8.5. Inline preflight gate — tests, pack, and docs build must pass before tag
259
+ if [[ "$SKIP_PREFLIGHT" -eq 1 ]]; then
260
+ echo ""
261
+ echo "[8.5/10] Inline preflight gate SKIPPED (--skip-preflight)"
262
+ else
263
+ echo ""
264
+ echo "[8.5/10] Running inline preflight gate..."
265
+ echo " Running test suite..."
266
+
267
+ # Install MCP example deps if needed (same as release-preflight.sh)
268
+ for example_dir in "${CLI_DIR}/../examples/mcp-echo-agent" "${CLI_DIR}/../examples/mcp-http-echo-agent"; do
269
+ if [[ -f "${example_dir}/package.json" && ! -d "${example_dir}/node_modules" ]]; then
270
+ echo " Installing deps for $(basename "$example_dir")..."
271
+ (cd "$example_dir" && env -u NODE_AUTH_TOKEN -u NPM_CONFIG_USERCONFIG npm install --ignore-scripts --userconfig /dev/null 2>&1) || true
272
+ fi
273
+ done
274
+
275
+ PREFLIGHT_FAILED=0
276
+
277
+ # 8.5a. Full test suite with release env vars
278
+ if env AGENTXCHAIN_RELEASE_TARGET_VERSION="${TARGET_VERSION}" AGENTXCHAIN_RELEASE_PREFLIGHT=1 npm test >/dev/null 2>&1; then
279
+ echo " OK: test suite passed"
280
+ else
281
+ echo " FAIL: test suite failed" >&2
282
+ echo " Re-running with output for diagnostics..." >&2
283
+ env AGENTXCHAIN_RELEASE_TARGET_VERSION="${TARGET_VERSION}" AGENTXCHAIN_RELEASE_PREFLIGHT=1 npm test 2>&1 | tail -30 >&2
284
+ PREFLIGHT_FAILED=1
285
+ fi
286
+
287
+ # 8.5b. npm pack dry-run
288
+ if npm pack --dry-run >/dev/null 2>&1; then
289
+ echo " OK: npm pack --dry-run passed"
290
+ else
291
+ echo " FAIL: npm pack --dry-run failed" >&2
292
+ PREFLIGHT_FAILED=1
293
+ fi
294
+
295
+ # 8.5c. Docs build
296
+ if (cd "${REPO_ROOT}/website-v2" && npm run build >/dev/null 2>&1); then
297
+ echo " OK: docs build passed"
298
+ else
299
+ echo " FAIL: docs build failed" >&2
300
+ PREFLIGHT_FAILED=1
301
+ fi
302
+
303
+ if [[ "$PREFLIGHT_FAILED" -eq 1 ]]; then
304
+ echo "" >&2
305
+ echo "PREFLIGHT FAILED — release commit created but NOT tagged." >&2
306
+ echo " Commit: ${RELEASE_SHA:0:7}" >&2
307
+ echo " Fix the failures, amend the commit, and re-run:" >&2
308
+ echo " bash scripts/release-bump.sh --target-version ${TARGET_VERSION}" >&2
309
+ echo " Or skip preflight if already verified:" >&2
310
+ echo " bash scripts/release-bump.sh --target-version ${TARGET_VERSION} --skip-preflight" >&2
311
+ exit 1
312
+ fi
313
+
314
+ echo " Inline preflight gate passed — proceeding to tag"
315
+ fi
316
+
253
317
  # 9. Create annotated tag
254
- echo "[9/9] Creating annotated tag..."
318
+ echo "[9/10] Creating annotated tag..."
255
319
  git tag -a "v${TARGET_VERSION}" -m "v${TARGET_VERSION}"
256
320
  TAG_SHA=$(git rev-parse "v${TARGET_VERSION}")
257
321
  if [[ -z "$TAG_SHA" ]]; then
@@ -276,6 +340,10 @@ echo "Release identity created successfully."
276
340
  echo " Version: ${TARGET_VERSION}"
277
341
  echo " Commit: ${RELEASE_SHA:0:7}"
278
342
  echo " Tag: v${TARGET_VERSION}"
343
+ if [[ "$SKIP_PREFLIGHT" -eq 1 ]]; then
344
+ echo ""
345
+ echo "WARNING: Inline preflight was skipped. Verify before pushing:"
346
+ echo " npm run preflight:release:strict -- --target-version ${TARGET_VERSION}"
347
+ fi
279
348
  echo ""
280
- echo "Next: npm run preflight:release:strict -- --target-version ${TARGET_VERSION}"
281
- echo "Then: git push origin main --follow-tags"
349
+ echo "Next: git push origin main --follow-tags"