project-node-memory 1.3.2 → 1.3.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/README.md +5 -20
- package/README_EN.md +3 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
> 简体中文 · [English](README_EN.md)
|
|
4
4
|
|
|
5
|
-
把 **Markdown 目录当成知识库** 的 DSH 插件:为 Agent 提供
|
|
5
|
+
把 **Markdown 目录当成知识库** 的 DSH 插件:为 Agent 提供 9 个 `kb_*` 工具,为人类提供知识节点面板(侧栏入口名「项目节点知识库」)。
|
|
6
6
|
|
|
7
7
|
没有索引数据库、没有向量、没有后台进程。完整知识库位于项目下的 `.nodekb/` 目录——一堆 md 文件,删掉插件之后它仍然是普通 md。
|
|
8
8
|
|
|
9
|
+
本 README 只描述**当前版本**的行为;每个版本的变更记录在 [Releases](https://github.com/levodoubt/project-node-memory/releases)。
|
|
10
|
+
|
|
9
11
|
```
|
|
10
12
|
项目/
|
|
11
13
|
└── .nodekb/
|
|
12
14
|
├── index/entry.md ## 3.1 编译契约
|
|
13
|
-
├── doc/03-build.md <
|
|
15
|
+
├── doc/03-build.md <tscl id="fact:abi">…</tscl>
|
|
14
16
|
├── lessons/001.md
|
|
15
17
|
└── diag_ignore.json 可选:豁免样板块
|
|
16
18
|
```
|
|
@@ -92,7 +94,7 @@ config:
|
|
|
92
94
|
面板只读,数据走宿主侧注册的 `/nodekb/api/*`。写库就是写 md——用 `write` / `edit` 工具,或者 `kb_write`。
|
|
93
95
|
右栏正文单次最多渲染 10000 字符(超出显示截断提示);宽表格横向滚动,长文本纵向滚动。
|
|
94
96
|
|
|
95
|
-
##
|
|
97
|
+
## 9 个工具
|
|
96
98
|
|
|
97
99
|
| 工具 | 干什么 |
|
|
98
100
|
| --------------- | ---------------------------------------------------------------------------------------------- |
|
|
@@ -197,23 +199,6 @@ ABI 校验见 [[tscl="fact:ver"]]。
|
|
|
197
199
|
|
|
198
200
|
旧写法 `[[TID]]` 仍兼容(有定义时当宏、否则当链接),`kb_diag` 会 warning,2.0 移除。
|
|
199
201
|
|
|
200
|
-
## 从 1.0 升到 1.1
|
|
201
|
-
|
|
202
|
-
数据格式没变——md 还是 md,TID 还是那些 TID,插件卸了照样能读。变化只有两条:
|
|
203
|
-
|
|
204
|
-
1. **`[[x]]` 现在只出链接**,不再把被引用节点的正文复制进来(要复制原文请显式写 `<tscl>`)。
|
|
205
|
-
好处是引用不再撑大渲染结果,位置型小节 `## 3.1` 也能点了。
|
|
206
|
-
2. **`kb_init` 不再建 `facts/`**。已有的 `facts/` 不会被动,`kb_read`/`kb_search` 照常;只是新库默认只有
|
|
207
|
-
`doc/ lessons/ todo/ index/`,事实改写成 `<tscl>` 定义放进它所属的 `doc/` 里。
|
|
208
|
-
|
|
209
|
-
老库要不要迁?**不迁也能用**,只是 `kb_diag` 会给每条裸引用一条 warning。要迁就让 Agent 按
|
|
210
|
-
`kb_diag` 的清单逐条改成 `[[node="…"]]` / `[[tscl="…"]]`(只改写法,不动 TID 与文件):
|
|
211
|
-
|
|
212
|
-
```text
|
|
213
|
-
kb_diag # 列出每条 `旧语法引用`
|
|
214
|
-
kb_write mode=node target=<TID> content=… # 逐条改,或直接改 md 再 kb_diag 复验
|
|
215
|
-
```
|
|
216
|
-
|
|
217
202
|
## 自检(不装 DSH 也能跑)
|
|
218
203
|
|
|
219
204
|
```bash
|
package/README_EN.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A DSH plugin that treats **a directory of Markdown as a database**: nine `kb_*` tools for the agent, and a center-column panel for humans (sidebar entry: 「项目节点知识库」).
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This README describes **the current version only**; per-version changes live in [Releases](https://github.com/levodoubt/project-node-memory/releases).
|
|
8
8
|
|
|
9
9
|
No index database, no embeddings, no background process. The library *is* the `.nodekb/` directory in your project — a pile of Markdown files that stay ordinary Markdown if you uninstall the plugin.
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ No index database, no embeddings, no background process. The library *is* the `.
|
|
|
12
12
|
project/
|
|
13
13
|
└── .nodekb/
|
|
14
14
|
├── index/entry.md ## 3.1 Compile contract
|
|
15
|
-
├── doc/03-build.md <
|
|
15
|
+
├── doc/03-build.md <tscl id="fact:abi">…</tscl>
|
|
16
16
|
├── lessons/001.md
|
|
17
17
|
└── diag_ignore.json optional: whitelist boilerplate blocks
|
|
18
18
|
```
|
|
@@ -89,7 +89,7 @@ The Markdown renderer is a small home-grown one (headings, lists, code, tables,
|
|
|
89
89
|
The panel is read-only; data flows through host routes under `/nodekb/api/*`. Writing a library means writing Markdown — via `write` / `edit`, or `kb_write`.
|
|
90
90
|
The right column renders at most 10,000 characters per view (with a truncation notice); wide tables scroll horizontally and long text scrolls vertically.
|
|
91
91
|
|
|
92
|
-
## The
|
|
92
|
+
## The nine tools
|
|
93
93
|
|
|
94
94
|
| Tool | What it does |
|
|
95
95
|
|---|---|
|
|
@@ -179,27 +179,6 @@ and who references it.
|
|
|
179
179
|
The old `[[TID]]` form still works (macro when a definition exists, link otherwise) with a
|
|
180
180
|
`kb_diag` warning, and goes away in 2.0.
|
|
181
181
|
|
|
182
|
-
## Upgrading from 1.0
|
|
183
|
-
|
|
184
|
-
The data format is unchanged — Markdown stays Markdown, TIDs stay the same, and the library remains
|
|
185
|
-
readable after the plugin is removed. Only two things changed:
|
|
186
|
-
|
|
187
|
-
1. **`[[x]]` now renders a link only**; it no longer copies the referenced node's body into the
|
|
188
|
-
output (use an explicit `<tscl>` for that). References stop inflating rendered size, and
|
|
189
|
-
positional sections (`## 3.1`) become clickable.
|
|
190
|
-
2. **`kb_init` no longer creates `facts/`.** Existing `facts/` folders are untouched and still
|
|
191
|
-
readable/searchable; new libraries get `doc/ lessons/ todo/ index/` only, and facts become
|
|
192
|
-
`<tscl>` definitions inside the `doc/` file they belong to.
|
|
193
|
-
|
|
194
|
-
Do old libraries need migrating? **No** — they keep working, `kb_diag` just emits one warning per
|
|
195
|
-
bare reference. To migrate, have the agent walk the `kb_diag` list and fix each one (syntax only, no
|
|
196
|
-
TID or file changes):
|
|
197
|
-
|
|
198
|
-
```text
|
|
199
|
-
kb_diag # lists every `旧语法引用` (legacy bare ref)
|
|
200
|
-
kb_write mode=node target=<TID> content=… # fix one at a time, or edit the md and re-run kb_diag
|
|
201
|
-
```
|
|
202
|
-
|
|
203
182
|
## Self-check (no DSH required)
|
|
204
183
|
|
|
205
184
|
```bash
|
package/package.json
CHANGED