@lmzhen/dsh-evolution-replay 0.3.35 → 0.3.36
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 +4 -2
- package/lib/types/index.d.ts +4 -0
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -77,7 +77,7 @@ function comparePlans(plans, weights = DEFAULT_WEIGHTS) {
|
|
|
77
77
|
winner: winner.plan.policyId,
|
|
78
78
|
margin,
|
|
79
79
|
plans,
|
|
80
|
-
report: scored.map(({ plan, score }) => `${plan.policyId}: ${score.toFixed(1)} (${plan.acceptedOps} accepted, ${plan.rejectedOps} rejected)`).join("\n")
|
|
80
|
+
report: scored.map(({ plan, score }) => `${plan.policyId}: ${score.toFixed(1)} (${plan.acceptedOps} accepted, ${plan.rejectedOps} rejected${(plan.executionFailures ?? 0) > 0 ? `, ${plan.executionFailures} failed${plan.executionError !== void 0 ? `: ${plan.executionError}` : ""}` : ""})`).join("\n")
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
var EvolutionReplayDriver = class {
|
|
@@ -103,7 +103,9 @@ var EvolutionReplayDriver = class {
|
|
|
103
103
|
memoryOps: plan.memoryApplied,
|
|
104
104
|
skillOps: plan.skillApplied,
|
|
105
105
|
evidenceQuotes: typeof plan.evidenceQuotes === "number" ? plan.evidenceQuotes : plan.memoryApplied + plan.skillApplied,
|
|
106
|
-
estimatedInputChars: typeof plan.estimatedInputChars === "number" ? plan.estimatedInputChars : 0
|
|
106
|
+
estimatedInputChars: typeof plan.estimatedInputChars === "number" ? plan.estimatedInputChars : 0,
|
|
107
|
+
executionFailures: typeof plan.executionFailures === "number" ? plan.executionFailures : 0,
|
|
108
|
+
...typeof plan.executionError === "string" ? { executionError: plan.executionError } : {}
|
|
107
109
|
});
|
|
108
110
|
if (this.plans.length > this.maxPlans) this.plans.shift();
|
|
109
111
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export interface ReplayPlan {
|
|
|
21
21
|
skillOps: number;
|
|
22
22
|
evidenceQuotes: number;
|
|
23
23
|
estimatedInputChars: number;
|
|
24
|
+
/** V6-10 (0.3.36): execution-layer failures — a plan must not read as a
|
|
25
|
+
* clean "0/0" when its ops all failed at execution (V5-19 payload). */
|
|
26
|
+
executionFailures?: number | undefined;
|
|
27
|
+
executionError?: string | undefined;
|
|
24
28
|
}
|
|
25
29
|
export interface ReplayResult {
|
|
26
30
|
winner: string | null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-replay",
|
|
3
3
|
"description": "Replay/A-B evaluation primitives for evolution plans (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.36",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.36"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
42
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
42
|
+
"@lmzhen/dsh-evolution-core": "^0.3.36"
|
|
43
43
|
}
|
|
44
44
|
}
|