@tangle-network/agent-eval 0.142.1 → 0.143.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 (59) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +21 -0
  3. package/dist/analyst/index.d.ts +5 -5
  4. package/dist/analyst/index.js +2 -2
  5. package/dist/{benchmark-command-DTyVFMUV.js → benchmark-command-CSddvlq7.js} +5 -5
  6. package/dist/{benchmark-command-DTyVFMUV.js.map → benchmark-command-CSddvlq7.js.map} +1 -1
  7. package/dist/benchmarks/index.d.ts +1 -1
  8. package/dist/benchmarks/index.js +1 -1
  9. package/dist/{benchmarks-Ce8GdJbc.js → benchmarks-Dg0B56tK.js} +4 -4
  10. package/dist/{benchmarks-Ce8GdJbc.js.map → benchmarks-Dg0B56tK.js.map} +1 -1
  11. package/dist/campaign/index.d.ts +3 -3
  12. package/dist/campaign/index.js +3 -3
  13. package/dist/{campaign-COFTVy3Q.js → campaign-C7ZGiZYG.js} +7 -5
  14. package/dist/campaign-C7ZGiZYG.js.map +1 -0
  15. package/dist/cli.js +1 -1
  16. package/dist/{client-BoqGxEqx.d.ts → client-Cgl6KasJ.d.ts} +2 -2
  17. package/dist/{client-BoqGxEqx.d.ts.map → client-Cgl6KasJ.d.ts.map} +1 -1
  18. package/dist/contract/index.d.ts +5 -5
  19. package/dist/contract/index.js +3 -3
  20. package/dist/{default-registry-Ci7wAAR8.d.ts → default-registry-D3uqKbo6.d.ts} +2 -2
  21. package/dist/{default-registry-Ci7wAAR8.d.ts.map → default-registry-D3uqKbo6.d.ts.map} +1 -1
  22. package/dist/{dspy-rlm-engine-Bw8Zz9CX.js → dspy-rlm-engine-CJ4sN8Wx.js} +2 -2
  23. package/dist/{dspy-rlm-engine-Bw8Zz9CX.js.map → dspy-rlm-engine-CJ4sN8Wx.js.map} +1 -1
  24. package/dist/hosted/index.d.ts +2 -2
  25. package/dist/{index-CKI1CXTL.d.ts → index-CaOjqCli.d.ts} +4 -4
  26. package/dist/{index-CKI1CXTL.d.ts.map → index-CaOjqCli.d.ts.map} +1 -1
  27. package/dist/{index-DCP4I2Qx.d.ts → index-DY83M1WL.d.ts} +7 -5
  28. package/dist/{index-DCP4I2Qx.d.ts.map → index-DY83M1WL.d.ts.map} +1 -1
  29. package/dist/index.d.ts +8 -8
  30. package/dist/index.js +4 -4
  31. package/dist/multishot/index.d.ts +1 -1
  32. package/dist/openapi.json +1 -1
  33. package/dist/{replay-BqTgoioO.d.ts → replay-BuJM6kLh.d.ts} +2 -2
  34. package/dist/{replay-BqTgoioO.d.ts.map → replay-BuJM6kLh.d.ts.map} +1 -1
  35. package/dist/{reward-hacking-GyN0kMd8.js → reward-hacking-DjTi9HLb.js} +34 -14
  36. package/dist/reward-hacking-DjTi9HLb.js.map +1 -0
  37. package/dist/rl.d.ts +263 -2
  38. package/dist/rl.d.ts.map +1 -1
  39. package/dist/rl.js +332 -3
  40. package/dist/rl.js.map +1 -1
  41. package/dist/{single-run-lock-BcvPQY57.js → single-run-lock-Do-8vBIJ.js} +2 -2
  42. package/dist/{single-run-lock-BcvPQY57.js.map → single-run-lock-Do-8vBIJ.js.map} +1 -1
  43. package/dist/{skill-usage-CNZTk_LT.d.ts → skill-usage-CRqaHi0R.d.ts} +3 -3
  44. package/dist/{skill-usage-CNZTk_LT.d.ts.map → skill-usage-CRqaHi0R.d.ts.map} +1 -1
  45. package/dist/{skillopt-optimization-method-D1dqGzzH.d.ts → skillopt-optimization-method-CwRvi-rL.d.ts} +21 -5
  46. package/dist/skillopt-optimization-method-CwRvi-rL.d.ts.map +1 -0
  47. package/dist/{skillopt-optimization-method-DV6c4ooy.js → skillopt-optimization-method-Di8Xkalt.js} +153 -50
  48. package/dist/skillopt-optimization-method-Di8Xkalt.js.map +1 -0
  49. package/dist/{tool-groups-DVQTy9lq.d.ts → tool-groups-Bqy4A3QB.d.ts} +2 -2
  50. package/dist/{tool-groups-DVQTy9lq.d.ts.map → tool-groups-Bqy4A3QB.d.ts.map} +1 -1
  51. package/dist/traces.d.ts +2 -2
  52. package/dist/{types-Dk7PB7vh.d.ts → types-KEqL1pZc.d.ts} +6 -4
  53. package/dist/{types-Dk7PB7vh.d.ts.map → types-KEqL1pZc.d.ts.map} +1 -1
  54. package/docs/verified-labels-flywheel.md +46 -0
  55. package/package.json +3 -3
  56. package/dist/campaign-COFTVy3Q.js.map +0 -1
  57. package/dist/reward-hacking-GyN0kMd8.js.map +0 -1
  58. package/dist/skillopt-optimization-method-D1dqGzzH.d.ts.map +0 -1
  59. package/dist/skillopt-optimization-method-DV6c4ooy.js.map +0 -1
