@tensorlakeai/tensorlake 0.5.150 → 0.5.152
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/README.md +8 -0
- package/dist/applications/index.cjs +14 -3
- package/dist/applications/index.cjs.map +1 -1
- package/dist/applications/index.d.cts +3 -3
- package/dist/applications/index.d.ts +3 -3
- package/dist/applications/index.js +14 -3
- package/dist/applications/index.js.map +1 -1
- package/dist/function-agent/main.cjs +1 -1
- package/dist/function-agent/main.cjs.map +1 -1
- package/dist/function-agent/main.js +1 -1
- package/dist/function-agent/main.js.map +1 -1
- package/dist/function-executor/main.cjs +2 -2
- package/dist/function-executor/main.cjs.map +1 -1
- package/dist/function-executor/main.js +2 -2
- package/dist/function-executor/main.js.map +1 -1
- package/dist/index.cjs +53 -190
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -9
- package/dist/index.d.ts +5 -9
- package/dist/index.js +52 -189
- package/dist/index.js.map +1 -1
- package/dist/{remote-dblFxKug.d.ts → remote-BbSrvgUn.d.ts} +1 -1
- package/dist/{remote-CNJ9TmcQ.d.cts → remote-CC48cvYP.d.cts} +1 -1
- package/dist/{sandbox-image-ChzWDeZy.d.cts → sandbox-image-CAK_K7ND.d.cts} +14 -0
- package/dist/{sandbox-image-ChzWDeZy.d.ts → sandbox-image-CAK_K7ND.d.ts} +14 -0
- package/dist/sandbox-image.cjs +14 -3
- 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 +14 -3
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +8 -7
- package/runtime/function-executor/manifest.json +7 -7
- package/runtime/function-executor/package/dist/function-executor/main.js +2 -2
- package/runtime/function-executor/package/dist/function-executor/main.js.map +1 -1
- package/runtime/function-executor/package/npm-shrinkwrap.json +2 -2
- package/runtime/function-executor/package/package.json +1 -1
- package/runtime/typescript-function-runner/manifest.json +7 -7
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js +1 -1
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js.map +1 -1
- package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +26 -26
- package/runtime/typescript-function-runner/package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CloudClientOptions, A as ApplicationManifest, F as FileSystem, a as ApplicationSummary, R as RequestInput, b as RequestOutput, I as Image } from './sandbox-image-
|
|
1
|
+
import { C as CloudClientOptions, A as ApplicationManifest, F as FileSystem, a as ApplicationSummary, R as RequestInput, b as RequestOutput, I as Image } from './sandbox-image-CAK_K7ND.js';
|
|
2
2
|
|
|
3
3
|
declare class APIClient {
|
|
4
4
|
private readonly cloudClient;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CloudClientOptions, A as ApplicationManifest, F as FileSystem, a as ApplicationSummary, R as RequestInput, b as RequestOutput, I as Image } from './sandbox-image-
|
|
1
|
+
import { C as CloudClientOptions, A as ApplicationManifest, F as FileSystem, a as ApplicationSummary, R as RequestInput, b as RequestOutput, I as Image } from './sandbox-image-CAK_K7ND.cjs';
|
|
2
2
|
|
|
3
3
|
declare class APIClient {
|
|
4
4
|
private readonly cloudClient;
|
|
@@ -218,6 +218,12 @@ declare function dockerfileContent(image: Image): string;
|
|
|
218
218
|
* (`ONBUILD`/`SHELL`/`EXPOSE`/`HEALTHCHECK`/`LABEL`/`STOPSIGNAL`/`VOLUME`).
|
|
219
219
|
*/
|
|
220
220
|
interface CreateSandboxImageOptions {
|
|
221
|
+
/**
|
|
222
|
+
* Docker config JSON contents for this call, including credential helpers.
|
|
223
|
+
* Omit to discover local Docker config at the start of the operation.
|
|
224
|
+
* Pass "{}" to disable discovery and use no registry credentials.
|
|
225
|
+
*/
|
|
226
|
+
dockerConfigJson?: string;
|
|
221
227
|
registeredName?: string;
|
|
222
228
|
cpus?: number;
|
|
223
229
|
memoryMb?: number;
|
|
@@ -247,6 +253,12 @@ interface CreateSandboxImageOptions {
|
|
|
247
253
|
verbose?: boolean;
|
|
248
254
|
}
|
|
249
255
|
interface ImportSandboxImageOptions {
|
|
256
|
+
/**
|
|
257
|
+
* Docker config JSON contents for this call, including credential helpers.
|
|
258
|
+
* Omit to discover local Docker config at the start of the operation.
|
|
259
|
+
* Pass "{}" to disable discovery and use no registry credentials.
|
|
260
|
+
*/
|
|
261
|
+
dockerConfigJson?: string;
|
|
250
262
|
/**
|
|
251
263
|
* Name to register the image under. Defaults to the image reference's last
|
|
252
264
|
* path segment with any tag/digest stripped (e.g. `pytorch/pytorch:2.4.1`
|
|
@@ -291,6 +303,7 @@ interface NativeBindingCommonOptions {
|
|
|
291
303
|
useScopeHeaders?: boolean | undefined | null;
|
|
292
304
|
userAgent?: string | undefined | null;
|
|
293
305
|
dockerCompat?: boolean | undefined | null;
|
|
306
|
+
dockerConfigJson?: string | undefined | null;
|
|
294
307
|
}
|
|
295
308
|
interface NativeBindingOptions extends NativeBindingCommonOptions {
|
|
296
309
|
dockerfilePath: string;
|
|
@@ -306,6 +319,7 @@ interface NativeBindingEvent {
|
|
|
306
319
|
message: string;
|
|
307
320
|
}
|
|
308
321
|
interface NativeBinding {
|
|
322
|
+
loadDockerConfigJson(): string;
|
|
309
323
|
buildSandboxImage(options: NativeBindingOptions, emit?: ((event: NativeBindingEvent) => void) | null | undefined): Promise<string>;
|
|
310
324
|
importSandboxImage(options: NativeBindingImportOptions, emit?: ((event: NativeBindingEvent) => void) | null | undefined): Promise<string>;
|
|
311
325
|
}
|
|
@@ -218,6 +218,12 @@ declare function dockerfileContent(image: Image): string;
|
|
|
218
218
|
* (`ONBUILD`/`SHELL`/`EXPOSE`/`HEALTHCHECK`/`LABEL`/`STOPSIGNAL`/`VOLUME`).
|
|
219
219
|
*/
|
|
220
220
|
interface CreateSandboxImageOptions {
|
|
221
|
+
/**
|
|
222
|
+
* Docker config JSON contents for this call, including credential helpers.
|
|
223
|
+
* Omit to discover local Docker config at the start of the operation.
|
|
224
|
+
* Pass "{}" to disable discovery and use no registry credentials.
|
|
225
|
+
*/
|
|
226
|
+
dockerConfigJson?: string;
|
|
221
227
|
registeredName?: string;
|
|
222
228
|
cpus?: number;
|
|
223
229
|
memoryMb?: number;
|
|
@@ -247,6 +253,12 @@ interface CreateSandboxImageOptions {
|
|
|
247
253
|
verbose?: boolean;
|
|
248
254
|
}
|
|
249
255
|
interface ImportSandboxImageOptions {
|
|
256
|
+
/**
|
|
257
|
+
* Docker config JSON contents for this call, including credential helpers.
|
|
258
|
+
* Omit to discover local Docker config at the start of the operation.
|
|
259
|
+
* Pass "{}" to disable discovery and use no registry credentials.
|
|
260
|
+
*/
|
|
261
|
+
dockerConfigJson?: string;
|
|
250
262
|
/**
|
|
251
263
|
* Name to register the image under. Defaults to the image reference's last
|
|
252
264
|
* path segment with any tag/digest stripped (e.g. `pytorch/pytorch:2.4.1`
|
|
@@ -291,6 +303,7 @@ interface NativeBindingCommonOptions {
|
|
|
291
303
|
useScopeHeaders?: boolean | undefined | null;
|
|
292
304
|
userAgent?: string | undefined | null;
|
|
293
305
|
dockerCompat?: boolean | undefined | null;
|
|
306
|
+
dockerConfigJson?: string | undefined | null;
|
|
294
307
|
}
|
|
295
308
|
interface NativeBindingOptions extends NativeBindingCommonOptions {
|
|
296
309
|
dockerfilePath: string;
|
|
@@ -306,6 +319,7 @@ interface NativeBindingEvent {
|
|
|
306
319
|
message: string;
|
|
307
320
|
}
|
|
308
321
|
interface NativeBinding {
|
|
322
|
+
loadDockerConfigJson(): string;
|
|
309
323
|
buildSandboxImage(options: NativeBindingOptions, emit?: ((event: NativeBindingEvent) => void) | null | undefined): Promise<string>;
|
|
310
324
|
importSandboxImage(options: NativeBindingImportOptions, emit?: ((event: NativeBindingEvent) => void) | null | undefined): Promise<string>;
|
|
311
325
|
}
|
package/dist/sandbox-image.cjs
CHANGED
|
@@ -49,7 +49,7 @@ var init_defaults = __esm({
|
|
|
49
49
|
"src/defaults.ts"() {
|
|
50
50
|
"use strict";
|
|
51
51
|
init_cjs_shims();
|
|
52
|
-
SDK_VERSION = "0.5.
|
|
52
|
+
SDK_VERSION = "0.5.152";
|
|
53
53
|
API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
|
|
54
54
|
API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
|
|
55
55
|
NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
|
|
@@ -322,6 +322,11 @@ function createWorkerBinding(runtime) {
|
|
|
322
322
|
return runtime.handle("NativeRepositoryClient", args);
|
|
323
323
|
}
|
|
324
324
|
},
|
|
325
|
+
NativeTcpTunnel: class {
|
|
326
|
+
constructor() {
|
|
327
|
+
return runtime.handle("NativeTcpTunnel", []);
|
|
328
|
+
}
|
|
329
|
+
},
|
|
325
330
|
validateManagedName: (name) => runtime.call(void 0, "validateManagedName", [name])
|
|
326
331
|
};
|
|
327
332
|
}
|
|
@@ -501,7 +506,7 @@ var init_native_worker_client = __esm({
|
|
|
501
506
|
}
|
|
502
507
|
};
|
|
503
508
|
runtimeKey = /* @__PURE__ */ Symbol.for(
|
|
504
|
-
`tensorlake.native.worker.${false ? "source" : "0.5.
|
|
509
|
+
`tensorlake.native.worker.${false ? "source" : "0.5.152"}.v1`
|
|
505
510
|
);
|
|
506
511
|
runtimes = globalThis;
|
|
507
512
|
}
|
|
@@ -1692,6 +1697,7 @@ async function createSandboxImage(source, options = {}, deps = {}) {
|
|
|
1692
1697
|
useScopeHeaders: usePat,
|
|
1693
1698
|
userAgent: void 0,
|
|
1694
1699
|
dockerCompat: options.dockerCompat ?? false,
|
|
1700
|
+
dockerConfigJson: options.dockerConfigJson,
|
|
1695
1701
|
dockerfileText,
|
|
1696
1702
|
contextDir: nativeContextDir
|
|
1697
1703
|
},
|
|
@@ -1770,7 +1776,8 @@ async function importSandboxImage(imageReference, options = {}, deps = {}) {
|
|
|
1770
1776
|
namespace: context.namespace,
|
|
1771
1777
|
useScopeHeaders: usePat,
|
|
1772
1778
|
userAgent: void 0,
|
|
1773
|
-
dockerCompat: options.dockerCompat ?? false
|
|
1779
|
+
dockerCompat: options.dockerCompat ?? false,
|
|
1780
|
+
dockerConfigJson: options.dockerConfigJson
|
|
1774
1781
|
},
|
|
1775
1782
|
(event) => {
|
|
1776
1783
|
try {
|
|
@@ -1905,10 +1912,12 @@ async function runCreateSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
1905
1912
|
`Invalid --builder_disk_mb value: ${parsed.values.builder_disk_mb}`
|
|
1906
1913
|
);
|
|
1907
1914
|
}
|
|
1915
|
+
const dockerConfigJson = loadNativeBinding().loadDockerConfigJson();
|
|
1908
1916
|
await createSandboxImage(
|
|
1909
1917
|
dockerfilePath,
|
|
1910
1918
|
{
|
|
1911
1919
|
registeredName: parsed.values.name,
|
|
1920
|
+
dockerConfigJson,
|
|
1912
1921
|
cpus,
|
|
1913
1922
|
memoryMb,
|
|
1914
1923
|
diskMb,
|
|
@@ -1957,10 +1966,12 @@ async function runImportSandboxImageCli(argv = process.argv.slice(2)) {
|
|
|
1957
1966
|
`Invalid --builder_disk_mb value: ${parsed.values.builder_disk_mb}`
|
|
1958
1967
|
);
|
|
1959
1968
|
}
|
|
1969
|
+
const dockerConfigJson = loadNativeBinding().loadDockerConfigJson();
|
|
1960
1970
|
await importSandboxImage(
|
|
1961
1971
|
imageReference,
|
|
1962
1972
|
{
|
|
1963
1973
|
registeredName: parsed.values.name,
|
|
1974
|
+
dockerConfigJson,
|
|
1964
1975
|
cpus,
|
|
1965
1976
|
memoryMb,
|
|
1966
1977
|
diskMb,
|