@lmzhen/dsh-evolution-core 0.21.0 → 0.23.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.
@@ -1,137 +1,176 @@
1
- [
2
- {
3
- "id": "usage",
4
- "path": "<skillsRoot>/.usage.json",
5
- "writer": "evolution-core/src/usage.ts",
6
- "serializedBy": "transact",
7
- "marker": "transactIo(io, usageFile(root)",
8
- "state": [],
9
- "note": "Skill usage counters. RMW under the IO backend's cross-process lock; the reader side rebuilds from the events log."
1
+ {
2
+ "symbols": {
3
+ "<dshHome>": {
4
+ "resolver": "evolutionRoot",
5
+ "segments": []
6
+ },
7
+ "<evolutionHome>": {
8
+ "resolver": "evolutionHome",
9
+ "segments": [
10
+ "evolution"
11
+ ],
12
+ "basedOn": "<dshHome>"
13
+ },
14
+ "<skillsRoot>": {
15
+ "resolver": "skillsRoot",
16
+ "segments": [
17
+ "skills"
18
+ ],
19
+ "basedOn": "<dshHome>"
20
+ },
21
+ "<memoryRoot>": {
22
+ "resolver": "memoryRoot",
23
+ "segments": [
24
+ "memories"
25
+ ],
26
+ "basedOn": "<dshHome>"
27
+ },
28
+ "<historyRoot>": {
29
+ "resolver": "historyRoot",
30
+ "segments": [
31
+ ".history"
32
+ ],
33
+ "basedOn": "<skillsRoot>"
34
+ },
35
+ "<callerSupplied>": {
36
+ "resolver": "caller"
37
+ }
10
38
  },
11
- {
12
- "id": "suppressed",
13
- "path": "<skillsRoot>/.curator-suppressed.json",
14
- "writer": "evolution-core/src/usage.ts",
15
- "serializedBy": "transact",
16
- "marker": "transactIo(io, suppressedFile(root)",
17
- "state": [],
18
- "note": "Curator suppression list (archived bundled skills that must not re-seed)."
19
- },
20
- {
21
- "id": "mutations",
22
- "path": "<skillsRoot>/.mutations.json",
23
- "writer": "evolution-core/src/mutations.ts",
24
- "serializedBy": "transact",
25
- "marker": "transactIo(io, mutationsFile(root)",
26
- "state": [],
27
- "note": "Skill mutation audit records (bounded ring)."
28
- },
29
- {
30
- "id": "events",
31
- "path": "<evolutionHome>/evolution/events.json",
32
- "writer": "evolution-core/src/evolution-events.ts",
33
- "serializedBy": "transact",
34
- "marker": "transactIo(io, path",
35
- "state": [],
36
- "note": "The rc.68 evolution event log; feedback/skill-usage stats fold it."
37
- },
38
- {
39
- "id": "memory",
40
- "path": "<memoryRoot>/<target>.md",
41
- "writer": "evolution-core/src/memory-store.ts",
42
- "serializedBy": "transact",
43
- "marker": "transactIo(this.io, fileFor(this.root, target)",
44
- "state": [],
45
- "note": "Durable memory documents written by the memory tool."
46
- },
47
- {
48
- "id": "state",
49
- "path": "<evolutionHome>/<review|curator|pending>-state.json",
50
- "writer": "evolution-state-json/src/index.ts",
51
- "serializedBy": "transact",
52
- "marker": "transactIo(io(), join(root, file)",
53
- "state": [],
54
- "note": "The durable state stack (review/curator/pending). S4.4/O-6 moved its three warn/rewrite sets into the provider instance (QuarantineMemory), so no module-scope N12 store remains here."
55
- },
56
- {
57
- "id": "curator-reports",
58
- "path": "<evolutionHome>/reports/curator-*.json",
59
- "writer": "evolution-curator/src/index.ts",
60
- "serializedBy": "transact",
61
- "marker": "transactIo(this.io, reportsSweepLockTarget()",
62
- "state": [],
63
- "note": "Curator run reports + their retention sweep. The sweep is a multi-step list + delete-beyond-the-window over a DIRECTORY, so it has no per-file lock: v43 FLOW2-1 put it inside the IO backend's cross-process write lock (transactIo) on a per-home lock target, <evolutionHome>/reports/.retention (lock file <target>.lock, pid:token body). The former declaration here was instance-claim, which is in-process ONLY (instance-scope.ts is a module-scope Map). Two curator ROWS in one process still cannot sweep at once (the loser yields on that claim), and report writes are name-unique per runId. Trigger for the remaining gap: a second PROCESS sharing DSH_HOME now WAITS on the lock instead of sweeping concurrently, and on a backend without transact there is no lock at all, so the sweep degrades to best-effort idempotent deletes."
64
- },
65
- {
66
- "id": "runs-index",
67
- "path": "<evolutionHome>/runs.json",
68
- "writer": "evolution-core/src/run-registry.ts",
69
- "serializedBy": "transact",
70
- "marker": "transactIo(options.io, path",
71
- "state": [],
72
- "note": "The run registry's index (0.19.0/S2): what is in flight, how each run ended, where its report lives. Read-modify-write under the IO backend's cross-process lock, and it MERGES instead of overwriting — the desktop and the web plane share one DSH_HOME, so two hosts each know their own runs and this file is their shared view. resultRef only POINTS at the report; results never live here."
73
- },
74
- {
75
- "id": "maintain-reports",
76
- "path": "<evolutionHome>/reports/maintain-*.json",
77
- "writer": "evolution-commands/src/index.ts",
78
- "serializedBy": "transact",
79
- "marker": "transactIo(io, reportsSweepLockTarget()",
80
- "state": [],
81
- "note": "One report per maintenance run (0.19.0/S2), written once at settle by that run's owner under a name unique to the run, so the write itself needs no per-file lock. The retention sweep is multi-step (list the directory, then delete beyond the window) and takes the SAME per-home <evolutionHome>/reports/.retention lock the curator's sweep holds — one lock for one directory. On a backend without transact it degrades to idempotent best-effort deletes."
82
- },
83
- {
84
- "id": "skill-tree",
85
- "path": "<skillsRoot>/**",
86
- "writer": "evolution-core/src/skill-store.ts",
87
- "serializedBy": "write-lock",
88
- "marker": "LOCK_SUFFIX",
89
- "state": [],
90
- "note": "The skill tree itself. Per-target `<path>.lock` claims (pid:token body) guard every byte writer; destructive movers refuse a live lock."
91
- },
92
- {
93
- "id": "activity-log",
94
- "path": "<evolutionRoot>/activity.json",
95
- "writer": "evolution-activity/src/index.ts",
96
- "serializedBy": "transact",
97
- "marker": "transactIo(io, activityFile(root)",
98
- "state": [],
99
- "note": "The plan-applied activity sidecar. Declared by v46 S1.12: the file carried a transactional write that no inventory row vouched for, and the N20 reverse scan is what named it."
100
- },
101
- {
102
- "id": "skill-history-index",
103
- "path": "<historyRoot>/skills/<name>/index.json",
104
- "writer": "evolution-core/src/skill-history.ts",
105
- "serializedBy": "transact",
106
- "marker": "transactIo(io, file,",
107
- "state": [],
108
- "note": "One skill's recorded-version index (content chain + blob references). Declared by v46 S1.12: the replace path was already transactional but undeclared, so a regression to a plain write would have been invisible."
109
- },
110
- {
111
- "id": "skill-store-transact-primitive",
112
- "path": "<caller-supplied>",
113
- "writer": "evolution-core/src/skill-store.ts",
114
- "serializedBy": "transact",
115
- "marker": "transactIo(ioLike, path, task)",
116
- "state": [],
117
- "note": "The store's transaction helper: it prefers the backend's own transact and falls back to the seam's transactIo. The target is the caller's path — each durable target has its own row above; this row vouches for the primitive itself."
118
- },
119
- {
120
- "id": "feedback-events",
121
- "path": "<dshHome>/evolution/events.json",
122
- "writer": "evolution-feedback/src/index.ts",
123
- "serializedBy": "transact",
124
- "marker": "transactIo(io, eventsPath,",
125
- "state": [],
126
- "note": "Feedback appends to the family event log under the cross-process lock. Declared by v46 S1.12 (N20 reverse)."
127
- },
128
- {
129
- "id": "pending-archive",
130
- "path": "<stateHome>/pending-state-archive.json",
131
- "writer": "evolution-state-json/src/index.ts",
132
- "serializedBy": "transact",
133
- "marker": "transactIo(io(), pathOf(PENDING_ARCHIVE_FILE)",
134
- "state": [],
135
- "note": "The resolved-pending archive (the legacy merge target). The store already declared its record map; v46 S1.12 declared the archive append as well — the second site in one file is exactly what the reverse scan exists to find."
136
- }
137
- ]
39
+ "sites": [
40
+ {
41
+ "id": "usage",
42
+ "path": "<skillsRoot>/.usage.json",
43
+ "writer": "evolution-core/src/usage.ts",
44
+ "serializedBy": "transact",
45
+ "marker": "transactIo(io, usageFile(root)",
46
+ "state": [],
47
+ "note": "Skill usage counters. RMW under the IO backend's cross-process lock; the reader side rebuilds from the events log."
48
+ },
49
+ {
50
+ "id": "suppressed",
51
+ "path": "<skillsRoot>/.curator-suppressed.json",
52
+ "writer": "evolution-core/src/usage.ts",
53
+ "serializedBy": "transact",
54
+ "marker": "transactIo(io, suppressedFile(root)",
55
+ "state": [],
56
+ "note": "Curator suppression list (archived bundled skills that must not re-seed)."
57
+ },
58
+ {
59
+ "id": "mutations",
60
+ "path": "<skillsRoot>/.mutations.json",
61
+ "writer": "evolution-core/src/mutations.ts",
62
+ "serializedBy": "transact",
63
+ "marker": "transactIo(io, mutationsFile(root)",
64
+ "state": [],
65
+ "note": "Skill mutation audit records (bounded ring)."
66
+ },
67
+ {
68
+ "id": "events",
69
+ "path": "<evolutionHome>/events.json",
70
+ "writer": "evolution-core/src/evolution-events.ts",
71
+ "serializedBy": "transact",
72
+ "marker": "transactIo(io, path",
73
+ "state": [],
74
+ "note": "The rc.68 evolution event log; feedback/skill-usage stats fold it. Shares ONE file with the \"feedback-events\" site (two writers, one log under the IO lock)."
75
+ },
76
+ {
77
+ "id": "memory",
78
+ "path": "<memoryRoot>/<target>.md",
79
+ "writer": "evolution-core/src/memory-store.ts",
80
+ "serializedBy": "transact",
81
+ "marker": "transactIo(this.io, fileFor(this.root, target)",
82
+ "state": [],
83
+ "note": "Durable memory documents written by the memory tool."
84
+ },
85
+ {
86
+ "id": "state",
87
+ "path": "<evolutionHome>/<review|curator|pending>-state.json",
88
+ "writer": "evolution-state-json/src/index.ts",
89
+ "serializedBy": "transact",
90
+ "marker": "transactIo(io(), join(root, file)",
91
+ "state": [],
92
+ "note": "The durable state stack (review/curator/pending). S4.4/O-6 moved its three warn/rewrite sets into the provider instance (QuarantineMemory), so no module-scope N12 store remains here."
93
+ },
94
+ {
95
+ "id": "curator-reports",
96
+ "path": "<evolutionHome>/reports/curator-*.json",
97
+ "writer": "evolution-curator/src/index.ts",
98
+ "serializedBy": "transact",
99
+ "marker": "transactIo(this.io, reportsSweepLockTarget()",
100
+ "state": [],
101
+ "note": "Curator run reports + their retention sweep. The sweep is a multi-step list + delete-beyond-the-window over a DIRECTORY, so it has no per-file lock: v43 FLOW2-1 put it inside the IO backend's cross-process write lock (transactIo) on a per-home lock target, <evolutionHome>/reports/.retention (lock file <target>.lock, pid:token body). The former declaration here was instance-claim, which is in-process ONLY (instance-scope.ts is a module-scope Map). Two curator ROWS in one process still cannot sweep at once (the loser yields on that claim), and report writes are name-unique per runId. Trigger for the remaining gap: a second PROCESS sharing DSH_HOME now WAITS on the lock instead of sweeping concurrently, and on a backend without transact there is no lock at all, so the sweep degrades to best-effort idempotent deletes."
102
+ },
103
+ {
104
+ "id": "runs-index",
105
+ "path": "<evolutionHome>/runs.json",
106
+ "writer": "evolution-core/src/run-registry.ts",
107
+ "serializedBy": "transact",
108
+ "marker": "transactIo(options.io, path",
109
+ "state": [],
110
+ "note": "The run registry's index (0.19.0/S2): what is in flight, how each run ended, where its report lives. Read-modify-write under the IO backend's cross-process lock, and it MERGES instead of overwriting — the desktop and the web plane share one DSH_HOME, so two hosts each know their own runs and this file is their shared view. resultRef only POINTS at the report; results never live here."
111
+ },
112
+ {
113
+ "id": "maintain-reports",
114
+ "path": "<evolutionHome>/reports/maintain-*.json",
115
+ "writer": "evolution-commands/src/index.ts",
116
+ "serializedBy": "transact",
117
+ "marker": "transactIo(io, reportsSweepLockTarget()",
118
+ "state": [],
119
+ "note": "One report per maintenance run (0.19.0/S2), written once at settle by that run's owner under a name unique to the run, so the write itself needs no per-file lock. The retention sweep is multi-step (list the directory, then delete beyond the window) and takes the SAME per-home <evolutionHome>/reports/.retention lock the curator's sweep holds — one lock for one directory. On a backend without transact it degrades to idempotent best-effort deletes."
120
+ },
121
+ {
122
+ "id": "skill-tree",
123
+ "path": "<skillsRoot>/**",
124
+ "writer": "evolution-core/src/skill-store.ts",
125
+ "serializedBy": "transact",
126
+ "marker": "this.transact(this.io, path",
127
+ "state": [],
128
+ "note": "The skill tree itself. G2 S4: the family write-lock protocol is retired; every byte writer goes through the provider's versioned read-modify-write (`transact`), so this entry is serialized by the same seam as the rest. Destructive movers refuse only when a support directory cannot be listed (fail-closed)."
129
+ },
130
+ {
131
+ "id": "activity-log",
132
+ "path": "<evolutionHome>/activity.json",
133
+ "writer": "evolution-activity/src/index.ts",
134
+ "serializedBy": "transact",
135
+ "marker": "transactIo(io, activityFile(root)",
136
+ "state": [],
137
+ "note": "The plan-applied activity sidecar. Declared by v46 S1.12: the file carried a transactional write that no inventory row vouched for, and the N20 reverse scan is what named it."
138
+ },
139
+ {
140
+ "id": "skill-history-index",
141
+ "path": "<historyRoot>/skills/<name>/index.json",
142
+ "writer": "evolution-core/src/skill-history.ts",
143
+ "serializedBy": "transact",
144
+ "marker": "transactIo(io, file,",
145
+ "state": [],
146
+ "note": "One skill's recorded-version index (content chain + blob references). Declared by v46 S1.12: the replace path was already transactional but undeclared, so a regression to a plain write would have been invisible."
147
+ },
148
+ {
149
+ "id": "skill-store-transact-primitive",
150
+ "path": "<callerSupplied>",
151
+ "writer": "evolution-core/src/skill-store.ts",
152
+ "serializedBy": "transact",
153
+ "marker": "transactIo(ioLike, path, task)",
154
+ "state": [],
155
+ "note": "The store's transaction helper: it prefers the backend's own transact and falls back to the seam's transactIo. The target is the caller's path — each durable target has its own row above; this row vouches for the primitive itself."
156
+ },
157
+ {
158
+ "id": "feedback-events",
159
+ "path": "<evolutionHome>/events.json",
160
+ "writer": "evolution-feedback/src/index.ts",
161
+ "serializedBy": "transact",
162
+ "marker": "transactIo(io, eventsPath,",
163
+ "state": [],
164
+ "note": "Feedback appends to the family event log under the cross-process lock. Declared by v46 S1.12 (N20 reverse). Shares ONE file with the \"events\" site (two writers, one log under the IO lock)."
165
+ },
166
+ {
167
+ "id": "pending-archive",
168
+ "path": "<evolutionHome>/pending-state-archive.json",
169
+ "writer": "evolution-state-json/src/index.ts",
170
+ "serializedBy": "transact",
171
+ "marker": "transactIo(io(), pathOf(PENDING_ARCHIVE_FILE)",
172
+ "state": [],
173
+ "note": "The resolved-pending archive (the legacy merge target). The store already declared its record map; v46 S1.12 declared the archive append as well — the second site in one file is exactly what the reverse scan exists to find."
174
+ }
175
+ ]
176
+ }