northrays 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (711) hide show
  1. northrays/__init__.py +245 -0
  2. northrays/_async/__init__.py +2 -0
  3. northrays/_async/code_interpreter.py +302 -0
  4. northrays/_async/computer_use.py +930 -0
  5. northrays/_async/filesystem.py +1240 -0
  6. northrays/_async/git.py +391 -0
  7. northrays/_async/lsp_server.py +256 -0
  8. northrays/_async/northrays.py +819 -0
  9. northrays/_async/object_storage.py +190 -0
  10. northrays/_async/process.py +781 -0
  11. northrays/_async/sandbox.py +904 -0
  12. northrays/_async/snapshot.py +262 -0
  13. northrays/_async/volume.py +94 -0
  14. northrays/_sync/__init__.py +2 -0
  15. northrays/_sync/code_interpreter.py +271 -0
  16. northrays/_sync/computer_use.py +929 -0
  17. northrays/_sync/filesystem.py +1063 -0
  18. northrays/_sync/git.py +389 -0
  19. northrays/_sync/lsp_server.py +256 -0
  20. northrays/_sync/northrays.py +704 -0
  21. northrays/_sync/object_storage.py +184 -0
  22. northrays/_sync/process.py +778 -0
  23. northrays/_sync/sandbox.py +919 -0
  24. northrays/_sync/snapshot.py +262 -0
  25. northrays/_sync/volume.py +94 -0
  26. northrays/_utils/__init__.py +2 -0
  27. northrays/_utils/deprecation.py +95 -0
  28. northrays/_utils/docs_ignore.py +11 -0
  29. northrays/_utils/enum.py +27 -0
  30. northrays/_utils/env.py +38 -0
  31. northrays/_utils/environment.py +23 -0
  32. northrays/_utils/errors.py +298 -0
  33. northrays/_utils/otel_decorator.py +331 -0
  34. northrays/_utils/stream.py +368 -0
  35. northrays/_utils/timeout.py +484 -0
  36. northrays/_utils/types.py +16 -0
  37. northrays/common/__init__.py +2 -0
  38. northrays/common/charts.py +118 -0
  39. northrays/common/code_interpreter.py +44 -0
  40. northrays/common/computer_use.py +44 -0
  41. northrays/common/errors.py +187 -0
  42. northrays/common/file_transfer.py +69 -0
  43. northrays/common/filesystem.py +177 -0
  44. northrays/common/git.py +13 -0
  45. northrays/common/image.py +700 -0
  46. northrays/common/lsp_server.py +45 -0
  47. northrays/common/northrays.py +202 -0
  48. northrays/common/process.py +140 -0
  49. northrays/common/protocols.py +14 -0
  50. northrays/common/pty.py +65 -0
  51. northrays/common/sandbox.py +99 -0
  52. northrays/common/snapshot.py +84 -0
  53. northrays/common/volume.py +39 -0
  54. northrays/handle/async_pty_handle.py +323 -0
  55. northrays/handle/pty_handle.py +341 -0
  56. northrays/internal/__init__.py +2 -0
  57. northrays/internal/api_client_proxy.py +22 -0
  58. northrays/internal/http_client.py +99 -0
  59. northrays/internal/pool_tracker.py +44 -0
  60. northrays/internal/shared_session.py +262 -0
  61. northrays/internal/toolbox_api_client_proxy.py +114 -0
  62. northrays/internal/urllib3_retry.py +53 -0
  63. northrays/py.typed +0 -0
  64. northrays-0.1.0.dist-info/METADATA +211 -0
  65. northrays-0.1.0.dist-info/RECORD +711 -0
  66. northrays-0.1.0.dist-info/WHEEL +5 -0
  67. northrays-0.1.0.dist-info/licenses/LICENSE +191 -0
  68. northrays-0.1.0.dist-info/licenses/NOTICE +46 -0
  69. northrays-0.1.0.dist-info/top_level.txt +5 -0
  70. northrays_api_client/__init__.py +684 -0
  71. northrays_api_client/api/__init__.py +64 -0
  72. northrays_api_client/api/admin_api.py +5998 -0
  73. northrays_api_client/api/api_keys_api.py +1672 -0
  74. northrays_api_client/api/audit_api.py +402 -0
  75. northrays_api_client/api/config_api.py +278 -0
  76. northrays_api_client/api/docker_registry_api.py +1707 -0
  77. northrays_api_client/api/health_api.py +517 -0
  78. northrays_api_client/api/jobs_api.py +1185 -0
  79. northrays_api_client/api/object_storage_api.py +298 -0
  80. northrays_api_client/api/organizations_api.py +10857 -0
  81. northrays_api_client/api/preview_api.py +1104 -0
  82. northrays_api_client/api/regions_api.py +279 -0
  83. northrays_api_client/api/runners_api.py +2987 -0
  84. northrays_api_client/api/sandbox_api.py +12813 -0
  85. northrays_api_client/api/snapshots_api.py +2331 -0
  86. northrays_api_client/api/toolbox_api.py +20758 -0
  87. northrays_api_client/api/users_api.py +1304 -0
  88. northrays_api_client/api/volumes_api.py +1421 -0
  89. northrays_api_client/api/webhooks_api.py +1135 -0
  90. northrays_api_client/api_client.py +810 -0
  91. northrays_api_client/api_response.py +21 -0
  92. northrays_api_client/configuration.py +607 -0
  93. northrays_api_client/exceptions.py +219 -0
  94. northrays_api_client/models/__init__.py +405 -0
  95. northrays_api_client/models/account_provider.py +105 -0
  96. northrays_api_client/models/admin_create_runner.py +131 -0
  97. northrays_api_client/models/admin_get_webhook_status200_response.py +103 -0
  98. northrays_api_client/models/announcement.py +105 -0
  99. northrays_api_client/models/api_key_list.py +126 -0
  100. northrays_api_client/models/api_key_response.py +117 -0
  101. northrays_api_client/models/audit_log.py +134 -0
  102. northrays_api_client/models/build_info.py +112 -0
  103. northrays_api_client/models/command.py +107 -0
  104. northrays_api_client/models/completion_context.py +105 -0
  105. northrays_api_client/models/completion_item.py +115 -0
  106. northrays_api_client/models/completion_list.py +113 -0
  107. northrays_api_client/models/compressed_screenshot_response.py +107 -0
  108. northrays_api_client/models/computer_use_start_response.py +105 -0
  109. northrays_api_client/models/computer_use_status_response.py +103 -0
  110. northrays_api_client/models/computer_use_stop_response.py +105 -0
  111. northrays_api_client/models/create_api_key.py +113 -0
  112. northrays_api_client/models/create_build_info.py +105 -0
  113. northrays_api_client/models/create_docker_registry.py +111 -0
  114. northrays_api_client/models/create_linked_account.py +105 -0
  115. northrays_api_client/models/create_organization.py +105 -0
  116. northrays_api_client/models/create_organization_invitation.py +110 -0
  117. northrays_api_client/models/create_organization_quota.py +119 -0
  118. northrays_api_client/models/create_organization_region_quota.py +169 -0
  119. northrays_api_client/models/create_organization_role.py +107 -0
  120. northrays_api_client/models/create_region.py +124 -0
  121. northrays_api_client/models/create_region_response.py +131 -0
  122. northrays_api_client/models/create_runner.py +107 -0
  123. northrays_api_client/models/create_runner_response.py +105 -0
  124. northrays_api_client/models/create_sandbox.py +156 -0
  125. northrays_api_client/models/create_sandbox_snapshot.py +105 -0
  126. northrays_api_client/models/create_session_request.py +103 -0
  127. northrays_api_client/models/create_snapshot.py +129 -0
  128. northrays_api_client/models/create_user.py +119 -0
  129. northrays_api_client/models/create_volume.py +103 -0
  130. northrays_api_client/models/display_info_response.py +103 -0
  131. northrays_api_client/models/docker_registry.py +118 -0
  132. northrays_api_client/models/download_files.py +103 -0
  133. northrays_api_client/models/execute_request.py +107 -0
  134. northrays_api_client/models/execute_response.py +105 -0
  135. northrays_api_client/models/file_info.py +117 -0
  136. northrays_api_client/models/file_status.py +109 -0
  137. northrays_api_client/models/fork_sandbox.py +103 -0
  138. northrays_api_client/models/git_add_request.py +105 -0
  139. northrays_api_client/models/git_branch_request.py +105 -0
  140. northrays_api_client/models/git_checkout_request.py +105 -0
  141. northrays_api_client/models/git_clone_request.py +113 -0
  142. northrays_api_client/models/git_commit_info.py +111 -0
  143. northrays_api_client/models/git_commit_request.py +111 -0
  144. northrays_api_client/models/git_commit_response.py +103 -0
  145. northrays_api_client/models/git_delete_branch_request.py +105 -0
  146. northrays_api_client/models/git_repo_request.py +107 -0
  147. northrays_api_client/models/git_status.py +119 -0
  148. northrays_api_client/models/gpu_type.py +43 -0
  149. northrays_api_client/models/health_controller_check200_response.py +156 -0
  150. northrays_api_client/models/health_controller_check200_response_info_value.py +103 -0
  151. northrays_api_client/models/health_controller_check503_response.py +156 -0
  152. northrays_api_client/models/job.py +123 -0
  153. northrays_api_client/models/job_status.py +45 -0
  154. northrays_api_client/models/job_type.py +56 -0
  155. northrays_api_client/models/keyboard_hotkey_request.py +103 -0
  156. northrays_api_client/models/keyboard_press_request.py +105 -0
  157. northrays_api_client/models/keyboard_type_request.py +105 -0
  158. northrays_api_client/models/list_branch_response.py +103 -0
  159. northrays_api_client/models/list_sandboxes_response.py +118 -0
  160. northrays_api_client/models/log_entry.py +119 -0
  161. northrays_api_client/models/lsp_completion_params.py +119 -0
  162. northrays_api_client/models/lsp_document_request.py +107 -0
  163. northrays_api_client/models/lsp_location.py +109 -0
  164. northrays_api_client/models/lsp_server_request.py +105 -0
  165. northrays_api_client/models/lsp_symbol.py +111 -0
  166. northrays_api_client/models/match.py +107 -0
  167. northrays_api_client/models/metric_data_point.py +105 -0
  168. northrays_api_client/models/metric_series.py +113 -0
  169. northrays_api_client/models/metrics_response.py +111 -0
  170. northrays_api_client/models/mouse_click_request.py +109 -0
  171. northrays_api_client/models/mouse_click_response.py +105 -0
  172. northrays_api_client/models/mouse_drag_request.py +111 -0
  173. northrays_api_client/models/mouse_drag_response.py +105 -0
  174. northrays_api_client/models/mouse_move_request.py +105 -0
  175. northrays_api_client/models/mouse_move_response.py +105 -0
  176. northrays_api_client/models/mouse_position.py +105 -0
  177. northrays_api_client/models/mouse_scroll_request.py +109 -0
  178. northrays_api_client/models/mouse_scroll_response.py +103 -0
  179. northrays_api_client/models/northrays_configuration.py +162 -0
  180. northrays_api_client/models/oidc_config.py +107 -0
  181. northrays_api_client/models/organization.py +191 -0
  182. northrays_api_client/models/organization_invitation.py +132 -0
  183. northrays_api_client/models/organization_role.py +116 -0
  184. northrays_api_client/models/organization_sandbox_default_limited_network_egress.py +103 -0
  185. northrays_api_client/models/organization_suspension.py +109 -0
  186. northrays_api_client/models/organization_usage_overview.py +119 -0
  187. northrays_api_client/models/organization_user.py +126 -0
  188. northrays_api_client/models/otel_config.py +110 -0
  189. northrays_api_client/models/paginated_audit_logs.py +119 -0
  190. northrays_api_client/models/paginated_jobs.py +117 -0
  191. northrays_api_client/models/paginated_logs.py +117 -0
  192. northrays_api_client/models/paginated_sandboxes_deprecated.py +117 -0
  193. northrays_api_client/models/paginated_snapshots.py +117 -0
  194. northrays_api_client/models/paginated_traces.py +117 -0
  195. northrays_api_client/models/poll_jobs_response.py +111 -0
  196. northrays_api_client/models/port_preview_url.py +107 -0
  197. northrays_api_client/models/position.py +105 -0
  198. northrays_api_client/models/posthog_config.py +105 -0
  199. northrays_api_client/models/process_errors_response.py +105 -0
  200. northrays_api_client/models/process_logs_response.py +105 -0
  201. northrays_api_client/models/process_restart_response.py +105 -0
  202. northrays_api_client/models/process_status_response.py +105 -0
  203. northrays_api_client/models/project_dir_response.py +103 -0
  204. northrays_api_client/models/pty_create_request.py +113 -0
  205. northrays_api_client/models/pty_create_response.py +103 -0
  206. northrays_api_client/models/pty_list_response.py +111 -0
  207. northrays_api_client/models/pty_resize_request.py +105 -0
  208. northrays_api_client/models/pty_session_info.py +117 -0
  209. northrays_api_client/models/range.py +112 -0
  210. northrays_api_client/models/rate_limit_config.py +122 -0
  211. northrays_api_client/models/rate_limit_entry.py +105 -0
  212. northrays_api_client/models/regenerate_api_key_response.py +103 -0
  213. northrays_api_client/models/region.py +140 -0
  214. northrays_api_client/models/region_quota.py +168 -0
  215. northrays_api_client/models/region_screenshot_response.py +107 -0
  216. northrays_api_client/models/region_type.py +44 -0
  217. northrays_api_client/models/region_usage_overview.py +174 -0
  218. northrays_api_client/models/registry_push_access_dto.py +113 -0
  219. northrays_api_client/models/replace_request.py +107 -0
  220. northrays_api_client/models/replace_result.py +107 -0
  221. northrays_api_client/models/resize_sandbox.py +108 -0
  222. northrays_api_client/models/runner.py +166 -0
  223. northrays_api_client/models/runner_class.py +42 -0
  224. northrays_api_client/models/runner_full.py +171 -0
  225. northrays_api_client/models/runner_health_metrics.py +129 -0
  226. northrays_api_client/models/runner_healthcheck.py +125 -0
  227. northrays_api_client/models/runner_service_health.py +107 -0
  228. northrays_api_client/models/runner_snapshot_dto.py +107 -0
  229. northrays_api_client/models/runner_state.py +46 -0
  230. northrays_api_client/models/sandbox.py +188 -0
  231. northrays_api_client/models/sandbox_class.py +45 -0
  232. northrays_api_client/models/sandbox_desired_state.py +47 -0
  233. northrays_api_client/models/sandbox_labels.py +103 -0
  234. northrays_api_client/models/sandbox_list_item.py +161 -0
  235. northrays_api_client/models/sandbox_list_sort_direction.py +43 -0
  236. northrays_api_client/models/sandbox_list_sort_field.py +47 -0
  237. northrays_api_client/models/sandbox_state.py +63 -0
  238. northrays_api_client/models/sandbox_volume.py +107 -0
  239. northrays_api_client/models/screenshot_response.py +107 -0
  240. northrays_api_client/models/search_files_response.py +103 -0
  241. northrays_api_client/models/send_webhook_dto.py +108 -0
  242. northrays_api_client/models/session.py +118 -0
  243. northrays_api_client/models/session_execute_request.py +107 -0
  244. northrays_api_client/models/session_execute_response.py +107 -0
  245. northrays_api_client/models/set_snapshot_general_status_dto.py +103 -0
  246. northrays_api_client/models/signed_port_preview_url.py +109 -0
  247. northrays_api_client/models/snapshot_dto.py +172 -0
  248. northrays_api_client/models/snapshot_manager_credentials.py +105 -0
  249. northrays_api_client/models/snapshot_state.py +49 -0
  250. northrays_api_client/models/ssh_access_dto.py +116 -0
  251. northrays_api_client/models/ssh_access_validation_dto.py +105 -0
  252. northrays_api_client/models/storage_access_dto.py +113 -0
  253. northrays_api_client/models/toolbox_proxy_url.py +103 -0
  254. northrays_api_client/models/trace_span.py +119 -0
  255. northrays_api_client/models/trace_summary.py +115 -0
  256. northrays_api_client/models/update_docker_registry.py +111 -0
  257. northrays_api_client/models/update_job_status.py +108 -0
  258. northrays_api_client/models/update_organization_default_region.py +103 -0
  259. northrays_api_client/models/update_organization_invitation.py +108 -0
  260. northrays_api_client/models/update_organization_member_access.py +105 -0
  261. northrays_api_client/models/update_organization_quota.py +192 -0
  262. northrays_api_client/models/update_organization_region_quota.py +189 -0
  263. northrays_api_client/models/update_organization_role.py +107 -0
  264. northrays_api_client/models/update_region.py +122 -0
  265. northrays_api_client/models/update_sandbox_network_settings.py +107 -0
  266. northrays_api_client/models/update_sandbox_state_dto.py +107 -0
  267. northrays_api_client/models/url.py +103 -0
  268. northrays_api_client/models/user.py +120 -0
  269. northrays_api_client/models/user_home_dir_response.py +103 -0
  270. northrays_api_client/models/user_public_key.py +105 -0
  271. northrays_api_client/models/volume_dto.py +128 -0
  272. northrays_api_client/models/volume_state.py +48 -0
  273. northrays_api_client/models/webhook_app_portal_access.py +105 -0
  274. northrays_api_client/models/webhook_event.py +48 -0
  275. northrays_api_client/models/webhook_initialization_status.py +123 -0
  276. northrays_api_client/models/windows_response.py +105 -0
  277. northrays_api_client/models/work_dir_response.py +103 -0
  278. northrays_api_client/py.typed +0 -0
  279. northrays_api_client/rest.py +264 -0
  280. northrays_api_client_async/__init__.py +684 -0
  281. northrays_api_client_async/api/__init__.py +64 -0
  282. northrays_api_client_async/api/admin_api.py +5998 -0
  283. northrays_api_client_async/api/api_keys_api.py +1672 -0
  284. northrays_api_client_async/api/audit_api.py +402 -0
  285. northrays_api_client_async/api/config_api.py +278 -0
  286. northrays_api_client_async/api/docker_registry_api.py +1707 -0
  287. northrays_api_client_async/api/health_api.py +517 -0
  288. northrays_api_client_async/api/jobs_api.py +1185 -0
  289. northrays_api_client_async/api/object_storage_api.py +298 -0
  290. northrays_api_client_async/api/organizations_api.py +10857 -0
  291. northrays_api_client_async/api/preview_api.py +1104 -0
  292. northrays_api_client_async/api/regions_api.py +279 -0
  293. northrays_api_client_async/api/runners_api.py +2987 -0
  294. northrays_api_client_async/api/sandbox_api.py +12813 -0
  295. northrays_api_client_async/api/snapshots_api.py +2331 -0
  296. northrays_api_client_async/api/toolbox_api.py +20758 -0
  297. northrays_api_client_async/api/users_api.py +1304 -0
  298. northrays_api_client_async/api/volumes_api.py +1421 -0
  299. northrays_api_client_async/api/webhooks_api.py +1135 -0
  300. northrays_api_client_async/api_client.py +813 -0
  301. northrays_api_client_async/api_response.py +21 -0
  302. northrays_api_client_async/configuration.py +605 -0
  303. northrays_api_client_async/exceptions.py +219 -0
  304. northrays_api_client_async/models/__init__.py +405 -0
  305. northrays_api_client_async/models/account_provider.py +105 -0
  306. northrays_api_client_async/models/admin_create_runner.py +131 -0
  307. northrays_api_client_async/models/admin_get_webhook_status200_response.py +103 -0
  308. northrays_api_client_async/models/announcement.py +105 -0
  309. northrays_api_client_async/models/api_key_list.py +126 -0
  310. northrays_api_client_async/models/api_key_response.py +117 -0
  311. northrays_api_client_async/models/audit_log.py +134 -0
  312. northrays_api_client_async/models/build_info.py +112 -0
  313. northrays_api_client_async/models/command.py +107 -0
  314. northrays_api_client_async/models/completion_context.py +105 -0
  315. northrays_api_client_async/models/completion_item.py +115 -0
  316. northrays_api_client_async/models/completion_list.py +113 -0
  317. northrays_api_client_async/models/compressed_screenshot_response.py +107 -0
  318. northrays_api_client_async/models/computer_use_start_response.py +105 -0
  319. northrays_api_client_async/models/computer_use_status_response.py +103 -0
  320. northrays_api_client_async/models/computer_use_stop_response.py +105 -0
  321. northrays_api_client_async/models/create_api_key.py +113 -0
  322. northrays_api_client_async/models/create_build_info.py +105 -0
  323. northrays_api_client_async/models/create_docker_registry.py +111 -0
  324. northrays_api_client_async/models/create_linked_account.py +105 -0
  325. northrays_api_client_async/models/create_organization.py +105 -0
  326. northrays_api_client_async/models/create_organization_invitation.py +110 -0
  327. northrays_api_client_async/models/create_organization_quota.py +119 -0
  328. northrays_api_client_async/models/create_organization_region_quota.py +169 -0
  329. northrays_api_client_async/models/create_organization_role.py +107 -0
  330. northrays_api_client_async/models/create_region.py +124 -0
  331. northrays_api_client_async/models/create_region_response.py +131 -0
  332. northrays_api_client_async/models/create_runner.py +107 -0
  333. northrays_api_client_async/models/create_runner_response.py +105 -0
  334. northrays_api_client_async/models/create_sandbox.py +156 -0
  335. northrays_api_client_async/models/create_sandbox_snapshot.py +105 -0
  336. northrays_api_client_async/models/create_session_request.py +103 -0
  337. northrays_api_client_async/models/create_snapshot.py +129 -0
  338. northrays_api_client_async/models/create_user.py +119 -0
  339. northrays_api_client_async/models/create_volume.py +103 -0
  340. northrays_api_client_async/models/display_info_response.py +103 -0
  341. northrays_api_client_async/models/docker_registry.py +118 -0
  342. northrays_api_client_async/models/download_files.py +103 -0
  343. northrays_api_client_async/models/execute_request.py +107 -0
  344. northrays_api_client_async/models/execute_response.py +105 -0
  345. northrays_api_client_async/models/file_info.py +117 -0
  346. northrays_api_client_async/models/file_status.py +109 -0
  347. northrays_api_client_async/models/fork_sandbox.py +103 -0
  348. northrays_api_client_async/models/git_add_request.py +105 -0
  349. northrays_api_client_async/models/git_branch_request.py +105 -0
  350. northrays_api_client_async/models/git_checkout_request.py +105 -0
  351. northrays_api_client_async/models/git_clone_request.py +113 -0
  352. northrays_api_client_async/models/git_commit_info.py +111 -0
  353. northrays_api_client_async/models/git_commit_request.py +111 -0
  354. northrays_api_client_async/models/git_commit_response.py +103 -0
  355. northrays_api_client_async/models/git_delete_branch_request.py +105 -0
  356. northrays_api_client_async/models/git_repo_request.py +107 -0
  357. northrays_api_client_async/models/git_status.py +119 -0
  358. northrays_api_client_async/models/gpu_type.py +43 -0
  359. northrays_api_client_async/models/health_controller_check200_response.py +156 -0
  360. northrays_api_client_async/models/health_controller_check200_response_info_value.py +103 -0
  361. northrays_api_client_async/models/health_controller_check503_response.py +156 -0
  362. northrays_api_client_async/models/job.py +123 -0
  363. northrays_api_client_async/models/job_status.py +45 -0
  364. northrays_api_client_async/models/job_type.py +56 -0
  365. northrays_api_client_async/models/keyboard_hotkey_request.py +103 -0
  366. northrays_api_client_async/models/keyboard_press_request.py +105 -0
  367. northrays_api_client_async/models/keyboard_type_request.py +105 -0
  368. northrays_api_client_async/models/list_branch_response.py +103 -0
  369. northrays_api_client_async/models/list_sandboxes_response.py +118 -0
  370. northrays_api_client_async/models/log_entry.py +119 -0
  371. northrays_api_client_async/models/lsp_completion_params.py +119 -0
  372. northrays_api_client_async/models/lsp_document_request.py +107 -0
  373. northrays_api_client_async/models/lsp_location.py +109 -0
  374. northrays_api_client_async/models/lsp_server_request.py +105 -0
  375. northrays_api_client_async/models/lsp_symbol.py +111 -0
  376. northrays_api_client_async/models/match.py +107 -0
  377. northrays_api_client_async/models/metric_data_point.py +105 -0
  378. northrays_api_client_async/models/metric_series.py +113 -0
  379. northrays_api_client_async/models/metrics_response.py +111 -0
  380. northrays_api_client_async/models/mouse_click_request.py +109 -0
  381. northrays_api_client_async/models/mouse_click_response.py +105 -0
  382. northrays_api_client_async/models/mouse_drag_request.py +111 -0
  383. northrays_api_client_async/models/mouse_drag_response.py +105 -0
  384. northrays_api_client_async/models/mouse_move_request.py +105 -0
  385. northrays_api_client_async/models/mouse_move_response.py +105 -0
  386. northrays_api_client_async/models/mouse_position.py +105 -0
  387. northrays_api_client_async/models/mouse_scroll_request.py +109 -0
  388. northrays_api_client_async/models/mouse_scroll_response.py +103 -0
  389. northrays_api_client_async/models/northrays_configuration.py +162 -0
  390. northrays_api_client_async/models/oidc_config.py +107 -0
  391. northrays_api_client_async/models/organization.py +191 -0
  392. northrays_api_client_async/models/organization_invitation.py +132 -0
  393. northrays_api_client_async/models/organization_role.py +116 -0
  394. northrays_api_client_async/models/organization_sandbox_default_limited_network_egress.py +103 -0
  395. northrays_api_client_async/models/organization_suspension.py +109 -0
  396. northrays_api_client_async/models/organization_usage_overview.py +119 -0
  397. northrays_api_client_async/models/organization_user.py +126 -0
  398. northrays_api_client_async/models/otel_config.py +110 -0
  399. northrays_api_client_async/models/paginated_audit_logs.py +119 -0
  400. northrays_api_client_async/models/paginated_jobs.py +117 -0
  401. northrays_api_client_async/models/paginated_logs.py +117 -0
  402. northrays_api_client_async/models/paginated_sandboxes_deprecated.py +117 -0
  403. northrays_api_client_async/models/paginated_snapshots.py +117 -0
  404. northrays_api_client_async/models/paginated_traces.py +117 -0
  405. northrays_api_client_async/models/poll_jobs_response.py +111 -0
  406. northrays_api_client_async/models/port_preview_url.py +107 -0
  407. northrays_api_client_async/models/position.py +105 -0
  408. northrays_api_client_async/models/posthog_config.py +105 -0
  409. northrays_api_client_async/models/process_errors_response.py +105 -0
  410. northrays_api_client_async/models/process_logs_response.py +105 -0
  411. northrays_api_client_async/models/process_restart_response.py +105 -0
  412. northrays_api_client_async/models/process_status_response.py +105 -0
  413. northrays_api_client_async/models/project_dir_response.py +103 -0
  414. northrays_api_client_async/models/pty_create_request.py +113 -0
  415. northrays_api_client_async/models/pty_create_response.py +103 -0
  416. northrays_api_client_async/models/pty_list_response.py +111 -0
  417. northrays_api_client_async/models/pty_resize_request.py +105 -0
  418. northrays_api_client_async/models/pty_session_info.py +117 -0
  419. northrays_api_client_async/models/range.py +112 -0
  420. northrays_api_client_async/models/rate_limit_config.py +122 -0
  421. northrays_api_client_async/models/rate_limit_entry.py +105 -0
  422. northrays_api_client_async/models/regenerate_api_key_response.py +103 -0
  423. northrays_api_client_async/models/region.py +140 -0
  424. northrays_api_client_async/models/region_quota.py +168 -0
  425. northrays_api_client_async/models/region_screenshot_response.py +107 -0
  426. northrays_api_client_async/models/region_type.py +44 -0
  427. northrays_api_client_async/models/region_usage_overview.py +174 -0
  428. northrays_api_client_async/models/registry_push_access_dto.py +113 -0
  429. northrays_api_client_async/models/replace_request.py +107 -0
  430. northrays_api_client_async/models/replace_result.py +107 -0
  431. northrays_api_client_async/models/resize_sandbox.py +108 -0
  432. northrays_api_client_async/models/runner.py +166 -0
  433. northrays_api_client_async/models/runner_class.py +42 -0
  434. northrays_api_client_async/models/runner_full.py +171 -0
  435. northrays_api_client_async/models/runner_health_metrics.py +129 -0
  436. northrays_api_client_async/models/runner_healthcheck.py +125 -0
  437. northrays_api_client_async/models/runner_service_health.py +107 -0
  438. northrays_api_client_async/models/runner_snapshot_dto.py +107 -0
  439. northrays_api_client_async/models/runner_state.py +46 -0
  440. northrays_api_client_async/models/sandbox.py +188 -0
  441. northrays_api_client_async/models/sandbox_class.py +45 -0
  442. northrays_api_client_async/models/sandbox_desired_state.py +47 -0
  443. northrays_api_client_async/models/sandbox_labels.py +103 -0
  444. northrays_api_client_async/models/sandbox_list_item.py +161 -0
  445. northrays_api_client_async/models/sandbox_list_sort_direction.py +43 -0
  446. northrays_api_client_async/models/sandbox_list_sort_field.py +47 -0
  447. northrays_api_client_async/models/sandbox_state.py +63 -0
  448. northrays_api_client_async/models/sandbox_volume.py +107 -0
  449. northrays_api_client_async/models/screenshot_response.py +107 -0
  450. northrays_api_client_async/models/search_files_response.py +103 -0
  451. northrays_api_client_async/models/send_webhook_dto.py +108 -0
  452. northrays_api_client_async/models/session.py +118 -0
  453. northrays_api_client_async/models/session_execute_request.py +107 -0
  454. northrays_api_client_async/models/session_execute_response.py +107 -0
  455. northrays_api_client_async/models/set_snapshot_general_status_dto.py +103 -0
  456. northrays_api_client_async/models/signed_port_preview_url.py +109 -0
  457. northrays_api_client_async/models/snapshot_dto.py +172 -0
  458. northrays_api_client_async/models/snapshot_manager_credentials.py +105 -0
  459. northrays_api_client_async/models/snapshot_state.py +49 -0
  460. northrays_api_client_async/models/ssh_access_dto.py +116 -0
  461. northrays_api_client_async/models/ssh_access_validation_dto.py +105 -0
  462. northrays_api_client_async/models/storage_access_dto.py +113 -0
  463. northrays_api_client_async/models/toolbox_proxy_url.py +103 -0
  464. northrays_api_client_async/models/trace_span.py +119 -0
  465. northrays_api_client_async/models/trace_summary.py +115 -0
  466. northrays_api_client_async/models/update_docker_registry.py +111 -0
  467. northrays_api_client_async/models/update_job_status.py +108 -0
  468. northrays_api_client_async/models/update_organization_default_region.py +103 -0
  469. northrays_api_client_async/models/update_organization_invitation.py +108 -0
  470. northrays_api_client_async/models/update_organization_member_access.py +105 -0
  471. northrays_api_client_async/models/update_organization_quota.py +192 -0
  472. northrays_api_client_async/models/update_organization_region_quota.py +189 -0
  473. northrays_api_client_async/models/update_organization_role.py +107 -0
  474. northrays_api_client_async/models/update_region.py +122 -0
  475. northrays_api_client_async/models/update_sandbox_network_settings.py +107 -0
  476. northrays_api_client_async/models/update_sandbox_state_dto.py +107 -0
  477. northrays_api_client_async/models/url.py +103 -0
  478. northrays_api_client_async/models/user.py +120 -0
  479. northrays_api_client_async/models/user_home_dir_response.py +103 -0
  480. northrays_api_client_async/models/user_public_key.py +105 -0
  481. northrays_api_client_async/models/volume_dto.py +128 -0
  482. northrays_api_client_async/models/volume_state.py +48 -0
  483. northrays_api_client_async/models/webhook_app_portal_access.py +105 -0
  484. northrays_api_client_async/models/webhook_event.py +48 -0
  485. northrays_api_client_async/models/webhook_initialization_status.py +123 -0
  486. northrays_api_client_async/models/windows_response.py +105 -0
  487. northrays_api_client_async/models/work_dir_response.py +103 -0
  488. northrays_api_client_async/py.typed +0 -0
  489. northrays_api_client_async/rest.py +227 -0
  490. northrays_toolbox_api_client/__init__.py +386 -0
  491. northrays_toolbox_api_client/api/__init__.py +46 -0
  492. northrays_toolbox_api_client/api/computer_use_api.py +9075 -0
  493. northrays_toolbox_api_client/api/file_system_api.py +3583 -0
  494. northrays_toolbox_api_client/api/git_api.py +2969 -0
  495. northrays_toolbox_api_client/api/info_api.py +773 -0
  496. northrays_toolbox_api_client/api/interpreter_api.py +1075 -0
  497. northrays_toolbox_api_client/api/lsp_api.py +1971 -0
  498. northrays_toolbox_api_client/api/port_api.py +543 -0
  499. northrays_toolbox_api_client/api/process_api.py +4865 -0
  500. northrays_toolbox_api_client/api/server_api.py +298 -0
  501. northrays_toolbox_api_client/api_client.py +809 -0
  502. northrays_toolbox_api_client/api_response.py +21 -0
  503. northrays_toolbox_api_client/configuration.py +626 -0
  504. northrays_toolbox_api_client/exceptions.py +218 -0
  505. northrays_toolbox_api_client/models/__init__.py +224 -0
  506. northrays_toolbox_api_client/models/accessibility_bounds.py +108 -0
  507. northrays_toolbox_api_client/models/accessibility_invoke_request.py +104 -0
  508. northrays_toolbox_api_client/models/accessibility_node_request.py +102 -0
  509. northrays_toolbox_api_client/models/accessibility_nodes_response.py +112 -0
  510. northrays_toolbox_api_client/models/accessibility_set_value_request.py +104 -0
  511. northrays_toolbox_api_client/models/accessibility_tree_response.py +108 -0
  512. northrays_toolbox_api_client/models/chart.py +132 -0
  513. northrays_toolbox_api_client/models/chart_element.py +134 -0
  514. northrays_toolbox_api_client/models/code_run_artifacts.py +110 -0
  515. northrays_toolbox_api_client/models/code_run_request.py +110 -0
  516. northrays_toolbox_api_client/models/code_run_response.py +110 -0
  517. northrays_toolbox_api_client/models/command.py +106 -0
  518. northrays_toolbox_api_client/models/completion_context.py +104 -0
  519. northrays_toolbox_api_client/models/completion_item.py +114 -0
  520. northrays_toolbox_api_client/models/completion_list.py +112 -0
  521. northrays_toolbox_api_client/models/computer_use_accessibility_node.py +129 -0
  522. northrays_toolbox_api_client/models/computer_use_start_response.py +117 -0
  523. northrays_toolbox_api_client/models/computer_use_status_response.py +102 -0
  524. northrays_toolbox_api_client/models/computer_use_stop_response.py +117 -0
  525. northrays_toolbox_api_client/models/create_context_request.py +104 -0
  526. northrays_toolbox_api_client/models/create_session_request.py +102 -0
  527. northrays_toolbox_api_client/models/display_info.py +112 -0
  528. northrays_toolbox_api_client/models/display_info_response.py +110 -0
  529. northrays_toolbox_api_client/models/execute_request.py +108 -0
  530. northrays_toolbox_api_client/models/execute_response.py +104 -0
  531. northrays_toolbox_api_client/models/file_info.py +118 -0
  532. northrays_toolbox_api_client/models/file_status.py +109 -0
  533. northrays_toolbox_api_client/models/files_download_request.py +102 -0
  534. northrays_toolbox_api_client/models/find_accessibility_nodes_request.py +114 -0
  535. northrays_toolbox_api_client/models/git_add_request.py +104 -0
  536. northrays_toolbox_api_client/models/git_branch_request.py +104 -0
  537. northrays_toolbox_api_client/models/git_checkout_request.py +104 -0
  538. northrays_toolbox_api_client/models/git_clone_request.py +114 -0
  539. northrays_toolbox_api_client/models/git_commit_info.py +110 -0
  540. northrays_toolbox_api_client/models/git_commit_request.py +110 -0
  541. northrays_toolbox_api_client/models/git_commit_response.py +102 -0
  542. northrays_toolbox_api_client/models/git_delete_branch_request.py +104 -0
  543. northrays_toolbox_api_client/models/git_repo_request.py +106 -0
  544. northrays_toolbox_api_client/models/git_status.py +118 -0
  545. northrays_toolbox_api_client/models/initialize_request.py +102 -0
  546. northrays_toolbox_api_client/models/interpreter_context.py +110 -0
  547. northrays_toolbox_api_client/models/is_port_in_use_response.py +102 -0
  548. northrays_toolbox_api_client/models/keyboard_hotkey_request.py +102 -0
  549. northrays_toolbox_api_client/models/keyboard_press_request.py +104 -0
  550. northrays_toolbox_api_client/models/keyboard_type_request.py +104 -0
  551. northrays_toolbox_api_client/models/list_branch_response.py +102 -0
  552. northrays_toolbox_api_client/models/list_contexts_response.py +110 -0
  553. northrays_toolbox_api_client/models/list_recordings_response.py +110 -0
  554. northrays_toolbox_api_client/models/lsp_completion_params.py +118 -0
  555. northrays_toolbox_api_client/models/lsp_document_request.py +106 -0
  556. northrays_toolbox_api_client/models/lsp_location.py +108 -0
  557. northrays_toolbox_api_client/models/lsp_position.py +104 -0
  558. northrays_toolbox_api_client/models/lsp_range.py +111 -0
  559. northrays_toolbox_api_client/models/lsp_server_request.py +104 -0
  560. northrays_toolbox_api_client/models/lsp_symbol.py +110 -0
  561. northrays_toolbox_api_client/models/match.py +106 -0
  562. northrays_toolbox_api_client/models/mouse_click_request.py +108 -0
  563. northrays_toolbox_api_client/models/mouse_click_response.py +104 -0
  564. northrays_toolbox_api_client/models/mouse_drag_request.py +110 -0
  565. northrays_toolbox_api_client/models/mouse_drag_response.py +104 -0
  566. northrays_toolbox_api_client/models/mouse_move_request.py +104 -0
  567. northrays_toolbox_api_client/models/mouse_position_response.py +104 -0
  568. northrays_toolbox_api_client/models/mouse_scroll_request.py +109 -0
  569. northrays_toolbox_api_client/models/port_list.py +102 -0
  570. northrays_toolbox_api_client/models/position.py +104 -0
  571. northrays_toolbox_api_client/models/process_errors_response.py +104 -0
  572. northrays_toolbox_api_client/models/process_logs_response.py +104 -0
  573. northrays_toolbox_api_client/models/process_restart_response.py +104 -0
  574. northrays_toolbox_api_client/models/process_status.py +108 -0
  575. northrays_toolbox_api_client/models/process_status_response.py +104 -0
  576. northrays_toolbox_api_client/models/pty_create_request.py +112 -0
  577. northrays_toolbox_api_client/models/pty_create_response.py +102 -0
  578. northrays_toolbox_api_client/models/pty_list_response.py +110 -0
  579. northrays_toolbox_api_client/models/pty_resize_request.py +105 -0
  580. northrays_toolbox_api_client/models/pty_session_info.py +116 -0
  581. northrays_toolbox_api_client/models/recording.py +116 -0
  582. northrays_toolbox_api_client/models/replace_request.py +106 -0
  583. northrays_toolbox_api_client/models/replace_result.py +106 -0
  584. northrays_toolbox_api_client/models/screenshot_response.py +110 -0
  585. northrays_toolbox_api_client/models/scroll_response.py +102 -0
  586. northrays_toolbox_api_client/models/search_files_response.py +102 -0
  587. northrays_toolbox_api_client/models/session.py +112 -0
  588. northrays_toolbox_api_client/models/session_command_logs_response.py +106 -0
  589. northrays_toolbox_api_client/models/session_execute_request.py +108 -0
  590. northrays_toolbox_api_client/models/session_execute_response.py +110 -0
  591. northrays_toolbox_api_client/models/session_send_input_request.py +102 -0
  592. northrays_toolbox_api_client/models/start_recording_request.py +102 -0
  593. northrays_toolbox_api_client/models/status.py +48 -0
  594. northrays_toolbox_api_client/models/stop_recording_request.py +102 -0
  595. northrays_toolbox_api_client/models/user_home_dir_response.py +102 -0
  596. northrays_toolbox_api_client/models/window_info.py +114 -0
  597. northrays_toolbox_api_client/models/windows_response.py +110 -0
  598. northrays_toolbox_api_client/models/work_dir_response.py +102 -0
  599. northrays_toolbox_api_client/py.typed +0 -0
  600. northrays_toolbox_api_client/rest.py +263 -0
  601. northrays_toolbox_api_client_async/__init__.py +386 -0
  602. northrays_toolbox_api_client_async/api/__init__.py +46 -0
  603. northrays_toolbox_api_client_async/api/computer_use_api.py +9075 -0
  604. northrays_toolbox_api_client_async/api/file_system_api.py +3583 -0
  605. northrays_toolbox_api_client_async/api/git_api.py +2969 -0
  606. northrays_toolbox_api_client_async/api/info_api.py +773 -0
  607. northrays_toolbox_api_client_async/api/interpreter_api.py +1075 -0
  608. northrays_toolbox_api_client_async/api/lsp_api.py +1971 -0
  609. northrays_toolbox_api_client_async/api/port_api.py +543 -0
  610. northrays_toolbox_api_client_async/api/process_api.py +4865 -0
  611. northrays_toolbox_api_client_async/api/server_api.py +298 -0
  612. northrays_toolbox_api_client_async/api_client.py +812 -0
  613. northrays_toolbox_api_client_async/api_response.py +21 -0
  614. northrays_toolbox_api_client_async/configuration.py +624 -0
  615. northrays_toolbox_api_client_async/exceptions.py +218 -0
  616. northrays_toolbox_api_client_async/models/__init__.py +224 -0
  617. northrays_toolbox_api_client_async/models/accessibility_bounds.py +108 -0
  618. northrays_toolbox_api_client_async/models/accessibility_invoke_request.py +104 -0
  619. northrays_toolbox_api_client_async/models/accessibility_node_request.py +102 -0
  620. northrays_toolbox_api_client_async/models/accessibility_nodes_response.py +112 -0
  621. northrays_toolbox_api_client_async/models/accessibility_set_value_request.py +104 -0
  622. northrays_toolbox_api_client_async/models/accessibility_tree_response.py +108 -0
  623. northrays_toolbox_api_client_async/models/chart.py +132 -0
  624. northrays_toolbox_api_client_async/models/chart_element.py +134 -0
  625. northrays_toolbox_api_client_async/models/code_run_artifacts.py +110 -0
  626. northrays_toolbox_api_client_async/models/code_run_request.py +110 -0
  627. northrays_toolbox_api_client_async/models/code_run_response.py +110 -0
  628. northrays_toolbox_api_client_async/models/command.py +106 -0
  629. northrays_toolbox_api_client_async/models/completion_context.py +104 -0
  630. northrays_toolbox_api_client_async/models/completion_item.py +114 -0
  631. northrays_toolbox_api_client_async/models/completion_list.py +112 -0
  632. northrays_toolbox_api_client_async/models/computer_use_accessibility_node.py +129 -0
  633. northrays_toolbox_api_client_async/models/computer_use_start_response.py +117 -0
  634. northrays_toolbox_api_client_async/models/computer_use_status_response.py +102 -0
  635. northrays_toolbox_api_client_async/models/computer_use_stop_response.py +117 -0
  636. northrays_toolbox_api_client_async/models/create_context_request.py +104 -0
  637. northrays_toolbox_api_client_async/models/create_session_request.py +102 -0
  638. northrays_toolbox_api_client_async/models/display_info.py +112 -0
  639. northrays_toolbox_api_client_async/models/display_info_response.py +110 -0
  640. northrays_toolbox_api_client_async/models/execute_request.py +108 -0
  641. northrays_toolbox_api_client_async/models/execute_response.py +104 -0
  642. northrays_toolbox_api_client_async/models/file_info.py +118 -0
  643. northrays_toolbox_api_client_async/models/file_status.py +109 -0
  644. northrays_toolbox_api_client_async/models/files_download_request.py +102 -0
  645. northrays_toolbox_api_client_async/models/find_accessibility_nodes_request.py +114 -0
  646. northrays_toolbox_api_client_async/models/git_add_request.py +104 -0
  647. northrays_toolbox_api_client_async/models/git_branch_request.py +104 -0
  648. northrays_toolbox_api_client_async/models/git_checkout_request.py +104 -0
  649. northrays_toolbox_api_client_async/models/git_clone_request.py +114 -0
  650. northrays_toolbox_api_client_async/models/git_commit_info.py +110 -0
  651. northrays_toolbox_api_client_async/models/git_commit_request.py +110 -0
  652. northrays_toolbox_api_client_async/models/git_commit_response.py +102 -0
  653. northrays_toolbox_api_client_async/models/git_delete_branch_request.py +104 -0
  654. northrays_toolbox_api_client_async/models/git_repo_request.py +106 -0
  655. northrays_toolbox_api_client_async/models/git_status.py +118 -0
  656. northrays_toolbox_api_client_async/models/initialize_request.py +102 -0
  657. northrays_toolbox_api_client_async/models/interpreter_context.py +110 -0
  658. northrays_toolbox_api_client_async/models/is_port_in_use_response.py +102 -0
  659. northrays_toolbox_api_client_async/models/keyboard_hotkey_request.py +102 -0
  660. northrays_toolbox_api_client_async/models/keyboard_press_request.py +104 -0
  661. northrays_toolbox_api_client_async/models/keyboard_type_request.py +104 -0
  662. northrays_toolbox_api_client_async/models/list_branch_response.py +102 -0
  663. northrays_toolbox_api_client_async/models/list_contexts_response.py +110 -0
  664. northrays_toolbox_api_client_async/models/list_recordings_response.py +110 -0
  665. northrays_toolbox_api_client_async/models/lsp_completion_params.py +118 -0
  666. northrays_toolbox_api_client_async/models/lsp_document_request.py +106 -0
  667. northrays_toolbox_api_client_async/models/lsp_location.py +108 -0
  668. northrays_toolbox_api_client_async/models/lsp_position.py +104 -0
  669. northrays_toolbox_api_client_async/models/lsp_range.py +111 -0
  670. northrays_toolbox_api_client_async/models/lsp_server_request.py +104 -0
  671. northrays_toolbox_api_client_async/models/lsp_symbol.py +110 -0
  672. northrays_toolbox_api_client_async/models/match.py +106 -0
  673. northrays_toolbox_api_client_async/models/mouse_click_request.py +108 -0
  674. northrays_toolbox_api_client_async/models/mouse_click_response.py +104 -0
  675. northrays_toolbox_api_client_async/models/mouse_drag_request.py +110 -0
  676. northrays_toolbox_api_client_async/models/mouse_drag_response.py +104 -0
  677. northrays_toolbox_api_client_async/models/mouse_move_request.py +104 -0
  678. northrays_toolbox_api_client_async/models/mouse_position_response.py +104 -0
  679. northrays_toolbox_api_client_async/models/mouse_scroll_request.py +109 -0
  680. northrays_toolbox_api_client_async/models/port_list.py +102 -0
  681. northrays_toolbox_api_client_async/models/position.py +104 -0
  682. northrays_toolbox_api_client_async/models/process_errors_response.py +104 -0
  683. northrays_toolbox_api_client_async/models/process_logs_response.py +104 -0
  684. northrays_toolbox_api_client_async/models/process_restart_response.py +104 -0
  685. northrays_toolbox_api_client_async/models/process_status.py +108 -0
  686. northrays_toolbox_api_client_async/models/process_status_response.py +104 -0
  687. northrays_toolbox_api_client_async/models/pty_create_request.py +112 -0
  688. northrays_toolbox_api_client_async/models/pty_create_response.py +102 -0
  689. northrays_toolbox_api_client_async/models/pty_list_response.py +110 -0
  690. northrays_toolbox_api_client_async/models/pty_resize_request.py +105 -0
  691. northrays_toolbox_api_client_async/models/pty_session_info.py +116 -0
  692. northrays_toolbox_api_client_async/models/recording.py +116 -0
  693. northrays_toolbox_api_client_async/models/replace_request.py +106 -0
  694. northrays_toolbox_api_client_async/models/replace_result.py +106 -0
  695. northrays_toolbox_api_client_async/models/screenshot_response.py +110 -0
  696. northrays_toolbox_api_client_async/models/scroll_response.py +102 -0
  697. northrays_toolbox_api_client_async/models/search_files_response.py +102 -0
  698. northrays_toolbox_api_client_async/models/session.py +112 -0
  699. northrays_toolbox_api_client_async/models/session_command_logs_response.py +106 -0
  700. northrays_toolbox_api_client_async/models/session_execute_request.py +108 -0
  701. northrays_toolbox_api_client_async/models/session_execute_response.py +110 -0
  702. northrays_toolbox_api_client_async/models/session_send_input_request.py +102 -0
  703. northrays_toolbox_api_client_async/models/start_recording_request.py +102 -0
  704. northrays_toolbox_api_client_async/models/status.py +48 -0
  705. northrays_toolbox_api_client_async/models/stop_recording_request.py +102 -0
  706. northrays_toolbox_api_client_async/models/user_home_dir_response.py +102 -0
  707. northrays_toolbox_api_client_async/models/window_info.py +114 -0
  708. northrays_toolbox_api_client_async/models/windows_response.py +110 -0
  709. northrays_toolbox_api_client_async/models/work_dir_response.py +102 -0
  710. northrays_toolbox_api_client_async/py.typed +0 -0
  711. northrays_toolbox_api_client_async/rest.py +226 -0
