@tangle-network/agent-eval 0.170.0 → 0.172.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +3 -0
  3. package/dist/adapters/http.d.ts +2 -2
  4. package/dist/analyst/index.d.ts +5 -5
  5. package/dist/analyst/index.js +2 -2
  6. package/dist/{experiment-tracker-Dm8yQMqb.d.ts → attestation-CJBGmMVh.d.ts} +78 -2
  7. package/dist/attestation-CJBGmMVh.d.ts.map +1 -0
  8. package/dist/{experiment-tracker-BKEumQug.js → attestation-XSUpbc4o.js} +96 -2
  9. package/dist/attestation-XSUpbc4o.js.map +1 -0
  10. package/dist/{benchmark-command-BA7qOdWw.js → benchmark-command-DoFcisuM.js} +2 -2
  11. package/dist/{benchmark-command-BA7qOdWw.js.map → benchmark-command-DoFcisuM.js.map} +1 -1
  12. package/dist/benchmarks/index.d.ts +4 -4
  13. package/dist/benchmarks/index.js +2 -2
  14. package/dist/bounded-process-CVOC_D3H.js +181 -0
  15. package/dist/bounded-process-CVOC_D3H.js.map +1 -0
  16. package/dist/builder-eval/index.js +39 -98
  17. package/dist/builder-eval/index.js.map +1 -1
  18. package/dist/campaign/index.d.ts +8 -7
  19. package/dist/campaign/index.js +4 -4
  20. package/dist/{campaign-BeCbxFqs.js → campaign-Dp35pBbS.js} +4 -4
  21. package/dist/{campaign-BeCbxFqs.js.map → campaign-Dp35pBbS.js.map} +1 -1
  22. package/dist/canonical-CFpojCN5.d.ts +31 -0
  23. package/dist/canonical-CFpojCN5.d.ts.map +1 -0
  24. package/dist/{chat-client-DEtybj5i.js → chat-client-DI79OPye.js} +2 -2
  25. package/dist/{chat-client-DEtybj5i.js.map → chat-client-DI79OPye.js.map} +1 -1
  26. package/dist/cli.js +1 -1
  27. package/dist/{client-_Fsa5c2_.d.ts → client-Df7wdslk.d.ts} +2 -2
  28. package/dist/{client-_Fsa5c2_.d.ts.map → client-Df7wdslk.d.ts.map} +1 -1
  29. package/dist/contract/index.d.ts +9 -9
  30. package/dist/contract/index.js +4 -4
  31. package/dist/{default-registry-ovxrOP0_.d.ts → default-registry-XxedTLwu.d.ts} +3 -3
  32. package/dist/{default-registry-ovxrOP0_.d.ts.map → default-registry-XxedTLwu.d.ts.map} +1 -1
  33. package/dist/{define-agent-eval-DVJm8Xlh.d.ts → define-agent-eval-0wW7gFhr.d.ts} +4 -4
  34. package/dist/{define-agent-eval-DVJm8Xlh.d.ts.map → define-agent-eval-0wW7gFhr.d.ts.map} +1 -1
  35. package/dist/{define-agent-eval-Clj-8igZ.js → define-agent-eval-jS8xj_Q_.js} +2 -2
  36. package/dist/{define-agent-eval-Clj-8igZ.js.map → define-agent-eval-jS8xj_Q_.js.map} +1 -1
  37. package/dist/descriptive-B2iPaT9J.d.ts +89 -0
  38. package/dist/descriptive-B2iPaT9J.d.ts.map +1 -0
  39. package/dist/{engine-D12Rb6WB.d.ts → engine-BfRay1qD.d.ts} +2 -2
  40. package/dist/{engine-D12Rb6WB.d.ts.map → engine-BfRay1qD.d.ts.map} +1 -1
  41. package/dist/experiment/index.d.ts +3 -54
  42. package/dist/experiment/index.d.ts.map +1 -1
  43. package/dist/experiment/index.js +1 -95
  44. package/dist/experiment/index.js.map +1 -1
  45. package/dist/{heldout-gate-Bn7_xWCv.d.ts → heldout-gate-JgNRDZwZ.d.ts} +3 -3
  46. package/dist/{heldout-gate-Bn7_xWCv.d.ts.map → heldout-gate-JgNRDZwZ.d.ts.map} +1 -1
  47. package/dist/hosted/index.d.ts +1 -1
  48. package/dist/{index-lfaSeKSD.d.ts → index-D-UdhAmg.d.ts} +3 -31
  49. package/dist/index-D-UdhAmg.d.ts.map +1 -0
  50. package/dist/{index-CM-SM00y.d.ts → index-DDAPhUJJ.d.ts} +4 -4
  51. package/dist/{index-CM-SM00y.d.ts.map → index-DDAPhUJJ.d.ts.map} +1 -1
  52. package/dist/{index-Bfs5aufo.d.ts → index-DnglhM0A.d.ts} +9 -9
  53. package/dist/{index-Bfs5aufo.d.ts.map → index-DnglhM0A.d.ts.map} +1 -1
  54. package/dist/{index-DBbivBNs.d.ts → index-_vPrVMRX.d.ts} +6 -6
  55. package/dist/{index-DBbivBNs.d.ts.map → index-_vPrVMRX.d.ts.map} +1 -1
  56. package/dist/index.d.ts +245 -15
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +712 -9
  59. package/dist/index.js.map +1 -1
  60. package/dist/{integrity-CyWSSoQS.js → integrity-BWywb34E.js} +34 -11
  61. package/dist/{integrity-CyWSSoQS.js.map → integrity-BWywb34E.js.map} +1 -1
  62. package/dist/ledger-core/index.d.ts +2 -1
  63. package/dist/{llm-judge-DbJdo8Nj.js → llm-judge-aQHIk5_-.js} +20 -11
  64. package/dist/llm-judge-aQHIk5_-.js.map +1 -0
  65. package/dist/{matrix-BpI5Trmo.d.ts → matrix-Ch8JO1pG.d.ts} +2 -2
  66. package/dist/{matrix-BpI5Trmo.d.ts.map → matrix-Ch8JO1pG.d.ts.map} +1 -1
  67. package/dist/meta-eval/index.d.ts +162 -2
  68. package/dist/meta-eval/index.d.ts.map +1 -1
  69. package/dist/meta-eval/index.js +287 -2
  70. package/dist/meta-eval/index.js.map +1 -1
  71. package/dist/multishot/golden/index.d.ts +1 -1
  72. package/dist/multishot/index.d.ts +2 -2
  73. package/dist/openapi.json +1 -1
  74. package/dist/{produced-state-CtSIp5cQ.js → produced-state-CxmbFxFd.js} +2 -2
  75. package/dist/{produced-state-CtSIp5cQ.js.map → produced-state-CxmbFxFd.js.map} +1 -1
  76. package/dist/{promotion-policy-CkXSgKkF.d.ts → promotion-policy-BBBcz5_3.d.ts} +2 -2
  77. package/dist/{promotion-policy-CkXSgKkF.d.ts.map → promotion-policy-BBBcz5_3.d.ts.map} +1 -1
  78. package/dist/{provenance-CIRUardl.d.ts → provenance-Dp-vvyrU.d.ts} +17 -5
  79. package/dist/provenance-Dp-vvyrU.d.ts.map +1 -0
  80. package/dist/rl.d.ts +1 -1
  81. package/dist/sandbox-harness-BlSOu4LX.d.ts.map +1 -1
  82. package/dist/{skillopt-optimization-method-B2R9C5aG.js → skillopt-optimization-method-LHi02MzH.js} +2 -2
  83. package/dist/{skillopt-optimization-method-B2R9C5aG.js.map → skillopt-optimization-method-LHi02MzH.js.map} +1 -1
  84. package/dist/{statistical-heldout-DFS7QGpS.d.ts → statistical-heldout-Yldkntvy.d.ts} +2 -2
  85. package/dist/{statistical-heldout-DFS7QGpS.d.ts.map → statistical-heldout-Yldkntvy.d.ts.map} +1 -1
  86. package/dist/{store-tool-spans-B2DJ_82T.d.ts → store-tool-spans-BvdUbeOB.d.ts} +3 -3
  87. package/dist/{store-tool-spans-B2DJ_82T.d.ts.map → store-tool-spans-BvdUbeOB.d.ts.map} +1 -1
  88. package/dist/supervisor-run/index.d.ts +35 -2
  89. package/dist/supervisor-run/index.d.ts.map +1 -1
  90. package/dist/supervisor-run/index.js +83 -38
  91. package/dist/supervisor-run/index.js.map +1 -1
  92. package/dist/{tool-groups-BnXlCJZQ.d.ts → tool-groups-DjwlMBvW.d.ts} +2 -2
  93. package/dist/tool-groups-DjwlMBvW.d.ts.map +1 -0
  94. package/dist/trace-repair/index.d.ts +1 -1
  95. package/dist/traces.d.ts +2 -2
  96. package/dist/{types-i21ccEkr.d.ts → types-CCZ34qmV.d.ts} +2 -2
  97. package/dist/{types-i21ccEkr.d.ts.map → types-CCZ34qmV.d.ts.map} +1 -1
  98. package/dist/{types-DeIUdzNd.d.ts → types-CoPUTiXb.d.ts} +23 -92
  99. package/dist/types-CoPUTiXb.d.ts.map +1 -0
  100. package/dist/{types-Dy237wiH.d.ts → types-nokrtr7M.d.ts} +21 -1
  101. package/dist/types-nokrtr7M.d.ts.map +1 -0
  102. package/dist/wire/index.d.ts +3 -3
  103. package/dist/wire/index.d.ts.map +1 -1
  104. package/docs/campaign-proposers.md +4 -0
  105. package/docs/eval-surface-map.md +36 -0
  106. package/docs/insight-report.md +19 -0
  107. package/docs/plants.md +123 -0
  108. package/docs/public-api.md +45 -20
  109. package/package.json +19 -18
  110. package/dist/experiment-tracker-BKEumQug.js.map +0 -1
  111. package/dist/experiment-tracker-Dm8yQMqb.d.ts.map +0 -1
  112. package/dist/index-lfaSeKSD.d.ts.map +0 -1
  113. package/dist/llm-judge-DbJdo8Nj.js.map +0 -1
  114. package/dist/provenance-CIRUardl.d.ts.map +0 -1
  115. package/dist/tool-groups-BnXlCJZQ.d.ts.map +0 -1
  116. package/dist/types-DeIUdzNd.d.ts.map +0 -1
  117. package/dist/types-Dy237wiH.d.ts.map +0 -1
