withruntime 0.11.1 → 0.12.0
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/BLAXEL.md +3 -3
- package/COMPATIBILITY.md +74 -9
- package/DAYTONA.md +33 -5
- package/E2B.md +137 -48
- package/README.md +11 -9
- package/README.src.md +11 -9
- package/VERCEL.md +43 -5
- package/compatibility-lock.json +58 -49
- package/dist/billing-cli.d.ts +1 -1
- package/dist/billing-cli.js +77 -1
- package/dist/blaxel/errors.d.ts +14 -0
- package/dist/blaxel/errors.js +33 -4
- package/dist/blaxel/index.d.ts +2 -2
- package/dist/blaxel/index.js +4 -4
- package/dist/blaxel/interpreter.d.ts +2 -5
- package/dist/blaxel/sandbox.d.ts +15 -7
- package/dist/blaxel/sandbox.js +64 -9
- package/dist/blaxel/snapshot.d.ts +4 -0
- package/dist/blaxel/snapshot.js +4 -0
- package/dist/cli/logs.d.ts +21 -0
- package/dist/cli/logs.js +188 -0
- package/dist/cli/logs.test.d.ts +1 -0
- package/dist/cli/logs.test.js +272 -0
- package/dist/cli-extras.d.ts +3 -3
- package/dist/cli-extras.js +17 -12
- package/dist/cli-words.d.ts +10 -1
- package/dist/cli-words.js +18 -0
- package/dist/cli.d.ts +6 -2
- package/dist/cli.js +468 -219
- package/dist/client.d.ts +13 -63
- package/dist/client.js +35 -124
- package/dist/cloudflare/errors.d.ts +143 -0
- package/dist/cloudflare/errors.js +167 -0
- package/dist/cloudflare/index.d.ts +175 -6
- package/dist/cloudflare/index.js +416 -26
- package/dist/cloudflare/interpreter.d.ts +119 -0
- package/dist/cloudflare/interpreter.js +223 -0
- package/dist/cloudflare/streams.d.ts +38 -0
- package/dist/cloudflare/streams.js +145 -0
- package/dist/cloudflare/watch.d.ts +9 -0
- package/dist/cloudflare/watch.js +24 -0
- package/dist/codesandbox/index.d.ts +216 -28
- package/dist/codesandbox/index.js +478 -78
- package/dist/compat/core.d.ts +18 -0
- package/dist/compat/core.js +29 -0
- package/dist/compat/files.d.ts +1 -0
- package/dist/compat/files.js +25 -5
- package/dist/daytona/computer-use.d.ts +13 -4
- package/dist/daytona/computer-use.js +66 -8
- package/dist/daytona/daytona.d.ts +7 -2
- package/dist/daytona/daytona.js +31 -5
- package/dist/daytona/errors.d.ts +11 -0
- package/dist/daytona/errors.js +18 -0
- package/dist/daytona/filesystem.js +2 -1
- package/dist/daytona/image.d.ts +13 -9
- package/dist/daytona/image.js +18 -12
- package/dist/daytona/index.d.ts +1 -1
- package/dist/daytona/sandbox.d.ts +9 -3
- package/dist/daytona/sandbox.js +17 -3
- package/dist/domains/index.d.ts +9 -0
- package/dist/domains/index.js +10 -0
- package/dist/e2b/client.d.ts +15 -2
- package/dist/e2b/client.js +61 -7
- package/dist/e2b/commands.d.ts +4 -1
- package/dist/e2b/commands.js +17 -7
- package/dist/e2b/errors.d.ts +43 -2
- package/dist/e2b/errors.js +78 -6
- package/dist/e2b/filesystem.d.ts +1 -1
- package/dist/e2b/filesystem.js +82 -16
- package/dist/e2b/index.d.ts +3 -3
- package/dist/e2b/index.js +2 -2
- package/dist/e2b/sandbox.d.ts +50 -35
- package/dist/e2b/sandbox.js +228 -185
- package/dist/e2b/unsupported.d.ts +19 -0
- package/dist/e2b/unsupported.js +22 -1
- package/dist/e2b/users.d.ts +9 -0
- package/dist/e2b/users.js +22 -0
- package/dist/errors.d.ts +14 -5
- package/dist/errors.js +28 -14
- package/dist/freestyle/index.d.ts +285 -37
- package/dist/freestyle/index.js +656 -144
- package/dist/identity.d.ts +3 -0
- package/dist/identity.js +27 -0
- package/dist/images/index.d.ts +9 -0
- package/dist/images/index.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/ips/index.d.ts +9 -0
- package/dist/ips/index.js +10 -0
- package/dist/jobs/index.d.ts +9 -0
- package/dist/jobs/index.js +10 -0
- package/dist/keys.js +2 -0
- package/dist/login.js +2 -0
- package/dist/machine.d.ts +189 -0
- package/dist/machine.js +521 -0
- package/dist/mcp.js +1 -1
- package/dist/modal/index.d.ts +339 -61
- package/dist/modal/index.js +781 -121
- package/dist/network-cli.d.ts +3 -1
- package/dist/network-cli.js +78 -36
- package/dist/networks/index.d.ts +11 -0
- package/dist/networks/index.js +10 -0
- package/dist/openai-agents/index.d.ts +1 -1
- package/dist/openai-agents/index.js +1 -1
- package/dist/ports/index.d.ts +9 -0
- package/dist/ports/index.js +10 -0
- package/dist/product-names.d.ts +52 -0
- package/dist/product-names.js +164 -0
- package/dist/product-renames.d.ts +103 -0
- package/dist/product-renames.js +189 -0
- package/dist/products/apps.d.ts +176 -0
- package/dist/products/apps.js +165 -0
- package/dist/products/billing.d.ts +41 -0
- package/dist/products/billing.js +13 -0
- package/dist/products/browser.d.ts +10 -0
- package/dist/products/browsers.d.ts +71 -0
- package/dist/products/browsers.js +102 -0
- package/dist/products/builds.d.ts +126 -0
- package/dist/products/builds.js +221 -0
- package/dist/products/index.d.ts +3 -16
- package/dist/products/index.js +3 -14
- package/dist/products/jobs.d.ts +19 -3
- package/dist/products/jobs.js +28 -12
- package/dist/products/limits.d.ts +4 -10
- package/dist/products/logs.d.ts +245 -0
- package/dist/products/logs.js +274 -0
- package/dist/products/logs.test.d.ts +1 -0
- package/dist/products/logs.test.js +343 -0
- package/dist/products/network-products.d.ts +38 -7
- package/dist/products/network-products.js +31 -18
- package/dist/products/network.d.ts +1 -1
- package/dist/products/observability.d.ts +3 -2
- package/dist/products/private-network.js +1 -1
- package/dist/products/queues.d.ts +149 -0
- package/dist/products/queues.js +213 -0
- package/dist/products/referrals.d.ts +21 -7
- package/dist/products/referrals.js +3 -3
- package/dist/products/secrets.d.ts +8 -4
- package/dist/products/secrets.js +39 -18
- package/dist/products/signed-requests.d.ts +21 -0
- package/dist/products/signed-requests.js +11 -0
- package/dist/products/streams.d.ts +73 -0
- package/dist/products/streams.js +17 -0
- package/dist/products/switching.d.ts +37 -10
- package/dist/products/switching.js +4 -3
- package/dist/products/volumes.d.ts +3 -0
- package/dist/record-cli.d.ts +23 -0
- package/dist/record-cli.js +308 -0
- package/dist/renamed-products.d.ts +38 -0
- package/dist/renamed-products.js +34 -0
- package/dist/runloop/index.d.ts +9 -2
- package/dist/runloop/index.js +29 -8
- package/dist/runloop/sdk.d.ts +131 -0
- package/dist/runloop/sdk.js +167 -0
- package/dist/sandbox.d.ts +10 -94
- package/dist/sandbox.js +22 -371
- package/dist/sandboxes/index.d.ts +11 -0
- package/dist/sandboxes/index.js +12 -0
- package/dist/snapshots/index.d.ts +9 -0
- package/dist/snapshots/index.js +11 -0
- package/dist/snapshots.d.ts +7 -4
- package/dist/sprites/index.d.ts +343 -31
- package/dist/sprites/index.js +866 -84
- package/dist/ssh.d.ts +1 -1
- package/dist/ssh.js +11 -11
- package/dist/terminal.d.ts +24 -0
- package/dist/terminal.js +32 -0
- package/dist/transport.d.ts +18 -2
- package/dist/transport.js +61 -6
- package/dist/tunnel.js +1 -1
- package/dist/types.d.ts +116 -8
- package/dist/vercel/sandbox.d.ts +1 -2
- package/dist/vercel/sandbox.js +6 -5
- package/dist/vercel/snapshot.js +10 -2
- package/dist/volumes/index.d.ts +9 -0
- package/dist/volumes/index.js +10 -0
- package/package.json +48 -2
package/dist/e2b/sandbox.d.ts
CHANGED
|
@@ -9,14 +9,35 @@ export declare const DEFAULT_SHAPE: {
|
|
|
9
9
|
readonly vcpu: 2;
|
|
10
10
|
readonly memoryMiB: 512;
|
|
11
11
|
};
|
|
12
|
-
/** E2B's default sandbox timeout, 300 s.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
/** E2B's default sandbox timeout, 300 s. A sandbox created without timeoutMs
|
|
13
|
+
* gets it, and is paused when it runs out rather than killed, since nobody
|
|
14
|
+
* asked for it to end: nothing in it is lost, and the next call wakes it. On
|
|
15
|
+
* a pilot account the server keeps every sandbox running instead (0254). */
|
|
15
16
|
export declare const DEFAULT_TIMEOUT_MS = 300000;
|
|
17
|
+
/** The label that keeps the template a sandbox was made from, so getInfo
|
|
18
|
+
* and list name it whichever client asks; it is not shown in `metadata`. */
|
|
19
|
+
export declare const TEMPLATE_LABEL = "e2b-template";
|
|
16
20
|
export type SandboxState = "running" | "paused";
|
|
21
|
+
/** What a pause or snapshot keeps (E2B 2.55): `"full"` keeps memory and
|
|
22
|
+
* files, `"filesystem"` only files, so what starts from it boots afresh. */
|
|
23
|
+
export type SnapshotMode = "full" | "filesystem";
|
|
17
24
|
export type SandboxOnTimeout = "pause" | "kill" | {
|
|
18
|
-
action: "pause"
|
|
25
|
+
action: "pause";
|
|
26
|
+
mode?: SnapshotMode;
|
|
27
|
+
/** @deprecated E2B 2.55: use `mode`. */
|
|
19
28
|
keepMemory?: boolean;
|
|
29
|
+
} | {
|
|
30
|
+
action: "kill";
|
|
31
|
+
};
|
|
32
|
+
/** E2B's pause options: `mode`, or the deprecated `keepMemory`. */
|
|
33
|
+
export type SandboxPauseOpts = SandboxApiOpts & {
|
|
34
|
+
mode?: SnapshotMode;
|
|
35
|
+
/** @deprecated E2B 2.55: use `mode`. */
|
|
36
|
+
keepMemory?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type CreateSnapshotOpts = SandboxApiOpts & {
|
|
39
|
+
name?: string;
|
|
40
|
+
mode?: SnapshotMode;
|
|
20
41
|
};
|
|
21
42
|
export type SandboxLifecycle = {
|
|
22
43
|
onTimeout: SandboxOnTimeout;
|
|
@@ -92,10 +113,10 @@ export type SandboxListOpts = SandboxApiOpts & {
|
|
|
92
113
|
limit?: number;
|
|
93
114
|
nextToken?: string;
|
|
94
115
|
};
|
|
95
|
-
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export declare function
|
|
116
|
+
/** The Runtime image name an E2B template name stands for: E2B's
|
|
117
|
+
* `team/name:tag` without the team, since a Runtime account's images are its
|
|
118
|
+
* own. `name`, `name:tag` and `name@version` are Runtime image names too. */
|
|
119
|
+
export declare function imageNameFor(template: string): string;
|
|
99
120
|
export declare class Sandbox {
|
|
100
121
|
#private;
|
|
101
122
|
protected readonly requestTimeoutMs: number;
|
|
@@ -112,8 +133,7 @@ export declare class Sandbox {
|
|
|
112
133
|
protected get client(): Runtime;
|
|
113
134
|
/** Creates a sandbox from `template` (default "base", Runtime's stock image)
|
|
114
135
|
* with E2B's default machine, 2 vCPU and 512 MiB, and waits until it runs.
|
|
115
|
-
* Funding is left to Runtime: the
|
|
116
|
-
* time, then prepaid credit, exactly as withruntime's own create. */
|
|
136
|
+
* Funding is left to Runtime: the included usage first, then prepaid credit, exactly as withruntime's own create. */
|
|
117
137
|
static create<S extends typeof Sandbox>(this: S, opts?: SandboxOpts): Promise<InstanceType<S>>;
|
|
118
138
|
static create<S extends typeof Sandbox>(this: S, template: string, opts?: SandboxOpts): Promise<InstanceType<S>>;
|
|
119
139
|
/** Connects to a sandbox by id, waking it if it is paused, as E2B does. A
|
|
@@ -123,31 +143,29 @@ export declare class Sandbox {
|
|
|
123
143
|
connect(opts?: SandboxConnectOpts): Promise<this>;
|
|
124
144
|
/** Running and paused sandboxes, a page at a time, as E2B's paginator. */
|
|
125
145
|
static list(opts?: SandboxListOpts): SandboxPaginator;
|
|
126
|
-
/**
|
|
146
|
+
/** Deletes the sandbox for good, as E2B's kill destroys it: its disk,
|
|
147
|
+
* memory and shared ports go. False when it was not found or was already
|
|
148
|
+
* deleted. */
|
|
127
149
|
static kill(sandboxId: string, opts?: SandboxApiOpts): Promise<boolean>;
|
|
128
150
|
kill(opts?: Pick<ConnectionOpts, "requestTimeoutMs" | "signal">): Promise<boolean>;
|
|
129
|
-
/** Sets the sandbox to end `timeoutMs` from now, up to 24 hours
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
151
|
+
/** Sets the sandbox to end `timeoutMs` from now, up to 24 hours, as E2B
|
|
152
|
+
* does; the server keeps the deadline. Runtime cannot bring an end
|
|
153
|
+
* sooner, so that is refused. A sandbox with no time limit (one on a pilot
|
|
154
|
+
* account, kept running by the server) has no end to move, and nothing
|
|
155
|
+
* changes. */
|
|
133
156
|
static setTimeout(sandboxId: string, timeoutMs: number, opts?: SandboxApiOpts): Promise<void>;
|
|
134
157
|
setTimeout(timeoutMs: number, opts?: Pick<ConnectionOpts, "requestTimeoutMs" | "signal">): Promise<void>;
|
|
135
158
|
static getInfo(sandboxId: string, opts?: SandboxApiOpts): Promise<SandboxInfo>;
|
|
136
159
|
getInfo(opts?: Pick<ConnectionOpts, "requestTimeoutMs" | "signal">): Promise<SandboxInfo>;
|
|
160
|
+
/** Whether the sandbox answers calls, as E2B's health check says: true
|
|
161
|
+
* while it runs, and while Runtime has paused it for being idle, since the
|
|
162
|
+
* next call wakes it. False once paused on request, ended or deleted. */
|
|
137
163
|
isRunning(opts?: Pick<ConnectionOpts, "requestTimeoutMs" | "signal">): Promise<boolean>;
|
|
138
164
|
/** Pauses the sandbox, keeping memory and files. False when it was paused. */
|
|
139
|
-
static pause(sandboxId: string, opts?:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
keepMemory?: boolean;
|
|
144
|
-
}): Promise<boolean>;
|
|
145
|
-
pause(opts?: SandboxApiOpts & {
|
|
146
|
-
keepMemory?: boolean;
|
|
147
|
-
}): Promise<boolean>;
|
|
148
|
-
betaPause(opts?: SandboxApiOpts & {
|
|
149
|
-
keepMemory?: boolean;
|
|
150
|
-
}): Promise<boolean>;
|
|
165
|
+
static pause(sandboxId: string, opts?: SandboxPauseOpts): Promise<boolean>;
|
|
166
|
+
static betaPause(sandboxId: string, opts?: SandboxPauseOpts): Promise<boolean>;
|
|
167
|
+
pause(opts?: SandboxPauseOpts): Promise<boolean>;
|
|
168
|
+
betaPause(opts?: SandboxPauseOpts): Promise<boolean>;
|
|
151
169
|
/** Copies of this sandbox, memory and all. While Runtime's forks are
|
|
152
170
|
* switched off this throws NotSupportedError with Runtime's own words. */
|
|
153
171
|
static fork<S extends typeof Sandbox>(this: S, sandboxId: string, opts?: SandboxApiOpts & {
|
|
@@ -158,14 +176,11 @@ export declare class Sandbox {
|
|
|
158
176
|
count?: number;
|
|
159
177
|
timeoutMs?: number;
|
|
160
178
|
}): Promise<Array<this | Error>>;
|
|
161
|
-
/** Keeps the sandbox's whole machine as a Runtime snapshot
|
|
162
|
-
*
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
static createSnapshot(sandboxId: string, opts?: SandboxApiOpts & {
|
|
167
|
-
name?: string;
|
|
168
|
-
}): Promise<SnapshotInfo>;
|
|
179
|
+
/** Keeps the sandbox's whole machine as a Runtime snapshot, or with
|
|
180
|
+
* `mode: "filesystem"` its disk alone, from which a sandbox boots afresh;
|
|
181
|
+
* start from it with Sandbox.create(snapshotId). */
|
|
182
|
+
createSnapshot(opts?: CreateSnapshotOpts): Promise<SnapshotInfo>;
|
|
183
|
+
static createSnapshot(sandboxId: string, opts?: CreateSnapshotOpts): Promise<SnapshotInfo>;
|
|
169
184
|
static deleteSnapshot(snapshotId: string, opts?: SandboxApiOpts): Promise<boolean>;
|
|
170
185
|
/** E2B's getHost, answered at once as E2B answers it:
|
|
171
186
|
* `<port>-<id>.runtimehost.com`. A Runtime preview's address is made from
|