anchorbrowser 0.3.4__tar.gz → 0.3.6__tar.gz
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.
- anchorbrowser-0.3.6/.release-please-manifest.json +3 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/CHANGELOG.md +26 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/PKG-INFO +3 -3
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/README.md +2 -2
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/pyproject.toml +2 -2
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_models.py +8 -3
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_sync.py +3 -31
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_utils.py +1 -1
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_version.py +1 -1
- anchorbrowser-0.3.6/src/anchorbrowser/resources/task/run.py +233 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/task.py +8 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/tools.py +4 -2
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task/run_execute_params.py +3 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/tool_perform_web_task_params.py +1 -1
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_task.py +46 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_models.py +4 -4
- anchorbrowser-0.3.4/.release-please-manifest.json +0 -3
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/.gitignore +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/CONTRIBUTING.md +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/LICENSE +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/SECURITY.md +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/api.md +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/bin/check-release-environment +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/bin/publish-pypi +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/examples/.keep +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/noxfile.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/release-please-config.json +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/requirements-dev.lock +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/requirements.lock +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_base_client.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_client.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_compat.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_constants.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_exceptions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_files.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_qs.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_resource.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_streaming.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_types.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_compat.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_datetime_parse.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_logs.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_proxy.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_reflection.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_resources_proxy.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_streams.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_transform.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/_utils/_typing.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/lib/.keep +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/lib/agent.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/lib/browser.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/py.typed +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/agent.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/batch_sessions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/browser.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/events.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/extensions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/profiles.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/agent/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/agent/agent.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/agent/files.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/all.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/clipboard.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/keyboard.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/mouse.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/recordings/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/recordings/primary.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/recordings/recordings.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/resources/sessions/sessions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/batch_session_create_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/batch_session_create_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/batch_session_retrieve_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/event_signal_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/event_wait_for_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/event_wait_for_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_delete_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_list_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_manifest.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_retrieve_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_upload_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/extension_upload_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/profile_create_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/profile_list_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/profile_retrieve_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_copy_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_create_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_create_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_drag_and_drop_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_drag_and_drop_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_goto_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_goto_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_list_pages_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_paste_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_paste_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_retrieve_downloads_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_retrieve_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_scroll_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_scroll_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_upload_file_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/session_upload_file_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/agent/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/agent/file_list_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/agent/file_upload_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/agent/file_upload_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/all_status_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/clipboard_get_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/clipboard_set_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/clipboard_set_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/keyboard_shortcut_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/keyboard_shortcut_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/keyboard_type_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/keyboard_type_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_click_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_click_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_double_click_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_double_click_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_move_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/mouse_move_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/recording_list_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/recording_pause_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/recording_resume_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/sessions/recordings/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/shared/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/shared/success_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task/run_execute_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task_create_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task_create_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task_list_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task_list_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/tool_fetch_webpage_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/tool_fetch_webpage_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/tool_perform_web_task_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/tool_screenshot_webpage_params.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/agent/test_files.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/recordings/__init__.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/recordings/test_primary.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_agent.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_all.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_clipboard.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_keyboard.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_mouse.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/sessions/test_recordings.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_batch_sessions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_events.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_extensions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_profiles.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_sessions.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/api_resources/test_tools.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/conftest.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/sample_file.txt +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_client.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_deepcopy.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_extract_files.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_files.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_qs.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_required_args.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_response.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_streaming.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_transform.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_utils/test_datetime_parse.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_utils/test_proxy.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/test_utils/test_typing.py +0 -0
- {anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/tests/utils.py +0 -0
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.6 (2025-11-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.3.5...v0.3.6](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/compare/v0.3.5...v0.3.6)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* max_steps_default ([9cbe618](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/commit/9cbe6182c79f0269e2061fc4a074031d2c112e99))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* compat with Python 3.14 ([4bac4f2](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/commit/4bac4f2667d41c6d9ecb4ca4df14d50ed5f1bcc7))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **package:** drop Python 3.8 support ([7c976b9](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/commit/7c976b92b74eb47f4dccd3891e0e8557b494160d))
|
|
20
|
+
|
|
21
|
+
## 0.3.5 (2025-11-04)
|
|
22
|
+
|
|
23
|
+
Full Changelog: [v0.3.4...v0.3.5](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/compare/v0.3.4...v0.3.5)
|
|
24
|
+
|
|
25
|
+
### Chores
|
|
26
|
+
|
|
27
|
+
* **internal:** grammar fix (it's -> its) ([592da81](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/commit/592da814085e1d7348a4eaefc98ebd987ed0d59f))
|
|
28
|
+
|
|
3
29
|
## 0.3.4 (2025-10-31)
|
|
4
30
|
|
|
5
31
|
Full Changelog: [v0.3.3...v0.3.4](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/compare/v0.3.3...v0.3.4)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anchorbrowser
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: The official Python library for the anchorbrowser API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
6
6
|
Project-URL: Repository, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
<!-- prettier-ignore -->
|
|
40
40
|
[)](https://pypi.org/project/anchorbrowser/)
|
|
41
41
|
|
|
42
|
-
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.
|
|
42
|
+
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.9+
|
|
43
43
|
application. The library includes type definitions for all request params and response fields,
|
|
44
44
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
45
45
|
|
|
@@ -445,7 +445,7 @@ print(anchorbrowser.__version__)
|
|
|
445
445
|
|
|
446
446
|
## Requirements
|
|
447
447
|
|
|
448
|
-
Python 3.
|
|
448
|
+
Python 3.9 or higher.
|
|
449
449
|
|
|
450
450
|
## Contributing
|
|
451
451
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- prettier-ignore -->
|
|
4
4
|
[)](https://pypi.org/project/anchorbrowser/)
|
|
5
5
|
|
|
6
|
-
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.
|
|
6
|
+
The Anchorbrowser Python library provides convenient access to the Anchorbrowser REST API from any Python 3.9+
|
|
7
7
|
application. The library includes type definitions for all request params and response fields,
|
|
8
8
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
9
9
|
|
|
@@ -409,7 +409,7 @@ print(anchorbrowser.__version__)
|
|
|
409
409
|
|
|
410
410
|
## Requirements
|
|
411
411
|
|
|
412
|
-
Python 3.
|
|
412
|
+
Python 3.9 or higher.
|
|
413
413
|
|
|
414
414
|
## Contributing
|
|
415
415
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "anchorbrowser"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.6"
|
|
4
4
|
description = "The official Python library for the anchorbrowser API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -142,7 +142,7 @@ filterwarnings = [
|
|
|
142
142
|
# there are a couple of flags that are still disabled by
|
|
143
143
|
# default in strict mode as they are experimental and niche.
|
|
144
144
|
typeCheckingMode = "strict"
|
|
145
|
-
pythonVersion = "3.
|
|
145
|
+
pythonVersion = "3.9"
|
|
146
146
|
|
|
147
147
|
exclude = [
|
|
148
148
|
"_dev",
|
|
@@ -2,6 +2,7 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import inspect
|
|
5
|
+
import weakref
|
|
5
6
|
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast
|
|
6
7
|
from datetime import date, datetime
|
|
7
8
|
from typing_extensions import (
|
|
@@ -576,6 +577,9 @@ class CachedDiscriminatorType(Protocol):
|
|
|
576
577
|
__discriminator__: DiscriminatorDetails
|
|
577
578
|
|
|
578
579
|
|
|
580
|
+
DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary()
|
|
581
|
+
|
|
582
|
+
|
|
579
583
|
class DiscriminatorDetails:
|
|
580
584
|
field_name: str
|
|
581
585
|
"""The name of the discriminator field in the variant class, e.g.
|
|
@@ -618,8 +622,9 @@ class DiscriminatorDetails:
|
|
|
618
622
|
|
|
619
623
|
|
|
620
624
|
def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None:
|
|
621
|
-
|
|
622
|
-
|
|
625
|
+
cached = DISCRIMINATOR_CACHE.get(union)
|
|
626
|
+
if cached is not None:
|
|
627
|
+
return cached
|
|
623
628
|
|
|
624
629
|
discriminator_field_name: str | None = None
|
|
625
630
|
|
|
@@ -672,7 +677,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any,
|
|
|
672
677
|
discriminator_field=discriminator_field_name,
|
|
673
678
|
discriminator_alias=discriminator_alias,
|
|
674
679
|
)
|
|
675
|
-
|
|
680
|
+
DISCRIMINATOR_CACHE.setdefault(union, details)
|
|
676
681
|
return details
|
|
677
682
|
|
|
678
683
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
import sys
|
|
4
3
|
import asyncio
|
|
5
4
|
import functools
|
|
6
|
-
import
|
|
7
|
-
from typing import Any, TypeVar, Callable, Awaitable
|
|
5
|
+
from typing import TypeVar, Callable, Awaitable
|
|
8
6
|
from typing_extensions import ParamSpec
|
|
9
7
|
|
|
10
8
|
import anyio
|
|
@@ -15,34 +13,11 @@ T_Retval = TypeVar("T_Retval")
|
|
|
15
13
|
T_ParamSpec = ParamSpec("T_ParamSpec")
|
|
16
14
|
|
|
17
15
|
|
|
18
|
-
if sys.version_info >= (3, 9):
|
|
19
|
-
_asyncio_to_thread = asyncio.to_thread
|
|
20
|
-
else:
|
|
21
|
-
# backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread
|
|
22
|
-
# for Python 3.8 support
|
|
23
|
-
async def _asyncio_to_thread(
|
|
24
|
-
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
25
|
-
) -> Any:
|
|
26
|
-
"""Asynchronously run function *func* in a separate thread.
|
|
27
|
-
|
|
28
|
-
Any *args and **kwargs supplied for this function are directly passed
|
|
29
|
-
to *func*. Also, the current :class:`contextvars.Context` is propagated,
|
|
30
|
-
allowing context variables from the main thread to be accessed in the
|
|
31
|
-
separate thread.
|
|
32
|
-
|
|
33
|
-
Returns a coroutine that can be awaited to get the eventual result of *func*.
|
|
34
|
-
"""
|
|
35
|
-
loop = asyncio.events.get_running_loop()
|
|
36
|
-
ctx = contextvars.copy_context()
|
|
37
|
-
func_call = functools.partial(ctx.run, func, *args, **kwargs)
|
|
38
|
-
return await loop.run_in_executor(None, func_call)
|
|
39
|
-
|
|
40
|
-
|
|
41
16
|
async def to_thread(
|
|
42
17
|
func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs
|
|
43
18
|
) -> T_Retval:
|
|
44
19
|
if sniffio.current_async_library() == "asyncio":
|
|
45
|
-
return await
|
|
20
|
+
return await asyncio.to_thread(func, *args, **kwargs)
|
|
46
21
|
|
|
47
22
|
return await anyio.to_thread.run_sync(
|
|
48
23
|
functools.partial(func, *args, **kwargs),
|
|
@@ -53,10 +28,7 @@ async def to_thread(
|
|
|
53
28
|
def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]:
|
|
54
29
|
"""
|
|
55
30
|
Take a blocking function and create an async one that receives the same
|
|
56
|
-
positional and keyword arguments.
|
|
57
|
-
asyncio.to_thread to run the function in a separate thread. For python version
|
|
58
|
-
3.8, it uses locally defined copy of the asyncio.to_thread function which was
|
|
59
|
-
introduced in python 3.9.
|
|
31
|
+
positional and keyword arguments.
|
|
60
32
|
|
|
61
33
|
Usage:
|
|
62
34
|
|
|
@@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
|
|
|
133
133
|
# Type safe methods for narrowing types with TypeVars.
|
|
134
134
|
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
|
|
135
135
|
# however this cause Pyright to rightfully report errors. As we know we don't
|
|
136
|
-
# care about the contained types we can safely use `object` in
|
|
136
|
+
# care about the contained types we can safely use `object` in its place.
|
|
137
137
|
#
|
|
138
138
|
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
|
|
139
139
|
# `is_*` is for when you're dealing with an unknown input
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
10
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
11
|
+
from ..._compat import cached_property
|
|
12
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
13
|
+
from ..._response import (
|
|
14
|
+
to_raw_response_wrapper,
|
|
15
|
+
to_streamed_response_wrapper,
|
|
16
|
+
async_to_raw_response_wrapper,
|
|
17
|
+
async_to_streamed_response_wrapper,
|
|
18
|
+
)
|
|
19
|
+
from ...types.task import run_execute_params
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.task.run_execute_response import RunExecuteResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["RunResource", "AsyncRunResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RunResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> RunResourceWithRawResponse:
|
|
29
|
+
"""
|
|
30
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
31
|
+
the raw response object instead of the parsed content.
|
|
32
|
+
|
|
33
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
34
|
+
"""
|
|
35
|
+
return RunResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> RunResourceWithStreamingResponse:
|
|
39
|
+
"""
|
|
40
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
41
|
+
|
|
42
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
43
|
+
"""
|
|
44
|
+
return RunResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def execute(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
task_id: str,
|
|
50
|
+
async_: bool | Omit = omit,
|
|
51
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
52
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
53
|
+
session_id: str | Omit = omit,
|
|
54
|
+
task_session_id: str | Omit = omit,
|
|
55
|
+
version: str | Omit = omit,
|
|
56
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
|
+
extra_headers: Headers | None = None,
|
|
59
|
+
extra_query: Query | None = None,
|
|
60
|
+
extra_body: Body | None = None,
|
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
|
+
) -> RunExecuteResponse:
|
|
63
|
+
"""Executes a task in a browser session.
|
|
64
|
+
|
|
65
|
+
The task can be run with a specific
|
|
66
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
67
|
+
ID or let the system create a new one.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
task_id: Task identifier
|
|
71
|
+
|
|
72
|
+
async_: Whether to run the task asynchronously.
|
|
73
|
+
|
|
74
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
75
|
+
|
|
76
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
77
|
+
|
|
78
|
+
session_id: Optional existing session ID to use
|
|
79
|
+
|
|
80
|
+
task_session_id: Optional task-specific session ID
|
|
81
|
+
|
|
82
|
+
version: Version to run (draft, latest, or version number)
|
|
83
|
+
|
|
84
|
+
extra_headers: Send extra headers
|
|
85
|
+
|
|
86
|
+
extra_query: Add additional query parameters to the request
|
|
87
|
+
|
|
88
|
+
extra_body: Add additional JSON properties to the request
|
|
89
|
+
|
|
90
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
91
|
+
"""
|
|
92
|
+
return self._post(
|
|
93
|
+
"/v1/task/run",
|
|
94
|
+
body=maybe_transform(
|
|
95
|
+
{
|
|
96
|
+
"task_id": task_id,
|
|
97
|
+
"async_": async_,
|
|
98
|
+
"inputs": inputs,
|
|
99
|
+
"override_browser_configuration": override_browser_configuration,
|
|
100
|
+
"session_id": session_id,
|
|
101
|
+
"task_session_id": task_session_id,
|
|
102
|
+
"version": version,
|
|
103
|
+
},
|
|
104
|
+
run_execute_params.RunExecuteParams,
|
|
105
|
+
),
|
|
106
|
+
options=make_request_options(
|
|
107
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
108
|
+
),
|
|
109
|
+
cast_to=RunExecuteResponse,
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
class AsyncRunResource(AsyncAPIResource):
|
|
114
|
+
@cached_property
|
|
115
|
+
def with_raw_response(self) -> AsyncRunResourceWithRawResponse:
|
|
116
|
+
"""
|
|
117
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
118
|
+
the raw response object instead of the parsed content.
|
|
119
|
+
|
|
120
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#accessing-raw-response-data-eg-headers
|
|
121
|
+
"""
|
|
122
|
+
return AsyncRunResourceWithRawResponse(self)
|
|
123
|
+
|
|
124
|
+
@cached_property
|
|
125
|
+
def with_streaming_response(self) -> AsyncRunResourceWithStreamingResponse:
|
|
126
|
+
"""
|
|
127
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
128
|
+
|
|
129
|
+
For more information, see https://www.github.com/anchorbrowser/AnchorBrowser-SDK-Python#with_streaming_response
|
|
130
|
+
"""
|
|
131
|
+
return AsyncRunResourceWithStreamingResponse(self)
|
|
132
|
+
|
|
133
|
+
async def execute(
|
|
134
|
+
self,
|
|
135
|
+
*,
|
|
136
|
+
task_id: str,
|
|
137
|
+
async_: bool | Omit = omit,
|
|
138
|
+
inputs: Dict[str, str] | Omit = omit,
|
|
139
|
+
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
140
|
+
session_id: str | Omit = omit,
|
|
141
|
+
task_session_id: str | Omit = omit,
|
|
142
|
+
version: str | Omit = omit,
|
|
143
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
144
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
145
|
+
extra_headers: Headers | None = None,
|
|
146
|
+
extra_query: Query | None = None,
|
|
147
|
+
extra_body: Body | None = None,
|
|
148
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
149
|
+
) -> RunExecuteResponse:
|
|
150
|
+
"""Executes a task in a browser session.
|
|
151
|
+
|
|
152
|
+
The task can be run with a specific
|
|
153
|
+
version or the latest version. Optionally, you can provide an existing session
|
|
154
|
+
ID or let the system create a new one.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
task_id: Task identifier
|
|
158
|
+
|
|
159
|
+
async_: Whether to run the task asynchronously.
|
|
160
|
+
|
|
161
|
+
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
162
|
+
|
|
163
|
+
override_browser_configuration: Override browser configuration for this execution
|
|
164
|
+
|
|
165
|
+
session_id: Optional existing session ID to use
|
|
166
|
+
|
|
167
|
+
task_session_id: Optional task-specific session ID
|
|
168
|
+
|
|
169
|
+
version: Version to run (draft, latest, or version number)
|
|
170
|
+
|
|
171
|
+
extra_headers: Send extra headers
|
|
172
|
+
|
|
173
|
+
extra_query: Add additional query parameters to the request
|
|
174
|
+
|
|
175
|
+
extra_body: Add additional JSON properties to the request
|
|
176
|
+
|
|
177
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
178
|
+
"""
|
|
179
|
+
return await self._post(
|
|
180
|
+
"/v1/task/run",
|
|
181
|
+
body=await async_maybe_transform(
|
|
182
|
+
{
|
|
183
|
+
"task_id": task_id,
|
|
184
|
+
"async_": async_,
|
|
185
|
+
"inputs": inputs,
|
|
186
|
+
"override_browser_configuration": override_browser_configuration,
|
|
187
|
+
"session_id": session_id,
|
|
188
|
+
"task_session_id": task_session_id,
|
|
189
|
+
"version": version,
|
|
190
|
+
},
|
|
191
|
+
run_execute_params.RunExecuteParams,
|
|
192
|
+
),
|
|
193
|
+
options=make_request_options(
|
|
194
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
195
|
+
),
|
|
196
|
+
cast_to=RunExecuteResponse,
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class RunResourceWithRawResponse:
|
|
201
|
+
def __init__(self, run: RunResource) -> None:
|
|
202
|
+
self._run = run
|
|
203
|
+
|
|
204
|
+
self.execute = to_raw_response_wrapper(
|
|
205
|
+
run.execute,
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class AsyncRunResourceWithRawResponse:
|
|
210
|
+
def __init__(self, run: AsyncRunResource) -> None:
|
|
211
|
+
self._run = run
|
|
212
|
+
|
|
213
|
+
self.execute = async_to_raw_response_wrapper(
|
|
214
|
+
run.execute,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class RunResourceWithStreamingResponse:
|
|
219
|
+
def __init__(self, run: RunResource) -> None:
|
|
220
|
+
self._run = run
|
|
221
|
+
|
|
222
|
+
self.execute = to_streamed_response_wrapper(
|
|
223
|
+
run.execute,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class AsyncRunResourceWithStreamingResponse:
|
|
228
|
+
def __init__(self, run: AsyncRunResource) -> None:
|
|
229
|
+
self._run = run
|
|
230
|
+
|
|
231
|
+
self.execute = async_to_streamed_response_wrapper(
|
|
232
|
+
run.execute,
|
|
233
|
+
)
|
|
@@ -157,6 +157,7 @@ class TaskResource(SyncAPIResource):
|
|
|
157
157
|
self,
|
|
158
158
|
*,
|
|
159
159
|
task_id: str,
|
|
160
|
+
async_: bool | Omit = omit,
|
|
160
161
|
inputs: Dict[str, str] | Omit = omit,
|
|
161
162
|
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
162
163
|
session_id: str | Omit = omit,
|
|
@@ -178,6 +179,8 @@ class TaskResource(SyncAPIResource):
|
|
|
178
179
|
Args:
|
|
179
180
|
task_id: Task identifier
|
|
180
181
|
|
|
182
|
+
async_: Whether to run the task asynchronously.
|
|
183
|
+
|
|
181
184
|
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
182
185
|
|
|
183
186
|
override_browser_configuration: Override browser configuration for this execution
|
|
@@ -201,6 +204,7 @@ class TaskResource(SyncAPIResource):
|
|
|
201
204
|
body=maybe_transform(
|
|
202
205
|
{
|
|
203
206
|
"task_id": task_id,
|
|
207
|
+
"async_": async_,
|
|
204
208
|
"inputs": inputs,
|
|
205
209
|
"override_browser_configuration": override_browser_configuration,
|
|
206
210
|
"session_id": session_id,
|
|
@@ -346,6 +350,7 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
346
350
|
self,
|
|
347
351
|
*,
|
|
348
352
|
task_id: str,
|
|
353
|
+
async_: bool | Omit = omit,
|
|
349
354
|
inputs: Dict[str, str] | Omit = omit,
|
|
350
355
|
override_browser_configuration: run_execute_params.OverrideBrowserConfiguration | Omit = omit,
|
|
351
356
|
session_id: str | Omit = omit,
|
|
@@ -367,6 +372,8 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
367
372
|
Args:
|
|
368
373
|
task_id: Task identifier
|
|
369
374
|
|
|
375
|
+
async_: Whether to run the task asynchronously.
|
|
376
|
+
|
|
370
377
|
inputs: Environment variables for task execution (keys must start with ANCHOR\\__)
|
|
371
378
|
|
|
372
379
|
override_browser_configuration: Override browser configuration for this execution
|
|
@@ -390,6 +397,7 @@ class AsyncTaskResource(AsyncAPIResource):
|
|
|
390
397
|
body=await async_maybe_transform(
|
|
391
398
|
{
|
|
392
399
|
"task_id": task_id,
|
|
400
|
+
"async": async_,
|
|
393
401
|
"inputs": inputs,
|
|
394
402
|
"override_browser_configuration": override_browser_configuration,
|
|
395
403
|
"session_id": session_id,
|
|
@@ -165,7 +165,8 @@ class ToolsResource(SyncAPIResource):
|
|
|
165
165
|
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
166
166
|
request human input for ambiguous situations.
|
|
167
167
|
|
|
168
|
-
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
168
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
169
|
+
to 200.
|
|
169
170
|
|
|
170
171
|
model: The specific model to use for task completion. see our
|
|
171
172
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
|
@@ -437,7 +438,8 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
437
438
|
human_intervention: Allow human intervention during task execution. When enabled, the agent can
|
|
438
439
|
request human input for ambiguous situations.
|
|
439
440
|
|
|
440
|
-
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
441
|
+
max_steps: Maximum number of steps the agent can take to complete the task. Defaults
|
|
442
|
+
to 200.
|
|
441
443
|
|
|
442
444
|
model: The specific model to use for task completion. see our
|
|
443
445
|
[models](/agentic-browser-control/ai-task-completion#available-models) page for
|
{anchorbrowser-0.3.4 → anchorbrowser-0.3.6}/src/anchorbrowser/types/task/run_execute_params.py
RENAMED
|
@@ -23,6 +23,9 @@ class RunExecuteParams(TypedDict, total=False):
|
|
|
23
23
|
task_id: Required[Annotated[str, PropertyInfo(alias="taskId")]]
|
|
24
24
|
"""Task identifier"""
|
|
25
25
|
|
|
26
|
+
async_: Annotated[bool, PropertyInfo(alias="async")]
|
|
27
|
+
"""Whether to run the task asynchronously."""
|
|
28
|
+
|
|
26
29
|
inputs: Dict[str, str]
|
|
27
30
|
"""Environment variables for task execution (keys must start with ANCHOR\\__)"""
|
|
28
31
|
|
|
@@ -170,6 +170,52 @@ class TestTask:
|
|
|
170
170
|
run = response.parse()
|
|
171
171
|
assert_matches_type(RunExecuteResponse, run, path=["response"])
|
|
172
172
|
|
|
173
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
174
|
+
@parametrize
|
|
175
|
+
def test_method_run_async_with_all_params(self, client: Anchorbrowser) -> None:
|
|
176
|
+
run = client.task.run(
|
|
177
|
+
task_id="550e8400-e29b-41d4-a716-446655440000",
|
|
178
|
+
async_=True,
|
|
179
|
+
inputs={
|
|
180
|
+
"ANCHOR_TARGET_URL": "https://example.com",
|
|
181
|
+
"ANCHOR_MAX_PAGES": "10",
|
|
182
|
+
},
|
|
183
|
+
override_browser_configuration={
|
|
184
|
+
"initial_url": "https://example.com",
|
|
185
|
+
"live_view": {"read_only": True},
|
|
186
|
+
"proxy": {
|
|
187
|
+
"active": True,
|
|
188
|
+
"city": "city",
|
|
189
|
+
"country_code": "af",
|
|
190
|
+
"region": "region",
|
|
191
|
+
"type": "anchor_proxy",
|
|
192
|
+
},
|
|
193
|
+
"recording": {"active": True},
|
|
194
|
+
"timeout": {
|
|
195
|
+
"idle_timeout": 0,
|
|
196
|
+
"max_duration": 0,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
|
|
200
|
+
task_session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
|
|
201
|
+
version="1",
|
|
202
|
+
)
|
|
203
|
+
assert_matches_type(RunExecuteResponse, run, path=["response"])
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
207
|
+
@parametrize
|
|
208
|
+
def test_raw_response_run_async(self, client: Anchorbrowser) -> None:
|
|
209
|
+
response = client.task.with_raw_response.run(
|
|
210
|
+
task_id="550e8400-e29b-41d4-a716-446655440000",
|
|
211
|
+
async_=True,
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
assert response.is_closed is True
|
|
215
|
+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
|
|
216
|
+
run = response.parse()
|
|
217
|
+
assert_matches_type(RunExecuteResponse, run, path=["response"])
|
|
218
|
+
|
|
173
219
|
@pytest.mark.skip(reason="Prism tests are disabled")
|
|
174
220
|
@parametrize
|
|
175
221
|
def test_streaming_response_run(self, client: Anchorbrowser) -> None:
|
|
@@ -9,7 +9,7 @@ from pydantic import Field
|
|
|
9
9
|
|
|
10
10
|
from anchorbrowser._utils import PropertyInfo
|
|
11
11
|
from anchorbrowser._compat import PYDANTIC_V1, parse_obj, model_dump, model_json
|
|
12
|
-
from anchorbrowser._models import BaseModel, construct_type
|
|
12
|
+
from anchorbrowser._models import DISCRIMINATOR_CACHE, BaseModel, construct_type
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class BasicModel(BaseModel):
|
|
@@ -809,7 +809,7 @@ def test_discriminated_unions_invalid_data_uses_cache() -> None:
|
|
|
809
809
|
|
|
810
810
|
UnionType = cast(Any, Union[A, B])
|
|
811
811
|
|
|
812
|
-
assert not
|
|
812
|
+
assert not DISCRIMINATOR_CACHE.get(UnionType)
|
|
813
813
|
|
|
814
814
|
m = construct_type(
|
|
815
815
|
value={"type": "b", "data": "foo"}, type_=cast(Any, Annotated[UnionType, PropertyInfo(discriminator="type")])
|
|
@@ -818,7 +818,7 @@ def test_discriminated_unions_invalid_data_uses_cache() -> None:
|
|
|
818
818
|
assert m.type == "b"
|
|
819
819
|
assert m.data == "foo" # type: ignore[comparison-overlap]
|
|
820
820
|
|
|
821
|
-
discriminator = UnionType
|
|
821
|
+
discriminator = DISCRIMINATOR_CACHE.get(UnionType)
|
|
822
822
|
assert discriminator is not None
|
|
823
823
|
|
|
824
824
|
m = construct_type(
|
|
@@ -830,7 +830,7 @@ def test_discriminated_unions_invalid_data_uses_cache() -> None:
|
|
|
830
830
|
|
|
831
831
|
# if the discriminator details object stays the same between invocations then
|
|
832
832
|
# we hit the cache
|
|
833
|
-
assert UnionType
|
|
833
|
+
assert DISCRIMINATOR_CACHE.get(UnionType) is discriminator
|
|
834
834
|
|
|
835
835
|
|
|
836
836
|
@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|