dsh-mnemos-continuity 1.5.10 → 1.6.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/INSTALL.md CHANGED
@@ -52,14 +52,17 @@ ls ~/.dsh/profiles # 看有哪些 profile(桌面版一般是 desktop
52
52
  本包是标准 **bundle**:`package.json` 里带了 `dsh.bundle.patch` 声明,
53
53
  所以**装上去它自己会登记到组合树里**,你不用手工改 profile 补丁。
54
54
 
55
- ### 方式 A(推荐):从包名 / GitHub 装
55
+ ### 方式 A(推荐):从 npm 装
56
+
57
+ > npm 页面:<https://www.npmjs.com/package/dsh-mnemos-continuity>(版本号以那里为准)
58
+ > 项目名仍叫 **Mnemos**;`continuity` 指的是"换会话、换模型之后判断还能接着用"。
56
59
 
57
60
  ```bash
58
- dsh plugin --profile <profile> add dsh-mnemos-continuity # 从 npm(发布后可用)
61
+ dsh plugin --profile <profile> add dsh-mnemos-continuity # 从 npm 安装(已发布)
59
62
  dsh plugin --profile <profile> add github:<user>/<repo> # 从 GitHub 直装
60
63
  ```
61
64
 
62
- ### 方式 B:从本地目录装(还没发布时用这个)
65
+ ### 方式 B:从本地目录装(想用仓库里的代码、或离线时)
63
66
 
64
67
  ```bash
65
68
  # 路径可以带引号;Windows 用正斜杠更稳
@@ -216,8 +219,8 @@ $env:ELECTRON_RUN_AS_NODE = 1
216
219
  | `mnemos_constitution` | 读宪法(只读) |
217
220
  | `mnemos_delete` | **真删除**(不可恢复) |
218
221
  | `mnemos_deprecate` / `mnemos_dormant` | 标记作废 / 标"本轮暂时无关"(可撤销) |
219
- | `mnemos_propose_skill` | 提议新建技能(要给反例与正例,且反例能追溯到真实失败) |
220
- | `mnemos_task_open` / `mnemos_task_update` / `mnemos_task_close` | 任务图:开图 / 填回执 / 收尾 —— 派活用,**自己的复杂活也能用**(判据:跨会话 / 被截断 / 有并行 / 需事后交代,任一为是) |
222
+ | `mnemos_propose_skill` | 提议新建技能(failure-fixed 要反例+正例;memory-recurring 要 ≥3 个跨会话事件、正反例至少一种;external-rewrite 要来源记录,且默认只暂存、保留需你确认) |
223
+ | `mnemos_task_open` / `mnemos_task_update` / `mnemos_task_close` / `mnemos_task_done` / `mnemos_task_cite` | 任务图(任务档案/寻址空间):开图 / 填回执 / 收尾 / 记已完成里程碑 / 登记依赖 —— 派活、跨会话、或会产出多条记忆时用;未完成步骤用宿主 todo,图不复制结论正文 |
221
224
  | `mnemos_heartbeat` / `mnemos_maintenance_list` / `mnemos_heartbeat_toggle` | 手动跑一次维护 / 看维护清单 / 关心跳 |
222
225
  | `mnemos_learner_kick` | 立刻踢一轮空闲学习(诊断用,也可主动触发) |
223
226
 
@@ -274,7 +277,7 @@ $env:ELECTRON_RUN_AS_NODE = 1
274
277
  - id: dsh-mnemos
275
278
  config:
276
279
  learnerEnabled: true
277
- learnerIntervalMs: 21600000 # 6 小时:一轮就约 7 万 token,频率低一点更划算
280
+ learnerIntervalMs: 21600000 # 6 小时;每轮 token 取决于模型自己选的任务(未测量),频率低一点更划算
278
281
  learnerProvider: aliyun # ★ 第三方 api-key 路由(必须)
279
282
  learnerModel: qwen3.8-flash
280
283
  # 留空 = 不工作:后台没有主会话可借,也不会退回 DeepSeek 自家路由
@@ -321,8 +324,16 @@ learnerAgentPreset: standard
321
324
  name: "@deepseek-ai/dsh-tool-web"
322
325
  config:
323
326
  fetch: true
327
+ - id: tool-todo # 宿主任务清单(系统提示 ㉔ 的"未完成步骤")
328
+ name: "@deepseek-ai/dsh-tool-todo"
329
+ config:
330
+ allowParallelInProgress: true
324
331
  ```
325
332
 
333
+ > `tool-todo` 是 v1.6 补上的:系统提示 ㉔ 要求未完成步骤写宿主 todo;没有它,learner 只能开图、却无法按规则记录未完成步骤。
334
+ >
335
+ > 另外,空闲任务的提醒会明确**禁止申请提权/审批**:用户不在旁边,提权请求会把这一轮卡住;需要提权的操作应跳过并回报。
336
+
326
337
  然后 `learnerAgentPreset: mnemos-learner`。**两个坑**:
