dsh-macro-memory 0.4.0 → 0.4.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/README.md +23 -7
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> 一个记忆插件,接管全部记忆能力:**8 个工具、一段 1,235 字符的常驻注入**,主库仍是 meow 的七层 SQLite,星图退成可重建的索引。
|
|
4
4
|
>
|
|
5
|
-
> 适用:DeepSeek Harness(DSH)。版本 **0.4.
|
|
5
|
+
> 适用:DeepSeek Harness(DSH)。版本 **0.4.1** · 许可 MIT · 内置 meow-memory 与 dsh-memory-nebula 的完整副本(均为 MIT,见[第三方声明](#第三方声明与来源))。
|
|
6
6
|
|
|
7
|
-
| 指标 | 融合前(三插件并存) | 现在(0.4.
|
|
7
|
+
| 指标 | 融合前(三插件并存) | 现在(0.4.1) | 变化 |
|
|
8
8
|
| --- | --- | --- | --- |
|
|
9
9
|
| 工具 schema 合计 | 17 个工具 / 56,759 B | **8 个工具 / 13,567 B** | **−76.1%** |
|
|
10
10
|
| 常驻注入 | 4,085 字符(meow 3,396 + nebula 689) | **1,235 字符(1 段)** | **−69.8%** |
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
> **0.4.0 里程碑**:这一版不换引擎、只把「账」和「刀」都做实——六件事全部带开关、带回滚、带能红证明:**口径单**(新建 `docs/EVAL-CLAIMS.md`,把可引用的与过期的分成两张表)、**查询分解** `multiQuery`(默认 `off`)、**写入端巩固** `consolidate`(默认 `suggest`,一个字不写库)、**写入端通胀体检**(`selfecho` / `unused` / `inflate` 三类)、**自动取代** `autoSupersede`(默认 `suggest`)、**实体星图**(四类硬事实成层,顺带修掉「两跳从来没跑过第二跳」的沉默 bug)、**共现自学习扩词**(词源取每条的 `keywords`,不靠人手枚举)。读数:**30 支自检 / 3,511 条可执行断言 / 约 220 秒**;gold 宽池 146 条 **照抄 1.000 / 换说法 1.000(14/14)**、关掉共现即退回 0.929(增量可归因);窄池 40 条换说法 0.929、时间锚 1.000;真库 635 条 40 问 hit@1 0.925、MRR 0.963。以上全部无 LLM,端到端 judge 仍未重测(口径见 `docs/EVAL-CLAIMS.md`)。
|
|
16
16
|
|
|
17
|
+
> **0.4.1**:只修文档口径——npm 上的 0.4.0 是在补完英文段之前打的包,包内 README 还停在 `13,372 B` 与「21 支 / 2,198 条」。0.4.1 不动任何代码逻辑,只让 GitHub 与 npm 上的 README 同 `tools/probe-host.mjs` 的 D3 实测对齐(13,567 B / 30 支 / 3,511 条)。
|
|
18
|
+
|
|
17
19
|
> **0.3.0 里程碑**:从 0.1 的「把三套记忆插件合成一套」走到这里,它已经是一条能自证的流水线——180 个补丁版本、**24 支自检 / 3,323 条可执行断言**(约 200 秒跑完;这是 0.3.0 发布那一刻的读数,现状见 §六 与 [`docs/EVAL-CLAIMS.md`](docs/EVAL-CLAIMS.md) 表 A),每次调参都留下读数、否决记录和阴性对照;检索三档在 146 条宽池上的读数是**照抄 1.000 / 换说法 0.929 / 时间锚 0.889**(每档配一条「关掉这把刀就变差」的对照)。到这里接口面已经冻结:**8 个 `memory_*` 工具、一段 1,235 字符注入、7 层 SQLite 主库、format-1 市场索引**——0.3 之后只加字段不删字段、只加工具不改名,旧调用原样能用。同时首发到 npm(`npm i dsh-macro-memory`)、GitHub 与 awesome-dsh-plugin 目录。
|
|
18
20
|
|
|
19
21
|
---
|
|
@@ -195,7 +197,7 @@ MEOW_VEC_CACHE=<记忆家目录>/dense-cache.json
|
|
|
195
197
|
|
|
196
198
|
| 项 | 融合前 | 现在 | 说明 |
|
|
197
199
|
| --- | --- | --- | --- |
|
|
198
|
-
| 工具 schema | 56,759 B(17 个) | **13,
|
|
200
|
+
| 工具 schema | 56,759 B(17 个) | **13,567 B(8 个)** | `tools/probe-host.mjs` 实测 D2/D3 判据(D3 会拿这张表的数字和实测对账) |
|
|
199
201
|
| 常驻注入 | 4,085 字符 | **1,235 字符** | 同一支探针 E2 判据,上限 1,400 |
|
|
200
202
|
| 旧工具名残留在注入里 | 有(`nebula_recall` 等) | **0** | E4 判据 |
|
|
201
203
|
| 别名工具 | — | 默认关闭 | 打开后 19 个工具,供老会话/老脚本过渡 |
|
|
@@ -493,12 +495,26 @@ docs/ INTERNAL.md 逐轮开发日志、images/ 配图
|
|
|
493
495
|
|
|
494
496
|
**Macro Memory** (DSH plugin, MIT) folds several memory plugins into one surface: **8 tools + a single 1,235-character standing injection**, while the storage engine stays meow-memory's seven-layer SQLite and the graph becomes a rebuildable index.
|
|
495
497
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
-
|
|
498
|
+
Headline numbers (v0.4.0, all reproducible offline):
|
|
499
|
+
|
|
500
|
+
- Tool schemas: 17 tools / 56,759 B → **8 tools / 13,567 B** (−76.1%).
|
|
501
|
+
- Standing prompt: 4,085 chars → **1,235 chars** (−69.8%); per-turn fixed cost ~14–16K → **~2.2K tokens**.
|
|
502
|
+
- Retrieval latency on a 1,200-memory store: **p50 2.9ms** (vs 107.2ms with three plugins stacked).
|
|
499
503
|
- Nothing was dropped: every original tool is reachable through the unified surface (audited by `tools/coverage-audit.mjs` and `tools/param-audit.mjs`).
|
|
500
504
|
- Writes land in the main store first; graph links that cannot be written are **queued, not lost** (500 entries, 7-day TTL, auto-flushed).
|
|
501
|
-
-
|
|
505
|
+
- **30 self-check suites / 3,511 executable assertions / ~220s**, and the assertion count itself is pinned per suite — deleting an assertion turns the run red.
|
|
506
|
+
- Self-built gold set (146 memories, no LLM): verbatim **1.000**, paraphrase **1.000** (0.929 with co-occurrence expansion off), time-anchored 0.889.
|
|
507
|
+
- Real local library (635 memories, 40 questions): hit@1 **0.925**, hit@5 **1.000**, MRR **0.963**.
|
|
508
|
+
- LoCoMo 1,536 questions (no LLM): hit@20 **0.7546** (old pipeline 0.651), MRR **0.4953** (old 0.3768), 17.77 average retrieved memories (old 19.99).
|
|
509
|
+
|
|
510
|
+
Why it beats stacking another memory plugin:
|
|
511
|
+
|
|
512
|
+
1. **It cuts the cost you re-pay every turn** — tool schemas and the standing injection are request prefix, so a byte saved is a byte saved on every single turn.
|
|
513
|
+
2. **Every feature has an off switch with a proven on/off gap** — query decomposition, consolidation, auto-supersede, entity layer, co-occurrence expansion, synonym bridge (`multiQuery`, `consolidate`, `autoSupersede`, `entity`, `coocLearn`, `synBridge`); default is the most conservative setting.
|
|
514
|
+
3. **One criterion, one implementation, and every criterion is proven able to fail** — no criterion is written twice with different strictness, and each one ships a fixture that must turn exactly that one red.
|
|
515
|
+
4. **Nothing new is allowed to lie** — write-side inflation checks (`selfecho`, `unused`, `inflate`) and supersede/carry-forward notes, so a stale conclusion never silently outranks the current one.
|
|
516
|
+
|
|
517
|
+
Honest limits: the gold set is self-built, not a public leaderboard; real-library numbers move as the library grows and are not comparable across time; no end-to-end LLM-judge run has been repeated since 0.4.0, so we claim no end-to-end gain.
|
|
502
518
|
|
|
503
519
|
Bundled third-party code is MIT: `meow-memory` © 2026 Phant0Meow ([source](https://github.com/Phant0Meow/dsh-meow-memory)), `dsh-memory-nebula` © 2026 the authors. See `THIRD-PARTY-NOTICES.md` for the exact list of modifications.
|
|
504
520
|
|
package/lib/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import { withCost } from './macro/cost.js'
|
|
|
24
24
|
import { NEIGHBOR_DEFAULT_CHARS, NEIGHBOR_DEFAULT_MAX, createNeighborInjector } from './macro/neighbor.js'
|
|
25
25
|
|
|
26
26
|
export const name = 'macro-memory'
|
|
27
|
-
export const version = '0.4.
|
|
27
|
+
export const version = '0.4.1'
|
|
28
28
|
export const inject = ['tools']
|
|
29
29
|
|
|
30
30
|
/** 融合层自己的默认值;配置里可写在顶层,也可写在 macro: 段下。 */
|
package/package.json
CHANGED