@lmzhen/dsh-evolution-curator 0.32.4 → 0.32.5
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 +11 -36
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,48 +1,23 @@
|
|
|
1
1
|
# @lmzhen/dsh-evolution-curator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 自动整理技能库:标 stale、归档、合并近重复。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 你会看到
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Prompt prefix / KV cache:** independent of request-prefix construction — it does not alter the assembled prompt or tool list; family-level rules: `packages/README.md` §"Model-visible prompt prefix and the KV cache".
|
|
9
|
-
- **Mount it?** yes — the `evolution-curator` row, carried by the `evolution-host`, `evolution-all` and one-click `evolution-preset` bundles; it provides the `evolutionCurator` service the `/evolution curator …` commands and doctor read.
|
|
7
|
+
`/evolution curator status/report/run`;归档/恢复/历史/撤销。
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## 什么时候会用到
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
- Consolidation is a REAL merger path: the LLM nomination (when enabled / via `recommend()`) proposes
|
|
15
|
-
merge groups, the control plane gates them and applies the mutation — merged source bodies are appended
|
|
16
|
-
verbatim rather than rewritten into a synthesized skill.
|
|
11
|
+
技能变多、长期不用、出现重复时。
|
|
17
12
|
|
|
18
|
-
##
|
|
13
|
+
## 默认 / 前提
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
- `restore(name)` (service) / `/evolution skill restore <name>` brings one archived skill back to the active root and resets its usage state.
|
|
22
|
-
- `history(name)` (service) / `/evolution skill history <name>` lists one skill's content versions (number, time, action, characters, hash prefix) from the content history every write path maintains (`evolution-core/src/skill-history.ts`). An index that cannot be read, carries a foreign field layout, or was written by a NEWER reader all read as "no versions" (the module's never-guess posture) — the next successful write re-seeds the index with a baseline entry, so the record heals instead of staying invisible.
|
|
23
|
-
- `undo(name, v?)` (service) / `/evolution skill undo <name> [--to v<N>]` restores one version's CONTENT through an ordinary anchored write: an omitted `v` means the newest version whose content differs from the live file, the anchor is the live hash (a concurrent writer is refused rather than overwritten, and a version the index lists but whose blob cannot be read is refused rather than guessed at), and the rollback itself becomes a new version. Content only: the pin marker, usage counters and curation state are not versions and do not move, which the result text says. A skill with no recorded versions, a target that is not in the active tree (use `skill restore` for an archived one), and a session that cannot replay the write each get their own refusal.
|
|
24
|
-
- `consolidate(target, sources)` (service) / `/evolution consolidate` merges source bodies into the target, archives the sources with an absorbed-into marker, and folds their usage records into `archived` state. Both operations snapshot the full state first (`pre-consolidate` / `pre-restore`).
|
|
25
|
-
- `restoreSnapshot` (service) / `/evolution restore` rolls the state back to the latest snapshot: active tree, usage/suppression sidecars, `.archive/` and the curator state carried in the snapshot (`curator-state.json`), so the interval gate does not immediately re-fire after a rollback. Skills that were skipped at snapshot time (a live writer held their lock; recorded in the manifest's `skipped` list) are NOT restored — the restore result names them, and `.backups` may hold a copy. The restore itself is undoable — the pre-rollback safety snapshot preserves the current tree plus its state.
|
|
15
|
+
默认定期跑;可暂停。
|
|
26
16
|
|
|
27
|
-
##
|
|
17
|
+
## 边界
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
- `autoStart: false` disables both automatic checks; `/evolution curator run` (manual, gate-skipping) still works.
|
|
31
|
-
- `autoStart` is the STARTUP default. The runtime switch is `/evolution curator pause` / `resume`: the pause is persisted in curation state, survives restarts, and wins over `autoStart` until it is cleared — turning `autoStart` off keeps curation manual, it does not freeze a schedule that is already paused or running.
|
|
32
|
-
- Deprecated name (G0/S0.3): `intervalHours` is the legacy spelling of the policy
|
|
33
|
-
row's `curatorIntervalHours`, whose value the snapshot shadows. Reading it still
|
|
34
|
-
works; writing it is refused. Removal was planned for 0.7.0 and is deferred: the alias still ships, so no later version is claimed here.
|
|
19
|
+
先快照,删除是归档;不会硬删。
|
|
35
20
|
|
|
36
|
-
|
|
37
|
-
## Notes and history
|
|
21
|
+
## 维护者参考:参数别名(G0/S0.3)
|
|
38
22
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## 单元与撤销(对外契约摘要)
|
|
42
|
-
|
|
43
|
-
- 一个单元 = 一次树改动(一个 unitId)。索引里只有一条记录带 unitHead,两形态互斥:代表片 { moves, sources }(全量清单 + 它写过哪些技能)/路标 { skill }(记录在别的技能里);判别式固定为 moves !== undefined。
|
|
44
|
-
- undoUnit(name, unitId?):逐路径回该单元铸的基线;没有基线才回退到最早那条的 beforeHash;单元前不存在的路径删除并锚定(盘上字节被别人改过就拒绝,不覆盖)。决策在纯函数 src/unit-undo-plan.ts,IO 与主机不进决策层。
|
|
45
|
-
- 跨技能单元:成员只按 sources[] 的已知 key 解析(禁止目录扫描);缺片/外来片/重复片一律拒绝并点名对象 —— 不得用剩下的片段拼一个撤销。
|
|
46
|
-
- 路标的 undoable 是 undefined(wire 上不出现该键),绝不为 false;聚合时跳过路标,避免它的 hash 污染同单元兄弟片。
|
|
47
|
-
- 剪枝按单元 all-or-nothing;保留窗口今天仍按条目计(切换条件见仓库文档)。
|
|
48
|
-
- 完整说明(含回退与验证命令)见仓库 docs/units-and-undo.md;该目录不随 npm 发布,故在此摘要。
|
|
23
|
+
`intervalHours` → `curatorIntervalHours`。旧名仍可读,写入会拒绝。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-curator",
|
|
3
3
|
"description": "Deterministic skill lifecycle and recovery (community build)",
|
|
4
|
-
"version": "0.32.
|
|
4
|
+
"version": "0.32.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.32.5"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
34
34
|
"@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
|
|
35
35
|
"@deepseek-ai/dsh-session": "^0.2.1-rc.2",
|
|
36
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
37
|
-
"@lmzhen/dsh-evolution-state": "^0.32.
|
|
36
|
+
"@lmzhen/dsh-evolution-io": "^0.32.5",
|
|
37
|
+
"@lmzhen/dsh-evolution-state": "^0.32.5"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
|
|
41
41
|
"@deepseek-ai/dsh-session": "^0.2.1-rc.2",
|
|
42
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
43
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.32.
|
|
42
|
+
"@lmzhen/dsh-evolution-core": "^0.32.5",
|
|
43
|
+
"@lmzhen/dsh-evolution-io": "^0.32.5",
|
|
44
|
+
"@lmzhen/dsh-evolution-state": "^0.32.5"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|