@lmzhen/dsh-evolution-core 0.17.1 → 0.18.0

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 CHANGED
@@ -11,6 +11,7 @@ section, and importing the package root is its only entry.
11
11
 
12
12
  ## Known limitations
13
13
 
14
+ - **The family tree IS the platform's USER skill root.** `skillsRoot()` resolves to `<dshHome>/skills` — the root the platform's `skill-filesystem` serves at rank 400 — so "the same tree" holds while that root is enabled. Two divergences stay documented rather than mirrored: a platform row with `includeDefaultRoots:false` (or a composition without this family's catalog row) removes the only providers that serve the tree while family writes still succeed, and the platform's CWD-derived PROJECT roots (`<cwd>/.dsh/skills`, `<cwd>/.agents/skills`) are not read by the family at all, so `ctx.skills.get(name).path` and `SkillLibrary.read(name)` can name different files. Mirroring project roots is `U-3`, deliberately not started; point `customSkillDirs` (platform side) or `root` (family side) at a shared directory when the project tree has to be visible to both.
14
15
  - This package is a library, not a Cordis row; do not mount it as a plugin.
15
16
  - 数值配置已在消费方 Config 面钳制(`min 1`/各字段域);`MemoryStore` 内部对 `limit <= 0` 仍按 unbounded 防御处理——那是库内部防御,不构成"0 = 禁用"的配置语义。
16
17
  - **Content-history storage grows with the number of DISTINCT bodies a skill has ever been written
@@ -46,3 +47,31 @@ section, and importing the package root is its only entry.
46
47
  - When the backend provides `transact` (nodeEvolutionIo and the io adapter do), the constructor binds it BY DEFAULT since 0.3.27: the single-file entry points (`update`, `patch`, `writeSupportFile`, and each per-file piece of `restructure`) run their read→write inside the cross-process lock for every instantiation, so same-file concurrent writes from different processes no longer resolve to last-writer-wins there.
47
48
  - The two-phase paths deliberately stay outside that lock: `create`'s exists probe runs inside the transact when a transact backend is bound (v18), so only a transact-less custom backend can still double-pass the probe across processes; `archive`/`consolidate` are rename-based with best-effort rollback (an archive loser's rollback surfaces the raw failure when the source vanished), and `restructure`'s multi-file swap can expose an interleaved tree to a concurrent reader.
48
49
  - These residual windows are documented rather than locked: cross-process writers to the SAME skill file should serialize through the single-file paths above.
50
+
51
+ ## Events (the family's own, process-local)
52
+
53
+ Six process events ride the cordis bus (`evolution-core/src/events.ts` declares the payloads;
54
+ producers call `ctx.emit`, consumers `ctx.on`). They are NOT session events — appending one to a
55
+ session log made the session unresumable (A-line P0-1), which is why the payload file says so.
56
+
57
+ | event | mode today | emitted by |
58
+ |---|---|---|
59
+ | `evolution/skill-mutated` | emit (notification) | `evolution-core` skill store |
60
+ | `evolution/skills-refresh` | emit (notification) | `evolution-commands` `/evolution` verbs |
61
+ | `evolution/review-scheduled` | emit (notification) | `evolution-review` cadence paths |
62
+ | `evolution/review-error` | emit (notification) | `evolution-review` failure paths |
63
+ | `evolution/plan-applied` | emit (notification) | `evolution-review` after a plan lands |
64
+ | `evolution/memory-applied` | emit (notification) | `memory` after a memory write |
65
+
66
+ The mode column is what the code does today: every one of them is an announcement, and each
67
+ declaration carries it as a `@mode` tag (finding O-1, landed) — `verify-arch-guards`' rule **N33** checks that
68
+ tag against THIS table and against the dispatch site (`ctx.emit('…'`), so a declaration that drifts from
69
+ the table, or an event with no `@mode`, fails. This table stays the set's ONE home: the machine check here
70
+ (`machine.kind = event-mode`) re-derives the SET from the emit sites, so an event added or renamed in
71
+ code without this table fails N19.
72
+
73
+ The last two rows have no in-family consumer: `evolution/review-scheduled` and `evolution/review-error`
74
+ are emitted for operators and observability (5 and 3 dispatch sites, 0 `ctx.on` subscribers here). They are
75
+ **kept deliberately** — the observation surface is the point, and a deployment's own listener is the intended
76
+ consumer — so the `@mode` target stays at six (decision 10, provisional: keep).
77
+