@ilaomianyang/dsh-memory-graph 0.10.1 → 0.10.3

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
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.3 — 2026-11-03
4
+
5
+ 发布流水线的两件收尾。插件功能没有变化——这一版自己就是流水线的验收样本。
6
+
7
+ **Added**
8
+
9
+ - 发布成功后自动在本仓库建 GitHub Release:`gh release create --generate-notes`,并把 `npm pack` 出来的 tarball 附上去。建 Release 的前提是 npm 已经接受这个版本(`steps.publish.outcome == 'success'`),所以不会出现「有 Release、npm 上没有」的错位;同名 Release 已存在就跳过,重跑同一条流水线是安全的。`gh` 是 runner 自带的,没有引入第三方 action。
10
+ - 给 `v0.10.0`、`v0.10.1`、`v0.10.2` 补建了 Release。
11
+
12
+ **Changed**
13
+
14
+ - `actions/checkout@v4`、`actions/setup-node@v4` → `v5`。GitHub 通报 Node 20 运行时弃用:v4 会被强行拉到 Node 24 上跑,功能不变但每次 run 都挂一条警告。
15
+ - 发布流水线需要 `contents: write`(建 Release 用),原来只有 `contents: read`。
16
+
17
+ ## 0.10.2 — 2026-11-03
18
+
19
+ 补一个从第一天就存在的渲染缺陷,并让发布流水线第一次真正跑完。
20
+
21
+ **Fixed**
22
+
23
+ - 图里每个节点的光晕(halo)一直是 `r="NaN"`。`haloScale` 在模型里算好了(实体 2.5、卡片 2.7),序列化给页面的 payload 时漏了这个字段,浏览器做 `node.r * undefined` 得到 NaN,柔光画不出来,控制台上每个节点报一条 `<circle> attribute r: Expected length, "NaN"`。截图上完全看不出来——缺的是柔光,不是骨架——只有打开控制台才发现。现在 payload 带上 `haloScale`。
24
+ - `test/page.mjs` 加一条检查兜住这一类问题:解析页面里的 `DATA`,断言每个节点的 `r` 与 `haloScale` 都是有限数,并且整页不出现字面量 `NaN`。
25
+
26
+ **Changed**
27
+
28
+ - 检查数 231 → 232(README 两版、`test.yml` 的注释同步)。
29
+
30
+ **已发布到 npm:`@ilaomianyang/dsh-memory-graph@0.10.2`,由 GitHub Actions 用 trusted publishing(OIDC,仓库里不存任何 token)发布,带 SLSA provenance。**
31
+
32
+ ## 0.10.1 — 2026-11-03
33
+
34
+ **Added**
35
+
36
+ - `.github/workflows/publish.yml`:推 `v*` tag 就发布,不再靠本机 `npm publish`。核对 tag 与 `package.json`、跳过已发布的版本(重推 tag 是空操作)、`npm publish --provenance`,npm 页面上因此有「Built and signed on GitHub Actions」。
37
+ - `npm run release`:跑测试 → bump → 提交 → 打 tag → 推 tag 的一条命令。
38
+ - 首版流水线踩了两个坑,都只影响 CI,与插件本身无关:`npm view` 在「版本尚未发布」时退出码为 1,而 runner 打开了 `PSNativeCommandUseErrorActionPreference`,这个预期内的非零退出直接把守门步骤干掉了;改成直接读 registry 文档判断。另外 trusted publishing 需要 npm ≥ 11.5.1,Node 22 自带 10.x,所以先 `npm install -g npm@latest`。
39
+
3
40
  ## 0.10.0 — 2026-11-03
4
41
 
5
42
  **已发布到 npm:`npm i @ilaomianyang/dsh-memory-graph`(0.10.0,2026-11-03)。** npmmirror 已同步,国内直接装。`dsh-memory-graph` 这个名字在 npm 上已经被别人占了(maintainer `lilai123`,2026-11-01 发的 0.1.2,是个同名但不同的插件),所以换名发布。
package/README.en.md CHANGED
@@ -383,7 +383,7 @@ Side benefit: an injected message no longer cuts a turn in half, so an episode's
383
383
  No network, no real vault:
384
384
 
385
385
  ```bash
386
- npm test # 43 + 13 + 35 + 12 + 22 + 54 + 15 + 7 + 11 + 19 = 231 checks, plus the 25-question retrieval eval
386
+ npm test # 43 + 13 + 35 + 12 + 22 + 54 + 15 + 8 + 11 + 19 = 232 checks, plus the 25-question retrieval eval
387
387
  npm run eval # retrieval eval only (offline, deterministic)
388
388
  ```
389
389
 
@@ -422,7 +422,7 @@ The tag triggers `.github/workflows/publish.yml`, which does four things:
422
422
 
