@stardustlc/dsh-dream 0.9.0 → 0.9.1
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 +5 -0
- package/README.en.md +2 -0
- package/README.md +2 -0
- package/lib/knowledge-store.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
[历史英文记录](docs/CHANGELOG.en.md)
|
|
6
6
|
|
|
7
|
+
## 0.9.1(2026-10-17)
|
|
8
|
+
|
|
9
|
+
- **优化:派生索引改为紧凑序列化**。`index.json` 是机器读取的派生数据,去掉缩进后 1000 条经验从 1359KB 降到 926KB(−32%),每次写入少序列化/落盘约三分之一的数据(1000 条实测单次写入 18.2ms → 16.6ms)。
|
|
10
|
+
- 读路径不变:checkpoint 的 `snapshot+tail` 校验仍通过(1000 条读回 `replayMode=snapshot+tail`、无截断、无坏行);`rebuildIndex()` 仍可从事件完整重建。
|
|
11
|
+
- **已知限制(未变)**:知识库写入仍是 O(历史)——每次写入都会重写整份派生索引。本版只是降低常数,不改变量级;增量 checkpoint 留待后续版本。
|
|
7
12
|
## 0.9.0 (2026-10-05)
|
|
8
13
|
|
|
9
14
|
- 安静 60 秒后整理,同项目/模型最多合并 4 轮;冷却与每日预算延后轮次,32 轮/24 小时的持久化队列支持重启恢复、取消保留和跨进程租约。
|
package/README.en.md
CHANGED
|
@@ -8,6 +8,8 @@ Collect candidate lessons from completed tasks, review them and reuse relevant m
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@stardustlc/dsh-dream) [](https://www.npmjs.com/package/@stardustlc/dsh-dream)
|
|
10
10
|
|
|
11
|
+
Feedback and contributions are welcome: report [issues](https://github.com/STARDUSTLC666/dsh-dream/issues) or submit [pull requests](https://github.com/STARDUSTLC666/dsh-dream/pulls).
|
|
12
|
+
|
|
11
13
|
## What it does
|
|
12
14
|
|
|
13
15
|
- Browse journals, retrieve lessons and inspect their sources.
|
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@stardustlc/dsh-dream) [](https://www.npmjs.com/package/@stardustlc/dsh-dream)
|
|
10
10
|
|
|
11
|
+
欢迎使用,遇到问题或有改进建议,请提交 [issues](https://github.com/STARDUSTLC666/dsh-dream/issues) 和 [PR](https://github.com/STARDUSTLC666/dsh-dream/pulls)。
|
|
12
|
+
|
|
11
13
|
## 功能
|
|
12
14
|
|
|
13
15
|
- 浏览梦境日记、检索经验并查看关联来源。
|
package/lib/knowledge-store.js
CHANGED
|
@@ -1774,7 +1774,8 @@ export class KnowledgeStore {
|
|
|
1774
1774
|
const target = this.indexPath;
|
|
1775
1775
|
const tmp = target + '.tmp-' + process.pid + '-' + randomUUID();
|
|
1776
1776
|
try {
|
|
1777
|
-
|
|
1777
|
+
// 索引是机器读取的派生数据:紧凑序列化可省 ~32% 体积并显著降低大库写放大。
|
|
1778
|
+
writeFileSync(tmp, JSON.stringify(payload) + '\n', 'utf8');
|
|
1778
1779
|
renameSync(tmp, target);
|
|
1779
1780
|
}
|
|
1780
1781
|
catch (error) {
|