dsh-model-switch 0.4.51 → 0.4.52
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/CHANGELOG.md +8 -0
- package/lib/prime-memory-compat.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## v0.4.52
|
|
2
|
+
|
|
3
|
+
修复一个自维持的 recompose 循环(lab 实测定位,DSH 0.2.1-rc.3 + dsh-prime-memory 0.26.10):
|
|
4
|
+
|
|
5
|
+
- **根因**:记忆蒸馏适配层的幂等守卫把 `forms.describe()` 返回的值当 live 段顶层读,而该值是整行配置(`{ llm, live }`)→ 守卫永不命中 → 每次激活都向 memory 的 settings-set RPC 重推路由;memory 插件每次 set 都会把 live 段重新落盘(键序与上一次不同)→ profile 文档变化触发 recompose → 适配层再次激活 → 再次重推。表现为 profile 文档 mtime 约每 5-6 秒一跳、automode 的 `boot` 决策记录约 1.5 条/秒,宿主进程并不重启。
|
|
6
|
+
- **修复**:`memoryLiveMatchesRoute` 同时接受 live 段与整行两种形态(嵌套时取 `live`);命中即跳过推送。新增嵌套形态单测。
|
|
7
|
+
- **证据**:修复前 40 秒窗口 3 次内容变化,相邻快照 diff 仅为 `mdExportMaxRecords` 键序位移(内容相同);修复后 40 秒窗口 **1 次**变化(首启创建 memory 行),之后稳定。二分另确认:移除本插件后 30 秒 0 跳。
|
|
8
|
+
|
|
1
9
|
## v0.4.51
|
|
2
10
|
|
|
3
11
|
两处幂等加固,消除对 profile 文档的冗余写入:
|
|
@@ -276,8 +276,10 @@ const MEMORY_RPC_PATH = "/dsh-memory/rpc/settings-set";
|
|
|
276
276
|
* @returns true when a push would change nothing.
|
|
277
277
|
*/
|
|
278
278
|
function memoryLiveMatchesRoute(value, provider, model) {
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
const outer = value === null || typeof value !== "object" ? void 0 : value;
|
|
280
|
+
if (outer === void 0) return false;
|
|
281
|
+
const inner = outer.live;
|
|
282
|
+
const live = inner !== null && typeof inner === "object" ? inner : outer;
|
|
281
283
|
if (live.distillProvider !== provider || live.distillModel !== model) return false;
|
|
282
284
|
const chain = live.distillChain;
|
|
283
285
|
if (Array.isArray(chain) && chain.length !== 0) return false;
|