The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat: update CLI release infrastructure to serve immutable assets via CDN with long-term caching
0xken15f64d8952a031
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 2fcfe5d67..254969bf8 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -260,7 +260,7 @@ jobs:echo "::error::$REF_NAME has an empty tag message — no notes to publish."exit 1fi- base="https://storage.googleapis.com/${GCS_BUCKET}/harness/cli/${VERSION}"+ base="https://cdn.autonomous.ai/harness/cli/${VERSION}"cat >> RELEASE_NOTES.md <<EOF---diff --git a/cli/RELEASE.md b/cli/RELEASE.mdindex 3a3f74bd8..03914662b 100644--- a/cli/RELEASE.md+++ b/cli/RELEASE.md@@ -79,11 +79,17 @@ gs://s3-autonomous-upgrade-3/harness/cli/<version>/cli.jsgs://s3-autonomous-upgrade-3/harness/cli/<version>/notify.mjs```+The manifest is always read straight off the GCS origin (`CDN_ASSET_BASE_URL` in `upload-cli.sh` does+not apply to it) — it's polled every ~60s by every running daemon, and this product's CDN caps any+cacheable response at ~31 days regardless of origin headers, so it must never be CDN-fronted. The bundle+files it points at are the opposite: immutable once published, so their `url` fields point at+`cdn.autonomous.ai` instead, and are uploaded with a long `Cache-Control` on purpose.+```json{"cli": {"version": "0.1.72",- "url": "https://storage.googleapis.com/s3-autonomous-upgrade-3/harness/cli/0.1.72/cli.js",+ "url": "https://cdn.autonomous.ai/harness/cli/0.1.72/cli.js","sha256": "<64 hex>","size": 2103552}diff --git a/cli/scripts/upload-cli.sh b/cli/scripts/upload-cli.shindex c5f2f4e3a..e0feea9d4 100755--- a/cli/scripts/upload-cli.sh+++ b/cli/scripts/upload-cli.sh@@ -22,6 +22,12 @@ NOTIFY="$ADAPTER_DIR/dist/notify.mjs"# --- GCS config (all overridable via env) ---GCS_BUCKET="${GCS_BUCKET:-s3-autonomous-upgrade-3}"GCS_PUBLIC_BASE_URL="${GCS_PUBLIC_BASE_URL:-https://storage.googleapis.com/${GCS_BUCKET}}"+# The manifest itself stays on the GCS origin (read below, and in the merge step) — daemons poll it+# every ~60s and this zone's CDN caps ANY cacheable response at ~31 days regardless of origin headers+# (verified live), which would silently delay self-update fleet-wide. The bundle files it points at are+# a different story: immutable once published (never re-upload over an existing version — see+# RELEASE.md), so CDN caching them is pure upside. Only CLI_URL/NOTIFY_URL below use this.+CDN_ASSET_BASE_URL="${CDN_ASSET_BASE_URL:-https://cdn.autonomous.ai}"METADATA_PATH="${METADATA_PATH:-harness/cli/metadata.json}"OTA_KEY="${OTA_KEY:-cli}" # must match ADAPTER_UPDATE_KEY in src/config/env.ts@@ -94,8 +100,8 @@ head -1 "$CLI" | grep -q '^#!' || { echo "error: dist/cli.js lost its shebang on# --- Step 3: upload both artifacts + merge the manifest ---CLI_GCS="harness/cli/${VER}/cli.js"NOTIFY_GCS="harness/cli/${VER}/notify.mjs"-CLI_URL="${GCS_PUBLIC_BASE_URL%/}/${CLI_GCS}"-NOTIFY_URL="${GCS_PUBLIC_BASE_URL%/}/${NOTIFY_GCS}"+CLI_URL="${CDN_ASSET_BASE_URL%/}/${CLI_GCS}"+NOTIFY_URL="${CDN_ASSET_BASE_URL%/}/${NOTIFY_GCS}"# `shasum` is a Perl script and is absent from minimal Linux images (only perl-base is installed);# `sha256sum` is coreutils and is always there. Prefer it so a release can also be cut from Ubuntu.sha256_of() {@@ -107,8 +113,10 @@ CLI_SHA="$(sha256_of "$CLI")"; CLI_SIZE="$(wc -c < "$CLI" | tr -d ' ')"NOTIFY_SHA="$(sha256_of "$NOTIFY")"; NOTIFY_SIZE="$(wc -c < "$NOTIFY" | tr -d ' ')"echo ">> uploading cli.js ($CLI_SIZE bytes) + notify.mjs ($NOTIFY_SIZE bytes)"-gsutil -h "Cache-Control:no-cache, no-store, must-revalidate" cp "$CLI" "gs://${GCS_BUCKET}/${CLI_GCS}"-gsutil -h "Cache-Control:no-cache, no-store, must-revalidate" cp "$NOTIFY" "gs://${GCS_BUCKET}/${NOTIFY_GCS}"+# Immutable per-version path — see the CDN_ASSET_BASE_URL note above. Long max-age here is what+# actually lets the CDN cache these instead of hitting GCS on every daemon's install/update.+gsutil -h "Cache-Control:public, max-age=31536000, immutable" cp "$CLI" "gs://${GCS_BUCKET}/${CLI_GCS}"+gsutil -h "Cache-Control:public, max-age=31536000, immutable" cp "$NOTIFY" "gs://${GCS_BUCKET}/${NOTIFY_GCS}"echo ">> merging manifest: gs://${GCS_BUCKET}/${METADATA_PATH} (${OTA_KEY})"SRC="$(mktemp)"; DST="$(mktemp)" # removed by cleanup() on EXIT