tensorlake 0.5.140 → 0.5.142
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 +80 -55
- package/dist/applications/index.cjs.map +1 -1
- package/dist/applications/index.js +80 -55
- 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 +251 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -14
- package/dist/index.d.ts +89 -14
- package/dist/index.js +248 -131
- package/dist/index.js.map +1 -1
- package/dist/sandbox-image.cjs +80 -55
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.js +80 -55
- 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
|
@@ -79,7 +79,8 @@ interface NativeSandboxClient {
|
|
|
79
79
|
getArchivedSandbox(sandboxId: string): Promise<TracedJson>;
|
|
80
80
|
getSandboxLogs(requestJson: string): Promise<TracedJson>;
|
|
81
81
|
listSandboxLogProcesses(sandboxId: string): Promise<TracedJson>;
|
|
82
|
-
updateSandbox(sandboxId: string, requestJson: string): Promise<TracedJson>;
|
|
82
|
+
updateSandbox(sandboxId: string, requestJson: string, wait?: boolean, timeoutSec?: number, pollIntervalSec?: number): Promise<TracedJson>;
|
|
83
|
+
waitForResourceResize(sandboxId: string, generation: number, timeoutSec?: number, pollIntervalSec?: number): Promise<TracedJson>;
|
|
83
84
|
deleteSandbox(sandboxId: string): Promise<string>;
|
|
84
85
|
suspendSandbox(sandboxId: string): Promise<string>;
|
|
85
86
|
resumeSandbox(sandboxId: string): Promise<string>;
|
|
@@ -303,9 +304,9 @@ interface CreateSandboxOptions {
|
|
|
303
304
|
image?: string;
|
|
304
305
|
/** CPU count. Defaults to 1 for fresh creates; snapshot restores inherit it when omitted. */
|
|
305
306
|
cpus?: number;
|
|
306
|
-
/** Memory in
|
|
307
|
+
/** Memory in MiB. Defaults to 1024 for fresh creates; snapshot restores inherit it when omitted. */
|
|
307
308
|
memoryMb?: number;
|
|
308
|
-
/** Root disk size in
|
|
309
|
+
/** Root disk size in MiB. When omitted, the server uses its default disk size. */
|
|
309
310
|
diskMb?: number;
|
|
310
311
|
/** Number of GPUs to allocate. Defaults to A10 unless gpuModel is set. GPU sandboxes require a CAS image. */
|
|
311
312
|
gpus?: number;
|
|
@@ -340,7 +341,42 @@ interface CreateSandboxOptions {
|
|
|
340
341
|
*/
|
|
341
342
|
maxPendingSecs?: number;
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Bounded generation wait. Timeout never cancels a resize. Times are seconds.
|
|
346
|
+
* A zero timeout checks once without polling again.
|
|
347
|
+
*/
|
|
348
|
+
interface ResourceResizeWaitOptions {
|
|
349
|
+
timeout?: number;
|
|
350
|
+
pollInterval?: number;
|
|
351
|
+
}
|
|
352
|
+
declare enum ResizeStatus {
|
|
353
|
+
PENDING = "pending",
|
|
354
|
+
SUCCEEDED = "succeeded",
|
|
355
|
+
FAILED = "failed"
|
|
356
|
+
}
|
|
357
|
+
declare enum ResizeErrorReason {
|
|
358
|
+
FAILED = "failed",
|
|
359
|
+
TIMEOUT = "timeout",
|
|
360
|
+
SUPERSEDED = "superseded",
|
|
361
|
+
INTERRUPTED = "interrupted",
|
|
362
|
+
INCOMPATIBLE_RESPONSE = "incompatible_response"
|
|
363
|
+
}
|
|
364
|
+
interface SandboxResourceResizeInfo {
|
|
365
|
+
generation: number;
|
|
366
|
+
requested: ContainerResourcesInfo;
|
|
367
|
+
status: ResizeStatus | (string & {});
|
|
368
|
+
errorMessage?: string | null;
|
|
369
|
+
}
|
|
370
|
+
/** Wait options apply only to resource updates and are ignored for other properties. */
|
|
371
|
+
interface UpdateSandboxOptions extends ResourceResizeWaitOptions {
|
|
372
|
+
/** Whole live vCPU target; omitted retains the current allocation. */
|
|
373
|
+
cpus?: number;
|
|
374
|
+
/** Memory target in MiB, with the same units as create; never rounded by the SDK. */
|
|
375
|
+
memoryMb?: number;
|
|
376
|
+
/** Root disk target in MiB; can only grow. */
|
|
377
|
+
diskMb?: number;
|
|
378
|
+
/** Wait for resize completion (default true). False returns admission. */
|
|
379
|
+
wait?: boolean;
|
|
344
380
|
/** New name for the sandbox. Naming an ephemeral sandbox enables suspend/resume. */
|
|
345
381
|
name?: string;
|
|
346
382
|
/** Whether exposed user ports should be reachable without TensorLake auth. */
|
|
@@ -428,6 +464,8 @@ interface CopySandboxResponse {
|
|
|
428
464
|
sandboxes: CopiedSandboxResponse[];
|
|
429
465
|
}
|
|
430
466
|
interface SandboxInfo {
|
|
467
|
+
runtime?: string;
|
|
468
|
+
resourceResize?: SandboxResourceResizeInfo | null;
|
|
431
469
|
sandboxId: string;
|
|
432
470
|
namespace: string;
|
|
433
471
|
status: SandboxStatus;
|
|
@@ -555,7 +593,7 @@ interface CreatePoolOptions {
|
|
|
555
593
|
image: string;
|
|
556
594
|
cpus?: number;
|
|
557
595
|
memoryMb?: number;
|
|
558
|
-
/** Root disk size in
|
|
596
|
+
/** Root disk size in MiB. Omit to use the registered image's size. */
|
|
559
597
|
diskMb?: number;
|
|
560
598
|
timeoutSecs?: number;
|
|
561
599
|
entrypoint?: string[];
|
|
@@ -575,7 +613,7 @@ interface UpdatePoolOptions {
|
|
|
575
613
|
image: string;
|
|
576
614
|
cpus?: number;
|
|
577
615
|
memoryMb?: number;
|
|
578
|
-
/** Root disk size in
|
|
616
|
+
/** Root disk size in MiB. Omit to use the registered image's size. */
|
|
579
617
|
diskMb?: number;
|
|
580
618
|
timeoutSecs?: number;
|
|
581
619
|
entrypoint?: string[];
|
|
@@ -759,9 +797,12 @@ interface SandboxClientOptions {
|
|
|
759
797
|
namespace?: string;
|
|
760
798
|
maxRetries?: number;
|
|
761
799
|
retryBackoffMs?: number;
|
|
762
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* HTTP request timeout in seconds. For a streamed response it bounds the
|
|
802
|
+
* wait for the stream to start and each wait for more data. Default: 300.
|
|
803
|
+
*/
|
|
763
804
|
requestTimeout?: number;
|
|
764
|
-
/** @deprecated Use requestTimeout.
|
|
805
|
+
/** @deprecated Use requestTimeout. HTTP request timeout in milliseconds. */
|
|
765
806
|
timeoutMs?: number;
|
|
766
807
|
}
|
|
767
808
|
interface SandboxOptions {
|
|
@@ -781,9 +822,14 @@ interface SandboxOptions {
|
|
|
781
822
|
resolveProxyInfo?: (identifier: string) => Promise<SandboxInfo & {
|
|
782
823
|
readonly traceId: string;
|
|
783
824
|
}>;
|
|
784
|
-
/**
|
|
825
|
+
/**
|
|
826
|
+
* Optional HTTP request timeout in seconds for sandbox proxy operations. For
|
|
827
|
+
* streamed responses, such as `run()` and output follows, it bounds the wait
|
|
828
|
+
* for the stream to start and each wait for more data. Omit for no proxy
|
|
829
|
+
* timeout.
|
|
830
|
+
*/
|
|
785
831
|
requestTimeout?: number;
|
|
786
|
-
/** @deprecated Use requestTimeout. Optional
|
|
832
|
+
/** @deprecated Use requestTimeout. Optional HTTP request timeout in milliseconds for sandbox proxy operations. */
|
|
787
833
|
timeoutMs?: number;
|
|
788
834
|
/**
|
|
789
835
|
* @internal Shared Rust-backed lifecycle client. When provided, the proxy
|
|
@@ -1132,14 +1178,20 @@ declare class Sandbox {
|
|
|
1132
1178
|
*/
|
|
1133
1179
|
status(): Promise<SandboxStatus>;
|
|
1134
1180
|
/**
|
|
1135
|
-
* Update this sandbox's properties
|
|
1136
|
-
*
|
|
1181
|
+
* Update this sandbox's properties or resize its resources.
|
|
1182
|
+
*
|
|
1183
|
+
* Resource targets use create's cpus, memoryMb, and diskMb names. Resize
|
|
1184
|
+
* waits by default; wait=false returns admission. Timeout does not cancel it.
|
|
1185
|
+
* Wait, timeout, and pollInterval are ignored on non-resource updates.
|
|
1186
|
+
* A no-op returns current resources with absent or earlier resize metadata.
|
|
1137
1187
|
*
|
|
1138
1188
|
* Naming an ephemeral sandbox makes it non-ephemeral and enables
|
|
1139
1189
|
* suspend/resume. For `network`, omit to keep the current policy, pass an
|
|
1140
1190
|
* object to replace it, or pass `null` to clear it to unrestricted egress.
|
|
1141
1191
|
*/
|
|
1142
1192
|
update(options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
|
|
1193
|
+
/** Wait for this exact resize generation without submitting another update. */
|
|
1194
|
+
waitForResourceResize(generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
|
|
1143
1195
|
/**
|
|
1144
1196
|
* Suspend this sandbox.
|
|
1145
1197
|
*
|
|
@@ -1451,8 +1503,16 @@ declare class SandboxClient {
|
|
|
1451
1503
|
getLogs(sandboxId: string, options?: GetSandboxLogsOptions): Promise<Traced<SandboxLogsResponse>>;
|
|
1452
1504
|
/** List sandbox processes available as persisted-log filters. */
|
|
1453
1505
|
listLogProcesses(sandboxId: string): Promise<Traced<SandboxProcessLogFiltersResponse>>;
|
|
1454
|
-
/**
|
|
1506
|
+
/**
|
|
1507
|
+
* Update properties or resize a Running Cloud Hypervisor sandbox.
|
|
1508
|
+
* Resource names match create. Resize waits by default; wait=false returns
|
|
1509
|
+
* admission. Timeout leaves the resize running and reports its generation.
|
|
1510
|
+
* Wait, timeout, and pollInterval are ignored on non-resource updates.
|
|
1511
|
+
* A no-op returns current resources with absent or earlier resize metadata.
|
|
1512
|
+
*/
|
|
1455
1513
|
update(sandboxId: string, options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
|
|
1514
|
+
/** Wait for this exact generation. Timeout leaves the resize running. */
|
|
1515
|
+
waitForResourceResize(sandboxId: string, generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
|
|
1456
1516
|
/** Get the current proxy port settings for a sandbox. */
|
|
1457
1517
|
getPortAccess(sandboxId: string): Promise<SandboxPortAccess>;
|
|
1458
1518
|
/** Add one or more user ports to the sandbox proxy allowlist. */
|
|
@@ -2274,6 +2334,21 @@ declare class SandboxError extends SandboxException {
|
|
|
2274
2334
|
sandboxId?: string;
|
|
2275
2335
|
});
|
|
2276
2336
|
}
|
|
2337
|
+
/** A failed, timed-out, interrupted, or superseded resize, with confirmed allocation. */
|
|
2338
|
+
declare class SandboxResizeError extends SandboxError {
|
|
2339
|
+
readonly reason: ResizeErrorReason;
|
|
2340
|
+
readonly generation: number;
|
|
2341
|
+
readonly info?: SandboxInfo;
|
|
2342
|
+
constructor(payload: {
|
|
2343
|
+
sandboxId: string;
|
|
2344
|
+
generation: number;
|
|
2345
|
+
reason: ResizeErrorReason;
|
|
2346
|
+
message: string;
|
|
2347
|
+
info?: SandboxInfo | null;
|
|
2348
|
+
});
|
|
2349
|
+
/** Last confirmed allocation, if an observation was available. */
|
|
2350
|
+
get confirmedResources(): ContainerResourcesInfo | undefined;
|
|
2351
|
+
}
|
|
2277
2352
|
/**
|
|
2278
2353
|
* The wait budget ran out while the sandbox was still queued.
|
|
2279
2354
|
*
|
|
@@ -2349,4 +2424,4 @@ declare class RequestExecutionError extends Error {
|
|
|
2349
2424
|
constructor(message: string, functionName?: string);
|
|
2350
2425
|
}
|
|
2351
2426
|
|
|
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 };
|
|
2427
|
+
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, ResizeErrorReason, ResizeStatus, type ResourceResizeWaitOptions, 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, SandboxResizeError, type SandboxResourceResizeInfo, 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, type UpdateSandboxOptions, UpsertSecretResponse, createFileSystem, deleteFileSystem, isSandboxPending, listFileSystems, sandboxUrlFromIngressEndpoint };
|
package/dist/index.d.ts
CHANGED
|
@@ -79,7 +79,8 @@ interface NativeSandboxClient {
|
|
|
79
79
|
getArchivedSandbox(sandboxId: string): Promise<TracedJson>;
|
|
80
80
|
getSandboxLogs(requestJson: string): Promise<TracedJson>;
|
|
81
81
|
listSandboxLogProcesses(sandboxId: string): Promise<TracedJson>;
|
|
82
|
-
updateSandbox(sandboxId: string, requestJson: string): Promise<TracedJson>;
|
|
82
|
+
updateSandbox(sandboxId: string, requestJson: string, wait?: boolean, timeoutSec?: number, pollIntervalSec?: number): Promise<TracedJson>;
|
|
83
|
+
waitForResourceResize(sandboxId: string, generation: number, timeoutSec?: number, pollIntervalSec?: number): Promise<TracedJson>;
|
|
83
84
|
deleteSandbox(sandboxId: string): Promise<string>;
|
|
84
85
|
suspendSandbox(sandboxId: string): Promise<string>;
|
|
85
86
|
resumeSandbox(sandboxId: string): Promise<string>;
|
|
@@ -303,9 +304,9 @@ interface CreateSandboxOptions {
|
|
|
303
304
|
image?: string;
|
|
304
305
|
/** CPU count. Defaults to 1 for fresh creates; snapshot restores inherit it when omitted. */
|
|
305
306
|
cpus?: number;
|
|
306
|
-
/** Memory in
|
|
307
|
+
/** Memory in MiB. Defaults to 1024 for fresh creates; snapshot restores inherit it when omitted. */
|
|
307
308
|
memoryMb?: number;
|
|
308
|
-
/** Root disk size in
|
|
309
|
+
/** Root disk size in MiB. When omitted, the server uses its default disk size. */
|
|
309
310
|
diskMb?: number;
|
|
310
311
|
/** Number of GPUs to allocate. Defaults to A10 unless gpuModel is set. GPU sandboxes require a CAS image. */
|
|
311
312
|
gpus?: number;
|
|
@@ -340,7 +341,42 @@ interface CreateSandboxOptions {
|
|
|
340
341
|
*/
|
|
341
342
|
maxPendingSecs?: number;
|
|
342
343
|
}
|
|
343
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Bounded generation wait. Timeout never cancels a resize. Times are seconds.
|
|
346
|
+
* A zero timeout checks once without polling again.
|
|
347
|
+
*/
|
|
348
|
+
interface ResourceResizeWaitOptions {
|
|
349
|
+
timeout?: number;
|
|
350
|
+
pollInterval?: number;
|
|
351
|
+
}
|
|
352
|
+
declare enum ResizeStatus {
|
|
353
|
+
PENDING = "pending",
|
|
354
|
+
SUCCEEDED = "succeeded",
|
|
355
|
+
FAILED = "failed"
|
|
356
|
+
}
|
|
357
|
+
declare enum ResizeErrorReason {
|
|
358
|
+
FAILED = "failed",
|
|
359
|
+
TIMEOUT = "timeout",
|
|
360
|
+
SUPERSEDED = "superseded",
|
|
361
|
+
INTERRUPTED = "interrupted",
|
|
362
|
+
INCOMPATIBLE_RESPONSE = "incompatible_response"
|
|
363
|
+
}
|
|
364
|
+
interface SandboxResourceResizeInfo {
|
|
365
|
+
generation: number;
|
|
366
|
+
requested: ContainerResourcesInfo;
|
|
367
|
+
status: ResizeStatus | (string & {});
|
|
368
|
+
errorMessage?: string | null;
|
|
369
|
+
}
|
|
370
|
+
/** Wait options apply only to resource updates and are ignored for other properties. */
|
|
371
|
+
interface UpdateSandboxOptions extends ResourceResizeWaitOptions {
|
|
372
|
+
/** Whole live vCPU target; omitted retains the current allocation. */
|
|
373
|
+
cpus?: number;
|
|
374
|
+
/** Memory target in MiB, with the same units as create; never rounded by the SDK. */
|
|
375
|
+
memoryMb?: number;
|
|
376
|
+
/** Root disk target in MiB; can only grow. */
|
|
377
|
+
diskMb?: number;
|
|
378
|
+
/** Wait for resize completion (default true). False returns admission. */
|
|
379
|
+
wait?: boolean;
|
|
344
380
|
/** New name for the sandbox. Naming an ephemeral sandbox enables suspend/resume. */
|
|
345
381
|
name?: string;
|
|
346
382
|
/** Whether exposed user ports should be reachable without TensorLake auth. */
|
|
@@ -428,6 +464,8 @@ interface CopySandboxResponse {
|
|
|
428
464
|
sandboxes: CopiedSandboxResponse[];
|
|
429
465
|
}
|
|
430
466
|
interface SandboxInfo {
|
|
467
|
+
runtime?: string;
|
|
468
|
+
resourceResize?: SandboxResourceResizeInfo | null;
|
|
431
469
|
sandboxId: string;
|
|
432
470
|
namespace: string;
|
|
433
471
|
status: SandboxStatus;
|
|
@@ -555,7 +593,7 @@ interface CreatePoolOptions {
|
|
|
555
593
|
image: string;
|
|
556
594
|
cpus?: number;
|
|
557
595
|
memoryMb?: number;
|
|
558
|
-
/** Root disk size in
|
|
596
|
+
/** Root disk size in MiB. Omit to use the registered image's size. */
|
|
559
597
|
diskMb?: number;
|
|
560
598
|
timeoutSecs?: number;
|
|
561
599
|
entrypoint?: string[];
|
|
@@ -575,7 +613,7 @@ interface UpdatePoolOptions {
|
|
|
575
613
|
image: string;
|
|
576
614
|
cpus?: number;
|
|
577
615
|
memoryMb?: number;
|
|
578
|
-
/** Root disk size in
|
|
616
|
+
/** Root disk size in MiB. Omit to use the registered image's size. */
|
|
579
617
|
diskMb?: number;
|
|
580
618
|
timeoutSecs?: number;
|
|
581
619
|
entrypoint?: string[];
|
|
@@ -759,9 +797,12 @@ interface SandboxClientOptions {
|
|
|
759
797
|
namespace?: string;
|
|
760
798
|
maxRetries?: number;
|
|
761
799
|
retryBackoffMs?: number;
|
|
762
|
-
/**
|
|
800
|
+
/**
|
|
801
|
+
* HTTP request timeout in seconds. For a streamed response it bounds the
|
|
802
|
+
* wait for the stream to start and each wait for more data. Default: 300.
|
|
803
|
+
*/
|
|
763
804
|
requestTimeout?: number;
|
|
764
|
-
/** @deprecated Use requestTimeout.
|
|
805
|
+
/** @deprecated Use requestTimeout. HTTP request timeout in milliseconds. */
|
|
765
806
|
timeoutMs?: number;
|
|
766
807
|
}
|
|
767
808
|
interface SandboxOptions {
|
|
@@ -781,9 +822,14 @@ interface SandboxOptions {
|
|
|
781
822
|
resolveProxyInfo?: (identifier: string) => Promise<SandboxInfo & {
|
|
782
823
|
readonly traceId: string;
|
|
783
824
|
}>;
|
|
784
|
-
/**
|
|
825
|
+
/**
|
|
826
|
+
* Optional HTTP request timeout in seconds for sandbox proxy operations. For
|
|
827
|
+
* streamed responses, such as `run()` and output follows, it bounds the wait
|
|
828
|
+
* for the stream to start and each wait for more data. Omit for no proxy
|
|
829
|
+
* timeout.
|
|
830
|
+
*/
|
|
785
831
|
requestTimeout?: number;
|
|
786
|
-
/** @deprecated Use requestTimeout. Optional
|
|
832
|
+
/** @deprecated Use requestTimeout. Optional HTTP request timeout in milliseconds for sandbox proxy operations. */
|
|
787
833
|
timeoutMs?: number;
|
|
788
834
|
/**
|
|
789
835
|
* @internal Shared Rust-backed lifecycle client. When provided, the proxy
|
|
@@ -1132,14 +1178,20 @@ declare class Sandbox {
|
|
|
1132
1178
|
*/
|
|
1133
1179
|
status(): Promise<SandboxStatus>;
|
|
1134
1180
|
/**
|
|
1135
|
-
* Update this sandbox's properties
|
|
1136
|
-
*
|
|
1181
|
+
* Update this sandbox's properties or resize its resources.
|
|
1182
|
+
*
|
|
1183
|
+
* Resource targets use create's cpus, memoryMb, and diskMb names. Resize
|
|
1184
|
+
* waits by default; wait=false returns admission. Timeout does not cancel it.
|
|
1185
|
+
* Wait, timeout, and pollInterval are ignored on non-resource updates.
|
|
1186
|
+
* A no-op returns current resources with absent or earlier resize metadata.
|
|
1137
1187
|
*
|
|
1138
1188
|
* Naming an ephemeral sandbox makes it non-ephemeral and enables
|
|
1139
1189
|
* suspend/resume. For `network`, omit to keep the current policy, pass an
|
|
1140
1190
|
* object to replace it, or pass `null` to clear it to unrestricted egress.
|
|
1141
1191
|
*/
|
|
1142
1192
|
update(options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
|
|
1193
|
+
/** Wait for this exact resize generation without submitting another update. */
|
|
1194
|
+
waitForResourceResize(generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
|
|
1143
1195
|
/**
|
|
1144
1196
|
* Suspend this sandbox.
|
|
1145
1197
|
*
|
|
@@ -1451,8 +1503,16 @@ declare class SandboxClient {
|
|
|
1451
1503
|
getLogs(sandboxId: string, options?: GetSandboxLogsOptions): Promise<Traced<SandboxLogsResponse>>;
|
|
1452
1504
|
/** List sandbox processes available as persisted-log filters. */
|
|
1453
1505
|
listLogProcesses(sandboxId: string): Promise<Traced<SandboxProcessLogFiltersResponse>>;
|
|
1454
|
-
/**
|
|
1506
|
+
/**
|
|
1507
|
+
* Update properties or resize a Running Cloud Hypervisor sandbox.
|
|
1508
|
+
* Resource names match create. Resize waits by default; wait=false returns
|
|
1509
|
+
* admission. Timeout leaves the resize running and reports its generation.
|
|
1510
|
+
* Wait, timeout, and pollInterval are ignored on non-resource updates.
|
|
1511
|
+
* A no-op returns current resources with absent or earlier resize metadata.
|
|
1512
|
+
*/
|
|
1455
1513
|
update(sandboxId: string, options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
|
|
1514
|
+
/** Wait for this exact generation. Timeout leaves the resize running. */
|
|
1515
|
+
waitForResourceResize(sandboxId: string, generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
|
|
1456
1516
|
/** Get the current proxy port settings for a sandbox. */
|
|
1457
1517
|
getPortAccess(sandboxId: string): Promise<SandboxPortAccess>;
|
|
1458
1518
|
/** Add one or more user ports to the sandbox proxy allowlist. */
|
|
@@ -2274,6 +2334,21 @@ declare class SandboxError extends SandboxException {
|
|
|
2274
2334
|
sandboxId?: string;
|
|
2275
2335
|
});
|
|
2276
2336
|
}
|
|
2337
|
+
/** A failed, timed-out, interrupted, or superseded resize, with confirmed allocation. */
|
|
2338
|
+
declare class SandboxResizeError extends SandboxError {
|
|
2339
|
+
readonly reason: ResizeErrorReason;
|
|
2340
|
+
readonly generation: number;
|
|
2341
|
+
readonly info?: SandboxInfo;
|
|
2342
|
+
constructor(payload: {
|
|
2343
|
+
sandboxId: string;
|
|
2344
|
+
generation: number;
|
|
2345
|
+
reason: ResizeErrorReason;
|
|
2346
|
+
message: string;
|
|
2347
|
+
info?: SandboxInfo | null;
|
|
2348
|
+
});
|
|
2349
|
+
/** Last confirmed allocation, if an observation was available. */
|
|
2350
|
+
get confirmedResources(): ContainerResourcesInfo | undefined;
|
|
2351
|
+
}
|
|
2277
2352
|
/**
|
|
2278
2353
|
* The wait budget ran out while the sandbox was still queued.
|
|
2279
2354
|
*
|
|
@@ -2349,4 +2424,4 @@ declare class RequestExecutionError extends Error {
|
|
|
2349
2424
|
constructor(message: string, functionName?: string);
|
|
2350
2425
|
}
|
|
2351
2426
|
|
|
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 };
|
|
2427
|
+
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, ResizeErrorReason, ResizeStatus, type ResourceResizeWaitOptions, 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, SandboxResizeError, type SandboxResourceResizeInfo, 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, type UpdateSandboxOptions, UpsertSecretResponse, createFileSystem, deleteFileSystem, isSandboxPending, listFileSystems, sandboxUrlFromIngressEndpoint };
|