@evomap/evolver 1.89.7 → 1.89.8

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 (55) hide show
  1. package/conformance/savings-core/constants.json +30 -0
  2. package/conformance/savings-core/golden-vectors.json +333 -0
  3. package/package.json +2 -1
  4. package/src/evolve/guards.js +1 -1
  5. package/src/evolve/pipeline/collect.js +1 -1
  6. package/src/evolve/pipeline/dispatch.js +1 -1
  7. package/src/evolve/pipeline/enrich.js +1 -1
  8. package/src/evolve/pipeline/hub.js +1 -1
  9. package/src/evolve/pipeline/select.js +1 -1
  10. package/src/evolve/pipeline/signals.js +1 -1
  11. package/src/evolve/utils.js +1 -1
  12. package/src/evolve.js +1 -1
  13. package/src/gep/a2aProtocol.js +1 -1
  14. package/src/gep/antiAbuseTelemetry.js +1 -1
  15. package/src/gep/autoDistillConv.js +1 -1
  16. package/src/gep/autoDistillLlm.js +1 -1
  17. package/src/gep/candidateEval.js +1 -1
  18. package/src/gep/candidates.js +1 -1
  19. package/src/gep/contentHash.js +1 -1
  20. package/src/gep/conversationSniffer.js +1 -1
  21. package/src/gep/crypto.js +1 -1
  22. package/src/gep/curriculum.js +1 -1
  23. package/src/gep/deviceId.js +1 -1
  24. package/src/gep/envFingerprint.js +1 -1
  25. package/src/gep/epigenetics.js +1 -1
  26. package/src/gep/execBridge.js +1 -1
  27. package/src/gep/explore.js +1 -1
  28. package/src/gep/hash.js +1 -1
  29. package/src/gep/hubFetch.js +1 -1
  30. package/src/gep/hubReview.js +1 -1
  31. package/src/gep/hubSearch.js +1 -1
  32. package/src/gep/hubVerify.js +1 -1
  33. package/src/gep/learningSignals.js +1 -1
  34. package/src/gep/memoryGraph.js +1 -1
  35. package/src/gep/memoryGraphAdapter.js +1 -1
  36. package/src/gep/mutation.js +1 -1
  37. package/src/gep/narrativeMemory.js +1 -1
  38. package/src/gep/openPRRegistry.js +1 -1
  39. package/src/gep/personality.js +1 -1
  40. package/src/gep/policyCheck.js +1 -1
  41. package/src/gep/prompt.js +1 -1
  42. package/src/gep/recallInject.js +1 -1
  43. package/src/gep/recallVerifier.js +1 -1
  44. package/src/gep/reflection.js +1 -1
  45. package/src/gep/savingsCore.js +1 -1
  46. package/src/gep/selector.js +1 -1
  47. package/src/gep/skillDistiller.js +1 -1
  48. package/src/gep/solidify.js +1 -1
  49. package/src/gep/strategy.js +1 -1
  50. package/src/gep/tokenSavings.js +1 -1
  51. package/src/gep/workspaceKeychain.js +1 -1
  52. package/src/proxy/extensions/traceControl.js +1 -1
  53. package/src/proxy/inject.js +1 -1
  54. package/src/proxy/trace/extractor.js +1 -1
  55. package/src/proxy/trace/usage.js +1 -1
