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/bin/darwin-arm64/tensorlake +0 -0
- package/dist/bin/darwin-arm64/tl +0 -0
- package/dist/bin/linux-x64/tensorlake +0 -0
- package/dist/bin/linux-x64/tl +0 -0
- package/dist/bin/win32-x64/tensorlake.exe +0 -0
- package/dist/bin/win32-x64/tl.exe +0 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-B0WMhyoM.d.cts → sandbox-image-BmhjX2bC.d.cts} +22 -12
- package/dist/{sandbox-image-B0WMhyoM.d.ts → sandbox-image-BmhjX2bC.d.ts} +22 -12
- package/dist/sandbox-image.cjs +8 -8
- package/dist/sandbox-image.cjs.map +1 -1
- package/dist/sandbox-image.d.cts +1 -1
- package/dist/sandbox-image.d.ts +1 -1
- package/dist/sandbox-image.js +8 -8
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +1 -1
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-
|
|
2
|
-
export { x as
|
|
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.
|
|
407
|
-
* Omit to use the server default (
|
|
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.
|
|
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-
|
|
2
|
-
export { x as
|
|
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.
|
|
407
|
-
* Omit to use the server default (
|
|
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.
|
|
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, {
|
|
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
|
-
|
|
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.
|
|
4009
|
-
* Omit to use the server default (
|
|
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?.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
5058
|
+
snapshotType: "filesystem"
|
|
5059
5059
|
});
|
|
5060
5060
|
emit({
|
|
5061
5061
|
type: "snapshot_created",
|