@lmzhen/dsh-evolution-review 0.3.38 → 0.3.39
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 -26
- package/package.json +10 -10
package/lib/index.js
CHANGED
|
@@ -123,7 +123,30 @@ function apply(ctx, rawConfig) {
|
|
|
123
123
|
const pendingKind = pendingCadenceReviews.get(session.id);
|
|
124
124
|
if (pendingKind !== void 0) {
|
|
125
125
|
pendingCadenceReviews.delete(session.id);
|
|
126
|
-
try {
|
|
126
|
+
if ((policy()?.reviewMode ?? config.reviewMode) === "inject") try {
|
|
127
|
+
agent.inject(createUserMessage({
|
|
128
|
+
content: [{
|
|
129
|
+
type: "text",
|
|
130
|
+
text: reviewPrompt(pendingKind)
|
|
131
|
+
}],
|
|
132
|
+
source: {
|
|
133
|
+
kind: "plugin",
|
|
134
|
+
plugin: "dsh-evolution-review",
|
|
135
|
+
form: "notice",
|
|
136
|
+
summary: "auto-review"
|
|
137
|
+
}
|
|
138
|
+
}));
|
|
139
|
+
} catch (injectError) {
|
|
140
|
+
ctx.logger.warn(`dsh-evolution-review: deferred review inject failed: ${injectError instanceof Error ? injectError.message : String(injectError)}`);
|
|
141
|
+
}
|
|
142
|
+
else if (await trySubagentReview(session, agent, pendingKind, signal)) ctx.emit("evolution/review-scheduled", {
|
|
143
|
+
sessionId: session.id,
|
|
144
|
+
kind: pendingKind,
|
|
145
|
+
toolCalls: signal.toolCalls,
|
|
146
|
+
userChars: signal.userChars,
|
|
147
|
+
assistantChars: signal.assistantChars
|
|
148
|
+
});
|
|
149
|
+
else try {
|
|
127
150
|
agent.inject(createUserMessage({
|
|
128
151
|
content: [{
|
|
129
152
|
type: "text",
|
|
@@ -142,31 +165,10 @@ function apply(ctx, rawConfig) {
|
|
|
142
165
|
}
|
|
143
166
|
}
|
|
144
167
|
if (kind) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
userChars: signal.userChars,
|
|
150
|
-
assistantChars: signal.assistantChars
|
|
151
|
-
});
|
|
152
|
-
else if ((policy()?.reviewMode ?? config.reviewMode) === "inject") agent.inject(createUserMessage({
|
|
153
|
-
content: [{
|
|
154
|
-
type: "text",
|
|
155
|
-
text: reviewPrompt(kind)
|
|
156
|
-
}],
|
|
157
|
-
source: {
|
|
158
|
-
kind: "plugin",
|
|
159
|
-
plugin: "dsh-evolution-review",
|
|
160
|
-
form: "notice",
|
|
161
|
-
summary: "auto-review"
|
|
162
|
-
}
|
|
163
|
-
}));
|
|
164
|
-
else {
|
|
165
|
-
pendingCadenceReviews.set(session.id, kind);
|
|
166
|
-
if (!pendingCadenceWarned.has(session.id)) {
|
|
167
|
-
pendingCadenceWarned.add(session.id);
|
|
168
|
-
ctx.logger.warn(`dsh-evolution-review: ${kind} review could not run on a subagent this turn; deferred to the end of the conversation (no mid-task injection)`);
|
|
169
|
-
}
|
|
168
|
+
pendingCadenceReviews.set(session.id, kind);
|
|
169
|
+
if (!pendingCadenceWarned.has(session.id)) {
|
|
170
|
+
pendingCadenceWarned.add(session.id);
|
|
171
|
+
ctx.logger.warn(`dsh-evolution-review: ${kind} review threshold reached; the review runs at the end of the conversation (no mid-task execution)`);
|
|
170
172
|
}
|
|
171
173
|
return;
|
|
172
174
|
}
|
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.39",
|
|
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.39",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.39",
|
|
36
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.39"
|
|
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.39",
|
|
46
|
+
"@lmzhen/dsh-evolution-policy": "^0.3.39"
|
|
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.39",
|
|
58
|
+
"@lmzhen/dsh-evolution-core": "^0.3.39",
|
|
59
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.39",
|
|
60
|
+
"@lmzhen/dsh-evolution-state": "^0.3.39"
|
|
61
61
|
}
|
|
62
62
|
}
|