linkque-cli-v2 1.6.25-alpha.0 → 1.6.26
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/dev/worker.js +78 -21
- package/linkquejs.js +28272 -26795
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-LTZQZY5N.js → chunk-2QJITP7G.js} +83 -26
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-VBVOUDAY.js → chunk-5BACHYVZ.js} +3524 -6022
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-Q5VTO4BZ.js → chunk-FC7MJHC3.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-6POVPTQH.js → chunk-GAYNLDWK.js} +2545 -5930
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-EXYGBKWJ.js → chunk-LL6AYQ4U.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-GTEZTRCK.js → chunk-XUFLSZM4.js} +190 -35
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-XYAYDSKW.js → chunk-ZVZ2LH7U.js} +11 -11
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{dist-JRQ7GIV4.js → dist-6U5W3RLM.js} +46 -31
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-WBIK2BRB.js → google-generative-ai-RT2OOQDJ.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-2TMP5HDA.js → google-vertex-HVFMVQVY.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-X6KT35XW.js → mistral-conversations-KIOTOF73.js} +4 -4
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{multipart-parser-HCLTR6CW.js → multipart-parser-TAD6XL3Q.js} +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-3OUODIOB.js → otel-LQR5KPZ3.js} +580 -268
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +326 -227
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +4 -5
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +4 -5
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{src-MFXPXO5F.js → src-JSJTYJV5.js} +25 -25
- package/worker.js +60698 -49399
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-EAODRPW4.js +0 -518
package/dev/worker.js
CHANGED
|
@@ -53,6 +53,7 @@ var require_constants = __commonJS({
|
|
|
53
53
|
var require_buffer_util = __commonJS({
|
|
54
54
|
"../../node_modules/ws/lib/buffer-util.js"(exports2, module2) {
|
|
55
55
|
"use strict";
|
|
56
|
+
var { websocketMask, websocketUnmask } = require("http");
|
|
56
57
|
var { EMPTY_BUFFER } = require_constants();
|
|
57
58
|
var FastBuffer = Buffer[Symbol.species];
|
|
58
59
|
function concat(list, totalLength) {
|
|
@@ -107,7 +108,16 @@ var require_buffer_util = __commonJS({
|
|
|
107
108
|
toBuffer,
|
|
108
109
|
unmask: _unmask
|
|
109
110
|
};
|
|
110
|
-
if (
|
|
111
|
+
if (websocketMask) {
|
|
112
|
+
module2.exports.mask = function(source, mask, output, offset, length) {
|
|
113
|
+
if (length < 24) _mask(source, mask, output, offset, length);
|
|
114
|
+
else websocketMask(source, mask, output, offset, length);
|
|
115
|
+
};
|
|
116
|
+
module2.exports.unmask = function(buffer, mask) {
|
|
117
|
+
if (buffer.length < 24) _unmask(buffer, mask);
|
|
118
|
+
else websocketUnmask(buffer, mask);
|
|
119
|
+
};
|
|
120
|
+
} else if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
111
121
|
try {
|
|
112
122
|
const bufferUtil = require("bufferutil");
|
|
113
123
|
module2.exports.mask = function(source, mask, output, offset, length) {
|
|
@@ -303,7 +313,7 @@ var require_permessage_deflate = __commonJS({
|
|
|
303
313
|
acceptAsServer(offers) {
|
|
304
314
|
const opts = this._options;
|
|
305
315
|
const accepted = offers.find((params) => {
|
|
306
|
-
if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) {
|
|
316
|
+
if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && (typeof params.client_max_window_bits === "number" ? opts.clientMaxWindowBits > params.client_max_window_bits : !params.client_max_window_bits)) {
|
|
307
317
|
return false;
|
|
308
318
|
}
|
|
309
319
|
return true;
|
|
@@ -1170,6 +1180,7 @@ var require_receiver = __commonJS({
|
|
|
1170
1180
|
unmask(data, this._mask);
|
|
1171
1181
|
}
|
|
1172
1182
|
}
|
|
1183
|
+
this._mask = void 0;
|
|
1173
1184
|
if (this._opcode > 7) {
|
|
1174
1185
|
this.controlMessage(data, cb);
|
|
1175
1186
|
return;
|
|
@@ -1502,12 +1513,15 @@ var require_sender = __commonJS({
|
|
|
1502
1513
|
target[2] = target[3] = 0;
|
|
1503
1514
|
target.writeUIntBE(dataLength, 4, 6);
|
|
1504
1515
|
}
|
|
1505
|
-
if (!options.mask)
|
|
1516
|
+
if (!options.mask) {
|
|
1517
|
+
return dataLength ? [target, data] : [target];
|
|
1518
|
+
}
|
|
1506
1519
|
target[1] |= 128;
|
|
1507
1520
|
target[offset - 4] = mask[0];
|
|
1508
1521
|
target[offset - 3] = mask[1];
|
|
1509
1522
|
target[offset - 2] = mask[2];
|
|
1510
1523
|
target[offset - 1] = mask[3];
|
|
1524
|
+
if (!dataLength) return [target];
|
|
1511
1525
|
if (skipMasking) return [target, data];
|
|
1512
1526
|
if (merge) {
|
|
1513
1527
|
applyMask(data, mask, target, offset, dataLength);
|
|
@@ -2264,6 +2278,7 @@ var require_websocket = __commonJS({
|
|
|
2264
2278
|
var https = require("https");
|
|
2265
2279
|
var http = require("http");
|
|
2266
2280
|
var net = require("net");
|
|
2281
|
+
var querystring = require("querystring");
|
|
2267
2282
|
var tls = require("tls");
|
|
2268
2283
|
var { randomBytes, createHash } = require("crypto");
|
|
2269
2284
|
var { Duplex, Readable } = require("stream");
|
|
@@ -2321,21 +2336,38 @@ var require_websocket = __commonJS({
|
|
|
2321
2336
|
this._isServer = false;
|
|
2322
2337
|
this._redirects = 0;
|
|
2323
2338
|
if (protocols === void 0) {
|
|
2324
|
-
protocols
|
|
2339
|
+
if (!options || options.protocols === void 0) {
|
|
2340
|
+
protocols = [];
|
|
2341
|
+
} else if (Array.isArray(options.protocols)) {
|
|
2342
|
+
protocols = options.protocols;
|
|
2343
|
+
} else {
|
|
2344
|
+
protocols = [options.protocols];
|
|
2345
|
+
}
|
|
2325
2346
|
} else if (!Array.isArray(protocols)) {
|
|
2326
2347
|
if (typeof protocols === "object" && protocols !== null) {
|
|
2327
2348
|
options = protocols;
|
|
2328
|
-
protocols
|
|
2349
|
+
if (options.protocols === void 0) {
|
|
2350
|
+
protocols = [];
|
|
2351
|
+
} else if (Array.isArray(options.protocols)) {
|
|
2352
|
+
protocols = options.protocols;
|
|
2353
|
+
} else {
|
|
2354
|
+
protocols = [options.protocols];
|
|
2355
|
+
}
|
|
2329
2356
|
} else {
|
|
2330
2357
|
protocols = [protocols];
|
|
2331
2358
|
}
|
|
2332
2359
|
}
|
|
2333
|
-
initAsClient(this, address, protocols, options);
|
|
2360
|
+
options = initAsClient(this, address, protocols, options);
|
|
2334
2361
|
} else {
|
|
2335
|
-
this._autoPong = options.autoPong;
|
|
2336
|
-
this._closeTimeout = options.closeTimeout;
|
|
2337
2362
|
this._isServer = true;
|
|
2338
2363
|
}
|
|
2364
|
+
if (options.autoPong) {
|
|
2365
|
+
this._autoPong = true;
|
|
2366
|
+
this._autoPongComplete = () => autoPongComplete(this);
|
|
2367
|
+
this._pendingAutoPongs = 0;
|
|
2368
|
+
this._maxPendingAutoPongs = options.maxPendingAutoPongs | 0;
|
|
2369
|
+
}
|
|
2370
|
+
this._closeTimeout = options.closeTimeout;
|
|
2339
2371
|
}
|
|
2340
2372
|
/**
|
|
2341
2373
|
* For historical reasons, the custom "nodebuffer" type is used by the default
|
|
@@ -2522,7 +2554,6 @@ var require_websocket = __commonJS({
|
|
|
2522
2554
|
}
|
|
2523
2555
|
return;
|
|
2524
2556
|
}
|
|
2525
|
-
this._readyState = _WebSocket.CLOSING;
|
|
2526
2557
|
this._sender.close(code, data, !this._isServer, (err) => {
|
|
2527
2558
|
if (err) return;
|
|
2528
2559
|
this._closeFrameSent = true;
|
|
@@ -2530,6 +2561,7 @@ var require_websocket = __commonJS({
|
|
|
2530
2561
|
this._socket.end();
|
|
2531
2562
|
}
|
|
2532
2563
|
});
|
|
2564
|
+
this._readyState = _WebSocket.CLOSING;
|
|
2533
2565
|
setCloseTimer(this);
|
|
2534
2566
|
}
|
|
2535
2567
|
/**
|
|
@@ -2746,6 +2778,7 @@ var require_websocket = __commonJS({
|
|
|
2746
2778
|
maxBufferedChunks: 256 * 1024,
|
|
2747
2779
|
maxFragments: 16 * 1024,
|
|
2748
2780
|
maxPayload: 100 * 1024 * 1024,
|
|
2781
|
+
maxPendingAutoPongs: 60,
|
|
2749
2782
|
skipUTF8Validation: false,
|
|
2750
2783
|
perMessageDeflate: true,
|
|
2751
2784
|
followRedirects: false,
|
|
@@ -2754,14 +2787,13 @@ var require_websocket = __commonJS({
|
|
|
2754
2787
|
socketPath: void 0,
|
|
2755
2788
|
hostname: void 0,
|
|
2756
2789
|
protocol: void 0,
|
|
2790
|
+
protocols: void 0,
|
|
2757
2791
|
timeout: void 0,
|
|
2758
2792
|
method: "GET",
|
|
2759
2793
|
host: void 0,
|
|
2760
2794
|
path: void 0,
|
|
2761
2795
|
port: void 0
|
|
2762
2796
|
};
|
|
2763
|
-
websocket._autoPong = opts.autoPong;
|
|
2764
|
-
websocket._closeTimeout = opts.closeTimeout;
|
|
2765
2797
|
if (!protocolVersions.includes(opts.protocolVersion)) {
|
|
2766
2798
|
throw new RangeError(
|
|
2767
2799
|
`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
|
|
@@ -2777,10 +2809,9 @@ var require_websocket = __commonJS({
|
|
|
2777
2809
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
2778
2810
|
}
|
|
2779
2811
|
}
|
|
2780
|
-
if (parsedUrl.protocol === "http:") {
|
|
2781
|
-
parsedUrl
|
|
2782
|
-
|
|
2783
|
-
parsedUrl.protocol = "wss:";
|
|
2812
|
+
if (parsedUrl.protocol === "http:" || parsedUrl.protocol === "https:") {
|
|
2813
|
+
parsedUrl = new URL2(parsedUrl);
|
|
2814
|
+
parsedUrl.protocol = parsedUrl.protocol === "http:" ? "ws:" : "wss:";
|
|
2784
2815
|
}
|
|
2785
2816
|
websocket._url = parsedUrl.href;
|
|
2786
2817
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
@@ -2849,12 +2880,19 @@ var require_websocket = __commonJS({
|
|
|
2849
2880
|
}
|
|
2850
2881
|
}
|
|
2851
2882
|
if (parsedUrl.username || parsedUrl.password) {
|
|
2852
|
-
|
|
2883
|
+
const username = querystring.unescape(parsedUrl.username);
|
|
2884
|
+
const password = querystring.unescape(parsedUrl.password);
|
|
2885
|
+
opts.auth = `${username}:${password}`;
|
|
2853
2886
|
}
|
|
2854
2887
|
if (isIpcUrl) {
|
|
2855
|
-
const
|
|
2856
|
-
|
|
2857
|
-
|
|
2888
|
+
const i = opts.path.indexOf(":");
|
|
2889
|
+
if (i === -1) {
|
|
2890
|
+
opts.socketPath = opts.path;
|
|
2891
|
+
opts.path = "";
|
|
2892
|
+
} else {
|
|
2893
|
+
opts.socketPath = opts.path.slice(0, i);
|
|
2894
|
+
opts.path = opts.path.slice(i + 1);
|
|
2895
|
+
}
|
|
2858
2896
|
}
|
|
2859
2897
|
let req;
|
|
2860
2898
|
if (opts.followRedirects) {
|
|
@@ -2998,6 +3036,7 @@ var require_websocket = __commonJS({
|
|
|
2998
3036
|
} else {
|
|
2999
3037
|
req.end();
|
|
3000
3038
|
}
|
|
3039
|
+
return opts;
|
|
3001
3040
|
}
|
|
3002
3041
|
function emitErrorAndClose(websocket, err) {
|
|
3003
3042
|
websocket._readyState = WebSocket2.CLOSING;
|
|
@@ -3049,8 +3088,13 @@ var require_websocket = __commonJS({
|
|
|
3049
3088
|
function receiverOnConclude(code, reason) {
|
|
3050
3089
|
const websocket = this[kWebSocket];
|
|
3051
3090
|
websocket._closeFrameReceived = true;
|
|
3052
|
-
websocket._closeMessage = reason;
|
|
3053
3091
|
websocket._closeCode = code;
|
|
3092
|
+
if (reason.length === 0) {
|
|
3093
|
+
websocket._closeMessage = EMPTY_BUFFER;
|
|
3094
|
+
} else {
|
|
3095
|
+
websocket._closeMessage = Buffer.allocUnsafeSlow(reason.length);
|
|
3096
|
+
websocket._closeMessage.set(reason);
|
|
3097
|
+
}
|
|
3054
3098
|
if (websocket._socket[kWebSocket] === void 0) return;
|
|
3055
3099
|
websocket._socket.removeListener("data", socketOnData);
|
|
3056
3100
|
process.nextTick(resume, websocket._socket);
|
|
@@ -3081,9 +3125,19 @@ var require_websocket = __commonJS({
|
|
|
3081
3125
|
}
|
|
3082
3126
|
function receiverOnPing(data) {
|
|
3083
3127
|
const websocket = this[kWebSocket];
|
|
3084
|
-
if (websocket._autoPong
|
|
3128
|
+
if (websocket._autoPong && websocket.readyState === WebSocket2.OPEN) {
|
|
3129
|
+
if (websocket._maxPendingAutoPongs > 0 && websocket._pendingAutoPongs >= websocket._maxPendingAutoPongs) {
|
|
3130
|
+
websocket.terminate();
|
|
3131
|
+
} else {
|
|
3132
|
+
websocket._pendingAutoPongs++;
|
|
3133
|
+
websocket.pong(data, !this._isServer, websocket._autoPongComplete);
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3085
3136
|
websocket.emit("ping", data);
|
|
3086
3137
|
}
|
|
3138
|
+
function autoPongComplete(websocket) {
|
|
3139
|
+
websocket._pendingAutoPongs--;
|
|
3140
|
+
}
|
|
3087
3141
|
function receiverOnPong(data) {
|
|
3088
3142
|
this[kWebSocket].emit("pong", data);
|
|
3089
3143
|
}
|
|
@@ -3337,6 +3391,8 @@ var require_websocket_server = __commonJS({
|
|
|
3337
3391
|
* fragments
|
|
3338
3392
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
3339
3393
|
* size
|
|
3394
|
+
* @param {Number} [options.maxPendingAutoPongs=60] The maximum number of
|
|
3395
|
+
* pending automatic pongs
|
|
3340
3396
|
* @param {Boolean} [options.noServer=false] Enable no server mode
|
|
3341
3397
|
* @param {String} [options.path] Accept only connections matching this path
|
|
3342
3398
|
* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
|
|
@@ -3359,6 +3415,7 @@ var require_websocket_server = __commonJS({
|
|
|
3359
3415
|
maxBufferedChunks: 256 * 1024,
|
|
3360
3416
|
maxFragments: 16 * 1024,
|
|
3361
3417
|
maxPayload: 100 * 1024 * 1024,
|
|
3418
|
+
maxPendingAutoPongs: 60,
|
|
3362
3419
|
skipUTF8Validation: false,
|
|
3363
3420
|
perMessageDeflate: false,
|
|
3364
3421
|
handleProtocols: null,
|