Skip to content

feat: support deterministic actions without a model - #2526

Closed
shrey150 wants to merge 11 commits into
v4-spike-cli-core-runtimefrom
v4-spike-cli-actions
Closed

feat: support deterministic actions without a model#2526
shrey150 wants to merge 11 commits into
v4-spike-cli-core-runtimefrom
v4-spike-cli-actions

Conversation

@shrey150

@shrey150 shrey150 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • allow structured Stagehand.act(Action) values to execute deterministically without configuring a model
  • preserve the model requirement for natural-language instructions
  • route CLI selector click and fill through the typed Action path and surface unsuccessful action results as command failures
  • keep select, upload, highlight, coordinates, and capability-gap behavior inherited unchanged from the parent runtime PR

Refreshed on 2026-08-10 against the current parent and v4-spike commit d7556e9a.

Contract

Surface Result
Structured Stagehand.act(Action) without a model Executes once without inference or model-backed self-healing
Natural-language Stagehand.act("instruction") without a model Continues to return the missing-model error
CLI click and fill syntax/results Unchanged; implementation uses structured Actions
Other CLI page commands Unchanged from the parent PR

Release boundary

The already-published Stagehand 4.0.0 does not contain this PR's extension change. A clean registry-backed install therefore supports open/snapshot/status but rejects model-free click/fill with the pre-fix missing-model error. This PR includes patch changesets for @browserbasehq/stagehand, @browserbasehq/stagehand-extension, @browserbasehq/stagehand-go, and browse, so release automation versions every embedded runtime and publishes the Stagehand patch before or alongside the Browse patch. Keeping workspace:* preserves that ordering; pinning Browse to 4.0.0 would ship an incompatible pair.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
2026-08-10 cumulative stack refresh on Chrome Stable 151 pnpm build passed 6/6 tasks; pnpm check passed 11/11 tasks with 0 errors; the full pnpm test graph exited 0, including 17/17 protocol browser tests and 15/15 local SDK browser tests Proves the updated six-PR stack is compatible with v4-spike d7556e9a across build, static checks, unit tests, and real-browser suites.
Clean coordinated-release tarball consumer at the cumulative tip Packed workspace Stagehand and Browse, installed both into an empty npm project, opened example.com, produced a snapshot, clicked through to IANA, filled an injected input, and read back published-v4-ok Proves the intended co-published artifacts work outside the monorepo with a real Chrome session; it does not substitute for a credentialed Browserbase smoke.
Clean packed Browse against registry Stagehand 4.0.0 Install, open, snapshot, and status passed; model-free click returned the pre-fix An LLM was not configured error Confirms the cross-package patch and coordinated release are required rather than optional.
corepack pnpm exec vitest run packages/extension/tests/act.test.ts 1 file passed; 13/13 tests passed Covers model-free Action execution, no-inference behavior, disabled self-healing without a model, and natural-language rejection.
corepack pnpm --filter browse test:unit 25 files passed; 380/380 tests passed Covers CLI Action construction, selected-page routing, successful results, failure propagation, and the refreshed parent contract.
Real managed-local synthetic form → fill and click without model configuration Filled hello-v4-final; click set document.body.dataset.clicked to yes Proves the real bundled extension executes typed Actions without an LLM in Chrome Stable 151.
Extension archive drift check Built artifact and Go embedded ZIP had the same SHA-256; go run ./internal/extensionpack --check passed Proves the merged source and embedded Go asset are synchronized.
Go 1.26.5 tests with Chrome Stable 151 Root, extension asset, extension pack, and generator packages passed Exercises the rebuilt extension through live Chrome in the Go SDK.
Remote Browserbase action rerun Not run: no BROWSERBASE_API_KEY is available in this environment Remaining live verification; GitHub CI is the next credentialed gate. Previous pre-refresh remote evidence is not counted for the new head.
Final repository gates 6/6 build tasks; 11/11 checks; 400 warnings and 0 errors Proves the SDK, extension, CLI, and repository gates pass together.

Includes patch changesets for @browserbasehq/stagehand, @browserbasehq/stagehand-extension, @browserbasehq/stagehand-go, and browse because the existing typed Action contract now works without a model and the extension is embedded in both TypeScript and Go.

Final release validation (2026-08-10)

At the cumulative stack tip:

  • release validation now recognizes public browse changesets
  • a Changesets version dry run resolves browse 0.9.7, Stagehand 4.0.1, extension 1.0.1, and Go 4.0.1
  • the packed Browse 0.9.7 manifest rewrites workspace:* to exact Stagehand 4.0.1
  • a clean npm consumer installed those versioned tarballs and completed real-Chrome open, snapshot, model-free click, URL read, and stop with zero audit vulnerabilities

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9512209

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@browserbasehq/stagehand Patch
browse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@shrey150
shrey150 force-pushed the v4-spike-cli-actions branch from f61c704 to 9f14a50 Compare August 6, 2026 08:21
@shrey150
shrey150 force-pushed the v4-spike-cli-actions branch from 9f14a50 to 2c5f381 Compare August 6, 2026 08:31
@shrey150
shrey150 force-pushed the v4-spike-cli-actions branch 3 times, most recently from 588f26b to 1aa31c1 Compare August 6, 2026 09:08
@shrey150
shrey150 force-pushed the v4-spike-cli-actions branch from 1aa31c1 to 713347a Compare August 6, 2026 17:35
@shrey150 shrey150 changed the title refactor(cli): port deterministic actions to V4 feat: support deterministic actions without a model Aug 6, 2026
@shrey150
shrey150 force-pushed the v4-spike-cli-actions branch from 713347a to 20a7d98 Compare August 7, 2026 18:41
@shrey150

Copy link
Copy Markdown
Contributor Author

The CLI intent here is superseded by #2834, but the core Stagehand patch is intentionally not carried forward. Browse now executes deterministic click/fill operations through V4 locators directly, so those paths do not call act() and do not require a model. Closing this draft with no standalone core replacement.

@shrey150 shrey150 closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant