ComputerUseService
class ComputerUseService()Synchronous ComputerUseService.
ComputerUseService.__init__
def __init__(impl: AsyncComputerUseService, bridge: SyncBridge) -> NoneComputerUseService.service
@property
def service() -> AddonProcessesServiceComputerUseService.mouse
@property
def mouse() -> MouseServiceComputerUseService.keyboard
@property
def keyboard() -> KeyboardServiceComputerUseService.screen
@property
def screen() -> ScreenServiceComputerUseService.display
@property
def display() -> DisplayServiceComputerUseService.a11y
@property
def a11y() -> A11yServiceComputerUseService.recording
@property
def recording() -> RecordingServiceComputerUseService.restart
def restart() -> ComputerUseRestartResponseComputerUseService.start
def start() -> ComputerUseLifecycleResultComputerUseService.status
def status() -> ComputerUseStatusResponseComputerUseService.stop
def stop() -> ComputerUseLifecycleResultAsyncComputerUseService
class AsyncComputerUseService()AsyncComputerUseService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncComputerUseService.status
async def status() -> ComputerUseStatusResponseAsyncComputerUseService.start
async def start() -> ComputerUseLifecycleResultAsyncComputerUseService.stop
async def stop() -> ComputerUseLifecycleResultAsyncComputerUseService.restart
async def restart() -> ComputerUseRestartResponseA11yService
class A11yService()Synchronous A11yService.
A11yService.__init__
def __init__(impl: AsyncA11yService, bridge: SyncBridge) -> NoneA11yService.find
def find(*,
scope: ComputerUseA11yScope,
pid: int | None = None,
role: str | None = None,
name: str | None = None,
name_match: ComputerUseA11yNameMatch | None = None,
states: Sequence[str] | None = None,
limit: int | None = None) -> ComputerUseA11yFindResultA11yService.focus
def focus(*, id: str) -> NoneA11yService.invoke
def invoke(*, id: str, action: str | None = None) -> NoneA11yService.set_value
def set_value(*, id: str, value: str) -> NoneA11yService.tree
def tree(*,
scope: ComputerUseA11yScope,
pid: int | None = None,
max_depth: int | None = None) -> ComputerUseA11yTreeAsyncA11yService
class AsyncA11yService()AsyncA11yService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncA11yService.tree
async def tree(*,
scope: ComputerUseA11yScope,
pid: int | None = None,
max_depth: int | None = None) -> ComputerUseA11yTreeAsyncA11yService.find
async def find(*,
scope: ComputerUseA11yScope,
pid: int | None = None,
role: str | None = None,
name: str | None = None,
name_match: ComputerUseA11yNameMatch | None = None,
states: Sequence[str] | None = None,
limit: int | None = None) -> ComputerUseA11yFindResultAsyncA11yService.focus
async def focus(*, id: str) -> NoneAsyncA11yService.invoke
async def invoke(*, id: str, action: str | None = None) -> NoneAsyncA11yService.set_value
async def set_value(*, id: str, value: str) -> NoneAddonProcessesService
class AddonProcessesService()Synchronous AddonProcessesService.
AddonProcessesService.__init__
def __init__(impl: AsyncAddonProcessesService, bridge: SyncBridge) -> NoneAddonProcessesService.errors
def errors(name: str) -> ComputerUseProcessErrorsAddonProcessesService.logs
def logs(name: str) -> ComputerUseProcessLogsAddonProcessesService.restart
def restart(name: str) -> ComputerUseProcessRestartResultAddonProcessesService.status
@overload
def status() -> dict[str, ComputerUseProcessStatus]AddonProcessesService.status
@overload
def status(name: str) -> ComputerUseProcessRunningStatusAsyncAddonProcessesService
class AsyncAddonProcessesService()AsyncAddonProcessesService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncAddonProcessesService.status
@overload
async def status() -> dict[str, ComputerUseProcessStatus]AsyncAddonProcessesService.status
@overload
async def status(name: str) -> ComputerUseProcessRunningStatusAsyncAddonProcessesService.restart
async def restart(name: str) -> ComputerUseProcessRestartResultAsyncAddonProcessesService.logs
async def logs(name: str) -> ComputerUseProcessLogsAsyncAddonProcessesService.errors
async def errors(name: str) -> ComputerUseProcessErrorsDisplayService
class DisplayService()Synchronous DisplayService.
DisplayService.__init__
def __init__(impl: AsyncDisplayService, bridge: SyncBridge) -> NoneDisplayService.info
def info() -> ComputerUseDisplayInfoDisplayService.windows
def windows() -> ComputerUseDisplayWindowsAsyncDisplayService
class AsyncDisplayService()AsyncDisplayService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncDisplayService.info
async def info() -> ComputerUseDisplayInfoAsyncDisplayService.windows
async def windows() -> ComputerUseDisplayWindowsKeyboardService
class KeyboardService()Synchronous KeyboardService.
KeyboardService.__init__
def __init__(impl: AsyncKeyboardService, bridge: SyncBridge) -> NoneKeyboardService.hotkey
def hotkey(*, keys: str) -> NoneKeyboardService.key
def key(*,
key: str,
modifiers: Sequence[ComputerUseKeyboardModifier] | None = None) -> NoneKeyboardService.type
def type(*, text: str, delay: int | None = None) -> NoneAsyncKeyboardService
class AsyncKeyboardService()AsyncKeyboardService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncKeyboardService.type
async def type(*, text: str, delay: int | None = None) -> NoneAsyncKeyboardService.key
async def key(*,
key: str,
modifiers: Sequence[ComputerUseKeyboardModifier] | None = None) -> NoneAsyncKeyboardService.hotkey
async def hotkey(*, keys: str) -> NoneMouseService
class MouseService()Synchronous MouseService.
MouseService.__init__
def __init__(impl: AsyncMouseService, bridge: SyncBridge) -> NoneMouseService.click
def click(*,
x: int,
y: int,
button: ComputerUseMouseButton | None = None,
double: bool | None = None) -> ComputerUsePointMouseService.drag
def drag(*,
start_x: int,
start_y: int,
end_x: int,
end_y: int,
button: ComputerUseMouseButton | None = None) -> ComputerUsePointMouseService.move
def move(*, x: int, y: int) -> ComputerUsePointMouseService.position
def position() -> ComputerUsePointMouseService.scroll
def scroll(*,
x: int,
y: int,
direction: ComputerUseScrollDirection,
amount: int | None = None) -> ComputerUseScrollResultAsyncMouseService
class AsyncMouseService()AsyncMouseService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncMouseService.position
async def position() -> ComputerUsePointAsyncMouseService.move
async def move(*, x: int, y: int) -> ComputerUsePointAsyncMouseService.click
async def click(*,
x: int,
y: int,
button: ComputerUseMouseButton | None = None,
double: bool | None = None) -> ComputerUsePointAsyncMouseService.drag
async def drag(*,
start_x: int,
start_y: int,
end_x: int,
end_y: int,
button: ComputerUseMouseButton | None = None) -> ComputerUsePointAsyncMouseService.scroll
async def scroll(*,
x: int,
y: int,
direction: ComputerUseScrollDirection,
amount: int | None = None) -> ComputerUseScrollResultRecordingService
class RecordingService()Synchronous RecordingService.
RecordingService.__init__
def __init__(impl: AsyncRecordingService, bridge: SyncBridge) -> NoneRecordingService.delete
def delete(id: str) -> NoneRecordingService.download
def download(id: str) -> bytesRecordingService.get
def get(id: str) -> ComputerUseRecordingRecordingService.list
def list() -> ComputerUseRecordingListRecordingService.start
def start(*, label: str | None = None) -> ComputerUseRecordingRecordingService.stop
def stop(*, id: str) -> ComputerUseRecordingAsyncRecordingService
class AsyncRecordingService()AsyncRecordingService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncRecordingService.start
async def start(*, label: str | None = None) -> ComputerUseRecordingAsyncRecordingService.stop
async def stop(*, id: str) -> ComputerUseRecordingAsyncRecordingService.list
async def list() -> ComputerUseRecordingListAsyncRecordingService.get
async def get(id: str) -> ComputerUseRecordingAsyncRecordingService.download
async def download(id: str) -> bytesAsyncRecordingService.delete
async def delete(id: str) -> NoneScreenService
class ScreenService()Synchronous ScreenService.
ScreenService.__init__
def __init__(impl: AsyncScreenService, bridge: SyncBridge) -> NoneScreenService.capture
def capture(*, show_cursor: bool | None = None) -> ComputerUseScreenshotScreenService.capture_compressed
def capture_compressed(*,
format: ComputerUseScreenshotFormat | None = None,
quality: int | None = None,
scale: float | None = None,
show_cursor: bool | None = None) -> ComputerUseScreenshotScreenService.region
def region(*,
x: int,
y: int,
width: int,
height: int,
show_cursor: bool | None = None) -> ComputerUseScreenshotScreenService.region_compressed
def region_compressed(*,
x: int,
y: int,
width: int,
height: int,
format: ComputerUseScreenshotFormat | None = None,
quality: int | None = None,
scale: float | None = None,
show_cursor: bool | None = None) -> ComputerUseScreenshotAsyncScreenService
class AsyncScreenService()AsyncScreenService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncScreenService.capture
async def capture(*, show_cursor: bool | None = None) -> ComputerUseScreenshotAsyncScreenService.region
async def region(*,
x: int,
y: int,
width: int,
height: int,
show_cursor: bool | None = None) -> ComputerUseScreenshotAsyncScreenService.capture_compressed
async def capture_compressed(*,
format: ComputerUseScreenshotFormat | None = None,
quality: int | None = None,
scale: float | None = None,
show_cursor: bool | None = None) -> ComputerUseScreenshotAsyncScreenService.region_compressed
async def region_compressed(*,
x: int,
y: int,
width: int,
height: int,
format: ComputerUseScreenshotFormat | None = None,
quality: int | None = None,
scale: float | None = None,
show_cursor: bool | None = None) -> ComputerUseScreenshotComputerUseDesktopFailure
@dataclass(frozen=True, slots=True)
class ComputerUseDesktopFailure()Attributes:
codeComputerUseDesktopFailureCodemessagestrextra_fieldsOptional[Dict[str, JsonValue]] = Noneraw_codeOptional[str] = None
ComputerUseNotStartedStatus
@dataclass(frozen=True, slots=True)
class ComputerUseNotStartedStatus()Attributes:
statusLiteral['inactive'] = 'inactive'desktopLiteral['not_started'] = 'not_started'causeNone = Noneextra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseStartingStatus
@dataclass(frozen=True, slots=True)
class ComputerUseStartingStatus()Attributes:
statusLiteral['inactive'] = 'inactive'desktopLiteral['starting'] = 'starting'causeNone = Noneextra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseReadyStatus
@dataclass(frozen=True, slots=True)
class ComputerUseReadyStatus()Attributes:
statusLiteral['active'] = 'active'desktopLiteral['ready'] = 'ready'causeNone = Noneextra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseFailedStatus
@dataclass(frozen=True, slots=True)
class ComputerUseFailedStatus()Attributes:
causeComputerUseDesktopFailurestatusLiteral['inactive'] = 'inactive'desktopLiteral['failed'] = 'failed'extra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseUnknownStatus
@dataclass(frozen=True, slots=True)
class ComputerUseUnknownStatus()A (status, desktop) pair this SDK release does not recognize, because a newer daemon added a value or a combination. raw_status / raw_desktop carry what the daemon sent; the recognized variants need no raw sibling, since their typed values are the wire values. cause is the failure the daemon attached to the unrecognized state, when it sent one.
Attributes:
raw_statusstrraw_desktopstrstatusLiteral['unknown'] = 'unknown'desktopLiteral['unknown'] = 'unknown'causeOptional[ComputerUseDesktopFailure] = Noneextra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseRestartResponse
@dataclass(frozen=True, slots=True)
class ComputerUseRestartResponse()Attributes:
messagestrstatusLiteral['active'] = 'active'desktopLiteral['ready'] = 'ready'extra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseProcessStatus
@dataclass(frozen=True, slots=True)
class ComputerUseProcessStatus()Attributes:
runningOptional[bool] = NonepriorityOptional[int] = Noneauto_restartOptional[bool] = NonepidOptional[int] = NonefailedOptional[bool] = Nonerestart_attemptsOptional[int] = Nonerestart_backoff_msOptional[int] = NonestatusOptional[str] = Noneextra_fieldsOptional[Dict[str, JsonValue]] = None
ComputerUseProcessRunningStatus
@dataclass(frozen=True, slots=True)
class ComputerUseProcessRunningStatus()Attributes:
process_namestrrunningbool
ComputerUsePoint
@dataclass(frozen=True, slots=True)
class ComputerUsePoint()Attributes:
xintyint
ComputerUseDisplay
@dataclass(frozen=True, slots=True)
class ComputerUseDisplay()Attributes:
idintxintyintwidthintheightintis_activebool
ComputerUseWindow
@dataclass(frozen=True, slots=True)
class ComputerUseWindow()Attributes:
idinttitlestrxintyintwidthintheightintis_activebool
ComputerUseAccessibilityBounds
@dataclass(frozen=True, slots=True)
class ComputerUseAccessibilityBounds()Attributes:
xintyintwidthintheightint
ComputerUseAccessibilityNode
@dataclass(frozen=True, slots=True)
class ComputerUseAccessibilityNode()Attributes:
idstrrolestrnamestrboundsComputerUseAccessibilityBoundsstatesList[str]descriptionOptional[str] = NoneactionsOptional[List[str]] = NonechildrenOptional[List[ComputerUseAccessibilityNode]] = NonevalueOptional[str] = Nonevalue_truncatedbool = False
ComputerUseRecording
@dataclass(frozen=True, slots=True)
class ComputerUseRecording()Attributes:
idstrfile_namestrfile_pathstrstart_timestrstatusstrend_timeOptional[str] = Noneduration_secondsOptional[float] = Nonesize_bytesOptional[int] = None
ComputerUseMouseButton
ComputerUseMouseButton = Literal['left', 'right', 'middle']ComputerUseScrollDirection
ComputerUseScrollDirection = Literal['up', 'down']ComputerUseScreenshotFormat
ComputerUseScreenshotFormat = Literal['png', 'jpeg']ComputerUseKeyboardModifier
ComputerUseKeyboardModifier = Literal['ctrl', 'alt', 'shift', 'cmd']ComputerUseA11yScope
ComputerUseA11yScope = Literal['focused', 'pid', 'all']ComputerUseA11yNameMatch
ComputerUseA11yNameMatch = Literal['exact', 'substring', 'regex']ComputerUseActivityStatus
ComputerUseActivityStatus = Literal['active', 'inactive', 'unknown']ComputerUseDesktopState
ComputerUseDesktopState = Literal['not_started', 'starting', 'ready', 'failed', 'unknown']ComputerUseDesktopFailureCode
ComputerUseDesktopFailureCode = Literal['desktop_exited', 'addon_crashed', 'start_failed', 'start_interrupted', 'session_ended', 'session_replaced', 'state_corrupt', 'state_persistence_failed', 'unknown']ComputerUseStatusResponse
ComputerUseStatusResponse = Union[ComputerUseNotStartedStatus, ComputerUseStartingStatus, ComputerUseReadyStatus, ComputerUseFailedStatus, ComputerUseUnknownStatus]ComputerUseLifecycleResponse
ComputerUseLifecycleResponse = ComputerUseLifecycleResultComputerUseProcessRestartResponse
ComputerUseProcessRestartResponse = ComputerUseProcessRestartResultComputerUseProcessLogsResponse
ComputerUseProcessLogsResponse = ComputerUseProcessLogsComputerUseProcessErrorsResponse
ComputerUseProcessErrorsResponse = ComputerUseProcessErrorsComputerUseScreenshotResponse
ComputerUseScreenshotResponse = ComputerUseScreenshotComputerUseScrollResponse
ComputerUseScrollResponse = ComputerUseScrollResultComputerUseDisplayInfoResponse
ComputerUseDisplayInfoResponse = ComputerUseDisplayInfoComputerUseDisplayWindowsResponse
ComputerUseDisplayWindowsResponse = ComputerUseDisplayWindowsComputerUseA11yTreeResponse
ComputerUseA11yTreeResponse = ComputerUseA11yTreeComputerUseA11yFindResponse
ComputerUseA11yFindResponse = ComputerUseA11yFindResultComputerUseRecordingsResponse
ComputerUseRecordingsResponse = ComputerUseRecordingList