darwin-agents 0.10.0 → 0.12.0
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/CHANGELOG.md +109 -0
- package/README.md +57 -1
- package/dist/src/cli/evolution-flags.d.ts +2 -0
- package/dist/src/cli/evolution-flags.d.ts.map +1 -1
- package/dist/src/cli/evolution-flags.js +34 -1
- package/dist/src/cli/evolution-flags.js.map +1 -1
- package/dist/src/cli/evolve.d.ts +2 -0
- package/dist/src/cli/evolve.d.ts.map +1 -1
- package/dist/src/cli/evolve.js +11 -0
- package/dist/src/cli/evolve.js.map +1 -1
- package/dist/src/evolution/enabled-state.d.ts.map +1 -1
- package/dist/src/evolution/enabled-state.js +7 -0
- package/dist/src/evolution/enabled-state.js.map +1 -1
- package/dist/src/evolution/feedback-filter.d.ts +54 -0
- package/dist/src/evolution/feedback-filter.d.ts.map +1 -0
- package/dist/src/evolution/feedback-filter.js +65 -0
- package/dist/src/evolution/feedback-filter.js.map +1 -0
- package/dist/src/evolution/loop.d.ts +34 -0
- package/dist/src/evolution/loop.d.ts.map +1 -1
- package/dist/src/evolution/loop.js +80 -1
- package/dist/src/evolution/loop.js.map +1 -1
- package/dist/src/evolution/multi-critic.d.ts +33 -0
- package/dist/src/evolution/multi-critic.d.ts.map +1 -1
- package/dist/src/evolution/multi-critic.js +15 -3
- package/dist/src/evolution/multi-critic.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/types.d.ts +65 -6
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,115 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.12.0] — 2026-07-16
|
|
6
|
+
|
|
7
|
+
Bring-your-own-judges: the multi-critic runner accepts caller-supplied critic
|
|
8
|
+
sets, closing the gap that forced fleets with domain agents to fork this file.
|
|
9
|
+
Plus a CI release-guard against the adapter peer-range breakage that has now
|
|
10
|
+
happened twice. Default behaviour is unchanged.
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`RunMultiCriticOptions.criticPrompts`** — an explicit critic-prompt set
|
|
15
|
+
for a single `runMultiCritic` call, bypassing the built-in
|
|
16
|
+
`getCriticPrompts` name lookup. The built-in `AGENT_CRITIC_MAP` covers a
|
|
17
|
+
handful of generic archetypes (investigator / writer / research / critic /
|
|
18
|
+
analyst / …); any agent name outside it silently falls back to the
|
|
19
|
+
investigator judges, which mis-score domain output (a game-simulation turn
|
|
20
|
+
judged as an investigative report). Until now the only way to register
|
|
21
|
+
domain judges was to fork `multi-critic.ts` — our own agent fleet did
|
|
22
|
+
exactly that, and the fork promptly fell behind the engine. With this
|
|
23
|
+
option the caller keeps critic sets in its own codebase and passes the
|
|
24
|
+
right set per call. Any count ≥ 1 works (the median handles even counts).
|
|
25
|
+
Entries that are not a `{ name, prompt }` pair of non-empty strings are
|
|
26
|
+
dropped (a config-loaded judge list with holes degrades instead of
|
|
27
|
+
crashing), and an **empty array, a non-array, or an all-invalid array falls
|
|
28
|
+
back to the built-in lookup** so a misconfigured caller gets v0.11
|
|
29
|
+
behaviour instead of judging with zero critics. Judge contract: each prompt
|
|
30
|
+
must instruct the critic to emit `===SCORE=== N` (or an `X/10` figure) —
|
|
31
|
+
outputs without either count as a failed critic.
|
|
32
|
+
- **`RunMultiCriticOptions.outputLabel`** — overrides the evaluation-preamble
|
|
33
|
+
label ("Evaluate the following *{label}* for the task …") for agents
|
|
34
|
+
outside the built-in `AGENT_OUTPUT_LABELS` map. Whitespace-only values are
|
|
35
|
+
ignored. Composes with `normalizeForJudging` and `criticPrompts`.
|
|
36
|
+
- **Release-guard `check:adapter-compat`**
|
|
37
|
+
(`scripts/check-adapter-compat.mjs`, wired into **both** the CI workflow
|
|
38
|
+
and `prepublishOnly` — publish-first workflows are covered, not just
|
|
39
|
+
push-first): fails the build when this package's version escapes the
|
|
40
|
+
published `darwin-langgraph@latest` peer range for `darwin-agents`. Both
|
|
41
|
+
0.9.0 and 0.11.0 escaped the adapter's then-current cap the day they
|
|
42
|
+
shipped — explicit paired installs failed with `ERESOLVE`, unpinned
|
|
43
|
+
installs silently downgraded darwin-agents. The guard turns the third
|
|
44
|
+
recurrence into a red build before `npm publish`. Prerelease-aware: it
|
|
45
|
+
judges the **release counterpart** (`1.0.0-alpha.1` → `1.0.0`), matching
|
|
46
|
+
what the prerelease becomes — an exact-prerelease mismatch under npm's
|
|
47
|
+
plain-prerelease rules is a WARN, not a FAIL (prereleases ship on a
|
|
48
|
+
dist-tag and never affect default installs). Network-tolerant (registry
|
|
49
|
+
hiccups warn and pass). Release ordering note: publish the adapter's
|
|
50
|
+
widened-peer release (`darwin-langgraph@0.5.4`, peer `<1.0.0`) **before**
|
|
51
|
+
pushing/publishing this version, or the guard fires exactly as designed.
|
|
52
|
+
|
|
53
|
+
### Notes
|
|
54
|
+
|
|
55
|
+
- No behavioural change without the new options: `criticPrompts` unset/empty
|
|
56
|
+
and `outputLabel` unset/blank reproduce v0.11 byte-for-byte.
|
|
57
|
+
- `semver` + `@types/semver` added as devDependencies (guard script only —
|
|
58
|
+
the runtime stays zero-dependency).
|
|
59
|
+
|
|
60
|
+
## [0.11.0] — 2026-07-09
|
|
61
|
+
|
|
62
|
+
Two opt-in "budget discipline" knobs adapted from GEPA (verified against the
|
|
63
|
+
DSPy GEPA API and the gepa-ai engine source) to Darwin's forever-online loop.
|
|
64
|
+
The values mirror upstream's defaults; the mechanisms are Darwin's own
|
|
65
|
+
adaptation. Default behaviour is unchanged with the flags off.
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- **`skipPerfectFeedback`** (adapted from GEPA's `skip_perfect_score`,
|
|
70
|
+
`src/evolution/feedback-filter.ts`). Upstream skips a whole reflection
|
|
71
|
+
iteration when an entire sampled minibatch is perfect; Darwin generalizes it
|
|
72
|
+
to per-report filtering, which it can afford because the critic scores on real
|
|
73
|
+
runs are already paid for. A run that already scored a perfect critic score
|
|
74
|
+
carries no improvement gradient — its "nothing to fix" report only dilutes the
|
|
75
|
+
pool. When `true`, such reports are dropped from **both** the legacy optimizer
|
|
76
|
+
feedback (`getRecentFeedback`) and the GEPA reflective feedback
|
|
77
|
+
(`getReflectiveFeedback`); skipped items do not count toward the feedback
|
|
78
|
+
window, so it fills with actionable reports. `perfectFeedbackScore` (default
|
|
79
|
+
10, the critic-scale max) sets the threshold — lower it to also skip
|
|
80
|
+
near-perfect runs. A non-finite score is never treated as perfect, so a
|
|
81
|
+
genuinely broken run still surfaces. If every recent run is perfect the
|
|
82
|
+
reflective path falls back to the legacy stats optimizer and the legacy path
|
|
83
|
+
proceeds on aggregate stats (so the loop keeps exploring). With `useDemos` on,
|
|
84
|
+
perfect runs are still used — harvested as demonstrations. CLI: `--skip-perfect`
|
|
85
|
+
/ `--no-skip-perfect`. Pure helpers (`isPerfectScore` /
|
|
86
|
+
`resolvePerfectFeedbackScore` / `filterPerfectFeedback`) are exported from the
|
|
87
|
+
package root.
|
|
88
|
+
- **`maxMergeInvocations`** (adapted from GEPA's `max_merge_invocations`, default
|
|
89
|
+
5 upstream). A per-agent **lifetime** cap on merge-derived challengers,
|
|
90
|
+
persisted in `DarwinState.mergeInvocations` (a process-scoped counter would
|
|
91
|
+
reset every cron tick and never trigger). The GEPA paper leaves merge-budget
|
|
92
|
+
allocation as open research; the reason Darwin needs a cap is its own — an
|
|
93
|
+
uncapped `mergeEveryK` cadence would merge forever and crowd out reflective
|
|
94
|
+
exploration late in an agent's life. The count is the number of merge
|
|
95
|
+
challengers actually **created** — a merge that fails the alignment guard is
|
|
96
|
+
not counted (it consumed no A/B slot) — and is written **only when a cap is
|
|
97
|
+
set**, so an uncapped `useMerge` agent's persisted state is unchanged from
|
|
98
|
+
v0.10. Once the cap is reached the merge branch is skipped and the loop falls
|
|
99
|
+
back to the reflective path for the rest of the agent's life (the budget does
|
|
100
|
+
not re-arm). Only consulted when `useMerge` is on. Left unset it is uncapped
|
|
101
|
+
(v0.10 behaviour); set it to `5` to match GEPA's default. CLI: `--max-merge <n>`
|
|
102
|
+
(non-negative integer; `0` disables merge).
|
|
103
|
+
|
|
104
|
+
### Notes
|
|
105
|
+
|
|
106
|
+
- Both knobs flow through the existing override machinery
|
|
107
|
+
(`EvolutionConfigOverride` + `OVERRIDE_KEYS` + `resolveEvolutionConfig` +
|
|
108
|
+
`describeOverride`/`describeConfig`), so they are CLI-settable, persist across
|
|
109
|
+
processes, and CLI overrides win over persisted ones.
|
|
110
|
+
- +24 tests (610 total, 609 pass / 1 pre-existing skip). `tsc`, `typecheck:tests`
|
|
111
|
+
and `build` clean. Default-path decisions unchanged; an uncapped agent writes
|
|
112
|
+
no new state.
|
|
113
|
+
|
|
5
114
|
## [0.10.0] — 2026-07-03
|
|
6
115
|
|
|
7
116
|
Two research-driven, opt-in evolution surfaces — a new challenger *source*
|
package/README.md
CHANGED
|
@@ -255,6 +255,43 @@ evolution: {
|
|
|
255
255
|
},
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
+
### Budget discipline (v0.11, opt-in)
|
|
259
|
+
|
|
260
|
+
Two more knobs adapted from GEPA (the values mirror upstream; upstream ships
|
|
261
|
+
both on, here they are off unless you turn them on).
|
|
262
|
+
|
|
263
|
+
**Skip perfect feedback** (`skipPerfectFeedback`) adapts GEPA's
|
|
264
|
+
`skip_perfect_score`. Upstream skips a whole reflection iteration when an entire
|
|
265
|
+
sampled minibatch is perfect; Darwin generalizes it to per-report filtering,
|
|
266
|
+
which it can afford because the critic scores on real runs are already paid for.
|
|
267
|
+
A run that already scored a perfect critic score carries no improvement
|
|
268
|
+
gradient, so its "nothing to fix" report just dilutes the pool. When on,
|
|
269
|
+
perfect-score reports are dropped from *both* the legacy optimizer feedback and
|
|
270
|
+
the GEPA reflection minibatch (lower `perfectFeedbackScore` from the default 10
|
|
271
|
+
to also skip near-perfect runs). With `useDemos` on, those perfect runs still
|
|
272
|
+
get used — harvested as demonstrations instead.
|
|
273
|
+
|
|
274
|
+
**Merge budget** (`maxMergeInvocations`) adapts GEPA's `max_merge_invocations`
|
|
275
|
+
(default 5 upstream): a per-agent *lifetime* cap on how many merge-derived
|
|
276
|
+
challengers an agent may produce. The GEPA paper leaves merge-budget allocation
|
|
277
|
+
as open research; the reason Darwin needs a cap is its own — an uncapped
|
|
278
|
+
`mergeEveryK` cadence would merge forever, so late in an agent's life merges
|
|
279
|
+
would crowd out the reflective exploration that finds genuinely new strategies.
|
|
280
|
+
Once the cap is hit the loop falls back to the reflective path for good. Left
|
|
281
|
+
unset it is uncapped (the v0.10 behaviour); set it to `5` to match GEPA's
|
|
282
|
+
protective default.
|
|
283
|
+
|
|
284
|
+
```typescript
|
|
285
|
+
evolution: {
|
|
286
|
+
enabled: true,
|
|
287
|
+
useGepa: true,
|
|
288
|
+
skipPerfectFeedback: true, // GEPA skip_perfect_score — focus feedback on failures
|
|
289
|
+
perfectFeedbackScore: 10, // score (1-10) counted as "perfect" (default 10)
|
|
290
|
+
useMerge: true,
|
|
291
|
+
maxMergeInvocations: 5, // GEPA max_merge_invocations — cap merge over the agent's life
|
|
292
|
+
},
|
|
293
|
+
```
|
|
294
|
+
|
|
258
295
|
## Built-in Agents
|
|
259
296
|
|
|
260
297
|
| Agent | What it does | Needs |
|
|
@@ -264,7 +301,24 @@ evolution: {
|
|
|
264
301
|
| **critic** | Evaluates other agents' output (1-10) | Nothing |
|
|
265
302
|
| **analyst** | Code quality analysis | Filesystem access |
|
|
266
303
|
|
|
267
|
-
Each agent ships with a dedicated **multi-critic set** that scores the output by the right criteria for that agent type (research = source quality + analytical depth + completeness, analyst = technical accuracy with file:line refs + pattern recognition + recommendation quality, etc.).
|
|
304
|
+
Each agent ships with a dedicated **multi-critic set** that scores the output by the right criteria for that agent type (research = source quality + analytical depth + completeness, analyst = technical accuracy with file:line refs + pattern recognition + recommendation quality, etc.).
|
|
305
|
+
|
|
306
|
+
**Bring your own judges (v0.12.0):** agents outside the built-in archetypes used to silently fall back to the investigator judges — the only way to register domain critic sets was to fork `multi-critic.ts`. Now `runMultiCritic` accepts them per call, so your critic sets live in *your* codebase:
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import { runMultiCritic, type CriticPromptDef } from 'darwin-agents';
|
|
310
|
+
|
|
311
|
+
const SIMULATION_JUDGES: CriticPromptDef[] = [
|
|
312
|
+
{ name: 'action-quality', prompt: 'You judge the quality of a game action… ===SCORE=== N' },
|
|
313
|
+
{ name: 'social-awareness', prompt: 'You judge how the actor used social context… ===SCORE=== N' },
|
|
314
|
+
{ name: 'game-fitness', prompt: 'You judge fitness toward the win condition… ===SCORE=== N' },
|
|
315
|
+
];
|
|
316
|
+
|
|
317
|
+
const result = await runMultiCritic(turnOutput, task, runCritic, 'sim-trader', {
|
|
318
|
+
criticPrompts: SIMULATION_JUDGES, // any count ≥ 1; empty array → built-in lookup
|
|
319
|
+
outputLabel: 'simulation turn', // "Evaluate the following simulation turn for…"
|
|
320
|
+
});
|
|
321
|
+
```
|
|
268
322
|
|
|
269
323
|
## Closed-Loop & Observability (v0.4.6)
|
|
270
324
|
|
|
@@ -500,6 +554,8 @@ darwin run writer "Explain consensus" --gepa --pareto-gate
|
|
|
500
554
|
| `--reflection-model <id>` | Use a stronger model for GEPA reflection (the documented leverage point) |
|
|
501
555
|
| `--demos` / `--no-demos` | SIMBA-style demo injection: the agent's best past runs as a challenger (v0.10) |
|
|
502
556
|
| `--candidate-selection <s>` | Reflection parent strategy: `active` \| `best` \| `pareto` \| `epsilon-greedy` (v0.10) |
|
|
557
|
+
| `--skip-perfect` / `--no-skip-perfect` | Drop perfect-score runs from optimizer feedback — GEPA `skip_perfect_score` (v0.11) |
|
|
558
|
+
| `--max-merge <n>` | Lifetime cap on merge-derived challengers — GEPA `max_merge_invocations` (v0.11) |
|
|
503
559
|
|
|
504
560
|
All default to **off** — the baseline single-objective evolution loop is
|
|
505
561
|
unchanged unless you opt in.
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* --reflection-model <model-id>
|
|
15
15
|
* --demos / --no-demos (v0.10.0)
|
|
16
16
|
* --candidate-selection <active|best|pareto|epsilon-greedy> (v0.10.0)
|
|
17
|
+
* --skip-perfect / --no-skip-perfect (v0.11.0)
|
|
18
|
+
* --max-merge <n> (v0.11.0)
|
|
17
19
|
*/
|
|
18
20
|
import type { EvolutionConfigOverride } from '../types.js';
|
|
19
21
|
/** True when `arg` is one of the evolution-config flags this module handles. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolution-flags.d.ts","sourceRoot":"","sources":["../../../src/cli/evolution-flags.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"evolution-flags.d.ts","sourceRoot":"","sources":["../../../src/cli/evolution-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAU3D,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAqB1D;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAoFR;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG;IACzD,QAAQ,EAAE,uBAAuB,CAAC;IAClC,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAaA;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,uBAAuB,GAAG,OAAO,CAY9E"}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* --reflection-model <model-id>
|
|
15
15
|
* --demos / --no-demos (v0.10.0)
|
|
16
16
|
* --candidate-selection <active|best|pareto|epsilon-greedy> (v0.10.0)
|
|
17
|
+
* --skip-perfect / --no-skip-perfect (v0.11.0)
|
|
18
|
+
* --max-merge <n> (v0.11.0)
|
|
17
19
|
*/
|
|
18
20
|
/** Valid values for `--candidate-selection` (v0.10.0). */
|
|
19
21
|
const CANDIDATE_SELECTION_VALUES = new Set([
|
|
@@ -37,6 +39,9 @@ export function isEvolutionConfigFlag(arg) {
|
|
|
37
39
|
case '--demos':
|
|
38
40
|
case '--no-demos':
|
|
39
41
|
case '--candidate-selection':
|
|
42
|
+
case '--skip-perfect':
|
|
43
|
+
case '--no-skip-perfect':
|
|
44
|
+
case '--max-merge':
|
|
40
45
|
return true;
|
|
41
46
|
default:
|
|
42
47
|
return false;
|
|
@@ -103,6 +108,32 @@ export function applyEvolutionFlag(arg, nextArg, target) {
|
|
|
103
108
|
return 1;
|
|
104
109
|
}
|
|
105
110
|
return 0;
|
|
111
|
+
case '--skip-perfect':
|
|
112
|
+
target.skipPerfectFeedback = true;
|
|
113
|
+
return 0;
|
|
114
|
+
case '--no-skip-perfect':
|
|
115
|
+
target.skipPerfectFeedback = false;
|
|
116
|
+
return 0;
|
|
117
|
+
case '--max-merge': {
|
|
118
|
+
// A missing value (end of argv) or a following FLAG (`--max-merge
|
|
119
|
+
// --force`) is a missing value, not this flag's argument — warn and do
|
|
120
|
+
// NOT consume the next token, so a following action flag still runs.
|
|
121
|
+
if (nextArg === undefined || nextArg.startsWith('--')) {
|
|
122
|
+
console.warn('[darwin] --max-merge needs a non-negative integer value — ignored.');
|
|
123
|
+
return 0;
|
|
124
|
+
}
|
|
125
|
+
// Strict non-negative-integer match rejects '', ' ', '-3', '2.5', '0x10',
|
|
126
|
+
// '1e3', 'abc' (Number() would coerce several of those, e.g. Number('')
|
|
127
|
+
// === 0, silently disabling merge for the agent's life). The value token
|
|
128
|
+
// is consumed either way — it was clearly meant as this flag's argument.
|
|
129
|
+
if (/^\d+$/.test(nextArg.trim())) {
|
|
130
|
+
target.maxMergeInvocations = Number(nextArg.trim());
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
console.warn(`[darwin] --max-merge "${nextArg}" is not a non-negative integer — ignored.`);
|
|
134
|
+
}
|
|
135
|
+
return 1;
|
|
136
|
+
}
|
|
106
137
|
default:
|
|
107
138
|
return 0;
|
|
108
139
|
}
|
|
@@ -136,6 +167,8 @@ export function hasAnyEvolutionFlag(override) {
|
|
|
136
167
|
override.useCoverage !== undefined ||
|
|
137
168
|
override.reflectionModel !== undefined ||
|
|
138
169
|
override.useDemos !== undefined ||
|
|
139
|
-
override.candidateSelection !== undefined
|
|
170
|
+
override.candidateSelection !== undefined ||
|
|
171
|
+
override.skipPerfectFeedback !== undefined ||
|
|
172
|
+
override.maxMergeInvocations !== undefined);
|
|
140
173
|
}
|
|
141
174
|
//# sourceMappingURL=evolution-flags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolution-flags.js","sourceRoot":"","sources":["../../../src/cli/evolution-flags.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"evolution-flags.js","sourceRoot":"","sources":["../../../src/cli/evolution-flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,0DAA0D;AAC1D,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IAC9D,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,gBAAgB;CACjB,CAAC,CAAC;AAEH,gFAAgF;AAChF,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,QAAQ,CAAC;QACd,KAAK,WAAW,CAAC;QACjB,KAAK,SAAS,CAAC;QACf,KAAK,YAAY,CAAC;QAClB,KAAK,eAAe,CAAC;QACrB,KAAK,kBAAkB,CAAC;QACxB,KAAK,YAAY,CAAC;QAClB,KAAK,eAAe,CAAC;QACrB,KAAK,oBAAo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C;AACJ,CAAC"}
|
package/dist/src/cli/evolve.d.ts
CHANGED
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* --reflection-model <id> stronger reflection model for GEPA
|
|
20
20
|
* --demos / --no-demos SIMBA-style demo injection (v0.10)
|
|
21
21
|
* --candidate-selection <s> reflection parent: active|best|pareto|epsilon-greedy
|
|
22
|
+
* --skip-perfect / --no-skip-perfect drop perfect-score runs from optimizer feedback (v0.11)
|
|
23
|
+
* --max-merge <n> lifetime cap on merge-derived challengers (v0.11)
|
|
22
24
|
*/
|
|
23
25
|
export declare function evolveCommand(args: string[]): Promise<void>;
|
|
24
26
|
//# sourceMappingURL=evolve.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolve.d.ts","sourceRoot":"","sources":["../../../src/cli/evolve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"evolve.d.ts","sourceRoot":"","sources":["../../../src/cli/evolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAeH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAkGjE"}
|
package/dist/src/cli/evolve.js
CHANGED
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
* --reflection-model <id> stronger reflection model for GEPA
|
|
20
20
|
* --demos / --no-demos SIMBA-style demo injection (v0.10)
|
|
21
21
|
* --candidate-selection <s> reflection parent: active|best|pareto|epsilon-greedy
|
|
22
|
+
* --skip-perfect / --no-skip-perfect drop perfect-score runs from optimizer feedback (v0.11)
|
|
23
|
+
* --max-merge <n> lifetime cap on merge-derived challengers (v0.11)
|
|
22
24
|
*/
|
|
23
25
|
import { createMemory } from '../memory/index.js';
|
|
24
26
|
import { loadConfig } from '../core/agent.js';
|
|
@@ -141,6 +143,10 @@ function describeOverride(o) {
|
|
|
141
143
|
parts.push(`demos=${o.useDemos}`);
|
|
142
144
|
if (o.candidateSelection !== undefined)
|
|
143
145
|
parts.push(`candidateSelection=${o.candidateSelection}`);
|
|
146
|
+
if (o.skipPerfectFeedback !== undefined)
|
|
147
|
+
parts.push(`skipPerfect=${o.skipPerfectFeedback}`);
|
|
148
|
+
if (o.maxMergeInvocations !== undefined)
|
|
149
|
+
parts.push(`maxMerge=${o.maxMergeInvocations}`);
|
|
144
150
|
return parts.length > 0 ? parts.join(', ') : '(none)';
|
|
145
151
|
}
|
|
146
152
|
/** One-line summary of the effective advanced config for the status view. */
|
|
@@ -153,12 +159,17 @@ function describeConfig(evo) {
|
|
|
153
159
|
`paretoGate=${evo.paretoGate ?? false}`,
|
|
154
160
|
`coverage=${evo.useCoverage ?? false}`,
|
|
155
161
|
`demos=${evo.useDemos ?? false}`,
|
|
162
|
+
`skipPerfect=${evo.skipPerfectFeedback ?? false}`,
|
|
156
163
|
];
|
|
157
164
|
if (evo.reflectionModel)
|
|
158
165
|
parts.push(`reflectionModel=${evo.reflectionModel}`);
|
|
159
166
|
if (evo.candidateSelection && evo.candidateSelection !== 'active') {
|
|
160
167
|
parts.push(`candidateSelection=${evo.candidateSelection}`);
|
|
161
168
|
}
|
|
169
|
+
// maxMerge is genuinely optional (unset = uncapped), so it is shown only when
|
|
170
|
+
// set — unlike the always-shown booleans above.
|
|
171
|
+
if (evo.maxMergeInvocations !== undefined)
|
|
172
|
+
parts.push(`maxMerge=${evo.maxMergeInvocations}`);
|
|
162
173
|
return parts.join(', ');
|
|
163
174
|
}
|
|
164
175
|
//# sourceMappingURL=evolve.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolve.js","sourceRoot":"","sources":["../../../src/cli/evolve.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"evolve.js","sourceRoot":"","sources":["../../../src/cli/evolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD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a,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC3C,OAAO,CAUT;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAQf;
|
|
1
|
+
{"version":3,"file":"enabled-state.d.ts","sourceRoot":"","sources":["../../../src/evolution/enabled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,cAAc,EACf,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,GAC3C,OAAO,CAUT;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAQf;AAiBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,0BAA0B,CAAC,EACpD,WAAW,CAAC,EAAE,uBAAuB,GACpC,eAAe,GAAG,SAAS,CAoC7B;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -60,6 +60,8 @@ const OVERRIDE_KEYS = [
|
|
|
60
60
|
'reflectionModel',
|
|
61
61
|
'useDemos',
|
|
62
62
|
'candidateSelection',
|
|
63
|
+
'skipPerfectFeedback',
|
|
64
|
+
'maxMergeInvocations',
|
|
63
65
|
];
|
|
64
66
|
/**
|
|
65
67
|
* Resolve the effective {@link EvolutionConfig} for an agent: the static
|
|
@@ -100,7 +102,12 @@ export function resolveEvolutionConfig(agent, state, cliOverride) {
|
|
|
100
102
|
else if (key === 'candidateSelection') {
|
|
101
103
|
resolved.candidateSelection = value;
|
|
102
104
|
}
|
|
105
|
+
else if (key === 'maxMergeInvocations') {
|
|
106
|
+
resolved.maxMergeInvocations = value;
|
|
107
|
+
}
|
|
103
108
|
else {
|
|
109
|
+
// Remaining override keys are all boolean flags (useGepa / useMerge /
|
|
110
|
+
// paretoGate / useCoverage / useDemos / skipPerfectFeedback).
|
|
104
111
|
resolved[key] = value;
|
|
105
112
|
}
|
|
106
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enabled-state.js","sourceRoot":"","sources":["../../../src/evolution/enabled-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAsB,EACtB,KAA4C;IAE5C,MAAM,SAAS,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACvD,IAAI,OAAO,SAAS,KAAK,SAAS,EAAE,CAAC;QACnC,0EAA0E;QAC1E,wEAAwE;QACxE,yEAAyE;QACzE,2EAA2E;QAC3E,OAAO,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC;IACpD,CAAC;IACD,OAAO,KAAK,CAAC,SAAS,EAAE,OAAO,IAAI,KAAK,CAAC;AAC3C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,MAAsB,EACtB,SAAiB,EACjB,OAAgB;IAEhB,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,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AC;gBAC/E,CAAC;qBAAM,IAAI,GAAG,KAAK,qBAAqB,EAAE,CAAC;oBACzC,QAAQ,CAAC,mBAAmB,GAAG,KAAe,CAAC;gBACjD,CAAC;qBAAM,CAAC;oBACN,sEAAsE;oBACtE,8DAA8D;oBAC9D,QAAQ,CAAC,GAAG,CAAC,GAAG,KAAgB,CAAC;gBACnC,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,MAAsB,EACtB,SAAiB,EACjB,OAAgC;IAEhC,MAAM,MAAM,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,EAAE;QACjC,IAAI,CAAC,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACpC,KAAK,CAAC,wBAAwB,GAAG,EAAE,CAAC;QACtC,CAAC;QACD,MAAM,QAAQ,GAAG,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACjE,KAAK,CAAC,wBAAwB,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;QACxE,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perfect-score feedback filtering (v0.11.0) — adapted from GEPA's
|
|
3
|
+
* `skip_perfect_score` for Darwin's online evolution loop.
|
|
4
|
+
*
|
|
5
|
+
* What upstream actually does (gepa-ai `reflective_mutation.py`): after
|
|
6
|
+
* sampling a minibatch and scoring the candidate on it, GEPA skips the WHOLE
|
|
7
|
+
* reflection iteration when EVERY minibatch score is perfect — it does not drop
|
|
8
|
+
* individual instances, and a perfect instance inside a mixed minibatch is kept
|
|
9
|
+
* (positive contrast for the reflector).
|
|
10
|
+
*
|
|
11
|
+
* Darwin generalizes this to per-report filtering, which upstream can't do
|
|
12
|
+
* cheaply but Darwin can: the critic scores on real runs are already paid for,
|
|
13
|
+
* so there is no eval-budget reason to keep perfect ("nothing to fix") reports
|
|
14
|
+
* in the pool the reflector / legacy optimizer learns from. Dropping them
|
|
15
|
+
* concentrates the feedback on runs that actually went wrong. (The perfect runs
|
|
16
|
+
* are not wasted — with `useDemos` they are harvested as demonstrations, so
|
|
17
|
+
* failures feed reflection and successes feed demos.)
|
|
18
|
+
*
|
|
19
|
+
* Purity: no I/O, no LLM calls, deterministic. The predicate is generic over
|
|
20
|
+
* any `{ score: number }` so both feedback assemblers in the loop
|
|
21
|
+
* (`getReflectiveFeedback` → `ReflectiveFeedback`, `getRecentFeedback` →
|
|
22
|
+
* built-inline) share one source of truth and cannot drift. The loop filters
|
|
23
|
+
* inline during the feedback-window fill (so skipped items don't count toward
|
|
24
|
+
* the window `limit`); `filterPerfectFeedback` is exported as a convenience for
|
|
25
|
+
* consumers assembling their own feedback lists.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Critic scores are on the 1–10 scale (see `parse-score.ts`). The default
|
|
29
|
+
* perfect threshold is a literal top score — only 10/10 is skipped unless the
|
|
30
|
+
* caller lowers it.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DEFAULT_PERFECT_FEEDBACK_SCORE = 10;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a perfect-score threshold to a usable value: finite and within the
|
|
35
|
+
* critic 1–10 scale, else the default. A non-finite / out-of-range config
|
|
36
|
+
* value (hand-edited file, `NaN`) must never silently disable or invert the
|
|
37
|
+
* filter — it falls back to {@link DEFAULT_PERFECT_FEEDBACK_SCORE}.
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolvePerfectFeedbackScore(value: number | undefined): number;
|
|
40
|
+
/**
|
|
41
|
+
* True when a run's critic score is at or above the perfect threshold and so
|
|
42
|
+
* carries no improvement gradient. A non-finite score (missing / unparsed) is
|
|
43
|
+
* never "perfect" — it is kept so a genuinely broken run still surfaces to the
|
|
44
|
+
* optimizer rather than being silently dropped as if it were flawless.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isPerfectScore(score: number, threshold: number): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Drop perfect-score items from a feedback list. Generic over `{ score }` so
|
|
49
|
+
* the exact feedback shape is the caller's; order is preserved.
|
|
50
|
+
*/
|
|
51
|
+
export declare function filterPerfectFeedback<T extends {
|
|
52
|
+
score: number;
|
|
53
|
+
}>(items: readonly T[], threshold: number): T[];
|
|
54
|
+
//# sourceMappingURL=feedback-filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-filter.d.ts","sourceRoot":"","sources":["../../../src/evolution/feedback-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM7E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAGxE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAC/D,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,SAAS,EAAE,MAAM,GAChB,CAAC,EAAE,CAEL"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perfect-score feedback filtering (v0.11.0) — adapted from GEPA's
|
|
3
|
+
* `skip_perfect_score` for Darwin's online evolution loop.
|
|
4
|
+
*
|
|
5
|
+
* What upstream actually does (gepa-ai `reflective_mutation.py`): after
|
|
6
|
+
* sampling a minibatch and scoring the candidate on it, GEPA skips the WHOLE
|
|
7
|
+
* reflection iteration when EVERY minibatch score is perfect — it does not drop
|
|
8
|
+
* individual instances, and a perfect instance inside a mixed minibatch is kept
|
|
9
|
+
* (positive contrast for the reflector).
|
|
10
|
+
*
|
|
11
|
+
* Darwin generalizes this to per-report filtering, which upstream can't do
|
|
12
|
+
* cheaply but Darwin can: the critic scores on real runs are already paid for,
|
|
13
|
+
* so there is no eval-budget reason to keep perfect ("nothing to fix") reports
|
|
14
|
+
* in the pool the reflector / legacy optimizer learns from. Dropping them
|
|
15
|
+
* concentrates the feedback on runs that actually went wrong. (The perfect runs
|
|
16
|
+
* are not wasted — with `useDemos` they are harvested as demonstrations, so
|
|
17
|
+
* failures feed reflection and successes feed demos.)
|
|
18
|
+
*
|
|
19
|
+
* Purity: no I/O, no LLM calls, deterministic. The predicate is generic over
|
|
20
|
+
* any `{ score: number }` so both feedback assemblers in the loop
|
|
21
|
+
* (`getReflectiveFeedback` → `ReflectiveFeedback`, `getRecentFeedback` →
|
|
22
|
+
* built-inline) share one source of truth and cannot drift. The loop filters
|
|
23
|
+
* inline during the feedback-window fill (so skipped items don't count toward
|
|
24
|
+
* the window `limit`); `filterPerfectFeedback` is exported as a convenience for
|
|
25
|
+
* consumers assembling their own feedback lists.
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Critic scores are on the 1–10 scale (see `parse-score.ts`). The default
|
|
29
|
+
* perfect threshold is a literal top score — only 10/10 is skipped unless the
|
|
30
|
+
* caller lowers it.
|
|
31
|
+
*/
|
|
32
|
+
export const DEFAULT_PERFECT_FEEDBACK_SCORE = 10;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a perfect-score threshold to a usable value: finite and within the
|
|
35
|
+
* critic 1–10 scale, else the default. A non-finite / out-of-range config
|
|
36
|
+
* value (hand-edited file, `NaN`) must never silently disable or invert the
|
|
37
|
+
* filter — it falls back to {@link DEFAULT_PERFECT_FEEDBACK_SCORE}.
|
|
38
|
+
*/
|
|
39
|
+
export function resolvePerfectFeedbackScore(value) {
|
|
40
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
41
|
+
return DEFAULT_PERFECT_FEEDBACK_SCORE;
|
|
42
|
+
}
|
|
43
|
+
if (value < 1 || value > 10)
|
|
44
|
+
return DEFAULT_PERFECT_FEEDBACK_SCORE;
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* True when a run's critic score is at or above the perfect threshold and so
|
|
49
|
+
* carries no improvement gradient. A non-finite score (missing / unparsed) is
|
|
50
|
+
* never "perfect" — it is kept so a genuinely broken run still surfaces to the
|
|
51
|
+
* optimizer rather than being silently dropped as if it were flawless.
|
|
52
|
+
*/
|
|
53
|
+
export function isPerfectScore(score, threshold) {
|
|
54
|
+
if (!Number.isFinite(score))
|
|
55
|
+
return false;
|
|
56
|
+
return score >= threshold;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Drop perfect-score items from a feedback list. Generic over `{ score }` so
|
|
60
|
+
* the exact feedback shape is the caller's; order is preserved.
|
|
61
|
+
*/
|
|
62
|
+
export function filterPerfectFeedback(items, threshold) {
|
|
63
|
+
return items.filter((item) => !isPerfectScore(item.score, threshold));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=feedback-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-filter.js","sourceRoot":"","sources":["../../../src/evolution/feedback-filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAyB;IACnE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACzD,OAAO,8BAA8B,CAAC;IACxC,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,8BAA8B,CAAC;IACnE,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,SAAiB;IAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1C,OAAO,KAAK,IAAI,SAAS,CAAC;AAC5B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAmB,EACnB,SAAiB;IAEjB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -148,6 +148,12 @@ export declare class DarwinLoop {
|
|
|
148
148
|
* from loadExperiments(), so we just filter for ones with feedback.
|
|
149
149
|
*/
|
|
150
150
|
private getRecentFeedback;
|
|
151
|
+
/**
|
|
152
|
+
* v0.11.0 — Resolved perfect-score threshold for {@link
|
|
153
|
+
* EvolutionConfig.skipPerfectFeedback} (finite, within the critic 1–10
|
|
154
|
+
* scale, else default 10).
|
|
155
|
+
*/
|
|
156
|
+
private perfectFeedbackScore;
|
|
151
157
|
/**
|
|
152
158
|
* v0.6.0 — Generate the next prompt variant via the GEPA reflective path.
|
|
153
159
|
*
|
|
@@ -181,6 +187,34 @@ export declare class DarwinLoop {
|
|
|
181
187
|
* v0.7.0 — Merge cadence (every K-th cycle). Default 3, clamped ≥ 1.
|
|
182
188
|
*/
|
|
183
189
|
private mergeEveryK;
|
|
190
|
+
/**
|
|
191
|
+
* v0.11.0 — Resolved lifetime merge cap (GEPA `max_merge_invocations`), or
|
|
192
|
+
* `null` when uncapped. A non-finite / negative value is treated as "no cap"
|
|
193
|
+
* rather than silently disabling merge; a non-integer cap is floored (mirrors
|
|
194
|
+
* `mergeEveryK`) so a hand-edited `2.5` behaves as 2, not 3.
|
|
195
|
+
*/
|
|
196
|
+
private mergeCap;
|
|
197
|
+
/**
|
|
198
|
+
* v0.11.0 — Lifetime merge budget check (GEPA `max_merge_invocations`).
|
|
199
|
+
* Returns `true` (merge may fire) when no cap is configured, or when the
|
|
200
|
+
* per-agent count of merge-derived challengers is still below the cap.
|
|
201
|
+
*/
|
|
202
|
+
private mergeBudgetAvailable;
|
|
203
|
+
/**
|
|
204
|
+
* v0.11.0 — Increment this agent's lifetime merge-invocation count. Called
|
|
205
|
+
* once per merge challenger that passes the alignment guard and is carried
|
|
206
|
+
* into an A/B test, and ONLY when a cap is configured — an uncapped useMerge
|
|
207
|
+
* agent never writes the counter, so its persisted state is unchanged from
|
|
208
|
+
* v0.10. Initialises the map lazily for state rows that predate the field.
|
|
209
|
+
*
|
|
210
|
+
* The check (`mergeBudgetAvailable`) and this increment are separate state
|
|
211
|
+
* reads, so two cycles running concurrently for the SAME agent could each
|
|
212
|
+
* observe `used = cap-1` and overshoot by one. The overshoot is bounded by
|
|
213
|
+
* the concurrency and sits inside the pre-existing concurrent-A/B-start
|
|
214
|
+
* envelope (afterRun's "an A/B test is already running" guard is likewise
|
|
215
|
+
* check-then-act) — acceptable for a soft lifetime budget, not a hard limit.
|
|
216
|
+
*/
|
|
217
|
+
private recordMergeInvocation;
|
|
184
218
|
/**
|
|
185
219
|
* v0.10.0 — Demo-injection cadence (every K-th cycle). Default 4, clamped
|
|
186
220
|
* ≥ 1. Deliberately offset from the merge default (3) so the two
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../../src/evolution/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAEV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,cAAc,EAGf,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAoB,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,UA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