@lmzhen/dsh-evolution-replay 0.3.61 → 0.3.62

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 +8 -5
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -96,13 +96,16 @@ var EvolutionReplayDriver = class {
96
96
  }
97
97
  }
98
98
  record(plan) {
99
+ const count = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
100
+ const memoryApplied = count(plan.memoryApplied);
101
+ const skillApplied = count(plan.skillApplied);
99
102
  this.plans.push({
100
103
  policyId: typeof plan.policyFingerprint === "string" && plan.policyFingerprint.length > 0 ? plan.policyFingerprint : plan.planId,
101
- acceptedOps: plan.memoryApplied + plan.skillApplied,
102
- rejectedOps: plan.rejectedOps,
103
- memoryOps: plan.memoryApplied,
104
- skillOps: plan.skillApplied,
105
- evidenceQuotes: typeof plan.evidenceQuotes === "number" ? plan.evidenceQuotes : plan.memoryApplied + plan.skillApplied,
104
+ acceptedOps: memoryApplied + skillApplied,
105
+ rejectedOps: count(plan.rejectedOps),
106
+ memoryOps: memoryApplied,
107
+ skillOps: skillApplied,
108
+ evidenceQuotes: typeof plan.evidenceQuotes === "number" ? plan.evidenceQuotes : memoryApplied + skillApplied,
106
109
  estimatedInputChars: typeof plan.estimatedInputChars === "number" ? plan.estimatedInputChars : 0,
107
110
  executionFailures: typeof plan.executionFailures === "number" ? plan.executionFailures : 0,
108
111
  ...typeof plan.executionError === "string" ? { executionError: plan.executionError } : {}
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.61",
4
+ "version": "0.3.62",
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.61"
34
+ "@lmzhen/dsh-evolution-core": "^0.3.62"
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.61"
42
+ "@lmzhen/dsh-evolution-core": "^0.3.62"
43
43
  }
44
44
  }