@lmzhen/dsh-evolution-review 0.3.71 → 0.3.72
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 +9 -5
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -376,6 +376,7 @@ function apply(ctx, rawConfig = {}) {
|
|
|
376
376
|
const agentOptions = { model };
|
|
377
377
|
if (config.reviewProvider) agentOptions.provider = config.reviewProvider;
|
|
378
378
|
const preRunHashes = await treeSkillHashes();
|
|
379
|
+
const sessionSeqAtPlanTime = session.seq - 1;
|
|
379
380
|
const run = await subagents.start("spawn", {
|
|
380
381
|
label: "dsh-evolution-review",
|
|
381
382
|
prompt: [{
|
|
@@ -398,14 +399,17 @@ function apply(ctx, rawConfig = {}) {
|
|
|
398
399
|
} catch (emitError) {
|
|
399
400
|
ctx.logger.warn(`dsh-evolution-review: review-error emit failed: ${emitError instanceof Error ? emitError.message : String(emitError)}`);
|
|
400
401
|
}
|
|
401
|
-
|
|
402
|
+
const failureShape = result;
|
|
403
|
+
const stopDetail = typeof failureShape.stopReason === "string" ? failureShape.stopReason : void 0;
|
|
404
|
+
const diagDetail = typeof failureShape.diagnostic === "string" ? failureShape.diagnostic : void 0;
|
|
405
|
+
ctx.logger.warn(`dsh-evolution-review: review subagent returned no structured plan${stopDetail !== void 0 ? ` (stopReason=${stopDetail}${diagDetail !== void 0 ? `; diagnostic=${diagDetail}` : ""})` : ""}`);
|
|
402
406
|
return false;
|
|
403
407
|
}
|
|
404
408
|
const childReads = run.localAgent ? collectReadSkillNames(run.localAgent.session) : /* @__PURE__ */ new Set();
|
|
405
409
|
const plan = result.structured;
|
|
406
410
|
const policyFingerprint = fingerprintPolicy(snapshot);
|
|
407
411
|
const validation = validateEvolutionPlan(plan, {
|
|
408
|
-
sessionSeq:
|
|
412
|
+
sessionSeq: sessionSeqAtPlanTime,
|
|
409
413
|
maxOpsPerPlan: snapshot?.maxOpsPerPlan ?? DEFAULT_MAX_OPS_PER_PLAN,
|
|
410
414
|
protectedSkillNames: new Set(snapshot?.protectedSkillNames ?? []),
|
|
411
415
|
maxMemoryChars: snapshot?.memoryChars ?? DEFAULT_MEMORY_CHAR_LIMIT,
|
|
@@ -566,13 +570,13 @@ function apply(ctx, rawConfig = {}) {
|
|
|
566
570
|
if (stageFile !== void 0) args.staged_from_sha256 = stageFile === null ? "absent" : contentHash(stageFile);
|
|
567
571
|
}
|
|
568
572
|
const opName = typeof args.name === "string" ? args.name : "";
|
|
569
|
-
const hashChecked = (args.action === "update" || args.action === "edit") && opName !== "" && preRunHashes?.has(opName) === true;
|
|
573
|
+
const hashChecked = (args.action === "update" || args.action === "edit" || args.action === "patch") && opName !== "" && preRunHashes?.has(opName) === true;
|
|
570
574
|
if (hashChecked) {
|
|
571
|
-
const live = stageCurrent;
|
|
575
|
+
const live = args.action === "patch" ? hashLibrary ? await hashLibrary.read(opName).catch(() => null) : null : stageCurrent;
|
|
572
576
|
const preRun = preRunHashes.get(opName);
|
|
573
577
|
if (live === null || preRun !== void 0 && contentHash(live) !== preRun) {
|
|
574
578
|
ok = false;
|
|
575
|
-
failedOps.push(`skill ${args.action} ${args.name}: the skill changed while this review ran — update refused as stale; produce a fresh plan`);
|
|
579
|
+
failedOps.push(`skill ${args.action} ${args.name}: the skill changed while this review ran — ${args.action === "patch" ? "patch" : "update"} refused as stale; produce a fresh plan`);
|
|
576
580
|
continue;
|
|
577
581
|
}
|
|
578
582
|
}
|
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.
|
|
4
|
+
"version": "0.3.72",
|
|
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.
|
|
35
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
36
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.72",
|
|
35
|
+
"@lmzhen/dsh-evolution-core": "^0.3.72",
|
|
36
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.72"
|
|
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.5-rc.2",
|
|
43
43
|
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
44
44
|
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
|
45
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
46
|
-
"@lmzhen/dsh-evolution-policy": "^0.3.
|
|
45
|
+
"@lmzhen/dsh-evolution-state": "^0.3.72",
|
|
46
|
+
"@lmzhen/dsh-evolution-policy": "^0.3.72"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"@deepseek-ai/dsh-session-persistence": "^0.1.5-rc.2",
|
|
55
55
|
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.5-rc.2",
|
|
56
56
|
"@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
|
|
57
|
-
"@lmzhen/dsh-evolution-approval": "^0.3.
|
|
58
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
59
|
-
"@lmzhen/dsh-evolution-curator": "^0.3.
|
|
60
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.3.
|
|
61
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
57
|
+
"@lmzhen/dsh-evolution-approval": "^0.3.72",
|
|
58
|
+
"@lmzhen/dsh-evolution-core": "^0.3.72",
|
|
59
|
+
"@lmzhen/dsh-evolution-curator": "^0.3.72",
|
|
60
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.3.72",
|
|
61
|
+
"@lmzhen/dsh-evolution-state": "^0.3.72"
|
|
62
62
|
}
|
|
63
63
|
}
|