anchorbrowser 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 (100) hide show
  1. anchorbrowser/__init__.py +100 -0
  2. anchorbrowser/_base_client.py +1995 -0
  3. anchorbrowser/_client.py +440 -0
  4. anchorbrowser/_compat.py +219 -0
  5. anchorbrowser/_constants.py +14 -0
  6. anchorbrowser/_exceptions.py +108 -0
  7. anchorbrowser/_files.py +123 -0
  8. anchorbrowser/_models.py +829 -0
  9. anchorbrowser/_qs.py +150 -0
  10. anchorbrowser/_resource.py +43 -0
  11. anchorbrowser/_response.py +832 -0
  12. anchorbrowser/_streaming.py +333 -0
  13. anchorbrowser/_types.py +219 -0
  14. anchorbrowser/_utils/__init__.py +57 -0
  15. anchorbrowser/_utils/_logs.py +25 -0
  16. anchorbrowser/_utils/_proxy.py +65 -0
  17. anchorbrowser/_utils/_reflection.py +42 -0
  18. anchorbrowser/_utils/_resources_proxy.py +24 -0
  19. anchorbrowser/_utils/_streams.py +12 -0
  20. anchorbrowser/_utils/_sync.py +86 -0
  21. anchorbrowser/_utils/_transform.py +447 -0
  22. anchorbrowser/_utils/_typing.py +151 -0
  23. anchorbrowser/_utils/_utils.py +422 -0
  24. anchorbrowser/_version.py +4 -0
  25. anchorbrowser/lib/.keep +4 -0
  26. anchorbrowser/lib/agent.py +69 -0
  27. anchorbrowser/lib/browser.py +186 -0
  28. anchorbrowser/py.typed +0 -0
  29. anchorbrowser/resources/__init__.py +61 -0
  30. anchorbrowser/resources/agent.py +305 -0
  31. anchorbrowser/resources/browser.py +152 -0
  32. anchorbrowser/resources/extensions.py +412 -0
  33. anchorbrowser/resources/profiles.py +553 -0
  34. anchorbrowser/resources/sessions/__init__.py +89 -0
  35. anchorbrowser/resources/sessions/all.py +192 -0
  36. anchorbrowser/resources/sessions/clipboard.py +252 -0
  37. anchorbrowser/resources/sessions/keyboard.py +298 -0
  38. anchorbrowser/resources/sessions/mouse.py +651 -0
  39. anchorbrowser/resources/sessions/recordings/__init__.py +33 -0
  40. anchorbrowser/resources/sessions/recordings/primary.py +176 -0
  41. anchorbrowser/resources/sessions/recordings/recordings.py +357 -0
  42. anchorbrowser/resources/sessions/sessions.py +1122 -0
  43. anchorbrowser/resources/tools.py +529 -0
  44. anchorbrowser/types/__init__.py +32 -0
  45. anchorbrowser/types/extension_delete_response.py +12 -0
  46. anchorbrowser/types/extension_list_response.py +31 -0
  47. anchorbrowser/types/extension_manifest.py +28 -0
  48. anchorbrowser/types/extension_retrieve_response.py +27 -0
  49. anchorbrowser/types/extension_upload_params.py +17 -0
  50. anchorbrowser/types/extension_upload_response.py +31 -0
  51. anchorbrowser/types/profile_create_params.py +31 -0
  52. anchorbrowser/types/profile_list_response.py +43 -0
  53. anchorbrowser/types/profile_retrieve_response.py +36 -0
  54. anchorbrowser/types/profile_update_params.py +27 -0
  55. anchorbrowser/types/session_copy_response.py +12 -0
  56. anchorbrowser/types/session_create_params.py +196 -0
  57. anchorbrowser/types/session_create_response.py +22 -0
  58. anchorbrowser/types/session_drag_and_drop_params.py +26 -0
  59. anchorbrowser/types/session_drag_and_drop_response.py +11 -0
  60. anchorbrowser/types/session_goto_params.py +12 -0
  61. anchorbrowser/types/session_goto_response.py +11 -0
  62. anchorbrowser/types/session_paste_params.py +12 -0
  63. anchorbrowser/types/session_paste_response.py +11 -0
  64. anchorbrowser/types/session_retrieve_downloads_response.py +51 -0
  65. anchorbrowser/types/session_scroll_params.py +26 -0
  66. anchorbrowser/types/session_scroll_response.py +11 -0
  67. anchorbrowser/types/sessions/__init__.py +25 -0
  68. anchorbrowser/types/sessions/all_status_response.py +30 -0
  69. anchorbrowser/types/sessions/clipboard_get_response.py +16 -0
  70. anchorbrowser/types/sessions/clipboard_set_params.py +12 -0
  71. anchorbrowser/types/sessions/clipboard_set_response.py +11 -0
  72. anchorbrowser/types/sessions/keyboard_shortcut_params.py +18 -0
  73. anchorbrowser/types/sessions/keyboard_shortcut_response.py +11 -0
  74. anchorbrowser/types/sessions/keyboard_type_params.py +15 -0
  75. anchorbrowser/types/sessions/keyboard_type_response.py +11 -0
  76. anchorbrowser/types/sessions/mouse_click_params.py +18 -0
  77. anchorbrowser/types/sessions/mouse_click_response.py +11 -0
  78. anchorbrowser/types/sessions/mouse_double_click_params.py +18 -0
  79. anchorbrowser/types/sessions/mouse_double_click_response.py +11 -0
  80. anchorbrowser/types/sessions/mouse_down_params.py +18 -0
  81. anchorbrowser/types/sessions/mouse_down_response.py +11 -0
  82. anchorbrowser/types/sessions/mouse_move_params.py +15 -0
  83. anchorbrowser/types/sessions/mouse_move_response.py +11 -0
  84. anchorbrowser/types/sessions/mouse_up_params.py +18 -0
  85. anchorbrowser/types/sessions/mouse_up_response.py +11 -0
  86. anchorbrowser/types/sessions/recording_list_response.py +46 -0
  87. anchorbrowser/types/sessions/recording_pause_response.py +12 -0
  88. anchorbrowser/types/sessions/recording_resume_response.py +12 -0
  89. anchorbrowser/types/sessions/recordings/__init__.py +3 -0
  90. anchorbrowser/types/shared/__init__.py +3 -0
  91. anchorbrowser/types/shared/success_response.py +15 -0
  92. anchorbrowser/types/tool_fetch_webpage_params.py +26 -0
  93. anchorbrowser/types/tool_fetch_webpage_response.py +7 -0
  94. anchorbrowser/types/tool_perform_web_task_params.py +30 -0
  95. anchorbrowser/types/tool_perform_web_task_response.py +16 -0
  96. anchorbrowser/types/tool_screenshot_webpage_params.py +48 -0
  97. anchorbrowser-0.1.0.dist-info/METADATA +449 -0
  98. anchorbrowser-0.1.0.dist-info/RECORD +100 -0
  99. anchorbrowser-0.1.0.dist-info/WHEEL +4 -0
  100. anchorbrowser-0.1.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ClipboardSetResponse"]
