dsh-memory-nebula 1.1.2 → 1.1.4

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 CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  本文件记录「记忆星图」每个版本改了什么。日期为落盘日期。
4
4
 
5
+ ## 1.1.4 — 2026-11-11
6
+
7
+ 主题「对齐」:装上了新代码,跑的还是旧宿主——这件事要自己说出来。
8
+
9
+ - `doctor` 新增版本漂移检查:`--base` 探测到的宿主版本与本地包版本不一致时给
10
+ `[warn] version: installed 1.1.4, running host 1.1.0`,并提示「重启 DSH」,
11
+ 不再让一份全绿的体检报告掩盖「升级没生效」。
12
+ - `checkEndpoint` 保留响应里的版本号;`checkVersionDrift` 可独立测试,空值/相同版本不报。
13
+ - CI 增加 `Package install` job:从 `npm pack` 的 tgz 安装,比对 `--version`,
14
+ 跑 `doctor --help`,并检查包内包含 `SECURITY.md` / `CONTRIBUTING.md`、不夹带 `dev/`。
15
+ - 单测 87 → 88;真机验证 1.1.4 前端在 1.1.0 宿主上可读、可搜、可开详情,
16
+ doctor 明确给出 `9 通过 / 1 提醒 / 0 失败`。
17
+
18
+ ## 1.1.3 — 2026-11-11
19
+
20
+ 主题「门面」:让别人能找得到、看得懂、敢报问题。
21
+
22
+ - `package.json` 补齐 `repository` / `homepage` / `bugs`,描述改为中英双句,
23
+ 关键词补 `dsh`、`memory-graph`、`knowledge-graph`、`offline-snapshot`。
24
+ - GitHub Actions CI:Node 22.13 与 24 双矩阵,跑 `npm test` 与 `npm run check`。
25
+ - 新增 `SECURITY.md`(只读边界、loopback/Origin/CSP、`/share` 数据出口、
26
+ private advisory)与 `CONTRIBUTING.md`(无依赖、测试命令、文案/测试/版本约定)。
27
+ - README 与 README.en 顶部加 CI、npm、license badge。
28
+ - 市场索引与 unpkg 地址推到 1.1.3,安装名/TGZ 名同步。
29
+
5
30
  ## 1.1.2 — 2026-11-10
6
31
 
7
32
  主题「换个门牌」:市场索引从 jsDelivr 换到 unpkg。
@@ -0,0 +1,48 @@
1
+ # Contributing
2
+
3
+ Thanks for looking. This is a small, dependency-free plugin, and the fastest
4
+ way to keep it healthy is to run the same checks CI runs.
5
+
6
+ ## Setup
7
+
8
+ - Node.js 22.13 or newer (CI covers 22.13 and 24).
9
+ - No install step: the package has no runtime or dev dependencies.
10
+ - The repo is the plugin source. To try it inside DSH, point a profile at this
11
+ directory or install the packed tarball; see `docs/distribution.md`.
12
+
13
+ ## Before opening a pull request
14
+
15
+ ```bash
16
+ npm test # node --test "test/*.test.mjs"
17
+ npm run check # static release checks (version, UTF-8, links, assets)
18
+ ```
19
+
20
+ For HTTP or UI changes, also start the standalone engine and run the smoke
21
+ tests:
22
+
23
+ ```bash
24
+ node lib/standalone.mjs --port 7891 --root <a-memory-root>
25
+ node scripts/smoke.mjs http://127.0.0.1:7891/api/memory-nebula
26
+ ```
27
+
28
+ If you change the market index or locale files, keep the package version and
29
+ `market/index.json` version in sync; `test/market.test.mjs` enforces it.
30
+
31
+ ## Rules of the house
32
+
33
+ - Read-only toward memory stores. Never write into `~/.dsh-meow`, OpenViking
34
+ directories, or user notes.
35
+ - No new runtime dependencies without a strong reason; the single-file
36
+ snapshot and offline story depend on shipping everything ourselves.
37
+ - Keep UI strings in `lib/web/i18n.js`; Chinese is the source text. If you add
38
+ a visible string, add the English entry and run `dev/check-i18n.mjs`.
39
+ - Add a test for behavior changes. A bug fix without a regression test will
40
+ usually be asked for one.
41
+ - Keep commits focused. Update `CHANGELOG.md` for user-visible changes and bump
42
+ the version only when preparing a release.
43
+
44
+ ## Reporting bugs
45
+
46
+ Open an issue with the version, platform, and the diagnostics report from
47
+ `?` → “复制诊断” (it contains no memory text or local paths). For security
48
+ issues use `SECURITY.md`, not a public issue.
package/README.en.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Memory Nebula · memory-nebula
2
2
 