@@ -1,2 +1,3 @@
1
- import { A as jsonDocument, C as withLedgerFileLock, D as LedgerHash, E as LedgerCanonicalizationError, F as AtomicFileLockOwner, I as AtomicFileLockUnavailable, L as probeAtomicFileLock, M as AtomicFileLockAcquisition, N as AtomicFileLockError, O as canonicalString, P as AtomicFileLockOptions, R as tryAcquireAtomicFileLock, S as tryWithLedgerFileLock, T as LEDGER_HASH_PATTERN, _ as trustedHeadPathFor, a as LedgerChainFields, b as LedgerFileContext, c as LedgerJournalCodec, d as LedgerReplayResult, f as LedgerAnchoredEntry, g as readTrustedHeadFile, h as LedgerTrustedHeadSubject, i as LedgerAppendResult, j as AtomicFileLock, k as hashCanonical, l as LedgerLineContext, m as LedgerTrustedHeadRemoval, n as FileLedgerJournalOptions, o as LedgerEntryOf, p as LedgerTrustedHead, r as LedgerAppendOptions, s as LedgerEventBase, t as FileLedgerJournal, u as LedgerProjector, v as verifyEntriesAgainstTrustedHead, w as writeLedgerFileAtomically, x as appendLedgerLine, y as FileLockResult } from "../index-lfaSeKSD.js";
1
+ import { A as AtomicFileLockUnavailable, C as withLedgerFileLock, D as AtomicFileLockError, E as AtomicFileLockAcquisition, M as tryAcquireAtomicFileLock, O as AtomicFileLockOptions, S as tryWithLedgerFileLock, T as AtomicFileLock, _ as trustedHeadPathFor, a as LedgerChainFields, b as LedgerFileContext, c as LedgerJournalCodec, d as LedgerReplayResult, f as LedgerAnchoredEntry, g as readTrustedHeadFile, h as LedgerTrustedHeadSubject, i as LedgerAppendResult, j as probeAtomicFileLock, k as AtomicFileLockOwner, l as LedgerLineContext, m as LedgerTrustedHeadRemoval, n as FileLedgerJournalOptions, o as LedgerEntryOf, p as LedgerTrustedHead, r as LedgerAppendOptions, s as LedgerEventBase, t as FileLedgerJournal, u as LedgerProjector, v as verifyEntriesAgainstTrustedHead, w as writeLedgerFileAtomically, x as appendLedgerLine, y as FileLockResult } from "../index-D-UdhAmg.js";
2
+ import { a as hashCanonical, i as canonicalString, n as LedgerCanonicalizationError, o as jsonDocument, r as LedgerHash, t as LEDGER_HASH_PATTERN } from "../canonical-CFpojCN5.js";
2
3
  export { type AtomicFileLock, type AtomicFileLockAcquisition, AtomicFileLockError, type AtomicFileLockOptions, type AtomicFileLockOwner, type AtomicFileLockUnavailable, FileLedgerJournal, type FileLedgerJournalOptions, type FileLockResult, LEDGER_HASH_PATTERN, type LedgerAnchoredEntry, type LedgerAppendOptions, type LedgerAppendResult, LedgerCanonicalizationError, type LedgerChainFields, type LedgerEntryOf, type LedgerEventBase, type LedgerFileContext, type LedgerHash, type LedgerJournalCodec, type LedgerLineContext, type LedgerProjector, type LedgerReplayResult, type LedgerTrustedHead, type LedgerTrustedHeadRemoval, type LedgerTrustedHeadSubject, appendLedgerLine, canonicalString, hashCanonical, jsonDocument, probeAtomicFileLock, readTrustedHeadFile, trustedHeadPathFor, tryAcquireAtomicFileLock, tryWithLedgerFileLock, verifyEntriesAgainstTrustedHead, withLedgerFileLock, writeLedgerFileAtomically };
