tensorlake 0.4.42 → 0.4.45

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.
@@ -11,6 +11,17 @@ declare enum SnapshotStatus {
11
11
  COMPLETED = "completed",
12
12
  FAILED = "failed"
13
13
  }
14
+ /**
15
+ * Content mode for snapshot creation.
16
+ *
17
+ * - `"full"`: Full VM snapshot (memory + filesystem state). Sandboxes
18
+ * restored from this snapshot warm-restore VM memory.
19
+ * - `"filesystem_only"`: Filesystem-only snapshot. Sandboxes restored from
20
+ * this snapshot cold-boot from the snapshot tarball instead of warm-
21
+ * restoring VM state. Use this for sandbox image builds so that the
22
+ * restored sandbox bypasses Firecracker's overlay-path constraints.
23
+ */
24
+ type SnapshotContentMode = "full" | "filesystem_only";
14
25
  declare enum ProcessStatus {
15
26
  RUNNING = "running",
16
27
  EXITED = "exited",
@@ -39,7 +50,7 @@ interface NetworkConfig {
39
50
  denyOut: string[];
40
51
  }
41
52
  interface CreateSandboxOptions {
42
- /** Optional sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. When omitted, Tensorlake uses the default managed environment. */
53
+ /** Optional sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. When omitted, Tensorlake uses the default managed environment. */
43
54
  image?: string;
44
55
  cpus?: number;
45
56
  memoryMb?: number;
@@ -106,12 +117,20 @@ interface SnapshotInfo {
106
117
  sizeBytes?: number;
107
118
  createdAt?: Date;
108
119
  }
109
- interface SnapshotAndWaitOptions {
120
+ interface SnapshotOptions {
121
+ /**
122
+ * Optional content mode for the snapshot. When omitted the server picks
123
+ * its default. Use `"filesystem_only"` for snapshots intended for sandbox
124
+ * image builds so that restored sandboxes cold-boot.
125
+ */
126
+ contentMode?: SnapshotContentMode;
127
+ }
128
+ interface SnapshotAndWaitOptions extends SnapshotOptions {
110
129
  timeout?: number;
111
130
  pollInterval?: number;
112
131
  }
113
132
  interface CreatePoolOptions {
114
- /** Sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. */
133
+ /** Sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. */
115
134
  image: string;
116
135
  cpus?: number;
117
136
  memoryMb?: number;
@@ -123,7 +142,7 @@ interface CreatePoolOptions {
123
142
  warmContainers?: number;
124
143
  }
125
144
  interface UpdatePoolOptions {
126
- /** Sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. */
145
+ /** Sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. */
127
146
  image: string;
128
147
  cpus?: number;
129
148
  memoryMb?: number;
@@ -353,6 +372,7 @@ interface BuildClient {
353
372
  snapshotAndWait(sandboxId: string, options?: {
354
373
  timeout?: number;
355
374
  pollInterval?: number;
375
+ contentMode?: SnapshotContentMode;
356
376
  }): Promise<SnapshotInfo>;
357
377
  close(): void;
358
378
  }
@@ -372,4 +392,4 @@ declare function loadImagePlan(image: Image, options?: Pick<CreateSandboxImageOp
372
392
  declare function createSandboxImage(source: SandboxImageSource, options?: CreateSandboxImageOptions, deps?: CreateSandboxImageDeps): Promise<Record<string, unknown>>;
373
393
  declare function runCreateSandboxImageCli(argv?: string[]): Promise<void>;
374
394
 
375
- export { type ImageOptions as A, OutputMode as B, type CreatePtySessionOptions as C, type DaemonInfo as D, type PoolContainerInfo as E, ProcessStatus as F, type SandboxImageSource as G, type HealthResponse as H, Image as I, SandboxStatus as J, SnapshotStatus as K, type ListDirectoryResponse as L, StdinMode as M, type NetworkConfig as N, type OutputResponse as O, type ProcessInfo as P, createSandboxImage as Q, type RunOptions as R, type SandboxOptions as S, dockerfileContent as T, type UpdateSandboxOptions as U, defaultRegisteredName as V, loadDockerfilePlan as W, loadImagePlan as X, logicalDockerfileLines as Y, runCreateSandboxImageCli as Z, type CommandResult as a, type StartProcessOptions as b, type SendSignalResponse as c, type OutputEvent as d, type PtySessionInfo as e, type SandboxClientOptions as f, type CreateSandboxOptions as g, type CreateSandboxResponse as h, type SandboxInfo as i, type SandboxPortAccess as j, type CreateSnapshotResponse as k, type SnapshotInfo as l, type SnapshotAndWaitOptions as m, type CreatePoolOptions as n, type CreateSandboxPoolResponse as o, type SandboxPoolInfo as p, type UpdatePoolOptions as q, type CreateAndConnectOptions as r, type ContainerResourcesInfo as s, ContainerState as t, type CreateSandboxImageOptions as u, type DirectoryEntry as v, type DockerfileBuildPlan as w, type DockerfileInstruction as x, type ImageBuildOperation as y, ImageBuildOperationType as z };
395
+ export { runCreateSandboxImageCli as $, ImageBuildOperationType as A, type ImageOptions as B, type CreatePtySessionOptions as C, type DaemonInfo as D, OutputMode as E, type PoolContainerInfo as F, ProcessStatus as G, type HealthResponse as H, Image as I, type SandboxImageSource as J, SandboxStatus as K, type ListDirectoryResponse as L, type SnapshotContentMode as M, type NetworkConfig as N, type OutputResponse as O, type ProcessInfo as P, SnapshotStatus as Q, type RunOptions as R, type SandboxOptions as S, StdinMode as T, type UpdateSandboxOptions as U, createSandboxImage as V, dockerfileContent as W, defaultRegisteredName as X, loadDockerfilePlan as Y, loadImagePlan as Z, logicalDockerfileLines as _, type CommandResult as a, type StartProcessOptions as b, type SendSignalResponse as c, type OutputEvent as d, type PtySessionInfo as e, type SandboxClientOptions as f, type CreateSandboxOptions as g, type CreateSandboxResponse as h, type SandboxInfo as i, type SandboxPortAccess as j, type SnapshotOptions as k, type CreateSnapshotResponse as l, type SnapshotInfo as m, type SnapshotAndWaitOptions as n, type CreatePoolOptions as o, type CreateSandboxPoolResponse as p, type SandboxPoolInfo as q, type UpdatePoolOptions as r, type CreateAndConnectOptions as s, type ContainerResourcesInfo as t, ContainerState as u, type CreateSandboxImageOptions as v, type DirectoryEntry as w, type DockerfileBuildPlan as x, type DockerfileInstruction as y, type ImageBuildOperation as z };
@@ -11,6 +11,17 @@ declare enum SnapshotStatus {
11
11
  COMPLETED = "completed",
12
12
  FAILED = "failed"
13
13
  }
14
+ /**
15
+ * Content mode for snapshot creation.
16
+ *
17
+ * - `"full"`: Full VM snapshot (memory + filesystem state). Sandboxes
18
+ * restored from this snapshot warm-restore VM memory.
19
+ * - `"filesystem_only"`: Filesystem-only snapshot. Sandboxes restored from
20
+ * this snapshot cold-boot from the snapshot tarball instead of warm-
21
+ * restoring VM state. Use this for sandbox image builds so that the
22
+ * restored sandbox bypasses Firecracker's overlay-path constraints.
23
+ */
24
+ type SnapshotContentMode = "full" | "filesystem_only";
14
25
  declare enum ProcessStatus {
15
26
  RUNNING = "running",
16
27
  EXITED = "exited",
@@ -39,7 +50,7 @@ interface NetworkConfig {
39
50
  denyOut: string[];
40
51
  }
41
52
  interface CreateSandboxOptions {
42
- /** Optional sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. When omitted, Tensorlake uses the default managed environment. */
53
+ /** Optional sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. When omitted, Tensorlake uses the default managed environment. */
43
54
  image?: string;
44
55
  cpus?: number;
45
56
  memoryMb?: number;
@@ -106,12 +117,20 @@ interface SnapshotInfo {
106
117
  sizeBytes?: number;
107
118
  createdAt?: Date;
108
119
  }
109
- interface SnapshotAndWaitOptions {
120
+ interface SnapshotOptions {
121
+ /**
122
+ * Optional content mode for the snapshot. When omitted the server picks
123
+ * its default. Use `"filesystem_only"` for snapshots intended for sandbox
124
+ * image builds so that restored sandboxes cold-boot.
125
+ */
126
+ contentMode?: SnapshotContentMode;
127
+ }
128
+ interface SnapshotAndWaitOptions extends SnapshotOptions {
110
129
  timeout?: number;
111
130
  pollInterval?: number;
112
131
  }
113
132
  interface CreatePoolOptions {
114
- /** Sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. */
133
+ /** Sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. */
115
134
  image: string;
116
135
  cpus?: number;
117
136
  memoryMb?: number;
@@ -123,7 +142,7 @@ interface CreatePoolOptions {
123
142
  warmContainers?: number;
124
143
  }
125
144
  interface UpdatePoolOptions {
126
- /** Sandbox image name, such as `ubuntu-minimal` or a registered Sandbox Image. */
145
+ /** Sandbox image name, such as `tensorlake/ubuntu-minimal` or a registered Sandbox Image. */
127
146
  image: string;
128
147
  cpus?: number;
129
148
  memoryMb?: number;
@@ -353,6 +372,7 @@ interface BuildClient {
353
372
  snapshotAndWait(sandboxId: string, options?: {
354
373
  timeout?: number;
355
374
  pollInterval?: number;
375
+ contentMode?: SnapshotContentMode;
356
376
  }): Promise<SnapshotInfo>;
357
377
  close(): void;
358
378
  }
@@ -372,4 +392,4 @@ declare function loadImagePlan(image: Image, options?: Pick<CreateSandboxImageOp
372
392
  declare function createSandboxImage(source: SandboxImageSource, options?: CreateSandboxImageOptions, deps?: CreateSandboxImageDeps): Promise<Record<string, unknown>>;
373
393
  declare function runCreateSandboxImageCli(argv?: string[]): Promise<void>;
374
394
 
375
- export { type ImageOptions as A, OutputMode as B, type CreatePtySessionOptions as C, type DaemonInfo as D, type PoolContainerInfo as E, ProcessStatus as F, type SandboxImageSource as G, type HealthResponse as H, Image as I, SandboxStatus as J, SnapshotStatus as K, type ListDirectoryResponse as L, StdinMode as M, type NetworkConfig as N, type OutputResponse as O, type ProcessInfo as P, createSandboxImage as Q, type RunOptions as R, type SandboxOptions as S, dockerfileContent as T, type UpdateSandboxOptions as U, defaultRegisteredName as V, loadDockerfilePlan as W, loadImagePlan as X, logicalDockerfileLines as Y, runCreateSandboxImageCli as Z, type CommandResult as a, type StartProcessOptions as b, type SendSignalResponse as c, type OutputEvent as d, type PtySessionInfo as e, type SandboxClientOptions as f, type CreateSandboxOptions as g, type CreateSandboxResponse as h, type SandboxInfo as i, type SandboxPortAccess as j, type CreateSnapshotResponse as k, type SnapshotInfo as l, type SnapshotAndWaitOptions as m, type CreatePoolOptions as n, type CreateSandboxPoolResponse as o, type SandboxPoolInfo as p, type UpdatePoolOptions as q, type CreateAndConnectOptions as r, type ContainerResourcesInfo as s, ContainerState as t, type CreateSandboxImageOptions as u, type DirectoryEntry as v, type DockerfileBuildPlan as w, type DockerfileInstruction as x, type ImageBuildOperation as y, ImageBuildOperationType as z };
395
+ export { runCreateSandboxImageCli as $, ImageBuildOperationType as A, type ImageOptions as B, type CreatePtySessionOptions as C, type DaemonInfo as D, OutputMode as E, type PoolContainerInfo as F, ProcessStatus as G, type HealthResponse as H, Image as I, type SandboxImageSource as J, SandboxStatus as K, type ListDirectoryResponse as L, type SnapshotContentMode as M, type NetworkConfig as N, type OutputResponse as O, type ProcessInfo as P, SnapshotStatus as Q, type RunOptions as R, type SandboxOptions as S, StdinMode as T, type UpdateSandboxOptions as U, createSandboxImage as V, dockerfileContent as W, defaultRegisteredName as X, loadDockerfilePlan as Y, loadImagePlan as Z, logicalDockerfileLines as _, type CommandResult as a, type StartProcessOptions as b, type SendSignalResponse as c, type OutputEvent as d, type PtySessionInfo as e, type SandboxClientOptions as f, type CreateSandboxOptions as g, type CreateSandboxResponse as h, type SandboxInfo as i, type SandboxPortAccess as j, type SnapshotOptions as k, type CreateSnapshotResponse as l, type SnapshotInfo as m, type SnapshotAndWaitOptions as n, type CreatePoolOptions as o, type CreateSandboxPoolResponse as p, type SandboxPoolInfo as q, type UpdatePoolOptions as r, type CreateAndConnectOptions as s, type ContainerResourcesInfo as t, ContainerState as u, type CreateSandboxImageOptions as v, type DirectoryEntry as w, type DockerfileBuildPlan as x, type DockerfileInstruction as y, type ImageBuildOperation as z };