@lmzhen/dsh-evolution-activity 0.47.0 → 0.49.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/lib/index.js +4 -19
- package/lib/types/index.d.ts +0 -13
- package/lib/types/index.js +3 -18
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -139,23 +139,6 @@ async function loadActivityState(root, io) {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
/**
|
|
142
|
-
* H-06: the read barrier over the sidecar — records only, no corruption
|
|
143
|
-
* verdict. @internal Test-only: no production caller (verified by grep
|
|
144
|
-
* 2026-09-16); replay consumes {@link loadActivityState} — the V24-13 claim
|
|
145
|
-
* that `loadActivity` "HAS a production consumer — evolution-replay" was
|
|
146
|
-
* inaccurate (PLAN S5.2). Kept exported so the published surface does not
|
|
147
|
-
* break. The single-writer rule is unchanged: `apply()`'s transact listener
|
|
148
|
-
* remains the only WRITE path. Consumers that must not read an unreadable
|
|
149
|
-
* sidecar as "no history" use {@link loadActivityState}.
|
|
150
|
-
*/
|
|
151
|
-
async function loadActivity(root, io) {
|
|
152
|
-
return (await loadActivityState(root, io)).records;
|
|
153
|
-
}
|
|
154
|
-
/** Read durable review history without a plan-record read. */
|
|
155
|
-
async function loadReviewActivity(root, io) {
|
|
156
|
-
return parseActivityReviews(await io.readText(activityFile(root)));
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
142
|
* The WRITE side's quarantine predicate: should these bytes be preserved under `.corrupt` before a
|
|
160
143
|
* current-version file replaces them?
|
|
161
144
|
*
|
|
@@ -190,7 +173,9 @@ function apply(ctx, rawConfig = {}) {
|
|
|
190
173
|
const io = evolutionIoAdapter(() => ioRegistry.provider());
|
|
191
174
|
const root = evolutionHome();
|
|
192
175
|
const authority = ioCtx.get("evolutionMutationAuthority");
|
|
193
|
-
const commit = (path, task) =>
|
|
176
|
+
const commit = async (path, task) => {
|
|
177
|
+
await transactIo(io, path, task);
|
|
178
|
+
};
|
|
194
179
|
/** The ONE cross-process writer: a home fence when the authority provides one, else the seam. */
|
|
195
180
|
const write = async (path, task) => {
|
|
196
181
|
if (authority?.homeFence !== void 0) await authority.homeFence.run(async () => {
|
|
@@ -242,4 +227,4 @@ function apply(ctx, rawConfig = {}) {
|
|
|
242
227
|
});
|
|
243
228
|
}
|
|
244
229
|
//#endregion
|
|
245
|
-
export { ACTIVITY_FILE_VERSION, Config, DEFAULT_MAX_ITEMS, REVIEW_TEXT_PREVIEW_CHARS, activityFile, apply, applyActivityEvent, applyReviewActivityEvent, isCorruptActivity,
|
|
230
|
+
export { ACTIVITY_FILE_VERSION, Config, DEFAULT_MAX_ITEMS, REVIEW_TEXT_PREVIEW_CHARS, activityFile, apply, applyActivityEvent, applyReviewActivityEvent, isCorruptActivity, loadActivityState, name, parseActivityContent, parseActivityReviews, serializeActivity };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -118,19 +118,6 @@ export interface ActivityLoad {
|
|
|
118
118
|
* writer wrote the envelope (`foreignVersion`).
|
|
119
119
|
*/
|
|
120
120
|
export declare function loadActivityState(root: string, io: EvolutionIoLike): Promise<ActivityLoad>;
|
|
121
|
-
/**
|
|
122
|
-
* H-06: the read barrier over the sidecar — records only, no corruption
|
|
123
|
-
* verdict. @internal Test-only: no production caller (verified by grep
|
|
124
|
-
* 2026-09-16); replay consumes {@link loadActivityState} — the V24-13 claim
|
|
125
|
-
* that `loadActivity` "HAS a production consumer — evolution-replay" was
|
|
126
|
-
* inaccurate (PLAN S5.2). Kept exported so the published surface does not
|
|
127
|
-
* break. The single-writer rule is unchanged: `apply()`'s transact listener
|
|
128
|
-
* remains the only WRITE path. Consumers that must not read an unreadable
|
|
129
|
-
* sidecar as "no history" use {@link loadActivityState}.
|
|
130
|
-
*/
|
|
131
|
-
export declare function loadActivity(root: string, io: EvolutionIoLike): Promise<EvolutionActivityRecord[]>;
|
|
132
|
-
/** Read durable review history without a plan-record read. */
|
|
133
|
-
export declare function loadReviewActivity(root: string, io: EvolutionIoLike): Promise<EvolutionReviewActivityRecord[]>;
|
|
134
121
|
/**
|
|
135
122
|
* The WRITE side's quarantine predicate: should these bytes be preserved under `.corrupt` before a
|
|
136
123
|
* current-version file replaces them?
|
package/lib/types/index.js
CHANGED
|
@@ -194,23 +194,6 @@ export async function loadActivityState(root, io) {
|
|
|
194
194
|
foreignVersion: verdict === 'foreign',
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
|
-
/**
|
|
198
|
-
* H-06: the read barrier over the sidecar — records only, no corruption
|
|
199
|
-
* verdict. @internal Test-only: no production caller (verified by grep
|
|
200
|
-
* 2026-09-16); replay consumes {@link loadActivityState} — the V24-13 claim
|
|
201
|
-
* that `loadActivity` "HAS a production consumer — evolution-replay" was
|
|
202
|
-
* inaccurate (PLAN S5.2). Kept exported so the published surface does not
|
|
203
|
-
* break. The single-writer rule is unchanged: `apply()`'s transact listener
|
|
204
|
-
* remains the only WRITE path. Consumers that must not read an unreadable
|
|
205
|
-
* sidecar as "no history" use {@link loadActivityState}.
|
|
206
|
-
*/
|
|
207
|
-
export async function loadActivity(root, io) {
|
|
208
|
-
return (await loadActivityState(root, io)).records;
|
|
209
|
-
}
|
|
210
|
-
/** Read durable review history without a plan-record read. */
|
|
211
|
-
export async function loadReviewActivity(root, io) {
|
|
212
|
-
return parseActivityReviews(await io.readText(activityFile(root)));
|
|
213
|
-
}
|
|
214
197
|
/**
|
|
215
198
|
* The WRITE side's quarantine predicate: should these bytes be preserved under `.corrupt` before a
|
|
216
199
|
* current-version file replaces them?
|
|
@@ -270,7 +253,9 @@ export function apply(ctx, rawConfig = {}) {
|
|
|
270
253
|
const io = evolutionIoAdapter(() => ioRegistry.provider());
|
|
271
254
|
const root = evolutionHome();
|
|
272
255
|
const authority = ioCtx.get('evolutionMutationAuthority');
|
|
273
|
-
const commit = (path, task) =>
|
|
256
|
+
const commit = async (path, task) => {
|
|
257
|
+
await transactIo(io, path, task);
|
|
258
|
+
};
|
|
274
259
|
/** The ONE cross-process writer: a home fence when the authority provides one, else the seam. */
|
|
275
260
|
const write = async (path, task) => {
|
|
276
261
|
if (authority?.homeFence !== undefined)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-activity",
|
|
3
3
|
"description": "Durable activity store for self-evolution plan outcomes (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.49.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"license": "MIT",
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
54
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
55
|
-
"@lmzhen/dsh-evolution-skill-discovery": "^0.
|
|
56
|
-
"@lmzhen/dsh-evolution-approval": "^0.
|
|
54
|
+
"@lmzhen/dsh-evolution-core": "^0.49.0",
|
|
55
|
+
"@lmzhen/dsh-evolution-skill-discovery": "^0.49.0",
|
|
56
|
+
"@lmzhen/dsh-evolution-approval": "^0.49.0"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@deepseek-ai/cordis": "^4.0.5"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
63
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
63
|
+
"@lmzhen/dsh-evolution-core": "^0.49.0"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"dsh": ">=0.2.2-rc.0 <0.2.3-0"
|