linkque-cli-v2 1.6.17 → 1.6.18
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/dataTransformWorker.js +3 -17
- package/dev/worker.js +37 -11
- package/linkquejs.js +471 -384
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/data-transform/dataTransformWorker.js +3 -17
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-RSMGFPPK.js → chunk-3BH2PDL3.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-JMBJJF7P.js → chunk-KRE5FADB.js} +37 -11
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-EJB2EPNQ.js → chunk-L5WNKJ4W.js} +2852 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-7OYTZGOC.js → chunk-M6E4Y5HY.js} +2998 -2125
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-KD7MXONK.js → google-generative-ai-YD5ZGNXC.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-TREYA472.js → google-vertex-M34UDW4J.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-C43A6QIS.js → mistral-conversations-EIVAJAMW.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-RUUFBBFE.js → otel-LQR5KPZ3.js} +578 -266
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +770 -185
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +2 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +2 -3
- package/worker.js +6093 -4380
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-EAODRPW4.js +0 -518
package/package.json
CHANGED
|
@@ -1830,11 +1830,8 @@ async function execute(module2, input) {
|
|
|
1830
1830
|
result.value.dispose();
|
|
1831
1831
|
return "{}";
|
|
1832
1832
|
}
|
|
1833
|
-
const host = context.newFunction("__hostFilter", (listHandle, promptHandle
|
|
1833
|
+
const host = context.newFunction("__hostFilter", (listHandle, promptHandle) => {
|
|
1834
1834
|
const modelList = JSON.parse(context.getString(listHandle));
|
|
1835
|
-
if (!Array.isArray(modelList) || modelList.length !== context.getNumber(lengthHandle)) {
|
|
1836
|
-
throw new TypeError("\u5E8F\u5217\u5316\u540E\u7684\u6A21\u578B\u6295\u5F71\u5FC5\u987B\u4E0E\u539F\u59CB\u6570\u7EC4\u7B49\u957F");
|
|
1837
|
-
}
|
|
1838
1835
|
const prompt = context.getString(promptHandle);
|
|
1839
1836
|
const callId = nextCallId++;
|
|
1840
1837
|
const promise = context.newPromise();
|
|
@@ -1866,22 +1863,13 @@ async function execute(module2, input) {
|
|
|
1866
1863
|
if (typeof prompt !== 'string') throw new TypeError('AI \u7B5B\u9009\u6307\u4EE4\u5FC5\u987B\u662F\u5B57\u7B26\u4E32');
|
|
1867
1864
|
const original = list.slice();
|
|
1868
1865
|
if (original.length === 0 || ${input.preview === true}) return original;
|
|
1869
|
-
const indices = JSON.parse(await hostFilter(JSON.stringify(modelList), prompt
|
|
1866
|
+
const indices = JSON.parse(await hostFilter(JSON.stringify(modelList), prompt));
|
|
1870
1867
|
return indices.map(index => original[index]);
|
|
1871
1868
|
} }) });
|
|
1872
1869
|
const transform = (() => { ${input.source}
|
|
1873
1870
|
return transform; })();
|
|
1874
1871
|
if (typeof transform !== 'function') throw new TypeError('transform \u5FC5\u987B\u662F\u51FD\u6570');
|
|
1875
|
-
|
|
1876
|
-
if (output === undefined || typeof output !== 'object') {
|
|
1877
|
-
throw new TypeError('transform \u5FC5\u987B\u8FD4\u56DE JSON \u5BF9\u8C61\u6216 null');
|
|
1878
|
-
}
|
|
1879
|
-
return JSON.stringify(output);
|
|
1880
|
-
};
|
|
1881
|
-
const output = transform(input, ctx);
|
|
1882
|
-
return output && typeof output.then === 'function'
|
|
1883
|
-
? Promise.resolve(output).then(serialize)
|
|
1884
|
-
: serialize(output);
|
|
1872
|
+
return Promise.resolve(transform(input, ctx)).then(output => JSON.stringify(output));
|
|
1885
1873
|
})()
|
|
1886
1874
|
`;
|
|
1887
1875
|
const evaluated = run(() => context.evalCode(source));
|
|
@@ -1891,8 +1879,6 @@ async function execute(module2, input) {
|
|
|
1891
1879
|
throw new Error(readQuickJsError(error));
|
|
1892
1880
|
}
|
|
1893
1881
|
try {
|
|
1894
|
-
if (context.typeof(evaluated.value) !== "object")
|
|
1895
|
-
return read(evaluated.value);
|
|
1896
1882
|
let done = false;
|
|
1897
1883
|
const settled = context.resolvePromise(evaluated.value).then((result2) => {
|
|
1898
1884
|
done = true;
|
package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-JMBJJF7P.js → chunk-KRE5FADB.js}
RENAMED
|
@@ -9350,6 +9350,7 @@ var require_constants = __commonJS({
|
|
|
9350
9350
|
var require_buffer_util = __commonJS({
|
|
9351
9351
|
"../../node_modules/ws/lib/buffer-util.js"(exports, module) {
|
|
9352
9352
|
"use strict";
|
|
9353
|
+
var { websocketMask, websocketUnmask } = __require("http");
|
|
9353
9354
|
var { EMPTY_BUFFER } = require_constants();
|
|
9354
9355
|
var FastBuffer = Buffer[Symbol.species];
|
|
9355
9356
|
function concat(list, totalLength) {
|
|
@@ -9404,7 +9405,16 @@ var require_buffer_util = __commonJS({
|
|
|
9404
9405
|
toBuffer,
|
|
9405
9406
|
unmask: _unmask
|
|
9406
9407
|
};
|
|
9407
|
-
if (
|
|
9408
|
+
if (websocketMask) {
|
|
9409
|
+
module.exports.mask = function(source, mask, output, offset, length) {
|
|
9410
|
+
if (length < 24) _mask(source, mask, output, offset, length);
|
|
9411
|
+
else websocketMask(source, mask, output, offset, length);
|
|
9412
|
+
};
|
|
9413
|
+
module.exports.unmask = function(buffer, mask) {
|
|
9414
|
+
if (buffer.length < 24) _unmask(buffer, mask);
|
|
9415
|
+
else websocketUnmask(buffer, mask);
|
|
9416
|
+
};
|
|
9417
|
+
} else if (!process.env.WS_NO_BUFFER_UTIL) {
|
|
9408
9418
|
try {
|
|
9409
9419
|
const bufferUtil = __require("bufferutil");
|
|
9410
9420
|
module.exports.mask = function(source, mask, output, offset, length) {
|
|
@@ -10467,6 +10477,7 @@ var require_receiver = __commonJS({
|
|
|
10467
10477
|
unmask(data, this._mask);
|
|
10468
10478
|
}
|
|
10469
10479
|
}
|
|
10480
|
+
this._mask = void 0;
|
|
10470
10481
|
if (this._opcode > 7) {
|
|
10471
10482
|
this.controlMessage(data, cb);
|
|
10472
10483
|
return;
|
|
@@ -10799,12 +10810,15 @@ var require_sender = __commonJS({
|
|
|
10799
10810
|
target[2] = target[3] = 0;
|
|
10800
10811
|
target.writeUIntBE(dataLength, 4, 6);
|
|
10801
10812
|
}
|
|
10802
|
-
if (!options.mask)
|
|
10813
|
+
if (!options.mask) {
|
|
10814
|
+
return dataLength ? [target, data] : [target];
|
|
10815
|
+
}
|
|
10803
10816
|
target[1] |= 128;
|
|
10804
10817
|
target[offset - 4] = mask[0];
|
|
10805
10818
|
target[offset - 3] = mask[1];
|
|
10806
10819
|
target[offset - 2] = mask[2];
|
|
10807
10820
|
target[offset - 1] = mask[3];
|
|
10821
|
+
if (!dataLength) return [target];
|
|
10808
10822
|
if (skipMasking) return [target, data];
|
|
10809
10823
|
if (merge) {
|
|
10810
10824
|
applyMask(data, mask, target, offset, dataLength);
|
|
@@ -11561,6 +11575,7 @@ var require_websocket = __commonJS({
|
|
|
11561
11575
|
var https = __require("https");
|
|
11562
11576
|
var http = __require("http");
|
|
11563
11577
|
var net = __require("net");
|
|
11578
|
+
var querystring = __require("querystring");
|
|
11564
11579
|
var tls = __require("tls");
|
|
11565
11580
|
var { randomBytes, createHash } = __require("crypto");
|
|
11566
11581
|
var { Duplex, Readable: Readable2 } = __require("stream");
|
|
@@ -12087,10 +12102,9 @@ var require_websocket = __commonJS({
|
|
|
12087
12102
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
12088
12103
|
}
|
|
12089
12104
|
}
|
|
12090
|
-
if (parsedUrl.protocol === "http:") {
|
|
12091
|
-
parsedUrl
|
|
12092
|
-
|
|
12093
|
-
parsedUrl.protocol = "wss:";
|
|
12105
|
+
if (parsedUrl.protocol === "http:" || parsedUrl.protocol === "https:") {
|
|
12106
|
+
parsedUrl = new URL2(parsedUrl);
|
|
12107
|
+
parsedUrl.protocol = parsedUrl.protocol === "http:" ? "ws:" : "wss:";
|
|
12094
12108
|
}
|
|
12095
12109
|
websocket._url = parsedUrl.href;
|
|
12096
12110
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
@@ -12159,12 +12173,19 @@ var require_websocket = __commonJS({
|
|
|
12159
12173
|
}
|
|
12160
12174
|
}
|
|
12161
12175
|
if (parsedUrl.username || parsedUrl.password) {
|
|
12162
|
-
|
|
12176
|
+
const username = querystring.unescape(parsedUrl.username);
|
|
12177
|
+
const password = querystring.unescape(parsedUrl.password);
|
|
12178
|
+
opts.auth = `${username}:${password}`;
|
|
12163
12179
|
}
|
|
12164
12180
|
if (isIpcUrl) {
|
|
12165
|
-
const
|
|
12166
|
-
|
|
12167
|
-
|
|
12181
|
+
const i = opts.path.indexOf(":");
|
|
12182
|
+
if (i === -1) {
|
|
12183
|
+
opts.socketPath = opts.path;
|
|
12184
|
+
opts.path = "";
|
|
12185
|
+
} else {
|
|
12186
|
+
opts.socketPath = opts.path.slice(0, i);
|
|
12187
|
+
opts.path = opts.path.slice(i + 1);
|
|
12188
|
+
}
|
|
12168
12189
|
}
|
|
12169
12190
|
let req;
|
|
12170
12191
|
if (opts.followRedirects) {
|
|
@@ -12359,8 +12380,13 @@ var require_websocket = __commonJS({
|
|
|
12359
12380
|
function receiverOnConclude(code, reason) {
|
|
12360
12381
|
const websocket = this[kWebSocket];
|
|
12361
12382
|
websocket._closeFrameReceived = true;
|
|
12362
|
-
websocket._closeMessage = reason;
|
|
12363
12383
|
websocket._closeCode = code;
|
|
12384
|
+
if (reason.length === 0) {
|
|
12385
|
+
websocket._closeMessage = EMPTY_BUFFER;
|
|
12386
|
+
} else {
|
|
12387
|
+
websocket._closeMessage = Buffer.allocUnsafeSlow(reason.length);
|
|
12388
|
+
websocket._closeMessage.set(reason);
|
|
12389
|
+
}
|
|
12364
12390
|
if (websocket._socket[kWebSocket] === void 0) return;
|
|
12365
12391
|
websocket._socket.removeListener("data", socketOnData);
|
|
12366
12392
|
process.nextTick(resume, websocket._socket);
|