@@ -2,7 +2,7 @@ import { c as CostLedgerHandle } from "./cost-ledger-FuQvHxPm.js";
2
2
  import { a as RunRecord } from "./run-record-Tb3TTtUn.js";
3
3
  import { p as EvidenceRef, x as TraceAnalysisStore, y as BoundedTraceAnalysisStoreOptions } from "./types-D3jh6F98.js";
4
4
  import { E as AnalystRegistry, r as CorrectnessChecker } from "./completion-verifier-D15NHYSk.js";
5
- import { S as JudgeConfig } from "./types-Dk7PB7vh.js";
5
+ import { S as JudgeConfig } from "./types-KEqL1pZc.js";
6
6
  import { a as DatasetScenario } from "./dataset-v_Y5902-.js";
7
7
  import "./summary-report-o3eJ3gxG.js";
8
8
  import { o as InsightReport, r as ExecutionInsight, t as CostProvenanceSummary } from "./insight-report-Bh_8ksel.js";
@@ -255,4 +255,4 @@ type TraceToolGroupName =
255
255
  declare function buildTraceToolsForGroup(group: TraceToolGroupName, store: TraceAnalysisStore): TraceAnalysisToolDescriptor[];
256
256
  //#endregion
257
257
  export { summarizeExecution as A, MakeEvalToolsConfig as C, ExecutionReport as D, AnalyzeRunsOptions as E, SummarizeExecutionOptions as O, EvalToolDef as S, toOpenAiTool as T, BuildTraceAnalysisToolsOptions as _, TraceAnalysisEngineRequest as a, buildTraceAnalysisToolDescriptors as b, resolveTraceAnalystLimits as c, RawAnalystEvidence as d, RawAnalystEvidenceSchema as f, parseRawFinding as g, evidenceRefsFromRawFinding as h, TraceAnalysisEngine as i, analyzeRuns as k, ANALYST_SEVERITIES as l, RawAnalystFindingSchema as m, buildTraceToolsForGroup as n, TraceAnalysisEngineResult as o, RawAnalystFinding as p, DEFAULT_TRACE_ANALYST_LIMITS as r, TraceAnalystLimits as s, TraceToolGroupName as t, RAW_FINDING_SCHEMA_PROMPT as u, TRACE_ANALYST_TOOL_NAMESPACE as v, makeEvalTools as w, traceAnalystFunctionGroup as x, TraceAnalysisToolDescriptor as y };