@@ -0,0 +1,30 @@
1
+ {
2
+ "spec_version": "0.3.0",
3
+ "entropy_event_tokens_est": {
4
+ "dedup_quarantine": 12000,
5
+ "dedup_warning": 3600,
6
+ "hub_search_hit": 8000,
7
+ "hub_search_miss": 0,
8
+ "fetch_reuse": 4000
9
+ },
10
+ "fetch_usage_tokens_est": {
11
+ "Gene": 1500,
12
+ "Capsule": 3500,
13
+ "EvolutionEvent": 0
14
+ },
15
+ "usd_per_m_tokens_blended": 9.0,
16
+ "cache_read_saved_usd_per_m_tokens": {
17
+ "anthropic": 2.7
18
+ },
19
+ "reuse_estimator": {
20
+ "derive_base_tokens": 120000,
21
+ "tokens_per_changed_line": 800,
22
+ "derive_cap_tokens": 600000,
23
+ "typical_changed_lines": 75,
24
+ "reference_saving_fraction": 0.4
25
+ },
26
+ "savings_basis_precedence": ["measured", "cost_index", "estimator"],
27
+ "deprecated": {
28
+ "tokens_per_reuse_blanket": 180000
29
+ }
30
+ }
@@ -0,0 +1,333 @@
1
+ {
2
+ "spec_version": "0.3.0",
3
+ "cases": [
4
+ {
5
+ "id": "r1_genebench_overall",
6
+ "formula": "measured_savings",
7
+ "input": {
8
+ "raw_tokens": 489273,
9
+ "optimized_tokens": 182943
10
+ },
11
+ "expected": {
12
+ "tokens_saved": 306330,
13
+ "savings_pct": 62.61
14
+ }
15
+ },
16
+ {
17
+ "id": "r1_genebench_max_single",
18
+ "formula": "measured_savings",
19
+ "input": {
20
+ "raw_tokens": 14340,
21
+ "optimized_tokens": 2179
22
+ },
23
+ "expected": {
24
+ "tokens_saved": 12161,
25
+ "savings_pct": 84.8
26
+ }
27
+ },
28
+ {
29
+ "id": "r1_zero_raw",
30
+ "formula": "measured_savings",
31
+ "input": {
32
+ "raw_tokens": 0,
33
+ "optimized_tokens": 500
34
+ },
35
+ "expected": {
36
+ "tokens_saved": 0,
37
+ "savings_pct": 0
38
+ }
39
+ },
40
+ {
41
+ "id": "r1_optimized_exceeds_raw_clamps",
42
+ "formula": "measured_savings",
43
+ "input": {
44
+ "raw_tokens": 1000,
45
+ "optimized_tokens": 1200
46
+ },
47
+ "expected": {
48
+ "tokens_saved": 0,
49
+ "savings_pct": 0
50
+ }
51
+ },
52
+ {
53
+ "id": "r2_genebench_avg_rollout",
54
+ "formula": "rollout_fold",
55
+ "input": {
56
+ "n_avg_rollouts": 1.48
57
+ },
58
+ "expected": {
59
+ "rollout_fold_pct": 32.43
60
+ }
61
+ },
62
+ {
63
+ "id": "r2_single_rollout",
64
+ "formula": "rollout_fold",
65
+ "input": {
66
+ "n_avg_rollouts": 1
67
+ },
68
+ "expected": {
69
+ "rollout_fold_pct": 0
70
+ }
71
+ },
72
+ {
73
+ "id": "e1_all_event_types_default_coeffs",
74
+ "formula": "entropy_total",
75
+ "input": {
76
+ "events": [
77
+ {
78
+ "type": "dedup_quarantine",
79
+ "count": 2
80
+ },
81
+ {
82
+ "type": "dedup_warning",
83
+ "count": 1
84
+ },
85
+ {
86
+ "type": "hub_search_hit",
87
+ "count": 3
88
+ },
89
+ {
90
+ "type": "hub_search_miss",
91
+ "count": 5
92
+ },
93
+ {
94
+ "type": "fetch_reuse",
95
+ "count": 4
96
+ }
97
+ ]
98
+ },
99
+ "expected": {
100
+ "total_tokens_saved": 67600,
101
+ "total_events": 15
102
+ }
103
+ },
104
+ {
105
+ "id": "e1_caller_supplied_measured_takes_precedence",
106
+ "formula": "entropy_total",
107
+ "input": {
108
+ "events": [
109
+ {
110
+ "type": "fetch_reuse",
111
+ "count": 1,
112
+ "tokensEstSaved": 7777
113
+ }
114
+ ]
115
+ },
116
+ "expected": {
117
+ "total_tokens_saved": 7777,
118
+ "total_events": 1
119
+ }
120
+ },
121
+ {
122
+ "id": "e1_negative_coerces_to_zero",
123
+ "formula": "entropy_total",
124
+ "input": {
125
+ "events": [
126
+ {
127
+ "type": "hub_search_hit",
128
+ "count": 1,
129
+ "tokensEstSaved": -50
130
+ }
131
+ ]
132
+ },
133
+ "expected": {
134
+ "total_tokens_saved": 0,
135
+ "total_events": 1
136
+ }
137
+ },
138
+ {
139
+ "id": "e1_unknown_type_ignored",
140
+ "formula": "entropy_total",
141
+ "input": {
142
+ "events": [
143
+ {
144
+ "type": "mystery_event",
145
+ "count": 9
146
+ },
147
+ {
148
+ "type": "fetch_reuse",
149
+ "count": 1
150
+ }
151
+ ]
152
+ },
153
+ "expected": {
154
+ "total_tokens_saved": 4000,
155
+ "total_events": 1
156
+ }
157
+ },
158
+ {
159
+ "id": "e2_mixed_asset_types",
160
+ "formula": "fetch_usage_estimate",
161
+ "input": {
162
+ "byType": {
163
+ "Gene": 10,
164
+ "Capsule": 3,
165
+ "EvolutionEvent": 7
166
+ }
167
+ },
168
+ "expected": {
169
+ "estimated_token_saved": 25500
170
+ }
171
+ },
172
+ {
173
+ "id": "e2_unknown_type_contributes_zero",
174
+ "formula": "fetch_usage_estimate",
175
+ "input": {
176
+ "byType": {
177
+ "Gene": 1,
178
+ "Artifact": 99
179
+ }
180
+ },
181
+ "expected": {
182
+ "estimated_token_saved": 1500
183
+ }
184
+ },
185
+ {
186
+ "id": "h1_homepage_style_hit_rate",
187
+ "formula": "hit_rate",
188
+ "input": {
189
+ "hits": 1531,
190
+ "misses": 60
191
+ },
192
+ "expected": {
193
+ "hit_rate_pct": 96.23
194
+ }
195
+ },
196
+ {
197
+ "id": "h1_empty_denominator",
198
+ "formula": "hit_rate",
199
+ "input": {
200
+ "hits": 0,
201
+ "misses": 0
202
+ },
203
+ "expected": {
204
+ "hit_rate_pct": 0
205
+ }
206
+ },
207
+ {
208
+ "id": "u1_round_two_decimals",
209
+ "formula": "usd_saved",
210
+ "input": {
211
+ "tokens": 67600
212
+ },
213
+ "expected": {
214
+ "usd_saved": 0.61
215
+ }
216
+ },
217
+ {
218
+ "id": "u1_two_million_tokens",
219
+ "formula": "usd_saved",
220
+ "input": {
221
+ "tokens": 2000000
222
+ },
223
+ "expected": {
224
+ "usd_saved": 18
225
+ }
226
+ },
227
+ {
228
+ "id": "c1_anthropic_one_million_cache_reads",
229
+ "formula": "cache_saved_usd",
230
+ "input": {
231
+ "provider": "anthropic",
232
+ "cache_read_tokens": 1000000
233
+ },
234
+ "expected": {
235
+ "cache_saved_usd": 2.7
236
+ }
237
+ },
238
+ {
239
+ "id": "c1_round_four_decimals",
240
+ "formula": "cache_saved_usd",
241
+ "input": {
242
+ "provider": "anthropic",
243
+ "cache_read_tokens": 123456
244
+ },
245
+ "expected": {
246
+ "cache_saved_usd": 0.3333
247
+ }
248
+ },
249
+ {
250
+ "id": "c1_unknown_provider_zero",
251
+ "formula": "cache_saved_usd",
252
+ "input": {
253
+ "provider": "acme",
254
+ "cache_read_tokens": 1000000
255
+ },
256
+ "expected": {
257
+ "cache_saved_usd": 0
258
+ }
259
+ },
260
+ {
261
+ "id": "e3_default_direct_anchors_legacy_blanket",
262
+ "formula": "reuse_estimate",
263
+ "input": {
264
+ "blast_radius_lines": null,
265
+ "mode": "direct"
266
+ },
267
+ "expected": {
268
+ "tokens_saved": 180000,
269
+ "basis": "estimated_default"
270
+ }
271
+ },
272
+ {
273
+ "id": "e3_median_patch_75_lines",
274
+ "formula": "reuse_estimate",
275
+ "input": {
276
+ "blast_radius_lines": 75,
277
+ "mode": "direct"
278
+ },
279
+ "expected": {
280
+ "tokens_saved": 180000,
281
+ "basis": "estimated_blast_radius"
282
+ }
283
+ },
284
+ {
285
+ "id": "e3_small_patch_scales_down",
286
+ "formula": "reuse_estimate",
287
+ "input": {
288
+ "blast_radius_lines": 2,
289
+ "mode": "direct"
290
+ },
291
+ "expected": {
292
+ "tokens_saved": 121600,
293
+ "basis": "estimated_blast_radius"
294
+ }
295
+ },
296
+ {
297
+ "id": "e3_pathological_blast_radius_capped",
298
+ "formula": "reuse_estimate",
299
+ "input": {
300
+ "blast_radius_lines": 1000,
301
+ "mode": "direct"
302
+ },
303
+ "expected": {
304
+ "tokens_saved": 600000,
305
+ "basis": "estimated_blast_radius"
306
+ }
307
+ },
308
+ {
309
+ "id": "e3_reference_mode_fractional",
310
+ "formula": "reuse_estimate",
311
+ "input": {
312
+ "blast_radius_lines": null,
313
+ "mode": "reference"
314
+ },
315
+ "expected": {
316
+ "tokens_saved": 72000,
317
+ "basis": "estimated_default"
318
+ }
319
+ },
320
+ {
321
+ "id": "e3_zero_lines_falls_back_to_default",
322
+ "formula": "reuse_estimate",
323
+ "input": {
324
+ "blast_radius_lines": 0,
325
+ "mode": "direct"
326
+ },
327
+ "expected": {
328
+ "tokens_saved": 180000,
329
+ "basis": "estimated_default"
330
+ }
331
+ }
332
+ ]
333
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evomap/evolver",
3
- "version": "1.89.7",
3
+ "version": "1.89.8",
4
4
  "description": "A GEP-powered self-evolution engine for AI agents. Features automated log analysis and Genome Evolution Protocol (GEP) for auditable, reusable evolution assets.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -55,6 +55,7 @@
55
55
  "src/",
56
56
  "scripts/",
57
57
  "skills/",
58
+ "conformance/",
58
59
  "README.md",
59
60
  "README.zh-CN.md",
60
61
  "README.ja-JP.md",