8
+
9
+
10
+ class ClipboardSetResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,18 @@
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 List
6
+ from typing_extensions import Required, Annotated, TypedDict
7
+
8
+ from ..._utils import PropertyInfo
9
+
10
+ __all__ = ["KeyboardShortcutParams"]
11
+
12
+
13
+ class KeyboardShortcutParams(TypedDict, total=False):
14
+ keys: Required[List[str]]
15
+ """Array of keys to press simultaneously"""
16
+
17
+ hold_time: Annotated[int, PropertyInfo(alias="holdTime")]
18
+ """Time to hold the keys down in milliseconds"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["KeyboardShortcutResponse"]
8
+
9
+
10
+ class KeyboardShortcutResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["KeyboardTypeParams"]
8
+
9
+
10
+ class KeyboardTypeParams(TypedDict, total=False):
11
+ text: Required[str]
12
+ """Text to type"""
13
+
14
+ delay: int
15
+ """Delay between keystrokes in milliseconds"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["KeyboardTypeResponse"]
8
+
9
+
10
+ class KeyboardTypeResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["MouseClickParams"]
8
+
9
+
10
+ class MouseClickParams(TypedDict, total=False):
11
+ x: Required[int]
12
+ """X coordinate"""
13
+
14
+ y: Required[int]
15
+ """Y coordinate"""
16
+
17
+ button: Literal["left", "middle", "right"]
18
+ """Mouse button to use"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MouseClickResponse"]
8
+
9
+
10
+ class MouseClickResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["MouseDoubleClickParams"]
8
+
9
+
10
+ class MouseDoubleClickParams(TypedDict, total=False):
11
+ x: Required[int]
12
+ """X coordinate"""
13
+
14
+ y: Required[int]
15
+ """Y coordinate"""
16
+
17
+ button: Literal["left", "middle", "right"]
18
+ """Mouse button to use"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MouseDoubleClickResponse"]
8
+
9
+
10
+ class MouseDoubleClickResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["MouseDownParams"]
8
+
9
+
10
+ class MouseDownParams(TypedDict, total=False):
11
+ x: Required[int]
12
+ """X coordinate"""
13
+
14
+ y: Required[int]
15
+ """Y coordinate"""
16
+
17
+ button: Literal["left", "middle", "right"]
18
+ """Mouse button to use"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MouseDownResponse"]
8
+
9
+
10
+ class MouseDownResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["MouseMoveParams"]
8
+
9
+
10
+ class MouseMoveParams(TypedDict, total=False):
11
+ x: Required[int]
12
+ """X coordinate"""
13
+
14
+ y: Required[int]
15
+ """Y coordinate"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MouseMoveResponse"]
8
+
9
+
10
+ class MouseMoveResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["MouseUpParams"]
8
+
9
+
10
+ class MouseUpParams(TypedDict, total=False):
11
+ x: Required[int]
12
+ """X coordinate"""
13
+
14
+ y: Required[int]
15
+ """Y coordinate"""
16
+
17
+ button: Literal["left", "middle", "right"]
18
+ """Mouse button to use"""
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["MouseUpResponse"]
8
+
9
+
10
+ class MouseUpResponse(BaseModel):
11
+ status: Optional[str] = None
@@ -0,0 +1,46 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from datetime import datetime
5
+
6
+ from ..._models import BaseModel
7
+
8
+ __all__ = ["RecordingListResponse", "Data", "DataData", "DataDataItem"]
9
+
10
+
11
+ class DataDataItem(BaseModel):
12
+ id: Optional[str] = None
13
+ """Unique identifier for the recording"""
14
+
15
+ created_at: Optional[datetime] = None
16
+ """Timestamp when the recording was created"""
17
+
18
+ duration: Optional[str] = None
19
+ """Duration of the recording"""
20
+
21
+ file_link: Optional[str] = None
22
+ """URL to access the recording file"""
23
+
24
+ is_primary: Optional[bool] = None
25
+ """Indicates if this is the primary recording"""
26
+
27
+ size: Optional[float] = None
28
+ """Size of the recording file in bytes"""
29
+
30
+ suggested_file_name: Optional[str] = None
31
+ """Suggested filename for the recording"""
32
+
33
+
34
+ class DataData(BaseModel):
35
+ count: Optional[int] = None
36
+ """Total number of video recordings"""
37
+
38
+ items: Optional[List[DataDataItem]] = None
39
+
40
+
41
+ class Data(BaseModel):
42
+ data: Optional[DataData] = None
43
+
44
+
45
+ class RecordingListResponse(BaseModel):
46
+ data: Optional[Data] = None
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+ from ..shared.success_response import SuccessResponse
7
+
8
+ __all__ = ["RecordingPauseResponse"]
9
+
10
+
11
+ class RecordingPauseResponse(BaseModel):
12
+ data: Optional[SuccessResponse] = None
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+ from ..shared.success_response import SuccessResponse
7
+
8
+ __all__ = ["RecordingResumeResponse"]
9
+
10
+
11
+ class RecordingResumeResponse(BaseModel):
12
+ data: Optional[SuccessResponse] = None
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
@@ -0,0 +1,3 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .success_response import SuccessResponse as SuccessResponse
@@ -0,0 +1,15 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["SuccessResponse", "Data"]
8
+
9
+
10
+ class Data(BaseModel):
11
+ status: Optional[str] = None
12
+
13
+
14
+ class SuccessResponse(BaseModel):
15
+ data: Optional[Data] = None
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Annotated, TypedDict
6
+
7
+ from .._utils import PropertyInfo
8
+
9
+ __all__ = ["ToolFetchWebpageParams"]
10
+
11
+
12
+ class ToolFetchWebpageParams(TypedDict, total=False):
13
+ session_id: Annotated[str, PropertyInfo(alias="sessionId")]
14
+ """
15
+ An optional browser session identifier to reference an existing running browser
16
+ session. If provided, the tool will execute within that browser session.
17
+ """
18
+
19
+ format: Literal["html", "markdown"]
20
+ """The output format of the content."""
21
+
22
+ url: str
23
+ """The URL of the webpage to fetch content from.
24
+
25
+ When left empty, the current webpage is used.
26
+ """
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import TypeAlias
4
+
5
+ __all__ = ["ToolFetchWebpageResponse"]
6
+
7
+ ToolFetchWebpageResponse: TypeAlias = str
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, Annotated, TypedDict
6
+
7
+ from .._utils import PropertyInfo
8
+
9
+ __all__ = ["ToolPerformWebTaskParams"]
10
+
11
+
12
+ class ToolPerformWebTaskParams(TypedDict, total=False):
13
+ prompt: Required[str]
14
+ """The task to be autonomously completed."""
15
+
16
+ session_id: Annotated[str, PropertyInfo(alias="sessionId")]
17
+ """
18
+ An optional browser session identifier to reference an existing running browser
19
+ sessions. When passed, the tool will be executed on the provided browser
20
+ session.
21
+ """
22
+
23
+ output_schema: object
24
+ """JSON Schema defining the expected structure of the output data."""
25
+
26
+ url: str
27
+ """The URL of the webpage.
28
+
29
+ If not provided, the tool will use the current page in the session.
30
+ """
@@ -0,0 +1,16 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, Union, Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["ToolPerformWebTaskResponse", "Data"]
8
+
9
+
10
+ class Data(BaseModel):
11
+ result: Union[str, Dict[str, object], None] = None
12
+ """The outcome or answer as a string"""
13
+
14
+
15
+ class ToolPerformWebTaskResponse(BaseModel):
16
+ data: Optional[Data] = None
@@ -0,0 +1,48 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Annotated, TypedDict
6
+
7
+ from .._utils import PropertyInfo
8
+
9
+ __all__ = ["ToolScreenshotWebpageParams"]
10
+
11
+
12
+ class ToolScreenshotWebpageParams(TypedDict, total=False):
13
+ session_id: Annotated[str, PropertyInfo(alias="sessionId")]
14
+ """
15
+ An optional browser session identifier to reference an existing running browser
16
+ sessions. When passed, the tool will be executed on the provided browser
17
+ session.
18
+ """
19
+
20
+ capture_full_height: bool
21
+ """If true, captures the entire height of the page, ignoring the viewport height."""
22
+
23
+ height: int
24
+ """The height of the browser viewport in pixels."""
25
+
26
+ image_quality: int
27
+ """Quality of the output image, on the range 1-100.
28
+
29
+ 100 will not perform any compression.
30
+ """
31
+
32
+ s3_target_address: str
33
+ """Presigned S3 url target to upload the image to."""
34
+
35
+ scroll_all_content: bool
36
+ """If true, scrolls the page and captures all visible content."""
37
+
38
+ url: str
39
+ """The URL of the webpage to capture."""
40
+
41
+ wait: int
42
+ """
43
+ Duration in milliseconds to wait after page has loaded, mainly used for sites
44
+ with JS animations.
45
+ """
46
+
47
+ width: int
48
+ """The width of the browser viewport in pixels."""