@lmzhen/dsh-evolution-review 0.3.35 → 0.3.36
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 +28 -1
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -80,7 +80,11 @@ function apply(ctx, rawConfig) {
|
|
|
80
80
|
await runOnTurnEnd(session, event);
|
|
81
81
|
} catch (error) {
|
|
82
82
|
ctx.logger.warn(`dsh-evolution-review: turn-end review pipeline failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
83
|
-
|
|
83
|
+
try {
|
|
84
|
+
ctx.emit("evolution/review-error", { sessionId: session.id });
|
|
85
|
+
} catch (emitError) {
|
|
86
|
+
ctx.logger.warn(`dsh-evolution-review: review-error emit failed: ${emitError instanceof Error ? emitError.message : String(emitError)}`);
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
async function runOnTurnEnd(session, event) {
|
|
@@ -250,6 +254,29 @@ function apply(ctx, rawConfig) {
|
|
|
250
254
|
} catch (injectError) {
|
|
251
255
|
ctx.logger.warn(`dsh-evolution-review: result notice inject failed: ${injectError instanceof Error ? injectError.message : String(injectError)}`);
|
|
252
256
|
}
|
|
257
|
+
} else try {
|
|
258
|
+
const reasons = [];
|
|
259
|
+
if (validation.rejected.length > 0) reasons.push(`${validation.rejected.length} op(s) rejected by validation`);
|
|
260
|
+
if (skippedUnread > 0) reasons.push(`${skippedUnread} op(s) skipped (skill not read this session)`);
|
|
261
|
+
if (executed.failedOps.length > 0) reasons.push(`${executed.failedOps.length} op(s) failed at execution: ${executed.failedOps.join("; ")}`);
|
|
262
|
+
if (executed.aborted !== void 0) reasons.push(`execution aborted: ${executed.aborted}`);
|
|
263
|
+
if (reasons.length === 0) reasons.push("the review plan contained nothing executable");
|
|
264
|
+
let text = `💾 Self-improvement review: 0 ops landed. ${reasons.join(" ")}`;
|
|
265
|
+
if (text.length > 500) text = `${text.slice(0, 497)}…`;
|
|
266
|
+
agent.inject(createUserMessage({
|
|
267
|
+
content: [{
|
|
268
|
+
type: "text",
|
|
269
|
+
text
|
|
270
|
+
}],
|
|
271
|
+
source: {
|
|
272
|
+
kind: "plugin",
|
|
273
|
+
plugin: "dsh-evolution-review",
|
|
274
|
+
form: "notice",
|
|
275
|
+
summary: "self-improvement review"
|
|
276
|
+
}
|
|
277
|
+
}));
|
|
278
|
+
} catch (injectError) {
|
|
279
|
+
ctx.logger.warn(`dsh-evolution-review: zero-landing notice inject failed: ${injectError instanceof Error ? injectError.message : String(injectError)}`);
|
|
253
280
|
}
|
|
254
281
|
try {
|
|
255
282
|
ctx.emit("evolution/plan-applied", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-review",
|
|
3
3
|
"description": "Background review orchestration (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.36",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
35
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
36
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.36",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.36",
|
|
36
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.36"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
43
43
|
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-policy": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-state": "^0.3.36",
|
|
46
|
+
"@lmzhen/dsh-evolution-policy": "^0.3.36"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@deepseek-ai/dsh-session-persistence": "^0.1.1-rc.2",
|
|
55
55
|
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.1-rc.2",
|
|
56
56
|
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
57
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
58
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
59
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
60
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
57
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.36",
|
|
58
|
+
"@lmzhen/dsh-evolution-core": "^0.3.36",
|
|
59
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.36",
|
|
60
|
+
"@lmzhen/dsh-evolution-state": "^0.3.36"
|
|
61
61
|
}
|
|
62
62
|
}
|