linkque-cli-v2 1.6.18 → 1.6.20
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 +17 -3
- package/dev/worker.js +11 -37
- package/linkquejs.js +884 -813
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/data-transform/dataTransformWorker.js +17 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{anthropic-messages-GSYNBLMR.js → anthropic-messages-TBZKK7UX.js} +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-L5WNKJ4W.js → chunk-22EQ6RXO.js} +253 -3078
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-M6E4Y5HY.js → chunk-5MR5ICJ4.js} +1916 -2642
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-EAODRPW4.js +518 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-KRE5FADB.js → chunk-JMBJJF7P.js} +11 -37
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-3BH2PDL3.js → chunk-WHXLLQZR.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-generative-ai-YD5ZGNXC.js → google-generative-ai-KD7MXONK.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-M34UDW4J.js → google-vertex-TREYA472.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-EIVAJAMW.js → mistral-conversations-5EI6JQBZ.js} +4 -4
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{otel-LQR5KPZ3.js → otel-RUUFBBFE.js} +266 -578
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +1562 -1888
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +3 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +3 -2
- package/worker.js +3544 -4996
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{azure-openai-responses-NPKMM3LF.js → azure-openai-responses-IYC43YOB.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-KDHBKVSL.js → chunk-FCD4O3BT.js} +3 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-codex-responses-GEFKSNVN.js → openai-codex-responses-HYLTKNTN.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-completions-TAACO6T5.js → openai-completions-CS3OYESP.js} +3 -3
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{openai-responses-4DDTXIGI.js → openai-responses-IYAGUHY7.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{pi-messages-7JN3W3BC.js → pi-messages-XGBW55RS.js} +3 -3
package/package.json
CHANGED
|
@@ -1830,8 +1830,11 @@ 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, lengthHandle) => {
|
|
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
|
+
}
|
|
1835
1838
|
const prompt = context.getString(promptHandle);
|
|
1836
1839
|
const callId = nextCallId++;
|
|
1837
1840
|
const promise = context.newPromise();
|
|
@@ -1863,13 +1866,22 @@ async function execute(module2, input) {
|
|
|
1863
1866
|
if (typeof prompt !== 'string') throw new TypeError('AI \u7B5B\u9009\u6307\u4EE4\u5FC5\u987B\u662F\u5B57\u7B26\u4E32');
|
|
1864
1867
|
const original = list.slice();
|
|
1865
1868
|
if (original.length === 0 || ${input.preview === true}) return original;
|
|
1866
|
-
const indices = JSON.parse(await hostFilter(JSON.stringify(modelList), prompt));
|
|
1869
|
+
const indices = JSON.parse(await hostFilter(JSON.stringify(modelList), prompt, original.length));
|
|
1867
1870
|
return indices.map(index => original[index]);
|
|
1868
1871
|
} }) });
|
|
1869
1872
|
const transform = (() => { ${input.source}
|
|
1870
1873
|
return transform; })();
|
|
1871
1874
|
if (typeof transform !== 'function') throw new TypeError('transform \u5FC5\u987B\u662F\u51FD\u6570');
|
|
1872
|
-
|
|
1875
|
+
const serialize = output => {
|
|
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);
|
|
1873
1885
|
})()
|
|
1874
1886
|
`;
|
|
1875
1887
|
const evaluated = run(() => context.evalCode(source));
|
|
@@ -1879,6 +1891,8 @@ async function execute(module2, input) {
|
|
|
1879
1891
|
throw new Error(readQuickJsError(error));
|
|
1880
1892
|
}
|
|
1881
1893
|
try {
|
|
1894
|
+
if (context.typeof(evaluated.value) !== "object")
|
|
1895
|
+
return read(evaluated.value);
|
|
1882
1896
|
let done = false;
|
|
1883
1897
|
const settled = context.resolvePromise(evaluated.value).then((result2) => {
|
|
1884
1898
|
done = true;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
stream,
|
|
3
3
|
streamSimple
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FCD4O3BT.js";
|
|
5
5
|
import "./chunk-HTG7JBF2.js";
|
|
6
6
|
import "./chunk-XMVFOHGJ.js";
|
|
7
|
-
import "./chunk-B5XRGKYX.js";
|
|
8
7
|
import "./chunk-WJHOHUET.js";
|
|
8
|
+
import "./chunk-B5XRGKYX.js";
|
|
9
9
|
import "./chunk-XOLFZ4XS.js";
|
|
10
10
|
import "./chunk-46SEH6ER.js";
|
|
11
11
|
import "./chunk-CT4G24PS.js";
|