linkque-cli-v2 1.6.26 → 1.6.28
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/linkquejs.js +4233 -1514
- package/package.json +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-XUFLSZM4.js → chunk-33Q6KVN2.js} +60 -196
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-LL6AYQ4U.js → chunk-BMMEXZ52.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-5BACHYVZ.js → chunk-BQHLF2GE.js} +4518 -666
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-KQTRZ2SZ.js +19744 -0
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-ZVZ2LH7U.js → chunk-NA35NOK4.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-2QJITP7G.js → chunk-RTUO3ZWI.js} +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{chunk-FC7MJHC3.js → chunk-TIXVMTXT.js} +1 -1
- 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-5VYDRFFM.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{google-vertex-HVFMVQVY.js → google-vertex-JO4CT7NF.js} +1 -1
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{mistral-conversations-KIOTOF73.js → mistral-conversations-43TLMTO6.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-UCKXDLYZ.js} +2 -2
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/chat.js +565 -220
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/handler/clientCapability.js +4 -4
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/runtime/protocol.js +4 -4
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/{src-JSJTYJV5.js → src-MFXPXO5F.js} +25 -25
- package/worker.js +22554 -9439
- package/vendor/linkque-agent-appwrite-integrate/dist/esm/chunk-GAYNLDWK.js +0 -11166
|
@@ -59,13 +59,13 @@ import {
|
|
|
59
59
|
resolveRunStorage,
|
|
60
60
|
toAgentRunMessages,
|
|
61
61
|
withIsoTimestamp
|
|
62
|
-
} from "../../chunk-
|
|
62
|
+
} from "../../chunk-NA35NOK4.js";
|
|
63
63
|
import "../../chunk-IWOFD643.js";
|
|
64
64
|
import "../../chunk-PXCGFBV5.js";
|
|
65
65
|
import "../../chunk-ETG6PNHQ.js";
|
|
66
66
|
import {
|
|
67
67
|
getBakedProtocol
|
|
68
|
-
} from "../../chunk-
|
|
68
|
+
} from "../../chunk-BMMEXZ52.js";
|
|
69
69
|
import {
|
|
70
70
|
ACTIVATE_SKILL_TOOL_NAME,
|
|
71
71
|
AUTHORIZATION_CONFIRM_EVENT,
|
|
@@ -266,9 +266,9 @@ import {
|
|
|
266
266
|
warnLogFailure,
|
|
267
267
|
wrapToolWithHooks,
|
|
268
268
|
writeJsonPointer
|
|
269
|
-
} from "../../chunk-
|
|
270
|
-
import "../../chunk-
|
|
271
|
-
import "../../chunk-
|
|
269
|
+
} from "../../chunk-BQHLF2GE.js";
|
|
270
|
+
import "../../chunk-33Q6KVN2.js";
|
|
271
|
+
import "../../chunk-KQTRZ2SZ.js";
|
|
272
272
|
import "../../chunk-SICWMO5Y.js";
|
|
273
273
|
import {
|
|
274
274
|
__commonJS,
|
|
@@ -277,9 +277,9 @@ import {
|
|
|
277
277
|
__toESM
|
|
278
278
|
} from "../../chunk-2ESYSVXG.js";
|
|
279
279
|
|
|
280
|
-
// ../../node_modules/yaml/dist/nodes/identity.js
|
|
280
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/identity.js
|
|
281
281
|
var require_identity = __commonJS({
|
|
282
|
-
"../../node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
282
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
283
283
|
"use strict";
|
|
284
284
|
var ALIAS = Symbol.for("yaml.alias");
|
|
285
285
|
var DOC = Symbol.for("yaml.document");
|
|
@@ -334,9 +334,9 @@ var require_identity = __commonJS({
|
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
336
|
|
|
337
|
-
// ../../node_modules/yaml/dist/visit.js
|
|
337
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/visit.js
|
|
338
338
|
var require_visit = __commonJS({
|
|
339
|
-
"../../node_modules/yaml/dist/visit.js"(exports) {
|
|
339
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/visit.js"(exports) {
|
|
340
340
|
"use strict";
|
|
341
341
|
var identity = require_identity();
|
|
342
342
|
var BREAK = Symbol("break visit");
|
|
@@ -492,9 +492,9 @@ var require_visit = __commonJS({
|
|
|
492
492
|
}
|
|
493
493
|
});
|
|
494
494
|
|
|
495
|
-
// ../../node_modules/yaml/dist/doc/directives.js
|
|
495
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/directives.js
|
|
496
496
|
var require_directives = __commonJS({
|
|
497
|
-
"../../node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
497
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
498
498
|
"use strict";
|
|
499
499
|
var identity = require_identity();
|
|
500
500
|
var visit = require_visit();
|
|
@@ -663,9 +663,9 @@ var require_directives = __commonJS({
|
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
|
|
666
|
-
// ../../node_modules/yaml/dist/doc/anchors.js
|
|
666
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/anchors.js
|
|
667
667
|
var require_anchors = __commonJS({
|
|
668
|
-
"../../node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
668
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
669
669
|
"use strict";
|
|
670
670
|
var identity = require_identity();
|
|
671
671
|
var visit = require_visit();
|
|
@@ -733,9 +733,9 @@ var require_anchors = __commonJS({
|
|
|
733
733
|
}
|
|
734
734
|
});
|
|
735
735
|
|
|
736
|
-
// ../../node_modules/yaml/dist/doc/applyReviver.js
|
|
736
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/applyReviver.js
|
|
737
737
|
var require_applyReviver = __commonJS({
|
|
738
|
-
"../../node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
738
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
739
739
|
"use strict";
|
|
740
740
|
function applyReviver(reviver, obj, key2, val) {
|
|
741
741
|
if (val && typeof val === "object") {
|
|
@@ -783,9 +783,9 @@ var require_applyReviver = __commonJS({
|
|
|
783
783
|
}
|
|
784
784
|
});
|
|
785
785
|
|
|
786
|
-
// ../../node_modules/yaml/dist/nodes/toJS.js
|
|
786
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/toJS.js
|
|
787
787
|
var require_toJS = __commonJS({
|
|
788
|
-
"../../node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
788
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
789
789
|
"use strict";
|
|
790
790
|
var identity = require_identity();
|
|
791
791
|
function toJS(value, arg, ctx) {
|
|
@@ -813,9 +813,9 @@ var require_toJS = __commonJS({
|
|
|
813
813
|
}
|
|
814
814
|
});
|
|
815
815
|
|
|
816
|
-
// ../../node_modules/yaml/dist/nodes/Node.js
|
|
816
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Node.js
|
|
817
817
|
var require_Node = __commonJS({
|
|
818
|
-
"../../node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
818
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
819
819
|
"use strict";
|
|
820
820
|
var applyReviver = require_applyReviver();
|
|
821
821
|
var identity = require_identity();
|
|
@@ -854,9 +854,9 @@ var require_Node = __commonJS({
|
|
|
854
854
|
}
|
|
855
855
|
});
|
|
856
856
|
|
|
857
|
-
// ../../node_modules/yaml/dist/nodes/Alias.js
|
|
857
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Alias.js
|
|
858
858
|
var require_Alias = __commonJS({
|
|
859
|
-
"../../node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
859
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
860
860
|
"use strict";
|
|
861
861
|
var anchors = require_anchors();
|
|
862
862
|
var visit = require_visit();
|
|
@@ -970,9 +970,9 @@ var require_Alias = __commonJS({
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
|
|
973
|
-
// ../../node_modules/yaml/dist/nodes/Scalar.js
|
|
973
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Scalar.js
|
|
974
974
|
var require_Scalar = __commonJS({
|
|
975
|
-
"../../node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
975
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
976
976
|
"use strict";
|
|
977
977
|
var identity = require_identity();
|
|
978
978
|
var Node = require_Node();
|
|
@@ -1000,9 +1000,9 @@ var require_Scalar = __commonJS({
|
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
1002
|
|
|
1003
|
-
// ../../node_modules/yaml/dist/doc/createNode.js
|
|
1003
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/createNode.js
|
|
1004
1004
|
var require_createNode = __commonJS({
|
|
1005
|
-
"../../node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
1005
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
1006
1006
|
"use strict";
|
|
1007
1007
|
var Alias = require_Alias();
|
|
1008
1008
|
var identity = require_identity();
|
|
@@ -1075,9 +1075,9 @@ var require_createNode = __commonJS({
|
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
|
|
1078
|
-
// ../../node_modules/yaml/dist/nodes/Collection.js
|
|
1078
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Collection.js
|
|
1079
1079
|
var require_Collection = __commonJS({
|
|
1080
|
-
"../../node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
1080
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
1081
1081
|
"use strict";
|
|
1082
1082
|
var createNode = require_createNode();
|
|
1083
1083
|
var identity = require_identity();
|
|
@@ -1218,9 +1218,9 @@ var require_Collection = __commonJS({
|
|
|
1218
1218
|
}
|
|
1219
1219
|
});
|
|
1220
1220
|
|
|
1221
|
-
// ../../node_modules/yaml/dist/stringify/stringifyComment.js
|
|
1221
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
1222
1222
|
var require_stringifyComment = __commonJS({
|
|
1223
|
-
"../../node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
1223
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
1224
1224
|
"use strict";
|
|
1225
1225
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
1226
1226
|
function indentComment(comment, indent) {
|
|
@@ -1235,9 +1235,9 @@ var require_stringifyComment = __commonJS({
|
|
|
1235
1235
|
}
|
|
1236
1236
|
});
|
|
1237
1237
|
|
|
1238
|
-
// ../../node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
1238
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
1239
1239
|
var require_foldFlowLines = __commonJS({
|
|
1240
|
-
"../../node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
1240
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
1241
1241
|
"use strict";
|
|
1242
1242
|
var FOLD_FLOW = "flow";
|
|
1243
1243
|
var FOLD_BLOCK = "block";
|
|
@@ -1371,9 +1371,9 @@ ${indent}${text3.slice(fold + 1, end2)}`;
|
|
|
1371
1371
|
}
|
|
1372
1372
|
});
|
|
1373
1373
|
|
|
1374
|
-
// ../../node_modules/yaml/dist/stringify/stringifyString.js
|
|
1374
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1375
1375
|
var require_stringifyString = __commonJS({
|
|
1376
|
-
"../../node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1376
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1377
1377
|
"use strict";
|
|
1378
1378
|
var Scalar = require_Scalar();
|
|
1379
1379
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -1654,9 +1654,9 @@ ${indent}`);
|
|
|
1654
1654
|
}
|
|
1655
1655
|
});
|
|
1656
1656
|
|
|
1657
|
-
// ../../node_modules/yaml/dist/stringify/stringify.js
|
|
1657
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringify.js
|
|
1658
1658
|
var require_stringify = __commonJS({
|
|
1659
|
-
"../../node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1659
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1660
1660
|
"use strict";
|
|
1661
1661
|
var anchors = require_anchors();
|
|
1662
1662
|
var identity = require_identity();
|
|
@@ -1778,9 +1778,9 @@ ${ctx.indent}${str}`;
|
|
|
1778
1778
|
}
|
|
1779
1779
|
});
|
|
1780
1780
|
|
|
1781
|
-
// ../../node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1781
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1782
1782
|
var require_stringifyPair = __commonJS({
|
|
1783
|
-
"../../node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1783
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1784
1784
|
"use strict";
|
|
1785
1785
|
var identity = require_identity();
|
|
1786
1786
|
var Scalar = require_Scalar();
|
|
@@ -1911,9 +1911,9 @@ ${ctx.indent}`;
|
|
|
1911
1911
|
}
|
|
1912
1912
|
});
|
|
1913
1913
|
|
|
1914
|
-
// ../../node_modules/yaml/dist/log.js
|
|
1914
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/log.js
|
|
1915
1915
|
var require_log = __commonJS({
|
|
1916
|
-
"../../node_modules/yaml/dist/log.js"(exports) {
|
|
1916
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/log.js"(exports) {
|
|
1917
1917
|
"use strict";
|
|
1918
1918
|
var node_process = __require("process");
|
|
1919
1919
|
function debug(logLevel, ...messages) {
|
|
@@ -1933,9 +1933,9 @@ var require_log = __commonJS({
|
|
|
1933
1933
|
}
|
|
1934
1934
|
});
|
|
1935
1935
|
|
|
1936
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1936
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/merge.js
|
|
1937
1937
|
var require_merge = __commonJS({
|
|
1938
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1938
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
|
|
1939
1939
|
"use strict";
|
|
1940
1940
|
var identity = require_identity();
|
|
1941
1941
|
var Scalar = require_Scalar();
|
|
@@ -1993,9 +1993,9 @@ var require_merge = __commonJS({
|
|
|
1993
1993
|
}
|
|
1994
1994
|
});
|
|
1995
1995
|
|
|
1996
|
-
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1996
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1997
1997
|
var require_addPairToJSMap = __commonJS({
|
|
1998
|
-
"../../node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1998
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1999
1999
|
"use strict";
|
|
2000
2000
|
var log = require_log();
|
|
2001
2001
|
var merge = require_merge();
|
|
@@ -2057,9 +2057,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
2057
2057
|
}
|
|
2058
2058
|
});
|
|
2059
2059
|
|
|
2060
|
-
// ../../node_modules/yaml/dist/nodes/Pair.js
|
|
2060
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Pair.js
|
|
2061
2061
|
var require_Pair = __commonJS({
|
|
2062
|
-
"../../node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
2062
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
2063
2063
|
"use strict";
|
|
2064
2064
|
var createNode = require_createNode();
|
|
2065
2065
|
var stringifyPair = require_stringifyPair();
|
|
@@ -2097,9 +2097,9 @@ var require_Pair = __commonJS({
|
|
|
2097
2097
|
}
|
|
2098
2098
|
});
|
|
2099
2099
|
|
|
2100
|
-
// ../../node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
2100
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
2101
2101
|
var require_stringifyCollection = __commonJS({
|
|
2102
|
-
"../../node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
2102
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
2103
2103
|
"use strict";
|
|
2104
2104
|
var identity = require_identity();
|
|
2105
2105
|
var stringify = require_stringify();
|
|
@@ -2248,9 +2248,9 @@ ${indent}${end}`;
|
|
|
2248
2248
|
}
|
|
2249
2249
|
});
|
|
2250
2250
|
|
|
2251
|
-
// ../../node_modules/yaml/dist/nodes/YAMLMap.js
|
|
2251
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
2252
2252
|
var require_YAMLMap = __commonJS({
|
|
2253
|
-
"../../node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
2253
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
2254
2254
|
"use strict";
|
|
2255
2255
|
var stringifyCollection = require_stringifyCollection();
|
|
2256
2256
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -2392,9 +2392,9 @@ var require_YAMLMap = __commonJS({
|
|
|
2392
2392
|
}
|
|
2393
2393
|
});
|
|
2394
2394
|
|
|
2395
|
-
// ../../node_modules/yaml/dist/schema/common/map.js
|
|
2395
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/map.js
|
|
2396
2396
|
var require_map = __commonJS({
|
|
2397
|
-
"../../node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2397
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2398
2398
|
"use strict";
|
|
2399
2399
|
var identity = require_identity();
|
|
2400
2400
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2414,9 +2414,9 @@ var require_map = __commonJS({
|
|
|
2414
2414
|
}
|
|
2415
2415
|
});
|
|
2416
2416
|
|
|
2417
|
-
// ../../node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2417
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2418
2418
|
var require_YAMLSeq = __commonJS({
|
|
2419
|
-
"../../node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
2419
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
2420
2420
|
"use strict";
|
|
2421
2421
|
var createNode = require_createNode();
|
|
2422
2422
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -2530,9 +2530,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
2530
2530
|
}
|
|
2531
2531
|
});
|
|
2532
2532
|
|
|
2533
|
-
// ../../node_modules/yaml/dist/schema/common/seq.js
|
|
2533
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/seq.js
|
|
2534
2534
|
var require_seq = __commonJS({
|
|
2535
|
-
"../../node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2535
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2536
2536
|
"use strict";
|
|
2537
2537
|
var identity = require_identity();
|
|
2538
2538
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2552,9 +2552,9 @@ var require_seq = __commonJS({
|
|
|
2552
2552
|
}
|
|
2553
2553
|
});
|
|
2554
2554
|
|
|
2555
|
-
// ../../node_modules/yaml/dist/schema/common/string.js
|
|
2555
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/string.js
|
|
2556
2556
|
var require_string = __commonJS({
|
|
2557
|
-
"../../node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
2557
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
2558
2558
|
"use strict";
|
|
2559
2559
|
var stringifyString = require_stringifyString();
|
|
2560
2560
|
var string = {
|
|
@@ -2571,9 +2571,9 @@ var require_string = __commonJS({
|
|
|
2571
2571
|
}
|
|
2572
2572
|
});
|
|
2573
2573
|
|
|
2574
|
-
// ../../node_modules/yaml/dist/schema/common/null.js
|
|
2574
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/null.js
|
|
2575
2575
|
var require_null = __commonJS({
|
|
2576
|
-
"../../node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2576
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2577
2577
|
"use strict";
|
|
2578
2578
|
var Scalar = require_Scalar();
|
|
2579
2579
|
var nullTag = {
|
|
@@ -2589,9 +2589,9 @@ var require_null = __commonJS({
|
|
|
2589
2589
|
}
|
|
2590
2590
|
});
|
|
2591
2591
|
|
|
2592
|
-
// ../../node_modules/yaml/dist/schema/core/bool.js
|
|
2592
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/bool.js
|
|
2593
2593
|
var require_bool = __commonJS({
|
|
2594
|
-
"../../node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2594
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2595
2595
|
"use strict";
|
|
2596
2596
|
var Scalar = require_Scalar();
|
|
2597
2597
|
var boolTag = {
|
|
@@ -2613,9 +2613,9 @@ var require_bool = __commonJS({
|
|
|
2613
2613
|
}
|
|
2614
2614
|
});
|
|
2615
2615
|
|
|
2616
|
-
// ../../node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2616
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2617
2617
|
var require_stringifyNumber = __commonJS({
|
|
2618
|
-
"../../node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
2618
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
2619
2619
|
"use strict";
|
|
2620
2620
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2621
2621
|
if (typeof value === "bigint")
|
|
@@ -2640,9 +2640,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
2640
2640
|
}
|
|
2641
2641
|
});
|
|
2642
2642
|
|
|
2643
|
-
// ../../node_modules/yaml/dist/schema/core/float.js
|
|
2643
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/float.js
|
|
2644
2644
|
var require_float = __commonJS({
|
|
2645
|
-
"../../node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2645
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2646
2646
|
"use strict";
|
|
2647
2647
|
var Scalar = require_Scalar();
|
|
2648
2648
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2686,9 +2686,9 @@ var require_float = __commonJS({
|
|
|
2686
2686
|
}
|
|
2687
2687
|
});
|
|
2688
2688
|
|
|
2689
|
-
// ../../node_modules/yaml/dist/schema/core/int.js
|
|
2689
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/int.js
|
|
2690
2690
|
var require_int = __commonJS({
|
|
2691
|
-
"../../node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
2691
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
2692
2692
|
"use strict";
|
|
2693
2693
|
var stringifyNumber = require_stringifyNumber();
|
|
2694
2694
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2731,9 +2731,9 @@ var require_int = __commonJS({
|
|
|
2731
2731
|
}
|
|
2732
2732
|
});
|
|
2733
2733
|
|
|
2734
|
-
// ../../node_modules/yaml/dist/schema/core/schema.js
|
|
2734
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/schema.js
|
|
2735
2735
|
var require_schema = __commonJS({
|
|
2736
|
-
"../../node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
2736
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
2737
2737
|
"use strict";
|
|
2738
2738
|
var map = require_map();
|
|
2739
2739
|
var _null = require_null();
|
|
@@ -2759,9 +2759,9 @@ var require_schema = __commonJS({
|
|
|
2759
2759
|
}
|
|
2760
2760
|
});
|
|
2761
2761
|
|
|
2762
|
-
// ../../node_modules/yaml/dist/schema/json/schema.js
|
|
2762
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/json/schema.js
|
|
2763
2763
|
var require_schema2 = __commonJS({
|
|
2764
|
-
"../../node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2764
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2765
2765
|
"use strict";
|
|
2766
2766
|
var Scalar = require_Scalar();
|
|
2767
2767
|
var map = require_map();
|
|
@@ -2826,9 +2826,9 @@ var require_schema2 = __commonJS({
|
|
|
2826
2826
|
}
|
|
2827
2827
|
});
|
|
2828
2828
|
|
|
2829
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2829
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2830
2830
|
var require_binary = __commonJS({
|
|
2831
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2831
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2832
2832
|
"use strict";
|
|
2833
2833
|
var node_buffer = __require("buffer");
|
|
2834
2834
|
var Scalar = require_Scalar();
|
|
@@ -2892,9 +2892,9 @@ var require_binary = __commonJS({
|
|
|
2892
2892
|
}
|
|
2893
2893
|
});
|
|
2894
2894
|
|
|
2895
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2895
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2896
2896
|
var require_pairs = __commonJS({
|
|
2897
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2897
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2898
2898
|
"use strict";
|
|
2899
2899
|
var identity = require_identity();
|
|
2900
2900
|
var Pair = require_Pair();
|
|
@@ -2970,9 +2970,9 @@ ${cn.comment}` : item.comment;
|
|
|
2970
2970
|
}
|
|
2971
2971
|
});
|
|
2972
2972
|
|
|
2973
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2973
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2974
2974
|
var require_omap = __commonJS({
|
|
2975
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2975
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2976
2976
|
"use strict";
|
|
2977
2977
|
var identity = require_identity();
|
|
2978
2978
|
var toJS = require_toJS();
|
|
@@ -3048,9 +3048,9 @@ var require_omap = __commonJS({
|
|
|
3048
3048
|
}
|
|
3049
3049
|
});
|
|
3050
3050
|
|
|
3051
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
3051
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
3052
3052
|
var require_bool2 = __commonJS({
|
|
3053
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
3053
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
3054
3054
|
"use strict";
|
|
3055
3055
|
var Scalar = require_Scalar();
|
|
3056
3056
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -3080,9 +3080,9 @@ var require_bool2 = __commonJS({
|
|
|
3080
3080
|
}
|
|
3081
3081
|
});
|
|
3082
3082
|
|
|
3083
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
3083
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
3084
3084
|
var require_float2 = __commonJS({
|
|
3085
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
3085
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
3086
3086
|
"use strict";
|
|
3087
3087
|
var Scalar = require_Scalar();
|
|
3088
3088
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -3129,9 +3129,9 @@ var require_float2 = __commonJS({
|
|
|
3129
3129
|
}
|
|
3130
3130
|
});
|
|
3131
3131
|
|
|
3132
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
3132
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
3133
3133
|
var require_int2 = __commonJS({
|
|
3134
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
3134
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
3135
3135
|
"use strict";
|
|
3136
3136
|
var stringifyNumber = require_stringifyNumber();
|
|
3137
3137
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -3208,9 +3208,9 @@ var require_int2 = __commonJS({
|
|
|
3208
3208
|
}
|
|
3209
3209
|
});
|
|
3210
3210
|
|
|
3211
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
3211
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
3212
3212
|
var require_set = __commonJS({
|
|
3213
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
3213
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
3214
3214
|
"use strict";
|
|
3215
3215
|
var identity = require_identity();
|
|
3216
3216
|
var Pair = require_Pair();
|
|
@@ -3297,9 +3297,9 @@ var require_set = __commonJS({
|
|
|
3297
3297
|
}
|
|
3298
3298
|
});
|
|
3299
3299
|
|
|
3300
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
3300
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
3301
3301
|
var require_timestamp = __commonJS({
|
|
3302
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
3302
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
3303
3303
|
"use strict";
|
|
3304
3304
|
var stringifyNumber = require_stringifyNumber();
|
|
3305
3305
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -3385,9 +3385,9 @@ var require_timestamp = __commonJS({
|
|
|
3385
3385
|
}
|
|
3386
3386
|
});
|
|
3387
3387
|
|
|
3388
|
-
// ../../node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3388
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3389
3389
|
var require_schema3 = __commonJS({
|
|
3390
|
-
"../../node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
3390
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
3391
3391
|
"use strict";
|
|
3392
3392
|
var map = require_map();
|
|
3393
3393
|
var _null = require_null();
|
|
@@ -3429,9 +3429,9 @@ var require_schema3 = __commonJS({
|
|
|
3429
3429
|
}
|
|
3430
3430
|
});
|
|
3431
3431
|
|
|
3432
|
-
// ../../node_modules/yaml/dist/schema/tags.js
|
|
3432
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/tags.js
|
|
3433
3433
|
var require_tags = __commonJS({
|
|
3434
|
-
"../../node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
3434
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
3435
3435
|
"use strict";
|
|
3436
3436
|
var map = require_map();
|
|
3437
3437
|
var _null = require_null();
|
|
@@ -3523,9 +3523,9 @@ var require_tags = __commonJS({
|
|
|
3523
3523
|
}
|
|
3524
3524
|
});
|
|
3525
3525
|
|
|
3526
|
-
// ../../node_modules/yaml/dist/schema/Schema.js
|
|
3526
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/Schema.js
|
|
3527
3527
|
var require_Schema = __commonJS({
|
|
3528
|
-
"../../node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3528
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3529
3529
|
"use strict";
|
|
3530
3530
|
var identity = require_identity();
|
|
3531
3531
|
var map = require_map();
|
|
@@ -3555,9 +3555,9 @@ var require_Schema = __commonJS({
|
|
|
3555
3555
|
}
|
|
3556
3556
|
});
|
|
3557
3557
|
|
|
3558
|
-
// ../../node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3558
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3559
3559
|
var require_stringifyDocument = __commonJS({
|
|
3560
|
-
"../../node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3560
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3561
3561
|
"use strict";
|
|
3562
3562
|
var identity = require_identity();
|
|
3563
3563
|
var stringify = require_stringify();
|
|
@@ -3635,9 +3635,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
3635
3635
|
}
|
|
3636
3636
|
});
|
|
3637
3637
|
|
|
3638
|
-
// ../../node_modules/yaml/dist/doc/Document.js
|
|
3638
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/Document.js
|
|
3639
3639
|
var require_Document = __commonJS({
|
|
3640
|
-
"../../node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
3640
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
3641
3641
|
"use strict";
|
|
3642
3642
|
var Alias = require_Alias();
|
|
3643
3643
|
var Collection = require_Collection();
|
|
@@ -3944,9 +3944,9 @@ var require_Document = __commonJS({
|
|
|
3944
3944
|
}
|
|
3945
3945
|
});
|
|
3946
3946
|
|
|
3947
|
-
// ../../node_modules/yaml/dist/errors.js
|
|
3947
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/errors.js
|
|
3948
3948
|
var require_errors = __commonJS({
|
|
3949
|
-
"../../node_modules/yaml/dist/errors.js"(exports) {
|
|
3949
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/errors.js"(exports) {
|
|
3950
3950
|
"use strict";
|
|
3951
3951
|
var YAMLError = class extends Error {
|
|
3952
3952
|
constructor(name, pos, code, message) {
|
|
@@ -4009,9 +4009,9 @@ ${pointer}
|
|
|
4009
4009
|
}
|
|
4010
4010
|
});
|
|
4011
4011
|
|
|
4012
|
-
// ../../node_modules/yaml/dist/compose/resolve-props.js
|
|
4012
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-props.js
|
|
4013
4013
|
var require_resolve_props = __commonJS({
|
|
4014
|
-
"../../node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
4014
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
4015
4015
|
"use strict";
|
|
4016
4016
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) {
|
|
4017
4017
|
let spaceBefore = false;
|
|
@@ -4142,9 +4142,9 @@ var require_resolve_props = __commonJS({
|
|
|
4142
4142
|
}
|
|
4143
4143
|
});
|
|
4144
4144
|
|
|
4145
|
-
// ../../node_modules/yaml/dist/compose/util-contains-newline.js
|
|
4145
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
4146
4146
|
var require_util_contains_newline = __commonJS({
|
|
4147
|
-
"../../node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
4147
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
4148
4148
|
"use strict";
|
|
4149
4149
|
function containsNewline(key2) {
|
|
4150
4150
|
if (!key2)
|
|
@@ -4184,9 +4184,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
4184
4184
|
}
|
|
4185
4185
|
});
|
|
4186
4186
|
|
|
4187
|
-
// ../../node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
4187
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
4188
4188
|
var require_util_flow_indent_check = __commonJS({
|
|
4189
|
-
"../../node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
4189
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
4190
4190
|
"use strict";
|
|
4191
4191
|
var utilContainsNewline = require_util_contains_newline();
|
|
4192
4192
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -4202,9 +4202,9 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
4202
4202
|
}
|
|
4203
4203
|
});
|
|
4204
4204
|
|
|
4205
|
-
// ../../node_modules/yaml/dist/compose/util-map-includes.js
|
|
4205
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-map-includes.js
|
|
4206
4206
|
var require_util_map_includes = __commonJS({
|
|
4207
|
-
"../../node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
4207
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
4208
4208
|
"use strict";
|
|
4209
4209
|
var identity = require_identity();
|
|
4210
4210
|
function mapIncludes(ctx, items, search) {
|
|
@@ -4218,9 +4218,9 @@ var require_util_map_includes = __commonJS({
|
|
|
4218
4218
|
}
|
|
4219
4219
|
});
|
|
4220
4220
|
|
|
4221
|
-
// ../../node_modules/yaml/dist/compose/resolve-block-map.js
|
|
4221
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
4222
4222
|
var require_resolve_block_map = __commonJS({
|
|
4223
|
-
"../../node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
4223
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
4224
4224
|
"use strict";
|
|
4225
4225
|
var Pair = require_Pair();
|
|
4226
4226
|
var YAMLMap = require_YAMLMap();
|
|
@@ -4326,9 +4326,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
4326
4326
|
}
|
|
4327
4327
|
});
|
|
4328
4328
|
|
|
4329
|
-
// ../../node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
4329
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
4330
4330
|
var require_resolve_block_seq = __commonJS({
|
|
4331
|
-
"../../node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
4331
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
4332
4332
|
"use strict";
|
|
4333
4333
|
var YAMLSeq = require_YAMLSeq();
|
|
4334
4334
|
var resolveProps = require_resolve_props();
|
|
@@ -4377,9 +4377,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
4377
4377
|
}
|
|
4378
4378
|
});
|
|
4379
4379
|
|
|
4380
|
-
// ../../node_modules/yaml/dist/compose/resolve-end.js
|
|
4380
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-end.js
|
|
4381
4381
|
var require_resolve_end = __commonJS({
|
|
4382
|
-
"../../node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
4382
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
4383
4383
|
"use strict";
|
|
4384
4384
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
4385
4385
|
let comment = "";
|
|
@@ -4420,9 +4420,9 @@ var require_resolve_end = __commonJS({
|
|
|
4420
4420
|
}
|
|
4421
4421
|
});
|
|
4422
4422
|
|
|
4423
|
-
// ../../node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
4423
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
4424
4424
|
var require_resolve_flow_collection = __commonJS({
|
|
4425
|
-
"../../node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4425
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4426
4426
|
"use strict";
|
|
4427
4427
|
var identity = require_identity();
|
|
4428
4428
|
var Pair = require_Pair();
|
|
@@ -4614,9 +4614,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4614
4614
|
}
|
|
4615
4615
|
});
|
|
4616
4616
|
|
|
4617
|
-
// ../../node_modules/yaml/dist/compose/compose-collection.js
|
|
4617
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-collection.js
|
|
4618
4618
|
var require_compose_collection = __commonJS({
|
|
4619
|
-
"../../node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4619
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4620
4620
|
"use strict";
|
|
4621
4621
|
var identity = require_identity();
|
|
4622
4622
|
var Scalar = require_Scalar();
|
|
@@ -4679,9 +4679,9 @@ var require_compose_collection = __commonJS({
|
|
|
4679
4679
|
}
|
|
4680
4680
|
});
|
|
4681
4681
|
|
|
4682
|
-
// ../../node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4682
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4683
4683
|
var require_resolve_block_scalar = __commonJS({
|
|
4684
|
-
"../../node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4684
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4685
4685
|
"use strict";
|
|
4686
4686
|
var Scalar = require_Scalar();
|
|
4687
4687
|
function resolveBlockScalar(ctx, scalar, onError) {
|
|
@@ -4860,9 +4860,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4860
4860
|
}
|
|
4861
4861
|
});
|
|
4862
4862
|
|
|
4863
|
-
// ../../node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4863
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4864
4864
|
var require_resolve_flow_scalar = __commonJS({
|
|
4865
|
-
"../../node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4865
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4866
4866
|
"use strict";
|
|
4867
4867
|
var Scalar = require_Scalar();
|
|
4868
4868
|
var resolveEnd = require_resolve_end();
|
|
@@ -5078,9 +5078,9 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
5078
5078
|
}
|
|
5079
5079
|
});
|
|
5080
5080
|
|
|
5081
|
-
// ../../node_modules/yaml/dist/compose/compose-scalar.js
|
|
5081
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-scalar.js
|
|
5082
5082
|
var require_compose_scalar = __commonJS({
|
|
5083
|
-
"../../node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
5083
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
5084
5084
|
"use strict";
|
|
5085
5085
|
var identity = require_identity();
|
|
5086
5086
|
var Scalar = require_Scalar();
|
|
@@ -5159,9 +5159,9 @@ var require_compose_scalar = __commonJS({
|
|
|
5159
5159
|
}
|
|
5160
5160
|
});
|
|
5161
5161
|
|
|
5162
|
-
// ../../node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
5162
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
5163
5163
|
var require_util_empty_scalar_position = __commonJS({
|
|
5164
|
-
"../../node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
5164
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
5165
5165
|
"use strict";
|
|
5166
5166
|
function emptyScalarPosition(offset, before, pos) {
|
|
5167
5167
|
if (before) {
|
|
@@ -5189,9 +5189,9 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
5189
5189
|
}
|
|
5190
5190
|
});
|
|
5191
5191
|
|
|
5192
|
-
// ../../node_modules/yaml/dist/compose/compose-node.js
|
|
5192
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-node.js
|
|
5193
5193
|
var require_compose_node = __commonJS({
|
|
5194
|
-
"../../node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
5194
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
5195
5195
|
"use strict";
|
|
5196
5196
|
var Alias = require_Alias();
|
|
5197
5197
|
var identity = require_identity();
|
|
@@ -5295,9 +5295,9 @@ var require_compose_node = __commonJS({
|
|
|
5295
5295
|
}
|
|
5296
5296
|
});
|
|
5297
5297
|
|
|
5298
|
-
// ../../node_modules/yaml/dist/compose/compose-doc.js
|
|
5298
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-doc.js
|
|
5299
5299
|
var require_compose_doc = __commonJS({
|
|
5300
|
-
"../../node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
5300
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
5301
5301
|
"use strict";
|
|
5302
5302
|
var Document = require_Document();
|
|
5303
5303
|
var composeNode = require_compose_node();
|
|
@@ -5338,9 +5338,9 @@ var require_compose_doc = __commonJS({
|
|
|
5338
5338
|
}
|
|
5339
5339
|
});
|
|
5340
5340
|
|
|
5341
|
-
// ../../node_modules/yaml/dist/compose/composer.js
|
|
5341
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/composer.js
|
|
5342
5342
|
var require_composer = __commonJS({
|
|
5343
|
-
"../../node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
5343
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
5344
5344
|
"use strict";
|
|
5345
5345
|
var node_process = __require("process");
|
|
5346
5346
|
var directives = require_directives();
|
|
@@ -5546,9 +5546,9 @@ ${end.comment}` : end.comment;
|
|
|
5546
5546
|
}
|
|
5547
5547
|
});
|
|
5548
5548
|
|
|
5549
|
-
// ../../node_modules/yaml/dist/parse/cst-scalar.js
|
|
5549
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-scalar.js
|
|
5550
5550
|
var require_cst_scalar = __commonJS({
|
|
5551
|
-
"../../node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
5551
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
5552
5552
|
"use strict";
|
|
5553
5553
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5554
5554
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -5731,9 +5731,9 @@ var require_cst_scalar = __commonJS({
|
|
|
5731
5731
|
}
|
|
5732
5732
|
});
|
|
5733
5733
|
|
|
5734
|
-
// ../../node_modules/yaml/dist/parse/cst-stringify.js
|
|
5734
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5735
5735
|
var require_cst_stringify = __commonJS({
|
|
5736
|
-
"../../node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
5736
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
5737
5737
|
"use strict";
|
|
5738
5738
|
var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
5739
5739
|
function stringifyToken(token) {
|
|
@@ -5792,9 +5792,9 @@ var require_cst_stringify = __commonJS({
|
|
|
5792
5792
|
}
|
|
5793
5793
|
});
|
|
5794
5794
|
|
|
5795
|
-
// ../../node_modules/yaml/dist/parse/cst-visit.js
|
|
5795
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-visit.js
|
|
5796
5796
|
var require_cst_visit = __commonJS({
|
|
5797
|
-
"../../node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
5797
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
5798
5798
|
"use strict";
|
|
5799
5799
|
var BREAK = Symbol("break visit");
|
|
5800
5800
|
var SKIP = Symbol("skip children");
|
|
@@ -5854,9 +5854,9 @@ var require_cst_visit = __commonJS({
|
|
|
5854
5854
|
}
|
|
5855
5855
|
});
|
|
5856
5856
|
|
|
5857
|
-
// ../../node_modules/yaml/dist/parse/cst.js
|
|
5857
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst.js
|
|
5858
5858
|
var require_cst = __commonJS({
|
|
5859
|
-
"../../node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
5859
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
5860
5860
|
"use strict";
|
|
5861
5861
|
var cstScalar = require_cst_scalar();
|
|
5862
5862
|
var cstStringify = require_cst_stringify();
|
|
@@ -5956,9 +5956,9 @@ var require_cst = __commonJS({
|
|
|
5956
5956
|
}
|
|
5957
5957
|
});
|
|
5958
5958
|
|
|
5959
|
-
// ../../node_modules/yaml/dist/parse/lexer.js
|
|
5959
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/lexer.js
|
|
5960
5960
|
var require_lexer = __commonJS({
|
|
5961
|
-
"../../node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
5961
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
5962
5962
|
"use strict";
|
|
5963
5963
|
var cst = require_cst();
|
|
5964
5964
|
function isEmpty(ch) {
|
|
@@ -6540,9 +6540,9 @@ var require_lexer = __commonJS({
|
|
|
6540
6540
|
}
|
|
6541
6541
|
});
|
|
6542
6542
|
|
|
6543
|
-
// ../../node_modules/yaml/dist/parse/line-counter.js
|
|
6543
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/line-counter.js
|
|
6544
6544
|
var require_line_counter = __commonJS({
|
|
6545
|
-
"../../node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
6545
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
6546
6546
|
"use strict";
|
|
6547
6547
|
var LineCounter = class {
|
|
6548
6548
|
constructor() {
|
|
@@ -6571,9 +6571,9 @@ var require_line_counter = __commonJS({
|
|
|
6571
6571
|
}
|
|
6572
6572
|
});
|
|
6573
6573
|
|
|
6574
|
-
// ../../node_modules/yaml/dist/parse/parser.js
|
|
6574
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/parser.js
|
|
6575
6575
|
var require_parser = __commonJS({
|
|
6576
|
-
"../../node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
6576
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
6577
6577
|
"use strict";
|
|
6578
6578
|
var node_process = __require("process");
|
|
6579
6579
|
var cst = require_cst();
|
|
@@ -7441,9 +7441,9 @@ var require_parser = __commonJS({
|
|
|
7441
7441
|
}
|
|
7442
7442
|
});
|
|
7443
7443
|
|
|
7444
|
-
// ../../node_modules/yaml/dist/public-api.js
|
|
7444
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/public-api.js
|
|
7445
7445
|
var require_public_api = __commonJS({
|
|
7446
|
-
"../../node_modules/yaml/dist/public-api.js"(exports) {
|
|
7446
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/public-api.js"(exports) {
|
|
7447
7447
|
"use strict";
|
|
7448
7448
|
var composer = require_composer();
|
|
7449
7449
|
var Document = require_Document();
|
|
@@ -7538,9 +7538,9 @@ var require_public_api = __commonJS({
|
|
|
7538
7538
|
}
|
|
7539
7539
|
});
|
|
7540
7540
|
|
|
7541
|
-
// ../../node_modules/yaml/dist/index.js
|
|
7541
|
+
// ../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/index.js
|
|
7542
7542
|
var require_dist2 = __commonJS({
|
|
7543
|
-
"../../node_modules/yaml/dist/index.js"(exports) {
|
|
7543
|
+
"../../node_modules/@earendil-works/pi-agent-core/node_modules/yaml/dist/index.js"(exports) {
|
|
7544
7544
|
"use strict";
|
|
7545
7545
|
var composer = require_composer();
|
|
7546
7546
|
var Document = require_Document();
|
|
@@ -13321,6 +13321,167 @@ function projectProviderUsage(usage) {
|
|
|
13321
13321
|
return result;
|
|
13322
13322
|
}
|
|
13323
13323
|
|
|
13324
|
+
// ../linkque-agent-runtime/dist/esm/impl/agent/pi/toolHistory.js
|
|
13325
|
+
var HISTORY_NAME = "tool_history";
|
|
13326
|
+
var HIDDEN_RESULT = "\u8BE5\u5DE5\u5177\u8FD4\u56DE\u7684\u654F\u611F\u5185\u5BB9\u672A\u4FDD\u5B58\u5728\u4F1A\u8BDD\u5386\u53F2\u4E2D\u3002";
|
|
13327
|
+
function restoreToolHistoryState(initialCount, checkpoint) {
|
|
13328
|
+
if (!checkpoint)
|
|
13329
|
+
return { start: initialCount, sensitivity: {} };
|
|
13330
|
+
const messages = checkpoint.messages;
|
|
13331
|
+
const start = checkpoint.modelHistoryStart ?? messages.map((message) => message.role).lastIndexOf("user") + 1;
|
|
13332
|
+
if (checkpoint.toolHistorySensitivity)
|
|
13333
|
+
return {
|
|
13334
|
+
start,
|
|
13335
|
+
sensitivity: structuredClone(checkpoint.toolHistorySensitivity)
|
|
13336
|
+
};
|
|
13337
|
+
const sensitivity = {};
|
|
13338
|
+
for (let index2 = start; index2 < messages.length; index2++) {
|
|
13339
|
+
const assistant = messages[index2];
|
|
13340
|
+
if (assistant?.role !== "assistant")
|
|
13341
|
+
continue;
|
|
13342
|
+
for (const block of assistant.content) {
|
|
13343
|
+
if (block.type !== "toolCall")
|
|
13344
|
+
continue;
|
|
13345
|
+
sensitivity[`${index2}:${block.id}`] = { input: true, output: true };
|
|
13346
|
+
}
|
|
13347
|
+
}
|
|
13348
|
+
return { start, sensitivity };
|
|
13349
|
+
}
|
|
13350
|
+
function copyContent(content) {
|
|
13351
|
+
return content.map((block) => block.type === "text" ? {
|
|
13352
|
+
type: "text",
|
|
13353
|
+
text: block.text,
|
|
13354
|
+
...block.textSignature !== void 0 && {
|
|
13355
|
+
textSignature: block.textSignature
|
|
13356
|
+
}
|
|
13357
|
+
} : { type: "image", data: block.data, mimeType: block.mimeType });
|
|
13358
|
+
}
|
|
13359
|
+
function collectToolHistory(messages, start, sensitivity) {
|
|
13360
|
+
const turns = [];
|
|
13361
|
+
for (let index2 = start; index2 < messages.length; index2++) {
|
|
13362
|
+
const assistant = messages[index2];
|
|
13363
|
+
if (assistant?.role !== "assistant")
|
|
13364
|
+
continue;
|
|
13365
|
+
const results = /* @__PURE__ */ new Map();
|
|
13366
|
+
for (let next = index2 + 1; next < messages.length; next++) {
|
|
13367
|
+
const result = messages[next];
|
|
13368
|
+
if (result?.role !== "toolResult")
|
|
13369
|
+
break;
|
|
13370
|
+
results.set(result.toolCallId, result);
|
|
13371
|
+
}
|
|
13372
|
+
if (!results.size)
|
|
13373
|
+
continue;
|
|
13374
|
+
const batch = {
|
|
13375
|
+
type: "tool.history",
|
|
13376
|
+
api: assistant.api,
|
|
13377
|
+
provider: assistant.provider,
|
|
13378
|
+
model: assistant.model,
|
|
13379
|
+
calls: []
|
|
13380
|
+
};
|
|
13381
|
+
for (const call of assistant.content) {
|
|
13382
|
+
if (call.type !== "toolCall")
|
|
13383
|
+
continue;
|
|
13384
|
+
const result = results.get(call.id);
|
|
13385
|
+
if (!result || result.toolName !== call.name)
|
|
13386
|
+
continue;
|
|
13387
|
+
const fields = sensitivity[`${index2}:${call.id}`];
|
|
13388
|
+
const hideOutput = fields?.output || fields?.input && result.isError && result.content.some((block) => block.type === "text" && block.text.startsWith('Validation failed for tool "') && block.text.includes("\n\nReceived arguments:\n"));
|
|
13389
|
+
batch.calls.push({
|
|
13390
|
+
id: call.id,
|
|
13391
|
+
toolName: call.name,
|
|
13392
|
+
arguments: fields?.input ? {} : structuredClone(call.arguments),
|
|
13393
|
+
...!fields?.input && call.thoughtSignature !== void 0 && {
|
|
13394
|
+
thoughtSignature: call.thoughtSignature
|
|
13395
|
+
},
|
|
13396
|
+
content: hideOutput ? [{ type: "text", text: HIDDEN_RESULT }] : copyContent(result.content),
|
|
13397
|
+
isError: result.isError,
|
|
13398
|
+
...!hideOutput && result.addedToolNames && {
|
|
13399
|
+
addedToolNames: [...result.addedToolNames]
|
|
13400
|
+
}
|
|
13401
|
+
});
|
|
13402
|
+
}
|
|
13403
|
+
if (batch.calls.length)
|
|
13404
|
+
turns.push({ role: "tool", name: HISTORY_NAME, content: batch });
|
|
13405
|
+
}
|
|
13406
|
+
return turns;
|
|
13407
|
+
}
|
|
13408
|
+
function isRecord(value) {
|
|
13409
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13410
|
+
}
|
|
13411
|
+
function isContentBlock(value) {
|
|
13412
|
+
if (!isRecord(value))
|
|
13413
|
+
return false;
|
|
13414
|
+
if (value.type === "text")
|
|
13415
|
+
return typeof value.text === "string" && (value.textSignature === void 0 || typeof value.textSignature === "string");
|
|
13416
|
+
return value.type === "image" && typeof value.data === "string" && typeof value.mimeType === "string";
|
|
13417
|
+
}
|
|
13418
|
+
function readCall(value) {
|
|
13419
|
+
if (!isRecord(value) || typeof value.id !== "string" || !value.id || !isRecord(value.arguments) || typeof value.isError !== "boolean" || value.thoughtSignature !== void 0 && typeof value.thoughtSignature !== "string")
|
|
13420
|
+
return;
|
|
13421
|
+
const { toolName, content, addedToolNames } = value;
|
|
13422
|
+
if (typeof toolName !== "string" || !toolName || !Array.isArray(content) || !content.every(isContentBlock) || addedToolNames !== void 0 && (!Array.isArray(addedToolNames) || !addedToolNames.every((name) => typeof name === "string")))
|
|
13423
|
+
return;
|
|
13424
|
+
return {
|
|
13425
|
+
id: value.id,
|
|
13426
|
+
toolName,
|
|
13427
|
+
arguments: structuredClone(value.arguments),
|
|
13428
|
+
...value.thoughtSignature !== void 0 && {
|
|
13429
|
+
thoughtSignature: value.thoughtSignature
|
|
13430
|
+
},
|
|
13431
|
+
content: copyContent(content),
|
|
13432
|
+
isError: value.isError,
|
|
13433
|
+
...addedToolNames && { addedToolNames: [...addedToolNames] }
|
|
13434
|
+
};
|
|
13435
|
+
}
|
|
13436
|
+
function restoreToolHistory(turn) {
|
|
13437
|
+
if (turn.role !== "tool" || turn.name !== HISTORY_NAME)
|
|
13438
|
+
return;
|
|
13439
|
+
const batch = turn.content;
|
|
13440
|
+
if (!isRecord(batch) || batch.type !== "tool.history" || typeof batch.api !== "string" || typeof batch.provider !== "string" || typeof batch.model !== "string" || !Array.isArray(batch.calls) || !batch.calls.length)
|
|
13441
|
+
return [];
|
|
13442
|
+
const calls = batch.calls.map(readCall);
|
|
13443
|
+
if (!calls.every((call) => call !== void 0) || new Set(calls.map((call) => call.id)).size !== calls.length)
|
|
13444
|
+
return [];
|
|
13445
|
+
const timestamp = Date.now();
|
|
13446
|
+
const assistant = {
|
|
13447
|
+
role: "assistant",
|
|
13448
|
+
api: batch.api,
|
|
13449
|
+
provider: batch.provider,
|
|
13450
|
+
model: batch.model,
|
|
13451
|
+
content: calls.map((call) => ({
|
|
13452
|
+
type: "toolCall",
|
|
13453
|
+
name: call.toolName,
|
|
13454
|
+
id: call.id,
|
|
13455
|
+
arguments: call.arguments,
|
|
13456
|
+
...call.thoughtSignature !== void 0 && {
|
|
13457
|
+
thoughtSignature: call.thoughtSignature
|
|
13458
|
+
}
|
|
13459
|
+
})),
|
|
13460
|
+
usage: {
|
|
13461
|
+
input: 0,
|
|
13462
|
+
output: 0,
|
|
13463
|
+
cacheRead: 0,
|
|
13464
|
+
cacheWrite: 0,
|
|
13465
|
+
totalTokens: 0,
|
|
13466
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }
|
|
13467
|
+
},
|
|
13468
|
+
stopReason: "toolUse",
|
|
13469
|
+
timestamp
|
|
13470
|
+
};
|
|
13471
|
+
return [
|
|
13472
|
+
assistant,
|
|
13473
|
+
...calls.map((call) => ({
|
|
13474
|
+
role: "toolResult",
|
|
13475
|
+
toolCallId: call.id,
|
|
13476
|
+
toolName: call.toolName,
|
|
13477
|
+
content: call.content,
|
|
13478
|
+
isError: call.isError,
|
|
13479
|
+
...call.addedToolNames && { addedToolNames: call.addedToolNames },
|
|
13480
|
+
timestamp
|
|
13481
|
+
}))
|
|
13482
|
+
];
|
|
13483
|
+
}
|
|
13484
|
+
|
|
13324
13485
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.js
|
|
13325
13486
|
var anthropicMessagesApi = () => lazyApi(() => import("../../anthropic-messages-TBZKK7UX.js"));
|
|
13326
13487
|
|
|
@@ -13344,13 +13505,13 @@ var bedrockModuleOverride;
|
|
|
13344
13505
|
var bedrockConverseStreamApi = () => lazyApi(async () => bedrockModuleOverride ?? await importNodeOnlyApi("./bedrock-converse-stream.ts"));
|
|
13345
13506
|
|
|
13346
13507
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.js
|
|
13347
|
-
var googleGenerativeAIApi = () => lazyApi(() => import("../../google-generative-ai-
|
|
13508
|
+
var googleGenerativeAIApi = () => lazyApi(() => import("../../google-generative-ai-5VYDRFFM.js"));
|
|
13348
13509
|
|
|
13349
13510
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.js
|
|
13350
|
-
var googleVertexApi = () => lazyApi(() => import("../../google-vertex-
|
|
13511
|
+
var googleVertexApi = () => lazyApi(() => import("../../google-vertex-JO4CT7NF.js"));
|
|
13351
13512
|
|
|
13352
13513
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.js
|
|
13353
|
-
var mistralConversationsApi = () => lazyApi(() => import("../../mistral-conversations-
|
|
13514
|
+
var mistralConversationsApi = () => lazyApi(() => import("../../mistral-conversations-43TLMTO6.js"));
|
|
13354
13515
|
|
|
13355
13516
|
// ../../node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.js
|
|
13356
13517
|
var openAICodexResponsesApi = () => lazyApi(() => import("../../openai-codex-responses-HYLTKNTN.js"));
|
|
@@ -43436,14 +43597,14 @@ function openrouterProvider() {
|
|
|
43436
43597
|
|
|
43437
43598
|
// ../../node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js
|
|
43438
43599
|
var DEFAULT_RADIUS_GATEWAY = "https://radius.pi.dev";
|
|
43439
|
-
function
|
|
43600
|
+
function isRecord2(value) {
|
|
43440
43601
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43441
43602
|
}
|
|
43442
43603
|
function isRadiusGatewayModel(value) {
|
|
43443
|
-
return
|
|
43604
|
+
return isRecord2(value) && typeof value.id === "string" && typeof value.name === "string" && typeof value.reasoning === "boolean" && Array.isArray(value.input) && isRecord2(value.cost) && typeof value.contextWindow === "number" && typeof value.maxTokens === "number";
|
|
43444
43605
|
}
|
|
43445
43606
|
function sanitizeRadiusGatewayConfig(config) {
|
|
43446
|
-
if (!
|
|
43607
|
+
if (!isRecord2(config) || typeof config.baseUrl !== "string" || !Array.isArray(config.models))
|
|
43447
43608
|
return void 0;
|
|
43448
43609
|
return {
|
|
43449
43610
|
baseUrl: config.baseUrl,
|
|
@@ -44908,7 +45069,7 @@ async function createAgentSession(options) {
|
|
|
44908
45069
|
thinkingLevel: options.thinkingLevel ?? "off",
|
|
44909
45070
|
tools: toPiAgentTools(options.tools ?? [], options.emitToolEvent, () => filterSnapshot ? new PiAIFilter(options.models, filterSnapshot.model, filterSnapshot.context, filterSnapshot.options) : void 0, () => {
|
|
44910
45071
|
finishTurn = true;
|
|
44911
|
-
}),
|
|
45072
|
+
}, markToolHistorySensitive),
|
|
44912
45073
|
messages: options.authorization?.checkpoint ? [] : options.initialMessages ?? [],
|
|
44913
45074
|
systemPrompt: options.systemPrompt ?? ""
|
|
44914
45075
|
},
|
|
@@ -45069,19 +45230,60 @@ async function createAgentSession(options) {
|
|
|
45069
45230
|
getApiKey: options.getApiKey
|
|
45070
45231
|
});
|
|
45071
45232
|
const listeners = /* @__PURE__ */ new Set();
|
|
45233
|
+
let historyStart = options.initialMessages?.length ?? 0;
|
|
45234
|
+
let policies = options.toolHistorySensitivity ?? {};
|
|
45235
|
+
const descriptors = new Map((options.tools ?? []).filter((tool) => tool.annotations?.sensitiveInput === true || tool.annotations?.sensitiveOutput === true).map((tool) => [
|
|
45236
|
+
tool.modelName ?? tool.name,
|
|
45237
|
+
{
|
|
45238
|
+
input: tool.annotations?.sensitiveInput === true,
|
|
45239
|
+
output: tool.annotations?.sensitiveOutput === true
|
|
45240
|
+
}
|
|
45241
|
+
]));
|
|
45242
|
+
function markToolHistorySensitive(id, fields) {
|
|
45243
|
+
if (!fields.input && !fields.output)
|
|
45244
|
+
return;
|
|
45245
|
+
const messages = agent.state.messages;
|
|
45246
|
+
for (let index2 = messages.length - 1; index2 >= 0; index2--) {
|
|
45247
|
+
if (messages[index2]?.role !== "assistant")
|
|
45248
|
+
continue;
|
|
45249
|
+
const key2 = `${index2}:${id}`;
|
|
45250
|
+
policies[key2] = {
|
|
45251
|
+
...policies[key2],
|
|
45252
|
+
...fields.input && { input: true },
|
|
45253
|
+
...fields.output && { output: true }
|
|
45254
|
+
};
|
|
45255
|
+
return;
|
|
45256
|
+
}
|
|
45257
|
+
}
|
|
45258
|
+
const recordDeclaredSensitivity = (event) => {
|
|
45259
|
+
if (event.type !== "tool_execution_start")
|
|
45260
|
+
return;
|
|
45261
|
+
const fields = descriptors.get(event.toolName);
|
|
45262
|
+
if (fields)
|
|
45263
|
+
markToolHistorySensitive(event.toolCallId, fields);
|
|
45264
|
+
};
|
|
45265
|
+
const unsubscribeHistory = descriptors.size ? agent.subscribe(recordDeclaredSensitivity) : void 0;
|
|
45072
45266
|
const emit = (event) => {
|
|
45267
|
+
recordDeclaredSensitivity(event);
|
|
45073
45268
|
for (const listener of listeners)
|
|
45074
45269
|
listener(event);
|
|
45075
45270
|
};
|
|
45076
45271
|
return {
|
|
45077
45272
|
session: {
|
|
45078
45273
|
snapshot: () => JSON.parse(JSON.stringify(agent.state.messages)),
|
|
45274
|
+
collectToolHistory: (start = historyStart) => collectToolHistory(agent.state.messages, start, policies),
|
|
45079
45275
|
stop: () => agent.abort(),
|
|
45080
45276
|
resume: async (checkpoint) => {
|
|
45081
45277
|
agent.state.messages = checkpoint.messages;
|
|
45082
45278
|
finishTurn = agent.state.messages.some((message) => message.role === "toolResult" && isAgentToolResult(message.details) && message.details.finishTurn === true);
|
|
45279
|
+
if (!options.toolHistorySensitivity) {
|
|
45280
|
+
const restored = restoreToolHistoryState(0, checkpoint);
|
|
45281
|
+
historyStart = restored.start;
|
|
45282
|
+
policies = restored.sensitivity;
|
|
45283
|
+
} else
|
|
45284
|
+
historyStart = checkpoint.modelHistoryStart ?? historyStart;
|
|
45083
45285
|
const assistant = agent.state.messages.reduce((latest, message) => message.role === "assistant" ? message : latest, void 0);
|
|
45084
|
-
const answered = new Set(agent.state.messages.filter((message) => message.role === "toolResult").map((message) => message.toolCallId));
|
|
45286
|
+
const answered = new Set(agent.state.messages.slice(assistant ? agent.state.messages.indexOf(assistant) + 1 : 0).filter((message) => message.role === "toolResult").map((message) => message.toolCallId));
|
|
45085
45287
|
const calls = assistant?.content.filter((content) => content.type === "toolCall" && !answered.has(content.id)) ?? [];
|
|
45086
45288
|
if (assistant && calls.length > 0) {
|
|
45087
45289
|
filterSnapshot = {
|
|
@@ -45175,6 +45377,7 @@ async function createAgentSession(options) {
|
|
|
45175
45377
|
// 状态)等价替代。误吞异常,避免污染已产出的流。
|
|
45176
45378
|
dispose: () => {
|
|
45177
45379
|
try {
|
|
45380
|
+
unsubscribeHistory?.();
|
|
45178
45381
|
agent.abort();
|
|
45179
45382
|
agent.reset();
|
|
45180
45383
|
} catch (error) {
|
|
@@ -45213,7 +45416,7 @@ function safeModelLog(logSink, line) {
|
|
|
45213
45416
|
warnLogFailure("createAgentSession.timingLog", error);
|
|
45214
45417
|
}
|
|
45215
45418
|
}
|
|
45216
|
-
function toPiAgentTools(descriptors, emitToolEvent = () => void 0, createAIFilter, onFinishTurn) {
|
|
45419
|
+
function toPiAgentTools(descriptors, emitToolEvent = () => void 0, createAIFilter, onFinishTurn, markToolHistorySensitive) {
|
|
45217
45420
|
const names = /* @__PURE__ */ new Set();
|
|
45218
45421
|
return descriptors.map((descriptor) => {
|
|
45219
45422
|
const name = descriptor.modelName ?? descriptor.name;
|
|
@@ -45232,6 +45435,9 @@ function toPiAgentTools(descriptors, emitToolEvent = () => void 0, createAIFilte
|
|
|
45232
45435
|
const result = await descriptor.execute(args, signal, {
|
|
45233
45436
|
toolCallId,
|
|
45234
45437
|
emit: emitToolEvent,
|
|
45438
|
+
...markToolHistorySensitive && {
|
|
45439
|
+
markToolHistorySensitive: (fields) => markToolHistorySensitive(toolCallId, fields)
|
|
45440
|
+
},
|
|
45235
45441
|
...createAIFilter && { aiFilter: createAIFilter() }
|
|
45236
45442
|
});
|
|
45237
45443
|
if (isAgentPresentationToolResult(result) || isAgentPresentationSkippedToolResult(result) || isAgentToolResult(result)) {
|
|
@@ -45280,14 +45486,14 @@ function getToolUiStatusEnabledNames(descriptors) {
|
|
|
45280
45486
|
}
|
|
45281
45487
|
function decorateToolParametersWithUiStatus(value) {
|
|
45282
45488
|
const parameters = normalizeParameters(value);
|
|
45283
|
-
if (!
|
|
45489
|
+
if (!isRecord3(parameters) || parameters.type !== "object") {
|
|
45284
45490
|
return { parameters, enabled: false };
|
|
45285
45491
|
}
|
|
45286
45492
|
if ([...UNSAFE_TOOL_SCHEMA_KEYS].some((key2) => key2 in parameters)) {
|
|
45287
45493
|
return { parameters, enabled: false };
|
|
45288
45494
|
}
|
|
45289
45495
|
const properties = parameters.properties;
|
|
45290
|
-
if (properties !== void 0 && !
|
|
45496
|
+
if (properties !== void 0 && !isRecord3(properties)) {
|
|
45291
45497
|
return { parameters, enabled: false };
|
|
45292
45498
|
}
|
|
45293
45499
|
const required = parameters.required;
|
|
@@ -45306,12 +45512,12 @@ function decorateToolParametersWithUiStatus(value) {
|
|
|
45306
45512
|
};
|
|
45307
45513
|
}
|
|
45308
45514
|
function stripToolUiStatusArgument(value) {
|
|
45309
|
-
if (!
|
|
45515
|
+
if (!isRecord3(value) || !(TOOL_UI_STATUS_ARGUMENT in value))
|
|
45310
45516
|
return value;
|
|
45311
45517
|
const { [TOOL_UI_STATUS_ARGUMENT]: _status, ...args } = value;
|
|
45312
45518
|
return args;
|
|
45313
45519
|
}
|
|
45314
|
-
function
|
|
45520
|
+
function isRecord3(value) {
|
|
45315
45521
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
45316
45522
|
}
|
|
45317
45523
|
function normalizeParameters(value) {
|
|
@@ -45722,6 +45928,8 @@ var StreamBridge = class {
|
|
|
45722
45928
|
unsubscribe;
|
|
45723
45929
|
stopAuthorizationListener;
|
|
45724
45930
|
uiStatusToolNames;
|
|
45931
|
+
hasImageInput;
|
|
45932
|
+
toolHistory;
|
|
45725
45933
|
constructor(prompt, auth, options, images, createSession, linkqueBaseUrl) {
|
|
45726
45934
|
this.prompt = prompt;
|
|
45727
45935
|
this.auth = auth;
|
|
@@ -45730,6 +45938,9 @@ var StreamBridge = class {
|
|
|
45730
45938
|
this.createSession = createSession;
|
|
45731
45939
|
this.linkqueBaseUrl = linkqueBaseUrl;
|
|
45732
45940
|
this.uiStatusToolNames = getToolUiStatusEnabledNames(options.tools ?? []);
|
|
45941
|
+
const containsImage = (message) => (message.role === "toolResult" || message.role === "user") && Array.isArray(message.content) && message.content.some((block) => block.type === "image");
|
|
45942
|
+
this.hasImageInput = images.length > 0 || Array.isArray(prompt) && prompt.some(containsImage) || (options.initialMessages?.some(containsImage) ?? false) || (options.authorization?.checkpoint?.messages?.some(containsImage) ?? false);
|
|
45943
|
+
this.toolHistory = restoreToolHistoryState(options.initialMessages?.length ?? 0, options.authorization?.checkpoint);
|
|
45733
45944
|
}
|
|
45734
45945
|
/** 产出事件直到 done/error;迭代异常(return()/throw())时走 finally 清理。 */
|
|
45735
45946
|
async *iterate() {
|
|
@@ -45845,6 +46056,9 @@ var StreamBridge = class {
|
|
|
45845
46056
|
const created = await this.createSession({
|
|
45846
46057
|
authorization: this.options.authorization,
|
|
45847
46058
|
initialMessages: this.options.authorization?.checkpoint ? [] : this.options.initialMessages,
|
|
46059
|
+
...this.options.onToolHistory && {
|
|
46060
|
+
toolHistorySensitivity: this.toolHistory.sensitivity
|
|
46061
|
+
},
|
|
45848
46062
|
signal: this.options.signal,
|
|
45849
46063
|
cwd: this.options.cwd,
|
|
45850
46064
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -45898,6 +46112,10 @@ var StreamBridge = class {
|
|
|
45898
46112
|
});
|
|
45899
46113
|
this.stopAuthorizationListener = this.options.authorization?.onPause(() => {
|
|
45900
46114
|
const checkpoint = this.options.authorization.snapshot(this.session?.snapshot?.() ?? []);
|
|
46115
|
+
if (this.options.onToolHistory) {
|
|
46116
|
+
checkpoint.modelHistoryStart = this.toolHistory.start;
|
|
46117
|
+
checkpoint.toolHistorySensitivity = structuredClone(this.toolHistory.sensitivity);
|
|
46118
|
+
}
|
|
45901
46119
|
this.settled = true;
|
|
45902
46120
|
this.enqueue({ type: "authorization_pause", checkpoint });
|
|
45903
46121
|
this.session?.stop?.();
|
|
@@ -45928,6 +46146,11 @@ var StreamBridge = class {
|
|
|
45928
46146
|
enqueue(ev) {
|
|
45929
46147
|
if (this.aborted || this.sessionDisposed)
|
|
45930
46148
|
return;
|
|
46149
|
+
if (ev.type === "done" && this.options.onToolHistory) {
|
|
46150
|
+
const turns = this.session?.collectToolHistory?.(this.toolHistory.start);
|
|
46151
|
+
for (const turn of turns ?? [])
|
|
46152
|
+
this.options.onToolHistory([turn], turn.content.calls.map((call) => call.id));
|
|
46153
|
+
}
|
|
45931
46154
|
if (this.settled && ev.type !== "error" && ev.type !== "done" && ev.type !== "authorization_pause" && this.queue.length === 0) {
|
|
45932
46155
|
return;
|
|
45933
46156
|
}
|
|
@@ -45987,7 +46210,7 @@ var StreamBridge = class {
|
|
|
45987
46210
|
}
|
|
45988
46211
|
}
|
|
45989
46212
|
get isSensitiveRun() {
|
|
45990
|
-
return this.
|
|
46213
|
+
return this.hasImageInput || this.options.tools?.some((tool) => tool.annotations?.sensitiveOutput === true || tool.annotations?.sensitiveInput === true) === true;
|
|
45991
46214
|
}
|
|
45992
46215
|
};
|
|
45993
46216
|
|
|
@@ -46143,6 +46366,7 @@ var PiAgentLoop = class {
|
|
|
46143
46366
|
yield* this.agentService.streamChat(messages, req.auth, {
|
|
46144
46367
|
authorization: req.authorization,
|
|
46145
46368
|
initialMessages,
|
|
46369
|
+
onToolHistory: req.onToolHistory,
|
|
46146
46370
|
...req.cwd !== void 0 && { cwd: req.cwd },
|
|
46147
46371
|
...req.model !== void 0 && { model: req.model },
|
|
46148
46372
|
...req.signal !== void 0 && { signal: req.signal },
|
|
@@ -46180,7 +46404,7 @@ async function prepareSessionMessages(req, fetchImpl = fetch) {
|
|
|
46180
46404
|
if (!Number.isInteger(count) || count < 0 || count > req.messages.length) {
|
|
46181
46405
|
throw new Error("Invalid historyMessageCount");
|
|
46182
46406
|
}
|
|
46183
|
-
const history = await mapPromptMessages({ ...req, messages: req.messages.slice(0, count) }, fetchImpl);
|
|
46407
|
+
const history = await mapPromptMessages({ ...req, messages: req.messages.slice(0, count) }, fetchImpl, true);
|
|
46184
46408
|
const current = await mapPromptMessages({
|
|
46185
46409
|
...req,
|
|
46186
46410
|
systemPrompt: history.systemPrompt,
|
|
@@ -46188,11 +46412,16 @@ async function prepareSessionMessages(req, fetchImpl = fetch) {
|
|
|
46188
46412
|
}, fetchImpl);
|
|
46189
46413
|
return { ...current, initialMessages: history.messages };
|
|
46190
46414
|
}
|
|
46191
|
-
async function mapPromptMessages(req, fetchImpl = fetch) {
|
|
46415
|
+
async function mapPromptMessages(req, fetchImpl = fetch, fromSessionHistory = false) {
|
|
46192
46416
|
const messages = [];
|
|
46193
46417
|
const instructions = req.systemPrompt ? [req.systemPrompt] : [];
|
|
46194
46418
|
for (const turn of req.messages) {
|
|
46195
46419
|
if (turn.role === "tool") {
|
|
46420
|
+
const restored = fromSessionHistory && restoreToolHistory(turn);
|
|
46421
|
+
if (restored) {
|
|
46422
|
+
messages.push(...restored);
|
|
46423
|
+
continue;
|
|
46424
|
+
}
|
|
46196
46425
|
const content = turn.content;
|
|
46197
46426
|
if (turn.name === "a2ui_presentation_receipt" && content?.type === "a2ui.presentation-receipt") {
|
|
46198
46427
|
continue;
|
|
@@ -46314,6 +46543,75 @@ function safeStringify(value) {
|
|
|
46314
46543
|
}
|
|
46315
46544
|
}
|
|
46316
46545
|
|
|
46546
|
+
// ../linkque-agent-runtime/dist/esm/core/runHistory.js
|
|
46547
|
+
function presentationReceiptTurn(receipt) {
|
|
46548
|
+
return {
|
|
46549
|
+
role: "tool",
|
|
46550
|
+
name: "a2ui_presentation_receipt",
|
|
46551
|
+
content: {
|
|
46552
|
+
type: "a2ui.presentation-receipt",
|
|
46553
|
+
receipt: projectPresentationReceiptForModel(receipt)
|
|
46554
|
+
}
|
|
46555
|
+
};
|
|
46556
|
+
}
|
|
46557
|
+
var RunHistory = class {
|
|
46558
|
+
entries;
|
|
46559
|
+
batches = [];
|
|
46560
|
+
constructor(entries) {
|
|
46561
|
+
this.entries = structuredClone(entries);
|
|
46562
|
+
}
|
|
46563
|
+
text(content, separator = "") {
|
|
46564
|
+
if (!content)
|
|
46565
|
+
return;
|
|
46566
|
+
const last = this.entries.at(-1);
|
|
46567
|
+
if (last && "role" in last && last.role === "assistant" && typeof last.content === "string") {
|
|
46568
|
+
last.content += separator + content;
|
|
46569
|
+
} else {
|
|
46570
|
+
this.entries.push({ role: "assistant", content });
|
|
46571
|
+
}
|
|
46572
|
+
}
|
|
46573
|
+
receipt(receipt, sourceCallId) {
|
|
46574
|
+
const turn = presentationReceiptTurn(receipt);
|
|
46575
|
+
for (let index2 = this.entries.length - 1; index2 >= 0; index2--) {
|
|
46576
|
+
const entry = this.entries[index2];
|
|
46577
|
+
if ("cardInstanceId" in entry && entry.cardInstanceId === receipt.cardInstanceId && entry.sourceCallId === sourceCallId) {
|
|
46578
|
+
this.entries[index2] = turn;
|
|
46579
|
+
return;
|
|
46580
|
+
}
|
|
46581
|
+
}
|
|
46582
|
+
this.entries.push(turn);
|
|
46583
|
+
}
|
|
46584
|
+
tools(turns, callIds) {
|
|
46585
|
+
if (callIds?.length)
|
|
46586
|
+
this.batches.push({ turns, callIds });
|
|
46587
|
+
else
|
|
46588
|
+
this.entries.push(...turns);
|
|
46589
|
+
}
|
|
46590
|
+
complete(input) {
|
|
46591
|
+
const positions = /* @__PURE__ */ new Map();
|
|
46592
|
+
const ordered = this.entries.map((entry, index2) => {
|
|
46593
|
+
if ("role" in entry)
|
|
46594
|
+
return [entry];
|
|
46595
|
+
if ("cardInstanceId" in entry)
|
|
46596
|
+
return [];
|
|
46597
|
+
const slots = positions.get(entry.toolCallId) ?? [];
|
|
46598
|
+
slots.push(index2);
|
|
46599
|
+
positions.set(entry.toolCallId, slots);
|
|
46600
|
+
return [];
|
|
46601
|
+
});
|
|
46602
|
+
const unplaced = [];
|
|
46603
|
+
for (const { turns, callIds } of this.batches) {
|
|
46604
|
+
const slots = callIds.map((id) => positions.get(id)?.shift());
|
|
46605
|
+
const first = slots.find((index2) => index2 !== void 0);
|
|
46606
|
+
(first === void 0 ? unplaced : ordered[first]).push(...turns);
|
|
46607
|
+
}
|
|
46608
|
+
const output = [...unplaced, ...ordered.flat()];
|
|
46609
|
+
if (!output.some((turn) => turn.role === "assistant"))
|
|
46610
|
+
output.push({ role: "assistant", content: "" });
|
|
46611
|
+
return [...input, ...output];
|
|
46612
|
+
}
|
|
46613
|
+
};
|
|
46614
|
+
|
|
46317
46615
|
// ../linkque-agent-runtime/dist/esm/impl/plugin/sessionMemoryTools.js
|
|
46318
46616
|
function parse3(args, fields) {
|
|
46319
46617
|
if (!args || typeof args !== "object" || Array.isArray(args) || Object.keys(args).some((field) => !fields.includes(field)))
|
|
@@ -46626,22 +46924,6 @@ var MemoryPlugin = class {
|
|
|
46626
46924
|
};
|
|
46627
46925
|
};
|
|
46628
46926
|
|
|
46629
|
-
// ../linkque-agent-runtime/dist/esm/core/createCompletedAgentTurns.js
|
|
46630
|
-
function createCompletedAgentTurns(input, receipts, answer) {
|
|
46631
|
-
return [
|
|
46632
|
-
...input,
|
|
46633
|
-
...receipts.map((receipt) => ({
|
|
46634
|
-
role: "tool",
|
|
46635
|
-
name: "a2ui_presentation_receipt",
|
|
46636
|
-
content: {
|
|
46637
|
-
type: "a2ui.presentation-receipt",
|
|
46638
|
-
receipt: projectPresentationReceiptForModel(receipt)
|
|
46639
|
-
}
|
|
46640
|
-
})),
|
|
46641
|
-
{ role: "assistant", content: answer }
|
|
46642
|
-
];
|
|
46643
|
-
}
|
|
46644
|
-
|
|
46645
46927
|
// ../linkque-agent-runtime/dist/esm/core/inputExecution.js
|
|
46646
46928
|
var AgentInputExecutionError = class extends Error {
|
|
46647
46929
|
code;
|
|
@@ -47791,6 +48073,7 @@ var CardRenderMcpServer = class {
|
|
|
47791
48073
|
description: createPresentationDescription(config),
|
|
47792
48074
|
inputSchema: config.argumentMode === "model" ? createA2UICardPipelineModelInputSchema(config.dataSources) : config.presentationInputSchema,
|
|
47793
48075
|
execute: async (args, signal, context) => {
|
|
48076
|
+
this.observeCard(context, resource, config, "pipeline", context?.toolCallId);
|
|
47794
48077
|
const startedAt = Date.now();
|
|
47795
48078
|
try {
|
|
47796
48079
|
const result = await executeCardDataPipeline({
|
|
@@ -49024,6 +49307,12 @@ var AgentRuntime = class _AgentRuntime {
|
|
|
49024
49307
|
let assistantText = options.authorization?.checkpoint?.assistantText ?? "";
|
|
49025
49308
|
let assistantMessageId;
|
|
49026
49309
|
const presentationReceipts = options.authorization?.checkpoint?.receipts ?? [];
|
|
49310
|
+
const history = new RunHistory(options.authorization?.checkpoint?.historyEntries ?? [
|
|
49311
|
+
...presentationReceipts.map(presentationReceiptTurn),
|
|
49312
|
+
...assistantText ? [{ role: "assistant", content: assistantText }] : []
|
|
49313
|
+
]);
|
|
49314
|
+
if (sessionId !== void 0)
|
|
49315
|
+
agentReq.onToolHistory = (turns, callIds) => history.tools(turns, callIds);
|
|
49027
49316
|
let failed = false;
|
|
49028
49317
|
let runError;
|
|
49029
49318
|
let terminalHookDispatched = false;
|
|
@@ -49058,21 +49347,32 @@ var AgentRuntime = class _AgentRuntime {
|
|
|
49058
49347
|
if (ev.type === "authorization_pause") {
|
|
49059
49348
|
ev.checkpoint.assistantText = assistantText;
|
|
49060
49349
|
ev.checkpoint.receipts = presentationReceipts;
|
|
49350
|
+
ev.checkpoint.historyEntries = history.entries;
|
|
49061
49351
|
terminalHookDispatched = true;
|
|
49062
49352
|
yield ev;
|
|
49063
49353
|
return;
|
|
49064
49354
|
}
|
|
49355
|
+
if (ev.type === "a2ui_card")
|
|
49356
|
+
history.entries.push({
|
|
49357
|
+
cardInstanceId: ev.metadata.cardInstanceId,
|
|
49358
|
+
sourceCallId: ev.metadata.source?.toolCallId
|
|
49359
|
+
});
|
|
49360
|
+
if (ev.type === "tool_start")
|
|
49361
|
+
history.entries.push({ toolCallId: ev.toolCallId });
|
|
49065
49362
|
if (ev.type === "delta") {
|
|
49066
|
-
|
|
49067
|
-
|
|
49363
|
+
const separator = assistantText && ev.messageId && ev.messageId !== assistantMessageId ? "\n\n" : "";
|
|
49364
|
+
assistantText += separator;
|
|
49365
|
+
history.text(ev.content, separator);
|
|
49068
49366
|
assistantMessageId = ev.messageId;
|
|
49069
49367
|
assistantText += ev.content;
|
|
49070
49368
|
}
|
|
49071
49369
|
if (ev.type === "tool_end" && !ev.isError) {
|
|
49072
49370
|
const details = ev.result && typeof ev.result === "object" && "details" in ev.result ? ev.result.details : void 0;
|
|
49073
49371
|
for (const receipt of readToolPresentationReceipts(details ?? ev.result)) {
|
|
49074
|
-
if (!presentationReceipts.some((saved) => saved.cardInstanceId === receipt.cardInstanceId && saved.source?.invocationId === receipt.source?.invocationId))
|
|
49372
|
+
if (!presentationReceipts.some((saved) => saved.cardInstanceId === receipt.cardInstanceId && saved.source?.invocationId === receipt.source?.invocationId)) {
|
|
49075
49373
|
presentationReceipts.push(receipt);
|
|
49374
|
+
history.receipt(receipt, receipt.source?.toolCallId);
|
|
49375
|
+
}
|
|
49076
49376
|
}
|
|
49077
49377
|
}
|
|
49078
49378
|
if (ev.type === "error") {
|
|
@@ -49081,7 +49381,7 @@ var AgentRuntime = class _AgentRuntime {
|
|
|
49081
49381
|
await dispatchTerminalHook();
|
|
49082
49382
|
}
|
|
49083
49383
|
if (ev.type === "done" && !failed && sessionId !== void 0) {
|
|
49084
|
-
await this.commitCompletedRun(sessionId, newTurns, presentationReceipts,
|
|
49384
|
+
await this.commitCompletedRun(sessionId, history.complete(newTurns), presentationReceipts, options, observation, context.pluginRuns);
|
|
49085
49385
|
}
|
|
49086
49386
|
if (ev.type === "done")
|
|
49087
49387
|
await dispatchTerminalHook();
|
|
@@ -49102,10 +49402,10 @@ var AgentRuntime = class _AgentRuntime {
|
|
|
49102
49402
|
publicOutput.finish(false);
|
|
49103
49403
|
}
|
|
49104
49404
|
}
|
|
49105
|
-
/**
|
|
49106
|
-
async commitCompletedRun(sessionId,
|
|
49405
|
+
/** 一次提交本轮输入、工具记录、卡片回执和助手文本,成功后通知追问快照回调。 */
|
|
49406
|
+
async commitCompletedRun(sessionId, turns, presentationReceipts, options, observation, pluginRuns) {
|
|
49107
49407
|
const completion = {
|
|
49108
|
-
turns
|
|
49408
|
+
turns,
|
|
49109
49409
|
presentationReceipts,
|
|
49110
49410
|
suppressFollowUp: false
|
|
49111
49411
|
};
|
|
@@ -51192,7 +51492,7 @@ var OpenGwRemoteAgentTransport = class {
|
|
|
51192
51492
|
throw new RemoteAgentError("A2A_SIGN_FAILED");
|
|
51193
51493
|
}
|
|
51194
51494
|
}
|
|
51195
|
-
if (credentials.apassSourceProvider !== (this.options.sandboxApass ? `
|
|
51495
|
+
if (credentials.apassSourceProvider !== (this.options.sandboxApass ? "shiji_debug" : `shiji_${request.scope.agentId}`) || credentials.apassSourceUserId !== credentials.userId) {
|
|
51196
51496
|
throw new RemoteAgentError("A2A_SIGN_FAILED");
|
|
51197
51497
|
}
|
|
51198
51498
|
}
|
|
@@ -51422,7 +51722,7 @@ function createOpenGwSigner(options) {
|
|
|
51422
51722
|
throw new RemoteAgentError("A2A_SIGN_FAILED");
|
|
51423
51723
|
report({ stage: "sign.credentials", outcome: "started" });
|
|
51424
51724
|
const value = a2aObject(envelope.data ?? envelope);
|
|
51425
|
-
if (sandboxMode && (!userId || value.userId !== userId || value.apassSourceProvider !==
|
|
51725
|
+
if (sandboxMode && (!userId || value.userId !== userId || value.apassSourceProvider !== "shiji_debug"))
|
|
51426
51726
|
throw new RemoteAgentError("A2A_SIGN_FAILED");
|
|
51427
51727
|
return {
|
|
51428
51728
|
authorization: a2aString(value.authorization),
|
|
@@ -52725,6 +53025,45 @@ function createAppbaseMemoryAdapter(client, options = {}) {
|
|
|
52725
53025
|
return new AppbaseMemoryAdapter(() => new Memory(getClient()), () => new Databases(getClient()), options.databaseId, options.tableId);
|
|
52726
53026
|
}
|
|
52727
53027
|
|
|
53028
|
+
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/ports/sessionEntries.js
|
|
53029
|
+
import { createHash as createHash7 } from "node:crypto";
|
|
53030
|
+
var COLUMN_LIMIT = 8192;
|
|
53031
|
+
var digest = (text3) => createHash7("sha256").update(text3).digest("hex");
|
|
53032
|
+
function encodeSessionEntry(json) {
|
|
53033
|
+
if (json.length <= COLUMN_LIMIT || Array.from(json).length <= COLUMN_LIMIT)
|
|
53034
|
+
return [json];
|
|
53035
|
+
const parts = Buffer.from(json).toString("base64").match(/.{1,8192}/g);
|
|
53036
|
+
return [`parts:${parts.length}:${digest(json)}`, ...parts];
|
|
53037
|
+
}
|
|
53038
|
+
function decodeSessionEntries(entries) {
|
|
53039
|
+
const result = [];
|
|
53040
|
+
for (let index2 = 0; index2 < entries.length; index2++) {
|
|
53041
|
+
const entry = entries[index2];
|
|
53042
|
+
if (typeof entry !== "string")
|
|
53043
|
+
continue;
|
|
53044
|
+
if (entry.trimStart().startsWith("{")) {
|
|
53045
|
+
result.push(entry);
|
|
53046
|
+
continue;
|
|
53047
|
+
}
|
|
53048
|
+
const header = /^(parts|tool-history-v1|mcp-history-v1):([1-9]\d*):([a-f0-9]{64})$/u.exec(entry);
|
|
53049
|
+
if (!header)
|
|
53050
|
+
continue;
|
|
53051
|
+
const count = Number(header[2]);
|
|
53052
|
+
if (count > entries.length - index2 - 1)
|
|
53053
|
+
continue;
|
|
53054
|
+
const parts = entries.slice(index2 + 1, index2 + count + 1);
|
|
53055
|
+
const legacy = header[1] !== "parts";
|
|
53056
|
+
if (!parts.every((part) => typeof part === "string" && (legacy ? part.startsWith("+") : /^[A-Za-z0-9+/]+=*$/u.test(part))))
|
|
53057
|
+
continue;
|
|
53058
|
+
const json = legacy ? parts.map((part) => part.slice(1)).join("") : Buffer.from(parts.join(""), "base64").toString("utf8");
|
|
53059
|
+
if (digest(json) !== header[3])
|
|
53060
|
+
continue;
|
|
53061
|
+
result.push(json);
|
|
53062
|
+
index2 += count;
|
|
53063
|
+
}
|
|
53064
|
+
return result;
|
|
53065
|
+
}
|
|
53066
|
+
|
|
52728
53067
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/ports/appbaseSessionManager.js
|
|
52729
53068
|
var SESSION_TURN_COLUMN_SIZE = 16380;
|
|
52730
53069
|
var AppbaseSessionManager = class {
|
|
@@ -52772,7 +53111,10 @@ function safeParseTurn(json) {
|
|
|
52772
53111
|
}
|
|
52773
53112
|
function createAppBaseSessionStore(databases, databaseId, tableId) {
|
|
52774
53113
|
return {
|
|
52775
|
-
read: async (sessionId) =>
|
|
53114
|
+
read: async (sessionId) => {
|
|
53115
|
+
const row = await storesRead(databases, databaseId, tableId, sessionId);
|
|
53116
|
+
return row && { sessionId, turns: decodeSessionEntries(row.turns) };
|
|
53117
|
+
},
|
|
52776
53118
|
create: async (sessionId) => {
|
|
52777
53119
|
await databases.createDocument(databaseId, tableId, sessionId, {
|
|
52778
53120
|
sessionId,
|
|
@@ -52792,7 +53134,10 @@ function createAppBaseSessionStore(databases, databaseId, tableId) {
|
|
|
52792
53134
|
}
|
|
52793
53135
|
async function appendSerializedTurns(databases, databaseId, tableId, sessionId, turnJsons) {
|
|
52794
53136
|
const row = await storesRead(databases, databaseId, tableId, sessionId);
|
|
52795
|
-
const turns =
|
|
53137
|
+
const turns = [
|
|
53138
|
+
...row?.turns ?? [],
|
|
53139
|
+
...turnJsons.flatMap(encodeSessionEntry)
|
|
53140
|
+
];
|
|
52796
53141
|
if (row) {
|
|
52797
53142
|
await databases.updateDocument(databaseId, tableId, sessionId, { turns });
|
|
52798
53143
|
} else {
|
|
@@ -53078,11 +53423,11 @@ function describeHookExecutorAssembly(ports, mcpAuthHeader, hasLinkquegwEventPlu
|
|
|
53078
53423
|
}
|
|
53079
53424
|
|
|
53080
53425
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/externalActionStore.js
|
|
53081
|
-
import { createHash as
|
|
53426
|
+
import { createHash as createHash8 } from "node:crypto";
|
|
53082
53427
|
var ExternalActionUnknownError = class extends Error {
|
|
53083
53428
|
};
|
|
53084
53429
|
function externalActionKey(scope, action) {
|
|
53085
|
-
return "eq_" +
|
|
53430
|
+
return "eq_" + createHash8("sha256").update(JSON.stringify([
|
|
53086
53431
|
scope.ownerId,
|
|
53087
53432
|
scope.agentId,
|
|
53088
53433
|
scope.environment,
|
|
@@ -53093,7 +53438,7 @@ function externalActionKey(scope, action) {
|
|
|
53093
53438
|
}
|
|
53094
53439
|
function externalActionDigest(action, text3) {
|
|
53095
53440
|
const context = action.context === void 0 ? null : parseBusinessContext(action.context);
|
|
53096
|
-
return
|
|
53441
|
+
return createHash8("sha256").update(JSON.stringify({ actionId: action.actionId, context, text: text3 })).digest("hex");
|
|
53097
53442
|
}
|
|
53098
53443
|
function createExternalActionStore(databases, databaseId, tableId, sessionTable, schemaReader) {
|
|
53099
53444
|
const get = async (key2, threadId) => {
|
|
@@ -53103,10 +53448,10 @@ function createExternalActionStore(databases, databaseId, tableId, sessionTable,
|
|
|
53103
53448
|
]);
|
|
53104
53449
|
if (documents.length === 0)
|
|
53105
53450
|
return void 0;
|
|
53106
|
-
const { digest, runId, threadId: storedThreadId, messageId, createdAt, state: state2 } = documents[0];
|
|
53107
|
-
if (storedThreadId !== threadId || typeof
|
|
53451
|
+
const { digest: digest2, runId, threadId: storedThreadId, messageId, createdAt, state: state2 } = documents[0];
|
|
53452
|
+
if (storedThreadId !== threadId || typeof digest2 !== "string" || !/^[a-f0-9]{64}$/u.test(digest2) || typeof runId !== "string" || !runId.trim() || typeof messageId !== "string" || !messageId.trim() || typeof createdAt !== "string" || !createdAt.trim() || state2 !== "started" && state2 !== "claimed")
|
|
53108
53453
|
throw new ExternalActionUnknownError();
|
|
53109
|
-
return { digest, runId, threadId, messageId, createdAt, state: state2 };
|
|
53454
|
+
return { digest: digest2, runId, threadId, messageId, createdAt, state: state2 };
|
|
53110
53455
|
};
|
|
53111
53456
|
return {
|
|
53112
53457
|
async ready() {
|
|
@@ -53189,7 +53534,7 @@ function resolveExternalQueryDeps(requireExecutionConfig, env, deps, historyOwne
|
|
|
53189
53534
|
}
|
|
53190
53535
|
|
|
53191
53536
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/authorizationStore.js
|
|
53192
|
-
import { createHash as
|
|
53537
|
+
import { createHash as createHash9, randomUUID as randomUUID8 } from "node:crypto";
|
|
53193
53538
|
|
|
53194
53539
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/transactionRetry.js
|
|
53195
53540
|
var TRANSACTION_RETRY_DELAYS_MS = [50, 100];
|
|
@@ -53573,7 +53918,7 @@ function createAuthorizationCardPayload(state2) {
|
|
|
53573
53918
|
|
|
53574
53919
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/authorizationStore.js
|
|
53575
53920
|
function protocolFingerprint(protocol2) {
|
|
53576
|
-
return
|
|
53921
|
+
return createHash9("sha256").update(JSON.stringify(protocol2)).digest("hex");
|
|
53577
53922
|
}
|
|
53578
53923
|
function createAuthorizationRecord(ownerId, agentId, request, checkpoint, protocolHash) {
|
|
53579
53924
|
const id = randomUUID8();
|
|
@@ -53776,7 +54121,7 @@ function createAuthorizationStore(databases, databaseId, sessionStorage, runInde
|
|
|
53776
54121
|
data: {
|
|
53777
54122
|
turns: [
|
|
53778
54123
|
...session.turns ?? [],
|
|
53779
|
-
...turns
|
|
54124
|
+
...turns.flatMap(encodeSessionEntry)
|
|
53780
54125
|
]
|
|
53781
54126
|
}
|
|
53782
54127
|
});
|
|
@@ -53981,7 +54326,7 @@ import { emitWarning } from "node:process";
|
|
|
53981
54326
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
53982
54327
|
|
|
53983
54328
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/conversationSearchStore.js
|
|
53984
|
-
import { createHash as
|
|
54329
|
+
import { createHash as createHash10 } from "node:crypto";
|
|
53985
54330
|
var SEARCH_MESSAGE_SEGMENT_LENGTH = 4096;
|
|
53986
54331
|
var SEARCH_MESSAGE_SEGMENT_OVERLAP = 63;
|
|
53987
54332
|
var SEARCH_QUERY_BATCH_LIMIT = 50;
|
|
@@ -54137,7 +54482,7 @@ function normalizeSearchContent(value) {
|
|
|
54137
54482
|
return value.replace(/\s+/g, " ").trim();
|
|
54138
54483
|
}
|
|
54139
54484
|
function createSearchDocumentId(ownerId, message, segmentIndex) {
|
|
54140
|
-
return
|
|
54485
|
+
return createHash10("sha256").update([
|
|
54141
54486
|
ownerId,
|
|
54142
54487
|
message.agentId,
|
|
54143
54488
|
message.threadId,
|
|
@@ -54916,7 +55261,7 @@ function createAppBaseStore(databases, databaseId, tableId, ownerId) {
|
|
|
54916
55261
|
}
|
|
54917
55262
|
|
|
54918
55263
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/chunkSink.js
|
|
54919
|
-
import { createHash as
|
|
55264
|
+
import { createHash as createHash11 } from "node:crypto";
|
|
54920
55265
|
var ChunkSink = class {
|
|
54921
55266
|
storage;
|
|
54922
55267
|
chunkSize;
|
|
@@ -55100,8 +55445,8 @@ var ChunkSink = class {
|
|
|
55100
55445
|
}
|
|
55101
55446
|
};
|
|
55102
55447
|
function createTerminalChunkId(runId) {
|
|
55103
|
-
const
|
|
55104
|
-
return `terminal_${
|
|
55448
|
+
const digest2 = createHash11("sha256").update(runId).digest("hex");
|
|
55449
|
+
return `terminal_${digest2.slice(0, 27)}`;
|
|
55105
55450
|
}
|
|
55106
55451
|
function isUncertainWriteError(error) {
|
|
55107
55452
|
if (error instanceof TypeError)
|
|
@@ -55111,7 +55456,7 @@ function isUncertainWriteError(error) {
|
|
|
55111
55456
|
}
|
|
55112
55457
|
|
|
55113
55458
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/ports/appbaseSessionLease.js
|
|
55114
|
-
import { createHash as
|
|
55459
|
+
import { createHash as createHash12 } from "node:crypto";
|
|
55115
55460
|
var DEFAULT_LEASE_TTL_MS = 20 * 60 * 1e3;
|
|
55116
55461
|
var TRANSACTION_TTL_SECONDS = 60;
|
|
55117
55462
|
var LEASE_RELEASE_MAX_ATTEMPTS = 3;
|
|
@@ -55191,8 +55536,8 @@ async function tryCreate(persistence, leaseId, ownerId) {
|
|
|
55191
55536
|
}
|
|
55192
55537
|
}
|
|
55193
55538
|
function createSessionLeaseId(threadId) {
|
|
55194
|
-
const
|
|
55195
|
-
return `lease_${
|
|
55539
|
+
const digest2 = createHash12("sha256").update(threadId).digest("hex");
|
|
55540
|
+
return `lease_${digest2.slice(0, 30)}`;
|
|
55196
55541
|
}
|
|
55197
55542
|
async function mutateIfOwner(databases, databaseId, tableId, leaseId, expectedOwnerId, stageMutation) {
|
|
55198
55543
|
const transaction = await databases.createTransaction({
|
|
@@ -55613,27 +55958,27 @@ function wrapMcpServer(server, debugLog) {
|
|
|
55613
55958
|
};
|
|
55614
55959
|
}
|
|
55615
55960
|
function summarizeMcpResult(result) {
|
|
55616
|
-
const object3 =
|
|
55961
|
+
const object3 = isRecord4(result) ? result : void 0;
|
|
55617
55962
|
const content = Array.isArray(object3?.content) ? object3.content : void 0;
|
|
55618
55963
|
const summary = {
|
|
55619
55964
|
resultType: valueType(result),
|
|
55620
55965
|
resultKeys: objectKeys(object3),
|
|
55621
55966
|
structuredContentType: valueType(object3?.structuredContent),
|
|
55622
|
-
structuredContentKeys: objectKeys(
|
|
55967
|
+
structuredContentKeys: objectKeys(isRecord4(object3?.structuredContent) ? object3.structuredContent : void 0),
|
|
55623
55968
|
contentCount: content?.length ?? 0,
|
|
55624
|
-
contentTypes: content?.map((item) =>
|
|
55969
|
+
contentTypes: content?.map((item) => isRecord4(item) && typeof item.type === "string" ? item.type : valueType(item))
|
|
55625
55970
|
};
|
|
55626
55971
|
if (typeof object3?.isError === "boolean")
|
|
55627
55972
|
summary.isError = object3.isError;
|
|
55628
55973
|
if (object3?.isError === true) {
|
|
55629
|
-
const errorText = content?.find((item) =>
|
|
55630
|
-
if (
|
|
55974
|
+
const errorText = content?.find((item) => isRecord4(item) && item.type === "text" && typeof item.text === "string");
|
|
55975
|
+
if (isRecord4(errorText) && typeof errorText.text === "string") {
|
|
55631
55976
|
summary.errorMessage = sanitizeDiagnosticText(errorText.text);
|
|
55632
55977
|
}
|
|
55633
55978
|
}
|
|
55634
55979
|
return summary;
|
|
55635
55980
|
}
|
|
55636
|
-
function
|
|
55981
|
+
function isRecord4(value) {
|
|
55637
55982
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
55638
55983
|
}
|
|
55639
55984
|
function objectKeys(value) {
|
|
@@ -55780,7 +56125,7 @@ function createRemoteClientCapabilityPort(_store) {
|
|
|
55780
56125
|
}
|
|
55781
56126
|
|
|
55782
56127
|
// ../linkque-agent-appwrite-integrate/dist/esm/runtime/appbaseTelemetry.js
|
|
55783
|
-
import { createHash as
|
|
56128
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
55784
56129
|
function createAppbaseTelemetry(options) {
|
|
55785
56130
|
const diagnostic = (code) => {
|
|
55786
56131
|
try {
|
|
@@ -55804,7 +56149,7 @@ function createAppbaseTelemetry(options) {
|
|
|
55804
56149
|
telemetry = new NoopRuntimeTelemetry();
|
|
55805
56150
|
}
|
|
55806
56151
|
const { authorizationHeader, mode } = options.gatewayAuth;
|
|
55807
|
-
const version =
|
|
56152
|
+
const version = createHash13("sha256").update(authorizationHeader).digest("hex");
|
|
55808
56153
|
return {
|
|
55809
56154
|
telemetry,
|
|
55810
56155
|
createContext(requestId) {
|
|
@@ -57009,16 +57354,16 @@ async function runChat(method, bodyJSON, env, deps, logCtx, historyOwnerId, appw
|
|
|
57009
57354
|
const key2 = externalActionKey(scope, action);
|
|
57010
57355
|
actionKey = key2;
|
|
57011
57356
|
const message = request.messages.find((value) => value.id === action.messageId);
|
|
57012
|
-
const
|
|
57357
|
+
const digest2 = externalActionDigest(action, message.content);
|
|
57013
57358
|
const result = await cfg.externalActionStore.claim(key2, {
|
|
57014
|
-
digest,
|
|
57359
|
+
digest: digest2,
|
|
57015
57360
|
runId: request.runId,
|
|
57016
57361
|
threadId: request.threadId,
|
|
57017
57362
|
messageId: action.messageId,
|
|
57018
57363
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
57019
57364
|
});
|
|
57020
57365
|
if (!result.accepted) {
|
|
57021
|
-
if (result.receipt.digest !==
|
|
57366
|
+
if (result.receipt.digest !== digest2)
|
|
57022
57367
|
return jsonError(409, "external_action_conflict", "External action content conflicts");
|
|
57023
57368
|
if (result.receipt.state !== "started")
|
|
57024
57369
|
throw new ExternalActionUnknownError();
|