@lmzhen/dsh-evolution-review 0.3.80 → 0.3.81
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 +20 -0
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -51,6 +51,16 @@ const REVIEW_OUTPUT_SCHEMA = {
|
|
|
51
51
|
summary: { type: "string" }
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Is this pending row our own notice of the SAME kind? `summary` is the kind
|
|
56
|
+
* discriminator, so distinct notices (cadence review vs completion review vs
|
|
57
|
+
* self-improvement) still queue side by side: a repeat of one kind replaces its
|
|
58
|
+
* pending copy instead of adding a second.
|
|
59
|
+
*/
|
|
60
|
+
function isSameKindPending(message, summary) {
|
|
61
|
+
const source = message.source;
|
|
62
|
+
return source?.kind === "plugin" && source.plugin === "dsh-evolution-review" && source.form === "notice" && source.summary === summary;
|
|
63
|
+
}
|
|
54
64
|
function clampReviewConfig(rawConfig, ctx) {
|
|
55
65
|
const clamped = [];
|
|
56
66
|
const field = (name, value, fallback, min, max) => {
|
|
@@ -342,6 +352,16 @@ function apply(ctx, rawConfig = {}) {
|
|
|
342
352
|
summary
|
|
343
353
|
}
|
|
344
354
|
});
|
|
355
|
+
const inbox = agent.inbox;
|
|
356
|
+
if (inbox !== void 0 && typeof inbox.replace === "function") try {
|
|
357
|
+
const superseded = [...inbox.nextTurn ?? [], ...inbox.nextStep ?? []].find((row) => isSameKindPending(row, summary));
|
|
358
|
+
if (superseded !== void 0 && inbox.replace(superseded.id, message)) {
|
|
359
|
+
if (reviewPrompt) markReviewChannel(agent.session.id);
|
|
360
|
+
return true;
|
|
361
|
+
}
|
|
362
|
+
} catch (error) {
|
|
363
|
+
ctx.logger.warn(`dsh-evolution-review: inbox coalescing failed (${error instanceof Error ? error.message : String(error)}) — delivering a fresh message instead`);
|
|
364
|
+
}
|
|
345
365
|
const wake = agent;
|
|
346
366
|
try {
|
|
347
367
|
if (config.reviewWakeInject && typeof wake.followup === "function") {
|
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.81",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
30
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
31
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
32
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
30
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.81",
|
|
31
|
+
"@lmzhen/dsh-evolution-core": "^0.3.81",
|
|
32
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.81"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
|
38
38
|
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
39
39
|
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
|
40
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
41
|
-
"@lmzhen/dsh-evolution-policy": "^0.3.
|
|
40
|
+
"@lmzhen/dsh-evolution-state": "^0.3.81",
|
|
41
|
+
"@lmzhen/dsh-evolution-policy": "^0.3.81"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"@deepseek-ai/dsh-session-persistence": "^0.1.5-rc.2",
|
|
49
49
|
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-rc.2",
|
|
50
50
|
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
|
51
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
52
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
53
|
-
"@lmzhen/dsh-evolution-curator": "^0.3.
|
|
54
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
55
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
51
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.81",
|
|
52
|
+
"@lmzhen/dsh-evolution-core": "^0.3.81",
|
|
53
|
+
"@lmzhen/dsh-evolution-curator": "^0.3.81",
|
|
54
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.81",
|
|
55
|
+
"@lmzhen/dsh-evolution-state": "^0.3.81"
|
|
56
56
|
}
|
|
57
57
|
}
|