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.
- 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 +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-DKPhc4Lv.d.cts → sandbox-image-Dr9SQaCc.d.cts} +22 -2
- package/dist/{sandbox-image-DKPhc4Lv.d.ts → sandbox-image-Dr9SQaCc.d.ts} +22 -2
- package/dist/sandbox-image.cjs +10 -4
- 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 +10 -4
- 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, R as RunOptions, a as CommandResult, b as StartProcessOptions, P as ProcessInfo, c as SendSignalResponse, O as OutputResponse, d as OutputEvent, L as ListDirectoryResponse, e as PtySessionInfo, H as HealthResponse, D as DaemonInfo, f as SandboxClientOptions, g as CreateSandboxOptions, h as CreateSandboxResponse, i as SandboxInfo, U as UpdateSandboxOptions, j as SandboxPortAccess, k as
|
|
2
|
-
export {
|
|
1
|
+
import { C as CreatePtySessionOptions, S as SandboxOptions, R as RunOptions, a as CommandResult, b as StartProcessOptions, P as ProcessInfo, c as SendSignalResponse, O as OutputResponse, d as OutputEvent, L as ListDirectoryResponse, e as PtySessionInfo, H as HealthResponse, D as DaemonInfo, f as SandboxClientOptions, g as CreateSandboxOptions, h as CreateSandboxResponse, i as SandboxInfo, U as UpdateSandboxOptions, j as SandboxPortAccess, k as SnapshotOptions, l as CreateSnapshotResponse, m as SnapshotInfo, n as SnapshotAndWaitOptions, o as CreatePoolOptions, p as CreateSandboxPoolResponse, q as SandboxPoolInfo, r as UpdatePoolOptions, s as CreateAndConnectOptions } from './sandbox-image-Dr9SQaCc.cjs';
|
|
2
|
+
export { t as ContainerResourcesInfo, u as ContainerState, v as CreateSandboxImageOptions, w as DirectoryEntry, x as DockerfileBuildPlan, y as DockerfileInstruction, I as Image, z as ImageBuildOperation, A as ImageBuildOperationType, A as ImageBuildOperationTypeValue, B as ImageOptions, N as NetworkConfig, E as OutputMode, F as PoolContainerInfo, G as ProcessStatus, J as SandboxImageSource, K as SandboxStatus, M as SnapshotContentMode, Q as SnapshotStatus, T as StdinMode, V as createSandboxImage, W as dockerfileContent } from './sandbox-image-Dr9SQaCc.cjs';
|
|
3
3
|
|
|
4
4
|
type PtyDataHandler = (data: Uint8Array) => void;
|
|
5
5
|
type PtyExitHandler = (exitCode: number) => void;
|
|
@@ -136,7 +136,7 @@ declare class SandboxClient {
|
|
|
136
136
|
suspend(sandboxId: string): Promise<void>;
|
|
137
137
|
resume(sandboxId: string): Promise<void>;
|
|
138
138
|
claim(poolId: string): Promise<CreateSandboxResponse>;
|
|
139
|
-
snapshot(sandboxId: string): Promise<CreateSnapshotResponse>;
|
|
139
|
+
snapshot(sandboxId: string, options?: SnapshotOptions): Promise<CreateSnapshotResponse>;
|
|
140
140
|
getSnapshot(snapshotId: string): Promise<SnapshotInfo>;
|
|
141
141
|
listSnapshots(): Promise<SnapshotInfo[]>;
|
|
142
142
|
deleteSnapshot(snapshotId: string): Promise<void>;
|
|
@@ -395,4 +395,4 @@ declare class RequestExecutionError extends Error {
|
|
|
395
395
|
constructor(message: string, functionName?: string);
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type BinaryPayload, type BuildInfo, type BuildLogEntry, CloudClient, type CloudClientOptions, CommandResult, CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, CreatePoolOptions, type CreatePtyOptions, CreatePtySessionOptions, CreateSandboxOptions, CreateSandboxPoolResponse, CreateSandboxResponse, CreateSnapshotResponse, DaemonInfo, HealthResponse, ListDirectoryResponse, type NewSecret, OutputEvent, OutputResponse, PoolInUseError, PoolNotFoundError, ProcessInfo, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, RunOptions, Sandbox, SandboxClient, SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, SandboxInfo, SandboxNotFoundError, SandboxOptions, SandboxPoolInfo, SandboxPortAccess, type Secret, type SecretsList, type SecretsPagination, SendSignalResponse, SnapshotAndWaitOptions, SnapshotInfo, type StartImageBuildRequest, StartProcessOptions, UpdatePoolOptions, type UpsertSecretResponse };
|
|
398
|
+
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type BinaryPayload, type BuildInfo, type BuildLogEntry, CloudClient, type CloudClientOptions, CommandResult, CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, CreatePoolOptions, type CreatePtyOptions, CreatePtySessionOptions, CreateSandboxOptions, CreateSandboxPoolResponse, CreateSandboxResponse, CreateSnapshotResponse, DaemonInfo, HealthResponse, ListDirectoryResponse, type NewSecret, OutputEvent, OutputResponse, PoolInUseError, PoolNotFoundError, ProcessInfo, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, RunOptions, Sandbox, SandboxClient, SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, SandboxInfo, SandboxNotFoundError, SandboxOptions, SandboxPoolInfo, SandboxPortAccess, type Secret, type SecretsList, type SecretsPagination, SendSignalResponse, SnapshotAndWaitOptions, SnapshotInfo, SnapshotOptions, type StartImageBuildRequest, StartProcessOptions, UpdatePoolOptions, type UpsertSecretResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreatePtySessionOptions, S as SandboxOptions, R as RunOptions, a as CommandResult, b as StartProcessOptions, P as ProcessInfo, c as SendSignalResponse, O as OutputResponse, d as OutputEvent, L as ListDirectoryResponse, e as PtySessionInfo, H as HealthResponse, D as DaemonInfo, f as SandboxClientOptions, g as CreateSandboxOptions, h as CreateSandboxResponse, i as SandboxInfo, U as UpdateSandboxOptions, j as SandboxPortAccess, k as
|
|
2
|
-
export {
|
|
1
|
+
import { C as CreatePtySessionOptions, S as SandboxOptions, R as RunOptions, a as CommandResult, b as StartProcessOptions, P as ProcessInfo, c as SendSignalResponse, O as OutputResponse, d as OutputEvent, L as ListDirectoryResponse, e as PtySessionInfo, H as HealthResponse, D as DaemonInfo, f as SandboxClientOptions, g as CreateSandboxOptions, h as CreateSandboxResponse, i as SandboxInfo, U as UpdateSandboxOptions, j as SandboxPortAccess, k as SnapshotOptions, l as CreateSnapshotResponse, m as SnapshotInfo, n as SnapshotAndWaitOptions, o as CreatePoolOptions, p as CreateSandboxPoolResponse, q as SandboxPoolInfo, r as UpdatePoolOptions, s as CreateAndConnectOptions } from './sandbox-image-Dr9SQaCc.js';
|
|
2
|
+
export { t as ContainerResourcesInfo, u as ContainerState, v as CreateSandboxImageOptions, w as DirectoryEntry, x as DockerfileBuildPlan, y as DockerfileInstruction, I as Image, z as ImageBuildOperation, A as ImageBuildOperationType, A as ImageBuildOperationTypeValue, B as ImageOptions, N as NetworkConfig, E as OutputMode, F as PoolContainerInfo, G as ProcessStatus, J as SandboxImageSource, K as SandboxStatus, M as SnapshotContentMode, Q as SnapshotStatus, T as StdinMode, V as createSandboxImage, W as dockerfileContent } from './sandbox-image-Dr9SQaCc.js';
|
|
3
3
|
|
|
4
4
|
type PtyDataHandler = (data: Uint8Array) => void;
|
|
5
5
|
type PtyExitHandler = (exitCode: number) => void;
|
|
@@ -136,7 +136,7 @@ declare class SandboxClient {
|
|
|
136
136
|
suspend(sandboxId: string): Promise<void>;
|
|
137
137
|
resume(sandboxId: string): Promise<void>;
|
|
138
138
|
claim(poolId: string): Promise<CreateSandboxResponse>;
|
|
139
|
-
snapshot(sandboxId: string): Promise<CreateSnapshotResponse>;
|
|
139
|
+
snapshot(sandboxId: string, options?: SnapshotOptions): Promise<CreateSnapshotResponse>;
|
|
140
140
|
getSnapshot(snapshotId: string): Promise<SnapshotInfo>;
|
|
141
141
|
listSnapshots(): Promise<SnapshotInfo[]>;
|
|
142
142
|
deleteSnapshot(snapshotId: string): Promise<void>;
|
|
@@ -395,4 +395,4 @@ declare class RequestExecutionError extends Error {
|
|
|
395
395
|
constructor(message: string, functionName?: string);
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type BinaryPayload, type BuildInfo, type BuildLogEntry, CloudClient, type CloudClientOptions, CommandResult, CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, CreatePoolOptions, type CreatePtyOptions, CreatePtySessionOptions, CreateSandboxOptions, CreateSandboxPoolResponse, CreateSandboxResponse, CreateSnapshotResponse, DaemonInfo, HealthResponse, ListDirectoryResponse, type NewSecret, OutputEvent, OutputResponse, PoolInUseError, PoolNotFoundError, ProcessInfo, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, RunOptions, Sandbox, SandboxClient, SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, SandboxInfo, SandboxNotFoundError, SandboxOptions, SandboxPoolInfo, SandboxPortAccess, type Secret, type SecretsList, type SecretsPagination, SendSignalResponse, SnapshotAndWaitOptions, SnapshotInfo, type StartImageBuildRequest, StartProcessOptions, UpdatePoolOptions, type UpsertSecretResponse };
|
|
398
|
+
export { APIClient, type ApiKeyIntrospection, type ApplicationBuildContext, type ApplicationBuildImageResult, type ApplicationBuildResponse, type ApplicationManifest, type ApplicationSummary, type BinaryPayload, type BuildInfo, type BuildLogEntry, CloudClient, type CloudClientOptions, CommandResult, CreateAndConnectOptions, type CreateApplicationBuildImageRequest, type CreateApplicationBuildRequest, CreatePoolOptions, type CreatePtyOptions, CreatePtySessionOptions, CreateSandboxOptions, CreateSandboxPoolResponse, CreateSandboxResponse, CreateSnapshotResponse, DaemonInfo, HealthResponse, ListDirectoryResponse, type NewSecret, OutputEvent, OutputResponse, PoolInUseError, PoolNotFoundError, ProcessInfo, Pty, type PtyConnectionOptions, type PtyDataHandler, type PtyExitHandler, PtySessionInfo, RemoteAPIError, type RequestErrorInfo, RequestExecutionError, RequestFailedError, type RequestInput, type RequestMetadata, RequestNotFinishedError, type RequestOutput, RunOptions, Sandbox, SandboxClient, SandboxClientOptions, SandboxConnectionError, SandboxError, SandboxException, SandboxInfo, SandboxNotFoundError, SandboxOptions, SandboxPoolInfo, SandboxPortAccess, type Secret, type SecretsList, type SecretsPagination, SendSignalResponse, SnapshotAndWaitOptions, SnapshotInfo, SnapshotOptions, type StartImageBuildRequest, StartProcessOptions, UpdatePoolOptions, type UpsertSecretResponse };
|
package/dist/index.js
CHANGED
|
@@ -1149,10 +1149,12 @@ var SandboxClient = class _SandboxClient {
|
|
|
1149
1149
|
return fromSnakeKeys(raw, "sandboxId");
|
|
1150
1150
|
}
|
|
1151
1151
|
// --- Snapshots ---
|
|
1152
|
-
async snapshot(sandboxId) {
|
|
1152
|
+
async snapshot(sandboxId, options) {
|
|
1153
|
+
const requestOptions = options?.contentMode != null ? { body: { snapshot_content_mode: options.contentMode } } : void 0;
|
|
1153
1154
|
const raw = await this.http.requestJson(
|
|
1154
1155
|
"POST",
|
|
1155
|
-
this.path(`sandboxes/${sandboxId}/snapshot`)
|
|
1156
|
+
this.path(`sandboxes/${sandboxId}/snapshot`),
|
|
1157
|
+
requestOptions
|
|
1156
1158
|
);
|
|
1157
1159
|
return fromSnakeKeys(raw, "snapshotId");
|
|
1158
1160
|
}
|
|
@@ -1181,7 +1183,9 @@ var SandboxClient = class _SandboxClient {
|
|
|
1181
1183
|
async snapshotAndWait(sandboxId, options) {
|
|
1182
1184
|
const timeout = options?.timeout ?? 300;
|
|
1183
1185
|
const pollInterval = options?.pollInterval ?? 1;
|
|
1184
|
-
const result = await this.snapshot(sandboxId
|
|
1186
|
+
const result = await this.snapshot(sandboxId, {
|
|
1187
|
+
contentMode: options?.contentMode
|
|
1188
|
+
});
|
|
1185
1189
|
const deadline = Date.now() + timeout * 1e3;
|
|
1186
1190
|
while (Date.now() < deadline) {
|
|
1187
1191
|
const info = await this.getSnapshot(result.snapshotId);
|
|
@@ -2502,7 +2506,9 @@ async function createSandboxImage(source, options = {}, deps = {}) {
|
|
|
2502
2506
|
});
|
|
2503
2507
|
await executeDockerfilePlan(sandbox, plan, emit, sleep4);
|
|
2504
2508
|
emit({ type: "status", message: "Creating snapshot..." });
|
|
2505
|
-
const snapshot = await client.snapshotAndWait(sandbox.sandboxId
|
|
2509
|
+
const snapshot = await client.snapshotAndWait(sandbox.sandboxId, {
|
|
2510
|
+
contentMode: "filesystem_only"
|
|
2511
|
+
});
|
|
2506
2512
|
emit({
|
|
2507
2513
|
type: "snapshot_created",
|
|
2508
2514
|
snapshot_id: snapshot.snapshotId,
|