@@ -1,6 +1,6 @@
1
1
  import { i as JudgeError, s as ValidationError, t as AgentEvalError } from "./errors-Dngq5h35.js";
2
2
  import { a as hashCanonical, i as compareCodeUnits, r as canonicalString } from "./canonical-DPyQ_rpt.js";
3
- import { s as weightedComposite, t as confidenceInterval } from "./descriptive-1V17A-qa.js";
3
+ import { o as summarizeNumberSeries, s as weightedComposite, t as confidenceInterval } from "./descriptive-1V17A-qa.js";
4
4
  import { r as pairedBootstrap } from "./paired-tests-C8iCsioC.js";
5
5
  import { i as modelHasSnapshot } from "./run-record-DLORoL7t.js";
6
6
  import { n as contentHash } from "./verdict-cache-B3eCVQtY.js";
@@ -83,7 +83,8 @@ function computeAggregates(cells, judges, seed, cost) {
83
83
  byScenario[scenarioId] = {
84
84
  meanComposite: ag.mean,
85
85
  ci95: ag.ci95,
86
- n: ag.n
86
+ n: ag.n,
87
+ distribution: ag.distribution
87
88
  };
88
89
  }
89
90
  const dispatchFailures = cells.filter((cell) => cell.errorStage === "dispatch");