3
+ [![CI](https://github.com/hanhan9999999999999999999/dsh-memory-nebula/actions/workflows/ci.yml/badge.svg)](https://github.com/hanhan9999999999999999999/dsh-memory-nebula/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/dsh-memory-nebula.svg)](https://www.npmjs.com/package/dsh-memory-nebula)
5
+ [![license](https://img.shields.io/npm/l/dsh-memory-nebula.svg)](LICENSE)
6
+
3
7
  A DSH plugin that pulls memories out of every workspace **and every memory plugin**, turns them into a **nebula of evidence-backed connections**, and lets both you and the AI follow those connections the way neurons do.
4
8
 
5
9
  ![Memory Nebula: three views, filters, evidence chains](./docs/assets/preview.png)
@@ -49,7 +53,7 @@ Export the whole graph (text included) as one self-contained HTML for offline re
49
53
  ## Quick start
50
54
 
51
55
  From the plugin market (recommended): add the index
52
- `https://unpkg.com/dsh-memory-nebula@1.1.2/market/index.json` under
56
+ `https://unpkg.com/dsh-memory-nebula@1.1.4/market/index.json` under
53
57
  Plugins → Discover, search for “Memory Nebula”, and install. Run the doctor in step 2.5 afterwards.
54
58
 
55
59
  Or install from this checkout:
@@ -57,7 +61,7 @@ Or install from this checkout:
57
61
  ```powershell
58
62
  # 1) link the plugin (either way)
59
63
  New-Item -ItemType Junction -Path "<profile>\node_modules\dsh-memory-nebula" -Target "<plugin>"
60
- npm install <path>\dsh-memory-nebula-1.1.2.tgz --prefix <profile>
64
+ npm install <path>\dsh-memory-nebula-1.1.4.tgz --prefix <profile>
61
65
 
62
66
  # 2) profile package.json: add the dependency AND the bundle
63
67
  # dependencies: "dsh-memory-nebula": "file:../../plugins/dsh-memory-nebula"
@@ -83,7 +87,7 @@ The page probes `/ping` on both legs and picks the newer `build`; a banner expla
83
87
  Self-checks:
84
88
 
85
89
  ```bash
86
- npm test # 84 unit assertions
90
+ npm test # 88 unit assertions
87
91
  npm run check # static release check
88
92
  node scripts/smoke.mjs # 63 contract assertions against a live instance
89
93
  ```
@@ -114,7 +118,9 @@ Adapter contract and every `sources.json` field: [docs/adapters.md](docs/adapter
114
118
  | [docs/release.md](docs/release.md) | Release checklist, versioning, packaging, rollback |
115
119
  | [docs/compatibility.md](docs/compatibility.md) | Verified OS/Node/browser matrix, explicit non-support |
116
120
  | [docs/distribution.md](docs/distribution.md) | Install/upgrade/rollback/uninstall, support flow, marketplace copy |
117
- | [docs/testing.md](docs/testing.md) | 84 unit tests, 63 smoke checks, 21 security probes, browser probes |
121
+ | [SECURITY.md](SECURITY.md) | Read-only boundary, HTTP protections and vulnerability reporting |
122
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Local development, test commands and contribution rules |
123
+ | [docs/testing.md](docs/testing.md) | 88 unit tests, 63 smoke checks, 21 security probes, browser probes |
118
124
  | [docs/roadmap.md](docs/roadmap.md) | From 0.5 to 1.0: scoped sharing, first-run guidance, 10k-node performance, i18n and release support |
119
125
  | [CHANGELOG.md](CHANGELOG.md) | Version history |
120
126
 
@@ -136,7 +142,7 @@ lib/
136
142
  scripts/smoke.mjs 63 read-only contract checks
137
143
  scripts/release-check.mjs static release check
138
144
  scripts/bench.mjs 10k benchmark (build / recall / hygiene / snapshot / memory)
139
- test/ node:test unit suite (84 assertions)
145
+ test/ node:test unit suite (88 assertions)
140
146
  ```
141
147
 
142
148
  ## Privacy and security
@@ -148,4 +154,4 @@ test/ node:test unit suite (84 assertions)
148
154
 
149
155
  ## Version
150
156
 
151
- `1.1.2`, MIT. Front-end changes apply on refresh; everything under `lib/host/` is hot-reloaded, while `http.js` / `index.js` / `live.js` need a DSH restart (or the standalone engine).
157
+ `1.1.4`, MIT. Front-end changes apply on refresh; everything under `lib/host/` is hot-reloaded, while `http.js` / `index.js` / `live.js` need a DSH restart (or the standalone engine).
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 记忆星图 · memory-nebula
2
2
 
3
+ [![CI](https://github.com/hanhan9999999999999999999/dsh-memory-nebula/actions/workflows/ci.yml/badge.svg)](https://github.com/hanhan9999999999999999999/dsh-memory-nebula/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/dsh-memory-nebula.svg)](https://www.npmjs.com/package/dsh-memory-nebula)
5
+ [![license](https://img.shields.io/npm/l/dsh-memory-nebula.svg)](LICENSE)
6
+
3
7
  [English](README.en.md) · 在 DSH 里把散落在各个工作区、各个记忆插件里的记忆抽出来,算成一张**带证据的关联星云**,再从这张图上做「神经元式」的连带检索——以及,让别的插件注入了什么,星图就顺着连接补上它没注的那一半。
4
8
 
5
9
  ![记忆星图:三种视图、左栏筛选、证据链与详情](./docs/assets/preview.png)
@@ -73,7 +77,7 @@
73
77
  已经装好的机器上(`profiles/desktop`),只要打开「记忆星图」页面就有一张图;页面每 12 秒比一次 `sig`,别的会话写了新记忆会自动长出新星点。库里还没有记忆时,页面会给三条接入路径,也可以先点「看示例」;`…/memory-nebula/?demo=1` 可直达示例星系,逛完退出不会动真实库。
74
78
 
75
79
  从插件市场装(推荐):在 DSH 的「插件 → 发现」里添加索引
76
- `https://unpkg.com/dsh-memory-nebula@1.1.2/market/index.json`,搜索「记忆星图」安装。
80
+ `https://unpkg.com/dsh-memory-nebula@1.1.4/market/index.json`,搜索「记忆星图」安装。
77
81
  装完按下面的 2.5 跑一次 doctor。
78
82
 
79
83
  也可以从仓库装到 DSH:
@@ -81,7 +85,7 @@
81
85
  ```powershell
82
86
  # 1) 装进 profile(二选一)
83
87
  New-Item -ItemType Junction -Path "<profile>\node_modules\dsh-memory-nebula" -Target "<plugin>"
84
- npm install <path>\dsh-memory-nebula-1.1.2.tgz --prefix <profile>
88
+ npm install <path>\dsh-memory-nebula-1.1.4.tgz --prefix <profile>
85
89
 
86
90
  # 2) profile 的 package.json 里加依赖与 bundles(只加 dependencies 不会重组)
87
91
  # dependencies: "dsh-memory-nebula": "file:../../plugins/dsh-memory-nebula"
@@ -107,7 +111,7 @@ node lib/standalone.mjs --port 7890 # 其它系统,
107
111
  自检三条命令:
108
112
 
109
113
  ```bash
110
- npm test # 84 项单元测试
114
+ npm test # 88 项单元测试
111
115
  npm run verify # 单测 + 发布静态检查(npm pack 的 prepack 会自动再跑)
112
116
  node scripts/smoke.mjs # 63 项接口契约(对运行中的实例)
113
117
  ```
@@ -140,9 +144,11 @@ node scripts/smoke.mjs # 63 项接口契约(对运行中的实例)
140
144
  | [docs/release.md](docs/release.md) | 发布前检查清单、版本策略、打包/安装/回滚 |
141
145
  | [docs/compatibility.md](docs/compatibility.md) | 已验证的平台/Node/浏览器矩阵,以及明确不支持的组合 |
142
146
  | [docs/distribution.md](docs/distribution.md) | 安装/升级/回滚/卸载、支持流程、市场文案与发布检查 |
147
+ | [SECURITY.md](SECURITY.md) | 只读边界、HTTP 防护与漏洞报告 |
148
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | 本地开发、测试命令与提交约定 |
143
149
  | [docs/verified.md](docs/verified.md) | 每一条结论背后的实测证据 |
144
150
  | [docs/architecture.md](docs/architecture.md) | 模块分工、请求路径、不能破的不变量 |
145
- | [docs/testing.md](docs/testing.md) | 84 项单测、63 项冒烟、21 项安全探针、浏览器探针清单与手工验收 |
151
+ | [docs/testing.md](docs/testing.md) | 88 项单测、63 项冒烟、21 项安全探针、浏览器探针清单与手工验收 |
146
152
  | [docs/roadmap.md](docs/roadmap.md) | 从 0.5 到 1.0:切片分享、首访引导、万条性能、国际化与发行支持 |
147
153
  | [CHANGELOG.md](CHANGELOG.md) | 版本变更 |
148
154
 
@@ -168,7 +174,7 @@ lib/
168
174
  scripts/smoke.mjs 只读契约自查(63 项)
169
175
  scripts/release-check.mjs 发布静态检查
170
176
  scripts/bench.mjs 10k 性能基准(建图 / 检索 / 体检 / 快照 / 内存)
171
- test/ node:test 单元测试(84 项)
177
+ test/ node:test 单元测试(88 项)
172
178
  sidecar.ps1 Windows 独立引擎开关
173
179
  ```
174
180
 
@@ -181,6 +187,6 @@ sidecar.ps1 Windows 独立引擎开关
181
187
 
182
188
  ## 版本与许可
183
189
 
184
- - 当前版本 `1.1.2`,MIT。
190
+ - 当前版本 `1.1.4`,MIT。
185
191
  - 打包内容:`lib/`、`scripts/`、`docs/`、`cordis.patch.yml`、`README.md` / `README.en.md`、`CHANGELOG.md`、`LICENSE`、`sidecar.ps1`(`test/` 与 `dev/` 不进包)。
186
192
  - 前端改动刷新页面即生效;`lib/host/` 下所有引擎文件(含 `adapters/`、`bridge.js`、`ledger.js`)由 LiveEngine 热载,`http.js` / `index.js` / `live.js` 改动要重启 DSH 或走独立引擎。
package/SECURITY.md ADDED
@@ -0,0 +1,43 @@
1
+ # Security
2
+
3
+ ## What this project touches
4
+
5
+ `dsh-memory-nebula` reads memory stores on the local machine (meow-memory,
6
+ OpenViking, plain notes, SQLite) and serves a read-only viewer. It never writes
7
+ to those stores. The only writable state is under
8
+ `$DSH_HOME/memory-nebula/` (mutes, manual links, caches, logs, injected-ledger
9
+ files).
10
+
11
+ The HTTP surface is intended for one local user:
12
+
13
+ - it binds to loopback only;
14
+ - write routes require a loopback `Origin` and reject cross-site requests;
15
+ - static pages ship a restrictive CSP and `nosniff` / `no-store`;
16
+ - `/share` is the one route that deliberately exports memory **content** as a
17
+ self-contained HTML file. Treat exported files as plaintext backups.
18
+
19
+ Do not expose the server to a public network. There is no account system, no
20
+ telemetry, and no upload path.
21
+
22
+ ## Supported versions
23
+
24
+ Security fixes land on the latest published minor. Older minors are not
25
+ maintained separately.
26
+
27
+ ## Reporting a vulnerability
28
+
29
+ Please use GitHub's private vulnerability reporting:
30
+
31
+ <https://github.com/hanhan9999999999999999999/dsh-memory-nebula/security/advisories/new>
32
+
33
+ Do not open a public issue for a vulnerability. Include the version, the
34
+ affected route or file, and a minimal reproduction when possible. Reports that
35
+ only need a configuration change will be answered with the setting rather than
36
+ a release.
37
+
38
+ ## Out of scope
39
+
40
+ - running the server on a public interface;
41
+ - a malicious local user who can already read the memory database;
42
+ - exported snapshot files shared by the user;
43
+ - third-party memory adapters that execute their own code.
@@ -1,6 +1,6 @@
1
1
  # 兼容矩阵
2
2
 
3
- 最后更新:2026-11-10(1.1.2 市场索引改由 unpkg 托管;运行前提未变)
3
+ 最后更新:2026-11-11(1.1.3 补仓库元数据、CI 与安全文档;1.1.4 加医生版本漂移提醒;运行前提未变)
4
4
 
5
5
  这张表只写**真的跑过**的东西。「预期可用」是依据运行前提做的判断,不是实测;
6
6
  没有出现的组合就是没有验证,不应当作支持承诺。
@@ -22,7 +22,7 @@
22
22
  | 适配器 | meow / notes / sqlite / ingest | 单测 + `sources`/`ingest` 冒烟 |
23
23
  | 独立引擎 | `lib/standalone.mjs`,127.0.0.1:7890/7891 | 0.5–0.9 的 `smoke` 与 `--diagnose` |
24
24
  | 安装体检 | 真实 desktop profile + 运行中实例 | 1.1.0:9 项全过(含 endpoint ping) |
25
- | 市场索引 | `@deepseek-ai/dsh-plugin-market-index` format 1 校验 | 1.1.2:unpkg 索引 200,`parseMarketIndex` 通过,图标/详情/图片可解析 |
25
+ | 市场索引 | `@deepseek-ai/dsh-plugin-market-index` format 1 校验 | 1.1.4:unpkg 索引 200,`parseMarketIndex` 通过,图标/详情/图片可解析 |
26
26
 
27
27
  ## 预期可用,但未实测
28
28
 
@@ -6,7 +6,7 @@
6
6
  ## 包是什么
7
7
 
8
8
  - npm 包名:`dsh-memory-nebula`
9
- - 当前版本:`1.1.1`
9
+ - 当前版本:`1.1.4`
10
10
  - 形态:DSH 插件(`cordis.patch.yml` + `lib/client.js`)与独立引擎(`lib/standalone.mjs`)共用一套代码
11
11
  - 许可:MIT;没有授权锁、没有遥测、不会把记忆上传到任何服务器
12
12
  - 包内容:`lib/`、`scripts/`、`docs/`、`cordis.patch.yml`、`README.md` / `README.en.md`、
@@ -19,26 +19,26 @@
19
19
  在「插件 → 发现」里添加索引:
20
20
 
21
21
  ```text
22
- https://unpkg.com/dsh-memory-nebula@1.1.2/market/index.json
22
+ https://unpkg.com/dsh-memory-nebula@1.1.4/market/index.json
23
23
  ```
24
24
 
25
- 搜索「记忆星图」安装。索引与详情页都在 npm 包里,由 jsDelivr 提供;不需要第二个站点。
25
+ 搜索「记忆星图」安装。索引与详情页都在 npm 包里,由 unpkg 提供;不需要第二个站点。
26
26
  条目声明 `engines.dsh >= 0.2.2-rc.1`,更老的 DSH 会显示不兼容而不是装完才崩。
27
27
 
28
28
  ### 从 tgz(离线/客户机器)
29
29
 
30
30
  ```powershell
31
31
  # Windows PowerShell
32
- Get-FileHash .\dsh-memory-nebula-1.1.2.tgz -Algorithm SHA256
32
+ Get-FileHash .\dsh-memory-nebula-1.1.4.tgz -Algorithm SHA256
33
33
  # 对照同目录的 .sha256 文件;不一致就停,不要装
34
34
 
35
- npm install .\dsh-memory-nebula-1.1.2.tgz --prefix <profile>
35
+ npm install .\dsh-memory-nebula-1.1.4.tgz --prefix <profile>
36
36
  ```
37
37
 
38
38
  ```bash
39
39
  # macOS / Linux
40
- sha256sum -c dsh-memory-nebula-1.1.2.tgz.sha256
41
- npm install ./dsh-memory-nebula-1.1.2.tgz --prefix <profile>
40
+ sha256sum -c dsh-memory-nebula-1.1.4.tgz.sha256
41
+ npm install ./dsh-memory-nebula-1.1.4.tgz --prefix <profile>
42
42
  ```
43
43
 
44
44
  然后确认 `<profile>/package.json` 里两处都在:
@@ -129,7 +129,7 @@ Remove-Item -Recurse -Force "$env:USERPROFILE\.dsh\memory-nebula"
129
129
  npm run verify # 单测 + release-check;prepack 也会跑
130
130
  node scripts/smoke.mjs http://127.0.0.1:7891/api/memory-nebula
131
131
  npm pack # 生成 tgz
132
- sha256sum dsh-memory-nebula-1.1.2.tgz > dsh-memory-nebula-1.1.2.tgz.sha256
132
+ sha256sum dsh-memory-nebula-1.1.4.tgz > dsh-memory-nebula-1.1.4.tgz.sha256
133
133
  npm publish # 需要维护者账号;本仓库不自动发布
134
134
  ```
135
135
 
package/docs/http-api.md CHANGED
@@ -17,7 +17,7 @@
17
17
  ```json
18
18
  {
19
19
  "ok": true,
20
- "version": "1.1.2",
20
+ "version": "1.1.4",
21
21
  "build": 1794143336695,
22
22
  "startedAt": 1794143336695,
23
23
  "mode": "host",
@@ -47,7 +47,7 @@
47
47
  ```text
48
48
  memory-nebula diagnostics
49
49
  # 不含记忆正文;可以整段贴给支持
50
- version: 1.1.2
50
+ version: 1.1.4
51
51
  build: 1794276294467
52
52
  started: 2026-11-10T02:20:37.399Z
53
53
  mode: standalone
package/docs/market.en.md CHANGED
@@ -78,13 +78,13 @@ Above 3,000 memories it stays in the 2D nebula and asks you to filter before swi
78
78
  Add this index in the DSH plugin market:
79
79
 
80
80
  ```text
81
- https://unpkg.com/dsh-memory-nebula@1.1.2/market/index.json
81
+ https://unpkg.com/dsh-memory-nebula@1.1.4/market/index.json
82
82
  ```
83
83
 
84
84
  Then search for “Memory Nebula” and install. Or install the npm package directly:
85
85
 
86
86
  ```bash
87
- npm install dsh-memory-nebula@1.1.2
87
+ npm install dsh-memory-nebula@1.1.4
88
88
  ```
89
89
 
90
90
  Run the read-only doctor after installing:
package/docs/market.zh.md CHANGED
@@ -78,13 +78,13 @@ Shift 点第二个节点,会找两点之间的**证据链**:每一跳是哪
78
78
  在 DSH 的插件市场里添加索引:
79
79
 
80
80
  ```text
81
- https://unpkg.com/dsh-memory-nebula@1.1.2/market/index.json
81
+ https://unpkg.com/dsh-memory-nebula@1.1.4/market/index.json
82
82
  ```
83
83
 
84
84
  然后搜索「记忆星图」安装。也可以直接装 npm 包:
85
85
 
86
86
  ```bash
87
- npm install dsh-memory-nebula@1.1.2
87
+ npm install dsh-memory-nebula@1.1.4
88
88
  ```
89
89
 
90
90
  装完先体检:
@@ -68,7 +68,7 @@ memory-nebula --help # 装成 bin 之后
68
68
 
69
69
  ## 发布信息
70
70
 
71
- - 版本 `1.1.2`,`license: MIT`,无运行时依赖。
71
+ - 版本 `1.1.4`,`license: MIT`,无运行时依赖。
72
72
  - `files`:`lib/`、`cordis.patch.yml`、`README.md`、`README.en.md`、`docs/`、`CHANGELOG.md`、
73
73
  `LICENSE`、`scripts/`、`sidecar.ps1`。
74
74
  - 装完先体检:`node scripts/doctor.mjs --profile <profile> [--root DIR] [--base URL] [--json]`;
package/docs/release.md CHANGED
@@ -21,7 +21,7 @@ cd <plugin>
21
21
  # 1. 语法与静态检查(版本一致、UTF-8、import、死文件、CORS、document.write…)
22
22
  npm run check
23
23
 
24
- # 2. 单元测试(84 项,纯函数 + 契约)
24
+ # 2. 单元测试(88 项,纯函数 + 契约)
25
25
  npm test
26
26
 
27
27
  # 3. 起一个干净实例,跑接口契约(63 项)
@@ -62,6 +62,9 @@ npm pack # 生成 dsh-memory-nebula-<version>.tgz
62
62
  1.1.2 实测:**72 个文件**,包 2.3 MB、解开 2.9 MB(`docs/assets/` 的预览图与基准脚本占大头)。
63
63
  干净目录安装后 `--version` = 1.1.2,导出 `apply,inject,name,version`;
64
64
  安装包起 7896 实测 `/share?scope=ws:DSHLive2D&hide=level:lesson` → 200、601,177 字节。
65
+ 1.1.3 起包内多了 `SECURITY.md` 与 `CONTRIBUTING.md`,`.github/` 不进包;文件数与体积以 `npm pack` 的输出为准(不要手写进文档,否则每次改文档都要重打包)。
66
+
67
+ 1.1.4 实测:**75 个文件**,包约 2.3MB、解开约 2.9MB(精确字节以 `npm pack` 输出为准)。
65
68
  清单里应含 `sidecar.ps1`、`scripts/`、`test/` 不含(单测只在仓库里跑)、`dev/` 与截图不含。
66
69
 
67
70
  装进 DSH profile(与 `docs/operations.md` 的 junction 方式二选一):
package/docs/testing.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  三层自动检查 + 一层人工验收。前三层都能在干净仓库里跑,不依赖 DSH 正在运行。
6
6
 
7
- ## 一、单元测试:`test/`(87 项)
7
+ ## 一、单元测试:`test/`(88 项)
8
8
 
9
9
  ```bash
10
10
  npm test
@@ -24,7 +24,7 @@ node --test "test/*.test.mjs"
24
24
  | `share.test.mjs` | 14 | 单文件自包含、正文与 `</script>` 防护、尖括号转义、`$&` 保留、`<noscript>`/只读元信息、ws/project/focus 切片、hide 白名单与脱敏 |
25
25
  | `i18n.test.mjs` | 7 | 字典非空、回退中文、语言优先级、applyDom、T/静态 key 全覆盖 |
26
26
  | `diagnostics.test.mjs` | 2 | 报告结构、无 path/dbPath、文本不含盘符与库名、空图格式化 |
27
- | `doctor.test.mjs` | 8 | 版本下界、包文件、profile 依赖/bundles/已安装、warn 不阻断、文本/JSON 报告 |
27
+ | `doctor.test.mjs` | 9 | 版本下界、包文件、profile 依赖/bundles/已安装、版本漂移提醒、warn 不阻断、文本/JSON 报告 |
28
28
  | `market.test.mjs` | 3 | 市场索引版本/分类/标签、双语详情与图标存在、详情图片路径可解析 |
29
29
  | `package.test.mjs` | 7 | 包身份与导出、`files` 不夹带测试、清单文件存在、死文件不再进包、CHANGELOG 与版本一致、Cordis patch、相对 import 可解析 |
30
30
 
package/docs/verified.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  > 下面的数字都是**当时实测**的值,记录的是「这个结论被什么证据支撑过」,不是当前规模——记忆每天在长,规模类数字请以 `node scripts/smoke.mjs` 和界面顶栏为准。
4
4
 
5
+ ## 1.1.4(2026-11-11)对齐
6
+
7
+ - **医生能说出「装的是新的、跑的是旧的」**:在真实 desktop profile 上,
8
+ `node scripts/doctor.mjs --profile … --base http://127.0.0.1:60156/api/memory-nebula`
9
+ 得到 `[warn] version: installed 1.1.3, running host 1.1.0`,提示「重启 DSH 让宿主加载新代码」;
10
+ 汇总 `9 通过 / 1 提醒 / 0 失败`。此前同一场景会给出全绿,掩盖升级未生效。
11
+ - **真机页面**:headless Edge 打开 `http://127.0.0.1:60156/api/memory-nebula/`,
12
+ 页面标题「记忆星图 · Memory Nebula」,顶栏 `1980 记忆 / 9531 连接 / 9 工作区 / 73 会话`,
13
+ `NebulaAPI.meta.version=1.1.0`(宿主未重启)、`mode=host`、无版本横幅、无 JS 异常;
14
+ 搜索「记忆」12 命中,点第一条详情正文 1995 字。截图 `dev/shot/live-host.png`(工作区探针,不进包)。
15
+ - **CI 安装门**:GitHub Actions run 42879133994 的 `Node 22.13.0` / `Node 24` /
16
+ `Package install` 三个 job 全部 success;`Package install` 会从 `npm pack` 的 tgz 安装、
17
+ 比对 `--version`、跑 `doctor --help`,并检查包内带 `SECURITY.md` / `CONTRIBUTING.md`、不带 `dev/`。
18
+ - **回归**:88/88 单测;release-check v1.1.4 全绿(含 1.1.4 构件断言:`checkVersionDrift`、
19
+ CI 安装门、doctor 版本漂移用例)。
20
+ - **打包**:`npm pack` 75 文件 / 约 2.3MB(解开约 2.9MB);
21
+ 最终 sha256 见同目录 `.tgz.sha256`(不写进包内,避免重打包后自相矛盾)。
22
+
23
+ ## 1.1.3(2026-11-11)门面
24
+
25
+ - **包元数据**:`package.json` 有 `repository` / `homepage` / `bugs`,描述中英双句,13 个关键词;`npm pack` 后从 tarball 解出的 manifest 同样带这些字段。
26
+ - **CI**:`.github/workflows/ci.yml` 矩阵 Node 22.13.0 / 24,跑 `npm test` 与 `npm run check`;首次运行 `aed5605` 在 GitHub 上 **completed / success**,本机等价命令 87/87。
27
+ - **政策文件**:`SECURITY.md`(只读边界、loopback/Origin/CSP、`/share` 是正文出口、private advisory)与 `CONTRIBUTING.md`(无依赖、测试命令、文案/测试/版本约定)已进包。
28
+ - **回归**:87/87 单测;release-check v1.1.3 全绿(143 文本 / 69 脚本 / 23 Markdown 链接,含 1.1.3 构件断言)。
29
+ - **发布**:`npm pack` 75 文件 / 2,289,894B,sha256 `e5aea7789b600ab49c3171dff72ecdd892f435fa61b8bb97ca2f0d1b823a7ce7`;`npm latest` = 1.1.3(registry shasum `23d31ddea801518bbc2ef20ff440b864534a8402`),registry 安装后 `--version` = 1.1.3、doctor 8 通过。
30
+ - **远程索引**:`https://unpkg.com/dsh-memory-nebula@1.1.3/market/index.json` 200,`parseMarketIndex` 通过(format 1 / 1.1.3),`marketInstallTarget` 返回 `dsh-memory-nebula@1.1.3`;icon/locale/详情/图片均 200。
31
+ - **GitHub Release**:`v1.1.3` 附 tgz 与 `.sha256` 两个资产。
32
+ - **README**:中英顶部都有 CI / npm / license badge,文档表补 SECURITY/CONTRIBUTING 两行。
33
+
5
34
  ## 1.1.2(2026-11-10)换个门牌
6
35
 
7
36
  - **CDN 选择**:本机 `curl` 与 Node fetch 访问 jsDelivr 均为 `ECONNRESET`;unpkg 的 Node fetch 200。
@@ -147,11 +147,13 @@ export async function checkEndpoint(base, timeoutMs = 3000) {
147
147
  const res = await fetch(url, { signal: ctl.signal, headers: { accept: 'application/json' } })
148
148
  const body = await res.json().catch(() => ({}))
149
149
  if (!res.ok) return item('endpoint', 'warn', `${url} → HTTP ${res.status}`, '看 DSH 日志或 standalone 控制台')
150
- return item(
150
+ const out = item(
151
151
  'endpoint',
152
152
  'ok',
153
153
  `${url} → ${body.version || '?'} / ${body.mode || '?'} / ${body.stats?.nodes ?? '?'} memories`,
154
154
  )
155
+ out.version = String(body.version || '')
156
+ return out
155
157
  } catch (err) {
156
158
  const reason = err?.name === 'AbortError' ? `超时 ${timeoutMs}ms` : String(err.message || err)
157
159
  return item('endpoint', 'warn', `${url} → ${reason}`, '插件没在跑、端口不对,或被别的进程占用')
@@ -160,6 +162,22 @@ export async function checkEndpoint(base, timeoutMs = 3000) {
160
162
  }
161
163
  }
162
164
 
165
+ /**
166
+ * 装的是新代码、跑的还是旧代码:这是宿主最常见的「升级后没生效」。
167
+ * 只提醒,不阻断;页面通常仍兼容,但新路由/新能力不会出现。
168
+ */
169
+ export function checkVersionDrift(installed, running) {
170
+ const have = String(installed || '')
171
+ const live = String(running || '')
172
+ if (!have || !live || have === live) return null
173
+ return item(
174
+ 'version',
175
+ 'warn',
176
+ `installed ${have}, running host ${live}`,
177
+ '重启 DSH 让宿主加载新代码;只刷新页面不会换掉后端',
178
+ )
179
+ }
180
+
163
181
  /**
164
182
  * @param {{profile?:string, roots?:string[], base?:string}} opts
165
183
  */
@@ -168,7 +186,12 @@ export async function runDoctor(opts = {}) {
168
186
  const checks = [checkRuntime(), ...pkg.items]
169
187
  if (opts.profile) checks.push(...checkProfile(opts.profile).items)
170
188
  checks.push(checkSources({ roots: opts.roots || [] }))
171
- if (opts.base) checks.push(await checkEndpoint(opts.base))
189
+ if (opts.base) {
190
+ const endpoint = await checkEndpoint(opts.base)
191
+ checks.push(endpoint)
192
+ const drift = checkVersionDrift(pkg.version, endpoint.version)
193
+ if (drift) checks.push(drift)
194
+ }
172
195
  const counts = { ok: 0, warn: 0, fail: 0, skip: 0 }
173
196
  for (const c of checks) counts[c.status] = (counts[c.status] || 0) + 1
174
197
  return { ok: counts.fail === 0, counts, checks }
package/lib/web/app.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* 记忆星图 —— 界面逻辑
2
2
  数据:/api/memory-nebula/*(同源)。渲染交给 render.js。 */
3
3
  ;(function () {
4
- const APP_VERSION = '1.1.2' // 和 package.json 同步(release-check 会核对)
4
+ const APP_VERSION = '1.1.4' // 和 package.json 同步(release-check 会核对)
5
5
  'use strict'
6
6
  /** 中文即源文:英文模式查 i18n.js 的表,查不到就原样返回中文。 */
7
7
  const T = (zh, vars) => (window.NebulaI18n ? window.NebulaI18n.t(zh, vars) : zh)
Binary file
package/market/index.json CHANGED
@@ -86,8 +86,8 @@
86
86
  },
87
87
  "versions": [
88
88
  {
89
- "version": "1.1.2",
90
- "publishTimestamp": 1794324000,
89
+ "version": "1.1.4",
90
+ "publishTimestamp": 1794332116,
91
91
  "source": {
92
92
  "type": "npm"
93
93
  },
package/package.json CHANGED
@@ -1,70 +1,84 @@
1
- {
2
- "name": "dsh-memory-nebula",
3
- "version": "1.1.2",
4
- "private": false,
5
- "description": "记忆星图 Memory Nebula —— 把 DSH 里所有记忆插件的记忆只读抽取出来,连成一张可交互的神经元星云;并提供跨项目记忆的扩散检索(spreading activation)。",
6
- "type": "module",
7
- "main": "lib/index.js",
8
- "bin": {
9
- "memory-nebula": "lib/standalone.mjs",
10
- "memory-nebula-doctor": "scripts/doctor.mjs"
11
- },
12
- "exports": {
13
- ".": "./lib/index.js",
14
- "./client": "./lib/client.js",
15
- "./cordis.patch.yml": "./cordis.patch.yml",
16
- "./package.json": "./package.json"
17
- },
18
- "files": [
19
- "lib",
20
- "cordis.patch.yml",
21
- "README.md",
22
- "README.en.md",
23
- "docs",
24
- "CHANGELOG.md",
25
- "LICENSE",
26
- "scripts",
27
- "sidecar.ps1",
28
- "locale",
29
- "market"
30
- ],
31
- "scripts": {
32
- "test": "node --test \"test/*.test.mjs\"",
33
- "smoke": "node scripts/smoke.mjs",
34
- "bench": "node --expose-gc scripts/bench.mjs",
35
- "check": "node scripts/release-check.mjs",
36
- "standalone": "node lib/standalone.mjs",
37
- "start": "node lib/standalone.mjs",
38
- "verify": "npm test && npm run check",
39
- "prepack": "npm run verify",
40
- "doctor": "node scripts/doctor.mjs"
41
- },
42
- "publishConfig": {
43
- "access": "public"
44
- },
45
- "license": "MIT",
46
- "dsh": {
47
- "bundle": {
48
- "patch": "./cordis.patch.yml"
49
- },
50
- "client": {
51
- "platform": "web",
52
- "inject": []
53
- }
54
- },
55
- "engines": {
56
- "node": ">=22.13.0"
57
- },
58
- "keywords": [
59
- "deepseek-harness",
60
- "dsh-plugin",
61
- "memory",
62
- "nebula",
63
- "graph",
64
- "relational-memory",
65
- "spreading-activation",
66
- "memory-adapter",
67
- "visualization"
68
- ],
69
- "author": "主人 & 小代码酱"
70
- }
1
+ {
2
+ "name": "dsh-memory-nebula",
3
+ "version": "1.1.4",
4
+ "private": false,
5
+ "description": "Local-first memory nebula for DeepSeek Harness — read-only graph, spreading recall, evidence chains, offline snapshots. 记忆星图:把 DSH 各工作区的记忆只读连成一张可交互星云。",
6
+ "type": "module",
7
+ "main": "lib/index.js",
8
+ "bin": {
9
+ "memory-nebula": "lib/standalone.mjs",
10
+ "memory-nebula-doctor": "scripts/doctor.mjs"
11
+ },
12
+ "exports": {
13
+ ".": "./lib/index.js",
14
+ "./client": "./lib/client.js",
15
+ "./cordis.patch.yml": "./cordis.patch.yml",
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "lib",
20
+ "cordis.patch.yml",
21
+ "README.md",
22
+ "README.en.md",
23
+ "docs",
24
+ "CHANGELOG.md",
25
+ "LICENSE",
26
+ "scripts",
27
+ "sidecar.ps1",
28
+ "locale",
29
+ "market",
30
+ "SECURITY.md",
31
+ "CONTRIBUTING.md"
32
+ ],
33
+ "scripts": {
34
+ "test": "node --test \"test/*.test.mjs\"",
35
+ "smoke": "node scripts/smoke.mjs",
36
+ "bench": "node --expose-gc scripts/bench.mjs",
37
+ "check": "node scripts/release-check.mjs",
38
+ "standalone": "node lib/standalone.mjs",
39
+ "start": "node lib/standalone.mjs",
40
+ "verify": "npm test && npm run check",
41
+ "prepack": "npm run verify",
42
+ "doctor": "node scripts/doctor.mjs"
43
+ },
44
+ "publishConfig": {
45
+ "access": "public"
46
+ },
47
+ "license": "MIT",
48
+ "dsh": {
49
+ "bundle": {
50
+ "patch": "./cordis.patch.yml"
51
+ },
52
+ "client": {
53
+ "platform": "web",
54
+ "inject": []
55
+ }
56
+ },
57
+ "engines": {
58
+ "node": ">=22.13.0"
59
+ },
60
+ "keywords": [
61
+ "deepseek-harness",
62
+ "dsh-plugin",
63
+ "memory",
64
+ "nebula",
65
+ "graph",
66
+ "relational-memory",
67
+ "spreading-activation",
68
+ "memory-adapter",
69
+ "visualization",
70
+ "dsh",
71
+ "memory-graph",
72
+ "knowledge-graph",
73
+ "offline-snapshot"
74
+ ],
75
+ "author": "主人 & 小代码酱",
76
+ "homepage": "https://github.com/hanhan9999999999999999999/dsh-memory-nebula#readme",
77
+ "repository": {
78
+ "type": "git",
79
+ "url": "git+https://github.com/hanhan9999999999999999999/dsh-memory-nebula.git"
80
+ },
81
+ "bugs": {
82
+ "url": "https://github.com/hanhan9999999999999999999/dsh-memory-nebula/issues"
83
+ }
84
+ }
@@ -245,6 +245,24 @@ if (!read('docs/market.en.md').includes('https://unpkg.com/')) fail('英文详
245
245
  if (!pkg.files?.includes('market') || !pkg.files?.includes('locale')) fail('package.json files 没带 market/locale')
246
246
  ok('1.1.2 构件:市场索引 / unpkg / 双语详情 / 图标')
247
247
 
248
+ const ciSrc = read('.github/workflows/ci.yml')
249
+ if (!ciSrc.includes("'22.13.0'") || !ciSrc.includes("'24'")) fail('CI 矩阵缺 Node 22.13/24')
250
+ if (!ciSrc.includes('npm run check')) fail('CI 没跑 release-check')
251
+ if (!pkg.repository?.url?.includes('github.com/hanhan9999999999999999999/dsh-memory-nebula')) fail('package.json 缺 repository')
252
+ if (!pkg.homepage?.includes('github.com/hanhan9999999999999999999/dsh-memory-nebula')) fail('package.json 缺 homepage')
253
+ if (!pkg.bugs?.url?.endsWith('/issues')) fail('package.json 缺 bugs.url')
254
+ if (!read('SECURITY.md').includes('private vulnerability reporting')) fail('SECURITY.md 缺报告入口')
255
+ if (!read('CONTRIBUTING.md').includes('npm run check')) fail('CONTRIBUTING.md 缺检查命令')
256
+ if (!read('README.md').includes('actions/workflows/ci.yml/badge.svg')) fail('README.md 缺 CI badge')
257
+ if (!pkg.files?.includes('SECURITY.md') || !pkg.files?.includes('CONTRIBUTING.md')) fail('package.json files 没带政策文档')
258
+ ok('1.1.3 构件:仓库元数据 / CI / 安全与贡献文档')
259
+
260
+ if (!read('lib/host/doctor.js').includes('checkVersionDrift')) fail('doctor 缺版本漂移检查')
261
+ if (!ciSrc.includes('Package install')) fail('CI 缺打包安装 job')
262
+ if (!read('test/doctor.test.mjs').includes('running host')) fail('doctor 测试缺版本漂移用例')
263
+ ok('1.1.4 构件:医生版本漂移 / CI 安装门')
264
+
265
+
248
266
 
249
267
  console.log(`\n发布检查:${pkg.name} v${pkg.version}\n`)
250
268
  for (const n of notes) console.log(` ✔ ${n}`)