@tangle-network/agent-eval 0.123.8 → 0.125.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 (61) hide show
  1. package/CHANGELOG.md +29 -4
  2. package/dist/analyst/index.d.ts +5 -0
  3. package/dist/analyst/index.js +4 -4
  4. package/dist/benchmarks/index.js +4 -4
  5. package/dist/campaign/index.d.ts +20 -1
  6. package/dist/campaign/index.js +4 -4
  7. package/dist/{chunk-ZU3QWGZE.js → chunk-A62YMFWA.js} +89 -8
  8. package/dist/chunk-A62YMFWA.js.map +1 -0
  9. package/dist/{chunk-BUR5R4R4.js → chunk-A6GT67HT.js} +3 -3
  10. package/dist/{chunk-EEHHBAWH.js → chunk-DT7OXY3C.js} +2 -2
  11. package/dist/{chunk-PDHIOKRE.js → chunk-EQUK3RFS.js} +8 -4
  12. package/dist/chunk-EQUK3RFS.js.map +1 -0
  13. package/dist/{chunk-V7HQGZBT.js → chunk-GID26AN4.js} +2 -2
  14. package/dist/{chunk-27UXRPIQ.js → chunk-HM6V7F3M.js} +2 -2
  15. package/dist/chunk-IPYXE555.js +594 -0
  16. package/dist/chunk-IPYXE555.js.map +1 -0
  17. package/dist/chunk-LKKT3IVV.js +1644 -0
  18. package/dist/chunk-LKKT3IVV.js.map +1 -0
  19. package/dist/chunk-M7AH34KV.js +155 -0
  20. package/dist/chunk-M7AH34KV.js.map +1 -0
  21. package/dist/chunk-MAX3TN3C.js +249 -0
  22. package/dist/chunk-MAX3TN3C.js.map +1 -0
  23. package/dist/{chunk-QVGVJQMR.js → chunk-PMITBABE.js} +7 -5
  24. package/dist/{chunk-QVGVJQMR.js.map → chunk-PMITBABE.js.map} +1 -1
  25. package/dist/{chunk-J3LHTAAB.js → chunk-QOTFXW5L.js} +1 -47
  26. package/dist/chunk-QOTFXW5L.js.map +1 -0
  27. package/dist/chunk-RZTMDUO7.js +49 -0
  28. package/dist/chunk-RZTMDUO7.js.map +1 -0
  29. package/dist/chunk-VBQ3CRKH.js +291 -0
  30. package/dist/chunk-VBQ3CRKH.js.map +1 -0
  31. package/dist/{chunk-RQ5TP2TV.js → chunk-W5B3ZGP3.js} +3 -3
  32. package/dist/cli.js +13 -2
  33. package/dist/cli.js.map +1 -1
  34. package/dist/contract/index.d.ts +7 -0
  35. package/dist/contract/index.js +4 -4
  36. package/dist/index.d.ts +833 -82
  37. package/dist/index.js +61 -121
  38. package/dist/index.js.map +1 -1
  39. package/dist/openapi.json +1 -1
  40. package/dist/pipelines/index.js +4 -2
  41. package/dist/pipelines/index.js.map +1 -1
  42. package/dist/rl.d.ts +3 -0
  43. package/dist/rl.js +2 -2
  44. package/dist/rollout/index.d.ts +1061 -0
  45. package/dist/rollout/index.js +109 -0
  46. package/dist/rollout/index.js.map +1 -0
  47. package/dist/supervisor-run/index.d.ts +857 -0
  48. package/dist/supervisor-run/index.js +64 -0
  49. package/dist/supervisor-run/index.js.map +1 -0
  50. package/dist/wire/index.d.ts +3 -0
  51. package/dist/wire/index.js +2 -2
  52. package/docs/rollout.md +48 -0
  53. package/package.json +11 -1
  54. package/dist/chunk-J3LHTAAB.js.map +0 -1
  55. package/dist/chunk-PDHIOKRE.js.map +0 -1
  56. package/dist/chunk-ZU3QWGZE.js.map +0 -1
  57. /package/dist/{chunk-BUR5R4R4.js.map → chunk-A6GT67HT.js.map} +0 -0
  58. /package/dist/{chunk-EEHHBAWH.js.map → chunk-DT7OXY3C.js.map} +0 -0
  59. /package/dist/{chunk-V7HQGZBT.js.map → chunk-GID26AN4.js.map} +0 -0
  60. /package/dist/{chunk-27UXRPIQ.js.map → chunk-HM6V7F3M.js.map} +0 -0
  61. /package/dist/{chunk-RQ5TP2TV.js.map → chunk-W5B3ZGP3.js.map} +0 -0
