[STG-1536] Split `packages/stagehand/server` into separate server-v3 and server-v4 dirs
Merged
PI
8mo ago+11829+11829+01234567890123456789012345678901234567890123456789-136-136-012345678901234567890123456789
Follow-up Tasks
- Update stainless SDK custom code for all languages to pull new
stagehand-server-v3-darwin-x64binary names (-v3-added)
Summary by cubic
Split the Stagehand API into packages/server-v3 and packages/server-v4, each with its own builds, tests, SEA binaries, and release workflows. Delivers STG-1536 and lets us keep v3 stable while iterating on v4; CI/test discovery and OpenAPI artifacts are versioned.
-
Refactors
- Renamed the original server to
packages/server-v3(@browserbasehq/stagehand-server-v3); updated docs and runtime path helpers (now synced across core/docs/evals and both servers), ESLint globs/ignores, scripts/Turbo filters, tests, and Stainless to readpackages/server-v3/openapi.v3.yaml; v3 SEA binaries usestagehand-server-v3-*. - Added
packages/server-v4(@browserbasehq/stagehand-server-v4) with/v4/**routes, SSE streaming viax-stream-response, LRU/TTL in-memory session store, health/readiness, logging/metrics,openapi.v4.yaml+ generator, SEA tooling, and v4 integration tests. - CI: path filters, test discovery, and artifacts cover both versions; added
stagehand-server-v4-release.ymlandstagehand-server-v4-sea-build.yml; renamed v3 workflows; artifacts includepackages/server-v3/**andpackages/server-v4/**dists and OAS.
- Renamed the original server to
-
Migration
- Replace
packages/server/**refs withpackages/server-v3/**orpackages/server-v4/**. - Use new package filters and binary names:
@browserbasehq/stagehand-server-v3/@browserbasehq/stagehand-server-v4;stagehand-server-v3-*/stagehand-server-v4-*. - Update OpenAPI consumers to
packages/server-v3/openapi.v3.yamlorpackages/server-v4/openapi.v4.yaml.
- Replace