feat(stagehand): expose page cursor overlay - #2831
Conversation
🦋 Changeset detectedLatest commit: 7f883be The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 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 |
…sor-overlay # Conflicts: # packages/sdk-go/internal/extensionassets/stagehand-extension.zip
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
No issues found across 16 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant TS as TypeScript SDK
participant PY as Python SDK
participant GO as Go SDK
participant EXT as Extension Runtime
participant PAGE as Understudy Page
participant PROTO as Protocol Schema
Note over TS,GO: Public SDK wrappers
TS->>TS: enableCursorOverlay()
PY->>PY: enable_cursor_overlay()
GO->>GO: EnableCursorOverlay()
Note over TS,GO: Protocol method: page.enable_cursor_overlay
TS->>PROTO: Validate payload
PY->>PROTO: Validate payload
GO->>PROTO: Validate payload
PROTO->>EXT: JSON-RPC request (page_id)
EXT->>EXT: Route to page controller
EXT->>PAGE: enableCursorOverlay() runtime call
PAGE->>PAGE: Toggle overlay in browser context
PAGE-->>EXT: Operation result {ok: true}
EXT-->>PROTO: RPC response
PROTO-->>TS: Promise<void>
PROTO-->>PY: None
PROTO-->>GO: nil (or error)
Note over TS,GO: Common flow across SDKs: SDK wrapper, protocol schema validation, extension RPC router, understudy page runtime, browser overlay
|
Closing after the architecture follow-up: the CLI no longer needs a public Stagehand cursor API. The replacement lives in #2834 as an idempotent CLI-owned |
Summary
Expose the existing extension cursor overlay through the public V4 page API:
page.enable_cursor_overlayto the protocolpage.enableCursorOverlay()in TypeScript,page.enable_cursor_overlay()in Python, andPage.EnableCursorOverlay()in GoVerification
pnpm --filter ./packages/protocol test:unitpnpm --filter ./packages/protocol typecheckpnpm --filter ./packages/extension test:unitpnpm checkSummary by cubic
Exposes the existing extension cursor overlay through the public V4 page API so SDK users can enable it without touching the extension directly.
page.enable_cursor_overlayprotocol method and routes it through the extension runtime.page.enableCursorOverlay()in TypeScript,page.enable_cursor_overlay()in Python, andPage.EnableCursorOverlay()in Go, and documents each in the V4 reference.Written for commit 7f883be. Summary will update on new commits.