@lmzhen/dsh-evolution-plan-validator 0.3.63 → 0.3.64

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 +4 -2
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_USER_CHAR_LIMIT, FORBIDDEN_CONTROL_KEYS, MAX_RESTRUCTURE_MOVES, RESTRUCTURE_TARGET_RE } from "@lmzhen/dsh-evolution-core";
1
+ import { DEFAULT_MAX_OPS_PER_PLAN, DEFAULT_MEMORY_CHAR_LIMIT, DEFAULT_SKILL_CONTENT_CHARS, DEFAULT_USER_CHAR_LIMIT, FORBIDDEN_CONTROL_KEYS, MAX_RESTRUCTURE_MOVES, validateRestructureTarget } from "@lmzhen/dsh-evolution-core";
2
2
  //#region lib/types/index.js
3
3
  /**
4
4
  * Deterministic validator for model-produced evolution plans.
@@ -207,7 +207,9 @@ function validateSkillOp(op, context, index) {
207
207
  if (op.restructure.length > MAX_RESTRUCTURE_MOVES) return `skill op ${index}: restructure exceeds ${MAX_RESTRUCTURE_MOVES} moves`;
208
208
  for (const [moveIndex, move] of op.restructure.entries()) {
209
209
  if (!move || typeof move.heading !== "string" || !move.heading.trim()) return `skill op ${index}: restructure[${moveIndex}] requires a non-empty heading`;
210
- if (typeof move.to_file !== "string" || !RESTRUCTURE_TARGET_RE.test(move.to_file)) return `skill op ${index}: restructure[${moveIndex}] to_file must be references/<topic>.md`;
210
+ if (typeof move.to_file !== "string") return `skill op ${index}: restructure[${moveIndex}] to_file must be references/<topic>.md`;
211
+ const targetIssue = validateRestructureTarget(move.to_file);
212
+ if (targetIssue) return `skill op ${index}: restructure[${moveIndex}] ${targetIssue}`;
211
213
  }
212
214
  }
213
215
  return null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-plan-validator",
3
3
  "description": "Deterministic validator for model-produced evolution plans (community build)",
4
- "version": "0.3.63",
4
+ "version": "0.3.64",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@lmzhen/dsh-evolution-core": "^0.3.63"
33
+ "@lmzhen/dsh-evolution-core": "^0.3.64"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",