Add Claude native browser use through the shared facade runtime - #2905
Add Claude native browser use through the shared facade runtime#2905miguelg719 wants to merge 19 commits into
Conversation
…nsolidation-16-claude-cua
…nsolidation-16-claude-cua
…nsolidation-16-claude-cua # Conflicts: # packages/evals/tests/framework/cuaToolAdapter.test.ts
…nsolidation-16-claude-cua
…nsolidation-16-claude-cua
|
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
70b194d to
55f180a
Compare
c5983f0 to
32a7a95
Compare
…nsolidation-16-claude-cua
Adds Claude native browser use through the shared CUA bridge and canonical facade. Native tool instructions remain separate from internal mount instructions, and the shared autonomy policy is injected once through the native system channel. Includes package, build, and CI registration.
Retains thinking, tool-result blocks, usage presence, and screenshot evidence. API history can discard older screenshots without mutating verification events. Unmatched calls carry a missing-result failure instead of appearing successful. Diagnostic logs contain tool name/status/duration; original tool inputs stay in session evidence, and abort diagnostics are sanitized.
Tab operations use the canonical visible context and readonly
page.pageId. Keeper pages cannot enter tab inventory or be selected/closed; legitimate visible blank pages remain available. Explicittab_idactions refresh active identity before executing. A first reference action without cached tab state adds one inventory call to obtain real IDs. Typed canonical session-loss errors or runner-owned telemetry stop execution; page error text alone cannot impersonate browser loss.Drag uses the SDK
dragAndDropprimitive. Separate held-button down/up gestures and modifier clicks receive actionable unsupported errors; complete drag and ordinary clicks are supported. Partial toolset configuration preserves member defaults, literal Space is accepted,findtext is capped, and transcript clipping preserves surrogate pairs.Validation: 72 tests pass across 8 files, including 55 Claude SDK tests, native eval/runner/mount tests, and the compiled facade/MCP fixture. Tests execute generated snippets through actual canonical
StagehandFacadeToolsand SDKPage/BrowserContextobjects over in-memory RPC. Claude SDK and full eval typechecks, matching core/Claude SDK builds, and scoped formatting pass. Generated test artifacts under dist/.turbo/node_modules leave the task cache inputs and hash unchanged. Provider responses are scripted; these checks do not establish live browser gestures, model performance, or disconnect recovery.Stack position: 16/17. Base:
evals/consolidation-15-shared-cua-bridge. Review the diff against the immediate predecessor.Reviewer entry points:
packages/integrations/claude-cua-sdk/src/executor.tspackages/integrations/claude-cua-sdk/src/session.tspackages/evals/framework/claudeCuaRunner.ts