add list_windows computer action#80
add list_windows computer action#80NikhilShahi merged 1 commit intomainhyperbrowserai/python-sdk:mainfrom list-windows-computer-actionhyperbrowserai/python-sdk:list-windows-computer-actionCopy head branch name to clipboard
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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, | ||
| ] |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit cbe39f0. Configure here.
Note
Medium Risk
Adds a new computer-action API call and expands
ComputerActionResponse.datato a broader union, which could affect downstream parsing/typing for users who assumed only clipboard-text data.Overview
Adds a new
list_windowscomputer action to both async and syncComputerActionManager, sendingListWindowsActionParamswith optionalreturn_screenshot.Extends computer-action models with the
LIST_WINDOWSenum value, request params, and response types (ComputerActionWindowandComputerActionResponseDataListWindows), and re-exports them viahyperbrowser.models. Bumps the SDK version to0.90.8.Reviewed by Cursor Bugbot for commit cbe39f0. Bugbot is set up for automated code reviews on this repo. Configure here.