@lmzhen/dsh-evolution-review 0.3.46 → 0.3.48

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.
Files changed (2) hide show
  1. package/lib/index.js +23 -15
  2. package/package.json +10 -10
package/lib/index.js CHANGED
@@ -151,7 +151,7 @@ function apply(ctx, rawConfig) {
151
151
  const cumulative = (cumulativeToolCalls.get(session.id) ?? 0) + signal.toolCalls;
152
152
  cumulativeToolCalls.set(session.id, cumulative);
153
153
  if (event.data.reason.kind === "completed") {
154
- const pendingKind = pendingCadenceReviews.get(session.id) ?? kind ?? void 0;
154
+ const pendingKind = kind ?? pendingCadenceReviews.get(session.id) ?? void 0;
155
155
  if (pendingKind !== void 0) {
156
156
  pendingCadenceReviews.delete(session.id);
157
157
  if ((policy()?.reviewMode ?? config.reviewMode) === "inject") try {
@@ -159,13 +159,17 @@ function apply(ctx, rawConfig) {
159
159
  } catch (injectError) {
160
160
  ctx.logger.warn(`dsh-evolution-review: deferred review inject failed: ${injectError instanceof Error ? injectError.message : String(injectError)}`);
161
161
  }
162
- else if (await trySubagentReview(session, agent, pendingKind, signal)) ctx.emit("evolution/review-scheduled", {
163
- sessionId: session.id,
164
- kind: pendingKind,
165
- toolCalls: signal.toolCalls,
166
- userChars: signal.userChars,
167
- assistantChars: signal.assistantChars
168
- });
162
+ else if (await trySubagentReview(session, agent, pendingKind, signal)) try {
163
+ ctx.emit("evolution/review-scheduled", {
164
+ sessionId: session.id,
165
+ kind: pendingKind,
166
+ toolCalls: signal.toolCalls,
167
+ userChars: signal.userChars,
168
+ assistantChars: signal.assistantChars
169
+ });
170
+ } catch (emitError) {
171
+ ctx.logger.warn(`dsh-evolution-review: review-scheduled emit failed: ${emitError instanceof Error ? emitError.message : String(emitError)}`);
172
+ }
169
173
  else try {
170
174
  deliverMessage(agent, reviewPrompt(pendingKind), "auto-review");
171
175
  } catch (injectError) {
@@ -214,13 +218,17 @@ function apply(ctx, rawConfig) {
214
218
  ctx.logger.warn(`dsh-evolution-review: completion review inject failed: ${injectError instanceof Error ? injectError.message : String(injectError)}`);
215
219
  return;
216
220
  }
217
- ctx.emit("evolution/review-scheduled", {
218
- sessionId: session.id,
219
- kind: "skill",
220
- toolCalls: signal.toolCalls,
221
- userChars: signal.userChars,
222
- assistantChars: signal.assistantChars
223
- });
221
+ try {
222
+ ctx.emit("evolution/review-scheduled", {
223
+ sessionId: session.id,
224
+ kind: "skill",
225
+ toolCalls: signal.toolCalls,
226
+ userChars: signal.userChars,
227
+ assistantChars: signal.assistantChars
228
+ });
229
+ } catch (emitError) {
230
+ ctx.logger.warn(`dsh-evolution-review: review-scheduled emit failed: ${emitError instanceof Error ? emitError.message : String(emitError)}`);
231
+ }
224
232
  }
225
233
  /** V7-03 (0.3.42): shared waking delivery — review prompts AND result
226
234
  * notices go through the same followup-first channel (skip the woken turn's
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.46",
4
+ "version": "0.3.48",
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.46",
35
- "@lmzhen/dsh-evolution-core": "^0.3.46",
36
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.46"
34
+ "@lmzhen/dsh-evolution-approval": "^0.3.48",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.48",
36
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.48"
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",
46
- "@lmzhen/dsh-evolution-policy": "^0.3.46"
45
+ "@lmzhen/dsh-evolution-state": "^0.3.48",
46
+ "@lmzhen/dsh-evolution-policy": "^0.3.48"
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.46",
58
- "@lmzhen/dsh-evolution-core": "^0.3.46",
59
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.46",
60
- "@lmzhen/dsh-evolution-state": "^0.3.46"
57
+ "@lmzhen/dsh-evolution-approval": "^0.3.48",
58
+ "@lmzhen/dsh-evolution-core": "^0.3.48",
59
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.48",
60
+ "@lmzhen/dsh-evolution-state": "^0.3.48"
61
61
  }
62
62
  }