Skip to content

move actions out in preparation of looping and chunking - #15

Merged
jeremypress merged 1 commit into
mainfrom
jp-prompt
May 30, 2024
Merged

move actions out in preparation of looping and chunking#15
jeremypress merged 1 commit into
mainfrom
jp-prompt

Conversation

@jeremypress

Copy link
Copy Markdown
Contributor

why

LLM calls are now going to get smarter, so i'm creating a surface for more logic to go that avoids clogging up the SDK's index

what changed

Act inference moves to inference.ts and prompt building also happens separately

test plan

ran the example, no errors

@jeremypress
jeremypress merged commit f11b0ab into main May 30, 2024
@pkiv
pkiv deleted the jp-prompt branch October 29, 2024 11:23
miguelg719 pushed a commit that referenced this pull request Jul 23, 2026
Co-authored-by: samfinton <samfinton@samfintons-MacBook-Pro.local>
shriyatheunicorn added a commit that referenced this pull request Jul 27, 2026
Part of STG-2671 (deterministic suite).

Completes the deterministic a/e/o suite on the v4 API: **act 40/40,
extract 25/25, observe 12/12** under `tasks/bench-v4/`, all on
`stagehand.act/extract/observe` with async page accessors and the new
config shape.

## Porting rules applied uniformly
- Behavior preserved byte-for-byte where the API allows — same URLs,
instructions, success criteria, timings
- Schemaless v3 extracts → explicit single-key schemas (`z.object({
extraction: z.string() })`, V4_API_LOGS #2); snake_case schemas ported
verbatim so wire-casing stays comparable (#14)
- `framework/observeReplay.ts`: shared observe→act replay standing in
for the missing `act(observeResult)` (#1) — delete when the SDK ships
`ReplayActionSchema`
- `heal_*` tasks fail loudly (`V4 GAP`) rather than fake self-healing v4
doesn't have
- `combination/` removed — both tasks depended on the deprecated
agent-era surface

## Verification
- Full-suite sweeps on LOCAL and Browserbase vs v4-spike `93af925`:
53/74 pass; every failure classified (frames/OOPIF, observe ranking #15,
targeting gaps) in V4_API_LOGS
- v3 baseline on identical tasks: 65/74 — regression set is concentrated
and nameable
- Schema audit: 59 tasks byte-equivalent to v3, 13 documented wrapper
conversions, 0 drift
- Typecheck, eslint, prettier clean

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Ports the full deterministic bench suite to the v4 SDK for STG-2671,
completing act 40/40, extract 25/25, and observe 12/12 under
`tasks/bench-v4`. Preserves v3 behavior where possible and documents v4
gaps; adds an observe→act replay helper and minor stability updates.

- **New Features**
- Complete v4 bench on `stagehand.act/extract/observe`, with async page
accessors and the new config shape.
- Added `framework/observeReplay.ts` to replay observe→act until v4
ships native replay.

- **Refactors**
- Schemaless extracts now use explicit schemas (e.g., `z.object({
extraction: z.string() })`); snake_case schemas kept to compare wire
casing.
- Handled v4 gaps: `heal_*` tasks fail with clear V4 GAP messages;
iframe/node-id checks re-expressed in-page; removed `combination/` tasks
tied to the deprecated agent surface; renamed `act/nonsense_action` to
assert failure handling.
- Verification: local and Browserbase sweeps pass 53/74; failures
classified; typecheck/lint clean.

<sup>Written for commit a2db76f.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/browserbase/stagehand/pull/2387?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
felipeofdev-ai pushed a commit to felipeofdev-ai/stagehand that referenced this pull request Aug 4, 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