solari-runloop-compat 0.2.9__tar.gz → 0.2.10__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.
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/COMPAT.md +1 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/PKG-INFO +2 -2
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/pyproject.toml +2 -2
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/__init__.py +1 -1
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_gateway.py +11 -7
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/.gitignore +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/LICENSE +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/NOTICE +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/README.md +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_branding.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_client.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_config.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_context.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_dockerfile.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_exceptions.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_loop.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_mapping.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_models.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_options.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_redact.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_resources.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_sync.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_types.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/_vendor_user.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/lib/__init__.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/lib/polling.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/pagination.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/sdk.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/__init__.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_build_log.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_build_logs_list_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_build_parameters.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_list_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_async_execution_detail_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_execution_detail_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_snapshot_list_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_snapshot_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devboxes/__init__.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devboxes/devbox_logs_list_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devboxes/devbox_snapshot_async_status_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devboxes/execution_update_chunk.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/object_download_url_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/object_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/secret_list_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/secret_view.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/__init__.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/after_idle.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/code_mount_parameters.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/launch_parameters.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/lifecycle_configuration.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/lifecycle_hooks.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/resume_triggers.py +0 -0
- {solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/tunnel_view.py +0 -0
|
@@ -63,6 +63,7 @@ exactly Runloop's parameters. Details that differ from what the old signatures l
|
|
|
63
63
|
- `executions.kill(kill_process_group=True)` and `send_std_in(signal="EOF")` raise (Solari kills the command, and a command handle cannot close stdin); `send_std_in(signal="INTERRUPT")` sends SIGINT to the command. `stream_*_updates` yields the output so far from `offset` and then what the command prints, until it exits (an iterator of `ExecutionUpdateChunk`; it takes no `timeout`).
|
|
64
64
|
- `attach_stdin` on `execute_async` / `exec_async` is satisfied (the control channel can always be written to with `send_std_in`).
|
|
65
65
|
- `shutdown(force=True)` is satisfied (Solari's shutdown always shuts down).
|
|
66
|
+
- A resource that does not exist raises `NotFoundError`, as in Runloop: `shutdown` and `get_tunnel` of an unknown devbox, and `snapshot.delete` / `disk_snapshots.delete` of an unknown snapshot (it used to return `{}` or a made-up view). A snapshot delete that the gateway finishes over several passes still ends quietly when a later pass finds it gone.
|
|
66
67
|
- `list(include_total_count=True)` counts every matching devbox (it follows all pages); without it `total_count` is `None`. A `status` with no Solari state behind it (`failure`, `suspending`, `resuming`) raises instead of returning an empty list.
|
|
67
68
|
- `list_disk_snapshots` / `disk_snapshots.list`: `devbox_id`, `source_devbox_id`, `limit`, `starting_after`, `name`, `source_blueprint_id` (the snapshot's template) and `include_total_count` are honoured; `total_count` is `None` when more pages exist and the count was not asked for, and when `starting_after` is used. `metadata_key` / `metadata_key_in` raise (Solari cannot filter by metadata).
|
|
68
69
|
- `retrieve_resource_usage`, `create_ssh_key`, `create_pty_tunnel`, `create_gateway_token`, `create_mcp_token`, `watch_evictions`, `blueprints.preview`: NO, `SolariCompatUnsupported` naming the method. `client.accounts`, `agents`, `axons` (and `axons.events`, `axons.sql`), `apikeys`, `restricted_keys`, `pty`, `network_policies`, `gateway_configs`, `mcp_configs`, `objects`: NO at any depth. `with_raw_response` / `with_streaming_response`: NO.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: solari-runloop-compat
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Runloop-compatible Python interface over Solari Sandboxes. Not affiliated with Runloop.
|
|
5
5
|
Project-URL: Homepage, https://getsolari.com
|
|
6
6
|
Author: Solari
|
|
@@ -10,7 +10,7 @@ License-File: NOTICE
|
|
|
10
10
|
Keywords: compatibility,runloop,sandbox,solari
|
|
11
11
|
Requires-Python: >=3.9
|
|
12
12
|
Requires-Dist: pydantic<3,>=2
|
|
13
|
-
Requires-Dist: solari-core>=0.
|
|
13
|
+
Requires-Dist: solari-core>=0.7.11
|
|
14
14
|
Requires-Dist: solari-sandbox>=0.6.1
|
|
15
15
|
Provides-Extra: test
|
|
16
16
|
Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
|
|
@@ -4,14 +4,14 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "solari-runloop-compat"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.10"
|
|
8
8
|
description = "Runloop-compatible Python interface over Solari Sandboxes. Not affiliated with Runloop."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = { text = "MIT" }
|
|
12
12
|
authors = [{ name = "Solari" }]
|
|
13
13
|
keywords = ["solari", "sandbox", "runloop", "compatibility"]
|
|
14
|
-
dependencies = ["solari-sandbox>=0.6.1", "solari-core>=0.
|
|
14
|
+
dependencies = ["solari-sandbox>=0.6.1", "solari-core>=0.7.11", "pydantic>=2,<3"]
|
|
15
15
|
|
|
16
16
|
[project.optional-dependencies]
|
|
17
17
|
test = ["pytest>=7", "pytest-asyncio>=0.23"]
|
|
@@ -33,7 +33,7 @@ from ._types import NOT_GIVEN, NoneType, NotGiven, Omit, Timeout, not_given, omi
|
|
|
33
33
|
from .lib.polling import PollingConfig, PollingTimeout
|
|
34
34
|
from .sdk import AsyncRunloopSDK, RunloopSDK
|
|
35
35
|
|
|
36
|
-
__version__ = "0.2.
|
|
36
|
+
__version__ = "0.2.10"
|
|
37
37
|
Client = Runloop
|
|
38
38
|
AsyncClient = AsyncRunloop
|
|
39
39
|
|
|
@@ -307,10 +307,8 @@ class Gateway:
|
|
|
307
307
|
pass
|
|
308
308
|
|
|
309
309
|
async def shutdown(self, devbox_id: str) -> DevboxView:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
except ex.NotFoundError:
|
|
313
|
-
raw = {"sandboxId": devbox_id, "state": "gone", "metadata": {}}
|
|
310
|
+
# A devbox that does not exist is a NotFoundError (the gateway's DELETE of an unknown id answers ok, so it cannot tell).
|
|
311
|
+
raw = await self.get_raw(devbox_id)
|
|
314
312
|
await self._req("DELETE", f"/sandboxes/{_q(devbox_id)}")
|
|
315
313
|
await self._drop_handle(devbox_id)
|
|
316
314
|
raw = dict(raw, state="gone")
|
|
@@ -1048,12 +1046,15 @@ class Gateway:
|
|
|
1048
1046
|
{ok: false, status: "deleting"} and keeps the row until a retry finishes. Repeat the same DELETE (bounded, with backoff)."""
|
|
1049
1047
|
end = time.monotonic() + max_seconds
|
|
1050
1048
|
pause = 1.0
|
|
1049
|
+
repeat = False
|
|
1051
1050
|
while True:
|
|
1052
1051
|
try:
|
|
1053
1052
|
reply = await self._req("DELETE", f"/snapshots/{_q(snapshot_id)}")
|
|
1054
1053
|
except ex.NotFoundError:
|
|
1054
|
+
if not repeat:
|
|
1055
|
+
raise # there is no such snapshot
|
|
1055
1056
|
self._deleted_snapshots.add(snapshot_id)
|
|
1056
|
-
return #
|
|
1057
|
+
return # a 404 after a 202 "deleting": the earlier pass finished
|
|
1057
1058
|
if not (isinstance(reply, dict) and (reply.get("ok") is False or reply.get("status") == "deleting")):
|
|
1058
1059
|
self._deleted_snapshots.add(snapshot_id)
|
|
1059
1060
|
return
|
|
@@ -1061,6 +1062,7 @@ class Gateway:
|
|
|
1061
1062
|
raise ex.RunloopError(f"snapshot {snapshot_id} is still being deleted after {max_seconds:.0f}s: {str(reply.get('error', ''))[:120]}")
|
|
1062
1063
|
await asyncio.sleep(pause)
|
|
1063
1064
|
pause = min(pause * 2, 5.0)
|
|
1065
|
+
repeat = True
|
|
1064
1066
|
|
|
1065
1067
|
# --- blueprints (templates) -----------------------------------------------------------
|
|
1066
1068
|
|
|
@@ -1324,8 +1326,10 @@ class Gateway:
|
|
|
1324
1326
|
async def tunnel_get(self, devbox_id: str) -> Any:
|
|
1325
1327
|
try:
|
|
1326
1328
|
d = await self._tunnel_call(devbox_id, "GET")
|
|
1327
|
-
except ex.NotFoundError:
|
|
1328
|
-
|
|
1329
|
+
except ex.NotFoundError as e:
|
|
1330
|
+
if isinstance(e.body, dict) and e.body.get("code") == "TunnelNotEnabled":
|
|
1331
|
+
return None # no tunnel enabled: Runloop's get_tunnel returns None
|
|
1332
|
+
raise # a devbox that does not exist
|
|
1329
1333
|
if d is None:
|
|
1330
1334
|
return await self.tunnel_view(devbox_id)
|
|
1331
1335
|
return self._tunnel_obj(d)
|
|
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
|
|
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
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/blueprint_view.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/devbox_view.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/object_view.py
RENAMED
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/secret_view.py
RENAMED
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/shared/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_runloop_compat-0.2.9 → solari_runloop_compat-0.2.10}/solari_runloop/types/tunnel_view.py
RENAMED
|
File without changes
|