@lmzhen/dsh-evolution-review 0.1.0-rc.25 → 0.1.0-rc.27

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 CHANGED
@@ -310,16 +310,26 @@ function collectReadSkillNames(session) {
310
310
  return names;
311
311
  }
312
312
  /**
313
- * Drop patch/update ops whose target was not read this session, in place.
314
- * Create is exempt (no read required to author a new skill). Returns the count
315
- * of dropped ops so the plan event can report them as rejected.
313
+ * Drop mutating ops whose target was not read this session, in place.
314
+ * Create is exempt (no read required to author a new skill). Covers the same
315
+ * mutating surface Hermes guards (edit/patch/write_file/remove_file), so a
316
+ * background review cannot blind-touch support files or edits of skills it
317
+ * never loaded. Returns the count of dropped ops so the plan event can report
318
+ * them as rejected.
316
319
  */
317
320
  function filterUnreadSkillOps(ops, readNames) {
321
+ const READ_REQUIRED = [
322
+ "edit",
323
+ "update",
324
+ "patch",
325
+ "write_file",
326
+ "remove_file"
327
+ ];
318
328
  let dropped = 0;
319
329
  for (let index = ops.length - 1; index >= 0; index -= 1) {
320
330
  const op = ops[index];
321
331
  if (!op) continue;
322
- if ((op.action === "patch" || op.action === "update") && op.name && !readNames.has(op.name)) {
332
+ if (op.action !== void 0 && READ_REQUIRED.includes(op.action) && op.name && !readNames.has(op.name)) {
323
333
  ops.splice(index, 1);
324
334
  dropped += 1;
325
335
  }
@@ -35,9 +35,12 @@ export declare function shouldCompletionReview(reason: {
35
35
  /** Skill names this session loaded (read-before-write source for the background review). */
36
36
  export declare function collectReadSkillNames(session: Session): Set<string>;
37
37
  /**
38
- * Drop patch/update ops whose target was not read this session, in place.
39
- * Create is exempt (no read required to author a new skill). Returns the count
40
- * of dropped ops so the plan event can report them as rejected.
38
+ * Drop mutating ops whose target was not read this session, in place.
39
+ * Create is exempt (no read required to author a new skill). Covers the same
40
+ * mutating surface Hermes guards (edit/patch/write_file/remove_file), so a
41
+ * background review cannot blind-touch support files or edits of skills it
42
+ * never loaded. Returns the count of dropped ops so the plan event can report
43
+ * them as rejected.
41
44
  */
42
45
  export declare function filterUnreadSkillOps(ops: Array<{
43
46
  action?: string;
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.1.0-rc.25",
4
+ "version": "0.1.0-rc.27",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,8 +33,8 @@
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
35
  "@deepseek-ai/schemastery": "^3.18.1",
36
- "@lmzhen/dsh-evolution-core": "^0.1.0-rc.25",
37
- "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.25"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.27",
37
+ "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.27"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/cordis": "^4.0.1",
@@ -43,7 +43,7 @@
43
43
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
44
44
  "@deepseek-ai/dsh-session": "^0.1.0-rc.6",
45
45
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
46
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.25"
46
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.27"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
@@ -52,8 +52,8 @@
52
52
  "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
53
53
  "@deepseek-ai/dsh-session": "^0.1.0-rc.6",
54
54
  "@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
55
- "@lmzhen/dsh-evolution-core": "^0.1.0-rc.25",
56
- "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.25",
57
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.25"
55
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.27",
56
+ "@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.27",
57
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.27"
58
58
  }
59
59
  }