258
- //# sourceMappingURL=tool-groups-DVQTy9lq.d.ts.map
258
+ //# sourceMappingURL=tool-groups-Bqy4A3QB.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-groups-DVQTy9lq.d.ts","names":[],"sources":["../src/contract/analyze-runs.ts","../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts","../src/analyst/tool-groups.ts"],"mappings":";;;;;;;;;;UAoEiB;;EAEf,MAAM;;;EAGN;;;;;EAKA;EACA;;;EAGA,kBAAkB;;;EAGlB,UAAU;;;;EAIV;IACE;IACA,cAAc;;;;;EAKhB,cAAc;IAAQ;IAAe;IAAe;;;EAEpD;;;;EAIA;;;;;;;;;EASA,eAAe;;;EAGf;;UAGe;EACf,MAAM;EACN;;UAGe;EACf,WAAW;EACX,gBAAgB;;;iBAIF,mBAAmB,MAAM,4BAA4B;iBAgB/C,YAAY,MAAM,qBAAqB,QAAQ;;;;UCpHpD;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;UAG7C;;EAEf,SAAS,MAAM;;;;EAIf;IAAe,kBAAkB;;;;EAGjC,UAAU,KAAK;;;iBAID,aAAa,KAAK;EAChC;EACA;IAAY;IAAc;IAAqB,YAAY;;;;;;;;iBAa7C,cAAc,KAAK,sBAAsB;;;cCjD5C;UAEI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;;iBAIJ,kCACd,SAAS,iCACR;iBAkHa,0BAA0B,SAAS;EACjD;EACA;EACA;EACA;EACA,WAAW;;;;cCtIA;cAEA,0BAAwB,EAAA;;;GAK1B,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCtEc;;EAEf;;EAEA;;EAEA;;EAEA;;cAGW,8BAA8B,SAAS;UAOnC;EACf;EACA;EACA;EACA,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ;;iBAGxC,0BACd,QAAQ,QAAQ,kCACf;;;;KC3DS;;;;;;;;;;;;;;;;;;;;iBAgDI,wBACd,OAAO,oBACP,OAAO,qBACN"}
1
+ {"version":3,"file":"tool-groups-Bqy4A3QB.d.ts","names":[],"sources":["../src/contract/analyze-runs.ts","../src/eval-tools.ts","../src/trace-analyst/tools.ts","../src/analyst/finding-signature.ts","../src/analyst/engine.ts","../src/analyst/tool-groups.ts"],"mappings":";;;;;;;;;;UAoEiB;;EAEf,MAAM;;;EAGN;;;;;EAKA;EACA;;;EAGA,kBAAkB;;;EAGlB,UAAU;;;;EAIV;IACE;IACA,cAAc;;;;;EAKhB,cAAc;IAAQ;IAAe;IAAe;;;EAEpD;;;;EAIA;;;;;;;;;EASA,eAAe;;;EAGf;;UAGe;EACf,MAAM;EACN;;UAGe;EACf,WAAW;EACX,gBAAgB;;;iBAIF,mBAAmB,MAAM,4BAA4B;iBAgB/C,YAAY,MAAM,qBAAqB,QAAQ;;;;UCpHpD;EACf;EACA;EACA,YAAY;EACZ,UAAU,eAAe;IAAQ,SAAS;QAAkB;;UAG7C;;EAEf,SAAS,MAAM;;;;EAIf;IAAe,kBAAkB;;;;EAGjC,UAAU,KAAK;;;iBAID,aAAa,KAAK;EAChC;EACA;IAAY;IAAc;IAAqB,YAAY;;;;;;;;iBAa7C,cAAc,KAAK,sBAAsB;;;cCjD5C;UAEI,uCAAuC;EACtD,OAAO;;UAGQ,oCAAoC;EACnD,kBAAkB;;;iBAIJ,kCACd,SAAS,iCACR;iBAkHa,0BAA0B,SAAS;EACjD;EACA;EACA;EACA;EACA,WAAW;;;;cCtIA;cAEA,0BAAwB,EAAA;;;GAK1B,EAAA,KAAA;KAEC,qBAAqB,EAAE,aAAa;cAiBnC,yBAAuB,EAAA;;;;;;;;;;;;;;;;;GAKzB,EAAA,KAAA;KAEC,oBAAoB,EAAE,aAAa;;;;;;cAOlC;;iBAYG,2BAA2B,SAAS,oBAAoB;iBAQxD,gBACd,cACA,OAAO,aAAa,SAAS,mCAC5B;;;;UCtEc;;EAEf;;EAEA;;EAEA;;EAEA;;cAGW,8BAA8B,SAAS;UAOnC;EACf;EACA;EACA;EACA,gBAAgB;EAChB,QAAQ;EACR,YAAY;EACZ;EACA,WAAW;EACX,SAAS;EACT,OAAO,iBAAiB,SAAS;;;UAIlB;EACf;EACA,UAAU;;EAEV;;;;;EAKA;;EAEA;EACA,SAAS;;;;;;;;;UAUM;WACN;WACA;WACA;;WAEA;;;;;;;;WAQA,iBAAiB,SAAS;EACnC,QAAQ,SAAS,6BAA6B,QAAQ;;iBAGxC,0BACd,QAAQ,QAAQ,kCACf;;;;KC3DS;;;;;;;;;;;;;;;;;;;;iBAgDI,wBACd,OAAO,oBACP,OAAO,qBACN"}
package/dist/traces.d.ts CHANGED
@@ -4,9 +4,9 @@ import { _t as RawProviderSink, bt as providerFromBaseUrl, dt as InMemoryRawProv
4
4
  import { a as RunFilter, i as InMemoryTraceStore, n as FileSystemTraceStore, o as SpanFilter, r as FileSystemTraceStoreOptions, s as TraceStore, t as EventFilter } from "./store-CT9YIIve.js";
5
5
  import { a as TraceEmitterOptions, i as TraceEmitter, n as RunCompleteHookContext, o as llmSpanFromProvider, r as SpanHandle, t as RunCompleteHook } from "./emitter-DGQGoLyj.js";
6
6
  import { a as RunIntegrityReport, i as RunIntegrityIssueCode, n as RunIntegrityExpectations, o as assertRunCaptured, r as RunIntegrityIssue, s as throwIfRunIncomplete, t as RunIntegrityError } from "./integrity-DRXobPEs.js";
7
- import { $ as traceAnalystOnRunComplete, A as stringField, At as OtlpSpanRoleInput, B as TraceInsightReadiness, Bt as exportRunAsOtlp, C as ProjectedOtlpSpan, Ct as createOtelTracingStore, D as inferOtlpKind, Dt as OtelExporter, E as firstStringAttr, Et as OtelExportConfig, F as TraceInsightFinding, Ft as traceSpanKindToOpenInferenceKind, G as defaultTraceInsightPanel, H as TraceInsightTask, I as TraceInsightPanelRole, It as OTEL_AGENT_EVAL_SCOPE, J as inferDomainKeywords, K as describeTraceInsightScope, L as TraceInsightPromptInput, Lt as OtlpExport, M as flattenOtlpExportToNdjson, Mt as applyToolSpanOtlpAttributes, N as OtlpFlatLine, Nt as classifyOtlpSpanRole, O as projectOtlpFlatLine, Ot as createOtelExporter, P as TraceInsightContext, Pt as isOtlpModelCall, Q as TraceAnalystHookOptions, R as TraceInsightQualityGate, Rt as OtlpResourceSpans, S as otlpToTraceRunRecords, St as redactValue, T as extractOtlpAttributes, Tt as ExportableSpan, U as buildTraceInsightContext, V as TraceInsightSuite, W as buildTraceInsightPrompt, X as scoreTraceInsightReadiness, Y as planTraceInsightQuestions, Z as tokenizeDomainWords, _ as OtlpTraceRunRecord, _t as DEFAULT_REDACTION_RULES, a as ReplayFetchOptions, at as TraceFileMissingError, b as otlpRowsToTraceRunRecords, bt as RedactionRule, c as ToolTraceMissingError, ct as AnalyzeTracesInput, d as OtlpFileTraceStoreOptions, dt as analyzeTraces, et as SpanNotFoundError, f as ToolSpansToTraceAnalysisStoreOptions, ft as createBoundedTraceAnalysisStore, g as OtlpToRunRecordsOptions, gt as convertTraceStoresToOtlp, h as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, ht as TracesToOtlpResult, i as ReplayCacheStats, it as TraceFileMalformedError, j as FlattenOtlpOptions, jt as ToolSpanOtlpInput, k as readOtlpStatus, kt as OtlpSpanRole, l as toolSpansToTraceAnalysisStore, lt as AnalyzeTracesOptions, m as TRACE_ANALYST_ACTOR_DESCRIPTION, mt as TraceStoreToOtlpOptions, n as ReplayCacheEntry, nt as TraceAnalysisStoreContractError, o as createReplayFetch, ot as TraceFileTooLargeError, p as otlpTextToTraceAnalysisStore, pt as TraceStoreSource, q as domainEvidencePattern, r as ReplayCacheMissError, rt as TraceAnalysisValidationError, s as iterateRawCalls, st as TraceNotFoundError, t as ReplayCache, tt as TraceAnalysisLimitError, u as OtlpFileTraceStore, ut as AnalyzeTracesResult, v as TraceAggregate, vt as REDACTION_VERSION, w as asString, wt as otelRunCompleteHook, x as otlpToRunRecords, xt as redactString, y as otlpRowsToRunRecords, yt as RedactionReport, z as TraceInsightQuestion, zt as OtlpSpan } from "./replay-BqTgoioO.js";
7
+ import { $ as traceAnalystOnRunComplete, A as stringField, At as OtlpSpanRoleInput, B as TraceInsightReadiness, Bt as exportRunAsOtlp, C as ProjectedOtlpSpan, Ct as createOtelTracingStore, D as inferOtlpKind, Dt as OtelExporter, E as firstStringAttr, Et as OtelExportConfig, F as TraceInsightFinding, Ft as traceSpanKindToOpenInferenceKind, G as defaultTraceInsightPanel, H as TraceInsightTask, I as TraceInsightPanelRole, It as OTEL_AGENT_EVAL_SCOPE, J as inferDomainKeywords, K as describeTraceInsightScope, L as TraceInsightPromptInput, Lt as OtlpExport, M as flattenOtlpExportToNdjson, Mt as applyToolSpanOtlpAttributes, N as OtlpFlatLine, Nt as classifyOtlpSpanRole, O as projectOtlpFlatLine, Ot as createOtelExporter, P as TraceInsightContext, Pt as isOtlpModelCall, Q as TraceAnalystHookOptions, R as TraceInsightQualityGate, Rt as OtlpResourceSpans, S as otlpToTraceRunRecords, St as redactValue, T as extractOtlpAttributes, Tt as ExportableSpan, U as buildTraceInsightContext, V as TraceInsightSuite, W as buildTraceInsightPrompt, X as scoreTraceInsightReadiness, Y as planTraceInsightQuestions, Z as tokenizeDomainWords, _ as OtlpTraceRunRecord, _t as DEFAULT_REDACTION_RULES, a as ReplayFetchOptions, at as TraceFileMissingError, b as otlpRowsToTraceRunRecords, bt as RedactionRule, c as ToolTraceMissingError, ct as AnalyzeTracesInput, d as OtlpFileTraceStoreOptions, dt as analyzeTraces, et as SpanNotFoundError, f as ToolSpansToTraceAnalysisStoreOptions, ft as createBoundedTraceAnalysisStore, g as OtlpToRunRecordsOptions, gt as convertTraceStoresToOtlp, h as TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, ht as TracesToOtlpResult, i as ReplayCacheStats, it as TraceFileMalformedError, j as FlattenOtlpOptions, jt as ToolSpanOtlpInput, k as readOtlpStatus, kt as OtlpSpanRole, l as toolSpansToTraceAnalysisStore, lt as AnalyzeTracesOptions, m as TRACE_ANALYST_ACTOR_DESCRIPTION, mt as TraceStoreToOtlpOptions, n as ReplayCacheEntry, nt as TraceAnalysisStoreContractError, o as createReplayFetch, ot as TraceFileTooLargeError, p as otlpTextToTraceAnalysisStore, pt as TraceStoreSource, q as domainEvidencePattern, r as ReplayCacheMissError, rt as TraceAnalysisValidationError, s as iterateRawCalls, st as TraceNotFoundError, t as ReplayCache, tt as TraceAnalysisLimitError, u as OtlpFileTraceStore, ut as AnalyzeTracesResult, v as TraceAggregate, vt as REDACTION_VERSION, w as asString, wt as otelRunCompleteHook, x as otlpToRunRecords, xt as redactString, y as otlpRowsToRunRecords, yt as RedactionReport, z as TraceInsightQuestion, zt as OtlpSpan } from "./replay-BuJM6kLh.js";
8
8
  import { C as TOOL_LATENCY_MS, D as asNumber, E as applyLlmSpanOtlpAttributes, O as contextInputTokens, S as TOOL_ARGS_CAPTURED, T as TOOL_NAME_ATTR_KEYS, _ as LlmSpanOtlpInput, a as LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, b as RUN_COST_ATTR_KEYS, c as LLM_COST_USD, d as LLM_MODEL_ATTR_KEYS, f as LLM_MODEL_NAME, g as LLM_REASONING_TOKEN_ATTR_KEYS, h as LLM_REASONING_TOKENS, i as LLM_CACHE_WRITE_TOKENS, k as firstNumberAttr, l as LLM_INPUT_TOKENS, m as LLM_OUTPUT_TOKEN_ATTR_KEYS, n as LLM_CACHED_TOKENS, o as LLM_CONTEXT_TOKENS, p as LLM_OUTPUT_TOKENS, r as LLM_CACHED_TOKEN_ATTR_KEYS, s as LLM_COST_ATTR_KEYS, t as INPUT_VALUE, u as LLM_INPUT_TOKEN_ATTR_KEYS, v as OPENINFERENCE_SPAN_KIND, w as TOOL_NAME, x as SPAN_KIND_ATTR_KEYS, y as OUTPUT_VALUE } from "./attribute-vocabulary-DLJ6303h.js";
9
9
  import { a as judgeSpans, c as runsForScenario, i as hasCapturedToolArgs, l as toolSpans, n as argHash, o as llmSpans, r as groupBy, s as runFailureClass, t as aggregateLlm } from "./query-CJ_DX8vl.js";
10
10
  import { A as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, C as DEFAULT_TRACE_ANALYST_BUDGETS, D as SearchSpanResult, E as QueryTracesPage, F as TraceAnalystSpanStatus, I as TraceAnalystTraceSummary, L as ViewSpansResult, M as TraceAnalystFilters, N as TraceAnalystSpan, O as SearchTraceResult, P as TraceAnalystSpanKind, R as ViewTraceOversized, S as TraceAnalysisStoreContext, T as ErrorCluster, b as TRACE_ANALYSIS_LIMITS, j as TraceAnalystByteBudgets, k as SpanMatchRecord, w as DatasetOverview, x as TraceAnalysisStore, y as BoundedTraceAnalysisStoreOptions, z as ViewTraceResult } from "./types-D3jh6F98.js";
11
- import { _ as BuildTraceAnalysisToolsOptions, b as buildTraceAnalysisToolDescriptors, v as TRACE_ANALYST_TOOL_NAMESPACE, x as traceAnalystFunctionGroup, y as TraceAnalysisToolDescriptor } from "./tool-groups-DVQTy9lq.js";
11
+ import { _ as BuildTraceAnalysisToolsOptions, b as buildTraceAnalysisToolDescriptors, v as TRACE_ANALYST_TOOL_NAMESPACE, x as traceAnalystFunctionGroup, y as TraceAnalysisToolDescriptor } from "./tool-groups-Bqy4A3QB.js";
12
12
  export { type AnalyzeTracesInput, type AnalyzeTracesOptions, type AnalyzeTracesResult, Artifact, type BoundedTraceAnalysisStoreOptions, BudgetLedgerEntry, BudgetSpec, type BuildTraceAnalysisToolsOptions, CaptureFetchContext, CaptureFetchOptions, DEFAULT_REDACTION_RULES, DEFAULT_TRACE_ANALYST_BUDGETS, type DatasetOverview, type ErrorCluster, EventFilter, EventKind, ExportableSpan, ExtractUsageFromSseOptions, ExtractedUsage, FAILURE_CLASSES, FailureClass, FileSystemRawProviderSink, FileSystemRawProviderSinkOptions, FileSystemTraceStore, FileSystemTraceStoreOptions, type FlattenOtlpOptions, GenericSpan, INPUT_VALUE, InMemoryRawProviderSink, InMemoryRawProviderSinkOptions, InMemoryTraceStore, JudgeSpan, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_CACHE_WRITE_TOKENS, LLM_CACHE_WRITE_TOKEN_ATTR_KEYS, LLM_CONTEXT_TOKENS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, LLM_REASONING_TOKENS, LLM_REASONING_TOKEN_ATTR_KEYS, LlmSpan, LlmSpanOtlpInput, Message, NoopRawProviderSink, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OUTPUT_VALUE, OtelExportConfig, OtelExporter, OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, OtlpResourceSpans, OtlpSpan, OtlpSpanRole, OtlpSpanRoleInput, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, ProviderRedactor, type QueryTracesPage, REDACTION_VERSION, RUN_COST_ATTR_KEYS, RawProviderDirection, RawProviderEvent, RawProviderSink, RawProviderSinkFilter, RedactionReport, RedactionRule, ReplayCache, ReplayCacheEntry, ReplayCacheMissError, ReplayCacheStats, ReplayFetchOptions, RetrievalSpan, Run, RunCompleteHook, RunCompleteHookContext, RunFilter, RunIntegrityError, RunIntegrityExpectations, RunIntegrityIssue, RunIntegrityIssueCode, RunIntegrityReport, RunLayer, RunOutcome, RunStatus, SPAN_KIND_ATTR_KEYS, SandboxSpan, type SearchSpanResult, type SearchTraceResult, Span, SpanBase, SpanFilter, SpanHandle, SpanKind, type SpanMatchRecord, SpanNotFoundError, SpanStatus, SseUsageMode, TOOL_ARGS_CAPTURED, TOOL_LATENCY_MS, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYSIS_LIMITS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_TOOL_NAMESPACE, TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, TRACE_SCHEMA_VERSION, ToolSpan, ToolSpanOtlpInput, type ToolSpansToTraceAnalysisStoreOptions, ToolTraceMissingError, type TraceAggregate, TraceAnalysisLimitError, type TraceAnalysisStore, type TraceAnalysisStoreContext, TraceAnalysisStoreContractError, type TraceAnalysisToolDescriptor, TraceAnalysisValidationError, type TraceAnalystByteBudgets, type TraceAnalystFilters, type TraceAnalystHookOptions, type TraceAnalystSpan, type TraceAnalystSpanKind, type TraceAnalystSpanStatus, type TraceAnalystTraceSummary, TraceEmitter, TraceEmitterOptions, TraceEvent, TraceFileMalformedError, TraceFileMissingError, TraceFileTooLargeError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, TraceStore, TraceStoreSource, TraceStoreToOtlpOptions, TracesToOtlpResult, type ViewSpansResult, type ViewTraceOversized, type ViewTraceResult, aggregateLlm, analyzeTraces, applyLlmSpanOtlpAttributes, applyToolSpanOtlpAttributes, argHash, asNumber, asString, assertRunCaptured, buildTraceAnalysisToolDescriptors, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, classifyOtlpSpanRole, contextInputTokens, convertTraceStoresToOtlp, createBoundedTraceAnalysisStore, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultProviderRedactor, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, groupBy, hasCapturedToolArgs, inferDomainKeywords, inferOtlpKind, isJudgeSpan, isLlmSpan, isOtlpModelCall, isRetrievalSpan, isSandboxSpan, isToolSpan, iterateRawCalls, judgeSpans, llmSpanFromProvider, llmSpans, otelRunCompleteHook, otlpRowsToRunRecords, otlpRowsToTraceRunRecords, otlpTextToTraceAnalysisStore, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, providerFromBaseUrl, readOtlpStatus, redactString, redactValue, runFailureClass, runsForScenario, scoreTraceInsightReadiness, stringField, throwIfRunIncomplete, tokenizeDomainWords, toolSpans, toolSpansToTraceAnalysisStore, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
@@ -1,4 +1,4 @@
1
- import { S as PaidCallResult, T as RunPaidCallInput, a as CostChannel, c as CostLedgerHandle, f as CostLedgerSummary } from "./cost-ledger-FuQvHxPm.js";
1
+ import { S as PaidCallResult, T as RunPaidCallInput, a as CostChannel, c as CostLedgerHandle, f as CostLedgerSummary, p as CostProvenance } from "./cost-ledger-FuQvHxPm.js";
2
2
  import { u as RunTokenUsage } from "./run-record-Tb3TTtUn.js";
3
3
  import { U as LlmCallMetadata } from "./types-BjMFz88h.js";
4
4
  import { m as ProposalFinding } from "./types-D3jh6F98.js";
@@ -480,9 +480,11 @@ interface CampaignCellResult<TArtifact> {
480
480
  generation?: number;
481
481
  artifact: TArtifact;
482
482
  judgeScores: Record<string, JudgeScore>;
483
+ /** Known subtotal in USD. When `costProvenance.kind === 'uncaptured'`, this
484
+ * remains the sum of known receipts and MUST NOT be treated as total spend. */
483
485
  costUsd: number;
484
- /** True when at least one priced receipt used the model table instead of a provider bill. */
485
- costEstimated?: boolean;
486
+ /** Exact origin of the cell's total cost. Unknown cost is never encoded as zero. */
487
+ costProvenance: CostProvenance;
486
488
  /** Exact durable receipts required to reuse this cached result. */
487
489
  costCallIds?: string[];
488
490
  /** Agent-call token usage committed by `ctx.cost.runPaidCall`.
@@ -620,4 +622,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
620
622
  }
621
623
  //#endregion
622
624
  export { LabeledScenarioWrite as A, ScoredSurfaceOutcome as B, JudgeDimension as C, LabeledScenarioSampleArgs as D, LabeledScenarioRecord as E, ProposeContext as F, labelTrustRank as G, SurfaceProposer as H, ProposedCandidate as I, RedactionStatus as L, OptimizerConfig as M, ParetoParent as N, LabeledScenarioSource as O, ProposalTrackContext as P, Scenario as R, JudgeConfig as S, LabelTrust as T, TraceSpan as U, SessionScript as V, isProposedCandidate as W, GateDecision as _, CampaignResult as a, GenerationRecord as b, CampaignTraceWriter as c, DispatchContext as d, DispatchFn as f, GateContribution as g, GateContext as h, CampaignCostMeter as i, MutableSurface as j, LabeledScenarioStore as k, CodeSurface as l, GateCheckStatus as m, CampaignArtifactWriter as n, CampaignScenarioIdentity as o, Gate as p, CampaignCellResult as r, CampaignTokenUsage as s, CampaignAggregates as t, ComponentSurface as u, GateResult as v, JudgeScore as w, JudgeAggregate as x, GenerationCandidate as y, ScenarioAggregate as z };
623
- //# sourceMappingURL=types-Dk7PB7vh.d.ts.map
625
+ //# sourceMappingURL=types-KEqL1pZc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-Dk7PB7vh.d.ts","names":[],"sources":["../src/campaign/types.ts"],"mappings":";;;;;;;UA+BiB;EACf;EACA;EACA;;;;;EAKA;;;UAIe,iCAAiC,KAAK;EACrD;;;;;UAMe;EACf;EACA;EACA;EACA;EACA,QAAQ;EACR,OAAO;EACP,WAAW;EACX,MAAM;;EAEN;;EAEA;;;;;;;;EAQA;;;;KAKU,WAAW,kBAAkB,UAAU,cACjD,UAAU,WACV,KAAK,oBACF,QAAQ;;;;UAOI,cAAc,WAAW;EACxC;EACA;EACA;;EAEA;;;EAGA,sBAAsB,UAAU,WAAW,sBAAsB,UAAU,cAAc;;UAK1E;;EAEf;;EAEA;;;;;;;;;UAUe,YAAY,WAAW,kBAAkB,WAAW;EACnE;EACA,YAAY;;;;EAIZ;;;EAGA,MAAM;IACJ,UAAU;IACV,UAAU;IACV,QAAQ;;IAER,aAAa;IACb;IACA,WAAW;MACT,aAAa,QAAQ;EACzB,aAAa,UAAU;;;;;;;;;;;UAYR;EACf,YAAY;EACZ;EACA;;EAEA,UAAU;;;;EAIV;;;EAGA;;EAEA;;EAEA,WAAW,eAAe;;;;;;;UAUX;WACN;;;WAGA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;WAGA;aACE;aACA;aACA;;;WAGF;;;UAIM;WACN;WACA,YAAY,SAAS;;;;;;;;;;;KAYpB,0BAA0B,mBAAmB;;;;;;;UAQxC;EACf,SAAS;;EAET;;;;EAIA;;;;iBAKc,oBACd,OAAO,iBAAiB,oBACvB,SAAS;;;;;;;;;UAkBK;EACf,SAAS;EACT;;;EAGA,YAAY;;;EAGZ;;EAEA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;;;UAMe;;;EAGf;;EAEA;EACA;EACA;EACA,YAAY;;;;;EAKZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;EAC1E;IACE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U;EACV,UAAU;EACV,aAAa,eAAe;EAC5B,QAAQ;EACR;EACA;EACA,iBAAiB;;;;;EAKjB,aAAa;;EAEb;;UAGe,sBAAsB,kBAAkB,WAAW,UAAU,6BACpE,qBAAqB,WAAW;;EAExC;;;EAGA;;UAGe;EACf;;EAEA;;;;EAIA;EACA;IACE;IACA,SAAS,wBAAwB;IACjC;IACA;;;;;IAKA,WAAW;;;UAIE;EACf,QAAQ,OAAO,uBAAuB;EACtC,OAAO,MAAM,4BAA4B,QAAQ;EACjD,QAAQ;IACN;IACA;IACA,UAAU;;;IAGV,SAAS,OAAO;;;UAMH,mBAAmB;;;EAGlC;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa,eAAe;EAC5B;;EAEA;;EAEA;;;EAGA,YAAY;;;;EAIZ;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA,YAAY;EACZ;;;;;;UAOe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;EAIA;;;;EAIA;IACE;IACA;IACA,iBAAiB;MAAQ;MAAgB;;;;;EAI3C,YAAY;;;;;;;;;;EAUZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;;;EAG1E;;;;EAIA;;UAGe;EACf,SAAS,eAAe;EACxB,YAAY,eAAe;;EAE3B,MAAM;;EAEN;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe,eAAe,qBAAqB,kBAAkB,WAAW;;EAEhF;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA,OAAO,MAAM,mBAAmB;EAChC,YAAY;EACZ;IACE,aAAa;IACb;;EAEF,OAAO;EACP;EACA;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
1
+ {"version":3,"file":"types-KEqL1pZc.d.ts","names":[],"sources":["../src/campaign/types.ts"],"mappings":";;;;;;;UAgCiB;EACf;EACA;EACA;;;;;EAKA;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EAEA;;;;EAIA;EACA;IACE;IACA,SAAS,wBAAwB;IACjC;IACA;;;;;IAKA,WAAW;;;UAIE;EACf,QAAQ,OAAO,uBAAuB;EACtC,OAAO,MAAM,4BAA4B,QAAQ;EACjD,QAAQ;IACN;IACA;IACA,UAAU;;;IAGV,SAAS,OAAO;;;UAMH,mBAAmB;;;EAGlC;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,aAAa,eAAe;;;EAG5B;;EAEA,gBAAgB;;EAEhB;;;EAGA,YAAY;;;;EAIZ;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA,YAAY;EACZ;;;;;;UAOe;EACf;;EAEA;;EAEA;;EAEA;;EAEA;;;EAGA;;;;EAIA;;;;EAIA;IACE;IACA;IACA,iBAAiB;MAAQ;MAAgB;;;;;EAI3C,YAAY;;;;;;;;;;EAUZ,WAAW;IAAQ;IAAoB;IAAmB;IAAgB;;;;EAG1E;;;;EAIA;;UAGe;EACf,SAAS,eAAe;EACxB,YAAY,eAAe;;EAE3B,MAAM;;EAEN;EACA;EACA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe,eAAe,qBAAqB,kBAAkB,WAAW;;EAEhF;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA,OAAO,MAAM,mBAAmB;EAChC,YAAY;EACZ;IACE,aAAa;IACb;;EAEF,OAAO;EACP;EACA;EACA,iBAAiB;;;EAGjB,WAAW,MAAM,2BAA2B,KAAK"}
@@ -0,0 +1,46 @@
1
+ # Verified-labels flywheel — own-traffic replay eligibility (phase-2 spec)
2
+
3
+ Phase 1 shipped the dataset pipeline: `src/rl/verified-findings-dataset.ts` joins replay-verify batch verdicts with gold labels and trajectories into execution-verified RL rows (`agent-eval/verified-finding@0`, see `benchmarks/trace-analysis/verified-dataset-v0/README.md`).
4
+ Those rows came from public benchmark trajectories (mini-SWE / CodeTraceBench).
5
+ The flywheel's real fuel is our own traffic: fleet sessions run inside sandboxes where the image is known.
6
+ This document maps which local session classes are replay-eligible today, which are not and why, and the concrete capture changes that make future sessions eligible.
7
+
8
+ ## What replay eligibility requires
9
+
10
+ Derived from what the run2 replay batch actually consumed (its enumeration excluded 111/133 label entries):
11
+
12
+ 1. **Pinned environment** — a docker image (or digest) the trajectory ran in; `no-docker-image` alone excluded 21 entries.
13
+ 2. **Working directory** — the cwd commands were executed from.
14
+ 3. **Ordered step commands** — the exact action string per step; `no-swe-raw-trajectory` excluded 65 entries.
15
+ 4. **Per-step recorded returncodes** — needed for prefix-divergence checking (the replay batch aborts when >10% of prefix steps diverge from recorded returncodes).
16
+ 5. **A verifiable target step** — a finding/label on a *command* step (submit-only golds excluded 21 entries; findings on prose are not executable).
17
+
18
+ ## Local session stores surveyed (2026-08-03, this host)
19
+
20
+ | store | volume | environment (req 1–2) | steps (req 3) | returncodes (req 4) | eligible today |
21
+ | --- | --- | --- | --- | --- | --- |
22
+ | Claude Code transcripts `~/.claude/projects` | 474 projects, 7,579 session JSONLs, 4.6 GB | no image; `cwd` + `gitBranch` + harness `version` per message | yes — full tool calls + results | **no** — Bash `toolUseResult` records `stdout`/`stderr`/`interrupted` only, no exit code field | no (host env unpinned, no rc) |
23
+ | Codex sessions `~/.codex/sessions` | 4,332 rollout files, 113 GB | no image; `session_meta` has `cwd` + git `commit_hash`/`branch`/`repository_url` + `cli_version` | yes | shell events carry exit codes in payloads (format varies by version) | no (host env unpinned) |
24
+ | traces CLI normalized envelope (`~/code/traces`, 18 harness adapters: claude, codex, amp, gemini, opencode, pi, copilot, factory, forge, qwen, …) | imports the two stores above | `cwd` filter exists; **no image/sandbox field in the envelope** | yes | adapter-dependent | no — the schema itself cannot express environment identity |
25
+ | Sandbox sessions (agent-dev-container `PersistedSession`) | remote fleet; none stored on this host | runtime knows the image — `runtime.ready` event carries `image?` + `sandboxId` + backend — but `PersistedSession` persists only `workspaceRoot` + free-form `metadata`; `image?` is optional even on the event | yes (message store) | via tool parts, not normalized | **almost** — the image is in hand at runtime and dropped at persistence time |
26
+ | mini-SWE / CodeTraceBench benchmark trajectories (`~/bench-cache/ctb-20260801`) | 133 labeled, 22 replayable | yes — `mswebench/*` images + cwd | yes | yes — `<returncode>N</returncode>` in every observation | **yes — the only eligible class; run2 proved 16/22 reproduce** |
27
+
28
+ Conclusion: today only benchmark-imported trajectories are replay-eligible.
29
+ Our own sessions fail on environment pinning (all classes) and returncode capture (Claude Code).
30
+ The sandbox class is one persistence field away from eligibility — the runtime already knows the image.
31
+
32
+ ## Phase-2 capture changes (ranked by unlock per line of code)
33
+
34
+ 1. **Persist the sandbox image at session start** (agent-dev-container): copy `runtime.ready`'s `image` (as a digest, not a tag) + `sandboxId` into `PersistedSession` as first-class fields, and make `image` required on the event.
35
+ This single change makes every future fleet sandbox session satisfy requirements 1–2 — the highest-leverage line in the flywheel.
36
+ 2. **Add environment identity to the traces envelope** (traces repo): an optional `environment: { image?, imageDigest?, cwd, gitCommit? }` block on the normalized session, populated by adapters where known.
37
+ Without it, eligible sandbox sessions lose their eligibility at import time.
38
+ 3. **Record exit codes in Claude Code tool results**: the harness owns `toolUseResult`; until it carries `exitCode`, replay divergence checking cannot run on Claude transcripts even inside a pinned sandbox.
39
+ Workaround for sandboxed Claude sessions: derive returncodes from the sandbox's own command journal instead of the transcript.
40
+ 4. **Emit a replay descriptor per session** (the join target this package consumes): `{ image, cwd, steps: [{action, returncode}], findings: [{stepId, claim}] }` — exactly the shape `loadVerifiedFindingsDataset` joins today, so phase-3 needs no new pipeline code.
41
+
42
+ ## Why this matters
43
+
44
+ Run2 measured: 72.7% of eligible trajectories reproduce their recorded failure at the gold step, and 81.8% of generated fixes flip it.
45
+ Execution-verified labels at fleet scale are training data that cannot be bought — AgenTracer-8B showed +18pp from a specialist localizer trained on *unverified* labels; ours carry executed proof per row.
46
+ Every capture change above turns a session class from "readable" into "verifiable", and the phase-1 pipeline converts verifiable sessions into dataset rows with zero new code.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.142.1",
3
+ "version": "0.143.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": {
@@ -168,8 +168,8 @@
168
168
  "dependencies": {
169
169
  "@asteasolutions/zod-to-openapi": "^9.1.0",
170
170
  "@hono/node-server": "^2.0.12",
171
- "@tangle-network/agent-core": "0.4.32",
172
- "@tangle-network/agent-interface": "0.42.1",
171
+ "@tangle-network/agent-core": "0.4.33",
172
+ "@tangle-network/agent-interface": "0.43.0",
173
173
  "@tangle-network/agent-trace-contract": "^1.0.2",
174
174
  "hono": "^4.12.32",
175
175
  "linear-sum-assignment": "1.0.9",