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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/index.cjs CHANGED
@@ -3358,13 +3358,13 @@ var init_sandbox = __esm({
3358
3358
  async checkpoint(options) {
3359
3359
  const client = this.requireLifecycleClient("checkpoint");
3360
3360
  if (options?.wait === false) {
3361
- await client.snapshot(this.lifecycleIdentifier, { contentMode: options.contentMode });
3361
+ await client.snapshot(this.lifecycleIdentifier, { snapshotType: options.checkpointType });
3362
3362
  return void 0;
3363
3363
  }
3364
3364
  return client.snapshotAndWait(this.lifecycleIdentifier, {
3365
3365
  timeout: options?.timeout,
3366
3366
  pollInterval: options?.pollInterval,
3367
- contentMode: options?.contentMode
3367
+ snapshotType: options?.checkpointType
3368
3368
  });
3369
3369
  }
3370
3370
  /**
@@ -4023,11 +4023,11 @@ var init_client = __esm({
4023
4023
  * status — the snapshot is created asynchronously. Poll `getSnapshot()` until
4024
4024
  * `completed` or `failed`, or use `snapshotAndWait()` to block automatically.
4025
4025
  *
4026
- * @param options.contentMode - `"filesystem_only"` for cold-boot snapshots (e.g. image builds).
4027
- * Omit to use the server default (full VM snapshot).
4026
+ * @param options.snapshotType - `"filesystem"` for cold-boot snapshots (e.g. image builds).
4027
+ * Omit to use the server default (`filesystem`).
4028
4028
  */
4029
4029
  async snapshot(sandboxId, options) {
4030
- const requestOptions = options?.contentMode != null ? { body: { snapshot_content_mode: options.contentMode } } : void 0;
4030
+ const requestOptions = options?.snapshotType != null ? { body: { snapshot_type: options.snapshotType } } : void 0;
4031
4031
  const raw = await this.http.requestJson(
4032
4032
  "POST",
4033
4033
  this.path(`sandboxes/${sandboxId}/snapshot`),
@@ -4071,14 +4071,14 @@ var init_client = __esm({
4071
4071
  * @param sandboxId - ID of the running sandbox to snapshot.
4072
4072
  * @param options.timeout - Max seconds to wait (default 300).
4073
4073
  * @param options.pollInterval - Seconds between status polls (default 1).
4074
- * @param options.contentMode - Content mode passed through to `snapshot()`.
4074
+ * @param options.snapshotType - Snapshot type passed through to `snapshot()`.
4075
4075
  * @throws {SandboxError} If the snapshot fails or `timeout` elapses.
4076
4076
  */
4077
4077
  async snapshotAndWait(sandboxId, options) {
4078
4078
  const timeout = options?.timeout ?? 300;
4079
4079
  const pollInterval = options?.pollInterval ?? 1;
4080
4080
  const result = await this.snapshot(sandboxId, {
4081
- contentMode: options?.contentMode
4081
+ snapshotType: options?.snapshotType
4082
4082
  });
4083
4083
  const deadline = Date.now() + timeout * 1e3;
4084
4084
  while (Date.now() < deadline) {
@@ -5070,7 +5070,7 @@ async function createSandboxImage(source, options = {}, deps = {}) {
5070
5070
  await executeDockerfilePlan(sandbox, plan, emit, sleep3);
5071
5071
  emit({ type: "status", message: "Creating snapshot..." });
5072
5072
  const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
5073
- contentMode: "filesystem_only"
5073
+ snapshotType: "filesystem"
5074
5074
  });
5075
5075
  emit({
5076
5076
  type: "snapshot_created",