Delete packages/server-v4 entirely for now#2151
Conversation
|
There was a problem hiding this comment.
No issues found across 124 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Repo as Monorepo Root
participant ServerV4 as packages/server-v4 (LEGACY)
participant Core as @browserbasehq/stagehand
participant Dist as Dist / Build Outputs
participant DB as Database (Postgres/PGlite)
participant BB as Browserbase API
Note over Repo,BB: NEW: packages/server-v4 deleted entirely
Note over ServerV4: Previously contained:
Note over ServerV4: - Fastify app, routes, controllers
Note over ServerV4: - Drizzle ORM schema, migrations
Note over ServerV4: - LLM session/service/repository
Note over ServerV4: - Browser session stubs (in-memory Map)
Note over ServerV4: - OpenAPI spec, SEA build scripts
Note over ServerV4: - Unit & integration tests
loop Before deletion (reference flow)
ServerV4->>Core: Import stagehand SDK (workspace dependency)
ServerV4->>DB: Connect (Postgres or PGlite)
ServerV4->>ServerV4: Run Drizzle migrations on startup
ServerV4->>ServerV4: Register Fastify plugins (db, llm, swagger)
Client->>ServerV4: POST /v4/browsersession
ServerV4->>ServerV4: createBrowserSession() - in-memory stub
ServerV4-->>Client: Return stub BrowserSession
Client->>ServerV4: POST /v4/browsersession/:id/end
ServerV4->>ServerV4: endBrowserSession() - delete from Map
ServerV4-->>Client: Return ended BrowserSession
Client->>ServerV4: GET /v4/llms
ServerV4->>DB: SELECT from llm_configs
DB-->>ServerV4: llm config rows
ServerV4-->>Client: LLM list response
Client->>ServerV4: POST /v4/page/click
ServerV4->>ServerV4: createPageActionHandler() - stub
ServerV4-->>Client: Stub action result
end
Note over Repo: After deletion:
Repo->>Repo: No package.json, src/, test/ for server-v4
Repo->>Repo: No drizzle migrations, no OpenAPI spec
Repo->>Core: No legacy v4 server depending on stagehand
Repo->>BB: No v4 routes to Browserbase API
Note over Dist: Build outputs for server-v4 removed
Note over DB: No Drizzle migrations for v4 schema
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
why
New stagehand v4 will be completely different than what we have in the v4 directory.
It's currently distracting for llms / pentesters / contributors to see all this dead v4 code.
what changed
test plan
Summary by cubic
Deleted the legacy
packages/server-v4(@browserbasehq/stagehand-server-v4) package and all related files. This removes dead code to reduce noise and avoid confusion while we rebuild the Stagehand v4 server.packages/server-v4or@browserbasehq/stagehand-server-v4in scripts, CI, or docs if they exist.Written for commit 4d2ca1d. Summary will update on new commits. Review in cubic