Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add list_windows computer action#80

Merged
NikhilShahi merged 1 commit into
mainhyperbrowserai/python-sdk:mainfrom
list-windows-computer-actionhyperbrowserai/python-sdk:list-windows-computer-actionCopy head branch name to clipboard
May 8, 2026
Merged

add list_windows computer action#80
NikhilShahi merged 1 commit into
mainhyperbrowserai/python-sdk:mainfrom
list-windows-computer-actionhyperbrowserai/python-sdk:list-windows-computer-actionCopy head branch name to clipboard

Conversation

@NikhilShahi
Copy link
Copy Markdown
Collaborator

@NikhilShahi NikhilShahi commented May 8, 2026

Note

Medium Risk
Adds a new computer-action API call and expands ComputerActionResponse.data to a broader union, which could affect downstream parsing/typing for users who assumed only clipboard-text data.

Overview
Adds a new list_windows computer action to both async and sync ComputerActionManager, sending ListWindowsActionParams with optional return_screenshot.

Extends computer-action models with the LIST_WINDOWS enum value, request params, and response types (ComputerActionWindow and ComputerActionResponseDataListWindows), and re-exports them via hyperbrowser.models. Bumps the SDK version to 0.90.8.

Reviewed by Cursor Bugbot for commit cbe39f0. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cbe39f0. Configure here.

ComputerActionResponseData = Union[
ComputerActionResponseDataListWindows,
ComputerActionResponseDataClipboardText,
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Union ordering silently drops clipboard text response data

High Severity

ComputerActionResponseData places ComputerActionResponseDataListWindows first in the Union, but both members have all-default fields and neither sets extra='forbid'. Due to a known Pydantic v2 smart-union limitation (pydantic-core issue #1335, still open), any dict — including clipboard text payloads like {"clipboardText": "hello"} — can validate successfully against ComputerActionResponseDataListWindows (extra fields are silently ignored, both fields take defaults). When Pydantic picks it as the first successful match, the actual clipboardText value is discarded. This silently breaks all get_clipboard_text() responses. A discriminated union or adding extra='forbid' to both response data models would make disambiguation reliable.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cbe39f0. Configure here.

@NikhilShahi NikhilShahi merged commit d6ea2db into main May 8, 2026
1 check passed
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.