notepat build stream: --if-stale + --sync-spaces (DO Spaces archive)
--if-stale: skip rebuild when no amxd input changed since the last
successful build. Checks both committed diff (prev.piece_git…HEAD)
and uncommitted working-tree changes under INPUT_PATHS (piece,
bios, lib/, bundler.mjs). Deploy flow now passes this flag so infra-
only commits don't trigger a 60s rebuild + restart cycle.
--sync-spaces: after a successful build, PUTs the versioned amxd +
latest.json + root alias to s3://assets-aesthetic-computer/m4l/
notepat.com/ via DigitalOcean Spaces. Mirrors ac-os OTA: versioned
artifacts are immutable (long max-age + immutable cache-control),
latest.json is no-cache so the piece's staleness check always sees
fresh data. Credentials come from DO_SPACES_KEY/SECRET or AWS_*;
gracefully warns + skips when absent.
deploy.fish: sources /opt/ac/system/.env before running the build so
lith's configured DO_SPACES creds reach the script. Build command
becomes \`node ac-m4l/build-notepat.mjs --if-stale --sync-spaces\`.
Also adds npm run notepat:publish for local dev publish (build +
sync) without a full lith deploy.