@lmzhen/dsh-evolution-plan-validator 0.1.0-rc.28 → 0.1.0-rc.29

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
@@ -116,7 +116,9 @@ function validateSkillOp(op, context, index) {
116
116
  if (!SKILL_ACTIONS.has(action)) return `skill op ${index}: unknown action ${action}`;
117
117
  if ((action === "create" || action === "edit" || action === "update") && !(op.content ?? "").trim()) return `skill op ${index}: ${action} requires content`;
118
118
  if (action === "patch" && !(op.old_string ?? "")) return `skill op ${index}: patch requires old_string`;
119
- if ((op.content ?? "").length > (context.maxSkillContentChars ?? 1e5)) return `skill op ${index}: content exceeds skill budget`;
119
+ const writeContent = op.file_content ?? op.content ?? "";
120
+ if (action === "write_file" && !writeContent.trim()) return `skill op ${index}: write_file requires file_content`;
121
+ if (writeContent.length > (context.maxSkillContentChars ?? 1e5)) return `skill op ${index}: content exceeds skill budget`;
120
122
  return null;
121
123
  }
122
124
  //#endregion
@@ -15,6 +15,8 @@ export interface SkillOp {
15
15
  action?: string;
16
16
  name?: string;
17
17
  content?: string;
18
+ /** write_file payload (the tool reads `file_content`, not `content`). */
19
+ file_content?: string;
18
20
  old_string?: string;
19
21
  new_string?: string;
20
22
  file_path?: string;
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.1.0-rc.28",
4
+ "version": "0.1.0-rc.29",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },