From fdbd6b152f5a12166c7f0c15f141835467b83bd6 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Wed, 24 Jun 2026 01:59:29 +0200 Subject: [PATCH] build: track Pi @latest, record resolved version in build-manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image shipped a hard pin (@earendil-works/pi-coding-agent@0.78.0) while 'pi upgrade' on hosts had moved to 0.80.2, so builds lagged. Switch Pi to the @latest dist-tag so every image bundles the newest Pi. To keep the floating spec traceable, record the version that actually got fetched in build-manifest.json as pi_version, derived from the bundled tarball name (earendil-works-pi-coding-agent-.tgz) after fetch+install. fetch-npm-globals.sh now also echoes the resolved tarball so the build log shows the version a dist-tag resolved to. Other globals (bw) stay pinned. Image is node24, compatible with current Pi (the legacy-node20 dist-tag is for node20 only). Verified: fetch resolves @latest → 0.80.2; version extraction matches npm. Co-Authored-By: Claude Opus 4.8 --- build.sh | 10 ++++++++++ packages/npm-globals.txt | 12 ++++++++---- scripts/fetch-npm-globals.sh | 17 +++++++++++------ 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/build.sh b/build.sh index 6367ccd..fc8ae15 100755 --- a/build.sh +++ b/build.sh @@ -583,6 +583,15 @@ write_build_manifest() { fi fi fi + # Pi version provenance. Pi is fetched as @latest (see packages/npm-globals.txt), + # so the concrete version floats — derive it from the bundled tarball name + # (earendil-works-pi-coding-agent-.tgz) and record it. This runs after + # fetch-npm-globals.sh + install_live_npm_globals, so the tarball is present. + _pi_version="unknown" + _pi_tgz=$(ls "${NPM_GLOBALS_DIR}"/earendil-works-pi-coding-agent-*.tgz 2>/dev/null | head -1) + if [ -n "${_pi_tgz}" ]; then + _pi_version=$(basename "${_pi_tgz}" .tgz | sed 's/^earendil-works-pi-coding-agent-//') + fi mkdir -p "$(dirname "$_manifest_path")" cat > "$_manifest_path" <@` downloads the pinned published tarball without - # installing it. Output is `-.tgz` (scoped names get - # their slash flattened to a dash). - npm pack "$pkg" >/dev/null + # `npm pack @` downloads the published tarball without + # installing it. Output is `-.tgz` (scoped names get + # their slash flattened to a dash). npm prints that filename on stdout — echo + # it so the build log shows exactly which version a dist-tag (e.g. @latest) + # resolved to. + _packed=$(npm pack "$pkg" 2>/dev/null | tail -1) + [ -n "${_packed}" ] && echo " → ${_packed}" done < "$NPM_GLOBALS_LIST" echo "" -- 2.45.3