blaxel 0.2.36__py3-none-any.whl → 0.2.37__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 (40) hide show
  1. blaxel/__init__.py +2 -2
  2. blaxel/core/client/models/create_job_execution_request_env.py +3 -3
  3. blaxel/core/client/models/preview.py +48 -1
  4. blaxel/core/client/models/sandbox.py +10 -0
  5. blaxel/core/jobs/__init__.py +2 -2
  6. blaxel/core/sandbox/__init__.py +12 -0
  7. blaxel/core/sandbox/client/api/system/__init__.py +0 -0
  8. blaxel/core/sandbox/client/api/system/get_health.py +134 -0
  9. blaxel/core/sandbox/client/api/system/post_upgrade.py +196 -0
  10. blaxel/core/sandbox/client/models/__init__.py +8 -0
  11. blaxel/core/sandbox/client/models/content_search_match.py +24 -25
  12. blaxel/core/sandbox/client/models/content_search_response.py +25 -29
  13. blaxel/core/sandbox/client/models/find_match.py +13 -14
  14. blaxel/core/sandbox/client/models/find_response.py +21 -24
  15. blaxel/core/sandbox/client/models/fuzzy_search_match.py +17 -19
  16. blaxel/core/sandbox/client/models/fuzzy_search_response.py +21 -24
  17. blaxel/core/sandbox/client/models/health_response.py +159 -0
  18. blaxel/core/sandbox/client/models/process_upgrade_state.py +20 -0
  19. blaxel/core/sandbox/client/models/upgrade_request.py +71 -0
  20. blaxel/core/sandbox/client/models/upgrade_status.py +125 -0
  21. blaxel/core/sandbox/default/__init__.py +2 -0
  22. blaxel/core/sandbox/default/filesystem.py +20 -6
  23. blaxel/core/sandbox/default/preview.py +48 -1
  24. blaxel/core/sandbox/default/process.py +66 -21
  25. blaxel/core/sandbox/default/sandbox.py +36 -5
  26. blaxel/core/sandbox/default/system.py +71 -0
  27. blaxel/core/sandbox/sync/__init__.py +2 -0
  28. blaxel/core/sandbox/sync/filesystem.py +19 -2
  29. blaxel/core/sandbox/sync/preview.py +50 -3
  30. blaxel/core/sandbox/sync/process.py +38 -15
  31. blaxel/core/sandbox/sync/sandbox.py +29 -4
  32. blaxel/core/sandbox/sync/system.py +71 -0
  33. blaxel/core/sandbox/types.py +212 -5
  34. blaxel/core/volume/volume.py +6 -0
  35. blaxel/langgraph/tools.py +0 -1
  36. blaxel-0.2.37.dist-info/METADATA +569 -0
  37. {blaxel-0.2.36.dist-info → blaxel-0.2.37.dist-info}/RECORD +39 -30
  38. blaxel-0.2.36.dist-info/METADATA +0 -228
  39. {blaxel-0.2.36.dist-info → blaxel-0.2.37.dist-info}/WHEEL +0 -0
  40. {blaxel-0.2.36.dist-info → blaxel-0.2.37.dist-info}/licenses/LICENSE +0 -0
blaxel/__init__.py CHANGED
@@ -4,8 +4,8 @@ from .core.common.autoload import autoload
4
4
  from .core.common.env import env
5
5
  from .core.common.settings import settings
6
6
 
7
- __version__ = "0.2.36"
8
- __commit__ = "70f38e31dd50b26cbb54665420e165b89f3fa4b9"
7
+ __version__ = "0.2.37"
8
+ __commit__ = "a09d7ea6c786074ceaa4639ce6415958524a7a5f"
9
9
  __sentry_dsn__ = "https://9711de13cd02b285ca4378c01de8dc30@o4508714045276160.ingest.us.sentry.io/4510461121462272"
10
10
  __all__ = ["autoload", "settings", "env"]
11
11
 
@@ -15,7 +15,7 @@ class CreateJobExecutionRequestEnv:
15
15
 
