tensorlake 0.4.42 → 0.4.43

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
@@ -1209,10 +1209,12 @@ var SandboxClient = class _SandboxClient {
1209
1209
  return fromSnakeKeys(raw, "sandboxId");
1210
1210
  }
1211
1211
  // --- Snapshots ---
1212
- async snapshot(sandboxId) {
1212
+ async snapshot(sandboxId, options) {
1213
+ const requestOptions = options?.contentMode != null ? { body: { snapshot_content_mode: options.contentMode } } : void 0;
1213
1214
  const raw = await this.http.requestJson(
1214
1215
  "POST",
1215
- this.path(`sandboxes/${sandboxId}/snapshot`)
1216
+ this.path(`sandboxes/${sandboxId}/snapshot`),
1217
+ requestOptions
1216
1218
  );
1217
1219
  return fromSnakeKeys(raw, "snapshotId");
1218
1220
  }
@@ -1241,7 +1243,9 @@ var SandboxClient = class _SandboxClient {
1241
1243
  async snapshotAndWait(sandboxId, options) {
1242
1244
  const timeout = options?.timeout ?? 300;
1243
1245
  const pollInterval = options?.pollInterval ?? 1;
1244
- const result = await this.snapshot(sandboxId);
1246
+ const result = await this.snapshot(sandboxId, {
1247
+ contentMode: options?.contentMode
1248
+ });
1245
1249
  const deadline = Date.now() + timeout * 1e3;
1246
1250
  while (Date.now() < deadline) {
1247
1251
  const info = await this.getSnapshot(result.snapshotId);
@@ -2562,7 +2566,9 @@ async function createSandboxImage(source, options = {}, deps = {}) {
2562
2566
  });
2563
2567
  await executeDockerfilePlan(sandbox, plan, emit, sleep4);
2564
2568
  emit({ type: "status", message: "Creating snapshot..." });
2565
- const snapshot = await client.snapshotAndWait(sandbox.sandboxId);
2569
+ const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
2570
+ contentMode: "filesystem_only"
2571
+ });
2566
2572
  emit({
2567
2573
  type: "snapshot_created",
2568
2574
  snapshot_id: snapshot.snapshotId,