@@ -0,0 +1,930 @@
1
+ # Copyright Daytona Platforms Inc.
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ from __future__ import annotations
5
+
6
+ import os
7
+
8
+ import aiofiles
9
+
10
+ from northrays_toolbox_api_client_async import (
11
+ AccessibilityInvokeRequest,
12
+ AccessibilityNodeRequest,
13
+ AccessibilityNodesResponse,
14
+ AccessibilitySetValueRequest,
15
+ AccessibilityTreeResponse,
16
+ ComputerUseApi,
17
+ ComputerUseStartResponse,
18
+ ComputerUseStatusResponse,
19
+ ComputerUseStopResponse,
20
+ DisplayInfoResponse,
21
+ FindAccessibilityNodesRequest,
22
+ KeyboardHotkeyRequest,
23
+ KeyboardPressRequest,
24
+ KeyboardTypeRequest,
25
+ ListRecordingsResponse,
26
+ MouseClickRequest,
27
+ MouseClickResponse,
28
+ MouseDragRequest,
29
+ MouseDragResponse,
30
+ MouseMoveRequest,
31
+ MousePositionResponse,
32
+ MouseScrollRequest,
33
+ ProcessErrorsResponse,
34
+ ProcessLogsResponse,
35
+ ProcessRestartResponse,
36
+ ProcessStatusResponse,
37
+ Recording,
38
+ ScreenshotResponse,
39
+ StartRecordingRequest,
40
+ StopRecordingRequest,
41
+ WindowsResponse,
42
+ )
43
+
44
+ from .._utils.errors import intercept_errors
45
+ from .._utils.otel_decorator import with_instrumentation
46
+ from ..common.computer_use import ScreenshotOptions, ScreenshotRegion
47
+ from ..internal.http_client import aiohttp_request_timeout as _request_timeout
48
+ from ..internal.shared_session import http_session_of
49
+
50
+
51
+ class AsyncMouse:
52
+ """Mouse operations for computer use functionality."""
53
+
54
+ def __init__(self, api_client: ComputerUseApi):
55
+ self._api_client: ComputerUseApi = api_client
56
+
57
+ @intercept_errors(message_prefix="Failed to get mouse position: ")
58
+ @with_instrumentation()
59
+ async def get_position(self) -> MousePositionResponse:
60
+ """Gets the current mouse cursor position.
61
+
62
+ Returns:
63
+ MousePositionResponse: Current mouse position with x and y coordinates.
64
+
65
+ Example:
66
+ ```python
67
+ position = await sandbox.computer_use.mouse.get_position()
68
+ print(f"Mouse is at: {position.x}, {position.y}")
69
+ ```
70
+ """
71
+ response = await self._api_client.get_mouse_position()
72
+ return response
73
+
74
+ @intercept_errors(message_prefix="Failed to move mouse: ")
75
+ @with_instrumentation()
76
+ async def move(self, x: int, y: int) -> MousePositionResponse:
77
+ """Moves the mouse cursor to the specified coordinates.
78
+
79
+ Args:
80
+ x (int): The x coordinate to move to.
81
+ y (int): The y coordinate to move to.
82
+
83
+ Returns:
84
+ MousePositionResponse: Position after move.
85
+
86
+ Example:
87
+ ```python
88
+ result = await sandbox.computer_use.mouse.move(100, 200)
89
+ print(f"Mouse moved to: {result.x}, {result.y}")
90
+ ```
91
+ """
92
+ request = MouseMoveRequest(x=x, y=y)
93
+ response = await self._api_client.move_mouse(request)
94
+ return response
95
+
96
+ @intercept_errors(message_prefix="Failed to click mouse: ")
97
+ @with_instrumentation()
98
+ async def click(self, x: int, y: int, button: str = "left", double: bool = False) -> MouseClickResponse:
99
+ """Clicks the mouse at the specified coordinates.
100
+
101
+ Args:
102
+ x (int): The x coordinate to click at.
103
+ y (int): The y coordinate to click at.
104
+ button (str): The mouse button to click ('left', 'right', 'middle').
105
+ double (bool): Whether to perform a double-click.
106
+
107
+ Returns:
108
+ MouseClickResponse: Click operation result.
109
+
110
+ Example:
111
+ ```python
112
+ # Single left click
113
+ result = await sandbox.computer_use.mouse.click(100, 200)
114
+
115
+ # Double click
116
+ double_click = await sandbox.computer_use.mouse.click(100, 200, "left", True)
117
+
118
+ # Right click
119
+ right_click = await sandbox.computer_use.mouse.click(100, 200, "right")
120
+ ```
121
+ """
122
+ request = MouseClickRequest(x=x, y=y, button=button, double=double)
123
+ response = await self._api_client.click(request)
124
+ return response
125
+
126
+ @intercept_errors(message_prefix="Failed to drag mouse: ")
127
+ @with_instrumentation()
128
+ async def drag(self, start_x: int, start_y: int, end_x: int, end_y: int, button: str = "left") -> MouseDragResponse:
129
+ """Drags the mouse from start coordinates to end coordinates.
130
+
131
+ Args:
132
+ start_x (int): The starting x coordinate.
133
+ start_y (int): The starting y coordinate.
134
+ end_x (int): The ending x coordinate.
135
+ end_y (int): The ending y coordinate.
136
+ button (str): The mouse button to use for dragging.
137
+
138
+ Returns:
139
+ MouseDragResponse: Drag operation result.
140
+
141
+ Example:
142
+ ```python
143
+ result = await sandbox.computer_use.mouse.drag(50, 50, 150, 150)
144
+ print(f"Drag ended at {result.x}, {result.y}")
145
+ ```
146
+ """
147
+ request = MouseDragRequest(start_x=start_x, start_y=start_y, end_x=end_x, end_y=end_y, button=button)
148
+ response = await self._api_client.drag(request=request)
149
+ return response
150
+
151
+ @intercept_errors(message_prefix="Failed to scroll mouse: ")
152
+ @with_instrumentation()
153
+ async def scroll(self, x: int, y: int, direction: str, amount: int = 1) -> bool:
154
+ """Scrolls the mouse wheel at the specified coordinates.
155
+
156
+ Args:
157
+ x (int): The x coordinate to scroll at.
158
+ y (int): The y coordinate to scroll at.
159
+ direction (str): The direction to scroll ('up' or 'down').
160
+ amount (int): The amount to scroll.
161
+
162
+ Returns:
163
+ bool: Whether the scroll operation was successful.
164
+
165
+ Example:
166
+ ```python
167
+ # Scroll up
168
+ scroll_up = await sandbox.computer_use.mouse.scroll(100, 200, "up", 3)
169
+
170
+ # Scroll down
171
+ scroll_down = await sandbox.computer_use.mouse.scroll(100, 200, "down", 5)
172
+ ```
173
+ """
174
+ request = MouseScrollRequest(x=x, y=y, direction=direction, amount=amount)
175
+ response = await self._api_client.scroll(request=request)
176
+ return response.success is True
177
+
178
+
179
+ class AsyncKeyboard:
180
+ """Keyboard operations for computer use functionality."""
181
+
182
+ def __init__(self, api_client: ComputerUseApi):
183
+ self._api_client: ComputerUseApi = api_client
184
+
185
+ @intercept_errors(message_prefix="Failed to type text: ")
186
+ @with_instrumentation()
187
+ async def type(self, text: str, delay: int | None = None) -> None:
188
+ """Types the specified text.
189
+
190
+ Args:
191
+ text (str): The text to type.
192
+ delay (int): Delay between characters in milliseconds.
193
+
194
+ Raises:
195
+ NorthraysError: If the type operation fails.
196
+
197
+ Example:
198
+ ```python
199
+ try:
200
+ await sandbox.computer_use.keyboard.type("Hello, World!")
201
+ print(f"Operation success")
202
+ except Exception as e:
203
+ print(f"Operation failed: {e}")
204
+
205
+ # With delay between characters
206
+ try:
207
+ await sandbox.computer_use.keyboard.type("Slow typing", 100)
208
+ print(f"Operation success")
209
+ except Exception as e:
210
+ print(f"Operation failed: {e}")
211
+ ```
212
+ """
213
+ request = KeyboardTypeRequest(text=text, delay=delay)
214
+ _ = await self._api_client.type_text(request=request)
215
+
216
+ @intercept_errors(message_prefix="Failed to press key: ")
217
+ @with_instrumentation()
218
+ async def press(self, key: str, modifiers: list[str] | None = None) -> None:
219
+ """Presses a key with optional modifiers.
220
+
221
+ Args:
222
+ key (str): The key to press. Canonical names include 'enter', 'escape',
223
+ 'tab', letters, digits, unshifted punctuation, function keys, and
224
+ grammar-safe numpad names such as 'num_plus'. Named keys are
225
+ case-insensitive, and common aliases such as 'Return' and 'Escape'
226
+ are normalized.
227
+ modifiers (list[str]): Canonical modifier names are 'ctrl', 'alt',
228
+ 'shift', and 'cmd'. Common aliases such as 'control', 'option',
229
+ 'meta', and 'win' are normalized.
230
+
231
+ Raises:
232
+ NorthraysError: If the press operation fails.
233
+
234
+ Example:
235
+ ```python
236
+ # Press Enter
237
+ try:
238
+ await sandbox.computer_use.keyboard.press("enter")
239
+ print(f"Operation success")
240
+ except Exception as e:
241
+ print(f"Operation failed: {e}")
242
+
243
+ # Press Ctrl+C
244
+ try:
245
+ await sandbox.computer_use.keyboard.press("c", ["ctrl"])
246
+ print(f"Operation success")
247
+
248
+ # Press Ctrl+Shift+T
249
+ try:
250
+ await sandbox.computer_use.keyboard.press("t", ["ctrl", "shift"])
251
+ print(f"Operation success")
252
+ except Exception as e:
253
+ print(f"Operation failed: {e}")
254
+ ```
255
+ """
256
+ request = KeyboardPressRequest(key=key, modifiers=modifiers or [])
257
+ _ = await self._api_client.press_key(request=request)
258
+
259
+ @intercept_errors(message_prefix="Failed to press hotkey: ")
260
+ @with_instrumentation()
261
+ async def hotkey(self, keys: str) -> None:
262
+ """Presses a hotkey combination.
263
+
264
+ Args:
265
+ keys (str): A single atomic hotkey chord (e.g., 'ctrl+c', 'alt+tab',
266
+ 'cmd+shift+t', 'ctrl + c', 'shift'). Uses the same normalized key
267
+ contract as ``press()``.
268
+
269
+ Raises:
270
+ NorthraysError: If the hotkey operation fails.
271
+
272
+ Example:
273
+ ```python
274
+ # Copy
275
+ try:
276
+ await sandbox.computer_use.keyboard.hotkey("ctrl+c")
277
+ print(f"Operation success")
278
+ except Exception as e:
279
+ print(f"Operation failed: {e}")
280
+
281
+ # Paste
282
+ try:
283
+ await sandbox.computer_use.keyboard.hotkey("ctrl+v")
284
+ print(f"Operation success")
285
+ except Exception as e:
286
+ print(f"Operation failed: {e}")
287
+
288
+ # Alt+Tab
289
+ try:
290
+ await sandbox.computer_use.keyboard.hotkey("alt+tab")
291
+ print(f"Operation success")
292
+ except Exception as e:
293
+ print(f"Operation failed: {e}")
294
+ ```
295
+ """
296
+ request = KeyboardHotkeyRequest(keys=keys)
297
+ _ = await self._api_client.press_hotkey(request=request)
298
+
299
+
300
+ class AsyncScreenshot:
301
+ """Screenshot operations for computer use functionality."""
302
+
303
+ def __init__(self, api_client: ComputerUseApi):
304
+ self._api_client: ComputerUseApi = api_client
305
+
306
+ @intercept_errors(message_prefix="Failed to take screenshot: ")
307
+ @with_instrumentation()
308
+ async def take_full_screen(self, show_cursor: bool = False) -> ScreenshotResponse:
309
+ """Takes a screenshot of the entire screen.
310
+
311
+ Args:
312
+ show_cursor (bool): Whether to show the cursor in the screenshot.
313
+
314
+ Returns:
315
+ ScreenshotResponse: Screenshot data with base64 encoded image.
316
+
317
+ Example:
318
+ ```python
319
+ screenshot = await sandbox.computer_use.screenshot.take_full_screen()
320
+ print(f"Screenshot size: {screenshot.width}x{screenshot.height}")
321
+
322
+ # With cursor visible
323
+ with_cursor = await sandbox.computer_use.screenshot.take_full_screen(True)
324
+ ```
325
+ """
326
+ response = await self._api_client.take_screenshot(show_cursor=show_cursor)
327
+ return response
328
+
329
+ @intercept_errors(message_prefix="Failed to take region screenshot: ")
330
+ @with_instrumentation()
331
+ async def take_region(self, region: ScreenshotRegion, show_cursor: bool = False) -> ScreenshotResponse:
332
+ """Takes a screenshot of a specific region.
333
+
334
+ Args:
335
+ region (ScreenshotRegion): The region to capture.
336
+ show_cursor (bool): Whether to show the cursor in the screenshot.
337
+
338
+ Returns:
339
+ ScreenshotResponse: Screenshot data with base64 encoded image.
340
+
341
+ Example:
342
+ ```python
343
+ region = ScreenshotRegion(x=100, y=100, width=300, height=200)
344
+ screenshot = await sandbox.computer_use.screenshot.take_region(region)
345
+ print(f"Captured region: {screenshot.region.width}x{screenshot.region.height}")
346
+ ```
347
+ """
348
+ response = await self._api_client.take_region_screenshot(
349
+ height=region.height, width=region.width, y=region.y, x=region.x, show_cursor=show_cursor
350
+ )
351
+ return response
352
+
353
+ @intercept_errors(message_prefix="Failed to take compressed screenshot: ")
354
+ @with_instrumentation()
355
+ async def take_compressed(self, options: ScreenshotOptions | None = None) -> ScreenshotResponse:
356
+ """Takes a compressed screenshot of the entire screen.
357
+
358
+ Args:
359
+ options (ScreenshotOptions | None): Compression and display options.
360
+
361
+ Returns:
362
+ ScreenshotResponse: Compressed screenshot data.
363
+
364
+ Example:
365
+ ```python
366
+ # Default compression
367
+ screenshot = await sandbox.computer_use.screenshot.take_compressed()
368
+
369
+ # High quality JPEG
370
+ jpeg = await sandbox.computer_use.screenshot.take_compressed(
371
+ ScreenshotOptions(format="jpeg", quality=95, show_cursor=True)
372
+ )
373
+
374
+ # Scaled down PNG
375
+ scaled = await sandbox.computer_use.screenshot.take_compressed(
376
+ ScreenshotOptions(format="png", scale=0.5)
377
+ )
378
+ ```
379
+ """
380
+ if options is None:
381
+ options = ScreenshotOptions()
382
+
383
+ response = await self._api_client.take_compressed_screenshot(
384
+ scale=options.scale,
385
+ quality=options.quality,
386
+ format=options.fmt,
387
+ show_cursor=options.show_cursor,
388
+ )
389
+ return response
390
+
391
+ @intercept_errors(message_prefix="Failed to take compressed region screenshot: ")
392
+ @with_instrumentation()
393
+ async def take_compressed_region(
394
+ self, region: ScreenshotRegion, options: ScreenshotOptions | None = None
395
+ ) -> ScreenshotResponse:
396
+ """Takes a compressed screenshot of a specific region.
397
+
398
+ Args:
399
+ region (ScreenshotRegion): The region to capture.
400
+ options (ScreenshotOptions | None): Compression and display options.
401
+
402
+ Returns:
403
+ ScreenshotResponse: Compressed screenshot data.
404
+
405
+ Example:
406
+ ```python
407
+ region = ScreenshotRegion(x=0, y=0, width=800, height=600)
408
+ screenshot = await sandbox.computer_use.screenshot.take_compressed_region(
409
+ region,
410
+ ScreenshotOptions(format="webp", quality=80, show_cursor=True)
411
+ )
412
+ print(f"Compressed size: {screenshot.size_bytes} bytes")
413
+ ```
414
+ """
415
+ if options is None:
416
+ options = ScreenshotOptions()
417
+
418
+ response = await self._api_client.take_compressed_region_screenshot(
419
+ height=region.height,
420
+ width=region.width,
421
+ y=region.y,
422
+ x=region.x,
423
+ scale=options.scale,
424
+ quality=options.quality,
425
+ format=options.fmt,
426
+ show_cursor=options.show_cursor,
427
+ )
428
+ return response
429
+
430
+
431
+ class AsyncDisplay:
432
+ """Display operations for computer use functionality."""
433
+
434
+ def __init__(self, api_client: ComputerUseApi):
435
+ self._api_client: ComputerUseApi = api_client
436
+
437
+ @intercept_errors(message_prefix="Failed to get display info: ")
438
+ @with_instrumentation()
439
+ async def get_info(self) -> DisplayInfoResponse:
440
+ """Gets information about the displays.
441
+
442
+ Returns:
443
+ DisplayInfoResponse: Display information including primary display and all available displays.
444
+
445
+ Example:
446
+ ```python
447
+ info = await sandbox.computer_use.display.get_info()
448
+ print(f"Primary display: {info.primary_display.width}x{info.primary_display.height}")
449
+ print(f"Total displays: {info.total_displays}")
450
+ for i, display in enumerate(info.displays):
451
+ print(f"Display {i}: {display.width}x{display.height} at {display.x},{display.y}")
452
+ ```
453
+ """
454
+ response = await self._api_client.get_display_info()
455
+ return response
456
+
457
+ @intercept_errors(message_prefix="Failed to get windows: ")
458
+ @with_instrumentation()
459
+ async def get_windows(self) -> WindowsResponse:
460
+ """Gets the list of open windows.
461
+
462
+ Returns:
463
+ WindowsResponse: List of open windows with their IDs and titles.
464
+
465
+ Example:
466
+ ```python
467
+ windows = await sandbox.computer_use.display.get_windows()
468
+ print(f"Found {windows.count} open windows:")
469
+ for window in windows.windows:
470
+ print(f"- {window.title} (ID: {window.id})")
471
+ ```
472
+ """
473
+ response = await self._api_client.get_windows()
474
+ return response
475
+
476
+
477
+ class AsyncRecordingService:
478
+ """Recording operations for computer use functionality."""
479
+
480
+ def __init__(
481
+ self,
482
+ api_client: ComputerUseApi,
483
+ ):
484
+ self._api_client: ComputerUseApi = api_client
485
+
486
+ @intercept_errors(message_prefix="Failed to start recording: ")
487
+ @with_instrumentation()
488
+ async def start(self, label: str | None = None) -> Recording:
489
+ """Starts a new screen recording session.
490
+
491
+ Args:
492
+ label (str | None): Optional custom label for the recording.
493
+
494
+ Returns:
495
+ Recording: Recording start response.
496
+
497
+ Example:
498
+ ```python
499
+ # Start a recording with a label
500
+ recording = await sandbox.computer_use.recording.start("my-test-recording")
501
+ print(f"Recording started: {recording.id}")
502
+ print(f"File: {recording.file_path}")
503
+ ```
504
+ """
505
+ request = StartRecordingRequest(label=label)
506
+ return await self._api_client.start_recording(request=request)
507
+
508
+ @intercept_errors(message_prefix="Failed to stop recording: ")
509
+ @with_instrumentation()
510
+ async def stop(self, recording_id: str) -> Recording:
511
+ """Stops an active screen recording session.
512
+
513
+ Args:
514
+ recording_id (str): The ID of the recording to stop.
515
+
516
+ Returns:
517
+ Recording: Recording stop response.
518
+
519
+ Example:
520
+ ```python
521
+ result = await sandbox.computer_use.recording.stop(recording.id)
522
+ print(f"Recording stopped: {result.duration_seconds} seconds")
523
+ print(f"Saved to: {result.file_path}")
524
+ ```
525
+ """
526
+ request = StopRecordingRequest(id=recording_id)
527
+ return await self._api_client.stop_recording(request=request)
528
+
529
+ @intercept_errors(message_prefix="Failed to list recordings: ")
530
+ @with_instrumentation()
531
+ async def list(self) -> ListRecordingsResponse:
532
+ """Lists all recordings (active and completed).
533
+
534
+ Returns:
535
+ ListRecordingsResponse: List of all recordings.
536
+
537
+ Example:
538
+ ```python
539
+ recordings = await sandbox.computer_use.recording.list()
540
+ print(f"Found {len(recordings.recordings)} recordings")
541
+ for rec in recordings.recordings:
542
+ print(f"- {rec.file_name}: {rec.status}")
543
+ ```
544
+ """
545
+ return await self._api_client.list_recordings()
546
+
547
+ @intercept_errors(message_prefix="Failed to get recording: ")
548
+ @with_instrumentation()
549
+ async def get(self, recording_id: str) -> Recording:
550
+ """Gets details of a specific recording by ID.
551
+
552
+ Args:
553
+ recording_id (str): The ID of the recording to retrieve.
554
+
555
+ Returns:
556
+ Recording: Recording details.
557
+
558
+ Example:
559
+ ```python
560
+ recording = await sandbox.computer_use.recording.get(recording_id)
561
+ print(f"Recording: {recording.file_name}")
562
+ print(f"Status: {recording.status}")
563
+ print(f"Duration: {recording.duration_seconds} seconds")
564
+ ```
565
+ """
566
+ return await self._api_client.get_recording(id=recording_id)
567
+
568
+ @intercept_errors(message_prefix="Failed to delete recording: ")
569
+ @with_instrumentation()
570
+ async def delete(self, recording_id: str) -> None:
571
+ """Deletes a recording by ID.
572
+
573
+ Args:
574
+ recording_id (str): The ID of the recording to delete.
575
+
576
+ Example:
577
+ ```python
578
+ await sandbox.computer_use.recording.delete(recording_id)
579
+ print("Recording deleted")
580
+ ```
581
+ """
582
+ await self._api_client.delete_recording(id=recording_id)
583
+
584
+ @intercept_errors(message_prefix="Failed to download recording: ")
585
+ @with_instrumentation()
586
+ async def download(self, recording_id: str, local_path: str) -> None:
587
+ """Downloads a recording file from the Sandbox and saves it to a local file.
588
+
589
+ The file is streamed directly to disk without loading the entire content into memory.
590
+
591
+ Args:
592
+ recording_id (str): The ID of the recording to download.
593
+ local_path (str): Path to save the recording file locally.
594
+
595
+ Example:
596
+ ```python
597
+ # Download recording to file
598
+ await sandbox.computer_use.recording.download(recording_id, "local_recording.mp4")
599
+ print("Recording downloaded")
600
+ ```
601
+ """
602
+ # Serialize the request to get the URL and headers
603
+ method, url, headers, *_ = self._api_client._download_recording_serialize(
604
+ id=recording_id,
605
+ _request_auth=None,
606
+ _content_type=None,
607
+ _headers=None,
608
+ _host_index=None,
609
+ )
610
+
611
+ # Create parent directory if it doesn't exist
612
+ parent_dir = os.path.dirname(os.path.abspath(local_path))
613
+ if parent_dir:
614
+ os.makedirs(parent_dir, exist_ok=True)
615
+
616
+ download_timeout = 30 * 60
617
+ async with http_session_of(self._api_client.api_client).request(
618
+ method,
619
+ url,
620
+ headers=headers,
621
+ timeout=_request_timeout(download_timeout),
622
+ ) as response:
623
+ response.raise_for_status()
624
+
625
+ async with aiofiles.open(local_path, "wb") as f:
626
+ async for chunk in response.content.iter_chunked(64 * 1024):
627
+ _ = await f.write(chunk)
628
+
629
+
630
+ class AsyncAccessibility:
631
+ """Accessibility operations for computer use functionality.
632
+
633
+ This service exposes thin wrappers over the toolbox AT-SPI accessibility
634
+ API. Start computer use before calling these methods.
635
+ """
636
+
637
+ def __init__(self, api_client: ComputerUseApi):
638
+ self._api_client: ComputerUseApi = api_client
639
+
640
+ @intercept_errors(message_prefix="Failed to get accessibility tree: ")
641
+ @with_instrumentation()
642
+ async def get_tree(
643
+ self,
644
+ scope: str | None = None,
645
+ pid: int | None = None,
646
+ max_depth: int | None = None,
647
+ ) -> AccessibilityTreeResponse:
648
+ """Fetches the AT-SPI accessibility tree.
649
+
650
+ Args:
651
+ scope (str | None): Tree scope to inspect: ``focused``, ``pid``, or ``all``.
652
+ pid (int | None): Process ID when ``scope`` is ``pid``.
653
+ max_depth (int | None): Maximum depth to descend. Use ``0`` for the root only.
654
+
655
+ Returns:
656
+ AccessibilityTreeResponse: Accessibility tree rooted at the requested scope.
657
+
658
+ Example:
659
+ ```python
660
+ tree = await sandbox.computer_use.accessibility.get_tree(scope="all", max_depth=3)
661
+ print(tree.root.name)
662
+ ```
663
+ """
664
+ return await self._api_client.get_accessibility_tree(scope=scope, pid=pid, max_depth=max_depth)
665
+
666
+ @intercept_errors(message_prefix="Failed to find accessibility nodes: ")
667
+ @with_instrumentation()
668
+ async def find_nodes(
669
+ self,
670
+ scope: str | None = None,
671
+ pid: int | None = None,
672
+ role: str | None = None,
673
+ name: str | None = None,
674
+ name_match: str | None = None,
675
+ states: list[str] | None = None,
676
+ limit: int | None = None,
677
+ ) -> AccessibilityNodesResponse:
678
+ """Finds AT-SPI accessibility nodes matching the provided filters.
679
+
680
+ Args:
681
+ scope (str | None): Search scope: ``focused``, ``pid``, or ``all``.
682
+ pid (int | None): Process ID when ``scope`` is ``pid``.
683
+ role (str | None): Accessibility role to match, such as ``button``.
684
+ name (str | None): Accessible name to match.
685
+ name_match (str | None): Name match mode, such as ``exact`` or ``substring``.
686
+ states (list[str] | None): Required accessibility states.
687
+ limit (int | None): Maximum number of matches. Use ``0`` to let the API apply its default.
688
+
689
+ Returns:
690
+ AccessibilityNodesResponse: Matching accessibility nodes.
691
+
692
+ Example:
693
+ ```python
694
+ buttons = await sandbox.computer_use.accessibility.find_nodes(
695
+ scope="all",
696
+ role="button",
697
+ name="Submit",
698
+ name_match="substring",
699
+ )
700
+ print(len(buttons.matches))
701
+ ```
702
+ """
703
+ request = FindAccessibilityNodesRequest(
704
+ scope=scope,
705
+ pid=pid,
706
+ role=role,
707
+ name=name,
708
+ name_match=name_match,
709
+ states=states,
710
+ limit=limit,
711
+ )
712
+ return await self._api_client.find_accessibility_nodes(request=request)
713
+
714
+ @intercept_errors(message_prefix="Failed to focus accessibility node: ")
715
+ @with_instrumentation()
716
+ async def focus_node(self, node_id: str) -> None:
717
+ """Focuses an AT-SPI accessibility node.
718
+
719
+ Args:
720
+ node_id (str): Accessibility node ID returned by ``get_tree`` or ``find_nodes``.
721
+
722
+ Raises:
723
+ NorthraysError: If the focus operation fails. API failures may use a more specific subclass.
724
+
725
+ Example:
726
+ ```python
727
+ await sandbox.computer_use.accessibility.focus_node(node.id)
728
+ ```
729
+ """
730
+ request = AccessibilityNodeRequest(id=node_id)
731
+ _ = await self._api_client.focus_accessibility_node(request=request)
732
+
733
+ @intercept_errors(message_prefix="Failed to invoke accessibility node: ")
734
+ @with_instrumentation()
735
+ async def invoke_node(self, node_id: str, action: str | None = None) -> None:
736
+ """Invokes an AT-SPI accessibility node action.
737
+
738
+ Args:
739
+ node_id (str): Accessibility node ID returned by ``get_tree`` or ``find_nodes``.
740
+ action (str | None): Action name to invoke. If omitted, the API invokes the primary action.
741
+
742
+ Raises:
743
+ NorthraysError: If the invoke operation fails. API failures may use a more specific subclass.
744
+
745
+ Example:
746
+ ```python
747
+ await sandbox.computer_use.accessibility.invoke_node(node.id, action="click")
748
+ ```
749
+ """
750
+ request = AccessibilityInvokeRequest(id=node_id, action=action)
751
+ _ = await self._api_client.invoke_accessibility_node(request=request)
752
+
753
+ @intercept_errors(message_prefix="Failed to set accessibility node value: ")
754
+ @with_instrumentation()
755
+ async def set_node_value(self, node_id: str, value: str) -> None:
756
+ """Sets an AT-SPI accessibility node value.
757
+
758
+ Args:
759
+ node_id (str): Accessibility node ID returned by ``get_tree`` or ``find_nodes``.
760
+ value (str): Value to write to the node.
761
+
762
+ Raises:
763
+ NorthraysError: If the value update fails. API failures may use a more specific subclass.
764
+
765
+ Example:
766
+ ```python
767
+ await sandbox.computer_use.accessibility.set_node_value(node.id, "hello")
768
+ ```
769
+ """
770
+ request = AccessibilitySetValueRequest(id=node_id, value=value)
771
+ _ = await self._api_client.set_accessibility_node_value(request=request)
772
+
773
+
774
+ class AsyncComputerUse:
775
+ """Computer Use functionality for interacting with the desktop environment.
776
+
777
+ Provides access to mouse, keyboard, screenshot, display, recording, and accessibility operations
778
+ for automating desktop interactions within a sandbox.
779
+
780
+ Attributes:
781
+ mouse (AsyncMouse): Mouse operations interface.
782
+ keyboard (AsyncKeyboard): Keyboard operations interface.
783
+ screenshot (AsyncScreenshot): Screenshot operations interface.
784
+ display (AsyncDisplay): Display operations interface.
785
+ recording (AsyncRecordingService): Screen recording operations interface.
786
+ accessibility (AsyncAccessibility): Accessibility operations interface.
787
+ """
788
+
789
+ def __init__(
790
+ self,
791
+ api_client: ComputerUseApi,
792
+ ):
793
+ self._api_client: ComputerUseApi = api_client
794
+
795
+ self.mouse: AsyncMouse = AsyncMouse(api_client)
796
+ self.keyboard: AsyncKeyboard = AsyncKeyboard(api_client)
797
+ self.screenshot: AsyncScreenshot = AsyncScreenshot(api_client)
798
+ self.display: AsyncDisplay = AsyncDisplay(api_client)
799
+ self.recording: AsyncRecordingService = AsyncRecordingService(api_client)
800
+ self.accessibility: AsyncAccessibility = AsyncAccessibility(api_client)
801
+
802
+ @intercept_errors(message_prefix="Failed to start computer use: ")
803
+ @with_instrumentation()
804
+ async def start(self) -> ComputerUseStartResponse:
805
+ """Starts all computer use processes (Xvfb, xfce4, x11vnc, novnc).
806
+
807
+ Returns:
808
+ ComputerUseStartResponse: Computer use start response.
809
+
810
+ Example:
811
+ ```python
812
+ result = await sandbox.computer_use.start()
813
+ print("Computer use processes started:", result.message)
814
+ ```
815
+ """
816
+ response = await self._api_client.start_computer_use()
817
+ return response
818
+
819
+ @intercept_errors(message_prefix="Failed to stop computer use: ")
820
+ @with_instrumentation()
821
+ async def stop(self) -> ComputerUseStopResponse:
822
+ """Stops all computer use processes.
823
+
824
+ Returns:
825
+ ComputerUseStopResponse: Computer use stop response.
826
+
827
+ Example:
828
+ ```python
829
+ result = await sandbox.computer_use.stop()
830
+ print("Computer use processes stopped:", result.message)
831
+ ```
832
+ """
833
+ response = await self._api_client.stop_computer_use()
834
+ return response
835
+
836
+ @intercept_errors(message_prefix="Failed to get computer use status: ")
837
+ @with_instrumentation()
838
+ async def get_status(self) -> ComputerUseStatusResponse:
839
+ """Gets the status of all computer use processes.
840
+
841
+ Returns:
842
+ ComputerUseStatusResponse: Status information about all VNC desktop processes.
843
+
844
+ Example:
845
+ ```python
846
+ response = await sandbox.computer_use.get_status()
847
+ print("Computer use status:", response.status)
848
+ ```
849
+ """
850
+ return await self._api_client.get_computer_use_status()
851
+
852
+ @intercept_errors(message_prefix="Failed to get process status: ")
853
+ @with_instrumentation()
854
+ async def get_process_status(self, process_name: str) -> ProcessStatusResponse:
855
+ """Gets the status of a specific VNC process.
856
+
857
+ Args:
858
+ process_name (str): Name of the process to check.
859
+
860
+ Returns:
861
+ ProcessStatusResponse: Status information about the specific process.
862
+
863
+ Example:
864
+ ```python
865
+ xvfb_status = await sandbox.computer_use.get_process_status("xvfb")
866
+ no_vnc_status = await sandbox.computer_use.get_process_status("novnc")
867
+ ```
868
+ """
869
+ response = await self._api_client.get_process_status(process_name=process_name)
870
+ return response
871
+
872
+ @intercept_errors(message_prefix="Failed to restart process: ")
873
+ @with_instrumentation()
874
+ async def restart_process(self, process_name: str) -> ProcessRestartResponse:
875
+ """Restarts a specific VNC process.
876
+
877
+ Args:
878
+ process_name (str): Name of the process to restart.
879
+
880
+ Returns:
881
+ ProcessRestartResponse: Process restart response.
882
+
883
+ Example:
884
+ ```python
885
+ result = await sandbox.computer_use.restart_process("xfce4")
886
+ print("XFCE4 process restarted:", result.message)
887
+ ```
888
+ """
889
+ response = await self._api_client.restart_process(process_name=process_name)
890
+ return response
891
+
892
+ @intercept_errors(message_prefix="Failed to get process logs: ")
893
+ @with_instrumentation()
894
+ async def get_process_logs(self, process_name: str) -> ProcessLogsResponse:
895
+ """Gets logs for a specific VNC process.
896
+
897
+ Args:
898
+ process_name (str): Name of the process to get logs for.
899
+
900
+ Returns:
901
+ ProcessLogsResponse: Process logs.
902
+
903
+ Example:
904
+ ```python
905
+ logs = await sandbox.computer_use.get_process_logs("novnc")
906
+ print("NoVNC logs:", logs)
907
+ ```
908
+ """
909
+ response = await self._api_client.get_process_logs(process_name=process_name)
910
+ return response
911
+
912
+ @intercept_errors(message_prefix="Failed to get process errors: ")
913
+ @with_instrumentation()
914
+ async def get_process_errors(self, process_name: str) -> ProcessErrorsResponse:
915
+ """Gets error logs for a specific VNC process.
916
+
917
+ Args:
918
+ process_name (str): Name of the process to get error logs for.
919
+
920
+ Returns:
921
+ ProcessErrorsResponse: Process error logs.
922
+
923
+ Example:
924
+ ```python
925
+ errors = await sandbox.computer_use.get_process_errors("x11vnc")
926
+ print("X11VNC errors:", errors)
927
+ ```
928
+ """
929
+ response = await self._api_client.get_process_errors(process_name=process_name)
930
+ return response