e2b-claude-toolsets 0.0.1__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.
- e2b_claude_toolsets/__init__.py +23 -0
- e2b_claude_toolsets/_async.py +26 -0
- e2b_claude_toolsets/_async_browser.py +1023 -0
- e2b_claude_toolsets/_async_cdp.py +231 -0
- e2b_claude_toolsets/_async_computer.py +227 -0
- e2b_claude_toolsets/_async_sandbox.py +123 -0
- e2b_claude_toolsets/_browser.py +960 -0
- e2b_claude_toolsets/_browser_state.py +347 -0
- e2b_claude_toolsets/_cdp.py +305 -0
- e2b_claude_toolsets/_computer.py +259 -0
- e2b_claude_toolsets/_input.py +242 -0
- e2b_claude_toolsets/_policy.py +69 -0
- e2b_claude_toolsets/_runtime/THIRD_PARTY_LICENSES.txt +205 -0
- e2b_claude_toolsets/_runtime/manifest.json +7 -0
- e2b_claude_toolsets/_runtime/runtime.js +3076 -0
- e2b_claude_toolsets/_sandbox.py +172 -0
- e2b_claude_toolsets/_scripts.py +54 -0
- e2b_claude_toolsets/_uploads.py +89 -0
- e2b_claude_toolsets/_viewer.py +241 -0
- e2b_claude_toolsets-0.0.1.dist-info/METADATA +148 -0
- e2b_claude_toolsets-0.0.1.dist-info/RECORD +23 -0
- e2b_claude_toolsets-0.0.1.dist-info/WHEEL +4 -0
- e2b_claude_toolsets-0.0.1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Sync and native asyncio E2B drivers for Anthropic browser and computer toolsets."""
|
|
2
|
+
|
|
3
|
+
from ._async_browser import AsyncBrowserInitializationError, AsyncE2BBrowserToolset
|
|
4
|
+
from ._async_computer import AsyncE2BComputerToolset
|
|
5
|
+
from ._browser import BrowserInitializationError, E2BBrowserToolset
|
|
6
|
+
from ._computer import E2BComputerToolset
|
|
7
|
+
from ._policy import allow_hosts
|
|
8
|
+
from ._uploads import UploadFile
|
|
9
|
+
from ._viewer import LiveView, ViewerInitializationError, live_view
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"E2BBrowserToolset",
|
|
13
|
+
"E2BComputerToolset",
|
|
14
|
+
"AsyncE2BBrowserToolset",
|
|
15
|
+
"AsyncE2BComputerToolset",
|
|
16
|
+
"AsyncBrowserInitializationError",
|
|
17
|
+
"BrowserInitializationError",
|
|
18
|
+
"LiveView",
|
|
19
|
+
"ViewerInitializationError",
|
|
20
|
+
"allow_hosts",
|
|
21
|
+
"live_view",
|
|
22
|
+
"UploadFile",
|
|
23
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Finish bounded resource cleanup even if its caller is cancelled again."""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from collections.abc import Awaitable
|
|
5
|
+
from typing import TypeVar
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
async def finish_cleanup(operation: Awaitable[T]) -> T:
|
|
11
|
+
task = asyncio.ensure_future(operation)
|
|
12
|
+
cancelled = None
|
|
13
|
+
while True:
|
|
14
|
+
try:
|
|
15
|
+
result = await asyncio.shield(task)
|
|
16
|
+
break
|
|
17
|
+
except asyncio.CancelledError as error:
|
|
18
|
+
if task.cancelled():
|
|
19
|
+
raise
|
|
20
|
+
cancelled = error
|
|
21
|
+
if task.done():
|
|
22
|
+
result = task.result()
|
|
23
|
+
break
|
|
24
|
+
if cancelled is not None:
|
|
25
|
+
raise cancelled
|
|
26
|
+
return result
|