@lmzhen/dsh-evolution-review 0.3.62 → 0.3.63

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 +12 -4
  2. package/package.json +10 -10
package/lib/index.js CHANGED
@@ -48,7 +48,6 @@ const REVIEW_OUTPUT_SCHEMA = {
48
48
  summary: { type: "string" }
49
49
  }
50
50
  };
51
- let statelessReviewStateWarned = false;
52
51
  function clampReviewConfig(rawConfig, ctx) {
53
52
  const clamped = [];
54
53
  const field = (name, value, fallback, min) => {
@@ -72,6 +71,7 @@ function apply(ctx, rawConfig) {
72
71
  if (!verifyPromptBundle(PROMPT_BUNDLE)) throw new Error("dsh-evolution prompt bundle integrity check failed; refusing to schedule review work");
73
72
  const config = clampReviewConfig(rawConfig, ctx);
74
73
  const turnStarts = /* @__PURE__ */ new Map();
74
+ let statelessReviewStateWarned = false;
75
75
  const cumulativeToolCalls = /* @__PURE__ */ new Map();
76
76
  const completionInjected = /* @__PURE__ */ new Set();
77
77
  const pendingCadenceReviews = /* @__PURE__ */ new Map();
@@ -348,7 +348,11 @@ function apply(ctx, rawConfig) {
348
348
  let ok = true;
349
349
  try {
350
350
  for (const op of plan.memoryOps ?? []) {
351
- if (!Array.isArray(op.evidence) || op.evidence.length === 0) continue;
351
+ if (!Array.isArray(op.evidence) || op.evidence.length === 0) {
352
+ ok = false;
353
+ failedOps.push(`memory ${op.action ?? "add"} ${op.target}: missing evidence (defense-in-depth rejection)`);
354
+ continue;
355
+ }
352
356
  const normalized = {
353
357
  target: op.target === "user" ? "user" : "memory",
354
358
  action: op.action ?? "add",
@@ -363,7 +367,11 @@ function apply(ctx, rawConfig) {
363
367
  }
364
368
  }
365
369
  for (const op of plan.skillOps ?? []) {
366
- if (!Array.isArray(op.evidence) || op.evidence.length === 0 || !op.name) continue;
370
+ if (!Array.isArray(op.evidence) || op.evidence.length === 0 || !op.name) {
371
+ ok = false;
372
+ failedOps.push(`skill ${op.action ?? "patch"} ${op.name ?? "<unnamed>"}: missing evidence or name (defense-in-depth rejection)`);
373
+ continue;
374
+ }
367
375
  const args = {
368
376
  ...op,
369
377
  evidence: op.evidence
@@ -471,7 +479,7 @@ function apply(ctx, rawConfig) {
471
479
  if (archived.ok) await ctx.get("skillUsage")?.markArchived?.(name);
472
480
  return archived;
473
481
  }
474
- if (op.action === "write_file") return await library.writeSupportFile(name, op.file_path ?? "", op.file_content ?? op.content ?? "", origin);
482
+ if (op.action === "write_file") return await library.writeSupportFile(name, op.file_path ?? "", op.file_content ?? "", origin);
475
483
  if (op.action === "remove_file") return await library.removeSupportFile(name, op.file_path ?? "", origin);
476
484
  if (op.action === "restructure") {
477
485
  const moves = (op.restructure ?? []).filter((move) => move !== null).map((move) => ({
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.62",
4
+ "version": "0.3.63",
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.62",
35
- "@lmzhen/dsh-evolution-core": "^0.3.62",
36
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.62"
34
+ "@lmzhen/dsh-evolution-approval": "^0.3.63",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.63",
36
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.63"
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.62",
46
- "@lmzhen/dsh-evolution-policy": "^0.3.62"
45
+ "@lmzhen/dsh-evolution-state": "^0.3.63",
46
+ "@lmzhen/dsh-evolution-policy": "^0.3.63"
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.62",
58
- "@lmzhen/dsh-evolution-core": "^0.3.62",
59
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.62",
60
- "@lmzhen/dsh-evolution-state": "^0.3.62"
57
+ "@lmzhen/dsh-evolution-approval": "^0.3.63",
58
+ "@lmzhen/dsh-evolution-core": "^0.3.63",
59
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.63",
60
+ "@lmzhen/dsh-evolution-state": "^0.3.63"
61
61
  }
62
62
  }