tensorlake 0.5.11 → 0.5.13
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 +41 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +41 -1
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-B8kFWVLi.d.cts → sandbox-image-BepgJl5u.d.cts} +18 -1
- package/dist/{sandbox-image-B8kFWVLi.d.ts → sandbox-image-BepgJl5u.d.ts} +18 -1
- package/dist/sandbox-image.cjs +41 -1
- 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 +41 -1
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +1 -1
|
@@ -121,6 +121,23 @@ interface SandboxPortAccess {
|
|
|
121
121
|
exposedPorts: number[];
|
|
122
122
|
sandboxUrl?: string;
|
|
123
123
|
}
|
|
124
|
+
/** Sandbox information plus the archival timestamp. */
|
|
125
|
+
interface ArchivedSandboxInfo extends SandboxInfo {
|
|
126
|
+
archivedAt: Date;
|
|
127
|
+
}
|
|
128
|
+
/** Pagination params for `listArchivedSandboxes`. */
|
|
129
|
+
interface ListArchivedSandboxesOptions {
|
|
130
|
+
limit?: number;
|
|
131
|
+
/** Base64-encoded pagination cursor returned by a prior call. */
|
|
132
|
+
cursor?: string;
|
|
133
|
+
/** Pagination direction. */
|
|
134
|
+
direction?: "forward" | "backward";
|
|
135
|
+
}
|
|
136
|
+
interface ListArchivedSandboxesResponse {
|
|
137
|
+
sandboxes: ArchivedSandboxInfo[];
|
|
138
|
+
prevCursor?: string;
|
|
139
|
+
nextCursor?: string;
|
|
140
|
+
}
|
|
124
141
|
interface CreateSnapshotResponse {
|
|
125
142
|
snapshotId: string;
|
|
126
143
|
status: SnapshotStatus;
|
|
@@ -447,4 +464,4 @@ declare function registerImage(context: BuildContext, name: string, dockerfile:
|
|
|
447
464
|
declare function createSandboxImage(source: SandboxImageSource, options?: CreateSandboxImageOptions, deps?: CreateSandboxImageDeps): Promise<Record<string, unknown>>;
|
|
448
465
|
declare function runCreateSandboxImageCli(argv?: string[]): Promise<void>;
|
|
449
466
|
|
|
450
|
-
export {
|
|
467
|
+
export { type SnapshotWaitCondition as $, type ArchivedSandboxInfo as A, type ContainerResourcesInfo as B, type CreatePtySessionOptions as C, type DaemonInfo as D, ContainerState as E, type CreateSandboxImageOptions as F, type DirectoryEntry as G, type HealthResponse as H, type DockerfileBuildPlan as I, type DockerfileInstruction as J, Image as K, type ListDirectoryResponse as L, type ImageBuildOperation as M, ImageBuildOperationType as N, type OutputResponse as O, type ProcessInfo as P, type ImageOptions as Q, type RunOptions as R, type SandboxOptions as S, type NetworkConfig as T, type UpdateSandboxOptions as U, OutputMode as V, type PoolContainerInfo as W, ProcessStatus as X, type SandboxImageSource as Y, SnapshotStatus as Z, type SnapshotType as _, type CreateAndConnectOptions as a, StdinMode as a0, createSandboxImage as a1, dockerfileContent as a2, type BuildContext as a3, defaultRegisteredName as a4, loadDockerfilePlan as a5, loadImagePlan as a6, logicalDockerfileLines as a7, registerImage as a8, runCreateSandboxImageCli as a9, type SandboxClientOptions as b, type ConnectOptions as c, type SnapshotInfo as d, type SandboxInfo as e, SandboxStatus as f, type SuspendResumeOptions as g, type CheckpointOptions as h, type CommandResult as i, type StartProcessOptions as j, type SendSignalResponse as k, type OutputEvent as l, type PtySessionInfo as m, type CreateSandboxOptions as n, type CreateSandboxResponse as o, type ListArchivedSandboxesOptions as p, type ListArchivedSandboxesResponse as q, type SandboxPortAccess as r, type SnapshotOptions as s, type CreateSnapshotResponse as t, type SnapshotAndWaitOptions as u, type CreatePoolOptions as v, type CreateSandboxPoolResponse as w, type SandboxPoolInfo as x, type UpdatePoolOptions as y, type CheckpointType as z };
|
|
@@ -121,6 +121,23 @@ interface SandboxPortAccess {
|
|
|
121
121
|
exposedPorts: number[];
|
|
122
122
|
sandboxUrl?: string;
|
|
123
123
|
}
|
|
124
|
+
/** Sandbox information plus the archival timestamp. */
|
|
125
|
+
interface ArchivedSandboxInfo extends SandboxInfo {
|
|
126
|
+
archivedAt: Date;
|
|
127
|
+
}
|
|
128
|
+
/** Pagination params for `listArchivedSandboxes`. */
|
|
129
|
+
interface ListArchivedSandboxesOptions {
|
|
130
|
+
limit?: number;
|
|
131
|
+
/** Base64-encoded pagination cursor returned by a prior call. */
|
|
132
|
+
cursor?: string;
|
|
133
|
+
/** Pagination direction. */
|
|
134
|
+
direction?: "forward" | "backward";
|
|
135
|
+
}
|
|
136
|
+
interface ListArchivedSandboxesResponse {
|
|
137
|
+
sandboxes: ArchivedSandboxInfo[];
|
|
138
|
+
prevCursor?: string;
|
|
139
|
+
nextCursor?: string;
|
|
140
|
+
}
|
|
124
141
|
interface CreateSnapshotResponse {
|
|
125
142
|
snapshotId: string;
|
|
126
143
|
status: SnapshotStatus;
|
|
@@ -447,4 +464,4 @@ declare function registerImage(context: BuildContext, name: string, dockerfile:
|
|
|
447
464
|
declare function createSandboxImage(source: SandboxImageSource, options?: CreateSandboxImageOptions, deps?: CreateSandboxImageDeps): Promise<Record<string, unknown>>;
|
|
448
465
|
declare function runCreateSandboxImageCli(argv?: string[]): Promise<void>;
|
|
449
466
|
|
|
450
|
-
export {
|
|
467
|
+
export { type SnapshotWaitCondition as $, type ArchivedSandboxInfo as A, type ContainerResourcesInfo as B, type CreatePtySessionOptions as C, type DaemonInfo as D, ContainerState as E, type CreateSandboxImageOptions as F, type DirectoryEntry as G, type HealthResponse as H, type DockerfileBuildPlan as I, type DockerfileInstruction as J, Image as K, type ListDirectoryResponse as L, type ImageBuildOperation as M, ImageBuildOperationType as N, type OutputResponse as O, type ProcessInfo as P, type ImageOptions as Q, type RunOptions as R, type SandboxOptions as S, type NetworkConfig as T, type UpdateSandboxOptions as U, OutputMode as V, type PoolContainerInfo as W, ProcessStatus as X, type SandboxImageSource as Y, SnapshotStatus as Z, type SnapshotType as _, type CreateAndConnectOptions as a, StdinMode as a0, createSandboxImage as a1, dockerfileContent as a2, type BuildContext as a3, defaultRegisteredName as a4, loadDockerfilePlan as a5, loadImagePlan as a6, logicalDockerfileLines as a7, registerImage as a8, runCreateSandboxImageCli as a9, type SandboxClientOptions as b, type ConnectOptions as c, type SnapshotInfo as d, type SandboxInfo as e, SandboxStatus as f, type SuspendResumeOptions as g, type CheckpointOptions as h, type CommandResult as i, type StartProcessOptions as j, type SendSignalResponse as k, type OutputEvent as l, type PtySessionInfo as m, type CreateSandboxOptions as n, type CreateSandboxResponse as o, type ListArchivedSandboxesOptions as p, type ListArchivedSandboxesResponse as q, type SandboxPortAccess as r, type SnapshotOptions as s, type CreateSnapshotResponse as t, type SnapshotAndWaitOptions as u, type CreatePoolOptions as v, type CreateSandboxPoolResponse as w, type SandboxPoolInfo as x, type UpdatePoolOptions as y, type CheckpointType as z };
|
package/dist/sandbox-image.cjs
CHANGED
|
@@ -83,7 +83,7 @@ var SDK_VERSION, API_URL, API_KEY, NAMESPACE, SANDBOX_PROXY_URL, DEFAULT_HTTP_TI
|
|
|
83
83
|
var init_defaults = __esm({
|
|
84
84
|
"src/defaults.ts"() {
|
|
85
85
|
"use strict";
|
|
86
|
-
SDK_VERSION = "0.5.
|
|
86
|
+
SDK_VERSION = "0.5.13";
|
|
87
87
|
API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
|
|
88
88
|
API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
|
|
89
89
|
NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
|
|
@@ -3911,6 +3911,46 @@ var init_client = __esm({
|
|
|
3911
3911
|
);
|
|
3912
3912
|
return Object.assign(sandboxes, { traceId: raw.traceId });
|
|
3913
3913
|
}
|
|
3914
|
+
/**
|
|
3915
|
+
* List archived (terminated) sandboxes in the namespace.
|
|
3916
|
+
*
|
|
3917
|
+
* Archived sandboxes are terminated sandboxes parked in the server's
|
|
3918
|
+
* archived sandboxes store until the server-configured TTL expires.
|
|
3919
|
+
*/
|
|
3920
|
+
async listArchived(options) {
|
|
3921
|
+
const query = [];
|
|
3922
|
+
if (options?.limit != null) {
|
|
3923
|
+
query.push(`limit=${encodeURIComponent(String(options.limit))}`);
|
|
3924
|
+
}
|
|
3925
|
+
if (options?.cursor != null) {
|
|
3926
|
+
query.push(`cursor=${encodeURIComponent(options.cursor)}`);
|
|
3927
|
+
}
|
|
3928
|
+
if (options?.direction != null) {
|
|
3929
|
+
query.push(`direction=${encodeURIComponent(options.direction)}`);
|
|
3930
|
+
}
|
|
3931
|
+
const suffix = query.length ? `?${query.join("&")}` : "";
|
|
3932
|
+
const raw = await this.http.requestJson("GET", this.path(`archived-sandboxes${suffix}`));
|
|
3933
|
+
const sandboxes = (raw.sandboxes ?? []).map(
|
|
3934
|
+
(s) => fromSnakeKeys(s, "sandboxId")
|
|
3935
|
+
);
|
|
3936
|
+
const response = {
|
|
3937
|
+
sandboxes,
|
|
3938
|
+
prevCursor: raw.prev_cursor,
|
|
3939
|
+
nextCursor: raw.next_cursor
|
|
3940
|
+
};
|
|
3941
|
+
return Object.assign(response, { traceId: raw.traceId });
|
|
3942
|
+
}
|
|
3943
|
+
/** Get a single archived sandbox by id. */
|
|
3944
|
+
async getArchived(sandboxId) {
|
|
3945
|
+
const raw = await this.http.requestJson(
|
|
3946
|
+
"GET",
|
|
3947
|
+
this.path(`archived-sandboxes/${encodeURIComponent(sandboxId)}`)
|
|
3948
|
+
);
|
|
3949
|
+
return Object.assign(
|
|
3950
|
+
fromSnakeKeys(raw, "sandboxId"),
|
|
3951
|
+
{ traceId: raw.traceId }
|
|
3952
|
+
);
|
|
3953
|
+
}
|
|
3914
3954
|
/** Update sandbox properties such as name, exposed ports, and proxy auth settings. */
|
|
3915
3955
|
async update(sandboxId, options) {
|
|
3916
3956
|
const body = {};
|