tensorlake 0.5.139 → 0.5.141

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/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 MB. Defaults to 1024 for fresh creates; snapshot restores inherit it when omitted. */
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 megabytes. When omitted, the server uses its default disk size. */
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
- interface UpdateSandboxOptions {
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 megabytes. Omit to use the registered image's size. */
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 megabytes. Omit to use the registered image's size. */
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[];
@@ -1132,14 +1170,20 @@ declare class Sandbox {
1132
1170
  */
1133
1171
  status(): Promise<SandboxStatus>;
1134
1172
  /**
1135
- * Update this sandbox's properties (name, exposed ports, proxy auth, and
1136
- * egress network policy).
1173
+ * Update this sandbox's properties or resize its resources.
1174
+ *
1175
+ * Resource targets use create's cpus, memoryMb, and diskMb names. Resize
1176
+ * waits by default; wait=false returns admission. Timeout does not cancel it.
1177
+ * Wait, timeout, and pollInterval are ignored on non-resource updates.
1178
+ * A no-op returns current resources with absent or earlier resize metadata.
1137
1179
  *
1138
1180
  * Naming an ephemeral sandbox makes it non-ephemeral and enables
1139
1181
  * suspend/resume. For `network`, omit to keep the current policy, pass an
1140
1182
  * object to replace it, or pass `null` to clear it to unrestricted egress.
1141
1183
  */
1142
1184
  update(options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
1185
+ /** Wait for this exact resize generation without submitting another update. */
1186
+ waitForResourceResize(generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
1143
1187
  /**
1144
1188
  * Suspend this sandbox.
1145
1189
  *
@@ -1451,8 +1495,16 @@ declare class SandboxClient {
1451
1495
  getLogs(sandboxId: string, options?: GetSandboxLogsOptions): Promise<Traced<SandboxLogsResponse>>;
1452
1496
  /** List sandbox processes available as persisted-log filters. */
1453
1497
  listLogProcesses(sandboxId: string): Promise<Traced<SandboxProcessLogFiltersResponse>>;
1454
- /** Update sandbox properties such as name, exposed ports, and proxy auth settings. */
1498
+ /**
1499
+ * Update properties or resize a Running Cloud Hypervisor sandbox.
1500
+ * Resource names match create. Resize waits by default; wait=false returns
1501
+ * admission. Timeout leaves the resize running and reports its generation.
1502
+ * Wait, timeout, and pollInterval are ignored on non-resource updates.
1503
+ * A no-op returns current resources with absent or earlier resize metadata.
1504
+ */
1455
1505
  update(sandboxId: string, options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
1506
+ /** Wait for this exact generation. Timeout leaves the resize running. */
1507
+ waitForResourceResize(sandboxId: string, generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
1456
1508
  /** Get the current proxy port settings for a sandbox. */
1457
1509
  getPortAccess(sandboxId: string): Promise<SandboxPortAccess>;
1458
1510
  /** Add one or more user ports to the sandbox proxy allowlist. */
@@ -2274,6 +2326,21 @@ declare class SandboxError extends SandboxException {
2274
2326
  sandboxId?: string;
2275
2327
  });
2276
2328
  }
2329
+ /** A failed, timed-out, interrupted, or superseded resize, with confirmed allocation. */
2330
+ declare class SandboxResizeError extends SandboxError {
2331
+ readonly reason: ResizeErrorReason;
2332
+ readonly generation: number;
2333
+ readonly info?: SandboxInfo;
2334
+ constructor(payload: {
2335
+ sandboxId: string;
2336
+ generation: number;
2337
+ reason: ResizeErrorReason;
2338
+ message: string;
2339
+ info?: SandboxInfo | null;
2340
+ });
2341
+ /** Last confirmed allocation, if an observation was available. */
2342
+ get confirmedResources(): ContainerResourcesInfo | undefined;
2343
+ }
2277
2344
  /**
2278
2345
  * The wait budget ran out while the sandbox was still queued.
2279
2346
  *
@@ -2349,4 +2416,4 @@ declare class RequestExecutionError extends Error {
2349
2416
  constructor(message: string, functionName?: string);
2350
2417
  }
2351
2418
 
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 };
2419
+ 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 MB. Defaults to 1024 for fresh creates; snapshot restores inherit it when omitted. */
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 megabytes. When omitted, the server uses its default disk size. */
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
- interface UpdateSandboxOptions {
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 megabytes. Omit to use the registered image's size. */
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 megabytes. Omit to use the registered image's size. */
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[];
@@ -1132,14 +1170,20 @@ declare class Sandbox {
1132
1170
  */
1133
1171
  status(): Promise<SandboxStatus>;
1134
1172
  /**
1135
- * Update this sandbox's properties (name, exposed ports, proxy auth, and
1136
- * egress network policy).
1173
+ * Update this sandbox's properties or resize its resources.
1174
+ *
1175
+ * Resource targets use create's cpus, memoryMb, and diskMb names. Resize
1176
+ * waits by default; wait=false returns admission. Timeout does not cancel it.
1177
+ * Wait, timeout, and pollInterval are ignored on non-resource updates.
1178
+ * A no-op returns current resources with absent or earlier resize metadata.
1137
1179
  *
1138
1180
  * Naming an ephemeral sandbox makes it non-ephemeral and enables
1139
1181
  * suspend/resume. For `network`, omit to keep the current policy, pass an
1140
1182
  * object to replace it, or pass `null` to clear it to unrestricted egress.
1141
1183
  */
1142
1184
  update(options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
1185
+ /** Wait for this exact resize generation without submitting another update. */
1186
+ waitForResourceResize(generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
1143
1187
  /**
1144
1188
  * Suspend this sandbox.
1145
1189
  *
@@ -1451,8 +1495,16 @@ declare class SandboxClient {
1451
1495
  getLogs(sandboxId: string, options?: GetSandboxLogsOptions): Promise<Traced<SandboxLogsResponse>>;
1452
1496
  /** List sandbox processes available as persisted-log filters. */
1453
1497
  listLogProcesses(sandboxId: string): Promise<Traced<SandboxProcessLogFiltersResponse>>;
1454
- /** Update sandbox properties such as name, exposed ports, and proxy auth settings. */
1498
+ /**
1499
+ * Update properties or resize a Running Cloud Hypervisor sandbox.
1500
+ * Resource names match create. Resize waits by default; wait=false returns
1501
+ * admission. Timeout leaves the resize running and reports its generation.
1502
+ * Wait, timeout, and pollInterval are ignored on non-resource updates.
1503
+ * A no-op returns current resources with absent or earlier resize metadata.
1504
+ */
1455
1505
  update(sandboxId: string, options: UpdateSandboxOptions): Promise<Traced<SandboxInfo>>;
1506
+ /** Wait for this exact generation. Timeout leaves the resize running. */
1507
+ waitForResourceResize(sandboxId: string, generation: number, options?: ResourceResizeWaitOptions): Promise<Traced<SandboxInfo>>;
1456
1508
  /** Get the current proxy port settings for a sandbox. */
1457
1509
  getPortAccess(sandboxId: string): Promise<SandboxPortAccess>;
1458
1510
  /** Add one or more user ports to the sandbox proxy allowlist. */
@@ -2274,6 +2326,21 @@ declare class SandboxError extends SandboxException {
2274
2326
  sandboxId?: string;
2275
2327
  });
2276
2328
  }
2329
+ /** A failed, timed-out, interrupted, or superseded resize, with confirmed allocation. */
2330
+ declare class SandboxResizeError extends SandboxError {
2331
+ readonly reason: ResizeErrorReason;
2332
+ readonly generation: number;
2333
+ readonly info?: SandboxInfo;
2334
+ constructor(payload: {
2335
+ sandboxId: string;
2336
+ generation: number;
2337
+ reason: ResizeErrorReason;
2338
+ message: string;
2339
+ info?: SandboxInfo | null;
2340
+ });
2341
+ /** Last confirmed allocation, if an observation was available. */
2342
+ get confirmedResources(): ContainerResourcesInfo | undefined;
2343
+ }
2277
2344
  /**
2278
2345
  * The wait budget ran out while the sandbox was still queued.
2279
2346
  *
@@ -2349,4 +2416,4 @@ declare class RequestExecutionError extends Error {
2349
2416
  constructor(message: string, functionName?: string);
2350
2417
  }
2351
2418
 
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 };
2419
+ 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 };