withruntime 0.23.0 → 0.33.1
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.
- package/COMPATIBILITY.md +66 -5
- package/E2B.md +1 -1
- package/README.md +36 -2
- package/README.src.md +35 -1
- package/compatibility-lock.json +3 -3
- package/dist/agents/browser.d.ts +12 -0
- package/dist/agents/browser.js +12 -0
- package/dist/agents/index.d.ts +7 -7
- package/dist/agents/index.js +7 -8
- package/dist/agents-cli.d.ts +1 -1
- package/dist/agents-cli.js +250 -3
- package/dist/agents-deploy.d.ts +186 -0
- package/dist/agents-deploy.js +752 -0
- package/dist/agents-file.d.ts +19 -0
- package/dist/agents-file.js +135 -0
- package/dist/apps/index.d.ts +10 -0
- package/dist/apps/index.js +11 -0
- package/dist/apps-cli.d.ts +3 -1
- package/dist/apps-cli.js +285 -38
- package/dist/blaxel/errors.js +2 -1
- package/dist/ci/index.d.ts +13 -0
- package/dist/ci/index.js +14 -0
- package/dist/ci-cli.d.ts +10 -0
- package/dist/ci-cli.js +402 -0
- package/dist/ci-import.d.ts +23 -0
- package/dist/ci-import.js +565 -0
- package/dist/cli.d.ts +18 -7
- package/dist/cli.js +775 -85
- package/dist/daytona/errors.js +2 -1
- package/dist/e2b/errors.js +2 -1
- package/dist/e2b/filesystem.d.ts +1 -0
- package/dist/e2b/filesystem.js +1 -1
- package/dist/e2b/sandbox.d.ts +11 -2
- package/dist/e2b/sandbox.js +22 -6
- package/dist/errors.d.ts +11 -4
- package/dist/errors.js +27 -4
- package/dist/fly/index.d.ts +102 -0
- package/dist/fly/index.js +930 -0
- package/dist/index.d.ts +7 -3
- package/dist/machine.d.ts +10 -6
- package/dist/machine.js +14 -6
- package/dist/modal/index.d.ts +34 -0
- package/dist/modal/index.js +128 -22
- package/dist/products/agents.d.ts +101 -3
- package/dist/products/agents.js +49 -0
- package/dist/products/apps.d.ts +206 -10
- package/dist/products/apps.js +172 -1
- package/dist/products/ci.d.ts +335 -0
- package/dist/products/ci.js +108 -0
- package/dist/products/index.d.ts +8 -0
- package/dist/products/index.js +15 -0
- package/dist/products/jobs.d.ts +105 -5
- package/dist/products/jobs.js +47 -3
- package/dist/products/network.d.ts +13 -0
- package/dist/products/observability.d.ts +1 -1
- package/dist/products/plans.d.ts +131 -0
- package/dist/products/plans.js +24 -0
- package/dist/products/reservations.d.ts +108 -0
- package/dist/products/reservations.js +41 -0
- package/dist/products/resources.d.ts +2 -1
- package/dist/products/secrets.d.ts +90 -6
- package/dist/products/secrets.js +8 -2
- package/dist/proxy.d.ts +3 -3
- package/dist/proxy.js +20 -0
- package/dist/sandbox.d.ts +29 -1
- package/dist/sandbox.js +56 -3
- package/dist/snapshots.d.ts +1 -1
- package/dist/switched-off.d.ts +5 -0
- package/dist/switched-off.js +8 -0
- package/dist/tar.d.ts +1 -1
- package/dist/tar.js +19 -1
- package/dist/transport.d.ts +1 -1
- package/dist/transport.js +48 -9
- package/dist/types.d.ts +35 -4
- package/dist/vercel/errors.d.ts +1 -1
- package/dist/vercel/errors.js +2 -1
- package/dist/vercel/snapshot.js +4 -2
- package/package.json +23 -6
package/dist/vercel/errors.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare function translate(error: unknown, sandboxName?: string): unknown
|
|
|
45
45
|
export declare function guard<T>(work: () => Promise<T>, sandboxName?: string): Promise<T>;
|
|
46
46
|
/** A node:fs-style error, as Vercel's `sandbox.fs` throws. */
|
|
47
47
|
export declare function fsError(code: "ENOENT" | "EEXIST" | "EISDIR" | "ENOTDIR" | "EACCES" | "ENOTEMPTY" | "EINVAL", syscall: string, path: string): Error & {
|
|
48
|
-
code: "ENOENT" | "
|
|
48
|
+
code: "ENOENT" | "ENOTDIR" | "EEXIST" | "EISDIR" | "EACCES" | "ENOTEMPTY" | "EINVAL";
|
|
49
49
|
errno: number;
|
|
50
50
|
syscall: string;
|
|
51
51
|
path: string;
|
package/dist/vercel/errors.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RuntimeError } from "../errors.js";
|
|
2
|
+
import { productSwitchedOff } from "../switched-off.js";
|
|
2
3
|
/** An error answer from the API. `response.status` is the HTTP status, and
|
|
3
4
|
* `json` is `{ error: { code, message } }` as Vercel's is. */
|
|
4
5
|
export class APIError extends Error {
|
|
@@ -69,7 +70,7 @@ export function translate(error, sandboxName) {
|
|
|
69
70
|
]
|
|
70
71
|
.filter(Boolean)
|
|
71
72
|
.join("\n");
|
|
72
|
-
if (error
|
|
73
|
+
if (productSwitchedOff(error))
|
|
73
74
|
return new NotSupportedError(error.code.replace(/_unavailable$/, ""), error.hint ?? "", message);
|
|
74
75
|
if (error.status < 200 || error.status > 599)
|
|
75
76
|
return error;
|
package/dist/vercel/snapshot.js
CHANGED
|
@@ -9,10 +9,12 @@ function statusOf(state) {
|
|
|
9
9
|
}
|
|
10
10
|
/** Vercel's snapshots always expire. Runtime's has no end date while it is kept
|
|
11
11
|
* for as long as the account has credit; it is then taken at the longest a
|
|
12
|
-
* snapshot
|
|
12
|
+
* snapshot can be kept from now, a year, which the server moves on with it.
|
|
13
|
+
* Until 19 October 2026 this said a year from when it was made, a date that
|
|
14
|
+
* would have passed while the snapshot was still kept. */
|
|
13
15
|
function expiresAtOf(snapshot) {
|
|
14
16
|
return snapshot.expiresAt === null
|
|
15
|
-
? Date.parse(snapshot.createdAt) + 365 * 86_400_000
|
|
17
|
+
? Math.max(Date.parse(snapshot.createdAt), Date.now()) + 365 * 86_400_000
|
|
16
18
|
: Date.parse(snapshot.expiresAt);
|
|
17
19
|
}
|
|
18
20
|
function metadataOf(snapshot) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "withruntime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"mcpName": "com.withruntime/runtime",
|
|
6
6
|
"type": "module",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"./agents": {
|
|
59
59
|
"types": "./dist/agents/index.d.ts",
|
|
60
|
+
"browser": "./dist/agents/browser.js",
|
|
60
61
|
"import": "./dist/agents/index.js",
|
|
61
62
|
"default": "./dist/agents/index.js"
|
|
62
63
|
},
|
|
@@ -70,6 +71,16 @@
|
|
|
70
71
|
"import": "./dist/builds/index.js",
|
|
71
72
|
"default": "./dist/builds/index.js"
|
|
72
73
|
},
|
|
74
|
+
"./ci": {
|
|
75
|
+
"types": "./dist/ci/index.d.ts",
|
|
76
|
+
"import": "./dist/ci/index.js",
|
|
77
|
+
"default": "./dist/ci/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./apps": {
|
|
80
|
+
"types": "./dist/apps/index.d.ts",
|
|
81
|
+
"import": "./dist/apps/index.js",
|
|
82
|
+
"default": "./dist/apps/index.js"
|
|
83
|
+
},
|
|
73
84
|
"./e2b": {
|
|
74
85
|
"types": "./dist/e2b/index.d.ts",
|
|
75
86
|
"import": "./dist/e2b/index.js",
|
|
@@ -135,6 +146,11 @@
|
|
|
135
146
|
"import": "./dist/sprites/index.js",
|
|
136
147
|
"default": "./dist/sprites/index.js"
|
|
137
148
|
},
|
|
149
|
+
"./fly": {
|
|
150
|
+
"types": "./dist/fly/index.d.ts",
|
|
151
|
+
"import": "./dist/fly/index.js",
|
|
152
|
+
"default": "./dist/fly/index.js"
|
|
153
|
+
},
|
|
138
154
|
"./freestyle": {
|
|
139
155
|
"types": "./dist/freestyle/index.d.ts",
|
|
140
156
|
"import": "./dist/freestyle/index.js",
|
|
@@ -180,9 +196,9 @@
|
|
|
180
196
|
"node": ">=22.12"
|
|
181
197
|
},
|
|
182
198
|
"scripts": {
|
|
183
|
-
"build": "
|
|
184
|
-
"check-types": "
|
|
185
|
-
"lint": "eslint",
|
|
199
|
+
"build": "node ../typescript-config/tsc5.mjs -p tsconfig.build.json",
|
|
200
|
+
"check-types": "tsgo --noEmit && tsgo -p tests/compat/consumers",
|
|
201
|
+
"lint": "oxlint -c ../eslint-config/oxlint.json --ignore-pattern 'dist/**' --ignore-pattern 'tests/fixtures/modal/**' --ignore-pattern 'tests/compat/consumers/**'",
|
|
186
202
|
"test": "bun test"
|
|
187
203
|
},
|
|
188
204
|
"devDependencies": {
|
|
@@ -202,7 +218,6 @@
|
|
|
202
218
|
"@types/bun": "^1.4.0",
|
|
203
219
|
"@types/node": "^20",
|
|
204
220
|
"ai": "7.0.87",
|
|
205
|
-
"eslint": "^9",
|
|
206
221
|
"groq-sdk": "1.6.0",
|
|
207
222
|
"openai": "7.23.0",
|
|
208
223
|
"together-ai": "0.55.0",
|
|
@@ -227,6 +242,7 @@
|
|
|
227
242
|
"./dist/tar.js": "./dist/browser-stub.js",
|
|
228
243
|
"./dist/image-context.js": "./dist/browser-stub.js",
|
|
229
244
|
"./dist/credentials.js": "./dist/browser-stub.js",
|
|
245
|
+
"./dist/agents-file.js": "./dist/browser-stub.js",
|
|
230
246
|
"undici": false
|
|
231
247
|
},
|
|
232
248
|
"keywords": [
|
|
@@ -242,7 +258,8 @@
|
|
|
242
258
|
"llm"
|
|
243
259
|
],
|
|
244
260
|
"dependencies": {
|
|
245
|
-
"undici": "^7.29.1"
|
|
261
|
+
"undici": "^7.29.1",
|
|
262
|
+
"yaml": "^2.8.1"
|
|
246
263
|
},
|
|
247
264
|
"peerDependencies": {
|
|
248
265
|
"@ai-sdk/harness": "^1.0.0",
|