darwin-agents 0.11.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
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
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
|
+
|
|
5
60
|
## [0.11.0] — 2026-07-09
|
|
6
61
|
|
|
7
62
|
Two opt-in "budget discipline" knobs adapted from GEPA (verified against the
|
package/README.md
CHANGED
|
@@ -301,7 +301,24 @@ evolution: {
|
|
|
301
301
|
| **critic** | Evaluates other agents' output (1-10) | Nothing |
|
|
302
302
|
| **analyst** | Code quality analysis | Filesystem access |
|
|
303
303
|
|
|
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.).
|
|
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
|
+
```
|
|
305
322
|
|
|
306
323
|
## Closed-Loop & Observability (v0.4.6)
|
|
307
324
|
|
|
@@ -58,6 +58,39 @@ export interface RunMultiCriticOptions {
|
|
|
58
58
|
* (e.g. an agent that must "produce a markdown table").
|
|
59
59
|
*/
|
|
60
60
|
normalizeForJudging?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* v0.12.0 — Bring your own judges: an explicit critic-prompt set for THIS
|
|
63
|
+
* call, bypassing the built-in {@link getCriticPrompts} name lookup.
|
|
64
|
+
*
|
|
65
|
+
* Why: the built-in `AGENT_CRITIC_MAP` covers a handful of generic agent
|
|
66
|
+
* archetypes (investigator / writer / research / critic / analyst / …).
|
|
67
|
+
* Any fleet with domain agents beyond those archetypes previously had to
|
|
68
|
+
* FORK this file to register its own judges — unknown names silently fall
|
|
69
|
+
* back to `INVESTIGATOR_PROMPTS`, which mis-scores domain output (e.g. a
|
|
70
|
+
* game-simulation turn judged as an investigative report). With this
|
|
71
|
+
* option the caller keeps its critic sets in its own codebase and passes
|
|
72
|
+
* the right set per call.
|
|
73
|
+
*
|
|
74
|
+
* Semantics: any count ≥ 1 works (the median handles even counts). Entries
|
|
75
|
+
* that are not a `{ name, prompt }` pair of non-empty strings are dropped —
|
|
76
|
+
* a config-loaded judge list with holes degrades instead of crashing. An
|
|
77
|
+
* empty array, a non-array, or an array with no usable entry falls back to
|
|
78
|
+
* the built-in lookup, so misconfigured callers get v0.11 behaviour instead
|
|
79
|
+
* of judging with zero critics.
|
|
80
|
+
*
|
|
81
|
+
* Judge contract: each prompt must instruct the critic to emit
|
|
82
|
+
* `===SCORE=== N` (or an `X/10` figure) — outputs without either count as
|
|
83
|
+
* a failed critic, and if ALL critics fail the result is `medianScore: 0`.
|
|
84
|
+
*/
|
|
85
|
+
criticPrompts?: CriticPromptDef[];
|
|
86
|
+
/**
|
|
87
|
+
* v0.12.0 — Override the output label used in the evaluation preamble
|
|
88
|
+
* ("Evaluate the following {label} for the task …"). Pairs with
|
|
89
|
+
* {@link RunMultiCriticOptions.criticPrompts} for agents outside the
|
|
90
|
+
* built-in `AGENT_OUTPUT_LABELS` map, whose label would otherwise be the
|
|
91
|
+
* generic "output". Ignored when empty/whitespace-only.
|
|
92
|
+
*/
|
|
93
|
+
outputLabel?: string;
|
|
61
94
|
}
|
|
62
95
|
/**
|
|
63
96
|
* v0.7.0 — Strip markdown formatting to plain prose for style-bias-free
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-critic.d.ts","sourceRoot":"","sources":["../../../src/evolution/multi-critic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+BAA+B;AAC/B,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wCAAwC;AACxC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,2BAA2B;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEtG,mDAAmD;AACnD,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-critic.d.ts","sourceRoot":"","sources":["../../../src/evolution/multi-critic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,+BAA+B;AAC/B,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wCAAwC;AACxC,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,2BAA2B;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAEtG,mDAAmD;AACnD,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAElC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CA4C5D;AAycD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,EAAE,CAErE;AAED,4FAA4F;AAC5F,eAAO,MAAM,cAAc,EAAE,eAAe,EAAyB,CAAC;AAgBtE;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,WAAW,EACtB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,iBAAiB,CAAC,CAkE5B"}
|
|
@@ -513,14 +513,26 @@ const AGENT_OUTPUT_LABELS = {
|
|
|
513
513
|
* @param agentName - Name of the agent being evaluated (determines which critic set to use)
|
|
514
514
|
*/
|
|
515
515
|
export async function runMultiCritic(agentOutput, task, runCritic, agentName, options = {}) {
|
|
516
|
-
|
|
516
|
+
// v0.12.0: explicit label override wins; then the built-in map; then generic.
|
|
517
|
+
const labelOverride = options.outputLabel?.trim();
|
|
518
|
+
const outputLabel = labelOverride || (AGENT_OUTPUT_LABELS[agentName ?? ''] ?? 'output');
|
|
517
519
|
// v0.7.0: optional style-bias normalisation — judge content, not markdown.
|
|
518
520
|
const judgedOutput = options.normalizeForJudging
|
|
519
521
|
? stripMarkdownForJudging(agentOutput)
|
|
520
522
|
: agentOutput;
|
|
521
523
|
const evaluationTask = `Evaluate the following ${outputLabel} for the task "${task}":\n\n${judgedOutput}`;
|
|
522
|
-
|
|
523
|
-
//
|
|
524
|
+
// v0.12.0: caller-supplied critic set wins. Entries without a usable
|
|
525
|
+
// name+prompt are dropped (a JS caller's config-loaded list with holes must
|
|
526
|
+
// degrade, not crash the run); empty/invalid input falls back to the
|
|
527
|
+
// built-in name lookup so the runner never judges with zero critics.
|
|
528
|
+
const suppliedPrompts = Array.isArray(options.criticPrompts)
|
|
529
|
+
? options.criticPrompts.filter((p) => typeof p?.name === 'string' && p.name.length > 0 &&
|
|
530
|
+
typeof p?.prompt === 'string' && p.prompt.length > 0)
|
|
531
|
+
: [];
|
|
532
|
+
const prompts = suppliedPrompts.length > 0
|
|
533
|
+
? suppliedPrompts
|
|
534
|
+
: getCriticPrompts(agentName ?? '');
|
|
535
|
+
// Run all critics in parallel
|
|
524
536
|
const promises = prompts.map(async ({ name, prompt }) => {
|
|
525
537
|
try {
|
|
526
538
|
const output = await runCritic(prompt, evaluationTask, name);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-critic.js","sourceRoot":"","sources":["../../../src/evolution/multi-critic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"multi-critic.js","sourceRoot":"","sources":["../../../src/evolution/multi-critic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAqFH;;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Ac;IAChC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACjE,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,yBAAyB;IACzB,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC/D,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "darwin-agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "AI agents that improve themselves. Self-evolving prompts via A/B testing, multi-model critics, safety gates, and pattern detection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"benchmark": "tsx benchmark/evolution-benchmark.ts",
|
|
56
56
|
"test": "tsx --test tests/*.test.ts",
|
|
57
57
|
"typecheck:tests": "tsc -p tsconfig.test.json",
|
|
58
|
-
"prepublishOnly": "npm run build && npm test"
|
|
58
|
+
"prepublishOnly": "npm run build && npm test && npm run check:adapter-compat",
|
|
59
|
+
"check:adapter-compat": "node scripts/check-adapter-compat.mjs"
|
|
59
60
|
},
|
|
60
|
-
"dependencies": {},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"better-sqlite3": "^11.0.0 || ^12.0.0",
|
|
63
63
|
"pg": "^8.0.0"
|
|
@@ -72,9 +72,11 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/better-sqlite3": "^7.6.13",
|
|
75
|
-
"better-sqlite3": "^12.10.0",
|
|
76
75
|
"@types/node": "^25.6.0",
|
|
77
76
|
"@types/pg": "^8.11.0",
|
|
77
|
+
"@types/semver": "^7.7.1",
|
|
78
|
+
"better-sqlite3": "^12.10.0",
|
|
79
|
+
"semver": "^7.8.5",
|
|
78
80
|
"tsx": "^4.19.0",
|
|
79
81
|
"typescript": "^6.0.3"
|
|
80
82
|
},
|