327
338
 
328
339
  1. preset 里 `persona` 必须带上 —— 没它 `{{model}}` 就没有值、整轮报错。
@@ -391,13 +402,13 @@ learnerAgentPreset: standard
391
402
  validateModel: "" # 留空 = 复用 learnerModel
392
403
  # —— 技能 ——
393
404
  createWriteBack: true # 新建技能是否直接入目录
405
+ externalSkillWriteBack: false # 外部来源技能是否允许自动入目录(默认只暂存,等你确认)
394
406
  reviewWriteBack: true # 修改已有技能是否真的改写(false = 只出建议)
395
407
  maxSkills: 30 # 技能目录容量上限
396
408
  reviewEnabled: true # 是否启用技能评审
397
409
  reviewProvider: "deepseek-account" # 必须与当前可用 provider 一致
398
410
  reviewModel: "deepseek-flash"
399
411
  reviewMaxPerCycle: 3 # 每周期最多评审几个
400
- reviewFreezeAfterCycles: 3 # 连续几个静默周期后冻结
401
412
  ```
402
413
 
403
414
  **一个耦合点**:`reviewProvider` / `reviewModel` 必须与当前可用的 provider 一致,否则技能评审会**静默失败**(技能不会变差,但也不会变好)。
@@ -432,7 +443,7 @@ learnerAgentPreset: standard
432
443
  | 出现"宪法 · 未初始化"警告 | 三种原因:① 第 5 节没做;② `constitutionFile` 指错路径;③ **第 5 节做了但没再完全重启一次**(宪法只在启动时装载) |
433
444
  | 记忆"空了" | 看日志里的 `dataFile=` —— 大概率是路径指到别处,数据本身没丢 |
434
445
  | 检索明显不准 | 召回是**关键词 + 标签**匹配(不是语义检索):换关键词试,并检查标签是否覆盖关键类别 |
435
- | 技能一直不变好 | `reviewProvider` 不可用 → 评审静默失败;或技能已冻结(见 `skill-review-state.json`) |
446
+ | 技能一直不变好 | `reviewProvider` / `reviewModel` 不可用 → 评审静默失败(技能不会变差,但也不会变好)。v1.6 起**没有"冻结"这回事**了,别去 `skill-review-state.json` 里找 |
436
447
  | 子代理说"文件不存在"但明明有 | `glob` 用**绝对 Windows 路径**会静默返回 `No files found`。改用 `pwsh Get-ChildItem -File -Filter *.js` 或相对工作区根的路径。**静默假阴性比报错更危险** |
437
448
  | 任务的临时结果在收尾时没了 | 那是设计:临时的默认丢弃,要留请显式标记。交付物别同时标成临时 |
438
449
 
package/README.en.md ADDED
@@ -0,0 +1,71 @@
1
+ # Mnemos
2
+
3
+ **A DeepSeek Harness (DSH) plugin — not a bigger memory store, but memory that stays usable after you switch sessions, directories, or models.**
4
+
5
+ > **The goal**: after you have done a kind of task once, the next time it should be done right **without looking anything up**.
6
+ > It is not about how much memory you keep. It is about: after switching to another model, does it know **which records to pull, how to use them, and how to leave a new judgement behind**?
7
+ > Memory lives in files you can read and diff; the reasoning model is a replaceable part.
8
+
9
+ Mnemos is installed **into** [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) — a local AI-assistant runtime. It is **not** a standalone app, and it does **not** work in a browser-only or mobile AI chat.
10
+
11
+ ## What you get
12
+
13
+ - **Continue a task in a new session** — new session, new working directory: say "continue with X" and it picks the relevant conclusions back up (no ids to memorize).
14
+ - **Task graph as a dossier/address space** — the graph stores **pointers, not copied text**: completed milestones, dependency ids and conclusion ids, whether the work is delegated or done by the main agent. Sub-agents read it by id; one writer, nothing overwritten.
15
+ - **Skills are compiled experience** — a reusable practice can come from a fixed failure, a recurring problem in memory (≥3 events across ≥2 sessions), or an external rewrite. External skills stay in `skill-proposals/` until you approve them.
16
+ - **External information is auditable** — fetched content is treated as untrusted, verified in a restricted one-shot session, and stored with its provenance permanently attached.
17
+ - **Context compaction is a short-term fallback, not long-term memory** — the plugin writes only a fact card (no 4K raw text) plus a notice carrying the top negative conclusions/tool failures; the fact card expires after 7 days.
18
+ - **Identity and rules live in records, not in weights** — a constitution (read-only from the model's side, editable by the owner with a password, always audited), injected every turn.
19
+
20
+ ## What it is not
21
+
22
+ Other DSH memory plugins fall into four types: fact-citation, file/project memory, full memory-stack/shared, and protocol-enforced memory. Mnemos is a **different layer**: it makes **judgement** traceable — why a rule changed, what a task depended on, whether external information was trusted, and what a decision superseded. Memory is the substrate, not the product.
23
+
24
+ This also means we do **not** offer per-fact citations back to raw log events; that is a known gap, not a claim. Citation and judgement provenance are complementary.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ dsh plugin --profile <your-profile> add dsh-mnemos-continuity
30
+ ```
31
+
32
+ Then **fully restart DSH** (not a page refresh). Data lives in the profile's own `mnemos/` directory, so reinstalling never touches your memory.
33
+
34
+ npm: <https://www.npmjs.com/package/dsh-mnemos-continuity> · project name is **Mnemos**;
35
+ the `continuity` in the package name is the point: **judgement survives the model change**.
36
+
37
+ > DSH itself is required, and it ships its own Node runtime — you do **not** need Node.js installed.
38
+
39
+ ## Cost, boundaries, honesty
40
+
41
+ - Memory is **local plain-text files** (JSON): back them up yourself; do not put secrets in memory.
42
+ - Background maintenance is on by default and **some steps call an AI model** (cost); it can be disabled entirely.
43
+ - Recall is **keyword + tag** matching — deterministic and auditable, **no semantic search**. Something you wrote may not be recalled; that is a known trade-off.
44
+ - **Not measured yet**: recall quality, scale latency, unit cost, long-term learning effects, multi-machine use.
45
+ - Some reliability rests on discipline (the agent's own habits), not on mechanisms. We say so instead of claiming otherwise.
46
+
47
+ ## Risks and responsibility
48
+
49
+ Mnemos is a general-purpose architecture. Its capabilities are not tied to any purpose, **but the design contains deliberate choices** (isolate external content first, keep the reasoning trace, audit dangerous actions) — those are positions, not neutrality.
50
+
51
+ Four capabilities are worth stating plainly — useful when used well, amplified when abused:
52
+ writable identity · long-lived cross-session memory · dispatching other models · unattended background runs.
53
+ **The holder is the guardian and bears final responsibility for the agent's behaviour.** This project provides no warranty and accepts no liability for abuse.
54
+ Full statement (Chinese): [`README.md`](README.md) → 风险与责任.
55
+
56
+ ## Documentation
57
+
58
+ **Full documentation is in Chinese** (the DSH community is largely Chinese-speaking):
59
+
60
+ | If you want to | Read |
61
+ |---|---|
62
+ | What it is, what it costs, should you use it | [`README.md`](README.md) (Chinese) |
63
+ | Install / configure / tools / data location / troubleshooting | [`INSTALL.md`](INSTALL.md) |
64
+ | Architecture, data flow, one task end-to-end | `docs/架构总览.docx` |
65
+ | Every mechanism and its guarantees/limits | `docs/architecture-机制清单.docx` |
66
+ | **Module-by-module implementation** (appendix: the constitution and the system prompt, verbatim) | [`docs/模块与功能实现.md`](docs/模块与功能实现.md) |
67
+ | Why it is shaped this way | `docs/设计者视角.docx` |
68
+
69
+ ## License
70
+
71
+ MIT © 2026 七月流火
package/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Mnemos
2
2
 
3
+ [English](README.en.md) | 中文
4
+
3
5
  **装进 DeepSeek Harness 的一个插件:不是给 AI 一个更大的记忆库,而是让记忆在换模型、换会话之后还能被高效用上。**
4
6
 
7
+ > **最终目标**:这类任务做过一次之后,下次**不查记忆也能做对**。
8
+
5
9
  > 存多少不是重点。重点是:**换个模型接着干时,它知道该取哪几条、按什么用、用完怎么留下新的判断** ——
6
10
  > 记忆存在你能查的文件里,推理模型只是可以换掉的部件。
7
11
 
@@ -20,7 +24,7 @@
20
24
 
21
25
  ## 它到底能带给你什么
22
26
 
23
- **写给已经在用 DSH 的人。** 五件事,都用人话说。**为什么能做到、有哪些机制、代价是什么 → 见《简介》**。
27
+ **写给已经在用 DSH 的人。** 六件事,都用人话说。**为什么能做到、有哪些机制、代价是什么 → 见《简介》**。
24
28
 
25
29
  ### ① 换个对话继续任务,前面的结论能直接接上
26
30
 
@@ -45,27 +49,37 @@
45
49
  - **成果不散**:几路的结果归到同一份任务记录上,事后按编号能一次取全;
46
50
  - **没做完的不会被当成做完**:哪一路没交回结论,会如实标出来;忘了收尾的任务也不会一直挂着。
47
51
 
48
- **不派活也能用**:你自己手上的复杂活(会跨会话、会被上下文截断、或者有并行几条线)也可以用同一张任务图来规划与收尾 ——
49
- 做完就是一份**说得清"哪几块做完了"**的记录。判据很简单,问三个问题:**会跨会话吗?会被截断吗?有并行分支吗?**
50
- 任一为是就值得开;**单会话几步就完的小事别开,那只是给自己加仪式**。
52
+ ### ③ 任务图:跨会话也知道"做到哪、依据什么"
53
+
54
+ 任务图不是多 agent 专用,也不只是待办清单;它是任务的**档案/寻址空间**。
55
+
56
+ **它不是把原文存进去,而是存"地址"**:记忆 id、依赖 id、结论 id、前序图 id;正文留在原记忆,删了被引用的记忆,图里那条也随之消失。
51
57
 
52
- ### ③ 外面来的东西留下出处,而不是被当真
58
+ - **什么时候开**:会跨会话、会被折叠后接着做、或会产出多条以后要找的记忆时;单步小事直接写记忆,别开;
59
+ - **记什么**:已完成里程碑(done)、依赖(uses)、前序图(links)、重要结论的 id(`conclusion` 标签);**不复制正文**;
60
+ - **不记什么**:未完成步骤仍用宿主 todo;图和任务清单不要互为镜像;
61
+ - **跨会话**:开新图,用 `links` 链接旧图并写清"为什么接上它",不改旧图;
62
+ - **好处**:换会话/换模型后,能说清"哪块做完了、用了什么、结论在哪";收尾时汇成一条任务结果,连同会话存档保留。
63
+
64
+ ### ④ 外面来的东西留下出处,而不是被当真
53
65
 
54
66
  外部来的内容进来时会**永久留下来源**。以后被查到时,它可以被质疑、可以被推翻 —— **但不会被当成事实**。
55
67
 
56
- ### ④ 聊天太长被截断时,东西不会凭空消失
68
+ ### ⑤ 聊天太长被截断时,东西不会凭空消失
57
69
 
58
- 上下文被截掉一段时,被截掉的部分会被收起来,并留一句"东西存在哪"的提示。
59
- 它保证"原文还在、给你指路",**不保证"结论一定不丢"**。
70
+ 上下文被截掉一段时,插件把被遮蔽区域抽成一张**事实卡**,并在提醒里直接带最多 3 条负面结论/工具失败;原文仍在会话日志。
71
+ 它保证"关键事实不被默默吞掉、事实卡可查",**不保证模型一定去 open**;事实卡 7 天后自动清理。
60
72
 
61
- ### ⑤ 关掉对话、换掉模型,它还是同一个它
73
+ ### ⑥ 关掉对话、换掉模型,它还是同一个它
62
74
 
63
75
  "它是谁、做过哪些决定、为什么这么选"记在文件里,不在模型的权重里。
64
76
  **代价**:能留下来的是判断与来由,不是说话的方式 —— 换了模型,风格会变。
65
77
 
66
78
  ### 也说清它不是什么
67
79
 
68
- - 不是**记忆插件 / 向量检索系统**:记忆只是入口,检索靠关键词与标签(有意不用语义检索);
80
+ - 不是以**记忆库 / 召回质量**为主卖点:记忆是底座;我们评价的是判断能否跨会话延续、能否被审计;
81
+ - 不是**事实引用层**:把每条事实引回原始日志是另一类方案,我们不重复造;普通记忆没有逐条日志引用,这是已知边界;
82
+ - 不是**完整记忆栈 / 多 agent 共享层**:那是另一类方案的地盘,可以组合,不是替代;
69
83
  - 不是**会自己长大的 agent**:技能要提议、要独立验证、可回滚;**"不修改"也是有效结论**;
70
84
  - 不是**成熟产品**:部件齐备、有会真的失败的回归检查,但只有一个人、一台机器的实证。
71
85
 
@@ -93,7 +107,7 @@
93
107
  ## 代价与边界(用前必读)
94
108
 
95
109
  - 记忆是**本地明文文件**:自己备份;不要往里粘密码/密钥。要备份哪几个文件、怎么卸载/回滚 → INSTALL 第 3 / 11 节;
96
- - **每轮会固定注入一点东西**:纪律提示约 2.6k 字符 + 自传体摘要(默认上限 2000 字符)—— 这部分算在你的输入里。
110
+ - **每轮会固定注入一点东西**:纪律提示约 3.5k 字符 + 自传体摘要(默认上限 2000 字符)—— 这部分算在你的输入里。
97
111
  自传体的预算可调;**纪律那段没有开关**(诚实说:它和你在 profile 里的自定义提示会叠加,目前没有冲突检测);
98
112
  - 后台维护默认开(约 30 分钟一轮),其中两项**会调用 AI** → 有成本,且会把技能正文、相关记忆、你的原始反馈
99
113
  发给你配置的那个评审模型服务商;**可以整体关掉,也可以只关评审**(见 INSTALL)。**具体金额没有测量过**(已知缺口);
@@ -101,6 +115,10 @@
101
115
  确认有用了再开回来。**关掉后哪些还能用、哪些会失效,INSTALL 开头有一张对照表**;
102
116
  - **空闲学习默认关**;开启后每轮都会调用一次模型(用你单独给它配的路由,**需要外部 API key**)→ 有成本;
103
117
  - 检索是**关键词 + 标签**匹配,不是语义检索:**写了但召不回是可能的**;
118
+ - **技能的三种来源**:失败→修好(要反例+正例)、记忆里反复出现的问题(≥3 个跨会话事件)、外部技能改写(自己搜到或你给的)。**外部来源默认只进 `skill-proposals/`,保留要你确认**;想让它自动落盘得显式开 `externalSkillWriteBack`;
119
+ - **折叠快照只做 7 天短期兜底**:记忆只存事实卡(不存 4K 原文),提醒直接带 top3 负面结论/工具失败;**不保证模型会 open**,提醒是唯一保证通道;
120
+ - **会话存档默认不进检索**:它是给人回看的快照(可能很大),错召回一次就会吃掉大量上下文;
121
+ 要看时用 `mnemos_open` 打开存档 id,或显式传 `includeArchives:true`;
104
122
  - 一部分可靠性**靠纪律而不是机制**:结论有没有写进记忆、要不要召回到位 —— 所以偶尔自己提醒一句"这个记一下"更稳;
105
123
  - **尚未测量**:召回质量、规模延迟、单位成本、学习闭环的长期效果、多机共用、经验可迁移性;
106
124
  **也没有记录"测过哪些 DSH 版本"**(依赖宿主内部行为的部分,宿主升级后可能先坏)—— 这是已知缺口。
@@ -131,7 +149,47 @@ Mnemos 是通用认知架构:身份、记忆、技能、调度**不预设用
131
149
  前提再确认一次:你得在用 **DeepSeek Harness(DSH)** —— 只在浏览器或手机上用 AI 助手的话,现在装不了。
132
150
  装之前想知道"装完屏幕上会出现什么、怎么确认它找对了数据" —— INSTALL 第 6 节就是验证步骤。
133
151
 
134
- 安装、配置、工具清单、数据位置与备份 → 全部在 [`INSTALL.md`](INSTALL.md)(含验证步骤、续接任务的做法、排错表)。
152
+ **一条命令装上**(已发布到 npm,包名 `dsh-mnemos-continuity`):
153
+
154
+ ```bash
155
+ dsh plugin --profile <你的 profile> add dsh-mnemos-continuity
156
+ ```
157
+
158
+ 装完**完全重启 DSH** 就生效(数据在 profile 自己的目录里,覆盖安装不碰记忆)。
159
+
160
+ 安装细节、配置、工具清单、数据位置与备份 → 全部在 [`INSTALL.md`](INSTALL.md)(含验证步骤、续接任务的做法、排错表)。
161
+ npm 页面:<https://www.npmjs.com/package/dsh-mnemos-continuity>
162
+
163
+ ## 同时用桌面版和网页版(可选)
164
+
165
+ 默认每个 profile 各有一份数据(`<profile>/mnemos/`)。如果你希望**桌面版和网页版共用同一份记忆**:
166
+
167
+ ```bash
168
+ # 1) 网页版也装一次
169
+ dsh plugin --profile web add dsh-mnemos-continuity
170
+ ```
171
+
172
+ ```yaml
173
+ # 2) 在网页版的 cordis.patch.yml 里让数据指向桌面 profile
174
+ - id: dsh-mnemos
175
+ name: dsh-mnemos-continuity
176
+ config:
177
+ dataFile: C:\Users\<你>\.dsh\profiles\desktop\mnemos\memory.json
178
+ constitutionFile: C:\Users\<你>\.dsh\profiles\desktop\mnemos\constitution.json
179
+ heartbeatEnabled: false # 后台维护只留给桌面端
180
+ learnerEnabled: false
181
+ reviewEnabled: false
182
+ ```
183
+
184
+ **两条提醒(重要)**:
185
+
186
+ 1. **后台维护只在桌面端跑** —— 所以用网页版时,建议**让桌面版挂在后台**(窗口最小化即可),
187
+ 归档 / 衰减 / 回收 / 技能评审才会继续;网页版关了后台,是因为双跑会重复归档、重复任务结论、
188
+ 双倍 LLM 成本,而技能评审并发写技能文件没有跨进程锁,会损坏。
189
+ 2. **跨端可见有延迟** —— 一端写入后,另一端要等**下一次写盘**(或自己重启)才能看到。
190
+ 这是"内存副本 + 重读合并"的设计,**不是没写进去**;想立刻看到就重启那一端。
191
+
192
+ > 网页版(`dsh web`)是**独立进程**,关掉桌面程序不影响它;但它的运行时文件来自桌面版的安装目录,所以桌面版要"装着"。
135
193
 
136
194
  ## 文档地图(对外的七份)
137
195
 
package/VERSION.md CHANGED
@@ -1,21 +1,23 @@
1
- # 版本标识 · Mnemos v1.5.10
1
+ # 版本标识 · Mnemos v1.6.1
2
2
 
3
3
  | 项 | 值 |
4
4
  |---|---|
5
- | **版本** | **v1.5.10**(`package.json` 的 `version`)—— 见下方「版本流水」 |
5
+ | **版本** | **v1.6.1**(`package.json` 的 `version`)—— 见下方「版本流水」 |
6
6
  | 本目录 | **当前发行副本**(可发布内容;解压后即成为 `<你的路径>\mnemos\`) |
7
- | 打包日期 | 2026-10-17 |
8
- | 构成 | `src` **26 个模块** + `scripts` 4 个 + `test` 1 个 + `docs` **9 件**(4 套 × docx/pdf + 1 份纯 md)+ 2 个示例技能 |
9
- | 文档 | `简介-introduction`(是什么·该不该用)· `架构总览`(部件与数据流)· `architecture-机制清单`(每个机制保证什么、边界在哪)· `设计者视角`(为什么这样设计)—— 每套 docx + pdf |
10
- | 对应压缩包 | 同级 `mnemos.rar`(字节数见该文件本身:`(Get-Item .\..\mnemos.rar).Length`) |
11
- | 压缩包摘要 | `(Get-FileHash .\..\mnemos.rar -Algorithm SHA256).Hash` |
12
- | 同版本存档 | `mnemos-历史版本\v1.5.10\mnemos-v1.5.10.rar`(与 `mnemos.rar` 逐字节相同) |
7
+ | 打包日期 | 2026-10-23(**npm 1.6.1 已发布;rar 本日重打**) |
8
+ | 构成 | `src` **26 个模块** + `scripts` 4 个 + `test` 1 个 + `docs` **npm 5 件 / 发行 rar 9 件**(4 套 docx,rar 另有 4 份 pdf,外加 1 份纯 md)+ 2 个示例技能;工具 **19** 个;心跳 **8** 项 |
9
+ | 文档 | `简介-introduction`(是什么·该不该用)· `架构总览`(部件与数据流)· `architecture-机制清单`(每个机制保证什么、边界在哪)· `设计者视角`(为什么这样设计,按设计目标重写) |
10
+ | 对应压缩包 | 本版已重打:`发行备份\current\mnemos.rar`(2026-10-23) |
11
+ | 同版本存档 | `历史版本\v1.6.1\`(rar + VERSION) |
12
+
13
13
 
14
14
  ## 版本流水
15
15
 
16
16
  | 版本 | 内容 | 性质 |
17
17
  |---|---|---|
18
- | **v1.5.10**(本版) | **改 npm 包名(项目名不变)**:`dsh-mnemos` 这个名字在 npm 上**已被另一个独立项目占用**(别人写的、思路不同、不是同一套代码,且发布时间更早)。按用户决定:**项目名仍叫 Mnemos**,npm 包名改为 **`dsh-mnemos-continuity`**(`continuity` 指"换会话、换模型之后判断还能接着用")。同步改动:`cordis.patch.yml` 的 bundle `name`(**entry id 仍保留 `dsh-mnemos`**,故 profile 里的配置覆盖不用动)、INSTALL 五处命令、README 新增一段"名字说明"(含与同名项目的消歧)。本机 `desktop` profile 的 deps / bundles / junction 已改名并**重启实测通过**(工具正常、`profileContext` 正确)。历史存档不动(也不发布)。测试仍 **1225** | ✅ 包:`package.json` / `cordis.patch.yml`;文档:README / INSTALL |
18
+ | **v1.6.1**(本版) | **元数据修正版**:npm 1.6.0 的 `VERSION.md` 仍是发布前“未发布”文本(先 publish 后改 VERSION 的发布顺序错误);本版只修正 `VERSION.md` 与 `package.json` 版本号,**无代码/行为变化**。测试仍 **1330 / 0** | ✅ 包:`package.json` / `VERSION.md`;文档:VERSION |
19
+ | **v1.6.0**(历史) | **认知架构收口(已发布 2026-10-23)**:① 任务图升级为「任务档案/寻址空间」(done/uses/links + 读时投影 + 上限代码强制;新增 task_done/task_cite,工具 19);② 技能体补入口与三档来源(失败→修好 / 记忆反复 / 外部改写;外部默认只暂存、保留需用户确认);③ 评审状态记录 lastApplied、外部写入可见(refresh)、learner 不再误回滚换代、评审/验证解析失败三态;④ pending 台账(外来不记账、status、去重、过期清理);⑤ 折叠快照改短期兜底(事实卡 + 提醒带 top3 + 7 天 TTL);⑥ 系统提示 25 条 / 7 节(约 3.5k 字符;任务图独立成节、多模型协作必须开图;单步小事别开;workflow 交接纪律)。测试 **1330 / 0** | ✅ 代码:`store` / `index` / `skill-review` / `compaction-snapshot` / `system-prompt` 等;文档:README / INSTALL / 四份对外文档 |
20
+ | **v1.5.10** | **改 npm 包名(项目名不变)**:`dsh-mnemos` 这个名字在 npm 上**已被另一个独立项目占用**(别人写的、思路不同、不是同一套代码,且发布时间更早)。按用户决定:**项目名仍叫 Mnemos**,npm 包名改为 **`dsh-mnemos-continuity`**(`continuity` 指"换会话、换模型之后判断还能接着用")。同步改动:`cordis.patch.yml` 的 bundle `name`(**entry id 仍保留 `dsh-mnemos`**,故 profile 里的配置覆盖不用动)、INSTALL 五处命令、README 新增一段"名字说明"(含与同名项目的消歧)。本机 `desktop` profile 的 deps / bundles / junction 已改名并**重启实测通过**(工具正常、`profileContext` 正确)。历史存档不动(也不发布)。测试仍 **1225** | ✅ 包:`package.json` / `cordis.patch.yml`;文档:README / INSTALL |
19
21
  | v1.5.9 | **npm 包瘦身**:`files` 里的 `docs` 改为 `docs/*.docx` + `docs/*.md` —— **npm 包不再带 PDF**(本机 rar 仍保留完整 4 套 docx+pdf,因为那是给下载的发行包)。包体 **2.24 MB → 370.6 KB**、文件数 47 → **43**(docs 仍 5 件:4 份 docx + 1 份模块文档 md)。用户决定:"有一份就够了,没必要提供两份占空间"。除此之外与 v1.5.8 完全相同(含 P0 数据目录修复)。测试仍 **1225** | ✅ 包:`package.json`(files) |
20
22
  | v1.5.8 | **修数据落点(P0)+ 安装审查的其余条目**:① **P0 默认数据目录解析错** —— 插件原先按 `DSH_PROFILE_DIR → DSH_HOME → cwd` 猜,而那三个在插件进程里都不可靠(`DSH_PROFILE_DIR`/`DSH_HOME` 只注入给 shell 工具不注入插件;桌面版只是碰巧靠 cwd 对)。后果:换启动方式会把记忆写进**别的 profile** 或当前目录(外部安装审查实测写进了另一个 profile)。现改为 **`config.dataFile` > `ctx.get('profileContext').dir` > 环境变量/cwd(兜底)**,启动日志第一依据改成 `profileContext=`;**已用"污染环境变量"的对照实验验证**(临时 profile + 假 DSH_PROFILE_DIR/DSH_HOME/cwd → 仍写进自己的 profile)。② **npm 包会缺全部 docs** → `files` 补 `docs`/`examples`/`VERSION.md`(发行副本 pack 47 文件 / 2.3 MB);③ **宪法初始化要 node 而文档说不需要** → INSTALL 补 `ELECTRON_RUN_AS_NODE=1` + DSH 自带 exe 的无 Node 路径;④ P2:补 `scripts.test`、peer 告警口径改正(所有安装方式都可能出现、无害)、`link:` 路径写明"指到含 package.json 的那一层"、清掉三处"留空跟随主会话"的过时注释、加 `engines.dsh` 声明(**未能证实宿主真的检查它**)。测试仍 **1225** | ✅ 代码:`index.js` / `paths.js`;包:`package.json`;文档:INSTALL / 测试断言 |
21
23
  | v1.5.7 | **打包形态 + 文档 + 清理**,不改运行行为:① **改造成标准可安装 bundle** —— 去掉 `private`、加 `dsh.bundle.patch`、`peerDependencies` 只留 `schemastery`、`files` 补 `INSTALL.md`;`dsh plugin --profile <p> add` 实测可装(`--dump-config` 里能看到 `dsh-mnemos` 行);② **删掉 learner 回退留下的死代码 156 行**(`makeHostLauncher` / `findLiveParentAgent` / `lastSeenAgent` / `captureSeenAgent` / `launchHostChild`);③ **新增对外文档 `docs/模块与功能实现.md`(纯 md,不生成 docx)** —— 26 个模块逐一说"有哪些功能、怎么实现",**附录逐字给出宪法原文与系统提示原文**;README 文档地图从六份改为七份并加指路;④ **口径对齐**:开场与 INSTALL 首段改成"不是更大的记忆库,而是换模型/换会话后还能高效用上"(不把存记忆当卖点);⑤ **作者信息定案**:`LICENSE` 与 `package.json` 写入「七月流火 <2151926500@qq.com>」(此前发行副本是 `<YOUR NAME>` 占位符);⑥ 内部材料(`V1.5-修复与更新记录.md`)加入同步清理清单,确保不进发行包。测试仍 **1225** | ✅ 代码:`src/index.js`;包:`package.json`、`LICENSE`;文档:README / INSTALL / 简介 / 新增模块文档 |
@@ -39,24 +41,23 @@
39
41
 
40
42
  ## 怎么确认这是我说的那一版
41
43
 
42
- 1. `package.json` 的 `version` 应为 **1.5.10**;
43
- 2. 本目录下跑 `npm test`(等价 `node test/store.test.js`)应为 **1225 通过 / 0 失败**;
44
+ 1. `package.json` 的 `version` 应为 **1.6.1**;
45
+ 2. 本目录下跑 `npm test`(等价 `node test/store.test.js`)应为 **1330 通过 / 0 失败**;
44
46
  3. 启动日志(`<profile>\mnemos\mnemos.log`)的「解析依据」第一段应是 **`profileContext=<该 profile 目录>`** ——
45
47
  若第一依据还是 `DSH_PROFILE_DIR`/`cwd`,说明跑的是 v1.5.8 之前的代码;
46
- 4. `docs/` 应有 **9 件**(4 套 docx+pdf,外加一份**纯 md**:`模块与功能实现.md`):
47
- `简介-introduction`(是什么 · 该不该用)、`架构总览`(部件与数据流)、
48
- `architecture-机制清单`(每个机制保证什么、边界在哪)、`设计者视角`(为什么这样设计)。
49
- ⚠ 按用户决定,`architecture-实现过程完整记录` **不进发行包**(那份自己看,含较多过时内容);
50
- v1.4 里的 `architecture-实现细节` 在本版**正式改名为** `architecture-机制清单`(内容按"只讲机制"重写)。
51
- 这 4 套已在本版生成;v1.4 的 `architecture-实现细节` 已正式改名为 `architecture-机制清单` 并按“只讲机制”重写。
48
+ 4. 文档件数分两种形态:
49
+ - **npm 包 / `repo-stage/docs`:5 件**(4 套 docx + 1 份纯 md `模块与功能实现.md`,**不带 PDF**);
50
+ - **发行 rar / `Selfdata/docs`:9 件**(4 套 docx + 4 份 pdf + 1 份纯 md)。
51
+ 四套是:`简介-introduction`(是什么 · 该不该用)、`架构总览`(部件与数据流)、
52
+ `architecture-机制清单`(每个机制保证什么、边界在哪)、`设计者视角`(为什么这样设计,v1.6 按设计目标重写)。
52
53
 
53
54
  ## 发行方目录里各份 mnemos 是什么关系(避免拿错)
54
55
 
55
56
  | 位置 | 是什么 | 该不该拿来装 |
56
57
  |---|---|---|
57
- | 本目录(`mnemos\`) | **当前发行副本**(v1.5.0,代码与文档都已就位) | ✅ 要装就用这个目录,或解压同级的 `mnemos.rar` |
58
- | `mnemos.rar`(同级) | 本目录的压缩包(同一份内容) | ✅ 分发给别人用这个 —— **但它现在还是 v1.4.1 的旧包** |
59
- | `mnemos-历史版本\` | **已定版的压缩包存档**:`v0`、`v1.0.0`、`v1.1.0`、`v1.2.0`、`v1.3.0`、`v1.4.0`、`v1.4.1`(含本版 `v1.5.0`) | ⚠️ 只在回退 / 对比时用 |
58
+ | 本目录(`mnemos\`) | **当前发行副本**(v1.6.1,代码与文档已就位;**已发布**) | ✅ 要装就用这个目录;npm/rar 已发布 |
59
+ | `mnemos.rar`(同级) | 本目录的压缩包 | ✅ 当前版,已重打 |
60
+ | `mnemos-历史版本\` | 已定版的压缩包存档(含 v1.6.1 及更早) | ⚠️ 只在回退 / 对比时用;v1.6.1 已补存档 |
60
61
  | `mnemos.backup-before-sync\` | 最近一次同步**之前**的快照(回滚点) | ❌ 不是发行物 |
61
62
  | 备份区(`发行备份\`) | 历次同步的时点快照 + 验收日志 + `源文件-*`(可复现源) | ❌ 不是发行物 |
62
63