@lmzhen/dsh-evolution-review 0.3.44 → 0.3.45

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
@@ -30,6 +30,24 @@ const Config = z.object({
30
30
  reviewWakeInject: z.boolean().default(true),
31
31
  skillReviewCompletionMinToolCalls: z.number().min(1).default(DEFAULT_SKILL_REVIEW_COMPLETION_MIN_TOOL_CALLS)
32
32
  });
33
+ /** V8-01 (0.3.45): the review subagent's structured-output contract. The
34
+ * `subagents.start` outputSchema is RAW JSON Schema validated by
35
+ * assertObjectJsonSchema (upstream dsh-tools json-schema.ts — SCHEMA_TYPES
36
+ * has no 'json'; 'json' is a defineTool-author DSL-only value). The arrays
37
+ * deliberately use `{ type: 'array' }` with NO items node — absent items
38
+ * accepts any JSON item (upstream semantics, json-schema.ts "Item schema
39
+ * (type: 'array' only); absent accepts any JSON item"), and plan-validator
40
+ * owns the per-op structure proof. The whitelist contract test (review.spec
41
+ * V8-01) forbids a DSL value slipping back in. */
42
+ const REVIEW_OUTPUT_SCHEMA = {
43
+ type: "object",
44
+ additionalProperties: false,
45
+ properties: {
46
+ memoryOps: { type: "array" },
47
+ skillOps: { type: "array" },
48
+ summary: { type: "string" }
49
+ }
50
+ };
33
51
  let statelessReviewStateWarned = false;
34
52
  /**
35
53
  * G3.1 (0.3.23): clamp the numeric review config at assembly so a 0/negative/
@@ -251,21 +269,7 @@ function apply(ctx, rawConfig) {
251
269
  agentOptions,
252
270
  persona: reviewPrompt(kind, "plan"),
253
271
  toolFilter: { allow: [...config.reviewToolAllow] },
254
- outputSchema: {
255
- type: "object",
256
- additionalProperties: false,
257
- properties: {
258
- memoryOps: {
259
- type: "array",
260
- items: { type: "json" }
261
- },
262
- skillOps: {
263
- type: "array",
264
- items: { type: "json" }
265
- },
266
- summary: { type: "string" }
267
- }
268
- }
272
+ outputSchema: REVIEW_OUTPUT_SCHEMA
269
273
  });
270
274
  try {
271
275
  const result = await run.result;
@@ -620,4 +624,4 @@ function buildReviewRequest(session, kind, signal, maxMessages, maxMessageChars)
620
624
  ].join("\n");
621
625
  }
622
626
  //#endregion
623
- export { Config, apply, clampReviewConfig, filterUnreadSkillOps, inject, name, shouldCompletionReview, sweepDeadSessionEntries };
627
+ export { Config, REVIEW_OUTPUT_SCHEMA, apply, clampReviewConfig, filterUnreadSkillOps, inject, name, shouldCompletionReview, sweepDeadSessionEntries };
@@ -41,6 +41,30 @@ export interface Config {
41
41
  reviewWakeInject?: boolean;
42
42
  }
43
43
  export declare const Config: z<Config>;
44
+ /** V8-01 (0.3.45): the review subagent's structured-output contract. The
45
+ * `subagents.start` outputSchema is RAW JSON Schema validated by
46
+ * assertObjectJsonSchema (upstream dsh-tools json-schema.ts — SCHEMA_TYPES
47
+ * has no 'json'; 'json' is a defineTool-author DSL-only value). The arrays
48
+ * deliberately use `{ type: 'array' }` with NO items node — absent items
49
+ * accepts any JSON item (upstream semantics, json-schema.ts "Item schema
50
+ * (type: 'array' only); absent accepts any JSON item"), and plan-validator
51
+ * owns the per-op structure proof. The whitelist contract test (review.spec
52
+ * V8-01) forbids a DSL value slipping back in. */
53
+ export declare const REVIEW_OUTPUT_SCHEMA: {
54
+ readonly type: "object";
55
+ readonly additionalProperties: false;
56
+ readonly properties: {
57
+ readonly memoryOps: {
58
+ readonly type: "array";
59
+ };
60
+ readonly skillOps: {
61
+ readonly type: "array";
62
+ };
63
+ readonly summary: {
64
+ readonly type: "string";
65
+ };
66
+ };
67
+ };
44
68
  /**
45
69
  * G3.1 (0.3.23): clamp the numeric review config at assembly so a 0/negative/
46
70
  * NaN/±Infinity value falls back to the package default instead of folding as a
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.44",
4
+ "version": "0.3.45",
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.44",
35
- "@lmzhen/dsh-evolution-core": "^0.3.44",
36
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.44"
34
+ "@lmzhen/dsh-evolution-approval": "^0.3.45",
35
+ "@lmzhen/dsh-evolution-core": "^0.3.45",
36
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.45"
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.44",
46
- "@lmzhen/dsh-evolution-policy": "^0.3.44"
45
+ "@lmzhen/dsh-evolution-state": "^0.3.45",
46
+ "@lmzhen/dsh-evolution-policy": "^0.3.45"
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.44",
58
- "@lmzhen/dsh-evolution-core": "^0.3.44",
59
- "@lmzhen/dsh-evolution-plan-validator": "^0.3.44",
60
- "@lmzhen/dsh-evolution-state": "^0.3.44"
57
+ "@lmzhen/dsh-evolution-approval": "^0.3.45",
58
+ "@lmzhen/dsh-evolution-core": "^0.3.45",
59
+ "@lmzhen/dsh-evolution-plan-validator": "^0.3.45",
60
+ "@lmzhen/dsh-evolution-state": "^0.3.45"
61
61
  }
62
62
  }