@tangle-network/agent-eval 0.102.1 → 0.103.1

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 (115) hide show
  1. package/dist/adapters/http.d.ts +2 -2
  2. package/dist/adapters/langchain.d.ts +2 -2
  3. package/dist/adapters/otel.d.ts +5 -5
  4. package/dist/analyst/index.d.ts +9 -9
  5. package/dist/analyst/index.js +3 -3
  6. package/dist/{analyze-runs-Cd-A_K4l.d.ts → analyze-runs-rF2eGxZ_.d.ts} +3 -3
  7. package/dist/belief-state/index.d.ts +3 -3
  8. package/dist/belief-state/index.js +1 -1
  9. package/dist/benchmarks/index.d.ts +2 -2
  10. package/dist/builder-eval/index.js +2 -2
  11. package/dist/campaign/index.d.ts +43 -16
  12. package/dist/campaign/index.js +9 -9
  13. package/dist/campaign/index.js.map +1 -1
  14. package/dist/{chunk-Z3FLN24V.js → chunk-2B4HPFXN.js} +104 -43
  15. package/dist/chunk-2B4HPFXN.js.map +1 -0
  16. package/dist/{chunk-7RBJANJD.js → chunk-3722PKPB.js} +2 -2
  17. package/dist/{chunk-YLKDN7JV.js → chunk-66T25VWE.js} +5 -5
  18. package/dist/chunk-66T25VWE.js.map +1 -0
  19. package/dist/{chunk-6FIAJHCU.js → chunk-6YVAN6R3.js} +4 -4
  20. package/dist/{chunk-ABOIVNXL.js → chunk-AGYDMORK.js} +1 -1
  21. package/dist/chunk-AGYDMORK.js.map +1 -0
  22. package/dist/{chunk-B2TMQM62.js → chunk-BHCFJGL4.js} +2 -2
  23. package/dist/{chunk-IH7LYRHL.js → chunk-BXZVBX3D.js} +3 -3
  24. package/dist/{chunk-6GT4NI4V.js → chunk-CLS3374R.js} +2 -2
  25. package/dist/{chunk-HRGUJTER.js → chunk-HYGRFL7C.js} +1 -1
  26. package/dist/{chunk-HRGUJTER.js.map → chunk-HYGRFL7C.js.map} +1 -1
  27. package/dist/{chunk-2NSLDY4B.js → chunk-J5MUFXEY.js} +2 -2
  28. package/dist/{chunk-UFSG7ACU.js → chunk-JZXGWLK5.js} +1 -1
  29. package/dist/chunk-JZXGWLK5.js.map +1 -0
  30. package/dist/{chunk-IN3SHQML.js → chunk-LMSQ6EFA.js} +2 -2
  31. package/dist/{chunk-AIGWQEME.js → chunk-LOZOZYHU.js} +2 -2
  32. package/dist/{chunk-NF7OZ4J7.js → chunk-QCBB6ZIU.js} +2 -2
  33. package/dist/chunk-RQNOLV3I.js +855 -0
  34. package/dist/chunk-RQNOLV3I.js.map +1 -0
  35. package/dist/{chunk-JU6ZX3CX.js → chunk-SMCACT4Z.js} +2 -2
  36. package/dist/{chunk-6Q2DYRWV.js → chunk-TCPP4Z5Q.js} +5 -5
  37. package/dist/{chunk-VDGPPGE3.js → chunk-UMEAR2FI.js} +2 -2
  38. package/dist/{chunk-VDGPPGE3.js.map → chunk-UMEAR2FI.js.map} +1 -1
  39. package/dist/{chunk-QIT2XZ4E.js → chunk-VNM52AGA.js} +3 -3
  40. package/dist/chunk-VNM52AGA.js.map +1 -0
  41. package/dist/{chunk-CMJSTXUR.js → chunk-YFYIOSNV.js} +107 -20
  42. package/dist/chunk-YFYIOSNV.js.map +1 -0
  43. package/dist/{code-agent-session-Ce-9u7YM.d.ts → code-agent-session-Cen-qD2y.d.ts} +1 -1
  44. package/dist/contract/index.d.ts +18 -18
  45. package/dist/contract/index.js +10 -10
  46. package/dist/{control-C8RmK9H4.d.ts → control-KofK3gfG.d.ts} +1 -1
  47. package/dist/control.d.ts +2 -2
  48. package/dist/control.js +3 -3
  49. package/dist/{corpus-CiSzzLa5.d.ts → corpus-CysLCiK4.d.ts} +1 -1
  50. package/dist/{default-registry-ZhqsTr4K.d.ts → default-registry-Ez4cxuZ4.d.ts} +2 -2
  51. package/dist/diagnose.d.ts +3 -3
  52. package/dist/diagnose.js +3 -3
  53. package/dist/{gepa-DeyPTlvx.d.ts → gepa-COlCAkHN.d.ts} +22 -1
  54. package/dist/governance/index.d.ts +1 -1
  55. package/dist/hosted/index.d.ts +5 -5
  56. package/dist/{index-B-bFgiAF.d.ts → index-unCSYRJJ.d.ts} +1 -1
  57. package/dist/index.d.ts +36 -28
  58. package/dist/index.js +32 -18
  59. package/dist/index.js.map +1 -1
  60. package/dist/{insight-report-k0sRTzKg.d.ts → insight-report-DumCfEur.d.ts} +2 -2
  61. package/dist/{judge-calibration-0p2QcWNE.d.ts → judge-calibration-7C-IDmKr.d.ts} +3 -0
  62. package/dist/{kind-factory-D0nk7AKV.d.ts → kind-factory-BLHxwX71.d.ts} +1 -1
  63. package/dist/meta-eval/index.d.ts +4 -4
  64. package/dist/meta-eval/index.js +3 -3
  65. package/dist/{multi-layer-verifier-DUZXrPDA.d.ts → multi-layer-verifier-CI4jdX-q.d.ts} +3 -0
  66. package/dist/multishot/index.d.ts +2 -2
  67. package/dist/openapi.json +1 -1
  68. package/dist/pipelines/index.d.ts +1 -1
  69. package/dist/pipelines/index.js +3 -3
  70. package/dist/{policy-edit-BDQzzsBU.d.ts → policy-edit-nUhuFtLF.d.ts} +2 -2
  71. package/dist/{pre-registration-Dzg61IQA.d.ts → pre-registration-CUOSGAZK.d.ts} +45 -12
  72. package/dist/product-benchmark/index.d.ts +104 -1
  73. package/dist/product-benchmark/index.js +15 -1
  74. package/dist/{provenance-BhJm32vN.d.ts → provenance-B2VsP0jP.d.ts} +20 -4
  75. package/dist/{query-B7GGjRox.d.ts → query-0aTmbmQe.d.ts} +1 -0
  76. package/dist/{release-report-BQ1Ziyu-.d.ts → release-report-DkaCZ9k4.d.ts} +5 -2
  77. package/dist/reporting.d.ts +6 -6
  78. package/dist/reporting.js +4 -4
  79. package/dist/{researcher-B_ODTAJs.d.ts → researcher-SDAezfML.d.ts} +2 -2
  80. package/dist/rl.d.ts +9 -9
  81. package/dist/rl.js +7 -7
  82. package/dist/{rubric-predictive-validity-0MdjTt8R.d.ts → rubric-predictive-validity-ZGIlJNce.d.ts} +1 -1
  83. package/dist/{run-campaign-3NWW5PLF.js → run-campaign-DAHKO5CT.js} +3 -3
  84. package/dist/{run-record-MRdJ-Kq2.d.ts → run-record-CPfd1ARZ.d.ts} +3 -0
  85. package/dist/{runtime-trajectory-8w0_jmtR.d.ts → runtime-trajectory-DZ8ei-Jo.d.ts} +1 -1
  86. package/dist/{semantic-concept-judge-D-IlH5v1.d.ts → semantic-concept-judge-C6mDEBIo.d.ts} +3 -3
  87. package/dist/{statistics-xP-cWc5k.d.ts → statistics-D88peojY.d.ts} +1 -1
  88. package/dist/{summary-report-C0nnxOD8.d.ts → summary-report-Fc_YFJat.d.ts} +1 -1
  89. package/dist/traces.d.ts +2 -2
  90. package/dist/traces.js +4 -4
  91. package/dist/{types-DFI_Z-ZL.d.ts → types-Bihq6-a3.d.ts} +1 -1
  92. package/dist/{types-Dz9cKF0g.d.ts → types-DA9yj-Jd.d.ts} +1 -1
  93. package/dist/workflow/index.d.ts +7 -7
  94. package/dist/workflow/index.js +3 -3
  95. package/package.json +1 -1
  96. package/dist/chunk-63MBSQTX.js +0 -350
  97. package/dist/chunk-63MBSQTX.js.map +0 -1
  98. package/dist/chunk-ABOIVNXL.js.map +0 -1
  99. package/dist/chunk-CMJSTXUR.js.map +0 -1
  100. package/dist/chunk-QIT2XZ4E.js.map +0 -1
  101. package/dist/chunk-UFSG7ACU.js.map +0 -1
  102. package/dist/chunk-YLKDN7JV.js.map +0 -1
  103. package/dist/chunk-Z3FLN24V.js.map +0 -1
  104. /package/dist/{chunk-7RBJANJD.js.map → chunk-3722PKPB.js.map} +0 -0
  105. /package/dist/{chunk-6FIAJHCU.js.map → chunk-6YVAN6R3.js.map} +0 -0
  106. /package/dist/{chunk-B2TMQM62.js.map → chunk-BHCFJGL4.js.map} +0 -0
  107. /package/dist/{chunk-IH7LYRHL.js.map → chunk-BXZVBX3D.js.map} +0 -0
  108. /package/dist/{chunk-6GT4NI4V.js.map → chunk-CLS3374R.js.map} +0 -0
  109. /package/dist/{chunk-2NSLDY4B.js.map → chunk-J5MUFXEY.js.map} +0 -0
  110. /package/dist/{chunk-IN3SHQML.js.map → chunk-LMSQ6EFA.js.map} +0 -0
  111. /package/dist/{chunk-AIGWQEME.js.map → chunk-LOZOZYHU.js.map} +0 -0
  112. /package/dist/{chunk-NF7OZ4J7.js.map → chunk-QCBB6ZIU.js.map} +0 -0
  113. /package/dist/{chunk-JU6ZX3CX.js.map → chunk-SMCACT4Z.js.map} +0 -0
  114. /package/dist/{chunk-6Q2DYRWV.js.map → chunk-TCPP4Z5Q.js.map} +0 -0
  115. /package/dist/{run-campaign-3NWW5PLF.js.map → run-campaign-DAHKO5CT.js.map} +0 -0
