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