@tangle-network/agent-eval 0.84.0 → 0.85.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/dist/belief-state/index.d.ts +1 -0
- package/dist/belief-state/index.js +135 -2
- package/dist/belief-state/index.js.map +1 -1
- package/dist/index.d.ts +73 -1
- package/dist/index.js +106 -2
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/docs/building-doctrine.md +42 -0
- package/package.json +13 -26
package/dist/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.0",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "@tangle-network/agent-eval — wire protocol",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.85.0",
|
|
6
6
|
"description": "HTTP and stdio RPC interface to agent-eval. The TypeScript runtime is the source of truth; this spec is the contract that cross-language clients (Python, Rust, Go) generate from.\n\nWire-protocol version: 1.0.0. Bumps on breaking changes to request/response schemas.",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Tangle Network",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Building doctrine
|
|
2
|
+
|
|
3
|
+
How every fleet agent that consumes `agent-eval` is built. Each rule is mechanical: a primitive or test makes the rule enforceable rather than aspirational. For the mental model and primitives this references, see [`concepts.md`](./concepts.md) and the [`/contract`](../src/contract/index.ts) surface.
|
|
4
|
+
|
|
5
|
+
## 1. Defaults must be provably reachable
|
|
6
|
+
|
|
7
|
+
Every hard-coded model id or endpoint default is verifiable against the live router. Membership in `{baseUrl}/models` is the free check; an optional 1-token probe per model confirms the router will actually serve it. A default the router cannot serve is a config bug caught before the run, not a runtime surprise that silently degrades into a stub. Backend ids are namespaced by binding: cli-bridge ids (`claude-code/*`, `kimi-code/*`, `opencode/*`) never appear as defaults in code reachable from production — bridge use is an explicit env opt-in, never an implicit fallback.
|
|
8
|
+
|
|
9
|
+
Enforced by: `preflightModels` (membership + optional probe) and `assertModelsServed` (gate that names every unreachable id with status + detail).
|
|
10
|
+
|
|
11
|
+
## 2. Probe the platform before peeling client layers
|
|
12
|
+
|
|
13
|
+
When a request fails, one direct call against the live endpoint bisects platform-versus-client before any code-level debugging begins. A 401 from the router on a `model_not_found` is the platform telling you the default is dead; a connection refused is the platform being unreachable. Establish which side is at fault with a probe first, then debug only the side that is actually broken.
|
|
14
|
+
|
|
15
|
+
Enforced by: `preflightModels({ probe: true })` — the probe is the platform-side bisection, carrying the router's own `error.message` back to the caller.
|
|
16
|
+
|
|
17
|
+
## 3. Agent-produced findings are hypotheses
|
|
18
|
+
|
|
19
|
+
Enumeration of candidate problems may fan out to agents, but agent output is not evidence. Truth comes from probes against ground truth, not from an agent's assertion. Every classification carries quoted evidence, and nothing unverified is merged or reported as fact. A confident-sounding agent claim with no probe behind it is a hypothesis awaiting falsification.
|
|
20
|
+
|
|
21
|
+
Enforced by: `assertRealBackend` over the resulting `RunRecord[]` — an agent that claims success while the backend was never called reads as a stub, not a pass.
|
|
22
|
+
|
|
23
|
+
## 4. Experiment integrity checklist
|
|
24
|
+
|
|
25
|
+
Any lift or benchmark claim satisfies all of the following before it is reported:
|
|
26
|
+
|
|
27
|
+
- A frozen, disjoint held-out set, spent exactly once, after candidate selection.
|
|
28
|
+
- The propose and selection steps never see held-out data.
|
|
29
|
+
- The paired bootstrap confidence interval excludes zero for a "ship" or "match" verdict.
|
|
30
|
+
- The same scorer and the same items on both sides of any comparison.
|
|
31
|
+
- A leakage check from builder inputs into the evaluation set.
|
|
32
|
+
- Cross-family judge panels, with inter-rater reliability reported and gated.
|
|
33
|
+
- Missing evidence is never scored as zero — fail loud over fabricate.
|
|
34
|
+
- No optional stopping: the stopping rule is fixed before the run.
|
|
35
|
+
|
|
36
|
+
Enforced by: `pairedBootstrap` (CI), `assertCrossFamily` (panel diversity), `interRaterReliability` (agreement), and `assertRealBackend` (no stub run masquerading as a result).
|
|
37
|
+
|
|
38
|
+
## 5. Fix the class, not the instance
|
|
39
|
+
|
|
40
|
+
A drifted default is the symptom of a missing convention. The fix ships the convention and its guard alongside the one-line correction, so the same drift cannot recur silently. Patching the single dead id without adding the preflight gate leaves the class open; the next default rots the same way.
|
|
41
|
+
|
|
42
|
+
Enforced by: `assertModelsServed` wired into the campaign preflight — the guard that turns "this one model was dead" into "no campaign spends tokens against an unreachable default."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-eval",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.85.0",
|
|
4
4
|
"description": "Evaluate and improve AI agents from runs, traces, judges, and feedback. Compare candidates, cluster failures, measure lift, and gate releases.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-eval#readme",
|
|
6
6
|
"repository": {
|
|
@@ -169,19 +169,6 @@
|
|
|
169
169
|
"publishConfig": {
|
|
170
170
|
"access": "public"
|
|
171
171
|
},
|
|
172
|
-
"scripts": {
|
|
173
|
-
"build": "tsup && pnpm openapi",
|
|
174
|
-
"dev": "tsup --watch",
|
|
175
|
-
"prepare": "husky",
|
|
176
|
-
"prepublishOnly": "pnpm build",
|
|
177
|
-
"test": "vitest run",
|
|
178
|
-
"test:watch": "vitest",
|
|
179
|
-
"typecheck": "tsc --noEmit",
|
|
180
|
-
"lint": "biome check src",
|
|
181
|
-
"format": "biome format --write src",
|
|
182
|
-
"openapi": "node dist/cli.js openapi --out dist/openapi.json",
|
|
183
|
-
"verify:package": "node scripts/verify-package-exports.mjs"
|
|
184
|
-
},
|
|
185
172
|
"dependencies": {
|
|
186
173
|
"@asteasolutions/zod-to-openapi": "^8.5.0",
|
|
187
174
|
"@ax-llm/ax": "^19.0.25",
|
|
@@ -209,16 +196,6 @@
|
|
|
209
196
|
"typescript": "^5.7.0",
|
|
210
197
|
"vitest": "^3.0.0"
|
|
211
198
|
},
|
|
212
|
-
"pnpm": {
|
|
213
|
-
"minimumReleaseAge": 4320,
|
|
214
|
-
"minimumReleaseAgeExclude": [
|
|
215
|
-
"@tangle-network/sandbox"
|
|
216
|
-
],
|
|
217
|
-
"overrides": {
|
|
218
|
-
"postcss@<8.5.10": "^8.5.10",
|
|
219
|
-
"ws@>=8.0.0 <8.20.1": "^8.20.1"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
199
|
"engines": {
|
|
223
200
|
"node": ">=20"
|
|
224
201
|
},
|
|
@@ -231,5 +208,15 @@
|
|
|
231
208
|
]
|
|
232
209
|
},
|
|
233
210
|
"license": "MIT",
|
|
234
|
-
"
|
|
235
|
-
|
|
211
|
+
"scripts": {
|
|
212
|
+
"build": "tsup && pnpm openapi",
|
|
213
|
+
"dev": "tsup --watch",
|
|
214
|
+
"test": "vitest run",
|
|
215
|
+
"test:watch": "vitest",
|
|
216
|
+
"typecheck": "tsc --noEmit",
|
|
217
|
+
"lint": "biome check src",
|
|
218
|
+
"format": "biome format --write src",
|
|
219
|
+
"openapi": "node dist/cli.js openapi --out dist/openapi.json",
|
|
220
|
+
"verify:package": "node scripts/verify-package-exports.mjs"
|
|
221
|
+
}
|
|
222
|
+
}
|