withruntime 1.0.0__tar.gz → 1.1.0__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.
Files changed (61) hide show
  1. withruntime-1.1.0/PKG-INFO +143 -0
  2. withruntime-1.1.0/README.md +125 -0
  3. {withruntime-1.0.0 → withruntime-1.1.0}/pyproject.toml +9 -1
  4. withruntime-1.1.0/withruntime/_version.py +1 -0
  5. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/__init__.py +17 -8
  6. withruntime-1.1.0/withruntime/generated/_routes.py +8 -0
  7. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/_runtime.py +10 -0
  8. withruntime-1.1.0/withruntime/generated/agent_sessions.py +372 -0
  9. withruntime-1.1.0/withruntime/generated/agents.py +764 -0
  10. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/apps.py +314 -32
  11. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/browsers.py +314 -32
  12. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/builds.py +314 -32
  13. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/ci.py +314 -32
  14. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/containers.py +314 -32
  15. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/desktops.py +319 -37
  16. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/domains.py +178 -22
  17. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/egress_ips.py +6 -6
  18. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/events.py +4 -0
  19. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/functions.py +314 -32
  20. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/images.py +237 -20
  21. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/job_runs.py +4 -4
  22. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/jobs.py +233 -17
  23. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/keys.py +14 -10
  24. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/me.py +1 -1
  25. withruntime-1.1.0/withruntime/generated/messages.py +178 -0
  26. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/networks.py +5 -5
  27. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/notebooks.py +314 -32
  28. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/ports.py +13 -13
  29. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/previews.py +165 -27
  30. withruntime-1.1.0/withruntime/generated/projects.py +213 -0
  31. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/roles.py +32 -1
  32. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/sandboxes.py +576 -82
  33. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/secrets.py +169 -11
  34. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/signing.py +4 -1
  35. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/sites.py +314 -32
  36. withruntime-1.1.0/withruntime/generated/snapshots.py +322 -0
  37. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/tunnels.py +9 -9
  38. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/usage.py +132 -7
  39. withruntime-1.1.0/withruntime/generated/volumes.py +355 -0
  40. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/workspaces.py +314 -32
  41. withruntime-1.1.0/withruntime.egg-info/PKG-INFO +143 -0
  42. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime.egg-info/SOURCES.txt +4 -0
  43. withruntime-1.0.0/PKG-INFO +0 -11
  44. withruntime-1.0.0/withruntime/_version.py +0 -1
  45. withruntime-1.0.0/withruntime/generated/_routes.py +0 -8
  46. withruntime-1.0.0/withruntime/generated/projects.py +0 -143
  47. withruntime-1.0.0/withruntime/generated/snapshots.py +0 -55
  48. withruntime-1.0.0/withruntime/generated/volumes.py +0 -90
  49. withruntime-1.0.0/withruntime.egg-info/PKG-INFO +0 -11
  50. {withruntime-1.0.0 → withruntime-1.1.0}/LICENSE +0 -0
  51. {withruntime-1.0.0 → withruntime-1.1.0}/setup.cfg +0 -0
  52. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/__init__.py +0 -0
  53. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/audit.py +0 -0
  54. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/feedback.py +0 -0
  55. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/identities.py +0 -0
  56. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/otel.py +0 -0
  57. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/sessions.py +0 -0
  58. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime/generated/webhooks.py +0 -0
  59. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime.egg-info/dependency_links.txt +0 -0
  60. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime.egg-info/requires.txt +0 -0
  61. {withruntime-1.0.0 → withruntime-1.1.0}/withruntime.egg-info/top_level.txt +0 -0
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: withruntime
3
+ Version: 1.1.0
4
+ Summary: Runtime Cloud: Linux sandboxes for agents. The typed client for every verb of the API.
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://withruntime.com
7
+ Project-URL: Documentation, https://withruntime.com/docs
8
+ Project-URL: Source, https://github.com/withruntime/runtime/tree/main/sdks/python
9
+ Project-URL: Changelog, https://github.com/withruntime/runtime/blob/main/sdks/python/CHANGELOG.md
10
+ Keywords: sandbox,cloud,agents,microvm,firecracker,code-execution,mcp,browser,desktop,jupyter
11
+ Requires-Python: >=3.9
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: httpx<1,>=0.27
15
+ Provides-Extra: keypair
16
+ Requires-Dist: cryptography>=42; extra == "keypair"
17
+ Dynamic: license-file
18
+
19
+ # withruntime
20
+
21
+ The official client for [Runtime Cloud](https://withruntime.com): Linux machines for AI agents and apps, each a
22
+ microVM with its own kernel, disk and network, created in milliseconds and billed for the CPU it uses and the memory
23
+ it holds. The client is generated from the API's OpenAPI description, so every product and every operation of
24
+ `https://api.withruntime.com/v2` is here, typed.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pip install withruntime
30
+ ```
31
+
32
+ Python 3.9 or later. The one dependency is httpx; `pip install withruntime[keypair]` adds signing with a key pair.
33
+
34
+ ## Authentication
35
+
36
+ The client reads your API key from `RUNTIME_API_KEY`. Create a key at https://withruntime.com/account/keys and keep it
37
+ in a secret manager, never in source code or a URL. A key pair's `rtsk_` secret also works: the client signs each
38
+ request with it and never sends it.
39
+
40
+ ## Quickstart
41
+
42
+ ```python
43
+ from withruntime import Sandbox
44
+
45
+ with Sandbox.create() as sbx:
46
+ sbx.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n")
47
+ result = sbx.exec("python3 /workspace/invoice.py")
48
+ print(result.exit_code, result.stdout) # 0 750
49
+ ```
50
+
51
+ Leaving the `with` block deletes the sandbox. `AsyncRuntime`, `AsyncSandbox` and the other `Async` classes are the
52
+ same for asyncio, with `async with` and `await`.
53
+
54
+ ## Configuration
55
+
56
+ ```python
57
+ import os
58
+ from withruntime import Runtime
59
+
60
+ runtime = Runtime(
61
+ api_key=os.environ["RUNTIME_API_KEY"], # the default
62
+ project="prj_...", # default: RUNTIME_PROJECT
63
+ base_url="https://api.withruntime.com", # default: RUNTIME_API_URL
64
+ max_retries=3,
65
+ )
66
+ sbx = runtime.sandboxes.create(vcpu=4, memory_gb=8)
67
+ ```
68
+
69
+ ## Products
70
+
71
+ | Class | Create one | What it is |
72
+ | --- | --- | --- |
73
+ | `Sandbox` | `Sandbox.create()` | A Linux machine with its own kernel, made in milliseconds, paused with its memory kept when idle and resumed where it was. |
74
+ | `FunctionMachine` | `FunctionMachine.create()` | A machine that answers HTTP with a handler in /app/index.ts (`export default { fetch(request) }`, as Cloudflare Workers and Vercel take one) on port 8080, reached at its preview. |
75
+ | `App` | `App.create()` | A machine that keeps a web app in /app running on port 8080 (its Procfile's `web:`, else `npm start`, else `python3 app.py`, as Render and Heroku start one), reached at its preview. |
76
+ | `Site` | `Site.create()` | A machine that serves the static files in /site on port 8080 (as Netlify and Vercel serve a build's output), reached at its preview. |
77
+ | `CiMachine` | `CiMachine.create()` | A machine that runs a repository's checks to their end (its `run`) with git, Docker, Node, Bun, Python and a compiler, and is stopped then. |
78
+ | `Browser` | `Browser.create()` | A machine running headless Chromium, driven over the Chrome DevTools Protocol at its preview on port 9222: one WebSocket address for Playwright's `connectOverCDP` and Puppeteer's `connect`, as Browserbase gives one. |
79
+ | `Desktop` | `Desktop.create()` | A machine running a Linux desktop with Chromium, for agents that use a computer: screenshot returns what its screen shows and act moves and clicks its mouse and types on its keyboard. |
80
+ | `Notebook` | `Notebook.create()` | A machine running JupyterLab on port 8888 over /workspace, with NumPy, pandas and matplotlib, reached at its private preview. |
81
+ | `Workspace` | `Workspace.create()` | A development environment: a machine running VS Code in the browser (code-server) on port 8080 over /workspace, reached at its private preview, as Codespaces and Gitpod give one. |
82
+ | `Container` | `Container.create()` | A machine that runs one OCI image from any registry under Docker on its own network (`start` `runtime-container <image>`), the port it listens on reached at its preview, as Cloud Run and Fly Machines run one. |
83
+ | `Build` | `Build.create()` | The machine an image's build runs on: Docker's own builder (BuildKit), its run `runtime-image-build`, deleted once its image is made. |
84
+ | `Job` | `Job.create()` | A command run in a fresh machine, once or on a cron schedule in a timezone. |
85
+ | `Image` | `Image.create()` | What a machine boots: a root filesystem, its environment and its start. |
86
+ | `Volume` | `Volume.create()` | A disk that outlives the machines it is attached to. |
87
+ | `Domain` | `Domain.create()` | Your own hostname serving a machine's port, with HTTPS. |
88
+
89
+ Every machine (each class above with `files`) has `refresh`, `delete`, `pause`, `resume`, `exec`, `metrics`, `fork`, `snapshot`, `update`, `screenshot`, `act`, `run_code`, `spawn`, `files.read`, `files.write`, `files.remove`, `files.stat`, `files.list`, `files.download_folder`, `files.upload_folder`, `files.begin_folder_upload`, `files.write_folder_upload`, `files.commit_folder_upload`, `files.abort_folder_upload`, `files.mkdir`, `files.rename`, `files.link`, `files.revoke_links`, `processes.output`, `processes.write`, `processes.signal`, `processes.resize`, `processes.list`, `network.get`, `network.set`.
90
+
91
+ - `Sandbox` also has `exec_stream`, `previews.create`.
92
+ - `Job` also has `run`.
93
+ - `Image` also has `logs`.
94
+ - `Domain` also has `verify`.
95
+
96
+ The API's other resources (keys, projects, roles, secrets, snapshots, webhooks, usage and more) are clients on the
97
+ runtime object. The [API reference](https://withruntime.com/docs/reference) lists every operation.
98
+
99
+ ## Errors
100
+
101
+ Every error the API returns is raised as a `RuntimeApiError` with `code`, `message`, `status`, `request_id`,
102
+ `hint`, `param` and `retryable`. Each error family has its own subclass, such as `NotFoundError`,
103
+ `InvalidRequestError`, `RateLimitedError` and `CapacityUnavailableError`:
104
+
105
+ ```python
106
+ from withruntime import NotFoundError
107
+
108
+ try:
109
+ runtime.sandboxes.get("sbx_missing")
110
+ except NotFoundError as err:
111
+ print(err.code, err.request_id)
112
+ ```
113
+
114
+ ## Retries and idempotency
115
+
116
+ The client retries a rate-limited (429) or unavailable (503) answer, and a lost connection on a call that is safe to send again, up to `max_retries` times (default 3). Every write sends an `Idempotency-Key` header, generated when you do not pass `idempotency_key`, so a retry never runs a write twice.
117
+
118
+ ## Lists
119
+
120
+ A `list` call returns a page; iterating it yields every item across pages:
121
+
122
+ ```python
123
+ for s in runtime.sandboxes.list(state="running"):
124
+ print(s.id)
125
+ ```
126
+
127
+ ## Versioning
128
+
129
+ The package follows [Semantic Versioning](https://semver.org): a minor or patch release never breaks code written
130
+ for an earlier release of the same major version. Each request sends the API version the client was generated for in
131
+ the `Runtime-Version` header. Every release is listed in [CHANGELOG.md](CHANGELOG.md).
132
+
133
+ ## Resources
134
+
135
+ - Guides: https://withruntime.com/docs
136
+ - API reference: https://withruntime.com/docs/reference
137
+ - Pricing: https://withruntime.com/pricing
138
+ - Status: https://status.withruntime.com
139
+ - Support: support@withruntime.com
140
+
141
+ ## License
142
+
143
+ Apache-2.0
@@ -0,0 +1,125 @@
1
+ # withruntime
2
+
3
+ The official client for [Runtime Cloud](https://withruntime.com): Linux machines for AI agents and apps, each a
4
+ microVM with its own kernel, disk and network, created in milliseconds and billed for the CPU it uses and the memory
5
+ it holds. The client is generated from the API's OpenAPI description, so every product and every operation of
6
+ `https://api.withruntime.com/v2` is here, typed.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ pip install withruntime
12
+ ```
13
+
14
+ Python 3.9 or later. The one dependency is httpx; `pip install withruntime[keypair]` adds signing with a key pair.
15
+
16
+ ## Authentication
17
+
18
+ The client reads your API key from `RUNTIME_API_KEY`. Create a key at https://withruntime.com/account/keys and keep it
19
+ in a secret manager, never in source code or a URL. A key pair's `rtsk_` secret also works: the client signs each
20
+ request with it and never sends it.
21
+
22
+ ## Quickstart
23
+
24
+ ```python
25
+ from withruntime import Sandbox
26
+
27
+ with Sandbox.create() as sbx:
28
+ sbx.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n")
29
+ result = sbx.exec("python3 /workspace/invoice.py")
30
+ print(result.exit_code, result.stdout) # 0 750
31
+ ```
32
+
33
+ Leaving the `with` block deletes the sandbox. `AsyncRuntime`, `AsyncSandbox` and the other `Async` classes are the
34
+ same for asyncio, with `async with` and `await`.
35
+
36
+ ## Configuration
37
+
38
+ ```python
39
+ import os
40
+ from withruntime import Runtime
41
+
42
+ runtime = Runtime(
43
+ api_key=os.environ["RUNTIME_API_KEY"], # the default
44
+ project="prj_...", # default: RUNTIME_PROJECT
45
+ base_url="https://api.withruntime.com", # default: RUNTIME_API_URL
46
+ max_retries=3,
47
+ )
48
+ sbx = runtime.sandboxes.create(vcpu=4, memory_gb=8)
49
+ ```
50
+
51
+ ## Products
52
+
53
+ | Class | Create one | What it is |
54
+ | --- | --- | --- |
55
+ | `Sandbox` | `Sandbox.create()` | A Linux machine with its own kernel, made in milliseconds, paused with its memory kept when idle and resumed where it was. |
56
+ | `FunctionMachine` | `FunctionMachine.create()` | A machine that answers HTTP with a handler in /app/index.ts (`export default { fetch(request) }`, as Cloudflare Workers and Vercel take one) on port 8080, reached at its preview. |
57
+ | `App` | `App.create()` | A machine that keeps a web app in /app running on port 8080 (its Procfile's `web:`, else `npm start`, else `python3 app.py`, as Render and Heroku start one), reached at its preview. |
58
+ | `Site` | `Site.create()` | A machine that serves the static files in /site on port 8080 (as Netlify and Vercel serve a build's output), reached at its preview. |
59
+ | `CiMachine` | `CiMachine.create()` | A machine that runs a repository's checks to their end (its `run`) with git, Docker, Node, Bun, Python and a compiler, and is stopped then. |
60
+ | `Browser` | `Browser.create()` | A machine running headless Chromium, driven over the Chrome DevTools Protocol at its preview on port 9222: one WebSocket address for Playwright's `connectOverCDP` and Puppeteer's `connect`, as Browserbase gives one. |
61
+ | `Desktop` | `Desktop.create()` | A machine running a Linux desktop with Chromium, for agents that use a computer: screenshot returns what its screen shows and act moves and clicks its mouse and types on its keyboard. |
62
+ | `Notebook` | `Notebook.create()` | A machine running JupyterLab on port 8888 over /workspace, with NumPy, pandas and matplotlib, reached at its private preview. |
63
+ | `Workspace` | `Workspace.create()` | A development environment: a machine running VS Code in the browser (code-server) on port 8080 over /workspace, reached at its private preview, as Codespaces and Gitpod give one. |
64
+ | `Container` | `Container.create()` | A machine that runs one OCI image from any registry under Docker on its own network (`start` `runtime-container <image>`), the port it listens on reached at its preview, as Cloud Run and Fly Machines run one. |
65
+ | `Build` | `Build.create()` | The machine an image's build runs on: Docker's own builder (BuildKit), its run `runtime-image-build`, deleted once its image is made. |
66
+ | `Job` | `Job.create()` | A command run in a fresh machine, once or on a cron schedule in a timezone. |
67
+ | `Image` | `Image.create()` | What a machine boots: a root filesystem, its environment and its start. |
68
+ | `Volume` | `Volume.create()` | A disk that outlives the machines it is attached to. |
69
+ | `Domain` | `Domain.create()` | Your own hostname serving a machine's port, with HTTPS. |
70
+
71
+ Every machine (each class above with `files`) has `refresh`, `delete`, `pause`, `resume`, `exec`, `metrics`, `fork`, `snapshot`, `update`, `screenshot`, `act`, `run_code`, `spawn`, `files.read`, `files.write`, `files.remove`, `files.stat`, `files.list`, `files.download_folder`, `files.upload_folder`, `files.begin_folder_upload`, `files.write_folder_upload`, `files.commit_folder_upload`, `files.abort_folder_upload`, `files.mkdir`, `files.rename`, `files.link`, `files.revoke_links`, `processes.output`, `processes.write`, `processes.signal`, `processes.resize`, `processes.list`, `network.get`, `network.set`.
72
+
73
+ - `Sandbox` also has `exec_stream`, `previews.create`.
74
+ - `Job` also has `run`.
75
+ - `Image` also has `logs`.
76
+ - `Domain` also has `verify`.
77
+
78
+ The API's other resources (keys, projects, roles, secrets, snapshots, webhooks, usage and more) are clients on the
79
+ runtime object. The [API reference](https://withruntime.com/docs/reference) lists every operation.
80
+
81
+ ## Errors
82
+
83
+ Every error the API returns is raised as a `RuntimeApiError` with `code`, `message`, `status`, `request_id`,
84
+ `hint`, `param` and `retryable`. Each error family has its own subclass, such as `NotFoundError`,
85
+ `InvalidRequestError`, `RateLimitedError` and `CapacityUnavailableError`:
86
+
87
+ ```python
88
+ from withruntime import NotFoundError
89
+
90
+ try:
91
+ runtime.sandboxes.get("sbx_missing")
92
+ except NotFoundError as err:
93
+ print(err.code, err.request_id)
94
+ ```
95
+
96
+ ## Retries and idempotency
97
+
98
+ The client retries a rate-limited (429) or unavailable (503) answer, and a lost connection on a call that is safe to send again, up to `max_retries` times (default 3). Every write sends an `Idempotency-Key` header, generated when you do not pass `idempotency_key`, so a retry never runs a write twice.
99
+
100
+ ## Lists
101
+
102
+ A `list` call returns a page; iterating it yields every item across pages:
103
+
104
+ ```python
105
+ for s in runtime.sandboxes.list(state="running"):
106
+ print(s.id)
107
+ ```
108
+
109
+ ## Versioning
110
+
111
+ The package follows [Semantic Versioning](https://semver.org): a minor or patch release never breaks code written
112
+ for an earlier release of the same major version. Each request sends the API version the client was generated for in
113
+ the `Runtime-Version` header. Every release is listed in [CHANGELOG.md](CHANGELOG.md).
114
+
115
+ ## Resources
116
+
117
+ - Guides: https://withruntime.com/docs
118
+ - API reference: https://withruntime.com/docs/reference
119
+ - Pricing: https://withruntime.com/pricing
120
+ - Status: https://status.withruntime.com
121
+ - Support: support@withruntime.com
122
+
123
+ ## License
124
+
125
+ Apache-2.0
@@ -4,8 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "withruntime"
7
- version = "1.0.0"
7
+ version = "1.1.0"
8
8
  description = "Runtime Cloud: Linux sandboxes for agents. The typed client for every verb of the API."
9
+ readme = "README.md"
10
+ keywords = ["sandbox", "cloud", "agents", "microvm", "firecracker", "code-execution", "mcp", "browser", "desktop", "jupyter"]
9
11
  license = { text = "Apache-2.0" }
10
12
  requires-python = ">=3.9"
11
13
  dependencies = ["httpx>=0.27,<1"]
@@ -13,6 +15,12 @@ dependencies = ["httpx>=0.27,<1"]
13
15
  [project.optional-dependencies]
14
16
  keypair = ["cryptography>=42"]
15
17
 
18
+ [project.urls]
19
+ Homepage = "https://withruntime.com"
20
+ Documentation = "https://withruntime.com/docs"
21
+ Source = "https://github.com/withruntime/runtime/tree/main/sdks/python"
22
+ Changelog = "https://github.com/withruntime/runtime/blob/main/sdks/python/CHANGELOG.md"
23
+
16
24
  [tool.setuptools.packages.find]
17
25
  where = ["."]
18
26
  include = ["withruntime*"]
@@ -0,0 +1 @@
1
+ VERSION = "1.1.0"
@@ -11,9 +11,9 @@ from typing import Any, Dict, List, Optional, Union
11
11
 
12
12
  from ._runtime import (API_VERSION, MAX_RETRIES, AsyncPage, AsyncStream, AsyncTransport, Page, RuntimeApiError, Stream,
13
13
  Transport, route_call, routes_of)
14
- from ._runtime import InvalidRequestError, UnauthorizedError, PaymentRequiredError, ForbiddenError, LimitExceededError, NotFoundError, AlreadyExistsError, ConflictError, TooLargeError, RateLimitedError, InternalError, ApiNotImplementedError, UnavailableError, CapacityUnavailableError, ApiTimeoutError
14
+ from ._runtime import InvalidRequestError, UnauthorizedError, PaymentRequiredError, CardRequiredError, ForbiddenError, LimitExceededError, NotFoundError, MethodNotAllowedError, AlreadyExistsError, ConflictError, TooLargeError, RateLimitedError, InternalError, ApiNotImplementedError, UnavailableError, CapacityUnavailableError, ApiTimeoutError
15
15
  from ._routes import ROUTES
16
- from .sandboxes import MachineStart, VolumeMount, SandboxRun, NetworkRules, SandboxSettings, SandboxCreate, MachineReady, SandboxInfo, Terminal, ExecRequest, Process, FileWritten, OutputChunk, ProcessOutput, ProcessInput, ProcessWritten, ProcessSignal, ProcessList, FileRemove, FileRemoved, FileInfo, FileList, FolderUnpacked, FolderUploadBegin, FolderUpload, FolderUploadReceived, FolderUploadAborted, FileMkdir, FileMade, FileRename, FileRenamed, FileLinkCreate, FileLink, FileLinksRevoked, SandboxNetwork, MetricPoint, MetricsBase, SandboxMetrics, ForkRequest, Forked, SnapshotRequest, Stored, MachineUpdate, Action, ActRequest, Point, ScreenSize, Acted, RunCode, CodeResult, CodeError, CodeRun, Sandboxes, Sandbox, AsyncSandboxes, AsyncSandbox
16
+ from .sandboxes import MachineStart, VolumeMount, SandboxRun, NetworkRules, SandboxSettings, SandboxCreate, MachineReady, SandboxInfo, Terminal, ExecRequest, Process, ExecEventError, ExecEvent, FileWritten, OutputChunk, ProcessOutput, ProcessInput, ProcessWritten, ProcessSignal, ProcessList, FileRemove, FileRemoved, FileInfo, FileList, FolderUnpacked, FolderUploadBegin, FolderUpload, FolderUploadReceived, FolderUploadAborted, FileMkdir, FileMade, FileRename, FileRenamed, FileLinkCreate, FileLink, FileLinksRevoked, SandboxNetwork, MetricPoint, MetricsBase, SandboxMetrics, ForkRequest, Forked, SnapshotRequest, Stored, MachineUpdate, Action, ActRequest, Point, ScreenSize, Acted, RunCode, CodeResult, CodeError, CodeRun, Sandboxes, Sandbox, AsyncSandboxes, AsyncSandbox
17
17
  from .functions import Functions, FunctionMachine, AsyncFunctions, AsyncFunctionMachine
18
18
  from .secrets import SecretScope, SecretRule, SecretGit, SecretGraphql, SecretApi, SecretPolicies, SecretSettings, SecretInfo, SecretSet, Secrets, Secret, AsyncSecrets, AsyncSecret
19
19
  from .apps import Apps, App, AsyncApps, AsyncApp
@@ -27,17 +27,20 @@ from .containers import Containers, Container, AsyncContainers, AsyncContainer
27
27
  from .builds import Builds, Build, AsyncBuilds, AsyncBuild
28
28
  from .jobs import JobSchedule, JobRetry, JobSecrets, JobSettings, JobCreate, JobError, JobInfo, Jobs, Job, AsyncJobs, AsyncJob
29
29
  from .job_runs import JobRun, JobRunOutput, JobRuns, AsyncJobRuns
30
- from .snapshots import Snapshots, AsyncSnapshots
30
+ from .agents import AgentTool, McpServer, AgentSettings, AgentCreate, AgentInfo, AgentStart, Agents, Agent, AsyncAgents, AsyncAgent
31
+ from .agent_sessions import AgentSessions, AsyncAgentSessions
32
+ from .messages import Message, SessionMessages, AskAnswer, MessageSend, Messages, AsyncMessages
33
+ from .snapshots import StoredUpdate, Snapshots, Snapshot, AsyncSnapshots, AsyncSnapshot
31
34
  from .images import ContextAsked, ContextMissing, ChunkStored, ImageFile, ImageRecipe, ImageArchive, ImageContextFile, ImageContext, ImageBuild, ImageCreate, ImageLogLine, ImageLogs, Images, Image, AsyncImages, AsyncImage
32
- from .volumes import VolumeCreate, Volumes, AsyncVolumes
35
+ from .volumes import VolumeCreate, Volumes, Volume, AsyncVolumes, AsyncVolume
33
36
  from .sessions import SessionCreate, Session, SessionCreated, Sessions, AsyncSessions
34
37
  from .keys import Key, KeyAuthorization, KeyCreate, KeyCreated, KeyUpdate, Keys, AsyncKeys
35
- from .projects import Project, ProjectCreate, Rename, Projects, AsyncProjects
38
+ from .projects import ProjectLimits, Project, ProjectCreate, ProjectLimitsSet, Rename, Projects, AsyncProjects
36
39
  from .identities import Identity, Identities, AsyncIdentities
37
- from .roles import Role, Roles, AsyncRoles
40
+ from .roles import Role, RoleActionsChange, Roles, AsyncRoles
38
41
  from .audit import AuditLine, Audit, AsyncAudit
39
42
  from .me import Me, MeClient, AsyncMeClient
40
- from .usage import MeterUse, Limit, KeyUsage, KeySpendCap, Usage, UsageLine, UsageExport, UsageClient, AsyncUsageClient
43
+ from .usage import MeterUse, Limit, KeyUsage, KeySpendCap, UsageHour, ProductLine, KeySpend, Usage, UsageLine, UsageExport, UsageClient, AsyncUsageClient
41
44
  from .previews import PreviewCreate, PreviewInfo, Previews, Preview, AsyncPreviews, AsyncPreview
42
45
  from .domains import DomainCreate, DomainSettings, DomainInfo, Domains, Domain, AsyncDomains, AsyncDomain
43
46
  from .ports import PortCreate, PortSettings, Port, Ports, AsyncPorts
@@ -69,6 +72,9 @@ class Runtime:
69
72
  self.builds = Builds(self.transport)
70
73
  self.jobs = Jobs(self.transport)
71
74
  self.job_runs = JobRuns(self.transport)
75
+ self.agents = Agents(self.transport)
76
+ self.agent_sessions = AgentSessions(self.transport)
77
+ self.messages = Messages(self.transport)
72
78
  self.snapshots = Snapshots(self.transport)
73
79
  self.images = Images(self.transport)
74
80
  self.volumes = Volumes(self.transport)
@@ -145,6 +151,9 @@ class AsyncRuntime:
145
151
  self.builds = AsyncBuilds(self.transport)
146
152
  self.jobs = AsyncJobs(self.transport)
147
153
  self.job_runs = AsyncJobRuns(self.transport)
154
+ self.agents = AsyncAgents(self.transport)
155
+ self.agent_sessions = AsyncAgentSessions(self.transport)
156
+ self.messages = AsyncMessages(self.transport)
148
157
  self.snapshots = AsyncSnapshots(self.transport)
149
158
  self.images = AsyncImages(self.transport)
150
159
  self.volumes = AsyncVolumes(self.transport)
@@ -202,4 +211,4 @@ class AsyncRuntime:
202
211
  await self.call("sandboxes.delete", {"id": a0["id"]})
203
212
 
204
213
 
205
- __all__ = ["API_VERSION", "AsyncPage", "AsyncRuntime", "AsyncStream", "Page", "Runtime", "RuntimeApiError", "Stream", "Transport", "AsyncTransport", "InvalidRequestError", "UnauthorizedError", "PaymentRequiredError", "ForbiddenError", "LimitExceededError", "NotFoundError", "AlreadyExistsError", "ConflictError", "TooLargeError", "RateLimitedError", "InternalError", "ApiNotImplementedError", "UnavailableError", "CapacityUnavailableError", "ApiTimeoutError", "MachineStart", "VolumeMount", "SandboxRun", "NetworkRules", "SandboxSettings", "SandboxCreate", "MachineReady", "SandboxInfo", "Terminal", "ExecRequest", "Process", "FileWritten", "OutputChunk", "ProcessOutput", "ProcessInput", "ProcessWritten", "ProcessSignal", "ProcessList", "FileRemove", "FileRemoved", "FileInfo", "FileList", "FolderUnpacked", "FolderUploadBegin", "FolderUpload", "FolderUploadReceived", "FolderUploadAborted", "FileMkdir", "FileMade", "FileRename", "FileRenamed", "FileLinkCreate", "FileLink", "FileLinksRevoked", "SandboxNetwork", "MetricPoint", "MetricsBase", "SandboxMetrics", "ForkRequest", "Forked", "SnapshotRequest", "Stored", "MachineUpdate", "Action", "ActRequest", "Point", "ScreenSize", "Acted", "RunCode", "CodeResult", "CodeError", "CodeRun", "Sandboxes", "Sandbox", "AsyncSandboxes", "AsyncSandbox", "Functions", "FunctionMachine", "AsyncFunctions", "AsyncFunctionMachine", "SecretScope", "SecretRule", "SecretGit", "SecretGraphql", "SecretApi", "SecretPolicies", "SecretSettings", "SecretInfo", "SecretSet", "Secrets", "Secret", "AsyncSecrets", "AsyncSecret", "Apps", "App", "AsyncApps", "AsyncApp", "Sites", "Site", "AsyncSites", "AsyncSite", "Ci", "CiMachine", "AsyncCi", "AsyncCiMachine", "Browsers", "Browser", "AsyncBrowsers", "AsyncBrowser", "Desktops", "Desktop", "AsyncDesktops", "AsyncDesktop", "Notebooks", "Notebook", "AsyncNotebooks", "AsyncNotebook", "Workspaces", "Workspace", "AsyncWorkspaces", "AsyncWorkspace", "Containers", "Container", "AsyncContainers", "AsyncContainer", "Builds", "Build", "AsyncBuilds", "AsyncBuild", "JobSchedule", "JobRetry", "JobSecrets", "JobSettings", "JobCreate", "JobError", "JobInfo", "Jobs", "Job", "AsyncJobs", "AsyncJob", "JobRun", "JobRunOutput", "JobRuns", "AsyncJobRuns", "Snapshots", "AsyncSnapshots", "ContextAsked", "ContextMissing", "ChunkStored", "ImageFile", "ImageRecipe", "ImageArchive", "ImageContextFile", "ImageContext", "ImageBuild", "ImageCreate", "ImageLogLine", "ImageLogs", "Images", "Image", "AsyncImages", "AsyncImage", "VolumeCreate", "Volumes", "AsyncVolumes", "SessionCreate", "Session", "SessionCreated", "Sessions", "AsyncSessions", "Key", "KeyAuthorization", "KeyCreate", "KeyCreated", "KeyUpdate", "Keys", "AsyncKeys", "Project", "ProjectCreate", "Rename", "Projects", "AsyncProjects", "Identity", "Identities", "AsyncIdentities", "Role", "Roles", "AsyncRoles", "AuditLine", "Audit", "AsyncAudit", "Me", "MeClient", "AsyncMeClient", "MeterUse", "Limit", "KeyUsage", "KeySpendCap", "Usage", "UsageLine", "UsageExport", "UsageClient", "AsyncUsageClient", "PreviewCreate", "PreviewInfo", "Previews", "Preview", "AsyncPreviews", "AsyncPreview", "DomainCreate", "DomainSettings", "DomainInfo", "Domains", "Domain", "AsyncDomains", "AsyncDomain", "PortCreate", "PortSettings", "Port", "Ports", "AsyncPorts", "EgressIpSettings", "EgressIp", "EgressIps", "AsyncEgressIps", "TunnelPeer", "TunnelMember", "TunnelSettings", "Tunnel", "Tunnels", "AsyncTunnels", "NetworkSettings", "Network", "Networks", "AsyncNetworks", "WebhookCreate", "Webhook", "Webhooks", "AsyncWebhooks", "Event", "Events", "AsyncEvents", "ExportCreate", "Export", "Otel", "AsyncOtel", "FeedbackCreate", "Feedback", "FeedbackClient", "AsyncFeedbackClient"]
214
+ __all__ = ["API_VERSION", "AsyncPage", "AsyncRuntime", "AsyncStream", "Page", "Runtime", "RuntimeApiError", "Stream", "Transport", "AsyncTransport", "InvalidRequestError", "UnauthorizedError", "PaymentRequiredError", "CardRequiredError", "ForbiddenError", "LimitExceededError", "NotFoundError", "MethodNotAllowedError", "AlreadyExistsError", "ConflictError", "TooLargeError", "RateLimitedError", "InternalError", "ApiNotImplementedError", "UnavailableError", "CapacityUnavailableError", "ApiTimeoutError", "MachineStart", "VolumeMount", "SandboxRun", "NetworkRules", "SandboxSettings", "SandboxCreate", "MachineReady", "SandboxInfo", "Terminal", "ExecRequest", "Process", "ExecEventError", "ExecEvent", "FileWritten", "OutputChunk", "ProcessOutput", "ProcessInput", "ProcessWritten", "ProcessSignal", "ProcessList", "FileRemove", "FileRemoved", "FileInfo", "FileList", "FolderUnpacked", "FolderUploadBegin", "FolderUpload", "FolderUploadReceived", "FolderUploadAborted", "FileMkdir", "FileMade", "FileRename", "FileRenamed", "FileLinkCreate", "FileLink", "FileLinksRevoked", "SandboxNetwork", "MetricPoint", "MetricsBase", "SandboxMetrics", "ForkRequest", "Forked", "SnapshotRequest", "Stored", "MachineUpdate", "Action", "ActRequest", "Point", "ScreenSize", "Acted", "RunCode", "CodeResult", "CodeError", "CodeRun", "Sandboxes", "Sandbox", "AsyncSandboxes", "AsyncSandbox", "Functions", "FunctionMachine", "AsyncFunctions", "AsyncFunctionMachine", "SecretScope", "SecretRule", "SecretGit", "SecretGraphql", "SecretApi", "SecretPolicies", "SecretSettings", "SecretInfo", "SecretSet", "Secrets", "Secret", "AsyncSecrets", "AsyncSecret", "Apps", "App", "AsyncApps", "AsyncApp", "Sites", "Site", "AsyncSites", "AsyncSite", "Ci", "CiMachine", "AsyncCi", "AsyncCiMachine", "Browsers", "Browser", "AsyncBrowsers", "AsyncBrowser", "Desktops", "Desktop", "AsyncDesktops", "AsyncDesktop", "Notebooks", "Notebook", "AsyncNotebooks", "AsyncNotebook", "Workspaces", "Workspace", "AsyncWorkspaces", "AsyncWorkspace", "Containers", "Container", "AsyncContainers", "AsyncContainer", "Builds", "Build", "AsyncBuilds", "AsyncBuild", "JobSchedule", "JobRetry", "JobSecrets", "JobSettings", "JobCreate", "JobError", "JobInfo", "Jobs", "Job", "AsyncJobs", "AsyncJob", "JobRun", "JobRunOutput", "JobRuns", "AsyncJobRuns", "AgentTool", "McpServer", "AgentSettings", "AgentCreate", "AgentInfo", "AgentStart", "Agents", "Agent", "AsyncAgents", "AsyncAgent", "AgentSessions", "AsyncAgentSessions", "Message", "SessionMessages", "AskAnswer", "MessageSend", "Messages", "AsyncMessages", "StoredUpdate", "Snapshots", "Snapshot", "AsyncSnapshots", "AsyncSnapshot", "ContextAsked", "ContextMissing", "ChunkStored", "ImageFile", "ImageRecipe", "ImageArchive", "ImageContextFile", "ImageContext", "ImageBuild", "ImageCreate", "ImageLogLine", "ImageLogs", "Images", "Image", "AsyncImages", "AsyncImage", "VolumeCreate", "Volumes", "Volume", "AsyncVolumes", "AsyncVolume", "SessionCreate", "Session", "SessionCreated", "Sessions", "AsyncSessions", "Key", "KeyAuthorization", "KeyCreate", "KeyCreated", "KeyUpdate", "Keys", "AsyncKeys", "ProjectLimits", "Project", "ProjectCreate", "ProjectLimitsSet", "Rename", "Projects", "AsyncProjects", "Identity", "Identities", "AsyncIdentities", "Role", "RoleActionsChange", "Roles", "AsyncRoles", "AuditLine", "Audit", "AsyncAudit", "Me", "MeClient", "AsyncMeClient", "MeterUse", "Limit", "KeyUsage", "KeySpendCap", "UsageHour", "ProductLine", "KeySpend", "Usage", "UsageLine", "UsageExport", "UsageClient", "AsyncUsageClient", "PreviewCreate", "PreviewInfo", "Previews", "Preview", "AsyncPreviews", "AsyncPreview", "DomainCreate", "DomainSettings", "DomainInfo", "Domains", "Domain", "AsyncDomains", "AsyncDomain", "PortCreate", "PortSettings", "Port", "Ports", "AsyncPorts", "EgressIpSettings", "EgressIp", "EgressIps", "AsyncEgressIps", "TunnelPeer", "TunnelMember", "TunnelSettings", "Tunnel", "Tunnels", "AsyncTunnels", "NetworkSettings", "Network", "Networks", "AsyncNetworks", "WebhookCreate", "Webhook", "Webhooks", "AsyncWebhooks", "Event", "Events", "AsyncEvents", "ExportCreate", "Export", "Otel", "AsyncOtel", "FeedbackCreate", "Feedback", "FeedbackClient", "AsyncFeedbackClient"]