feat(sdk): support Standard Schema extract schemas - #2847
Draft
antonvishal wants to merge 12 commits into
Draft
Conversation
🦋 Changeset detectedLatest commit: c2467fa The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
Contributor
|
This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run. |
This was referenced Aug 28, 2026
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Aug 28, 2026
…into codex/standard-schema-sdk
…codex/standard-schema-extension
… into codex/standard-schema-docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make TypeScript
extract()accept Standard Schema implementations that can also produce Draft 2020-12 JSON Schema, then validate the schema and extracted value consistently across the SDK, protocol, and browser extension.$refresolution before schemas reach model inference.Stack
The mergeable upstream diff is this PR. For smaller review boundaries, read these draft PRs from bottom to top:
Review boundary
This is the cumulative merge target because GitHub cannot create a stack across the contributor fork and the upstream repository. The linked fork PRs exist only to provide small, focused diffs. Review comments can go on those PRs, but the final approval and merge happen here. After this PR merges, the fork PRs will be closed.
Test plan
The exact source tip passed the locally runnable CI suite before restacking:
The reconstructed stack was checked layer by layer:
standard-schemasource branch.TODO
jsonSchema()wrapper works, but the ergonomics and error guidance need another pass before this draft is ready for review.