package/dist/index.js CHANGED
@@ -10,6 +10,38 @@ import {
10
10
  checkCanaries,
11
11
  runBehavioralCanaries
12
12
  } from "./chunk-SJT4OBVL.js";
13
+ import {
14
+ mintRolloutRows,
15
+ rolloutReward
16
+ } from "./chunk-M7AH34KV.js";
17
+ import {
18
+ SUPERVISOR_RUN_SCHEMA,
19
+ analyzeSupervisorRun,
20
+ analyzeSupervisorRunSources,
21
+ claudeCodeSupervisorRunReader,
22
+ isUnavailable,
23
+ readClaudeCodeSupervisorRun,
24
+ renderSupervisorRunHeadline,
25
+ renderSupervisorRunMarkdown,
26
+ rollupSupervisorRuns,
27
+ showMeasured,
28
+ supervisorRunRolloutLines,
29
+ writeSupervisorRunReport
30
+ } from "./chunk-LKKT3IVV.js";
31
+ import "./chunk-VBQ3CRKH.js";
32
+ import {
33
+ toJsonl,
34
+ toRewardRows,
35
+ toSftRows
36
+ } from "./chunk-IPYXE555.js";
37
+ import {
38
+ ROLLOUT_FORMAT,
39
+ ROLLOUT_SCHEMA,
40
+ assertRolloutLine,
41
+ isRolloutLine,
42
+ isTrainableSplit,
43
+ validateRolloutLine
44
+ } from "./chunk-MAX3TN3C.js";
13
45
  import {
14
46
  BENCHMARK_SPLIT_SEED,
15
47
  benchmarks_exports,
@@ -17,13 +49,15 @@ import {
17
49
  } from "./chunk-JKDNAOF5.js";
18
50
  import {
19
51
  DEFAULT_RULES,
20
- buildTrajectory,
21
52
  classifyFailure,
22
53
  compareToBaseline,
23
54
  computeToolUseMetrics,
24
55
  iqr,
25
56
  welchsTTest
26
- } from "./chunk-J3LHTAAB.js";
57
+ } from "./chunk-QOTFXW5L.js";
58
+ import {
59
+ buildTrajectory
60
+ } from "./chunk-RZTMDUO7.js";
27
61
  import {
28
62
  analyzeSeries
29
63
  } from "./chunk-BOD4O7OF.js";
@@ -53,7 +87,7 @@ import {
53
87
  pairArms,
54
88
  parseCorrectnessResponse,
55
89
  verifyCompletion
56
- } from "./chunk-ZU3QWGZE.js";
90
+ } from "./chunk-A62YMFWA.js";
57
91
  import {
58
92
  DEFAULT_MUTATION_PRIMITIVES,
59
93
  DEFAULT_RED_TEAM_CORPUS,
@@ -91,7 +125,7 @@ import {
91
125
  scoreRedTeamOutput,
92
126
  surfaceContentHash,
93
127
  toolNamesForRun
94
- } from "./chunk-QVGVJQMR.js";
128
+ } from "./chunk-PMITBABE.js";
95
129
  import {
96
130
  BackendIntegrityError,
97
131
  assertRealAgentReceipts,
@@ -116,12 +150,12 @@ import {
116
150
  defaultIsMaterial,
117
151
  diffFindings,
118
152
  runSemanticConceptJudge
119
- } from "./chunk-RQ5TP2TV.js";
153
+ } from "./chunk-W5B3ZGP3.js";
120
154
  import {
121
155
  buildDefaultAnalystRegistry,
122
156
  computeTraceMetrics,
123
157
  createChatClient
124
- } from "./chunk-BUR5R4R4.js";
158
+ } from "./chunk-A6GT67HT.js";
125
159
  import "./chunk-HHWE3POT.js";