423
423
  1. checks that the tag and `package.json` agree — a mismatch fails instead of publishing a package whose version lies;
424
424
  2. checks whether that version is already on the registry — if so it skips, so re-running a tag is a no-op rather than an error;
425
- 3. `npm publish --provenance --access public` (`prepublishOnly` runs the 231 checks again; a red build cannot reach the registry);
425
+ 3. `npm publish --provenance --access public` (`prepublishOnly` runs the 232 checks again; a red build cannot reach the registry);
426
426
  4. adds "Built and signed on GitHub Actions" to the npm page, proving the tarball came from this commit of this repository.
427
427
 
428
428
  Two ways to authenticate; the workflow accepts both (it uses `NPM_TOKEN` when the secret exists and falls back to OIDC when it does not):
package/README.md CHANGED
@@ -376,7 +376,7 @@ Harness 会把运行时快照、技能目录、时间戳、审批通知、压缩
376
376
  零依赖,不联网,不碰真实记忆库:
377
377
 
378
378
  ```bash
379
- npm test # 43 + 13 + 35 + 12 + 22 + 54 + 15 + 7 + 11 + 19 = 231 项检查,另加 25 题检索评测
379
+ npm test # 43 + 13 + 35 + 12 + 22 + 54 + 15 + 8 + 11 + 19 = 232 项检查,另加 25 题检索评测
380
380
  npm run eval # 只跑检索评测(离线,确定性的)
381
381
  ```
382
382
 
@@ -415,7 +415,7 @@ npm version minor -m "chore(release): v%s" && git push --follow-tags # minor /
415
415
 
416
416
  1. 核对 tag 和 `package.json` 的版本号——不一致就失败,不会发出一个版本号对不上的包;
417
417
  2. 查这个版本是不是已经在注册表上——在就跳过,重推同一个 tag 是空操作而不是报错;
418
- 3. `npm publish --provenance --access public`(`prepublishOnly` 会再跑一遍那 231 项,红的进不去);
418
+ 3. `npm publish --provenance --access public`(`prepublishOnly` 会再跑一遍那 232 项,红的进不去);
419
419
  4. npm 页面上多一条「Built and signed on GitHub Actions」,证明这个 tarball 是从这个仓库的这个提交构建的。
420
420
 
421
421
  凭据有两条路,工作流两条都认(有 `NPM_TOKEN` 就用它,没有就走 OIDC):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilaomianyang/dsh-memory-graph",
3
- "version": "0.10.1",
3
+ "version": "0.10.3",
4
4
  "type": "module",
5
5
  "author": "ISKING <admin@isking.cc>",
6
6
  "repository": {
package/src/graph.js CHANGED
@@ -499,6 +499,9 @@ function toPayload({ cards, entities, projects, generatedAt }) {
499
499
  x: node.x,
500
500
  y: node.y,
501
501
  r: node.r,
502
+ // The renderer draws the halo at r * haloScale; leaving this out of the
503
+ // payload made that multiplication NaN and every halo a `r="NaN"` circle.
504
+ haloScale: node.haloScale,
502
505
  degree: node.degree,
503
506
  projects: node.projects,
504
507
  labelAt: node.labelPos,
package/test/page.mjs CHANGED
@@ -72,6 +72,23 @@ await check('it is the same renderer the vault writes to disk', async () => {
72
72
  assert.equal(skeleton(served), skeleton(onDisk))
73
73
  })
74
74
 
75
+ await check('every node carries the numbers the renderer multiplies', async () => {
76
+ const handler = createPageHandler({ getVault: () => vault })
77
+ const html = await (await handler()).text()
78
+ // The halo is drawn at r * haloScale. haloScale was computed in the model and
79
+ // then left out of the payload, so the browser multiplied by undefined, every
80
+ // halo became <circle r="NaN">, and the glow never appeared — one console
81
+ // error per node, invisible in a screenshot. Assert the payload, and assert
82
+ // the page never renders the word at all.
83
+ const data = JSON.parse(html.match(/var DATA = (\{.*\})/)[1])
84
+ assert.ok(data.nodes.length > 0, 'the fixture wrote a card, so there is a node')
85
+ for (const node of data.nodes) {
86
+ assert.ok(Number.isFinite(node.r), `${node.key} has a numeric radius`)
87
+ assert.ok(Number.isFinite(node.haloScale), `${node.key} carries the halo scale the renderer multiplies by`)
88
+ }
89
+ assert.ok(!html.includes('NaN'), 'no attribute is rendered as NaN')
90
+ })
91
+
75
92
  await check('the page is frameable by its own origin and nothing else', async () => {
76
93
  const handler = createPageHandler({ getVault: () => vault })
77
94
  const response = await handler()