16
16
  """
17
17
 
18
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
18
+ additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
19
19
 
20
20
  def to_dict(self) -> dict[str, Any]:
21
21
  field_dict: dict[str, Any] = {}
@@ -37,10 +37,10 @@ class CreateJobExecutionRequestEnv:
37
37
  def additional_keys(self) -> list[str]:
38
38
  return list(self.additional_properties.keys())
39
39
 
40
- def __getitem__(self, key: str) -> Any:
40
+ def __getitem__(self, key: str) -> str:
41
41
  return self.additional_properties[key]
42
42
 
43
- def __setitem__(self, key: str, value: Any) -> None:
43
+ def __setitem__(self, key: str, value: str) -> None:
44
44
  self.additional_properties[key] = value
45
45
 
46
46
  def __delitem__(self, key: str) -> None:
@@ -1,9 +1,13 @@
1
- from typing import TYPE_CHECKING, Any, TypeVar
1
+ from typing import TYPE_CHECKING, Any, TypeVar, Union
2
2
 
3
3
  from attrs import define as _attrs_define
4
4
  from attrs import field as _attrs_field
5
5
 
6
+ from ..models.status import Status
7
+ from ..types import UNSET, Unset
8
+
6
9
  if TYPE_CHECKING:
10
+ from ..models.core_event import CoreEvent
7
11
  from ..models.preview_metadata import PreviewMetadata
8
12
  from ..models.preview_spec import PreviewSpec
9
13
 
@@ -18,10 +22,14 @@ class Preview:
18
22
  Attributes:
19
23
  metadata (PreviewMetadata): PreviewMetadata
20
24
  spec (PreviewSpec): Preview of a Resource
25
+ events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
26
+ status (Union[Unset, Status]): Deployment status of a resource deployed on Blaxel
21
27
  """
22
28
 
23
29
  metadata: "PreviewMetadata"
24
30
  spec: "PreviewSpec"
31
+ events: Union[Unset, list["CoreEvent"]] = UNSET
32
+ status: Union[Unset, Status] = UNSET
25
33
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26
34
 
27
35
  def to_dict(self) -> dict[str, Any]:
@@ -35,6 +43,22 @@ class Preview:
35
43
  else:
36
44
  spec = self.spec.to_dict()
37
45
 
46
+ events: Union[Unset, list[dict[str, Any]]] = UNSET
47
+ if not isinstance(self.events, Unset):
48
+ events = []
49
+ for componentsschemas_core_events_item_data in self.events:
50
+ if type(componentsschemas_core_events_item_data) is dict:
51
+ componentsschemas_core_events_item = componentsschemas_core_events_item_data
52
+ else:
53
+ componentsschemas_core_events_item = (
54
+ componentsschemas_core_events_item_data.to_dict()
55
+ )
56
+ events.append(componentsschemas_core_events_item)
57
+
58
+ status: Union[Unset, str] = UNSET
59
+ if not isinstance(self.status, Unset):
60
+ status = self.status.value
61
+
38
62
  field_dict: dict[str, Any] = {}
39
63
  field_dict.update(self.additional_properties)
40
64
  field_dict.update(
@@ -43,11 +67,16 @@ class Preview:
43
67
  "spec": spec,
44
68
  }
45
69
  )
70
+ if events is not UNSET:
71
+ field_dict["events"] = events
72
+ if status is not UNSET:
73
+ field_dict["status"] = status
46
74
 
47
75
  return field_dict
48
76
 
49
77
  @classmethod
50
78
  def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T | None:
79
+ from ..models.core_event import CoreEvent
51
80
  from ..models.preview_metadata import PreviewMetadata
52
81
  from ..models.preview_spec import PreviewSpec
53
82
 
@@ -58,9 +87,27 @@ class Preview:
58
87
 
59
88
  spec = PreviewSpec.from_dict(d.pop("spec"))
60
89
 
90
+ events = []
91
+ _events = d.pop("events", UNSET)
92
+ for componentsschemas_core_events_item_data in _events or []:
93
+ componentsschemas_core_events_item = CoreEvent.from_dict(
94
+ componentsschemas_core_events_item_data
95
+ )
96
+
97
+ events.append(componentsschemas_core_events_item)
98
+
99
+ _status = d.pop("status", UNSET)
100
+ status: Union[Unset, Status]
101
+ if isinstance(_status, Unset):
102
+ status = UNSET
103
+ else:
104
+ status = Status(_status)
105
+
61
106
  preview = cls(
62
107
  metadata=metadata,
63
108
  spec=spec,
109
+ events=events,
110
+ status=status,
64
111
  )
65
112
 
66
113
  preview.additional_properties = d
@@ -26,6 +26,8 @@ class Sandbox:
26
26
  spec (SandboxSpec): Configuration for a sandbox including its image, memory, ports, region, and lifecycle
27
27
  policies