126
160
  import {
127
161
  AnalystRegistry,
@@ -156,7 +190,7 @@ import {
156
190
  scorePolicyEditReadiness,
157
191
  validatePolicyEdit,
158
192
  validatePolicyEditCandidateRecord
159
- } from "./chunk-EEHHBAWH.js";
193
+ } from "./chunk-DT7OXY3C.js";
160
194
  import {
161
195
  allCriticalPassed,
162
196
  controlFailureClassFromVerification,
@@ -187,7 +221,7 @@ import {
187
221
  } from "./chunk-MOXWMGPC.js";
188
222
  import {
189
223
  runEvalCampaign
190
- } from "./chunk-V7HQGZBT.js";
224
+ } from "./chunk-GID26AN4.js";
191
225
  import "./chunk-ARU2PZFM.js";
192
226
  import {
193
227
  LlmCallError,
@@ -204,7 +238,7 @@ import {
204
238
  maximumChargeForLlmRequest,
205
239
  probeLlm,
206
240
  stripFencedJson
207
- } from "./chunk-PDHIOKRE.js";
241
+ } from "./chunk-EQUK3RFS.js";
208
242
  import {
209
243
  evaluateInterimReleaseConfidence,
210
244
  pairedEvalueSequence
@@ -3204,117 +3238,6 @@ function printDriverSummary(results) {
3204
3238
  console.log(`${completedCount}/${results.length} personas completed`);
3205
3239
  }
3206
3240
 
3207
- // src/rollout-export.ts
3208
- var ROLLOUT_FORMAT = "tangle.rollout.v1";
3209
- var asText = (v, scrub) => {
3210
- const s = typeof v === "string" ? v : JSON.stringify(v);
3211
- return scrub(s ?? "");
3212
- };
3213
- function projectStep(span, scrub) {
3214
- const base = {
3215
- kind: span.kind,
3216
- name: scrub(span.name),
3217
- status: span.status,
3218
- durationMs: span.endedAt !== void 0 ? span.endedAt - span.startedAt : void 0
3219
- };
3220
- if (span.kind === "llm") {
3221
- const llm = span;
3222
- const last = llm.messages[llm.messages.length - 1];
3223
- if (last) base.input = scrub(last.content);
3224
- if (llm.output !== void 0) base.output = scrub(llm.output);
3225
- } else if (span.kind === "tool") {
3226
- const tool = span;
3227
- base.input = asText(tool.args, scrub);
3228
- if (tool.result !== void 0) base.output = asText(tool.result, scrub);
3229
- }
3230
- return base;
3231
- }
3232
- function scrubMessages(messages, scrub) {
3233
- return messages.map((m) => ({ ...m, content: scrub(m.content) }));
3234
- }
3235
- function finalConversation(spans, scrub) {
3236
- const llms = spans.filter((s) => s.kind === "llm");
3237
- const last = llms[llms.length - 1];
3238
- if (!last) return [];
3239
- const messages = scrubMessages(last.messages, scrub);
3240
- if (last.output !== void 0 && last.output !== "") {
3241
- messages.push({ role: "assistant", content: scrub(last.output) });
3242
- }
3243
- return messages;
3244
- }
3245
- function rolloutReward(record) {
3246
- const gated = record.outcome.realness?.gated === true;
3247
- const raw = record.outcome.holdoutScore ?? record.outcome.searchScore ?? 0;
3248
- return { reward: gated ? 0 : raw, gated };
3249
- }
3250
- async function mintRolloutRows(records, store, options = {}) {
3251
- const scrub = options.scrub ?? ((t) => t);
3252
- const rows = [];
3253
- const missingTraces = [];
3254
- for (const record of records) {
3255
- const trajectory = await buildTrajectory(store, record.runId);
3256
- if (trajectory.steps.length === 0) {
3257
- missingTraces.push(record.runId);
3258
- continue;
3259
- }
3260
- let steps = trajectory.steps.map((s) => projectStep(s.span, scrub));
3261
- if (options.maxSteps !== void 0 && steps.length > options.maxSteps) {
3262
- const head = Math.ceil(options.maxSteps / 2);
3263
- const tail = options.maxSteps - head;
3264
- steps = [...steps.slice(0, head), ...steps.slice(steps.length - tail)];
3265
- }
3266
- const { reward, gated } = rolloutReward(record);
3267
- rows.push({
3268
- format: ROLLOUT_FORMAT,
3269
- runId: record.runId,
3270
- experimentId: record.experimentId,
3271
- candidateId: record.candidateId,
3272
- scenarioId: record.scenarioId,
3273
- splitTag: record.splitTag,
3274
- model: record.model,
3275
- agentProfileCellId: record.agentProfile?.cellId,
3276
- reward,
3277
- realnessGated: gated,
3278
- costUsd: record.costUsd,
3279
- totalTokens: record.tokenUsage.input + record.tokenUsage.output,
3280
- steps,
3281
- conversation: finalConversation(
3282
- trajectory.steps.map((s) => s.span),
3283
- scrub
3284
- )
3285
- });
3286
- }
3287
- return { rows, missingTraces };
3288
- }
3289
- function toSftRows(rows, options = {}) {
3290
- const minReward = options.minReward ?? 1;
3291
- return rows.filter((r) => r.reward >= minReward && !r.realnessGated && r.conversation.length > 0).map((r) => ({
3292
- messages: r.conversation,
3293
- metadata: {
3294
- runId: r.runId,
3295
- candidateId: r.candidateId,
3296
- scenarioId: r.scenarioId,
3297
- reward: r.reward
3298
- }
3299
- }));
3300
- }
3301
- function toRewardRows(rows) {
3302
- return rows.map((r) => ({
3303
- prompt: r.conversation.find((m) => m.role === "user")?.content ?? "",
3304
- steps: r.steps,
3305
- reward: r.reward,
3306
- metadata: {
3307
- runId: r.runId,
3308
- candidateId: r.candidateId,
3309
- scenarioId: r.scenarioId,
3310
- splitTag: r.splitTag
3311
- }
3312
- }));
3313
- }
3314
- function toJsonl(rows) {
3315
- return rows.map((r) => JSON.stringify(r)).join("\n") + (rows.length ? "\n" : "");
3316
- }
3317
-
3318
3241
  // src/treatment-gate.ts
3319
3242
  function gateTreatmentApplied(input, opts = {}) {
3320
3243
  const failOpen = opts.failOpenWhenNoTelemetry ?? true;
@@ -11757,6 +11680,7 @@ export {
11757
11680
  REFERENCE_EQUIVALENCE_JUDGE_VERSION,
11758
11681
  RESEARCH_REPORT_HARD_PAIR_FLOOR,
11759
11682
  ROLLOUT_FORMAT,
11683
+ ROLLOUT_SCHEMA,
11760
11684
  RUN_COST_ATTR_KEYS,
11761
11685
  ReplayCache,
11762
11686
  ReplayCacheMissError,
@@ -11767,6 +11691,7 @@ export {
11767
11691
  SEMANTIC_CONCEPT_JUDGE_VERSION,
11768
11692
  SKILL_USAGE_ANALYST,
11769
11693
  SPAN_KIND_ATTR_KEYS,
11694
+ SUPERVISOR_RUN_SCHEMA,
11770
11695
  SandboxHarness,
11771
11696
  ScenarioRegistry,
11772
11697
  SeatUnsetError,
@@ -11808,6 +11733,8 @@ export {
11808
11733
  allCriticalPassed,
11809
11734
  analyzeAntiSlop,
11810
11735
  analyzeSeries,
11736
+ analyzeSupervisorRun,
11737
+ analyzeSupervisorRunSources,
11811
11738
  analyzeTraces,
11812
11739
  appendScorecard,
11813
11740
  applyLlmSpanOtlpAttributes,
@@ -11825,6 +11752,7 @@ export {
11825
11752
  assertRealAgentReceipts,
11826
11753
  assertRealBackend,
11827
11754
  assertReleaseConfidence,
11755
+ assertRolloutLine,
11828
11756
  assertRunAgentProfileCell,
11829
11757
  assertRunCaptured,
11830
11758
  assertSingleBackend,
@@ -11874,6 +11802,7 @@ export {
11874
11802
  clamp01,
11875
11803
  classifyFailure,
11876
11804
  classifyTreatment,
11805
+ claudeCodeSupervisorRunReader,
11877
11806
  cliffsDelta,
11878
11807
  clusteredPairedBinary,
11879
11808
  codeExecutionJudge,
@@ -12041,10 +11970,13 @@ export {
12041
11970
  isOtelConfigured,
12042
11971
  isPolicyEdit,
12043
11972
  isRetrievalSpan,
11973
+ isRolloutLine,
12044
11974
  isRunRecord,
12045
11975
  isSandboxSpan,
12046
11976
  isToolSpan,
11977
+ isTrainableSplit,
12047
11978
  isTransientLlmError,
11979
+ isUnavailable,
12048
11980
  iterateRawCalls,
12049
11981
  jestTestParser,
12050
11982
  jsonHasKeys,
@@ -12141,6 +12073,7 @@ export {
12141
12073
  providerFromBaseUrl,
12142
12074
  pytestTestParser,
12143
12075
  ranks,
12076
+ readClaudeCodeSupervisorRun,
12144
12077
  readOtlpStatus,
12145
12078
  readProductBenchmarkManifest,
12146
12079
  readProductBenchmarkRecords,
@@ -12160,6 +12093,8 @@ export {
12160
12093
  renderPriorFindings,
12161
12094
  renderReleaseReport,
12162
12095
  renderSteeringText,
12096
+ renderSupervisorRunHeadline,
12097
+ renderSupervisorRunMarkdown,
12163
12098
  renderUpstreamFindings,
12164
12099
  repeatedActionDetector,
12165
12100
  replayFeedbackTrajectories,
@@ -12173,6 +12108,7 @@ export {
12173
12108
  resolveRunCostProvenance,
12174
12109
  resolveSeat,
12175
12110
  rolloutReward,
12111
+ rollupSupervisorRuns,
12176
12112
  roundTripRunRecord,
12177
12113
  routeFields,
12178
12114
  rowCount,
@@ -12220,6 +12156,7 @@ export {
12220
12156
  selfPreference,
12221
12157
  sentenceReorderMutator,
12222
12158
  serializeFeedbackTrajectoriesJsonl,
12159
+ showMeasured,
12223
12160
  signManifest,
12224
12161
  spearmanR,
12225
12162
  splitGold,
@@ -12235,6 +12172,7 @@ export {
12235
12172
  summarizePrReviewBenchmark,
12236
12173
  summarizePreferenceMemory,
12237
12174
  summaryTable,
12175
+ supervisorRunRolloutLines,
12238
12176
  testJudge,
12239
12177
  textInSnapshot,
12240
12178
  throwIfRunIncomplete,
@@ -12264,6 +12202,7 @@ export {
12264
12202
  validateProductBenchmarkManifest,
12265
12203
  validateProductBenchmarkRecord,
12266
12204
  validateProductBenchmarkRun,
12205
+ validateRolloutLine,
12267
12206
  validateRunRecord,
12268
12207
  verbosityBias,
12269
12208
  verifyAgentProfileCell,
@@ -12284,6 +12223,7 @@ export {
12284
12223
  withHeldoutBlend,
12285
12224
  withJudgeRetry,
12286
12225
  withOtelPipeline,
12287
- wranglerDeployRunner
12226
+ wranglerDeployRunner,
12227
+ writeSupervisorRunReport
12288
12228
  };
12289
12229
  //# sourceMappingURL=index.js.map