agentxchain 2.23.0 → 2.24.1
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,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Release postflight — run this after publish succeeds.
|
|
3
3
|
# Verifies: release tag exists, npm registry serves the version, metadata is present,
|
|
4
|
-
# the published package
|
|
5
|
-
# are importable in a
|
|
4
|
+
# the published package resolves through npx, the published package can execute its
|
|
5
|
+
# CLI entrypoint from the tarball, and runner package exports are importable in a
|
|
6
|
+
# clean consumer project.
|
|
6
7
|
# Usage: bash scripts/release-postflight.sh --target-version <semver> [--tag vX.Y.Z]
|
|
7
8
|
set -uo pipefail
|
|
8
9
|
|
|
@@ -139,6 +140,33 @@ run_install_smoke() {
|
|
|
139
140
|
return "$version_status"
|
|
140
141
|
}
|
|
141
142
|
|
|
143
|
+
run_npx_smoke() {
|
|
144
|
+
local smoke_root
|
|
145
|
+
local smoke_npmrc
|
|
146
|
+
local npx_output
|
|
147
|
+
local npx_status
|
|
148
|
+
|
|
149
|
+
smoke_root="$(mktemp -d "${TMPDIR:-/tmp}/agentxchain-npx-postflight.XXXXXX")"
|
|
150
|
+
mkdir -p "${smoke_root}/home" "${smoke_root}/cache" "${smoke_root}/npm-cache"
|
|
151
|
+
|
|
152
|
+
smoke_npmrc="${smoke_root}/.npmrc"
|
|
153
|
+
echo "registry=https://registry.npmjs.org/" > "$smoke_npmrc"
|
|
154
|
+
|
|
155
|
+
npx_output="$(
|
|
156
|
+
env -u NODE_AUTH_TOKEN \
|
|
157
|
+
HOME="${smoke_root}/home" \
|
|
158
|
+
XDG_CACHE_HOME="${smoke_root}/cache" \
|
|
159
|
+
NPM_CONFIG_CACHE="${smoke_root}/npm-cache" \
|
|
160
|
+
NPM_CONFIG_USERCONFIG="$smoke_npmrc" \
|
|
161
|
+
npx --yes "${PACKAGE_NAME}@${TARGET_VERSION}" --version 2>&1
|
|
162
|
+
)"
|
|
163
|
+
npx_status=$?
|
|
164
|
+
|
|
165
|
+
printf '%s\n' "$npx_output"
|
|
166
|
+
rm -rf "$smoke_root"
|
|
167
|
+
return "$npx_status"
|
|
168
|
+
}
|
|
169
|
+
|
|
142
170
|
run_runner_export_smoke() {
|
|
143
171
|
if [[ -z "$TARBALL_URL" ]]; then
|
|
144
172
|
echo "registry tarball metadata unavailable for runner export smoke" >&2
|
|
@@ -261,17 +289,17 @@ run_with_retry() {
|
|
|
261
289
|
|
|
262
290
|
echo "AgentXchain v${TARGET_VERSION} Release Postflight"
|
|
263
291
|
echo "====================================="
|
|
264
|
-
echo "Checks release truth after publish: tag, registry visibility, metadata, CLI install smoke, and package export smoke."
|
|
292
|
+
echo "Checks release truth after publish: tag, registry visibility, metadata, npx smoke, CLI install smoke, and package export smoke."
|
|
265
293
|
echo ""
|
|
266
294
|
|
|
267
|
-
echo "[1/
|
|
295
|
+
echo "[1/7] Git tag"
|
|
268
296
|
if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null 2>&1; then
|
|
269
297
|
pass "Git tag ${TAG} exists locally"
|
|
270
298
|
else
|
|
271
299
|
fail "Git tag ${TAG} is missing locally"
|
|
272
300
|
fi
|
|
273
301
|
|
|
274
|
-
echo "[2/
|
|
302
|
+
echo "[2/7] Registry version"
|
|
275
303
|
if run_with_retry VERSION_OUTPUT "registry version" equals "${TARGET_VERSION}" npm view "${PACKAGE_NAME}@${TARGET_VERSION}" version; then
|
|
276
304
|
PUBLISHED_VERSION="$(trim_last_line "$VERSION_OUTPUT")"
|
|
277
305
|
if [[ "$PUBLISHED_VERSION" == "$TARGET_VERSION" ]]; then
|
|
@@ -284,7 +312,7 @@ else
|
|
|
284
312
|
printf '%s\n' "$VERSION_OUTPUT" | tail -20
|
|
285
313
|
fi
|
|
286
314
|
|
|
287
|
-
echo "[3/
|
|
315
|
+
echo "[3/7] Registry tarball metadata"
|
|
288
316
|
if run_with_retry TARBALL_OUTPUT "registry tarball metadata" nonempty "" npm view "${PACKAGE_NAME}@${TARGET_VERSION}" dist.tarball; then
|
|
289
317
|
TARBALL_URL="$(trim_last_line "$TARBALL_OUTPUT")"
|
|
290
318
|
if [[ -n "$TARBALL_URL" ]]; then
|
|
@@ -297,7 +325,7 @@ else
|
|
|
297
325
|
printf '%s\n' "$TARBALL_OUTPUT" | tail -20
|
|
298
326
|
fi
|
|
299
327
|
|
|
300
|
-
echo "[4/
|
|
328
|
+
echo "[4/7] Registry checksum metadata"
|
|
301
329
|
if run_with_retry INTEGRITY_OUTPUT "registry checksum metadata" nonempty "" npm view "${PACKAGE_NAME}@${TARGET_VERSION}" dist.integrity; then
|
|
302
330
|
REGISTRY_CHECKSUM="$(trim_last_line "$INTEGRITY_OUTPUT")"
|
|
303
331
|
fi
|
|
@@ -312,7 +340,20 @@ else
|
|
|
312
340
|
fail "registry did not return checksum metadata"
|
|
313
341
|
fi
|
|
314
342
|
|
|
315
|
-
echo "[5/
|
|
343
|
+
echo "[5/7] npx smoke"
|
|
344
|
+
if run_with_retry NPX_OUTPUT "npx smoke" nonempty "" run_npx_smoke; then
|
|
345
|
+
NPX_VERSION="$(trim_last_line "$NPX_OUTPUT")"
|
|
346
|
+
if [[ "$NPX_VERSION" == "$TARGET_VERSION" ]]; then
|
|
347
|
+
pass "published npx command resolves and reports ${TARGET_VERSION}"
|
|
348
|
+
else
|
|
349
|
+
fail "published npx command reported '${NPX_VERSION}', expected '${TARGET_VERSION}'"
|
|
350
|
+
fi
|
|
351
|
+
else
|
|
352
|
+
fail "published npx smoke failed"
|
|
353
|
+
printf '%s\n' "$NPX_OUTPUT" | tail -20
|
|
354
|
+
fi
|
|
355
|
+
|
|
356
|
+
echo "[6/7] Install smoke"
|
|
316
357
|
if run_with_retry EXEC_OUTPUT "install smoke" nonempty "" run_install_smoke; then
|
|
317
358
|
EXEC_VERSION="$(trim_last_line "$EXEC_OUTPUT")"
|
|
318
359
|
if [[ "$EXEC_VERSION" == "$TARGET_VERSION" ]]; then
|
|
@@ -325,7 +366,7 @@ else
|
|
|
325
366
|
printf '%s\n' "$EXEC_OUTPUT" | tail -20
|
|
326
367
|
fi
|
|
327
368
|
|
|
328
|
-
echo "[
|
|
369
|
+
echo "[7/7] Package export smoke"
|
|
329
370
|
if run_with_retry RUNNER_EXPORT_OUTPUT "runner export smoke" nonempty "" run_runner_export_smoke; then
|
|
330
371
|
RUNNER_EXPORT_JSON="$(trim_last_line "$RUNNER_EXPORT_OUTPUT")"
|
|
331
372
|
RUNNER_EXPORT_VERSION="$(printf '%s' "$RUNNER_EXPORT_JSON" | node --input-type=module -e "process.stdin.setEncoding('utf8'); let raw=''; process.stdin.on('data', (chunk) => raw += chunk); process.stdin.on('end', () => { const parsed = JSON.parse(raw); console.log(parsed.runner_interface_version || ''); });")"
|