@@ -107,8 +108,9 @@ function computeAggregates(cells, judges, seed, cost) {
107
108
  };
108
109
  }
109
110
  function aggregate(samples, seed) {
110
- const n = samples.length;
111
- if (n === 0) throw new Error("aggregate requires at least one finite score");
111
+ const distribution = summarizeNumberSeries(samples);
112
+ if (distribution === null) throw new Error("aggregate requires at least one finite score");
113
+ const n = distribution.n;
112
114
  const mean = samples.reduce((a, b) => a + b, 0) / n;
113
115
  const variance = samples.reduce((a, b) => a + (b - mean) ** 2, 0) / Math.max(1, n - 1);
114
116
  const stdev = Math.sqrt(variance);
@@ -120,7 +122,8 @@ function aggregate(samples, seed) {
120
122
  mean,
121
123
  stdev,
122
124
  ci95: [ci.lower, ci.upper],
123
- n
125
+ n,
126
+ distribution
124
127
  };
125
128
  }
126
129
  //#endregion
@@ -3826,9 +3829,12 @@ function renderPrBody(result, gate, diff) {
3826
3829
  lines.push("");
3827
3830
  lines.push("### By-judge aggregates");
3828
3831
  lines.push("");
3829
- lines.push("| judge | mean | ci95 | n |");
3830
- lines.push("|---|---|---|---|");
3831
- for (const [name, agg] of Object.entries(result.aggregates.byJudge)) lines.push(`| ${name} | ${agg.mean.toFixed(3)} | [${agg.ci95[0].toFixed(3)}, ${agg.ci95[1].toFixed(3)}] | ${agg.n} |`);
3832
+ lines.push("| judge | mean | ci95 | min | p50 | p90 | max | n |");
3833
+ lines.push("|---|---|---|---|---|---|---|---|");
3834
+ for (const [name, agg] of Object.entries(result.aggregates.byJudge)) {
3835
+ const d = agg.distribution;
3836
+ lines.push(`| ${name} | ${agg.mean.toFixed(3)} | [${agg.ci95[0].toFixed(3)}, ${agg.ci95[1].toFixed(3)}] | ${d.min.toFixed(3)} | ${d.p50.toFixed(3)} | ${d.p90.toFixed(3)} | ${d.max.toFixed(3)} | ${agg.n} |`);
3837
+ }
3832
3838
  return lines.join("\n");
3833
3839
  }
