project-node-memory 1.1.2 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +20 -1
  2. package/README_EN.md +25 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -184,10 +184,29 @@ config:
184
184
  同一 `tscl` id 全库只能定义一次,且不能与节点 TID 同名。
185
185
  旧写法 `[[TID]]` 仍兼容(有定义时当宏、否则当链接),`kb_diag` 会 warning,2.0 移除。
186
186
 
187
+ ## 从 1.0 升到 1.1
188
+
189
+ 数据格式没变——md 还是 md,TID 还是那些 TID,插件卸了照样能读。变化只有两条:
190
+
191
+ 1. **`[[x]]` 现在只出链接**,不再把被引用节点的正文复制进来(要复制原文请显式写 `<tscl>`)。
192
+ 好处是引用不再撑大渲染结果,位置型小节 `## 3.1` 也能点了。
193
+ 2. **`kb_init` 不再建 `facts/`**。已有的 `facts/` 不会被动,`kb_read`/`kb_search` 照常;只是新库默认只有
194
+ `doc/ lessons/ todo/ index/`,事实改写成 `<tscl>` 定义放进它所属的 `doc/` 里。
195
+
196
+ 老库要不要迁?**不迁也能用**,只是 `kb_diag` 会给每条裸引用一条 warning。要迁就跑:
197
+
198
+ ```text
199
+ kb_migrate # 演练:报每个文件会改几处、哪些引用本来就悬空
200
+ kb_migrate dry_run=false # 确认后落盘
201
+ ```
202
+
203
+ 迁移只改写法(`[[doc:x]]` → `[[node="doc:x"]]`,命中定义则 `[[tscl="…"]]`),不动任何 TID、不搬文件,
204
+ 所以引用关系与渲染结果都不变;围栏代码块内一律跳过。
205
+
187
206
  ## 自检(不装 DSH 也能跑)
188
207
 
189
208
  ```bash
190
- node scripts/check.mjs # 275 项:清单契约 / 工具 / 路由 / 客户端槽位 / 改名改写 / 建库写库 / 提示词段落 / 随包技能
209
+ node scripts/check.mjs # 290 项:清单契约 / 工具 / 路由 / 客户端槽位 / 改名改写 / 建库写库 / tscl / 迁移 / 提示词段落 / 随包技能
191
210
  node test/parity.mjs # 与 Python 原实现逐条对拍(需要 python 与 nodekb 源码)
192
211
  ```
193
212
 
package/README_EN.md CHANGED
@@ -163,10 +163,34 @@ as structure (a `##` there is not a heading); a `tscl` id may be defined exactly
163
163
  collide with a node TID. The old `[[TID]]` form still works (macro when a definition exists, link
164
164
  otherwise) with a `kb_diag` warning, and goes away in 2.0.
165
165
 
166
+ ## Upgrading from 1.0
167
+
168
+ The data format is unchanged — Markdown stays Markdown, TIDs stay the same, and the library remains
169
+ readable after the plugin is removed. Only two things changed:
170
+
171
+ 1. **`[[x]]` now renders a link only**; it no longer copies the referenced node's body into the
172
+ output (use an explicit `<tscl>` for that). References stop inflating rendered size, and
173
+ positional sections (`## 3.1`) become clickable.
174
+ 2. **`kb_init` no longer creates `facts/`.** Existing `facts/` folders are untouched and still
175
+ readable/searchable; new libraries get `doc/ lessons/ todo/ index/` only, and facts become
176
+ `<tscl>` definitions inside the `doc/` file they belong to.
177
+
178
+ Do old libraries need migrating? **No** — they keep working, `kb_diag` just emits one warning per
179
+ bare reference. To migrate:
180
+
181
+ ```text
182
+ kb_migrate # dry run: how many refs per file, which ones are already dangling
183
+ kb_migrate dry_run=false # write
184
+ ```
185
+
186
+ Migration only changes syntax (`[[doc:x]]` → `[[node="doc:x"]]`, or `[[tscl="…"]]` when the id is a
187
+ definition). No TID changes, no file moves, so references and rendered output stay identical; fenced
188
+ code blocks are skipped.
189
+
166
190
  ## Self-check (no DSH required)
167
191
 
168
192
  ```bash
169
- node scripts/check.mjs # 275 checks: manifest contract / tools / routes / client slots / rename rewriting / scaffold + write / prompt section / bundled skill
193
+ node scripts/check.mjs # 290 checks: manifest contract / tools / routes / client slots / rename rewriting / scaffold + write / tscl / migration / prompt section / bundled skill
170
194
  node test/parity.mjs # case-by-case parity against the Python implementation (needs python and nodekb sources)
171
195
  ```
172
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-node-memory",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Project node knowledge base for DSH agents: markdown-as-database, stable TIDs, transclusion projection, structure self-check.",
5
5
  "type": "module",
6
6
  "license": "MIT",