[STG-1536] Split `packages/stagehand/server` into separate server-v3 and server-v4 dirs

Merged
PI
8mo ago
+11829-136

Follow-up Tasks

  • Update stainless SDK custom code for all languages to pull new stagehand-server-v3-darwin-x64 binary 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 read packages/server-v3/openapi.v3.yaml; v3 SEA binaries use stagehand-server-v3-*.
    • Added packages/server-v4 (@browserbasehq/stagehand-server-v4) with /v4/** routes, SSE streaming via x-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.yml and stagehand-server-v4-sea-build.yml; renamed v3 workflows; artifacts include packages/server-v3/** and packages/server-v4/** dists and OAS.
  • Migration

    • Replace packages/server/** refs with packages/server-v3/** or packages/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.yaml or packages/server-v4/openapi.v4.yaml.