@modusensus/dsh-mneme 0.9.4 → 0.9.5
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/README.md +53 -10
- package/bin/cli.mjs +215 -2
- package/docs/CONFIGURATION.md +4 -2
- package/docs/DAEMON.md +9 -2
- package/docs/DISTILL.md +66 -4
- package/docs/SHARE.md +552 -0
- package/docs/SLEEP.md +1 -1
- package/docs/STORAGE.md +1 -1
- package/lib/api-standalone.js +286 -8
- package/lib/api.js +195 -1
- package/lib/client.js +783 -30
- package/lib/document.js +15 -2
- package/lib/dream/decisions.js +88 -3
- package/lib/dream/sleep.js +63 -13
- package/lib/dream.js +65 -9
- package/lib/lang.js +23 -6
- package/lib/memory-source.js +9 -0
- package/lib/organize.js +5 -1
- package/lib/pipeline.js +62 -1
- package/lib/provenance-http.js +126 -0
- package/lib/serve.js +13 -0
- package/lib/service.js +67 -4
- package/lib/share-http.js +281 -0
- package/lib/share-import.js +234 -0
- package/lib/share.js +335 -0
- package/lib/store.js +272 -11
- package/lib/summarize.js +60 -11
- package/package.json +1 -1
- package/src/api-standalone.js +286 -8
- package/src/api.js +195 -1
- package/src/document.js +15 -2
- package/src/dream/decisions.js +88 -3
- package/src/dream/sleep.js +63 -13
- package/src/dream.js +65 -9
- package/src/lang.js +23 -6
- package/src/memory-source.js +9 -0
- package/src/organize.js +5 -1
- package/src/pipeline.js +62 -1
- package/src/provenance-http.js +126 -0
- package/src/serve.js +13 -0
- package/src/service.js +67 -4
- package/src/share-http.js +281 -0
- package/src/share-import.js +234 -0
- package/src/share.js +335 -0
- package/src/store.js +272 -11
- package/src/summarize.js +60 -11
- package/test/api.test.js +370 -2
- package/test/audit.test.js +2 -2
- package/test/cli-receive.test.js +390 -0
- package/test/cli-share.test.js +437 -0
- package/test/client-share.test.js +225 -0
- package/test/client.test.js +139 -0
- package/test/dedupe-candidate-window.test.js +180 -0
- package/test/dream-candidate-hybrid.test.js +2 -2
- package/test/dream-fence.test.js +164 -0
- package/test/dream.test.js +87 -5
- package/test/helpers/dream-mock.js +6 -2
- package/test/llm-message-source.test.js +1 -1
- package/test/mint-source.test.js +1 -1
- package/test/pipeline-r1r2.test.js +129 -0
- package/test/policy-epoch.test.js +2 -2
- package/test/provenance-http.test.js +184 -0
- package/test/readme-claims.test.js +45 -0
- package/test/reasoning-effort.test.js +10 -10
- package/test/scope-candidates.test.js +7 -4
- package/test/scope-state.test.js +130 -1
- package/test/serve.test.js +62 -0
- package/test/share-foreign-rows.test.js +144 -0
- package/test/share-http.test.js +144 -0
- package/test/share-import.test.js +577 -0
- package/test/share-imported-guard.test.js +311 -0
- package/test/share-imported-identity.test.js +111 -0
- package/test/share-pack.test.js +511 -0
- package/test/share-receive-http.test.js +756 -0
- package/test/share-routes.test.js +337 -0
- package/test/share-store.test.js +133 -0
- package/test/share-validate.test.js +101 -0
- package/test/standalone-api.test.js +524 -5
- package/test/summarize-parse-diagnostics.test.js +75 -0
- package/test/summarize.test.js +15 -2
package/test/summarize.test.js
CHANGED
|
@@ -861,9 +861,22 @@ test("an all-invalid summary leaves the same window retryable until valid memori
|
|
|
861
861
|
assert.equal(retryTranscript, firstTranscript, "retry receives the original transcript");
|
|
862
862
|
assert.equal(service.count(), 1);
|
|
863
863
|
assert.equal(service.list()[0].content, valid.content);
|
|
864
|
+
// #502:这一族(JSON 合法、条目全被枚举滤掉)从此报成 filtered-empty 的专属消息,
|
|
865
|
+
// 不再与「模型压根没写数组」共用 invalid summary JSON。状态与「窗口可重试」不变,
|
|
866
|
+
// 所以下面三条断言一条都不放松。
|
|
864
867
|
assert.ok(service.listLlmAudits({ source: "autoSummarize" }).some(
|
|
865
|
-
(audit) => audit.status === "error" && audit.error_message ===
|
|
866
|
-
), "an all-invalid summary must be audited as an error");
|
|
868
|
+
(audit) => audit.status === "error" && audit.error_message === `no valid summary entries (arr=${invalid.length}, valid=0)`
|
|
869
|
+
), "an all-invalid summary must be audited as an error, named as a filtered-empty window");
|
|
870
|
+
// metadata 读回来可能是串也可能是对象(store 存的是 JSON 串,列表接口按形状
|
|
871
|
+
// 解析过),两种形状都归一成串再判——否则这条锁会随下游解析行为假红。
|
|
872
|
+
const metaText = (audit) => {
|
|
873
|
+
const m = audit.metadata;
|
|
874
|
+
if (typeof m === "string") return m;
|
|
875
|
+
try { return JSON.stringify(m ?? ""); } catch { return ""; }
|
|
876
|
+
};
|
|
877
|
+
assert.ok(service.listLlmAudits({ source: "autoSummarize" }).some(
|
|
878
|
+
(audit) => audit.status === "error" && metaText(audit).includes("filtered-empty")
|
|
879
|
+
), "metadata 要能说出是滤空而不是没写格式(sample_types 带着模型自造的分类词)");
|
|
867
880
|
|
|
868
881
|
await handler(session, { seq: 2, type: "turn/end" });
|
|
869
882
|
assert.equal(calls.length, 2, "the successfully retried window is consumed once");
|