@lmzhen/dsh-evolution-approval 0.3.60 → 0.3.62
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 +11 -5
- package/package.json +8 -8
package/lib/index.js
CHANGED
|
@@ -227,10 +227,16 @@ var EvolutionApproval = class extends Service {
|
|
|
227
227
|
message: "Replay runner failed; the pending write remains pending."
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
if (!(await this.state().tryResolvePending(id, "approved")).applied)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
if (!(await this.state().tryResolvePending(id, "approved", claimId)).applied) {
|
|
231
|
+
if ((await this.state().listPending("rejected")).find((item) => item.id === id)) return {
|
|
232
|
+
ok: false,
|
|
233
|
+
message: `Approved write "${id}" was replayed, but the record was resolved to "rejected" concurrently — the effect has landed while the audit reads rejected. Verify the write and do NOT replay it.`
|
|
234
|
+
};
|
|
235
|
+
return {
|
|
236
|
+
ok: false,
|
|
237
|
+
message: `Pending write "${id}" was already resolved by another writer.`
|
|
238
|
+
};
|
|
239
|
+
}
|
|
234
240
|
return {
|
|
235
241
|
ok: true,
|
|
236
242
|
message: `Approved ${record.kind} write "${id}" (${record.summary}).`
|
|
@@ -247,7 +253,7 @@ function normalizeSummary(input) {
|
|
|
247
253
|
return `memory ${targetLabel === "memory" ? "" : `${targetLabel} `}batch of ${candidate.operations.length} operations`;
|
|
248
254
|
}
|
|
249
255
|
}
|
|
250
|
-
if (input.kind === "skill" &&
|
|
256
|
+
if (input.kind === "skill" && /(?:^|\s)delete\s/.test(trimmed)) return `${trimmed} (warning: archive)`;
|
|
251
257
|
return trimmed;
|
|
252
258
|
}
|
|
253
259
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-approval",
|
|
3
3
|
"description": "Stage/pending approval service for Hermes-style self-evolution writes (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.62",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
39
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
38
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.62",
|
|
39
|
+
"@lmzhen/dsh-evolution-state": "^0.3.62"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
43
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
45
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-io-node": "^0.3.
|
|
47
|
-
"@lmzhen/dsh-evolution-state-json": "^0.3.
|
|
43
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.62",
|
|
44
|
+
"@lmzhen/dsh-evolution-state": "^0.3.62",
|
|
45
|
+
"@lmzhen/dsh-evolution-io": "^0.3.62",
|
|
46
|
+
"@lmzhen/dsh-evolution-io-node": "^0.3.62",
|
|
47
|
+
"@lmzhen/dsh-evolution-state-json": "^0.3.62"
|
|
48
48
|
}
|
|
49
49
|
}
|