tensorlake 0.5.135 → 0.5.136
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/dist/applications/index.cjs +12 -12
- package/dist/applications/index.cjs.map +1 -1
- package/dist/applications/index.js +12 -12
- package/dist/applications/index.js.map +1 -1
- package/dist/function-agent/main.cjs +1 -1
- package/dist/function-agent/main.js +1 -1
- package/dist/function-executor/main.cjs +2 -2
- package/dist/function-executor/main.js +2 -2
- package/dist/index.cjs +426 -128
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +259 -9
- package/dist/index.d.ts +259 -9
- package/dist/index.js +420 -128
- package/dist/index.js.map +1 -1
- package/dist/sandbox-image.cjs +12 -12
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.js +12 -12
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +7 -7
- package/runtime/function-executor/manifest.json +5 -5
- package/runtime/function-executor/package/dist/function-executor/main.js +2 -2
- package/runtime/function-executor/package/npm-shrinkwrap.json +2 -2
- package/runtime/function-executor/package/package.json +1 -1
- package/runtime/typescript-function-runner/manifest.json +5 -5
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js +1 -1
- package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +20 -20
- package/runtime/typescript-function-runner/package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -67,6 +67,10 @@ interface NativeSandboxProxyClient {
|
|
|
67
67
|
}
|
|
68
68
|
interface NativeSandboxClient {
|
|
69
69
|
createSandbox(requestJson: string): Promise<TracedJson>;
|
|
70
|
+
/** Wait-free create (`wait: false`, ADR 0086). */
|
|
71
|
+
createSandboxNoWait(requestJson: string): Promise<TracedJson>;
|
|
72
|
+
/** Poll the sandbox until it leaves `pending` or the budget runs out; resolves with the last `SandboxInfo`. */
|
|
73
|
+
waitForSandbox(sandboxId: string, timeoutSec: number, pollIntervalSec?: number | null): Promise<TracedJson>;
|
|
70
74
|
claimSandbox(poolId: string, requestJson?: string): Promise<TracedJson>;
|
|
71
75
|
copySandbox(sandboxId: string, times: number): Promise<TracedJson>;
|
|
72
76
|
getSandbox(sandboxId: string): Promise<TracedJson>;
|
|
@@ -149,6 +153,27 @@ declare enum SandboxStatus {
|
|
|
149
153
|
/** Terminal status used by blocking create/claim responses. */
|
|
150
154
|
FAILED = "failed"
|
|
151
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Why a pending sandbox is waiting (`pendingReason`). The wire value is a
|
|
158
|
+
* snake_case string; unknown future reasons arrive as plain strings.
|
|
159
|
+
*/
|
|
160
|
+
declare enum SandboxPendingReason {
|
|
161
|
+
SCHEDULING = "scheduling",
|
|
162
|
+
WAITING_FOR_CONTAINER = "waiting_for_container",
|
|
163
|
+
NO_EXECUTORS_AVAILABLE = "no_executors_available",
|
|
164
|
+
NO_RESOURCES_AVAILABLE = "no_resources_available",
|
|
165
|
+
POOL_AT_CAPACITY = "pool_at_capacity",
|
|
166
|
+
MAX_CAPACITY_REACHED = "max_capacity_reached",
|
|
167
|
+
NO_EXECUTOR_FOR_SNAPSHOT_LOCATION = "no_executor_for_snapshot_location",
|
|
168
|
+
/** The autoscaler reported that no fleet can ever place this shape. */
|
|
169
|
+
UNPLACEABLE = "unplaceable"
|
|
170
|
+
}
|
|
171
|
+
/** `terminationReason` when a `maxPendingSecs` bound expired, or the shape is unplaceable. */
|
|
172
|
+
declare const TERMINATION_REASON_NO_CAPACITY = "no_capacity";
|
|
173
|
+
/** `terminationReason` when a pending sandbox was deleted before it ran. */
|
|
174
|
+
declare const TERMINATION_REASON_CANCELLED = "cancelled";
|
|
175
|
+
/** Whether a sandbox status is one a readiness wait keeps polling through. */
|
|
176
|
+
declare function isSandboxPending(status: SandboxStatus | string): boolean;
|
|
152
177
|
declare enum SnapshotStatus {
|
|
153
178
|
IN_PROGRESS = "in_progress",
|
|
154
179
|
LOCAL_READY = "local_ready",
|
|
@@ -298,6 +323,22 @@ interface CreateSandboxOptions {
|
|
|
298
323
|
name?: string;
|
|
299
324
|
/** File systems to mount on fresh creation or warm-pool claim, each at its own absolute, unique guest mount path. */
|
|
300
325
|
fileSystems?: FileSystemMount[];
|
|
326
|
+
/**
|
|
327
|
+
* `false` returns a `PendingSandbox` handle as soon as the sandbox is
|
|
328
|
+
* durable, without waiting for it to run: `pending.ready()` waits,
|
|
329
|
+
* `pending.status()` looks, and `Sandbox.connect(pending.sandboxId)`
|
|
330
|
+
* collects it from any other process. `true` / unset waits as before.
|
|
331
|
+
*/
|
|
332
|
+
wait?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Longest the sandbox may wait for capacity before the server fails it with
|
|
335
|
+
* reason `no_capacity`. `0` fails at once when it cannot be placed; unset
|
|
336
|
+
* (the default) waits indefinitely. Applies to capacity waits only, not to
|
|
337
|
+
* image pull or boot. A bound shorter than the fleet's boot time (up to 20
|
|
338
|
+
* minutes on metal hosts) expires the very demand that made the autoscaler
|
|
339
|
+
* launch a host; 30 minutes or more is recommended for capacity waits.
|
|
340
|
+
*/
|
|
341
|
+
maxPendingSecs?: number;
|
|
301
342
|
}
|
|
302
343
|
interface UpdateSandboxOptions {
|
|
303
344
|
/** New name for the sandbox. Naming an ephemeral sandbox enables suspend/resume. */
|
|
@@ -313,6 +354,14 @@ interface UpdateSandboxOptions {
|
|
|
313
354
|
*/
|
|
314
355
|
network?: NetworkConfig | null;
|
|
315
356
|
}
|
|
357
|
+
/**
|
|
358
|
+
* Response from a blocking create or a pool claim.
|
|
359
|
+
*
|
|
360
|
+
* The server waits for readiness for at most the request timeout and can
|
|
361
|
+
* already report `running`; a `pending` answer carries a `pendingReason`.
|
|
362
|
+
* Use `connect(sandboxId)` to wait for a pending sandbox, or
|
|
363
|
+
* `create({ wait: false })` for a `PendingSandbox` handle.
|
|
364
|
+
*/
|
|
316
365
|
interface CreateSandboxResponse {
|
|
317
366
|
sandboxId: string;
|
|
318
367
|
status: SandboxStatus;
|
|
@@ -323,6 +372,38 @@ interface CreateSandboxResponse {
|
|
|
323
372
|
name?: string | null;
|
|
324
373
|
terminationReason?: string;
|
|
325
374
|
errorDetails?: unknown;
|
|
375
|
+
pendingReason?: string;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* The acknowledgement of a `create({ wait: false })`: the wire record of a
|
|
379
|
+
* sandbox that is durable and starts whenever capacity allows. The
|
|
380
|
+
* `PendingSandbox` class in `pending-sandbox.ts` wraps it with `ready()` /
|
|
381
|
+
* `status()`. A server that predates `wait: false` answers the blocking
|
|
382
|
+
* create's shape instead, so `state` may already be `running`.
|
|
383
|
+
*/
|
|
384
|
+
interface PendingSandboxRecord {
|
|
385
|
+
sandboxId: string;
|
|
386
|
+
name?: string;
|
|
387
|
+
state: SandboxStatus;
|
|
388
|
+
pendingReason?: string;
|
|
389
|
+
routingHint?: string;
|
|
390
|
+
ingressEndpoint?: string;
|
|
391
|
+
sandboxUrl?: string;
|
|
392
|
+
reason?: string;
|
|
393
|
+
terminationReason?: string;
|
|
394
|
+
errorDetails?: unknown;
|
|
395
|
+
}
|
|
396
|
+
interface ReadyOptions {
|
|
397
|
+
/** Seconds to wait; defaults to the client requestTimeout. `0` observes the current state once. */
|
|
398
|
+
timeout?: number;
|
|
399
|
+
/** Seconds between `GET /sandboxes/{id}` polls. Default: 2. */
|
|
400
|
+
pollInterval?: number;
|
|
401
|
+
/**
|
|
402
|
+
* Delete the sandbox when `timeout` runs out while it is still pending,
|
|
403
|
+
* then throw `SandboxError` (the pre-ADR-0086 behaviour). Default false:
|
|
404
|
+
* throw `SandboxPending` and leave the sandbox queued.
|
|
405
|
+
*/
|
|
406
|
+
cancelOnTimeout?: boolean;
|
|
326
407
|
}
|
|
327
408
|
interface CopySandboxOptions {
|
|
328
409
|
/** Number of running copies to create. Defaults to 1. */
|
|
@@ -361,6 +442,8 @@ interface SandboxInfo {
|
|
|
361
442
|
outcome?: string;
|
|
362
443
|
terminationReason?: string;
|
|
363
444
|
errorDetails?: unknown;
|
|
445
|
+
/** Why a pending sandbox is waiting, in snake_case. */
|
|
446
|
+
pendingReason?: string;
|
|
364
447
|
createdAt?: Date;
|
|
365
448
|
terminatedAt?: Date;
|
|
366
449
|
name?: string;
|
|
@@ -716,6 +799,14 @@ interface CreateAndConnectOptions extends CreateSandboxOptions {
|
|
|
716
799
|
requestTimeout?: number;
|
|
717
800
|
/** @deprecated Use requestTimeout. */
|
|
718
801
|
startupTimeout?: number;
|
|
802
|
+
/**
|
|
803
|
+
* Delete the sandbox when `requestTimeout` runs out while it is still
|
|
804
|
+
* pending, then throw `SandboxError` (the pre-ADR-0086 behaviour). Default
|
|
805
|
+
* false: throw `SandboxPending` and leave the sandbox queued.
|
|
806
|
+
*/
|
|
807
|
+
cancelOnTimeout?: boolean;
|
|
808
|
+
/** Seconds between readiness polls. Default: 2. */
|
|
809
|
+
pollInterval?: number;
|
|
719
810
|
}
|
|
720
811
|
/**
|
|
721
812
|
* Options for `Sandbox.getOrCreate`: everything `create` accepts (used only
|
|
@@ -929,17 +1020,36 @@ declare class Sandbox {
|
|
|
929
1020
|
_getLifecycleIdentifier(): string;
|
|
930
1021
|
/** @internal Used by SandboxClient.createAndConnect to set ownership. */
|
|
931
1022
|
_setOwner(client: SandboxClient): void;
|
|
1023
|
+
/** @internal Used by PendingSandbox.ready for a non-owning handle. */
|
|
1024
|
+
_setLifecycleClient(client: SandboxClient): void;
|
|
932
1025
|
/**
|
|
933
1026
|
* Create a new sandbox and return a connected, running handle.
|
|
934
1027
|
*
|
|
935
1028
|
* Covers both fresh sandbox creation and restore-from-snapshot (set
|
|
936
|
-
* `snapshotId`).
|
|
1029
|
+
* `snapshotId`). With `wait` unset or `true` it blocks until the sandbox
|
|
1030
|
+
* is `Running`: the create is sent with `wait: false` and the sandbox is
|
|
1031
|
+
* polled every two seconds, with `requestTimeout` as the wait budget.
|
|
1032
|
+
*
|
|
1033
|
+
* With `wait: false` it returns a {@link PendingSandbox} at once:
|
|
1034
|
+
* `pending.ready()` waits for it, `pending.status()` looks at it, and
|
|
1035
|
+
* `Sandbox.connect({ sandboxId: pending.sandboxId })` collects it from any
|
|
1036
|
+
* other process. This is the call for requesting many sandboxes ahead of
|
|
1037
|
+
* capacity. `wait: false` cannot be combined with `poolId`.
|
|
1038
|
+
*
|
|
1039
|
+
* **When the wait runs out the sandbox is not deleted.** A
|
|
1040
|
+
* `SandboxPending` is thrown carrying the sandbox id; the sandbox keeps
|
|
1041
|
+
* its place in the queue and starts whenever capacity arrives. Collect it
|
|
1042
|
+
* later with `Sandbox.connect` or delete it to give up. Pass
|
|
1043
|
+
* `cancelOnTimeout: true` for the previous delete-then-throw behaviour,
|
|
1044
|
+
* or `maxPendingSecs` to let the server fail it after a bound.
|
|
937
1045
|
*
|
|
938
1046
|
* When `name` is already claimed, the server rejects the create with
|
|
939
1047
|
* HTTP 409 (`RemoteAPIError`). To attach to the existing sandbox
|
|
940
1048
|
* instead, use {@link Sandbox.getOrCreate}.
|
|
941
1049
|
*/
|
|
942
|
-
static create
|
|
1050
|
+
static create<O extends CreateAndConnectOptions & Partial<SandboxClientOptions> = CreateAndConnectOptions & Partial<SandboxClientOptions>>(options?: O): Promise<O extends {
|
|
1051
|
+
wait: false;
|
|
1052
|
+
} ? PendingSandbox : Sandbox>;
|
|
943
1053
|
/**
|
|
944
1054
|
* Attach to an existing sandbox and return a connected handle.
|
|
945
1055
|
*
|
|
@@ -1183,6 +1293,60 @@ declare class Sandbox {
|
|
|
1183
1293
|
daemonInfo(): Promise<Traced<DaemonInfo>>;
|
|
1184
1294
|
}
|
|
1185
1295
|
|
|
1296
|
+
/** @internal How a client binds a handle it issued. */
|
|
1297
|
+
interface PendingSandboxBinding {
|
|
1298
|
+
client: SandboxClient;
|
|
1299
|
+
proxyUrl?: string;
|
|
1300
|
+
requestTimeout?: number;
|
|
1301
|
+
requestedName?: string | null;
|
|
1302
|
+
ownsSandbox: boolean;
|
|
1303
|
+
traceId: string;
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* A sandbox requested with `wait: false`: the handle returned by
|
|
1307
|
+
* `Sandbox.create({ wait: false })` / `SandboxClient.create({ wait: false })`.
|
|
1308
|
+
*
|
|
1309
|
+
* The sandbox is durable and starts whenever capacity allows. Collect it
|
|
1310
|
+
* with {@link PendingSandbox.ready}, look at it with
|
|
1311
|
+
* {@link PendingSandbox.status}, or from any other process with
|
|
1312
|
+
* `Sandbox.connect({ sandboxId })` (which waits while it is pending) or
|
|
1313
|
+
* `client.list()`. `pendingReason` is `scheduling` at create time; the
|
|
1314
|
+
* capacity reasons appear after the first scheduler pass.
|
|
1315
|
+
*/
|
|
1316
|
+
declare class PendingSandbox implements PendingSandboxRecord {
|
|
1317
|
+
private readonly binding;
|
|
1318
|
+
readonly sandboxId: string;
|
|
1319
|
+
readonly name?: string;
|
|
1320
|
+
readonly state: SandboxStatus;
|
|
1321
|
+
readonly pendingReason?: string;
|
|
1322
|
+
readonly routingHint?: string;
|
|
1323
|
+
readonly ingressEndpoint?: string;
|
|
1324
|
+
readonly sandboxUrl?: string;
|
|
1325
|
+
readonly reason?: string;
|
|
1326
|
+
readonly terminationReason?: string;
|
|
1327
|
+
readonly errorDetails?: unknown;
|
|
1328
|
+
/** W3C trace id of the create request. */
|
|
1329
|
+
readonly traceId: string;
|
|
1330
|
+
/** @internal */
|
|
1331
|
+
constructor(record: PendingSandboxRecord, binding: PendingSandboxBinding);
|
|
1332
|
+
/** Fetch the sandbox's current state with one `GET`. */
|
|
1333
|
+
status(): Promise<Traced<SandboxInfo>>;
|
|
1334
|
+
/**
|
|
1335
|
+
* Wait for the sandbox to be running and return a connected `Sandbox`.
|
|
1336
|
+
*
|
|
1337
|
+
* Polls `GET /sandboxes/{id}` every `pollInterval` seconds (default 2).
|
|
1338
|
+
* Call it again after a `SandboxPending` to keep waiting.
|
|
1339
|
+
*
|
|
1340
|
+
* @throws {SandboxPending} `timeout` elapsed while the sandbox was still
|
|
1341
|
+
* pending. It keeps its place in the queue; the error carries
|
|
1342
|
+
* `sandboxId` and `pendingReason`.
|
|
1343
|
+
* @throws {SandboxError} The sandbox settled somewhere else: `terminated`
|
|
1344
|
+
* or `failed` (`reason` is the server's, such as `no_capacity` or
|
|
1345
|
+
* `cancelled`), or `suspended`.
|
|
1346
|
+
*/
|
|
1347
|
+
ready(options?: ReadyOptions): Promise<Sandbox>;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1186
1350
|
/**
|
|
1187
1351
|
* Client for managing TensorLake sandboxes, pools, and snapshots.
|
|
1188
1352
|
*
|
|
@@ -1226,8 +1390,50 @@ declare class SandboxClient {
|
|
|
1226
1390
|
private tracedJson;
|
|
1227
1391
|
/** Run a native JSON call and reshape it into a plain `T` (no trace id). */
|
|
1228
1392
|
private plainJson;
|
|
1229
|
-
/**
|
|
1230
|
-
|
|
1393
|
+
/**
|
|
1394
|
+
* Create a new sandbox.
|
|
1395
|
+
*
|
|
1396
|
+
* With `wait` unset or `true` the server waits for readiness for at most
|
|
1397
|
+
* the request timeout and answers the blocking create's record (`status`
|
|
1398
|
+
* may already be `running`); this is the wire behaviour unchanged. With
|
|
1399
|
+
* `wait: false` the server answers as soon as the sandbox is durable and
|
|
1400
|
+
* this returns a {@link PendingSandbox} at once: `pending.ready()` waits
|
|
1401
|
+
* for it, `pending.status()` looks at it, and `connect(sandboxId)`
|
|
1402
|
+
* collects it from any other process. Give the sandbox a `name` when a
|
|
1403
|
+
* retry of this call must not create a second one: a repeated name is an
|
|
1404
|
+
* HTTP 409, and `Sandbox.getOrCreate` resolves it. Use
|
|
1405
|
+
* `createAndConnect()` for a blocking, ready-to-use handle.
|
|
1406
|
+
*/
|
|
1407
|
+
create<O extends CreateSandboxOptions = CreateSandboxOptions>(options?: O): Promise<O extends {
|
|
1408
|
+
wait: false;
|
|
1409
|
+
} ? PendingSandbox : Traced<CreateSandboxResponse>>;
|
|
1410
|
+
/**
|
|
1411
|
+
* @internal Send the create with `wait: false` and return the pending
|
|
1412
|
+
* handle, bound to this client so `ready()` / `status()` work.
|
|
1413
|
+
*/
|
|
1414
|
+
requestPending(options: CreateSandboxOptions | undefined, binding: {
|
|
1415
|
+
proxyUrl?: string;
|
|
1416
|
+
requestTimeout?: number;
|
|
1417
|
+
ownsSandbox: boolean;
|
|
1418
|
+
}): Promise<PendingSandbox>;
|
|
1419
|
+
/** @internal Implementation of `PendingSandbox.ready`. */
|
|
1420
|
+
_ready(sandboxId: string, binding: PendingSandboxBinding, options?: ReadyOptions): Promise<Sandbox>;
|
|
1421
|
+
/**
|
|
1422
|
+
* Poll `get` every `pollInterval` seconds until the sandbox leaves
|
|
1423
|
+
* `pending` or `timeout` elapses, resolving with the last observation.
|
|
1424
|
+
* Never rejects for a timeout and never deletes.
|
|
1425
|
+
*/
|
|
1426
|
+
private waitForSandbox;
|
|
1427
|
+
/** Turn the last observed sandbox state into a handle or an error. */
|
|
1428
|
+
private settleWait;
|
|
1429
|
+
/**
|
|
1430
|
+
* Routing for a lazy `connect` handle. A sandbox that is still pending is
|
|
1431
|
+
* waited on here rather than failing: readiness is a property of the
|
|
1432
|
+
* sandbox, not of the create call that requested it.
|
|
1433
|
+
*/
|
|
1434
|
+
private resolveRoutingInfo;
|
|
1435
|
+
/** @internal Build the create wire body; shared by `create` and `createAndConnect`. */
|
|
1436
|
+
static buildCreateRequestBody(options?: CreateSandboxOptions): Record<string, unknown>;
|
|
1231
1437
|
/** Get current state and metadata for a sandbox by ID. */
|
|
1232
1438
|
get(sandboxId: string): Promise<Traced<SandboxInfo>>;
|
|
1233
1439
|
/** List all sandboxes in the namespace. */
|
|
@@ -1352,8 +1558,19 @@ declare class SandboxClient {
|
|
|
1352
1558
|
/**
|
|
1353
1559
|
* Create a sandbox, wait for it to reach `Running`, and return a connected handle.
|
|
1354
1560
|
*
|
|
1355
|
-
*
|
|
1356
|
-
* `
|
|
1561
|
+
* This is `create({ wait: false })` followed by `PendingSandbox.ready()`
|
|
1562
|
+
* polling every `pollInterval` seconds, with `requestTimeout` as the wait
|
|
1563
|
+
* budget, in one call. The returned `Sandbox` auto-terminates when
|
|
1564
|
+
* `terminate()` is called.
|
|
1565
|
+
*
|
|
1566
|
+
* **When the wait runs out the sandbox is not deleted.** A `SandboxPending`
|
|
1567
|
+
* is thrown with the sandbox id, and the sandbox keeps its place in the
|
|
1568
|
+
* queue and starts whenever capacity arrives; `connect` with that id to
|
|
1569
|
+
* collect it, or `delete` it to give up. Pass
|
|
1570
|
+
* `cancelOnTimeout: true` for the previous behaviour (delete, then throw
|
|
1571
|
+
* `SandboxError`), or set `maxPendingSecs` to let the server fail it after
|
|
1572
|
+
* a bound. A pool claim (`poolId`) answers from the server-side wait; a
|
|
1573
|
+
* claim that is still starting is then waited on the same way.
|
|
1357
1574
|
*/
|
|
1358
1575
|
createAndConnect(options?: CreateAndConnectOptions): Promise<Sandbox>;
|
|
1359
1576
|
}
|
|
@@ -2040,9 +2257,42 @@ declare function sandboxUrlFromIngressEndpoint(ingressEndpoint: string, sandboxI
|
|
|
2040
2257
|
declare class SandboxException extends Error {
|
|
2041
2258
|
constructor(message: string);
|
|
2042
2259
|
}
|
|
2043
|
-
/**
|
|
2260
|
+
/**
|
|
2261
|
+
* General sandbox operation error.
|
|
2262
|
+
*
|
|
2263
|
+
* `reason` carries the server's reason when the error describes a sandbox
|
|
2264
|
+
* that failed or terminated: `no_capacity` when a `maxPendingSecs` bound
|
|
2265
|
+
* expired, `cancelled` when a pending sandbox was deleted, or a startup
|
|
2266
|
+
* reason such as `ConfigurationError`. It is undefined for errors that are
|
|
2267
|
+
* not about a sandbox's fate.
|
|
2268
|
+
*/
|
|
2044
2269
|
declare class SandboxError extends SandboxException {
|
|
2045
|
-
|
|
2270
|
+
readonly reason?: string;
|
|
2271
|
+
readonly sandboxId?: string;
|
|
2272
|
+
constructor(message: string, options?: {
|
|
2273
|
+
reason?: string;
|
|
2274
|
+
sandboxId?: string;
|
|
2275
|
+
});
|
|
2276
|
+
}
|
|
2277
|
+
/**
|
|
2278
|
+
* The wait budget ran out while the sandbox was still queued.
|
|
2279
|
+
*
|
|
2280
|
+
* Thrown by `Sandbox.create`, `createAndConnect`, `PendingSandbox.ready` and
|
|
2281
|
+
* a lazy `connect` when their timeout elapses before the sandbox is running.
|
|
2282
|
+
* **The sandbox is not deleted**: it keeps its place in the queue and starts
|
|
2283
|
+
* whenever capacity arrives. Call `ready()` again to keep waiting,
|
|
2284
|
+
* `Sandbox.connect` from any other process, or `delete` it to give up.
|
|
2285
|
+
* `pendingReason` is the last reason the scheduler recorded (`scheduling`,
|
|
2286
|
+
* `no_resources_available`, `pool_at_capacity`, ...).
|
|
2287
|
+
*/
|
|
2288
|
+
declare class SandboxPending extends SandboxError {
|
|
2289
|
+
readonly sandboxId: string;
|
|
2290
|
+
readonly pendingReason?: string;
|
|
2291
|
+
readonly timeout?: number;
|
|
2292
|
+
constructor(sandboxId: string, options?: {
|
|
2293
|
+
pendingReason?: string;
|
|
2294
|
+
timeout?: number;
|
|
2295
|
+
});
|
|
2046
2296
|
}
|
|
2047
2297
|
/**
|
|
2048
2298
|
* Raised when the client cannot complete a request against the API server.
|
|
@@ -2099,4 +2349,4 @@ declare class RequestExecutionError extends Error {
|
|
|
2099
2349
|
constructor(message: string, functionName?: string);
|
|
2100
2350
|
}
|
|
2101
2351
|
|
|
2102
|
-
export { ApplicationBuildContext, ApplicationBuildResponse, ApplicationManifest, ApplicationSummary, type ArchivedSandboxInfo, type AttachFileSystemOptions, BinaryPayload, type Branch, BuildInfo, BuildLogEntry, type CheckpointOptions, type CheckpointType, type ClaimSandboxOptions, CliNotFoundError, CloudClient, CloudClientOptions, type CommandResult, type CommitJobError, type CommitJobReadBack, type CommitJobStatus, type ConflictPath, type ConflictTerm, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CopiedSandboxResponse, type CopySandboxOptions, type CopySandboxResponse, type CreateAndConnectOptions, CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type FileEntry, FileNotFoundInFilesystemError, FileSystem, type FileSystemMount, Filesystem, FilesystemAPIError, FilesystemClient, type FilesystemClientOptions, FilesystemError, type FilesystemFileRead, type FilesystemInfo, FilesystemMount, FilesystemNotFoundError, type FilesystemReadOptions, type FilesystemSnapshot, type FilesystemSnapshotInfo, type FilesystemStatus, type FilesystemVersion, type GPUResources, type GetOrCreateOptions, type GetOrCreateOutcome, type GetSandboxLogsOptions, type GitCredential, type GitRef, type GitRepository, type GpuModel, type GpuRequest, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type ManagedProcessExit, type ManagedProcessHealthStatus, type ManagedProcessInfo, type ManagedProcessStatus, type MergeConflict, type MergeConflictRecord, type MergeEntry, type MergeOptions, type MergeReport, type MergeStats, MountError, type MountStatus, type MouseButton, type NetworkConfig, NewSecret, type Operation, type OperationRef, type OutputEvent, OutputMode, type OutputResponse, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessHealthCheck, type ProcessHealthCheckType, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, type PushReport, type PushWorktreeOptions, ReadOnlyMountNotSupportedError, RemoteAPIError, RepositoryClient, type RepositoryClientOptions, type RepositoryHandle, type RepositoryInfo, RepositoryMount, type RepositoryMountOptions, type RepositoryMountStatus, type RepositoryUnmountOptions, RequestExecutionError, RequestFailedError, RequestInput, RequestMetadata, RequestNotFinishedError, RequestOutput, type RestartPolicy, type RestartPolicyConfig, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, type SandboxLogLevel, type SandboxLogSignal, type SandboxLogsResponse, SandboxNotFoundError, type SandboxOptions, type SandboxPoolInfo, type SandboxPortAccess, type SandboxProcessLogFilter, type SandboxProcessLogFiltersResponse, SandboxStatus, SandboxTemplate, Secret, SecretsList, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, UpsertSecretResponse, createFileSystem, deleteFileSystem, listFileSystems, sandboxUrlFromIngressEndpoint };
|
|
2352
|
+
export { ApplicationBuildContext, ApplicationBuildResponse, ApplicationManifest, ApplicationSummary, type ArchivedSandboxInfo, type AttachFileSystemOptions, BinaryPayload, type Branch, BuildInfo, BuildLogEntry, type CheckpointOptions, type CheckpointType, type ClaimSandboxOptions, CliNotFoundError, CloudClient, CloudClientOptions, type CommandResult, type CommitJobError, type CommitJobReadBack, type CommitJobStatus, type ConflictPath, type ConflictTerm, type ConnectDesktopOptions, type ConnectOptions, type ContainerResourcesInfo, ContainerState, type CopiedSandboxResponse, type CopySandboxOptions, type CopySandboxResponse, type CreateAndConnectOptions, CreateApplicationBuildRequest, type CreatePoolOptions, type CreatePtyOptions, type CreatePtySessionOptions, type CreateSandboxOptions, type CreateSandboxPoolResponse, type CreateSandboxResponse, type CreateSnapshotResponse, type CreateTunnelOptions, type DaemonInfo, Desktop, type DesktopDoubleClickOptions, type DesktopPointerOptions, type DirectoryEntry, type FileEntry, FileNotFoundInFilesystemError, FileSystem, type FileSystemMount, Filesystem, FilesystemAPIError, FilesystemClient, type FilesystemClientOptions, FilesystemError, type FilesystemFileRead, type FilesystemInfo, FilesystemMount, FilesystemNotFoundError, type FilesystemReadOptions, type FilesystemSnapshot, type FilesystemSnapshotInfo, type FilesystemStatus, type FilesystemVersion, type GPUResources, type GetOrCreateOptions, type GetOrCreateOutcome, type GetSandboxLogsOptions, type GitCredential, type GitRef, type GitRepository, type GpuModel, type GpuRequest, type HealthResponse, type ListArchivedSandboxesOptions, type ListArchivedSandboxesResponse, type ListDirectoryResponse, type ManagedProcessExit, type ManagedProcessHealthStatus, type ManagedProcessInfo, type ManagedProcessStatus, type MergeConflict, type MergeConflictRecord, type MergeEntry, type MergeOptions, type MergeReport, type MergeStats, MountError, type MountStatus, type MouseButton, type NetworkConfig, NewSecret, type Operation, type OperationRef, type OutputEvent, OutputMode, type OutputResponse, PendingSandbox, type PendingSandboxRecord, type PoolContainerInfo, PoolInUseError, PoolNotFoundError, type ProcessHealthCheck, type ProcessHealthCheckType, type ProcessInfo, ProcessStatus, type ProcessUser, type ProcessUserSpec, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, type PtySessionInfo, type PushReport, type PushWorktreeOptions, ReadOnlyMountNotSupportedError, type ReadyOptions, RemoteAPIError, RepositoryClient, type RepositoryClientOptions, type RepositoryHandle, type RepositoryInfo, RepositoryMount, type RepositoryMountOptions, type RepositoryMountStatus, type RepositoryUnmountOptions, RequestExecutionError, RequestFailedError, RequestInput, RequestMetadata, RequestNotFinishedError, RequestOutput, type RestartPolicy, type RestartPolicyConfig, type RunOptions, Sandbox, SandboxClient, type SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, type SandboxInfo, type SandboxLogLevel, type SandboxLogSignal, type SandboxLogsResponse, SandboxNotFoundError, type SandboxOptions, SandboxPending, SandboxPendingReason, type SandboxPoolInfo, type SandboxPortAccess, type SandboxProcessLogFilter, type SandboxProcessLogFiltersResponse, SandboxStatus, SandboxTemplate, Secret, SecretsList, type SendSignalResponse, type SnapshotAndWaitOptions, type SnapshotInfo, type SnapshotOptions, SnapshotStatus, type SnapshotType, type SnapshotWaitCondition, StartImageBuildRequest, type StartProcessOptions, StdinMode, type SuspendResumeOptions, TERMINATION_REASON_CANCELLED, TERMINATION_REASON_NO_CAPACITY, TcpTunnel, type TunnelAddress, type UpdatePoolOptions, UpsertSecretResponse, createFileSystem, deleteFileSystem, isSandboxPending, listFileSystems, sandboxUrlFromIngressEndpoint };
|