engine7 7.1.128 → 7.1.130
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/dist/bg-worker.mjs +13 -6
- package/dist/cli.mjs +1562 -1398
- package/dist/engine-startup.mjs +3423 -3096
- package/dist/main.mjs +3604 -3298
- package/package.json +5 -4
package/dist/bg-worker.mjs
CHANGED
|
@@ -6563,12 +6563,16 @@ function applySocialInterpretation(store, scope, result, captured, requestKey, r
|
|
|
6563
6563
|
applied.relationships.push({ index: ordinal, label: relation.label, state: "ignored" });
|
|
6564
6564
|
continue;
|
|
6565
6565
|
}
|
|
6566
|
-
for (const
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6566
|
+
for (const field of ["validFrom", "validTo"]) {
|
|
6567
|
+
const value = relation[field];
|
|
6568
|
+
if (value === void 0) fail2("INVALID_SOCIAL_TIME", `${path8}.${field}`, "\u6B64\u5B57\u6BB5\u5FC5\u586B\uFF1B\u539F\u8BDD\u6CA1\u6709\u8BF4\u660E\u5173\u7CFB\u8D77\u6B62\u65F6\u523B\u65F6\u586B null\uFF0C\u4E0D\u8981\u586B\u8BF4\u8BDD\u65F6\u95F4\u3002");
|
|
6569
|
+
if (value !== null) {
|
|
6570
|
+
try {
|
|
6571
|
+
if (typeof value !== "string") throw new Error("INVALID_TIME");
|
|
6572
|
+
instant(value);
|
|
6573
|
+
} catch {
|
|
6574
|
+
fail2("INVALID_SOCIAL_TIME", `${path8}.${field}`, "\u975E null \u65F6\u95F4\u987B\u4E3A\u5B8C\u6574 ISO \u65F6\u523B\uFF0C\u5E26 Z \u6216 +08:00 \u7B49\u660E\u786E UTC \u504F\u79FB\uFF1B\u672A\u77E5\u65F6\u523B\u586B null\uFF0C\u4E0D\u8981\u731C\u6D4B\u3002");
|
|
6575
|
+
}
|
|
6572
6576
|
}
|
|
6573
6577
|
}
|
|
6574
6578
|
if (relation.validFrom !== null && relation.validFrom !== void 0) {
|
|
@@ -6594,6 +6598,9 @@ function applySocialInterpretation(store, scope, result, captured, requestKey, r
|
|
|
6594
6598
|
if (!perspectiveEntityId || !subjectId || !objectId) throw new Error(captured.providedSourceIds ? "SOCIAL_ENTITY_NOT_PROVIDED: relationships \u7684 perspective/subject/object \u53EA\u80FD\u586B\u672C\u6279 mentions.key \u6216 speaker\uFF1B\u5DF2\u6709\u5B9E\u4F53 ID \u586B mentions.entityId\uFF0C\u5148\u7528 memory_get \u7684 confirmedMentions \u63D0\u4F9B\u8EAB\u4EFD anchor\u3002\u7528\u6237\u539F\u8BDD\u5F52\u5C5E speaker\uFF1B\u81EA\u5DF1\u7684\u5224\u65AD\u5148 memory_write role=assistant\u3002\u65E0\u9700\u67E5\u627E\u6216\u521B\u5EFA owner\u3002" : "SOCIAL_ENTITY_NOT_PROVIDED");
|
|
6595
6599
|
if (["attitude", "feeling"].includes(relation.contentKind) && relation.direction !== "directed") throw new Error("INVALID_SOCIAL_RECIPROCITY");
|
|
6596
6600
|
if (relation.attribution !== void 0 && !["direct", "reported"].includes(relation.attribution)) throw new Error("INVALID_SOCIAL_ATTRIBUTION");
|
|
6601
|
+
if (relation.attributionQuote !== void 0 && relation.attribution !== "reported") {
|
|
6602
|
+
fail2("INVALID_SOCIAL_ATTRIBUTION", `${path8}.attributionQuote`, "attribution=direct\uFF08\u5305\u62EC\u9ED8\u8BA4\u76F4\u63A5\u9648\u8FF0\uFF09\u65F6\u5220\u9664 attributionQuote\uFF1B\u53EA\u6709\u539F\u8BDD\u660E\u786E\u8F6C\u8FF0\u53E6\u4E00\u4EBA\u7269\u89C2\u70B9\u65F6\u624D\u7528 reported\uFF0C\u5E76\u63D0\u4F9B\u8BE5\u4EBA\u7269\u7684 perspective \u548C\u8F6C\u8FF0\u5F15\u6587\u3002\u4E0D\u8981\u4E3A\u901A\u8FC7\u6821\u9A8C\u6539\u6210\u8F6C\u8FF0\u3002");
|
|
6603
|
+
}
|
|
6597
6604
|
if (relation.realm !== void 0 && !["real", "roleplay", "hypothetical"].includes(relation.realm)) throw new Error("INVALID_SOCIAL_REALM");
|
|
6598
6605
|
if (relation.sensitivity !== void 0 && !["normal", "sensitive"].includes(relation.sensitivity)) throw new Error("INVALID_SOCIAL_SENSITIVITY");
|
|
6599
6606
|
const reported = relation.attribution === "reported";
|