tensorlake 0.5.3 → 0.5.4

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
@@ -1,5 +1,5 @@
1
- import { C as CreatePtySessionOptions, S as SandboxOptions, a as CreateAndConnectOptions, b as SandboxClientOptions, c as ConnectOptions, d as SnapshotInfo, e as SandboxStatus, U as UpdateSandboxOptions, f as SandboxInfo, g as SuspendResumeOptions, h as CheckpointOptions, R as RunOptions, i as CommandResult, j as StartProcessOptions, P as ProcessInfo, k as SendSignalResponse, O as OutputResponse, l as OutputEvent, L as ListDirectoryResponse, m as PtySessionInfo, H as HealthResponse, D as DaemonInfo, n as CreateSandboxOptions, o as CreateSandboxResponse, p as SandboxPortAccess, q as SnapshotOptions, r as CreateSnapshotResponse, s as SnapshotAndWaitOptions, t as CreatePoolOptions, u as CreateSandboxPoolResponse, v as SandboxPoolInfo, w as UpdatePoolOptions } from './sandbox-image-B0WMhyoM.cjs';
2
- export { x as ContainerResourcesInfo, y as ContainerState, z as CreateSandboxImageOptions, A as DirectoryEntry, B as DockerfileBuildPlan, E as DockerfileInstruction, I as Image, F as ImageBuildOperation, G as ImageBuildOperationType, G as ImageBuildOperationTypeValue, J as ImageOptions, N as NetworkConfig, K as OutputMode, M as PoolContainerInfo, Q as ProcessStatus, T as SandboxImageSource, V as SnapshotContentMode, W as SnapshotStatus, X as StdinMode, Y as createSandboxImage, Z as dockerfileContent } from './sandbox-image-B0WMhyoM.cjs';
1
+ import { C as CreatePtySessionOptions, S as SandboxOptions, a as CreateAndConnectOptions, b as SandboxClientOptions, c as ConnectOptions, d as SnapshotInfo, e as SandboxStatus, U as UpdateSandboxOptions, f as SandboxInfo, g as SuspendResumeOptions, h as CheckpointOptions, R as RunOptions, i as CommandResult, j as StartProcessOptions, P as ProcessInfo, k as SendSignalResponse, O as OutputResponse, l as OutputEvent, L as ListDirectoryResponse, m as PtySessionInfo, H as HealthResponse, D as DaemonInfo, n as CreateSandboxOptions, o as CreateSandboxResponse, p as SandboxPortAccess, q as SnapshotOptions, r as CreateSnapshotResponse, s as SnapshotAndWaitOptions, t as CreatePoolOptions, u as CreateSandboxPoolResponse, v as SandboxPoolInfo, w as UpdatePoolOptions } from './sandbox-image-BmhjX2bC.cjs';
2
+ export { x as CheckpointType, y as ContainerResourcesInfo, z as ContainerState, A as CreateSandboxImageOptions, B as DirectoryEntry, E as DockerfileBuildPlan, F as DockerfileInstruction, I as Image, G as ImageBuildOperation, J as ImageBuildOperationType, J as ImageBuildOperationTypeValue, K as ImageOptions, N as NetworkConfig, M as OutputMode, Q as PoolContainerInfo, T as ProcessStatus, V as SandboxImageSource, W as SnapshotStatus, X as SnapshotType, Y as StdinMode, Z as createSandboxImage, _ as dockerfileContent } from './sandbox-image-BmhjX2bC.cjs';
3
3
 
4
4
  /**
5
5
  * The return value of every SDK operation. Carries the W3C `trace_id` so callers
@@ -403,8 +403,8 @@ declare class SandboxClient {
403
403
  * status — the snapshot is created asynchronously. Poll `getSnapshot()` until
404
404
  * `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
405
405
  *
406
- * @param options.contentMode - `"filesystem_only"` for cold-boot snapshots (e.g. image builds).
407
- * Omit to use the server default (full VM snapshot).
406
+ * @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
407
+ * Omit to use the server default (`filesystem`).
408
408
  */
409
409
  snapshot(sandboxId: string, options?: SnapshotOptions): Promise<CreateSnapshotResponse>;
410
410
  /** Get current status and metadata for a snapshot by ID. */
