Fix shell scripts and package.json to reflect the new scripts/ subdirectory structure.…
- User
Fix shell scripts and package.json to reflect the new scripts/ subdirectory structure.
Context
The repository root is C:\Users\nicolas\Documents\GitHub\bballgenius
Files were moved from scripts/ into subdirectories:
- 11 BBR files → scripts/bbr/
- 4 CI files → scripts/ci/
- 5 eval files → scripts/eval/
- 3 dev files → scripts/dev/
Some shell script references have ALREADY been updated (bbr/buildBbrUrlMap.sh, bbr/bbrMapObserveCycle.sh, bbr/bbrWaitMapThenCrawl.sh). The remaining changes needed are:
1. Fix buildBbrUrlMap.sh md5sum portability (scripts/bbr/buildBbrUrlMap.sh)
On line 170, there's a hash command:
codehash=$(printf '%s' "${seed_url}" | md5sum 2>/dev/null | cut -c1-8 || printf '%s' "${seed_url}" | md5 | cut -c1-8)The fallback
md5on macOS needs the-rflag for consistent output: Change to:codehash=$(printf '%s' "${seed_url}" | md5sum 2>/dev/null | cut -c1-8 || printf '%s' "${seed_url}" | md5 -r 2>/dev/null | cut -c1-8)2. Fix ci-guards.sh lint scope (scripts/ci/ci-guards.sh)
Line 28 has:
codelint_out="$(bunx biome lint src scripts --max-diagnostics=500 2>&1)" || lint_ec=$?Update to include the new subdirectories:
codelint_out="$(bunx biome lint src scripts/bbr scripts/ci scripts/eval scripts/dev --max-diagnostics=500 2>&1)" || lint_ec=$?3. Update package.json script paths
Read the full package.json file. Find every npm script under "scripts" that references a path starting with
scripts/and update it to include the correct subdirectory.Here is the full mapping:
Old path New path scripts/chatbot-smoke.tsscripts/eval/chatbot-smoke.tsscripts/iterate_loop.tsscripts/eval/iterate_loop.ts Assistant
Let me make all the changes. Starting with the two shell scripts and package.json in parallel.
Assistant
All edits applied. Let me verify the final state.
Assistant
All changes verified. Here's the summary:
scripts/bbr/buildBbrUrlMap.sh:170— Added-rflag tomd5fallback for macOS compatibility:diff- printf '%s' "${seed_url}" | md5 | cut -c1-8 + printf '%s' "${seed_url}" | md5 -r 2>/dev/null | cut -c1-8scripts/ci/ci-guards.sh:28— Expanded Biome lint scope to include new subdirectories:diff- bunx biome lint src scripts --max-diagnostics=500 + bunx biome lint src scripts/bbr scripts/ci scripts/eval scripts/dev --max-diagnostics=500package.json— Updated 20 script paths across three categories:- eval/ (3):
chatbot-smoke.ts,iterate_loop.ts - dev/ (2):
sync-keyboard-map.ts,capture-frames.ts - ci/ (2): ,
- eval/ (3):