@tangle-network/agent-eval 0.127.0 → 0.128.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 +15 -0
- package/README.md +4 -0
- package/dist/analyst/index.d.ts +5 -8
- package/dist/belief-state/index.d.ts +5 -8
- package/dist/benchmarks/index.js +7 -8
- package/dist/campaign/index.d.ts +16 -21
- package/dist/campaign/index.js +6 -7
- package/dist/{chunk-NL33OXEP.js → chunk-2JX3CFMB.js} +60 -5
- package/dist/chunk-2JX3CFMB.js.map +1 -0
- package/dist/{chunk-ZPUEEM5U.js → chunk-2MKQIFS4.js} +7 -3
- package/dist/chunk-2MKQIFS4.js.map +1 -0
- package/dist/{chunk-IN455XKS.js → chunk-7ZZMD7UK.js} +50 -2
- package/dist/chunk-7ZZMD7UK.js.map +1 -0
- package/dist/{chunk-OD5NQ2CS.js → chunk-BYT7ELPS.js} +6 -4
- package/dist/chunk-BYT7ELPS.js.map +1 -0
- package/dist/{chunk-IG35YDN3.js → chunk-DRYIUNWY.js} +11 -3
- package/dist/chunk-DRYIUNWY.js.map +1 -0
- package/dist/{chunk-X6VOPMLD.js → chunk-EOSZT7PL.js} +11 -7
- package/dist/chunk-EOSZT7PL.js.map +1 -0
- package/dist/{chunk-WED5KLZQ.js → chunk-EZJEIH2R.js} +2 -2
- package/dist/{chunk-UTA2TGC4.js → chunk-IHQDPH7D.js} +2 -2
- package/dist/{chunk-FA3MFYNA.js → chunk-NACAGYSY.js} +26 -17
- package/dist/chunk-NACAGYSY.js.map +1 -0
- package/dist/{chunk-65QETEKG.js → chunk-NKAGIDE2.js} +5 -5
- package/dist/{chunk-424XHVKV.js → chunk-NYLOYM6N.js} +2 -2
- package/dist/{chunk-CLELFRQG.js → chunk-TBL77AUT.js} +5 -7
- package/dist/chunk-TBL77AUT.js.map +1 -0
- package/dist/{chunk-PRB53E3J.js → chunk-UB2LOJ6Q.js} +6 -8
- package/dist/{chunk-PRB53E3J.js.map → chunk-UB2LOJ6Q.js.map} +1 -1
- package/dist/{chunk-IMGJZBFG.js → chunk-VLOATJQ2.js} +2 -2
- package/dist/{chunk-Y5CYOL42.js → chunk-XDWDC2MP.js} +43 -14
- package/dist/chunk-XDWDC2MP.js.map +1 -0
- package/dist/{chunk-ARCFIY7U.js → chunk-XPRT64IE.js} +2 -2
- package/dist/contract/index.d.ts +25 -22
- package/dist/contract/index.js +37 -18
- package/dist/contract/index.js.map +1 -1
- package/dist/control.d.ts +26 -11
- package/dist/control.js +2 -3
- package/dist/hosted/index.d.ts +13 -13
- package/dist/hosted/index.js +2 -1
- package/dist/index.d.ts +40 -27
- package/dist/index.js +63 -33
- package/dist/index.js.map +1 -1
- package/dist/meta-eval/index.d.ts +5 -8
- package/dist/openapi.json +1 -1
- package/dist/reporting.d.ts +8 -10
- package/dist/reporting.js +4 -3
- package/dist/rl.d.ts +25 -15
- package/dist/rl.js +9 -7
- package/dist/rl.js.map +1 -1
- package/dist/rollout/index.d.ts +5 -8
- package/dist/rollout/index.js +2 -3
- package/dist/{run-campaign-3A2EBYBE.js → run-campaign-ISHFZ7FJ.js} +5 -3
- package/dist/traces.d.ts +10 -13
- package/dist/traces.js +3 -4
- package/docs/customer-journeys.md +7 -6
- package/docs/insight-report.md +21 -0
- package/package.json +1 -1
- package/dist/chunk-CLELFRQG.js.map +0 -1
- package/dist/chunk-FA3MFYNA.js.map +0 -1
- package/dist/chunk-IG35YDN3.js.map +0 -1
- package/dist/chunk-IN455XKS.js.map +0 -1
- package/dist/chunk-NL33OXEP.js.map +0 -1
- package/dist/chunk-OD5NQ2CS.js.map +0 -1
- package/dist/chunk-VSMTAMNK.js +0 -53
- package/dist/chunk-VSMTAMNK.js.map +0 -1
- package/dist/chunk-X6VOPMLD.js.map +0 -1
- package/dist/chunk-Y5CYOL42.js.map +0 -1
- package/dist/chunk-ZPUEEM5U.js.map +0 -1
- /package/dist/{chunk-WED5KLZQ.js.map → chunk-EZJEIH2R.js.map} +0 -0
- /package/dist/{chunk-UTA2TGC4.js.map → chunk-IHQDPH7D.js.map} +0 -0
- /package/dist/{chunk-65QETEKG.js.map → chunk-NKAGIDE2.js.map} +0 -0
- /package/dist/{chunk-424XHVKV.js.map → chunk-NYLOYM6N.js.map} +0 -0
- /package/dist/{chunk-IMGJZBFG.js.map → chunk-VLOATJQ2.js.map} +0 -0
- /package/dist/{chunk-ARCFIY7U.js.map → chunk-XPRT64IE.js.map} +0 -0
- /package/dist/{run-campaign-3A2EBYBE.js.map → run-campaign-ISHFZ7FJ.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
checkBehavioralCanary,
|
|
10
10
|
checkCanaries,
|
|
11
11
|
runBehavioralCanaries
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NACAGYSY.js";
|
|
13
13
|
import {
|
|
14
14
|
mintRolloutRows,
|
|
15
15
|
rolloutReward
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IHQDPH7D.js";
|
|
17
17
|
import {
|
|
18
18
|
SUPERVISOR_RUN_SCHEMA,
|
|
19
19
|
analyzeSupervisorRun,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
BENCHMARK_SPLIT_SEED,
|
|
46
46
|
benchmarks_exports,
|
|
47
47
|
deterministicSplit
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-XPRT64IE.js";
|
|
49
49
|
import {
|
|
50
50
|
DEFAULT_RULES,
|
|
51
51
|
classifyFailure,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
harnessAxisOf,
|
|
85
85
|
parseCorrectnessResponse,
|
|
86
86
|
verifyCompletion
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-UB2LOJ6Q.js";
|
|
88
88
|
import {
|
|
89
89
|
DEFAULT_MUTATION_PRIMITIVES,
|
|
90
90
|
DEFAULT_RED_TEAM_CORPUS,
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
scoreRedTeamOutput,
|
|
119
119
|
surfaceContentHash,
|
|
120
120
|
toolNamesForRun
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-NKAGIDE2.js";
|
|
122
122
|
import {
|
|
123
123
|
BackendIntegrityError,
|
|
124
124
|
assertRealAgentReceipts,
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
inMemoryVerdictCache,
|
|
131
131
|
summarizeAgentReceiptIntegrity,
|
|
132
132
|
summarizeBackendIntegrity
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-EZJEIH2R.js";
|
|
134
134
|
import {
|
|
135
135
|
DEFAULT_COMPLEXITY_WEIGHTS,
|
|
136
136
|
FindingsStore,
|
|
@@ -189,19 +189,19 @@ import {
|
|
|
189
189
|
stopOnNoProgress,
|
|
190
190
|
stopOnRepeatedAction,
|
|
191
191
|
subjectiveEval
|
|
192
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-BYT7ELPS.js";
|
|
193
193
|
import {
|
|
194
194
|
assertReleaseConfidence,
|
|
195
195
|
bootstrapCi,
|
|
196
196
|
evaluateReleaseConfidence,
|
|
197
197
|
judgeReplayGate,
|
|
198
198
|
renderReleaseReport
|
|
199
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-XDWDC2MP.js";
|
|
200
200
|
import {
|
|
201
201
|
runEvalCampaign
|
|
202
|
-
} from "./chunk-
|
|
203
|
-
import "./chunk-
|
|
204
|
-
import "./chunk-
|
|
202
|
+
} from "./chunk-TBL77AUT.js";
|
|
203
|
+
import "./chunk-NYLOYM6N.js";
|
|
204
|
+
import "./chunk-2MKQIFS4.js";
|
|
205
205
|
import {
|
|
206
206
|
LlmCallError,
|
|
207
207
|
LlmClient,
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
paretoChart,
|
|
229
229
|
researchReport,
|
|
230
230
|
summaryTable
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-VLOATJQ2.js";
|
|
232
232
|
import {
|
|
233
233
|
comparePairedArms,
|
|
234
234
|
pairArms,
|
|
@@ -326,8 +326,8 @@ import {
|
|
|
326
326
|
scoreTraceInsightReadiness,
|
|
327
327
|
tokenizeDomainWords,
|
|
328
328
|
traceAnalystOnRunComplete
|
|
329
|
-
} from "./chunk-
|
|
330
|
-
import "./chunk-
|
|
329
|
+
} from "./chunk-EOSZT7PL.js";
|
|
330
|
+
import "./chunk-7ZZMD7UK.js";
|
|
331
331
|
import {
|
|
332
332
|
extractUsage,
|
|
333
333
|
extractUsageFromResponse,
|
|
@@ -401,18 +401,23 @@ import {
|
|
|
401
401
|
assertRunAgentProfileCell,
|
|
402
402
|
buildAgentInterfaceProfileCell,
|
|
403
403
|
buildAgentProfileCell,
|
|
404
|
+
canonicalize,
|
|
405
|
+
evaluateHypothesis,
|
|
404
406
|
groupRunsByAgentProfileCell,
|
|
407
|
+
hashJson,
|
|
405
408
|
isRunRecord,
|
|
406
409
|
modelHasSnapshot,
|
|
407
410
|
parseRunRecordSafe,
|
|
408
411
|
requireAgentProfileCell,
|
|
409
412
|
roundTripRunRecord,
|
|
410
413
|
runTaskScore,
|
|
414
|
+
signManifest,
|
|
411
415
|
toAgentProfileJson,
|
|
412
416
|
validateAgentProfileCell,
|
|
413
417
|
validateRunRecord,
|
|
414
|
-
verifyAgentProfileCell
|
|
415
|
-
|
|
418
|
+
verifyAgentProfileCell,
|
|
419
|
+
verifyManifest
|
|
420
|
+
} from "./chunk-2JX3CFMB.js";
|
|
416
421
|
import {
|
|
417
422
|
FAILURE_CLASSES,
|
|
418
423
|
TRACE_SCHEMA_VERSION,
|
|
@@ -422,13 +427,6 @@ import {
|
|
|
422
427
|
isSandboxSpan,
|
|
423
428
|
isToolSpan
|
|
424
429
|
} from "./chunk-MA6HLL3S.js";
|
|
425
|
-
import {
|
|
426
|
-
canonicalize,
|
|
427
|
-
evaluateHypothesis,
|
|
428
|
-
hashJson,
|
|
429
|
-
signManifest,
|
|
430
|
-
verifyManifest
|
|
431
|
-
} from "./chunk-VSMTAMNK.js";
|
|
432
430
|
import {
|
|
433
431
|
AgentEvalError,
|
|
434
432
|
CaptureIntegrityError,
|
|
@@ -10648,17 +10646,28 @@ function rawPassOf(record) {
|
|
|
10648
10646
|
}
|
|
10649
10647
|
function passOf(record, score, threshold) {
|
|
10650
10648
|
const rawPass = rawPassOf(record);
|
|
10651
|
-
|
|
10652
|
-
|
|
10649
|
+
const hasTaskFailure = record.failureClass !== void 0 && record.failureClass !== "success";
|
|
10650
|
+
if (rawPass !== null) return rawPass && !hasTaskFailure;
|
|
10651
|
+
return score >= threshold && !hasTaskFailure;
|
|
10653
10652
|
}
|
|
10654
|
-
function
|
|
10655
|
-
if (record.
|
|
10653
|
+
function failureOf(record, score, threshold) {
|
|
10654
|
+
if (record.failureClass !== void 0 && record.failureClass !== "success") {
|
|
10655
|
+
return {
|
|
10656
|
+
failureClass: record.failureClass,
|
|
10657
|
+
failureDetail: record.failureMode ?? null
|
|
10658
|
+
};
|
|
10659
|
+
}
|
|
10656
10660
|
const belowThreshold = `quality-below-threshold: ${Math.round(score * 100)}% < ${Math.round(threshold * 100)}%`;
|
|
10657
10661
|
if (rawPassOf(record) === false) {
|
|
10658
|
-
return
|
|
10662
|
+
return {
|
|
10663
|
+
failureClass: "unknown",
|
|
10664
|
+
failureDetail: score < threshold ? belowThreshold : "product-pass-failed"
|
|
10665
|
+
};
|
|
10666
|
+
}
|
|
10667
|
+
if (passOf(record, score, threshold)) {
|
|
10668
|
+
return { failureClass: null, failureDetail: null };
|
|
10659
10669
|
}
|
|
10660
|
-
|
|
10661
|
-
return belowThreshold;
|
|
10670
|
+
return { failureClass: "unknown", failureDetail: belowThreshold };
|
|
10662
10671
|
}
|
|
10663
10672
|
function numericDimensions(record) {
|
|
10664
10673
|
const dimensions = {};
|
|
@@ -10775,6 +10784,7 @@ function runRecordToProductBenchmarkRecord(record, runDir, artifactRoot, artifac
|
|
|
10775
10784
|
const opts = resolveOptions(options);
|
|
10776
10785
|
const runtime = runtimeResolution(record, opts);
|
|
10777
10786
|
const score = scoreOf(record);
|
|
10787
|
+
const failure = failureOf(record, score, opts.passThreshold);
|
|
10778
10788
|
const armId = armIdOf(record);
|
|
10779
10789
|
const inputTokens = record.tokenUsage.input;
|
|
10780
10790
|
const outputTokens = record.tokenUsage.output;
|
|
@@ -10809,7 +10819,7 @@ function runRecordToProductBenchmarkRecord(record, runDir, artifactRoot, artifac
|
|
|
10809
10819
|
pass: passOf(record, score, opts.passThreshold),
|
|
10810
10820
|
score,
|
|
10811
10821
|
dimensions,
|
|
10812
|
-
|
|
10822
|
+
...failure
|
|
10813
10823
|
},
|
|
10814
10824
|
usage: {
|
|
10815
10825
|
inputTokens,
|
|
@@ -11024,6 +11034,13 @@ function expectString(value, path) {
|
|
|
11024
11034
|
fail(path, "must be a non-empty string");
|
|
11025
11035
|
return value;
|
|
11026
11036
|
}
|
|
11037
|
+
function expectFailureClass(value, path) {
|
|
11038
|
+
const parsed = expectString(value, path);
|
|
11039
|
+
if (parsed === "success" || !FAILURE_CLASSES.includes(parsed)) {
|
|
11040
|
+
fail(path, `expected a non-success FailureClass, received ${JSON.stringify(parsed)}`);
|
|
11041
|
+
}
|
|
11042
|
+
return parsed;
|
|
11043
|
+
}
|
|
11027
11044
|
function expectBoolean(value, path) {
|
|
11028
11045
|
if (typeof value !== "boolean") fail(path, "must be a boolean");
|
|
11029
11046
|
return value;
|
|
@@ -11166,6 +11183,18 @@ function validateProductBenchmarkRecord(value) {
|
|
|
11166
11183
|
const usage = expectObject(obj.usage, "record.usage");
|
|
11167
11184
|
const integrity = expectObject(obj.integrity, "record.integrity");
|
|
11168
11185
|
const artifacts = expectObject(obj.artifacts, "record.artifacts");
|
|
11186
|
+
const outcomePass = expectBoolean(outcome.pass, "record.outcome.pass");
|
|
11187
|
+
const failureClass = outcome.failureClass === null ? null : expectFailureClass(outcome.failureClass, "record.outcome.failureClass");
|
|
11188
|
+
const failureDetail = outcome.failureDetail === null ? null : expectString(outcome.failureDetail, "record.outcome.failureDetail");
|
|
11189
|
+
if (outcomePass && (failureClass !== null || failureDetail !== null)) {
|
|
11190
|
+
fail("record.outcome", "a passing row cannot carry failure evidence");
|
|
11191
|
+
}
|
|
11192
|
+
if (!outcomePass && failureClass === null) {
|
|
11193
|
+
fail("record.outcome.failureClass", "a failed row requires a failure class");
|
|
11194
|
+
}
|
|
11195
|
+
if (failureClass === null && failureDetail !== null) {
|
|
11196
|
+
fail("record.outcome.failureDetail", "failure detail requires a failure class");
|
|
11197
|
+
}
|
|
11169
11198
|
const record = {
|
|
11170
11199
|
schemaVersion: 1,
|
|
11171
11200
|
projectId: expectString(obj.projectId, "record.projectId"),
|
|
@@ -11191,10 +11220,11 @@ function validateProductBenchmarkRecord(value) {
|
|
|
11191
11220
|
version: expectString(backend.version, "record.backend.version")
|
|
11192
11221
|
},
|
|
11193
11222
|
outcome: {
|
|
11194
|
-
pass:
|
|
11223
|
+
pass: outcomePass,
|
|
11195
11224
|
score: expectNumber(outcome.score, "record.outcome.score", { min: 0, max: 1 }),
|
|
11196
11225
|
dimensions: expectDimensions(outcome.dimensions, "record.outcome.dimensions"),
|
|
11197
|
-
|
|
11226
|
+
failureClass,
|
|
11227
|
+
failureDetail
|
|
11198
11228
|
},
|
|
11199
11229
|
usage: {
|
|
11200
11230
|
inputTokens: expectNumber(usage.inputTokens, "record.usage.inputTokens", {
|