@@ -423,7 +423,7 @@ declare class SandboxClient {
423
423
  * @param sandboxId - ID of the running sandbox to snapshot.
424
424
  * @param options.timeout - Max seconds to wait (default 300).
425
425
  * @param options.pollInterval - Seconds between status polls (default 1).
426
- * @param options.contentMode - Content mode passed through to `snapshot()`.
426
+ * @param options.snapshotType - Snapshot type passed through to `snapshot()`.
427
427
  * @throws {SandboxError} If the snapshot fails or `timeout` elapses.
428
428
  */
429
429
  snapshotAndWait(sandboxId: string, options?: SnapshotAndWaitOptions): Promise<SnapshotInfo>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CreatePtySessionOptions, S as SandboxOptions, a as CreateAndConnectOptions, b as SandboxClientOptions, c as ConnectOptions, d as SnapshotInfo, e as SandboxStatus, U as UpdateSandboxOptions, f as SandboxInfo, g as SuspendResumeOptions, h as CheckpointOptions, R as RunOptions, i as CommandResult, j as StartProcessOptions, P as ProcessInfo, k as SendSignalResponse, O as OutputResponse, l as OutputEvent, L as ListDirectoryResponse, m as PtySessionInfo, H as HealthResponse, D as DaemonInfo, n as CreateSandboxOptions, o as CreateSandboxResponse, p as SandboxPortAccess, q as SnapshotOptions, r as CreateSnapshotResponse, s as SnapshotAndWaitOptions, t as CreatePoolOptions, u as CreateSandboxPoolResponse, v as SandboxPoolInfo, w as UpdatePoolOptions } from './sandbox-image-B0WMhyoM.js';
2
- export { x as ContainerResourcesInfo, y as ContainerState, z as CreateSandboxImageOptions, A as DirectoryEntry, B as DockerfileBuildPlan, E as DockerfileInstruction, I as Image, F as ImageBuildOperation, G as ImageBuildOperationType, G as ImageBuildOperationTypeValue, J as ImageOptions, N as NetworkConfig, K as OutputMode, M as PoolContainerInfo, Q as ProcessStatus, T as SandboxImageSource, V as SnapshotContentMode, W as SnapshotStatus, X as StdinMode, Y as createSandboxImage, Z as dockerfileContent } from './sandbox-image-B0WMhyoM.js';
1
+ import { C as CreatePtySessionOptions, S as SandboxOptions, a as CreateAndConnectOptions, b as SandboxClientOptions, c as ConnectOptions, d as SnapshotInfo, e as SandboxStatus, U as UpdateSandboxOptions, f as SandboxInfo, g as SuspendResumeOptions, h as CheckpointOptions, R as RunOptions, i as CommandResult, j as StartProcessOptions, P as ProcessInfo, k as SendSignalResponse, O as OutputResponse, l as OutputEvent, L as ListDirectoryResponse, m as PtySessionInfo, H as HealthResponse, D as DaemonInfo, n as CreateSandboxOptions, o as CreateSandboxResponse, p as SandboxPortAccess, q as SnapshotOptions, r as CreateSnapshotResponse, s as SnapshotAndWaitOptions, t as CreatePoolOptions, u as CreateSandboxPoolResponse, v as SandboxPoolInfo, w as UpdatePoolOptions } from './sandbox-image-BmhjX2bC.js';
2
+ export { x as CheckpointType, y as ContainerResourcesInfo, z as ContainerState, A as CreateSandboxImageOptions, B as DirectoryEntry, E as DockerfileBuildPlan, F as DockerfileInstruction, I as Image, G as ImageBuildOperation, J as ImageBuildOperationType, J as ImageBuildOperationTypeValue, K as ImageOptions, N as NetworkConfig, M as OutputMode, Q as PoolContainerInfo, T as ProcessStatus, V as SandboxImageSource, W as SnapshotStatus, X as SnapshotType, Y as StdinMode, Z as createSandboxImage, _ as dockerfileContent } from './sandbox-image-BmhjX2bC.js';
3
3
 
4
4
  /**
5
5
  * The return value of every SDK operation. Carries the W3C `trace_id` so callers
@@ -403,8 +403,8 @@ declare class SandboxClient {
403
403
  * status — the snapshot is created asynchronously. Poll `getSnapshot()` until
404
404
  * `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
405
405
  *
406
- * @param options.contentMode - `"filesystem_only"` for cold-boot snapshots (e.g. image builds).
407
- * Omit to use the server default (full VM snapshot).
406
+ * @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
407
+ * Omit to use the server default (`filesystem`).
408
408
  */