3834
3840
  function defaultGhExec(args) {
@@ -4906,7 +4912,7 @@ async function runOptimization(opts) {
4906
4912
  ...label ? { label } : {}
4907
4913
  }))
4908
4914
  });
4909
- const surfaceResults = await mapConcurrent(candidates, candidateConcurrency, async ({ surface, label, rationale }, i, signal) => {
4915
+ const surfaceResults = await mapConcurrent(candidates, candidateConcurrency, async ({ surface, label, rationale, attribution }, i, signal) => {
4910
4916
  const hash = surfaceHash(surface);
4911
4917
  const campaign = await runCampaign({
4912
4918
  ...opts,
@@ -4925,6 +4931,7 @@ async function runOptimization(opts) {
4925
4931
  surface,
4926
4932
  label,
4927
4933
  rationale,
4934
+ ...attribution ? { attribution } : {},
4928
4935
  campaign,
4929
4936
  composite,
4930
4937
  rankKey,
@@ -4988,6 +4995,7 @@ async function runOptimization(opts) {
4988
4995
  };
4989
4996
  if (s.label) candidate.label = s.label;
4990
4997
  if (s.rationale) candidate.rationale = s.rationale;
4998
+ if (s.attribution) candidate.attribution = s.attribution;
4991
4999
  return candidate;
4992
5000
  }),
4993
5001
  promoted: promoted.map((p) => p.surfaceHash)
@@ -5424,6 +5432,7 @@ function buildLoopProvenanceRecord(args) {
5424
5432
  };
5425
5433
  if (c.label) entry.label = c.label;
5426
5434
  if (c.rationale) entry.rationale = c.rationale;
5435
+ if (c.attribution) entry.attribution = c.attribution;
5427
5436
  if (c.observedDeltaFromParent !== void 0) entry.observedDeltaFromParent = c.observedDeltaFromParent;
5428
5437
  candidates.push(entry);
5429
5438
  }
@@ -6251,6 +6260,6 @@ function firstString(value) {
6251
6260
  return typeof value === "string" && value.trim() ? value : void 0;
6252
6261
  }
6253
6262
  //#endregion
6254
- export { redTeamDataset as $, optimizationTokenUsageFromSummary as A, createSearchHistoryReceipt as B, paretoFrontier as C, combineComparisonCosts as D, assertOptimizationResult as E, surfaceContentHash as F, compareRankKeys as G, verifySearchHistoryReceipt as H, surfaceHash as I, recoverTruncatedJson as J, buildReflectionPrompt as K, SearchHistoryRequiredError as L, codeSurfaceIdentityMaterial as M, componentSurfaceIdentityMaterial as N, compareOptimizationMethods as O, renderSurfaceDiff as P, DEFAULT_RED_TEAM_CORPUS as Q, assertCompleteSearchHistory as R, dominates as S, openAutoPr as T, campaignBreakdown as U, searchHistoryCoverageRow as V, campaignMeanComposite as W, readGepaCandidatePopulationArtifact as X, assertGepaCandidatePopulationSummary as Y, defaultProductionGate as Z, runOptimization as _, cellCachePath as _t, aggregateRunScore as a, planCampaignRun as at, SearchRecorder as b, campaignMeasurementDigest as c, BackendIntegrityError as ct, loopProvenanceArgsFromResult as d, assertCampaignDesign as dt, redTeamReport as et, loopProvenanceSpans as f, assertCampaignSplitIdentity as ft, runImprovementLoop as g, readCachedCell as gt, verifyLoopProvenanceRecord as h, campaignSplitDigestFromIdentities as ht, transientDispatchFailure as i, runCampaign as it, assertCodeSurfaceIdentity as j, costFromLedgerSummary as k, canonicalDigest as l, assertRealBackend as lt, provenanceSpansPath as m, campaignSplitDigest as mt, JudgeParseError as n, runCanaries as nt, clamp01 as o, resolveRunDir as ot, provenanceRecordPath as p, campaignScenarioIdentity as pt, parseReflectionResponse as q, isTransientTransportFailure as r, runEval as rt, buildLoopProvenanceRecord as s, tangleTracesRoot as st, llmJudge as t, scoreRedTeamOutput as tt, emitLoopProvenance as u, summarizeBackendIntegrity as ut, isProposedCandidate as v, computeManifestHash as vt, paretoFrontierWithCrowding as w, recordCandidatePopulationSearch as x, labelTrustRank as y, assertSearchHistoryMatchesReplay as z };
6263
+ export { redTeamDataset as $, optimizationTokenUsageFromSummary as A, createSearchHistoryReceipt as B, paretoFrontier as C, combineComparisonCosts as D, assertOptimizationResult as E, surfaceContentHash as F, compareRankKeys as G, verifySearchHistoryReceipt as H, surfaceHash as I, recoverTruncatedJson as J, buildReflectionPrompt as K, SearchHistoryRequiredError as L, codeSurfaceIdentityMaterial as M, componentSurfaceIdentityMaterial as N, compareOptimizationMethods as O, renderSurfaceDiff as P, DEFAULT_RED_TEAM_CORPUS as Q, assertCompleteSearchHistory as R, dominates as S, openAutoPr as T, campaignBreakdown as U, searchHistoryCoverageRow as V, campaignMeanComposite as W, readGepaCandidatePopulationArtifact as X, assertGepaCandidatePopulationSummary as Y, defaultProductionGate as Z, runOptimization as _, buildCellSchedule as _t, aggregateRunScore as a, planCampaignRun as at, SearchRecorder as b, campaignMeasurementDigest as c, BackendIntegrityError as ct, loopProvenanceArgsFromResult as d, assertCampaignDesign as dt, redTeamReport as et, loopProvenanceSpans as f, assertCampaignSplitIdentity as ft, runImprovementLoop as g, readCachedCell as gt, verifyLoopProvenanceRecord as h, campaignSplitDigestFromIdentities as ht, transientDispatchFailure as i, runCampaign as it, assertCodeSurfaceIdentity as j, costFromLedgerSummary as k, canonicalDigest as l, assertRealBackend as lt, provenanceSpansPath as m, campaignSplitDigest as mt, JudgeParseError as n, runCanaries as nt, clamp01 as o, resolveRunDir as ot, provenanceRecordPath as p, campaignScenarioIdentity as pt, parseReflectionResponse as q, isTransientTransportFailure as r, runEval as rt, buildLoopProvenanceRecord as s, tangleTracesRoot as st, llmJudge as t, scoreRedTeamOutput as tt, emitLoopProvenance as u, summarizeBackendIntegrity as ut, isProposedCandidate as v, cellCachePath as vt, paretoFrontierWithCrowding as w, recordCandidatePopulationSearch as x, labelTrustRank as y, computeManifestHash as yt, assertSearchHistoryMatchesReplay as z };
6255
6264
 
6256
- //# sourceMappingURL=llm-judge-DbJdo8Nj.js.map
6265
+ //# sourceMappingURL=llm-judge-aQHIk5_-.js.map