You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# why
update extract handling
# what changed
# test plan
<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Switch the v2 agent extract tool to accept JSON Schema and convert it to
Zod internally. This removes unsafe schema string evaluation and adds
format support (url, email, uuid) for clearer, safer extraction.
- **Refactors**
- Replaced Function-based Zod string evaluation with JSON Schema → Zod
conversion.
- Added format handling for url, email, and uuid; supports enum and
arrays via items.
- Wrapped non-object schemas into an object as { result: ... } for
consistent output.
- Removed logger dependency from createExtractTool and its registration.
- **Migration**
- Pass schema as a JSON object (JSON Schema), not a Zod string.
- Use format: "url" for links; use enum for string lists; use items for
arrays.
- If you call createExtractTool directly, remove the logger parameter.
<sup>Written for commit c1d8cf1.
Summary will update on new commits. <a
href="https://cubic.dev/pr/browserbase/stagehand/pull/1593">Review in
cubic</a></sup>
<!-- End of auto-generated description by cubic. -->
0 commit comments