@lmzhen/dsh-evolution-activity 0.39.2 → 0.40.1
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 +9 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -189,9 +189,17 @@ function apply(ctx, rawConfig = {}) {
|
|
|
189
189
|
const ioRegistry = ioCtx.evolutionIo;
|
|
190
190
|
const io = evolutionIoAdapter(() => ioRegistry.provider());
|
|
191
191
|
const root = evolutionHome();
|
|
192
|
+
const authority = ioCtx.get("evolutionMutationAuthority");
|
|
193
|
+
const commit = (path, task) => transactIo(io, path, task);
|
|
194
|
+
const write = async (path, task) => {
|
|
195
|
+
if (authority?.homeFence !== void 0) await authority.homeFence.run(async () => {
|
|
196
|
+
await commit(path, task);
|
|
197
|
+
});
|
|
198
|
+
else await commit(path, task);
|
|
199
|
+
};
|
|
192
200
|
let chain = Promise.resolve();
|
|
193
201
|
ioCtx.on("evolution/plan-applied", (event) => {
|
|
194
|
-
const run = chain.then(() =>
|
|
202
|
+
const run = chain.then(() => write(activityFile(root), async (current) => {
|
|
195
203
|
const file = activityFile(root);
|
|
196
204
|
if (isCorruptActivity(current)) {
|
|
197
205
|
if (!await io.writeText(`${file}.corrupt`, current).then(() => true, () => false)) {
|
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.40.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.40.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.5"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
37
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
38
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
39
|
-
"@lmzhen/dsh-evolution-io-node": "^0.
|
|
37
|
+
"@lmzhen/dsh-evolution-core": "^0.40.1",
|
|
38
|
+
"@lmzhen/dsh-evolution-io": "^0.40.1",
|
|
39
|
+
"@lmzhen/dsh-evolution-io-node": "^0.40.1"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"dsh": ">=0.2.2-rc.0 <0.2.3-0"
|