refactor: remove packages/shared, deduplicate with CLI shared (#2257)

* refactor: remove packages/shared, deduplicate with packages/cli/src/shared

packages/shared duplicated packages/cli/src/shared (parse.ts, result.ts,
type-guards.ts) with the CLI never importing from the shared package.
The only consumer was .claude/skills/setup-spa, which now imports directly
from packages/cli/src/shared via relative paths.

- Delete packages/shared entirely
- Update setup-spa imports to use relative paths to CLI shared
- Remove @openrouter/spawn-shared workspace dependency from setup-spa
- Update CLAUDE.md and type-safety.md references

Agent: complexity-hunter
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: remove packages/shared from lint workflow, fix import sorting

The Biome Lint CI step referenced packages/shared/src/ which no longer
exists after this PR removes the package. Also fix import ordering in
setup-spa files to satisfy Biome's organizeImports rule.

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix: address Devin review — update stale packages/shared references

- Update type-safety.md line 67: packages/shared/src/parse.ts → packages/cli/src/shared/parse.ts
- Update install.ps1 sparse-checkout: remove packages/shared reference

Agent: pr-maintainer
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-03-06 18:58:42 -08:00 committed by GitHub
parent 66f0aebebb
commit 3a1de9d4cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 12 additions and 170 deletions

View file

@ -20,10 +20,6 @@ spawn/
src/commands/ # Per-command modules (interactive, list, run, etc.)
src/commands.ts # Compatibility shim → re-exports from commands/
package.json # npm package (@openrouter/spawn)
shared/
src/parse.ts # parseJsonWith(text, schema) and parseJsonObj(text)
src/type-guards.ts # isString, isNumber, hasStatus, hasMessage
package.json # npm package (@openrouter/spawn-shared)
sh/
cli/
install.sh # One-liner installer (bun → npm → auto-install bun)