@tensorlakeai/tensorlake 0.5.161 → 0.5.163
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/applications/index.cjs +26 -5
- 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 +26 -5
- package/dist/applications/index.js.map +1 -1
- package/dist/function-agent/main.cjs +18 -4
- package/dist/function-agent/main.cjs.map +1 -1
- package/dist/function-agent/main.js +18 -4
- package/dist/function-agent/main.js.map +1 -1
- package/dist/function-executor/main.cjs +5 -2
- package/dist/function-executor/main.cjs.map +1 -1
- package/dist/function-executor/main.js +5 -2
- package/dist/function-executor/main.js.map +1 -1
- package/dist/index.cjs +47 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +47 -12
- package/dist/index.js.map +1 -1
- package/dist/native-worker.cjs +12 -3
- package/dist/native-worker.cjs.map +1 -1
- package/dist/native-worker.js +12 -3
- package/dist/native-worker.js.map +1 -1
- package/dist/{remote-DYBXCTNC.d.ts → remote-BMibssYe.d.ts} +29 -29
- package/dist/{remote-CEs4GFGP.d.cts → remote-BzVx-ai8.d.cts} +29 -29
- package/dist/sandbox-image.cjs +12 -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 +12 -3
- package/dist/sandbox-image.js.map +1 -1
- package/package.json +14 -9
- package/runtime/function-executor/manifest.json +13 -13
- package/runtime/function-executor/package/dist/function-executor/main.js +5 -2
- package/runtime/function-executor/package/dist/function-executor/main.js.map +1 -1
- package/runtime/function-executor/package/dist/native-worker.cjs +12 -3
- package/runtime/function-executor/package/dist/native-worker.cjs.map +1 -1
- package/runtime/function-executor/package/npm-shrinkwrap.json +27 -27
- package/runtime/function-executor/package/package.json +4 -4
- package/runtime/typescript-function-runner/manifest.json +13 -13
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js +18 -4
- package/runtime/typescript-function-runner/package/dist/function-agent/main.js.map +1 -1
- package/runtime/typescript-function-runner/package/dist/native-worker.cjs +12 -3
- package/runtime/typescript-function-runner/package/dist/native-worker.cjs.map +1 -1
- package/runtime/typescript-function-runner/package/npm-shrinkwrap.json +48 -48
- package/runtime/typescript-function-runner/package/package.json +7 -7
- package/dist/{sandbox-image-C2GTVnx3.d.cts → image-CN0M59QP.d.cts} +48 -48
- package/dist/{sandbox-image-C2GTVnx3.d.ts → image-CN0M59QP.d.ts} +48 -48
package/dist/index.cjs
CHANGED
|
@@ -5,11 +5,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __esm = (fn, res) => function __init() {
|
|
9
|
-
|
|
8
|
+
var __esm = (fn, res, err) => function __init() {
|
|
9
|
+
if (err) throw err[0];
|
|
10
|
+
try {
|
|
11
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw err = [e], e;
|
|
14
|
+
}
|
|
10
15
|
};
|
|
11
16
|
var __commonJS = (cb, mod) => function __require() {
|
|
12
|
-
|
|
17
|
+
try {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw mod = 0, e;
|
|
21
|
+
}
|
|
13
22
|
};
|
|
14
23
|
var __export = (target, all) => {
|
|
15
24
|
for (var name in all)
|
|
@@ -49,7 +58,7 @@ var init_defaults = __esm({
|
|
|
49
58
|
"src/defaults.ts"() {
|
|
50
59
|
"use strict";
|
|
51
60
|
init_cjs_shims();
|
|
52
|
-
SDK_VERSION = "0.5.
|
|
61
|
+
SDK_VERSION = "0.5.163";
|
|
53
62
|
API_URL = process.env.TENSORLAKE_API_URL ?? "https://api.tensorlake.ai";
|
|
54
63
|
API_KEY = process.env.TENSORLAKE_API_KEY ?? void 0;
|
|
55
64
|
NAMESPACE = process.env.INDEXIFY_NAMESPACE ?? "default";
|
|
@@ -369,6 +378,7 @@ var init_native_worker_client = __esm({
|
|
|
369
378
|
)) {
|
|
370
379
|
this.workerPath = workerPath;
|
|
371
380
|
}
|
|
381
|
+
workerPath;
|
|
372
382
|
worker;
|
|
373
383
|
nextId = 1;
|
|
374
384
|
registered = /* @__PURE__ */ new Set();
|
|
@@ -522,7 +532,7 @@ var init_native_worker_client = __esm({
|
|
|
522
532
|
}
|
|
523
533
|
};
|
|
524
534
|
runtimeKey = /* @__PURE__ */ Symbol.for(
|
|
525
|
-
`tensorlake.native.worker.${false ? "source" : "0.5.
|
|
535
|
+
`tensorlake.native.worker.${false ? "source" : "0.5.163"}.v1`
|
|
526
536
|
);
|
|
527
537
|
runtimes = globalThis;
|
|
528
538
|
}
|
|
@@ -860,6 +870,7 @@ var init_pending_sandbox = __esm({
|
|
|
860
870
|
this.errorDetails = record.errorDetails;
|
|
861
871
|
this.traceId = binding.traceId;
|
|
862
872
|
}
|
|
873
|
+
binding;
|
|
863
874
|
sandboxId;
|
|
864
875
|
name;
|
|
865
876
|
state;
|
|
@@ -1152,6 +1163,10 @@ var init_tunnel = __esm({
|
|
|
1152
1163
|
void this.lifetime.catch(() => {
|
|
1153
1164
|
});
|
|
1154
1165
|
}
|
|
1166
|
+
native;
|
|
1167
|
+
remotePort;
|
|
1168
|
+
localHost;
|
|
1169
|
+
localPort;
|
|
1155
1170
|
closePromise = null;
|
|
1156
1171
|
lifetime;
|
|
1157
1172
|
static async listen(options) {
|
|
@@ -3277,6 +3292,8 @@ var init_sandbox = __esm({
|
|
|
3277
3292
|
);
|
|
3278
3293
|
}
|
|
3279
3294
|
}
|
|
3295
|
+
sandbox;
|
|
3296
|
+
options;
|
|
3280
3297
|
baseUrl = "";
|
|
3281
3298
|
wsHeaders = {};
|
|
3282
3299
|
nativeProxy = null;
|
|
@@ -4395,15 +4412,13 @@ var init_sandbox = __esm({
|
|
|
4395
4412
|
/** Attach to an existing PTY session by ID and token and return a connected `Pty` handle. */
|
|
4396
4413
|
async connectPty(sessionId, token, options) {
|
|
4397
4414
|
await this.proxy.ensureResolved();
|
|
4398
|
-
const wsUrl = new URL(this.ptyWsUrl(sessionId, token));
|
|
4399
|
-
const authToken = wsUrl.searchParams.get("token") ?? token;
|
|
4400
4415
|
const pty = new Pty({
|
|
4401
4416
|
sessionId,
|
|
4402
|
-
token
|
|
4403
|
-
wsUrl:
|
|
4417
|
+
token,
|
|
4418
|
+
wsUrl: this.ptyWsUrl(sessionId),
|
|
4404
4419
|
wsHeaders: {
|
|
4405
4420
|
...this.wsHeaders,
|
|
4406
|
-
"X-PTY-Token":
|
|
4421
|
+
"X-PTY-Token": token
|
|
4407
4422
|
},
|
|
4408
4423
|
killSession: async () => {
|
|
4409
4424
|
const proxy = await this.proxy.client();
|
|
@@ -4481,7 +4496,12 @@ var init_sandbox = __esm({
|
|
|
4481
4496
|
`port ${port} did not become reachable inside sandbox within the connect timeout${detail}`
|
|
4482
4497
|
);
|
|
4483
4498
|
}
|
|
4484
|
-
|
|
4499
|
+
/**
|
|
4500
|
+
* WebSocket URL for a PTY session. The token is not part of the URL, so it
|
|
4501
|
+
* doesn't leak into proxy or CDN access logs. Send it in the `X-PTY-Token`
|
|
4502
|
+
* header instead.
|
|
4503
|
+
*/
|
|
4504
|
+
ptyWsUrl(sessionId) {
|
|
4485
4505
|
let wsBase;
|
|
4486
4506
|
if (this.baseUrl.startsWith("https://")) {
|
|
4487
4507
|
wsBase = "wss://" + this.baseUrl.slice(8);
|
|
@@ -4490,7 +4510,7 @@ var init_sandbox = __esm({
|
|
|
4490
4510
|
} else {
|
|
4491
4511
|
wsBase = this.baseUrl;
|
|
4492
4512
|
}
|
|
4493
|
-
return `${wsBase}/api/v1/pty/${sessionId}/ws
|
|
4513
|
+
return `${wsBase}/api/v1/pty/${sessionId}/ws`;
|
|
4494
4514
|
}
|
|
4495
4515
|
// --- Health ---
|
|
4496
4516
|
/** Check the sandbox daemon health. */
|
|
@@ -7223,6 +7243,7 @@ var NativeCloudTransport = class {
|
|
|
7223
7243
|
throw new RangeError("retryBackoffMs must be a non-negative finite number");
|
|
7224
7244
|
}
|
|
7225
7245
|
}
|
|
7246
|
+
options;
|
|
7226
7247
|
native;
|
|
7227
7248
|
closed = false;
|
|
7228
7249
|
client() {
|
|
@@ -7851,6 +7872,8 @@ var MountCli = class {
|
|
|
7851
7872
|
this.command = command;
|
|
7852
7873
|
this.envOverrides = envOverrides;
|
|
7853
7874
|
}
|
|
7875
|
+
command;
|
|
7876
|
+
envOverrides;
|
|
7854
7877
|
binary = null;
|
|
7855
7878
|
async findCli() {
|
|
7856
7879
|
const candidates = [];
|
|
@@ -8665,6 +8688,10 @@ var RepositoryMount = class {
|
|
|
8665
8688
|
this.path = path4;
|
|
8666
8689
|
this.readOnly = readOnly;
|
|
8667
8690
|
}
|
|
8691
|
+
cli;
|
|
8692
|
+
target;
|
|
8693
|
+
path;
|
|
8694
|
+
readOnly;
|
|
8668
8695
|
/** Inspect workspace state, pending changes, and daemon diagnostics. */
|
|
8669
8696
|
async status() {
|
|
8670
8697
|
return this.cli.status(this.path);
|
|
@@ -10513,6 +10540,7 @@ var MemoryRequestContext = class {
|
|
|
10513
10540
|
this.headers = new Headers(options.headers);
|
|
10514
10541
|
this.signal = options.signal ?? new AbortController().signal;
|
|
10515
10542
|
}
|
|
10543
|
+
requestId;
|
|
10516
10544
|
headers;
|
|
10517
10545
|
signal;
|
|
10518
10546
|
values = /* @__PURE__ */ new Map();
|
|
@@ -10559,6 +10587,9 @@ var LocalRequest = class {
|
|
|
10559
10587
|
this.value = value;
|
|
10560
10588
|
this.cancelRequest = cancelRequest;
|
|
10561
10589
|
}
|
|
10590
|
+
id;
|
|
10591
|
+
value;
|
|
10592
|
+
cancelRequest;
|
|
10562
10593
|
output() {
|
|
10563
10594
|
return this.value;
|
|
10564
10595
|
}
|
|
@@ -10726,6 +10757,10 @@ var RemoteRequest = class {
|
|
|
10726
10757
|
this.client = client;
|
|
10727
10758
|
this.outputIsFile = outputIsFile;
|
|
10728
10759
|
}
|
|
10760
|
+
id;
|
|
10761
|
+
applicationName;
|
|
10762
|
+
client;
|
|
10763
|
+
outputIsFile;
|
|
10729
10764
|
async output() {
|
|
10730
10765
|
let output;
|
|
10731
10766
|
try {
|