28
28
  events (Union[Unset, list['CoreEvent']]): Events happening on a resource deployed on Blaxel
29
+ expires_in (Union[Unset, int]): Time in seconds until the sandbox is automatically deleted based on TTL and
30
+ lifecycle policies. Only present for sandboxes with lifecycle configured.
29
31
  last_used_at (Union[Unset, str]): Last time the sandbox was used (read-only, managed by the system)
30
32
  status (Union[Unset, Status]): Deployment status of a resource deployed on Blaxel
31
33
  """
@@ -33,6 +35,7 @@ class Sandbox:
33
35
  metadata: "Metadata"
34
36
  spec: "SandboxSpec"
35
37
  events: Union[Unset, list["CoreEvent"]] = UNSET
38
+ expires_in: Union[Unset, int] = UNSET
36
39
  last_used_at: Union[Unset, str] = UNSET
37
40
  status: Union[Unset, Status] = UNSET
38
41
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -60,6 +63,8 @@ class Sandbox:
60
63
  )
61
64
  events.append(componentsschemas_core_events_item)
62
65
 
66
+ expires_in = self.expires_in
67
+
63
68
  last_used_at = self.last_used_at
64
69
 
65
70
  status: Union[Unset, str] = UNSET
@@ -76,6 +81,8 @@ class Sandbox:
76
81
  )
77
82
  if events is not UNSET:
78
83
  field_dict["events"] = events
84
+ if expires_in is not UNSET:
85
+ field_dict["expiresIn"] = expires_in
79
86
  if last_used_at is not UNSET:
80
87
  field_dict["lastUsedAt"] = last_used_at
81
88
  if status is not UNSET:
@@ -105,6 +112,8 @@ class Sandbox:
105
112
 
106
113
  events.append(componentsschemas_core_events_item)
107
114
 
115
+ expires_in = d.pop("expiresIn", d.pop("expires_in", UNSET))
116
+
108
117
  last_used_at = d.pop("lastUsedAt", d.pop("last_used_at", UNSET))
109
118
 
110
119
  _status = d.pop("status", UNSET)
@@ -118,6 +127,7 @@ class Sandbox:
118
127
  metadata=metadata,
119
128
  spec=spec,
120
129
  events=events,
130
+ expires_in=expires_in,
121
131
  last_used_at=last_used_at,
122
132
  status=status,
123
133
  )
@@ -75,7 +75,7 @@ class BlJob:
75
75
  def run(
76
76
  self,
77
77
  tasks: List[Dict[str, Any]],
78
- env: Dict[str, Any] | None = None,
78
+ env: Dict[str, str] | None = None,
79
79
  memory: int | None = None,
80
80
  execution_id: str | None = None,
81
81
  ) -> str:
@@ -109,7 +109,7 @@ class BlJob:
109
109
  async def arun(
110
110
  self,
111
111
  tasks: List[Dict[str, Any]],
112
- env: Dict[str, Any] | None = None,
112
+ env: Dict[str, str] | None = None,
113
113
  memory: int | None = None,
114
114
  execution_id: str | None = None,
115
115
  ) -> str:
@@ -12,6 +12,7 @@ from .default import (
12
12
  SandboxInstance,
13
13
  SandboxPreviews,
14
14
  SandboxProcess,
15
+ SandboxSystem,
15
16
  )
16
17
  from .sync import (
17
18
  SyncCodeInterpreter,
@@ -20,8 +21,11 @@ from .sync import (
20
21
  SyncSandboxInstance,
21
22
  SyncSandboxPreviews,
22
23
  SyncSandboxProcess,
24
+ SyncSandboxSystem,
23
25
  )
24
26
  from .types import (
27
+ AsyncStreamHandle,
28
+ AsyncWatchHandle,
25
29
  CopyResponse,
26
30
  ProcessRequestWithLog,
27
31
  ProcessResponseWithLog,
@@ -30,7 +34,9 @@ from .types import (
30
34
  SandboxFilesystemFile,
31
35
  SessionCreateOptions,
32
36
  SessionWithToken,
37
+ StreamHandle,
33
38
  WatchEvent,
39
+ WatchHandle,
34
40
  )
35
41
 
36
42
  __all__ = [
@@ -41,6 +47,10 @@ __all__ = [
41
47
  "SandboxConfiguration",
42
48
  "SandboxCreateConfiguration",
43
49
  "WatchEvent",
50
+ "WatchHandle",
51
+ "AsyncWatchHandle",
52
+ "StreamHandle",
53
+ "AsyncStreamHandle",
44
54
  "SandboxFilesystemFile",
45
55
  "CopyResponse",
46
56
  "Sandbox",
@@ -48,6 +58,7 @@ __all__ = [
48
58
  "SandboxPreviews",
49
59
  "SandboxProcess",
50
60
  "SandboxCodegen",
61
+ "SandboxSystem",
51
62
  "ProcessRequestWithLog",
52
63
  "ProcessResponseWithLog",
53
64
  "ApplyEditRequest",
@@ -59,6 +70,7 @@ __all__ = [
59
70
  "SyncSandboxInstance",
60
71
  "SyncSandboxPreviews",
61
72
  "SyncSandboxProcess",
73
+ "SyncSandboxSystem",
62
74
  "SyncCodeInterpreter",
63
75
  "CodeInterpreter",
64
76
  ]
File without changes
@@ -0,0 +1,134 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.health_response import HealthResponse
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs() -> dict[str, Any]:
13
+ _kwargs: dict[str, Any] = {
14
+ "method": "get",
15
+ "url": "/health",
16
+ }
17
+
18
+ return _kwargs
19
+
20
+
21
+ def _parse_response(*, client: Client, response: httpx.Response) -> HealthResponse | None:
22
+ if response.status_code == 200:
23
+ response_200 = HealthResponse.from_dict(response.json())
24
+
25
+ return response_200
26
+ if client.raise_on_unexpected_status:
27
+ raise errors.UnexpectedStatus(response.status_code, response.content)
28
+ else:
29
+ return None
30
+
31
+
32
+ def _build_response(*, client: Client, response: httpx.Response) -> Response[HealthResponse]:
33
+ return Response(
34
+ status_code=HTTPStatus(response.status_code),
35
+ content=response.content,
36
+ headers=response.headers,
37
+ parsed=_parse_response(client=client, response=response),
38
+ )
39
+
40
+
41
+ def sync_detailed(
42
+ *,
43
+ client: Client,
44
+ ) -> Response[HealthResponse]:
45
+ """Health check
46
+
47
+ Returns health status and system information including upgrade count and binary details
48
+ Also includes last upgrade attempt status with detailed error information if available
49
+
50
+ Raises:
51
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
52
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
53
+
54
+ Returns:
55
+ Response[HealthResponse]
56
+ """
57
+
58
+ kwargs = _get_kwargs()
59
+
60
+ response = client.get_httpx_client().request(
61
+ **kwargs,
62
+ )
63
+
64
+ return _build_response(client=client, response=response)
65
+
66
+
67
+ def sync(
68
+ *,
69
+ client: Client,
70
+ ) -> HealthResponse | None:
71
+ """Health check
72
+
73
+ Returns health status and system information including upgrade count and binary details
74
+ Also includes last upgrade attempt status with detailed error information if available
75
+
76
+ Raises:
77
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
78
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
79
+
80
+ Returns:
81
+ HealthResponse
82
+ """
83
+
84
+ return sync_detailed(
85
+ client=client,
86
+ ).parsed
87
+
88
+
89
+ async def asyncio_detailed(
90
+ *,
91
+ client: Client,
92
+ ) -> Response[HealthResponse]:
93
+ """Health check
94
+
95
+ Returns health status and system information including upgrade count and binary details
96
+ Also includes last upgrade attempt status with detailed error information if available
97
+
98
+ Raises:
99
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
100
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
101
+
102
+ Returns:
103
+ Response[HealthResponse]
104
+ """
105
+
106
+ kwargs = _get_kwargs()
107
+
108
+ response = await client.get_async_httpx_client().request(**kwargs)
109
+
110
+ return _build_response(client=client, response=response)
111
+
112
+
113
+ async def asyncio(
114
+ *,
115
+ client: Client,
116
+ ) -> HealthResponse | None:
117
+ """Health check
118
+
119
+ Returns health status and system information including upgrade count and binary details
120
+ Also includes last upgrade attempt status with detailed error information if available
121
+
122
+ Raises:
123
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
124
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
125
+
126
+ Returns:
127
+ HealthResponse
128
+ """
129
+
130
+ return (
131
+ await asyncio_detailed(
132
+ client=client,
133
+ )
134
+ ).parsed
@@ -0,0 +1,196 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import Client
8
+ from ...models.error_response import ErrorResponse
9
+ from ...models.success_response import SuccessResponse
10
+ from ...models.upgrade_request import UpgradeRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ *,
16
+ body: UpgradeRequest,
17
+ ) -> dict[str, Any]:
18
+ headers: dict[str, Any] = {}
19
+
20
+ _kwargs: dict[str, Any] = {
21
+ "method": "post",
22
+ "url": "/upgrade",
23
+ }
24
+
25
+ if type(body) is dict:
26
+ _body = body
27
+ else:
28
+ _body = body.to_dict()
29
+
30
+ _kwargs["json"] = _body
31
+ headers["Content-Type"] = "application/json"
32
+
33
+ _kwargs["headers"] = headers
34
+ return _kwargs
35
+
36
+
37
+ def _parse_response(
38
+ *, client: Client, response: httpx.Response
39
+ ) -> Union[ErrorResponse, SuccessResponse] | None:
40
+ if response.status_code == 200:
41
+ response_200 = SuccessResponse.from_dict(response.json())
42
+
43
+ return response_200
44
+ if response.status_code == 500:
45
+ response_500 = ErrorResponse.from_dict(response.json())
46
+
47
+ return response_500
48
+ if client.raise_on_unexpected_status:
49
+ raise errors.UnexpectedStatus(response.status_code, response.content)
50
+ else:
51
+ return None
52
+
53
+
54
+ def _build_response(
55
+ *, client: Client, response: httpx.Response
56
+ ) -> Response[Union[ErrorResponse, SuccessResponse]]:
57
+ return Response(
58
+ status_code=HTTPStatus(response.status_code),
59
+ content=response.content,
60
+ headers=response.headers,
61
+ parsed=_parse_response(client=client, response=response),
62
+ )
63
+
64
+
65
+ def sync_detailed(
66
+ *,
67
+ client: Client,
68
+ body: UpgradeRequest,
69
+ ) -> Response[Union[ErrorResponse, SuccessResponse]]:
70
+ r"""Upgrade the sandbox-api
71
+
72
+ Triggers an upgrade of the sandbox-api process. Returns 200 immediately before upgrading.
73
+ The upgrade will: download the specified binary from GitHub releases, validate it, and restart.
74
+ All running processes will be preserved across the upgrade.
75
+ Available versions: \"develop\" (default), \"main\", \"latest\", or specific tag like \"v1.0.0\"
76
+ You can also specify a custom baseUrl for forks (defaults to https://github.com/blaxel-
77
+ ai/sandbox/releases)
78
+
79
+ Args:
80
+ body (UpgradeRequest):
81
+
82
+ Raises:
83
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
84
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
85
+
86
+ Returns:
87
+ Response[Union[ErrorResponse, SuccessResponse]]
88
+ """
89
+
90
+ kwargs = _get_kwargs(
91
+ body=body,
92
+ )
93
+
94
+ response = client.get_httpx_client().request(
95
+ **kwargs,
96
+ )
97
+
98
+ return _build_response(client=client, response=response)
99
+
100
+
101
+ def sync(
102
+ *,
103
+ client: Client,
104
+ body: UpgradeRequest,
105
+ ) -> Union[ErrorResponse, SuccessResponse] | None:
106
+ r"""Upgrade the sandbox-api
107
+
108
+ Triggers an upgrade of the sandbox-api process. Returns 200 immediately before upgrading.
109
+ The upgrade will: download the specified binary from GitHub releases, validate it, and restart.
110
+ All running processes will be preserved across the upgrade.
111
+ Available versions: \"develop\" (default), \"main\", \"latest\", or specific tag like \"v1.0.0\"
112
+ You can also specify a custom baseUrl for forks (defaults to https://github.com/blaxel-
113
+ ai/sandbox/releases)
114
+
115
+ Args:
116
+ body (UpgradeRequest):
117
+
118
+ Raises:
119
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
120
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
121
+
122
+ Returns:
123
+ Union[ErrorResponse, SuccessResponse]
124
+ """
125
+
126
+ return sync_detailed(
127
+ client=client,
128
+ body=body,
129
+ ).parsed
130
+
131
+
132
+ async def asyncio_detailed(
133
+ *,
134
+ client: Client,
135
+ body: UpgradeRequest,
136
+ ) -> Response[Union[ErrorResponse, SuccessResponse]]:
137
+ r"""Upgrade the sandbox-api
138
+
139
+ Triggers an upgrade of the sandbox-api process. Returns 200 immediately before upgrading.
140
+ The upgrade will: download the specified binary from GitHub releases, validate it, and restart.
141
+ All running processes will be preserved across the upgrade.
142
+ Available versions: \"develop\" (default), \"main\", \"latest\", or specific tag like \"v1.0.0\"
143
+ You can also specify a custom baseUrl for forks (defaults to https://github.com/blaxel-
144
+ ai/sandbox/releases)
145
+
146
+ Args:
147
+ body (UpgradeRequest):
148
+
149
+ Raises:
150
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
151
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
152
+
153
+ Returns:
154
+ Response[Union[ErrorResponse, SuccessResponse]]
155
+ """
156
+
157
+ kwargs = _get_kwargs(
158
+ body=body,
159
+ )
160
+
161
+ response = await client.get_async_httpx_client().request(**kwargs)
162
+
163
+ return _build_response(client=client, response=response)
164
+
165
+
166
+ async def asyncio(
167
+ *,
168
+ client: Client,
169
+ body: UpgradeRequest,
170
+ ) -> Union[ErrorResponse, SuccessResponse] | None:
171
+ r"""Upgrade the sandbox-api
172
+
173
+ Triggers an upgrade of the sandbox-api process. Returns 200 immediately before upgrading.
174
+ The upgrade will: download the specified binary from GitHub releases, validate it, and restart.
175
+ All running processes will be preserved across the upgrade.
176
+ Available versions: \"develop\" (default), \"main\", \"latest\", or specific tag like \"v1.0.0\"
177
+ You can also specify a custom baseUrl for forks (defaults to https://github.com/blaxel-
178
+ ai/sandbox/releases)
179
+
180
+ Args:
181
+ body (UpgradeRequest):
182
+
183
+ Raises:
184
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
185
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
186
+
187
+ Returns:
188
+ Union[ErrorResponse, SuccessResponse]
189
+ """
190
+
191
+ return (
192
+ await asyncio_detailed(
193
+ client=client,
194
+ body=body,
195
+ )
196
+ ).parsed
@@ -20,6 +20,7 @@ from .find_response import FindResponse
20
20
  from .fuzzy_search_match import FuzzySearchMatch
21
21
  from .fuzzy_search_response import FuzzySearchResponse
22
22
  from .get_network_process_pid_ports_response_200 import GetNetworkProcessPidPortsResponse200
23
+ from .health_response import HealthResponse
23
24
  from .multipart_complete_request import MultipartCompleteRequest
24
25
  from .multipart_initiate_request import MultipartInitiateRequest
25
26
  from .multipart_initiate_response import MultipartInitiateResponse
@@ -34,6 +35,7 @@ from .process_request import ProcessRequest
34
35
  from .process_request_env import ProcessRequestEnv
35
36
  from .process_response import ProcessResponse
36
37
  from .process_response_status import ProcessResponseStatus
38
+ from .process_upgrade_state import ProcessUpgradeState
37
39
  from .put_filesystem_multipart_upload_id_part_body import PutFilesystemMultipartUploadIdPartBody
38
40
  from .ranked_file import RankedFile
39
41
  from .reranking_response import RerankingResponse
@@ -41,6 +43,8 @@ from .subdirectory import Subdirectory
41
43
  from .success_response import SuccessResponse
42
44
  from .tree_request import TreeRequest
43
45
  from .tree_request_files import TreeRequestFiles
46
+ from .upgrade_request import UpgradeRequest
47
+ from .upgrade_status import UpgradeStatus
44
48
 
45
49
  __all__ = (
46
50
  "ApplyEditRequest",
@@ -61,6 +65,7 @@ __all__ = (
61
65
  "FuzzySearchMatch",
62
66
  "FuzzySearchResponse",
63
67
  "GetNetworkProcessPidPortsResponse200",
68
+ "HealthResponse",
64
69
  "MultipartCompleteRequest",
65
70
  "MultipartInitiateRequest",
66
71
  "MultipartInitiateResponse",
@@ -75,6 +80,7 @@ __all__ = (
75
80
  "ProcessRequestEnv",
76
81
  "ProcessResponse",
77
82
  "ProcessResponseStatus",
83
+ "ProcessUpgradeState",
78
84
  "PutFilesystemMultipartUploadIdPartBody",
79
85
  "RankedFile",
80
86
  "RerankingResponse",
@@ -82,4 +88,6 @@ __all__ = (
82
88
  "SuccessResponse",
83
89
  "TreeRequest",
84
90
  "TreeRequestFiles",
91
+ "UpgradeRequest",
92
+ "UpgradeStatus",
85
93
  )