From 448bfdd8d9509427a352e53567a8b48a4b5ed254 Mon Sep 17 00:00:00 2001 From: Amp Date: Fri, 16 Oct 2026 07:06:35 +0000 Subject: [PATCH] chore(orbs): cache locked dependencies during orb setup Amp-Thread-ID: https://ampcode.com/threads/T-01a1437d-d798-762a-b86d-83d49245d438 --- .agents/resume | 12 ++++++++++++ .agents/setup | 14 ++++++++++++++ .gitignore | 3 +++ 3 files changed, 29 insertions(+) create mode 100755 .agents/resume create mode 100755 .agents/setup diff --git a/.agents/resume b/.agents/resume new file mode 100755 index 0000000..416f7c6 --- /dev/null +++ b/.agents/resume @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." + +# Dependencies are restored with the orb; waking must not reinstall them. +node --version +bun --version +if [[ ! -x node_modules/.bin/next ]]; then + echo "Dependencies are missing; run .agents/setup to restore them." >&2 + exit 1 +fi diff --git a/.agents/setup b/.agents/setup new file mode 100755 index 0000000..c94c4f8 --- /dev/null +++ b/.agents/setup @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." + +# Amp's base image provides Node.js and Bun; no additional system packages are needed. +echo "Checking the orb toolchain..." +node --version +node -e 'if (Number(process.versions.node.split(".")[0]) < 24) throw new Error("Node.js >=24 is required");' +bun --version + +# Keep dependencies and Bun's cache in the snapshot. Bun cheaply checks warm installs. +echo "Installing locked dependencies (including development tools)..." +time NODE_ENV=development bun install --frozen-lockfile diff --git a/.gitignore b/.gitignore index 7cab1e7..2f74100 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ yarn-error.log* # vercel .vercel +# Amp orb portal metadata +/.amp/portals/* + # typescript *.tsbuildinfo next-env.d.ts