tensorlake 0.4.47 → 0.4.48
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 +23 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +27 -21
- package/dist/index.js.map +1 -1
- package/dist/{sandbox-image-B130uMYt.d.cts → sandbox-image-BQ6fJT92.d.cts} +1 -0
- package/dist/{sandbox-image-B130uMYt.d.ts → sandbox-image-BQ6fJT92.d.ts} +1 -0
- package/dist/sandbox-image.cjs +23 -21
- 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 +27 -21
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +3 -2
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 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-
|
|
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-
|
|
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-BQ6fJT92.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-BQ6fJT92.cjs';
|
|
3
3
|
|
|
4
4
|
type MouseButton = "left" | "middle" | "right";
|
|
5
5
|
interface ConnectDesktopOptions {
|
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 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-
|
|
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-
|
|
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-BQ6fJT92.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-BQ6fJT92.js';
|
|
3
3
|
|
|
4
4
|
type MouseButton = "left" | "middle" | "right";
|
|
5
5
|
interface ConnectDesktopOptions {
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,17 @@ var RequestExecutionError = class extends Error {
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
// src/http.ts
|
|
91
|
+
import {
|
|
92
|
+
Agent,
|
|
93
|
+
fetch as undiciFetch,
|
|
94
|
+
setGlobalDispatcher
|
|
95
|
+
} from "undici";
|
|
96
|
+
setGlobalDispatcher(
|
|
97
|
+
new Agent({
|
|
98
|
+
keepAliveTimeout: 6e4,
|
|
99
|
+
allowH2: true
|
|
100
|
+
})
|
|
101
|
+
);
|
|
91
102
|
var HttpClient = class {
|
|
92
103
|
baseUrl;
|
|
93
104
|
headers;
|
|
@@ -139,31 +150,26 @@ var HttpClient = class {
|
|
|
139
150
|
if (options?.contentType) {
|
|
140
151
|
headers["Content-Type"] = options.contentType;
|
|
141
152
|
}
|
|
142
|
-
const response = await this.requestResponse(
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
headers,
|
|
148
|
-
signal: options?.signal
|
|
149
|
-
}
|
|
150
|
-
);
|
|
153
|
+
const response = await this.requestResponse(method, path2, {
|
|
154
|
+
body: options?.body,
|
|
155
|
+
headers,
|
|
156
|
+
signal: options?.signal
|
|
157
|
+
});
|
|
151
158
|
const buffer = await response.arrayBuffer();
|
|
152
159
|
return new Uint8Array(buffer);
|
|
153
160
|
}
|
|
154
161
|
/** Make a request and return the response body as an SSE stream. */
|
|
155
162
|
async requestStream(method, path2, options) {
|
|
156
|
-
const response = await this.requestResponse(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
headers: { Accept: "text/event-stream" },
|
|
162
|
-
signal: options?.signal
|
|
163
|
-
}
|
|
164
|
-
);
|
|
163
|
+
const response = await this.requestResponse(method, path2, {
|
|
164
|
+
json: options?.json,
|
|
165
|
+
headers: { Accept: "text/event-stream" },
|
|
166
|
+
signal: options?.signal
|
|
167
|
+
});
|
|
165
168
|
if (!response.body) {
|
|
166
|
-
throw new RemoteAPIError(
|
|
169
|
+
throw new RemoteAPIError(
|
|
170
|
+
response.status,
|
|
171
|
+
"No response body for SSE stream"
|
|
172
|
+
);
|
|
167
173
|
}
|
|
168
174
|
return response.body;
|
|
169
175
|
}
|
|
@@ -202,7 +208,7 @@ var HttpClient = class {
|
|
|
202
208
|
);
|
|
203
209
|
const combinedSignal = signal ? anySignal([signal, this.abortController.signal]) : this.abortController.signal;
|
|
204
210
|
try {
|
|
205
|
-
const response = await
|
|
211
|
+
const response = await undiciFetch(url, {
|
|
206
212
|
method,
|
|
207
213
|
headers,
|
|
208
214
|
body,
|
|
@@ -3714,7 +3720,7 @@ var SandboxClient = class _SandboxClient {
|
|
|
3714
3720
|
while (Date.now() < deadline) {
|
|
3715
3721
|
const info = await this.get(result.sandboxId);
|
|
3716
3722
|
if (info.status === "running" /* RUNNING */) {
|
|
3717
|
-
const sandbox = this.connect(result.sandboxId, options?.proxyUrl);
|
|
3723
|
+
const sandbox = this.connect(result.sandboxId, options?.proxyUrl, info.routingHint);
|
|
3718
3724
|
sandbox._setOwner(this);
|
|
3719
3725
|
return sandbox;
|
|
3720
3726
|
}
|