409
409
  snapshot(sandboxId: string, options?: SnapshotOptions): Promise<CreateSnapshotResponse>;
410
410
  /** Get current status and metadata for a snapshot by ID. */
@@ -423,7 +423,7 @@ declare class SandboxClient {
423
423
  * @param sandboxId - ID of the running sandbox to snapshot.
424
424
  * @param options.timeout - Max seconds to wait (default 300).
425
425
  * @param options.pollInterval - Seconds between status polls (default 1).
426
- * @param options.contentMode - Content mode passed through to `snapshot()`.
426
+ * @param options.snapshotType - Snapshot type passed through to `snapshot()`.
427
427
  * @throws {SandboxError} If the snapshot fails or `timeout` elapses.
428
428
  */
429
429
  snapshotAndWait(sandboxId: string, options?: SnapshotAndWaitOptions): Promise<SnapshotInfo>;
package/dist/index.js CHANGED
@@ -3340,13 +3340,13 @@ var init_sandbox = __esm({
3340
3340
  async checkpoint(options) {
3341
3341
  const client = this.requireLifecycleClient("checkpoint");
3342
3342
  if (options?.wait === false) {
3343
- await client.snapshot(this.lifecycleIdentifier, { contentMode: options.contentMode });
3343
+ await client.snapshot(this.lifecycleIdentifier, { snapshotType: options.checkpointType });
3344
3344
  return void 0;
3345
3345
  }
3346
3346
  return client.snapshotAndWait(this.lifecycleIdentifier, {
3347
3347
  timeout: options?.timeout,
3348
3348
  pollInterval: options?.pollInterval,
3349
- contentMode: options?.contentMode
3349
+ snapshotType: options?.checkpointType
3350
3350
  });
3351
3351
  }
3352
3352
  /**
@@ -4005,11 +4005,11 @@ var init_client = __esm({
4005
4005
  * status — the snapshot is created asynchronously. Poll `getSnapshot()` until
4006
4006
  * `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
4007
4007
  *
4008
- * @param options.contentMode - `"filesystem_only"` for cold-boot snapshots (e.g. image builds).
4009
- * Omit to use the server default (full VM snapshot).
4008
+ * @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
4009
+ * Omit to use the server default (`filesystem`).
4010
4010
  */
4011
4011
  async snapshot(sandboxId, options) {
4012
- const requestOptions = options?.contentMode != null ? { body: { snapshot_content_mode: options.contentMode } } : void 0;
4012
+ const requestOptions = options?.snapshotType != null ? { body: { snapshot_type: options.snapshotType } } : void 0;
4013
4013
  const raw = await this.http.requestJson(
4014
4014
  "POST",
4015
4015
  this.path(`sandboxes/${sandboxId}/snapshot`),
@@ -4053,14 +4053,14 @@ var init_client = __esm({
4053
4053
  * @param sandboxId - ID of the running sandbox to snapshot.
4054
4054
  * @param options.timeout - Max seconds to wait (default 300).
4055
4055
  * @param options.pollInterval - Seconds between status polls (default 1).
4056
- * @param options.contentMode - Content mode passed through to `snapshot()`.
4056
+ * @param options.snapshotType - Snapshot type passed through to `snapshot()`.
4057
4057
  * @throws {SandboxError} If the snapshot fails or `timeout` elapses.
4058
4058
  */
4059
4059
  async snapshotAndWait(sandboxId, options) {
4060
4060
  const timeout = options?.timeout ?? 300;
4061
4061
  const pollInterval = options?.pollInterval ?? 1;
4062
4062
  const result = await this.snapshot(sandboxId, {
4063
- contentMode: options?.contentMode
4063
+ snapshotType: options?.snapshotType
4064
4064
  });
4065
4065
  const deadline = Date.now() + timeout * 1e3;
4066
4066
  while (Date.now() < deadline) {
@@ -5055,7 +5055,7 @@ async function createSandboxImage(source, options = {}, deps = {}) {
5055
5055
  await executeDockerfilePlan(sandbox, plan, emit, sleep3);
5056
5056
  emit({ type: "status", message: "Creating snapshot..." });
5057
5057
  const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
5058
- contentMode: "filesystem_only"
5058
+ snapshotType: "filesystem"
5059
5059
  });
5060
5060
  emit({
5061
5061
  type: "snapshot_created",