feat: Bun workspace monorepo — packages/cli + packages/shared (#1853)

Restructure the repo as a Bun workspace monorepo:

- Move cli/ → packages/cli/
- Create packages/shared/ (@openrouter/spawn-shared) with type-guards and parse utilities
- Add root package.json with workspace configuration
- Update all CLI imports to use @openrouter/spawn-shared
- Deduplicate toRecord/toObjectArray helpers from 4 cloud modules
- Update SPA (slack-bot) to use shared package instead of local toObj()
- Update 48 agent shell scripts for new packages/cli/ path
- Update install.sh, install.ps1, e2e, and test scripts
- Update all GitHub workflows, .gitignore, pre-commit hooks
- Update CLAUDE.md, README.md, and skill prompt references
- Pin all dependency versions (no ^ ranges)
- Bump CLI version 0.9.1 → 0.10.0

All 1908 tests pass. Lint clean. All 8 cloud bundles build.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
A 2026-02-23 22:07:05 -08:00 committed by GitHub
parent 8049b8b257
commit 65f6f1be32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
180 changed files with 601 additions and 278 deletions

View file

@ -58,14 +58,14 @@ fi
# ─── Biome lint for TypeScript ─────────────────────────────────────────
staged_ts=$(git diff --cached --name-only --diff-filter=ACM | grep '^cli/src/.*\.ts$' || true)
staged_ts=$(git diff --cached --name-only --diff-filter=ACM | grep '^packages/cli/src/.*\.ts$' || true)
if [[ -n "$staged_ts" ]]; then
echo "Running Biome lint on staged TypeScript files..."
if ! (cd cli && bunx @biomejs/biome lint src/); then
if ! (cd packages/cli && bunx @biomejs/biome lint src/); then
echo ""
printf "${RED}Biome lint failed. Commit blocked.${NC}\n"
echo "Run 'cd cli && bunx @biomejs/biome lint src/' to see details."
echo "Run 'cd packages/cli && bunx @biomejs/biome lint src/' to see details."
exit 1
fi
printf "${GREEN}Biome lint passed.${NC}\n"