package/dist/rl.js CHANGED
@@ -9,26 +9,26 @@ import {
9
9
  extractVerifiableReward,
10
10
  extractVerifiableRewardsFromRecords,
11
11
  filterDeterministicallyRewarded
12
- } from "./chunk-AIGWQEME.js";
12
+ } from "./chunk-LOZOZYHU.js";
13
13
  import {
14
14
  FileSystemOutcomeStore,
15
15
  InMemoryOutcomeStore
16
16
  } from "./chunk-3RF76KTD.js";
17
17
  import {
18
18
  runEvalCampaign
19
- } from "./chunk-6FIAJHCU.js";
19
+ } from "./chunk-6YVAN6R3.js";
20
20
  import "./chunk-CWNP4DV4.js";
21
21
  import {
22
22
  rubricPredictiveValidity
23
- } from "./chunk-NF7OZ4J7.js";
23
+ } from "./chunk-QCBB6ZIU.js";
24
24
  import {
25
25
  evaluateInterimReleaseConfidence
26
26
  } from "./chunk-MAZ26DC7.js";
27
- import "./chunk-6GT4NI4V.js";
27
+ import "./chunk-CLS3374R.js";
28
28
  import {
29
29
  benjaminiHochberg,
30
30
  wilcoxonSignedRank
31
- } from "./chunk-HRGUJTER.js";
31
+ } from "./chunk-HYGRFL7C.js";
32
32
  import {
33
33
  observationsFromRunRecords,
34
34
  thompsonCurriculum,
@@ -36,9 +36,9 @@ import {
36
36
  } from "./chunk-VZSRQ272.js";
37
37
  import "./chunk-SBCB6VZY.js";
38
38
  import "./chunk-PC4UYEBM.js";
39
- import "./chunk-2NSLDY4B.js";
39
+ import "./chunk-J5MUFXEY.js";
40
40
  import "./chunk-TVVP3ZZQ.js";
41
- import "./chunk-ABOIVNXL.js";
41
+ import "./chunk-AGYDMORK.js";
42
42
  import "./chunk-VSMTAMNK.js";
43
43
  import {
44
44
  ValidationError
@@ -1,4 +1,4 @@
1
- import { R as RunRecord } from './run-record-MRdJ-Kq2.js';
1
+ import { R as RunRecord } from './run-record-CPfd1ARZ.js';
2
2
  import { b as OutcomeStore } from './outcome-store-rnXLEqSn.js';
3
3
 
4
4
  /**
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  planCampaignRun,
3
3
  runCampaign
4
- } from "./chunk-QIT2XZ4E.js";
5
- import "./chunk-HRGUJTER.js";
4
+ } from "./chunk-VNM52AGA.js";
5
+ import "./chunk-HYGRFL7C.js";
6
6
  import "./chunk-3BFEG2F6.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
9
9
  planCampaignRun,
10
10
  runCampaign
11
11
  };
12
- //# sourceMappingURL=run-campaign-3NWW5PLF.js.map
12
+ //# sourceMappingURL=run-campaign-DAHKO5CT.js.map
@@ -49,6 +49,9 @@ declare class AgentProfileCellValidationError extends ValidationError {
49
49
  }
50
50
  declare function buildAgentProfileCell(input: AgentProfileCellInput): Promise<AgentProfileCell>;
51
51
  declare function agentProfileCellHashMaterial(cell: AgentProfileCell): Omit<AgentProfileCell, 'cellId'>;
52
+ /**
53
+ * Verify an `AgentProfileCell`'s `cellId` matches the sha256 of its hash-material fields, confirming the record has not been tampered with.
54
+ */
52
55
  declare function verifyAgentProfileCell(cell: AgentProfileCell): Promise<boolean>;
53
56
  declare function validateAgentProfileCell(input: unknown): AgentProfileCell;
54
57
  declare function requireAgentProfileCell(record: {
@@ -1,4 +1,4 @@
1
- import { b as RunSplitTag } from './run-record-MRdJ-Kq2.js';
1
+ import { b as RunSplitTag } from './run-record-CPfd1ARZ.js';
2
2
 
3
3
  interface RuntimeTrajectoryHookEvent {
4
4
  id: string;
@@ -1,10 +1,10 @@
1
1
  import { AxAIService } from '@ax-llm/ax';
2
2
  import { z } from 'zod';
3
- import { A as AnalystFinding, a as Analyst, b as AnalystContext } from './types-Dz9cKF0g.js';
4
- import { T as TraceAnalystKindSpec } from './kind-factory-D0nk7AKV.js';
3
+ import { A as AnalystFinding, a as Analyst, b as AnalystContext } from './types-DA9yj-Jd.js';
4
+ import { T as TraceAnalystKindSpec } from './kind-factory-BLHxwX71.js';
5
5
  import { a as TraceAnalystSpan } from './store-C1YxJDEK.js';
6
6
  import { L as LlmClientOptions } from './llm-client-Bj7g0rqu.js';
7
- import { S as Severity } from './multi-layer-verifier-DUZXrPDA.js';
7
+ import { S as Severity } from './multi-layer-verifier-CI4jdX-q.js';
8
8
 
9
9
  interface CreateAnalystAiConfig {
10
10
  /** OpenAI-compatible API key forwarded as `Authorization: Bearer`.
@@ -1,4 +1,4 @@
1
- import { d as ContinuousAgreementOptions, C as ContinuousAgreement } from './judge-calibration-0p2QcWNE.js';
1
+ import { d as ContinuousAgreementOptions, C as ContinuousAgreement } from './judge-calibration-7C-IDmKr.js';
2
2
  import { J as JudgeScore } from './types-C7DGg5ex.js';
3
3
 
4
4
  /** Identity: dimensions already follow "higher = better" by prompt convention
@@ -1,4 +1,4 @@
1
- import { R as RunRecord } from './run-record-MRdJ-Kq2.js';
1
+ import { R as RunRecord } from './run-record-CPfd1ARZ.js';
2
2
  import { F as FailureClusterReport } from './failure-cluster-DH9Flgcf.js';
3
3
 
4
4
  /**
package/dist/traces.d.ts CHANGED
@@ -6,7 +6,7 @@ export { S as SpanHandle, T as TraceEmitter, b as TraceEmitterOptions, l as llmS
6
6
  export { b as RunIntegrityError, R as RunIntegrityExpectations, c as RunIntegrityIssue, d as RunIntegrityIssueCode, a as RunIntegrityReport, e as assertRunCaptured, t as throwIfRunIncomplete } from './integrity-D2t12mMw.js';
7
7
  import { T as TraceStore } from './store-BcFXE6LG.js';
8
8
  export { E as EventFilter, F as FileSystemTraceStore, a as FileSystemTraceStoreOptions, I as InMemoryTraceStore, R as RunFilter, S as SpanFilter } from './store-BcFXE6LG.js';
9
- export { a as aggregateLlm, b as argHash, g as groupBy, j as judgeSpans, l as llmSpans, r as runFailureClass, c as runsForScenario, t as toolSpans } from './query-B7GGjRox.js';
9
+ export { a as aggregateLlm, b as argHash, g as groupBy, j as judgeSpans, l as llmSpans, r as runFailureClass, c as runsForScenario, t as toolSpans } from './query-0aTmbmQe.js';
10
10
  export { D as DEFAULT_REDACTION_RULES, b as REDACTION_VERSION, a as RedactionReport, R as RedactionRule, r as redactString, c as redactValue } from './redact-B40YG2M_.js';
11
11
  import { R as Run } from './schema-m0gsnbt3.js';
12
12
  export { A as Artifact, B as BudgetLedgerEntry, h as BudgetSpec, E as EventKind, i as FAILURE_CLASSES, F as FailureClass, G as GenericSpan, J as JudgeSpan, L as LlmSpan, M as Message, d as RetrievalSpan, g as RunLayer, b as RunOutcome, f as RunStatus, e as SandboxSpan, S as Span, j as SpanBase, c as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, a as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-m0gsnbt3.js';
@@ -14,7 +14,7 @@ import { A as AnalyzeTracesOptions, b as AnalyzeTracesResult } from './analyst-C
14
14
  export { a as AnalyzeTracesInput, c as AnalyzeTracesTurnSnapshot, d as analyzeTraces } from './analyst-C8HHvfJp.js';
15
15
  import { h as TraceAnalystSpanKind, i as TraceAnalystSpanStatus, T as TraceAnalysisStore, g as TraceAnalystFilters, b as DatasetOverview, Q as QueryTracesPage, l as ViewTraceResult, V as ViewSpansResult, c as SearchTraceResult, S as SearchSpanResult } from './store-C1YxJDEK.js';
16
16
  export { D as DEFAULT_TRACE_ANALYST_BUDGETS, E as ErrorCluster, d as SpanMatchRecord, e as TRACE_ANALYST_TRUNCATION_MARKER_PREFIX, f as TraceAnalystByteBudgets, a as TraceAnalystSpan, j as TraceAnalystTraceSummary, k as ViewTraceOversized } from './store-C1YxJDEK.js';
17
- import { b as RunSplitTag, c as RunTokenUsage, R as RunRecord } from './run-record-MRdJ-Kq2.js';
17
+ import { b as RunSplitTag, c as RunTokenUsage, R as RunRecord } from './run-record-CPfd1ARZ.js';
18
18
  import { AxFunction } from '@ax-llm/ax';
19
19
  import '@tangle-network/agent-interface';
20
20
 
package/dist/traces.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  scoreTraceInsightReadiness,
29
29
  tokenizeDomainWords,
30
30
  traceAnalystOnRunComplete
31
- } from "./chunk-7RBJANJD.js";
31
+ } from "./chunk-3722PKPB.js";
32
32
  import {
33
33
  TRACE_ANALYST_ACTOR_DESCRIPTION,
34
34
  TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION,
@@ -50,7 +50,7 @@ import {
50
50
  runFailureClass,
51
51
  runsForScenario,
52
52
  toolSpans
53
- } from "./chunk-UFSG7ACU.js";
53
+ } from "./chunk-JZXGWLK5.js";
54
54
  import {
55
55
  FAILURE_CLASSES,
56
56
  TRACE_SCHEMA_VERSION,
@@ -106,12 +106,12 @@ import {
106
106
  defaultProviderRedactor,
107
107
  providerFromBaseUrl
108
108
  } from "./chunk-PC4UYEBM.js";
109
- import "./chunk-2NSLDY4B.js";
109
+ import "./chunk-J5MUFXEY.js";
110
110
  import {
111
111
  TraceEmitter,
112
112
  llmSpanFromProvider
113
113
  } from "./chunk-TVVP3ZZQ.js";
114
- import "./chunk-ABOIVNXL.js";
114
+ import "./chunk-AGYDMORK.js";
115
115
  import "./chunk-VSMTAMNK.js";
116
116
  import "./chunk-3BFEG2F6.js";
117
117
  import "./chunk-PZ5AY32C.js";
@@ -1,4 +1,4 @@
1
- import { c as RunTokenUsage } from './run-record-MRdJ-Kq2.js';
1
+ import { c as RunTokenUsage } from './run-record-CPfd1ARZ.js';
2
2
 
3
3
  /**
4
4
  * Pass A substrate types — `runCampaign` is the one primitive every
@@ -1,4 +1,4 @@
1
- import { R as RunRecord } from './run-record-MRdJ-Kq2.js';
1
+ import { R as RunRecord } from './run-record-CPfd1ARZ.js';
2
2
  import { T as TraceAnalysisStore } from './store-C1YxJDEK.js';
3
3
  import { a as JudgeInput } from './types-C7DGg5ex.js';
4
4
  import { b as LlmCallRequest, c as LlmCallResult } from './llm-client-Bj7g0rqu.js';
@@ -1,13 +1,13 @@
1
1
  import { W as WorkflowTopology } from '../harness-optimizer-mOl9XX_O.js';
2
- import { b as RunSplitTag, c as RunTokenUsage, R as RunRecord } from '../run-record-MRdJ-Kq2.js';
3
- import { A as AnalystFinding, h as AnalystSeverity, E as EvidenceRef } from '../types-Dz9cKF0g.js';
4
- import { F as FailureClusterInsight } from '../insight-report-k0sRTzKg.js';
5
- import { a as VerificationReport, L as LayerResult } from '../multi-layer-verifier-DUZXrPDA.js';
2
+ import { b as RunSplitTag, c as RunTokenUsage, R as RunRecord } from '../run-record-CPfd1ARZ.js';
3
+ import { A as AnalystFinding, h as AnalystSeverity, E as EvidenceRef } from '../types-DA9yj-Jd.js';
4
+ import { F as FailureClusterInsight } from '../insight-report-DumCfEur.js';
5
+ import { a as VerificationReport, L as LayerResult } from '../multi-layer-verifier-CI4jdX-q.js';
6
6
  import { F as FailureClusterReport } from '../failure-cluster-DH9Flgcf.js';
7
7
  import { R as RedactionRule, a as RedactionReport } from '../redact-B40YG2M_.js';
8
8
  import { D as DatasetSplit } from '../dataset-BbGkaN2I.js';
9
9
  import { a as FeedbackTrajectory } from '../feedback-trajectory-BxY0cKfs.js';
10
- import { a as PairedBootstrapResult } from '../statistics-xP-cWc5k.js';
10
+ import { a as PairedBootstrapResult } from '../statistics-D88peojY.js';
11
11
  import '../pareto-E-pembql.js';
12
12
  import '../run-critic-CmMf05uV.js';
13
13
  import '../schema-m0gsnbt3.js';
@@ -19,8 +19,8 @@ import '../types-C7DGg5ex.js';
19
19
  import '@tangle-network/tcloud';
20
20
  import '../llm-client-Bj7g0rqu.js';
21
21
  import '../raw-provider-sink-C46HDghv.js';
22
- import '../summary-report-C0nnxOD8.js';
23
- import '../judge-calibration-0p2QcWNE.js';
22
+ import '../summary-report-Fc_YFJat.js';
23
+ import '../judge-calibration-7C-IDmKr.js';
24
24
  import '../verdict-C9MlYujm.js';
25
25
  import '../control-runtime-Acf9CGhw.js';
26
26
  import '../emitter-C2rqGH_l.js';
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  pairedBootstrap
3
- } from "../chunk-HRGUJTER.js";
3
+ } from "../chunk-HYGRFL7C.js";
4
4
  import {
5
5
  DEFAULT_REDACTION_RULES,
6
6
  redactString
7
7
  } from "../chunk-GGE4NNQT.js";
8
8
  import {
9
9
  validateRunRecord
10
- } from "../chunk-2NSLDY4B.js";
11
- import "../chunk-ABOIVNXL.js";
10
+ } from "../chunk-J5MUFXEY.js";
11
+ import "../chunk-AGYDMORK.js";
12
12
  import "../chunk-VSMTAMNK.js";
13
13
  import {
14
14
  ValidationError
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.102.1",
3
+ "version": "0.103.1",
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": {
@@ -1,350 +0,0 @@
1
- import {
2
- ValidationError
3
- } from "./chunk-3BFEG2F6.js";
4
-
5
- // src/product-benchmark/index.ts
6
- import { existsSync, readFileSync, statSync } from "fs";
7
- import { dirname, join } from "path";
8
- var productBenchmarkSplits = ["practice", "dev", "holdout", "safety", "sentinel"];
9
- function isObject(value) {
10
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
11
- }
12
- function fail(path, message) {
13
- throw new ValidationError(`${path}: ${message}`);
14
- }
15
- function wrapValidationError(path, err) {
16
- if (err instanceof ValidationError) {
17
- throw new ValidationError(`${path}: ${err.message}`, { cause: err });
18
- }
19
- throw new ValidationError(`${path}: ${err instanceof Error ? err.message : String(err)}`, {
20
- cause: err
21
- });
22
- }
23
- function expectObject(value, path) {
24
- if (!isObject(value)) fail(path, "must be an object");
25
- return value;
26
- }
27
- function expectString(value, path) {
28
- if (typeof value !== "string" || value.trim().length === 0)
29
- fail(path, "must be a non-empty string");
30
- return value;
31
- }
32
- function expectBoolean(value, path) {
33
- if (typeof value !== "boolean") fail(path, "must be a boolean");
34
- return value;
35
- }
36
- function expectNumber(value, path, opts = {}) {
37
- if (typeof value !== "number" || !Number.isFinite(value)) fail(path, "must be a finite number");
38
- if (opts.integer && !Number.isInteger(value)) fail(path, "must be an integer");
39
- if (opts.min !== void 0 && value < opts.min) fail(path, `must be >= ${opts.min}`);
40
- if (opts.max !== void 0 && value > opts.max) fail(path, `must be <= ${opts.max}`);
41
- return value;
42
- }
43
- function expectStringArray(value, path) {
44
- if (!Array.isArray(value)) fail(path, "must be an array");
45
- return value.map((entry, index) => expectString(entry, `${path}[${index}]`));
46
- }
47
- function expectObjectArray(value, path) {
48
- if (!Array.isArray(value)) fail(path, "must be an array");
49
- return value.map((entry, index) => expectObject(entry, `${path}[${index}]`));
50
- }
51
- function expectSplit(value, path) {
52
- const split = expectString(value, path);
53
- if (!productBenchmarkSplits.includes(split)) {
54
- fail(path, `must be one of ${productBenchmarkSplits.join(", ")}`);
55
- }
56
- return split;
57
- }
58
- function optionalString(value, path) {
59
- if (value === void 0) return void 0;
60
- return expectString(value, path);
61
- }
62
- function expectDimensions(value, path) {
63
- const obj = expectObject(value, path);
64
- const out = {};
65
- for (const [key, raw] of Object.entries(obj)) out[key] = expectNumber(raw, `${path}.${key}`);
66
- return out;
67
- }
68
- function expectRuntimeResolution(value, path) {
69
- const obj = expectObject(value, path);
70
- return {
71
- model: expectString(obj.model, `${path}.model`),
72
- harness: expectString(obj.harness, `${path}.harness`),
73
- backend: expectString(obj.backend, `${path}.backend`),
74
- ...obj.reasoningEffort !== void 0 ? { reasoningEffort: optionalString(obj.reasoningEffort, `${path}.reasoningEffort`) } : {}
75
- };
76
- }
77
- function validateProductBenchmarkManifest(value) {
78
- const obj = expectObject(value, "manifest");
79
- if (obj.schemaVersion !== 1) fail("manifest.schemaVersion", "must be 1");
80
- const repo = expectObject(obj.repo, "manifest.repo");
81
- const substrate = expectObject(obj.substrate, "manifest.substrate");
82
- const profiles = expectObjectArray(obj.profiles, "manifest.profiles").map((profile, index) => ({
83
- id: expectString(profile.id, `manifest.profiles[${index}].id`),
84
- profileHash: expectString(profile.profileHash, `manifest.profiles[${index}].profileHash`),
85
- agentProfilePath: expectString(
86
- profile.agentProfilePath,
87
- `manifest.profiles[${index}].agentProfilePath`
88
- )
89
- }));
90
- const arms = expectObjectArray(obj.arms, "manifest.arms").map((arm, index) => ({
91
- id: expectString(arm.id, `manifest.arms[${index}].id`),
92
- profileId: expectString(arm.profileId, `manifest.arms[${index}].profileId`),
93
- mutableSurfaces: expectStringArray(
94
- arm.mutableSurfaces,
95
- `manifest.arms[${index}].mutableSurfaces`
96
- ),
97
- policyAxes: expectObject(arm.policyAxes, `manifest.arms[${index}].policyAxes`)
98
- }));
99
- const scenarios = expectObjectArray(obj.scenarios, "manifest.scenarios").map(
100
- (scenario, index) => ({
101
- id: expectString(scenario.id, `manifest.scenarios[${index}].id`),
102
- split: expectSplit(scenario.split, `manifest.scenarios[${index}].split`),
103
- tags: expectStringArray(scenario.tags, `manifest.scenarios[${index}].tags`),
104
- sourceAllowedForSynthesis: expectBoolean(
105
- scenario.sourceAllowedForSynthesis,
106
- `manifest.scenarios[${index}].sourceAllowedForSynthesis`
107
- )
108
- })
109
- );
110
- const budgets = expectObject(obj.budgets, "manifest.budgets");
111
- if (profiles.length === 0) fail("manifest.profiles", "must contain at least one profile");
112
- if (arms.length === 0) fail("manifest.arms", "must contain at least one arm");
113
- if (scenarios.length === 0) fail("manifest.scenarios", "must contain at least one scenario");
114
- assertUnique(
115
- profiles.map((profile) => profile.id),
116
- "manifest.profiles.id"
117
- );
118
- assertUnique(
119
- arms.map((arm) => arm.id),
120
- "manifest.arms.id"
121
- );
122
- assertUnique(
123
- scenarios.map((scenario) => scenario.id),
124
- "manifest.scenarios.id"
125
- );
126
- const profileIds = new Set(profiles.map((profile) => profile.id));
127
- for (const arm of arms) {
128
- if (!profileIds.has(arm.profileId))
129
- fail(`manifest.arms.${arm.id}.profileId`, `unknown profile ${arm.profileId}`);
130
- }
131
- return {
132
- schemaVersion: 1,
133
- projectId: expectString(obj.projectId, "manifest.projectId"),
134
- benchmarkId: expectString(obj.benchmarkId, "manifest.benchmarkId"),
135
- repo: {
136
- url: expectString(repo.url, "manifest.repo.url"),
137
- commit: expectString(repo.commit, "manifest.repo.commit"),
138
- branch: expectString(repo.branch, "manifest.repo.branch")
139
- },
140
- substrate: {
141
- agentEval: expectString(substrate.agentEval, "manifest.substrate.agentEval"),
142
- agentRuntime: expectString(substrate.agentRuntime, "manifest.substrate.agentRuntime"),
143
- agentInterface: expectString(substrate.agentInterface, "manifest.substrate.agentInterface"),
144
- sandbox: expectString(substrate.sandbox, "manifest.substrate.sandbox"),
145
- ...substrate.agentBench !== void 0 ? { agentBench: expectString(substrate.agentBench, "manifest.substrate.agentBench") } : {}
146
- },
147
- profiles,
148
- arms,
149
- scenarios,
150
- budgets: {
151
- maxUsd: expectNumber(budgets.maxUsd, "manifest.budgets.maxUsd", { min: 0 }),
152
- maxCells: expectNumber(budgets.maxCells, "manifest.budgets.maxCells", {
153
- min: 0,
154
- integer: true
155
- }),
156
- maxWallMs: expectNumber(budgets.maxWallMs, "manifest.budgets.maxWallMs", {
157
- min: 0,
158
- integer: true
159
- })
160
- },
161
- expectedArtifactDir: expectString(obj.expectedArtifactDir, "manifest.expectedArtifactDir")
162
- };
163
- }
164
- function validateProductBenchmarkRecord(value) {
165
- const obj = expectObject(value, "record");
166
- if (obj.schemaVersion !== 1) fail("record.schemaVersion", "must be 1");
167
- const agentProfile = expectObject(obj.agentProfile, "record.agentProfile");
168
- const model = expectObject(obj.model, "record.model");
169
- const backend = expectObject(obj.backend, "record.backend");
170
- const outcome = expectObject(obj.outcome, "record.outcome");
171
- const usage = expectObject(obj.usage, "record.usage");
172
- const integrity = expectObject(obj.integrity, "record.integrity");
173
- const artifacts = expectObject(obj.artifacts, "record.artifacts");
174
- const record = {
175
- schemaVersion: 1,
176
- projectId: expectString(obj.projectId, "record.projectId"),
177
- benchmarkId: expectString(obj.benchmarkId, "record.benchmarkId"),
178
- runId: expectString(obj.runId, "record.runId"),
179
- scenarioId: expectString(obj.scenarioId, "record.scenarioId"),
180
- split: expectSplit(obj.split, "record.split"),
181
- armId: expectString(obj.armId, "record.armId"),
182
- rep: expectNumber(obj.rep, "record.rep", { min: 1, integer: true }),
183
- agentProfile: {
184
- id: expectString(agentProfile.id, "record.agentProfile.id"),
185
- hash: expectString(agentProfile.hash, "record.agentProfile.hash"),
186
- path: expectString(agentProfile.path, "record.agentProfile.path"),
187
- declared: expectRuntimeResolution(agentProfile.declared, "record.agentProfile.declared"),
188
- resolved: expectRuntimeResolution(agentProfile.resolved, "record.agentProfile.resolved")
189
- },
190
- model: {
191
- provider: expectString(model.provider, "record.model.provider"),
192
- id: expectString(model.id, "record.model.id")
193
- },
194
- backend: {
195
- kind: expectString(backend.kind, "record.backend.kind"),
196
- version: expectString(backend.version, "record.backend.version")
197
- },
198
- outcome: {
199
- pass: expectBoolean(outcome.pass, "record.outcome.pass"),
200
- score: expectNumber(outcome.score, "record.outcome.score", { min: 0, max: 1 }),
201
- dimensions: expectDimensions(outcome.dimensions, "record.outcome.dimensions"),
202
- failureMode: outcome.failureMode === null ? null : expectString(outcome.failureMode, "record.outcome.failureMode")
203
- },
204
- usage: {
205
- inputTokens: expectNumber(usage.inputTokens, "record.usage.inputTokens", {
206
- min: 0,
207
- integer: true
208
- }),
209
- outputTokens: expectNumber(usage.outputTokens, "record.usage.outputTokens", {
210
- min: 0,
211
- integer: true
212
- }),
213
- costUsd: expectNumber(usage.costUsd, "record.usage.costUsd", { min: 0 }),
214
- wallMs: expectNumber(usage.wallMs, "record.usage.wallMs", { min: 0, integer: true }),
215
- toolCalls: expectNumber(usage.toolCalls, "record.usage.toolCalls", { min: 0, integer: true })
216
- },
217
- integrity: {
218
- realBackend: expectBoolean(integrity.realBackend, "record.integrity.realBackend"),
219
- rawCapture: expectBoolean(integrity.rawCapture, "record.integrity.rawCapture"),
220
- traceCapture: expectBoolean(integrity.traceCapture, "record.integrity.traceCapture"),
221
- noStubRows: expectBoolean(integrity.noStubRows, "record.integrity.noStubRows"),
222
- priced: expectBoolean(integrity.priced, "record.integrity.priced"),
223
- profileMaterialized: expectBoolean(
224
- integrity.profileMaterialized,
225
- "record.integrity.profileMaterialized"
226
- )
227
- },
228
- artifacts: {
229
- records: expectString(artifacts.records, "record.artifacts.records"),
230
- traces: expectString(artifacts.traces, "record.artifacts.traces"),
231
- raws: expectString(artifacts.raws, "record.artifacts.raws"),
232
- scores: expectString(artifacts.scores, "record.artifacts.scores"),
233
- workspace: expectString(artifacts.workspace, "record.artifacts.workspace")
234
- }
235
- };
236
- if (record.integrity.realBackend && record.usage.inputTokens + record.usage.outputTokens === 0) {
237
- fail("record.usage", "realBackend rows must carry non-zero token usage");
238
- }
239
- return record;
240
- }
241
- function productBenchmarkIntegrityFailures(record) {
242
- const failures = [];
243
- for (const [key, value] of Object.entries(record.integrity)) {
244
- if (!value) failures.push(`${record.runId}:${key}=false`);
245
- }
246
- return failures;
247
- }
248
- function readProductBenchmarkRecords(path) {
249
- const lines = readFileSync(path, "utf8").split("\n").map((line) => line.trim()).filter(Boolean);
250
- const records = [];
251
- for (const [index, line] of lines.entries()) {
252
- try {
253
- records.push(validateProductBenchmarkRecord(JSON.parse(line)));
254
- } catch (err) {
255
- wrapValidationError(`${path}:${index + 1}`, err);
256
- }
257
- }
258
- return records;
259
- }
260
- function readProductBenchmarkManifest(path) {
261
- try {
262
- return validateProductBenchmarkManifest(JSON.parse(readFileSync(path, "utf8")));
263
- } catch (err) {
264
- wrapValidationError(path, err);
265
- }
266
- }
267
- function validateProductBenchmarkRun(input) {
268
- const manifest = readProductBenchmarkManifest(input.manifestPath);
269
- const records = readProductBenchmarkRecords(input.recordsPath);
270
- const manifestProjectBench = `${manifest.projectId}/${manifest.benchmarkId}`;
271
- const integrityFailures = records.flatMap(productBenchmarkIntegrityFailures);
272
- const missingArtifacts = input.checkArtifacts === false ? [] : records.flatMap(
273
- (record) => missingArtifactsForRecord(record, input.artifactRoot ?? dirname(input.recordsPath))
274
- );
275
- for (const [index, record] of records.entries()) {
276
- const recordProjectBench = `${record.projectId}/${record.benchmarkId}`;
277
- if (recordProjectBench !== manifestProjectBench) {
278
- fail(
279
- `records[${index}]`,
280
- `project/benchmark ${recordProjectBench} does not match manifest ${manifestProjectBench}`
281
- );
282
- }
283
- if (!manifest.arms.some((arm) => arm.id === record.armId))
284
- fail(`records[${index}].armId`, `unknown arm ${record.armId}`);
285
- if (!manifest.scenarios.some((scenario) => scenario.id === record.scenarioId)) {
286
- fail(`records[${index}].scenarioId`, `unknown scenario ${record.scenarioId}`);
287
- }
288
- }
289
- return {
290
- manifestPath: input.manifestPath,
291
- recordsPath: input.recordsPath,
292
- records: records.length,
293
- projects: sortedUnique(records.map((record) => record.projectId)),
294
- benchmarks: sortedUnique(records.map((record) => record.benchmarkId)),
295
- arms: sortedUnique(records.map((record) => record.armId)),
296
- scenarios: sortedUnique(records.map((record) => record.scenarioId)),
297
- passed: records.filter((record) => record.outcome.pass).length,
298
- failed: records.filter((record) => !record.outcome.pass).length,
299
- inputTokens: sum(records, (record) => record.usage.inputTokens),
300
- outputTokens: sum(records, (record) => record.usage.outputTokens),
301
- costUsd: sum(records, (record) => record.usage.costUsd),
302
- wallMs: sum(records, (record) => record.usage.wallMs),
303
- integrityFailures,
304
- missingArtifacts
305
- };
306
- }
307
- function missingArtifactsForRecord(record, artifactRoot) {
308
- const missing = [];
309
- for (const [key, value] of Object.entries(record.artifacts)) {
310
- const path = resolveArtifactPath(value, artifactRoot);
311
- if (!existsSync(path)) missing.push(`${record.runId}:${key}:${value}`);
312
- }
313
- return missing;
314
- }
315
- function resolveArtifactPath(value, artifactRoot) {
316
- return value.startsWith("/") ? value : join(artifactRoot, value);
317
- }
318
- function assertUnique(values, path) {
319
- const seen = /* @__PURE__ */ new Set();
320
- for (const value of values) {
321
- if (seen.has(value)) fail(path, `duplicate ${value}`);
322
- seen.add(value);
323
- }
324
- }
325
- function sortedUnique(values) {
326
- return [...new Set(values)].sort();
327
- }
328
- function sum(items, fn) {
329
- return items.reduce((total, item) => total + fn(item), 0);
330
- }
331
- function findProductBenchmarkArtifacts(runDir) {
332
- const manifestPath = join(runDir, "product-benchmark-manifest.json");
333
- const recordsPath = join(runDir, "product-benchmark-records.jsonl");
334
- if (existsSync(manifestPath) && statSync(manifestPath).isFile() && existsSync(recordsPath) && statSync(recordsPath).isFile()) {
335
- return { manifestPath, recordsPath };
336
- }
337
- return null;
338
- }
339
-
340
- export {
341
- productBenchmarkSplits,
342
- validateProductBenchmarkManifest,
343
- validateProductBenchmarkRecord,
344
- productBenchmarkIntegrityFailures,
345
- readProductBenchmarkRecords,
346
- readProductBenchmarkManifest,
347
- validateProductBenchmarkRun,
348
- findProductBenchmarkArtifacts
349
- };
350
- //# sourceMappingURL=chunk-63MBSQTX.js.map