@ilaomianyang/dsh-memory-graph 0.10.1 → 0.10.2
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 +23 -0
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/graph.js +3 -0
- package/test/page.mjs +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.2 — 2026-11-03
|
|
4
|
+
|
|
5
|
+
补一个从第一天就存在的渲染缺陷,并让发布流水线第一次真正跑完。
|
|
6
|
+
|
|
7
|
+
**Fixed**
|
|
8
|
+
|
|
9
|
+
- 图里每个节点的光晕(halo)一直是 `r="NaN"`。`haloScale` 在模型里算好了(实体 2.5、卡片 2.7),序列化给页面的 payload 时漏了这个字段,浏览器做 `node.r * undefined` 得到 NaN,柔光画不出来,控制台上每个节点报一条 `<circle> attribute r: Expected length, "NaN"`。截图上完全看不出来——缺的是柔光,不是骨架——只有打开控制台才发现。现在 payload 带上 `haloScale`。
|
|
10
|
+
- `test/page.mjs` 加一条检查兜住这一类问题:解析页面里的 `DATA`,断言每个节点的 `r` 与 `haloScale` 都是有限数,并且整页不出现字面量 `NaN`。
|
|
11
|
+
|
|
12
|
+
**Changed**
|
|
13
|
+
|
|
14
|
+
- 检查数 231 → 232(README 两版、`test.yml` 的注释同步)。
|
|
15
|
+
|
|
16
|
+
**已发布到 npm:`@ilaomianyang/dsh-memory-graph@0.10.2`,由 GitHub Actions 用 trusted publishing(OIDC,仓库里不存任何 token)发布,带 SLSA provenance。**
|
|
17
|
+
|
|
18
|
+
## 0.10.1 — 2026-11-03
|
|
19
|
+
|
|
20
|
+
**Added**
|
|
21
|
+
|
|
22
|
+
- `.github/workflows/publish.yml`:推 `v*` tag 就发布,不再靠本机 `npm publish`。核对 tag 与 `package.json`、跳过已发布的版本(重推 tag 是空操作)、`npm publish --provenance`,npm 页面上因此有「Built and signed on GitHub Actions」。
|
|
23
|
+
- `npm run release`:跑测试 → bump → 提交 → 打 tag → 推 tag 的一条命令。
|
|
24
|
+
- 首版流水线踩了两个坑,都只影响 CI,与插件本身无关:`npm view` 在「版本尚未发布」时退出码为 1,而 runner 打开了 `PSNativeCommandUseErrorActionPreference`,这个预期内的非零退出直接把守门步骤干掉了;改成直接读 registry 文档判断。另外 trusted publishing 需要 npm ≥ 11.5.1,Node 22 自带 10.x,所以先 `npm install -g npm@latest`。
|
|
25
|
+
|
|
3
26
|
## 0.10.0 — 2026-11-03
|
|
4
27
|
|
|
5
28
|
**已发布到 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 +
|
|
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
|
|
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 +
|
|
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` 会再跑一遍那
|
|
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
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()
|