@tangle-network/agent-eval 0.109.1 → 0.110.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 (174) hide show
  1. package/dist/analyst/index.d.ts +10 -12
  2. package/dist/analyst/index.js +8 -11
  3. package/dist/analyst/index.js.map +1 -1
  4. package/dist/{analyze-runs-DJYpep3L.d.ts → analyze-runs-Dmz6LA9e.d.ts} +4 -4
  5. package/dist/{baseline-Bbid3WoO.d.ts → baseline-DsNteOgR.d.ts} +32 -2
  6. package/dist/belief-state/index.d.ts +6 -6
  7. package/dist/benchmarks/index.d.ts +4 -4
  8. package/dist/benchmarks/index.js +7 -8
  9. package/dist/builder-eval/index.d.ts +4 -4
  10. package/dist/builder-eval/index.js +1 -2
  11. package/dist/builder-eval/index.js.map +1 -1
  12. package/dist/{calibration-BPmzuVPk.d.ts → calibration-Dz8TQV4y.d.ts} +2 -2
  13. package/dist/campaign/index.d.ts +16 -19
  14. package/dist/campaign/index.js +7 -8
  15. package/dist/{chunk-LOJ2QVCE.js → chunk-2IY4ILP4.js} +2 -2
  16. package/dist/{chunk-LIEJUH2I.js → chunk-6PL5MGDL.js} +9 -9
  17. package/dist/{chunk-2OGPXHOB.js → chunk-7NX6ZSBG.js} +36 -7
  18. package/dist/chunk-7NX6ZSBG.js.map +1 -0
  19. package/dist/{chunk-OVPVM4JC.js → chunk-GTERJI6Q.js} +4 -4
  20. package/dist/{chunk-YEHAEDUD.js → chunk-IMWDSFUM.js} +604 -2
  21. package/dist/chunk-IMWDSFUM.js.map +1 -0
  22. package/dist/{chunk-JZXGWLK5.js → chunk-MHNQWM4I.js} +62 -6
  23. package/dist/chunk-MHNQWM4I.js.map +1 -0
  24. package/dist/{chunk-QRVS7MX4.js → chunk-OW47B5WA.js} +3 -5
  25. package/dist/{chunk-QRVS7MX4.js.map → chunk-OW47B5WA.js.map} +1 -1
  26. package/dist/{chunk-DBDRR6GF.js → chunk-PLOMR3HP.js} +48 -2
  27. package/dist/chunk-PLOMR3HP.js.map +1 -0
  28. package/dist/{chunk-GDZAWO2I.js → chunk-QFGTU7MT.js} +2 -2
  29. package/dist/{chunk-R6D7NEYJ.js → chunk-RNB2NICW.js} +11 -11
  30. package/dist/{chunk-V7HNA47Z.js → chunk-RSVSSZKF.js} +5 -5
  31. package/dist/{chunk-5PK3626Q.js → chunk-XRGOKCMO.js} +88 -17
  32. package/dist/chunk-XRGOKCMO.js.map +1 -0
  33. package/dist/{code-agent-session-rnJKlqmT.d.ts → code-agent-session-yitf9I-F.d.ts} +1 -1
  34. package/dist/contract/index.d.ts +20 -23
  35. package/dist/contract/index.js +11 -13
  36. package/dist/contract/index.js.map +1 -1
  37. package/dist/{control-B8UthSBL.d.ts → control-U8LBKUES.d.ts} +5 -6
  38. package/dist/control.d.ts +8 -9
  39. package/dist/control.js +6 -8
  40. package/dist/{dataset-DS7ytHZU.d.ts → dataset-NENEzRgk.d.ts} +1 -1
  41. package/dist/{default-registry-BswHCXnU.d.ts → default-registry-Bcf1uKVI.d.ts} +1 -2
  42. package/dist/{emitter-C2rqGH_l.d.ts → emitter-BRchAAAx.d.ts} +2 -2
  43. package/dist/{failure-cluster-DH9Flgcf.d.ts → failure-cluster-C48PiReX.d.ts} +2 -2
  44. package/dist/feedback-trajectory-pDcz1lQ1.d.ts +348 -0
  45. package/dist/{gepa-B3x5Ulcv.d.ts → gepa-BUNP3606.d.ts} +143 -2
  46. package/dist/hosted/index.d.ts +7 -7
  47. package/dist/{index-pPtfoIJO.d.ts → index-Dc3VLGhp.d.ts} +2 -2
  48. package/dist/index.d.ts +645 -61
  49. package/dist/index.js +1282 -190
  50. package/dist/index.js.map +1 -1
  51. package/dist/{insight-report-B4xrdwEK.d.ts → insight-report-D4cXFsLt.d.ts} +1 -1
  52. package/dist/{integrity-DqGZg3st.d.ts → integrity-qemeBAyx.d.ts} +1 -1
  53. package/dist/{types-D1ytG0Yg.d.ts → kind-factory-20hcaYpf.d.ts} +169 -2
  54. package/dist/meta-eval/index.d.ts +5 -5
  55. package/dist/meta-eval/index.js +1 -2
  56. package/dist/meta-eval/index.js.map +1 -1
  57. package/dist/{multi-layer-verifier-CI4jdX-q.d.ts → multi-layer-verifier-BsqKuLyN.d.ts} +1 -1
  58. package/dist/multishot/index.d.ts +3 -3
  59. package/dist/openapi.json +1 -1
  60. package/dist/pipelines/index.d.ts +6 -7
  61. package/dist/pipelines/index.js +3 -6
  62. package/dist/pipelines/index.js.map +1 -1
  63. package/dist/{policy-edit-DQUXYMDm.d.ts → policy-edit-D2bBDZDf.d.ts} +2 -2
  64. package/dist/{pre-registration-BUhVPzE7.d.ts → pre-registration-BepVVa6P.d.ts} +3 -3
  65. package/dist/{provenance-DdDhf6cg.d.ts → provenance-DMvsfknv.d.ts} +3 -5
  66. package/dist/{query-0aTmbmQe.d.ts → query-Ck190MOd.d.ts} +2 -2
  67. package/dist/{release-report-DeJpsBiA.d.ts → release-report-oBfOz8ku.d.ts} +3 -3
  68. package/dist/reporting.d.ts +8 -8
  69. package/dist/{researcher-Wc7dx6GM.d.ts → researcher-CaH0CwFC.d.ts} +6 -6
  70. package/dist/rl.d.ts +568 -15
  71. package/dist/rl.js +4 -4
  72. package/dist/{rubric-predictive-validity-DPnyG-CE.d.ts → rubric-predictive-validity-C-fMteAW.d.ts} +1 -1
  73. package/dist/{run-record-I-Z3JNvO.d.ts → run-record-DksGsfgv.d.ts} +1 -1
  74. package/dist/{runtime-trajectory-iW9IhV3e.d.ts → runtime-trajectory-h5i0SZUj.d.ts} +1 -1
  75. package/dist/{schema-m0gsnbt3.d.ts → schema-SGWcK9wa.d.ts} +1 -1
  76. package/dist/{semantic-concept-judge-BmNZPB_j.d.ts → semantic-concept-judge-D7z6JCLZ.d.ts} +57 -4
  77. package/dist/{store-BcFXE6LG.d.ts → store-BsVi7ncX.d.ts} +1 -1
  78. package/dist/storyboard/index.d.ts +1 -1
  79. package/dist/{summary-report-QMZVe3P-.d.ts → summary-report-Bz-0-t8v.d.ts} +2 -2
  80. package/dist/{test-graded-scenario-DeODGLra.d.ts → test-graded-scenario-mzYBKspu.d.ts} +3 -3
  81. package/dist/traces.d.ts +54 -11
  82. package/dist/traces.js +25 -27
  83. package/dist/{types-BdIv5dvA.d.ts → types-v--ctu-b.d.ts} +2 -2
  84. package/dist/wire/index.d.ts +5 -6
  85. package/package.json +1 -71
  86. package/dist/adapters/http.d.ts +0 -142
  87. package/dist/adapters/http.js +0 -203
  88. package/dist/adapters/http.js.map +0 -1
  89. package/dist/adapters/langchain.d.ts +0 -95
  90. package/dist/adapters/langchain.js +0 -34
  91. package/dist/adapters/langchain.js.map +0 -1
  92. package/dist/adapters/otel.d.ts +0 -112
  93. package/dist/adapters/otel.js +0 -110
  94. package/dist/adapters/otel.js.map +0 -1
  95. package/dist/chunk-2OGPXHOB.js.map +0 -1
  96. package/dist/chunk-45EEMHTC.js +0 -35
  97. package/dist/chunk-45EEMHTC.js.map +0 -1
  98. package/dist/chunk-5BKGXME7.js +0 -65
  99. package/dist/chunk-5BKGXME7.js.map +0 -1
  100. package/dist/chunk-5PK3626Q.js.map +0 -1
  101. package/dist/chunk-6SK5VFYK.js +0 -100
  102. package/dist/chunk-6SK5VFYK.js.map +0 -1
  103. package/dist/chunk-DBDRR6GF.js.map +0 -1
  104. package/dist/chunk-DJWX3GVS.js +0 -81
  105. package/dist/chunk-DJWX3GVS.js.map +0 -1
  106. package/dist/chunk-FOUG2VVS.js +0 -855
  107. package/dist/chunk-FOUG2VVS.js.map +0 -1
  108. package/dist/chunk-JZXGWLK5.js.map +0 -1
  109. package/dist/chunk-K7QEIHHJ.js +0 -613
  110. package/dist/chunk-K7QEIHHJ.js.map +0 -1
  111. package/dist/chunk-KKHDIONI.js +0 -414
  112. package/dist/chunk-KKHDIONI.js.map +0 -1
  113. package/dist/chunk-KMPRBJK4.js +0 -74
  114. package/dist/chunk-KMPRBJK4.js.map +0 -1
  115. package/dist/chunk-Q2JRAWRI.js +0 -196
  116. package/dist/chunk-Q2JRAWRI.js.map +0 -1
  117. package/dist/chunk-RZTMDUO7.js +0 -49
  118. package/dist/chunk-RZTMDUO7.js.map +0 -1
  119. package/dist/chunk-STGVSCDH.js +0 -202
  120. package/dist/chunk-STGVSCDH.js.map +0 -1
  121. package/dist/chunk-YEHAEDUD.js.map +0 -1
  122. package/dist/control-runtime-Acf9CGhw.d.ts +0 -182
  123. package/dist/corpus-eBVwhCp1.d.ts +0 -560
  124. package/dist/counterfactual-DlOz8PBx.d.ts +0 -85
  125. package/dist/diagnose.d.ts +0 -252
  126. package/dist/diagnose.js +0 -382
  127. package/dist/diagnose.js.map +0 -1
  128. package/dist/feedback-trajectory-C9KCo8ag.d.ts +0 -169
  129. package/dist/governance/index.d.ts +0 -135
  130. package/dist/governance/index.js +0 -18
  131. package/dist/governance/index.js.map +0 -1
  132. package/dist/groundedness/index.d.ts +0 -112
  133. package/dist/groundedness/index.js +0 -77
  134. package/dist/groundedness/index.js.map +0 -1
  135. package/dist/harness-optimizer-mOl9XX_O.d.ts +0 -106
  136. package/dist/kind-factory-DvIGo_cP.d.ts +0 -171
  137. package/dist/knowledge/index.d.ts +0 -103
  138. package/dist/knowledge/index.js +0 -18
  139. package/dist/knowledge/index.js.map +0 -1
  140. package/dist/pareto-E-pembql.d.ts +0 -81
  141. package/dist/perf/index.d.ts +0 -123
  142. package/dist/perf/index.js +0 -18
  143. package/dist/perf/index.js.map +0 -1
  144. package/dist/prm/index.d.ts +0 -104
  145. package/dist/prm/index.js +0 -265
  146. package/dist/prm/index.js.map +0 -1
  147. package/dist/product-benchmark/index.d.ts +0 -247
  148. package/dist/product-benchmark/index.js +0 -37
  149. package/dist/product-benchmark/index.js.map +0 -1
  150. package/dist/red-team-KmmiqBlY.d.ts +0 -63
  151. package/dist/redact-B40YG2M_.d.ts +0 -45
  152. package/dist/rubric-Cc6UHvUb.d.ts +0 -73
  153. package/dist/run-critic-CmMf05uV.d.ts +0 -56
  154. package/dist/sink-fetch-B1Yg4Til.d.ts +0 -101
  155. package/dist/telemetry/file.d.ts +0 -19
  156. package/dist/telemetry/file.js +0 -45
  157. package/dist/telemetry/file.js.map +0 -1
  158. package/dist/telemetry/index.d.ts +0 -38
  159. package/dist/telemetry/index.js +0 -130
  160. package/dist/telemetry/index.js.map +0 -1
  161. package/dist/testing-C21CHsq2.d.ts +0 -20
  162. package/dist/testing.d.ts +0 -1
  163. package/dist/testing.js +0 -8
  164. package/dist/testing.js.map +0 -1
  165. package/dist/trajectory-2TkpSEVh.d.ts +0 -33
  166. package/dist/workflow/index.d.ts +0 -496
  167. package/dist/workflow/index.js +0 -2178
  168. package/dist/workflow/index.js.map +0 -1
  169. /package/dist/{chunk-LOJ2QVCE.js.map → chunk-2IY4ILP4.js.map} +0 -0
  170. /package/dist/{chunk-LIEJUH2I.js.map → chunk-6PL5MGDL.js.map} +0 -0
  171. /package/dist/{chunk-OVPVM4JC.js.map → chunk-GTERJI6Q.js.map} +0 -0
  172. /package/dist/{chunk-GDZAWO2I.js.map → chunk-QFGTU7MT.js.map} +0 -0
  173. /package/dist/{chunk-R6D7NEYJ.js.map → chunk-RNB2NICW.js.map} +0 -0
  174. /package/dist/{chunk-V7HNA47Z.js.map → chunk-RSVSSZKF.js.map} +0 -0
@@ -196,4 +196,4 @@ declare function isRetrievalSpan(s: Span): s is RetrievalSpan;
196
196
  declare function isJudgeSpan(s: Span): s is JudgeSpan;
197
197
  declare function isSandboxSpan(s: Span): s is SandboxSpan;
198
198
 
199
- export { type Artifact as A, type BudgetLedgerEntry as B, type EventKind as E, type FailureClass as F, type GenericSpan as G, type JudgeSpan as J, type LlmSpan as L, type Message as M, type Run as R, type Span as S, type ToolSpan as T, type TraceEvent as a, type RunOutcome as b, type SpanKind as c, type RetrievalSpan as d, type SandboxSpan as e, type RunStatus as f, type RunLayer as g, type BudgetSpec as h, FAILURE_CLASSES as i, type SpanBase as j, type SpanStatus as k, TRACE_SCHEMA_VERSION as l, isJudgeSpan as m, isLlmSpan as n, isRetrievalSpan as o, isSandboxSpan as p, isToolSpan as q };
199
+ export { type Artifact as A, type BudgetLedgerEntry as B, type EventKind as E, type FailureClass as F, type GenericSpan as G, type JudgeSpan as J, type LlmSpan as L, type Message as M, type Run as R, type Span as S, type ToolSpan as T, type RunOutcome as a, type SpanKind as b, type RetrievalSpan as c, type SandboxSpan as d, type TraceEvent as e, type RunStatus as f, type RunLayer as g, type BudgetSpec as h, FAILURE_CLASSES as i, type SpanBase as j, type SpanStatus as k, TRACE_SCHEMA_VERSION as l, isJudgeSpan as m, isLlmSpan as n, isRetrievalSpan as o, isSandboxSpan as p, isToolSpan as q };
@@ -1,10 +1,11 @@
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-D1ytG0Yg.js';
4
- import { T as TraceAnalystKindSpec } from './kind-factory-DvIGo_cP.js';
3
+ import { A as AnalystFinding, T as TraceAnalystKindSpec, a as Analyst, b as AnalystContext } from './kind-factory-20hcaYpf.js';
5
4
  import { a as TraceAnalystSpan } from './store-C1YxJDEK.js';
5
+ import { R as Run, S as Span, e as TraceEvent, A as Artifact, B as BudgetLedgerEntry } from './schema-SGWcK9wa.js';
6
+ import { T as TraceStore } from './store-BsVi7ncX.js';
6
7
  import { L as LlmClientOptions } from './llm-client-DyqEH4jH.js';
7
- import { S as Severity } from './multi-layer-verifier-CI4jdX-q.js';
8
+ import { S as Severity } from './multi-layer-verifier-BsqKuLyN.js';
8
9
 
9
10
  interface CreateAnalystAiConfig {
10
11
  /** OpenAI-compatible API key forwarded as `Authorization: Bearer`.
@@ -487,6 +488,58 @@ interface BehavioralMetrics {
487
488
  */
488
489
  declare function computeTraceMetrics(spans: readonly TraceAnalystSpan[]): BehavioralMetrics;
489
490
 
491
+ interface RunScore {
492
+ success: number;
493
+ goalProgress: number;
494
+ repoGroundedness: number;
495
+ driftPenalty: number;
496
+ toolUseQuality: number;
497
+ patchQuality: number;
498
+ testReality: number;
499
+ finalGate: number;
500
+ reviewerBlockers: number;
501
+ costUsd: number;
502
+ wallSeconds: number;
503
+ notes?: string[];
504
+ }
505
+ interface RunScoreWeights {
506
+ success: number;
507
+ goalProgress: number;
508
+ repoGroundedness: number;
509
+ driftPenalty: number;
510
+ toolUseQuality: number;
511
+ patchQuality: number;
512
+ testReality: number;
513
+ finalGate: number;
514
+ reviewerBlockers: number;
515
+ costUsd: number;
516
+ wallSeconds: number;
517
+ }
518
+ declare const DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights;
519
+ declare function aggregateRunScore(score: RunScore, weights?: Partial<RunScoreWeights>): number;
520
+ declare function clamp01(value: number): number;
521
+
522
+ interface RunTrace {
523
+ run: Run;
524
+ spans: Span[];
525
+ events: TraceEvent[];
526
+ artifacts: Artifact[];
527
+ budget: BudgetLedgerEntry[];
528
+ }
529
+ interface RunCriticOptions {
530
+ weights?: Partial<RunScoreWeights>;
531
+ driftPatterns?: RegExp[];
532
+ }
533
+ declare class RunCritic {
534
+ private readonly weights?;
535
+ private readonly driftPatterns;
536
+ constructor(options?: RunCriticOptions);
537
+ score(store: TraceStore, runId: string): Promise<RunScore>;
538
+ scoreTrace(trace: RunTrace): RunScore;
539
+ rank(score: RunScore): number;
540
+ private isDrift;
541
+ }
542
+
490
543
  /**
491
544
  * Semantic concept judge — "does the built artifact actually implement
492
545
  * the features the user asked for?"
@@ -621,4 +674,4 @@ declare function runSemanticConceptJudge(input: SemanticConceptJudgeInput, optio
621
674
  */
622
675
  declare function createSemanticConceptJudge(options?: SemanticConceptJudgeOptions): (input: SemanticConceptJudgeInput) => Promise<SemanticConceptJudgeResult>;
623
676
 
624
- export { type ConceptWeightStrategy as A, type BehavioralMetrics as B, type CreateAnalystAiConfig as C, DEFAULT_TRACE_ANALYST_KINDS as D, DEFAULT_COMPLEXITY_WEIGHTS as E, FAILURE_MODE_KIND_SPEC as F, SEMANTIC_CONCEPT_JUDGE_VERSION as G, type SemanticConceptJudgeResult as H, IMPROVEMENT_KIND_SPEC as I, type SuboptimalCode as J, KIND_EXPECTED_SUBJECTS as K, type SuboptimalSignal as L, computeTraceMetrics as M, createSemanticConceptJudge as N, runSemanticConceptJudge as O, type PersistedFinding as P, type SemanticConceptJudgeOptions as S, type SemanticConceptJudgeInput as a, type DiffPolicy as b, FINDING_SUBJECT_GRAMMAR_PROMPT as c, FINDING_SUBJECT_KINDS as d, type FindingSubject as e, type FindingSubjectKind as f, FindingSubjectStringSchema as g, type FindingsDiff as h, FindingsStore as i, KNOWLEDGE_GAP_KIND_SPEC as j, KNOWLEDGE_POISONING_KIND_SPEC as k, SKILL_USAGE_ANALYST as l, SkillUsageAnalyst as m, type SkillUsageRecord as n, type SkillUsageReport as o, type SkillUsageScanConfig as p, buildSkillUsageReport as q, createAnalystAi as r, defaultIsMaterial as s, diffFindings as t, emitSkillUsageFindings as u, parseFindingSubject as v, renderFindingSubject as w, type ConceptComplexity as x, type ConceptFinding as y, type ConceptSpec as z };
677
+ export { type ConceptComplexity as A, type BehavioralMetrics as B, type CreateAnalystAiConfig as C, DEFAULT_TRACE_ANALYST_KINDS as D, type ConceptFinding as E, FAILURE_MODE_KIND_SPEC as F, type ConceptSpec as G, type ConceptWeightStrategy as H, IMPROVEMENT_KIND_SPEC as I, DEFAULT_COMPLEXITY_WEIGHTS as J, KIND_EXPECTED_SUBJECTS as K, DEFAULT_RUN_SCORE_WEIGHTS as L, type RunCriticOptions as M, SEMANTIC_CONCEPT_JUDGE_VERSION as N, type SemanticConceptJudgeResult as O, type PersistedFinding as P, type SuboptimalCode as Q, RunCritic as R, type SemanticConceptJudgeOptions as S, type SuboptimalSignal as T, aggregateRunScore as U, clamp01 as V, computeTraceMetrics as W, createSemanticConceptJudge as X, runSemanticConceptJudge as Y, type RunTrace as a, type SemanticConceptJudgeInput as b, type DiffPolicy as c, FINDING_SUBJECT_GRAMMAR_PROMPT as d, FINDING_SUBJECT_KINDS as e, type FindingSubject as f, type FindingSubjectKind as g, FindingSubjectStringSchema as h, type FindingsDiff as i, FindingsStore as j, KNOWLEDGE_GAP_KIND_SPEC as k, KNOWLEDGE_POISONING_KIND_SPEC as l, SKILL_USAGE_ANALYST as m, SkillUsageAnalyst as n, type SkillUsageRecord as o, type SkillUsageReport as p, type SkillUsageScanConfig as q, buildSkillUsageReport as r, createAnalystAi as s, defaultIsMaterial as t, diffFindings as u, emitSkillUsageFindings as v, parseFindingSubject as w, renderFindingSubject as x, type RunScore as y, type RunScoreWeights as z };
@@ -1,4 +1,4 @@
1
- import { R as Run, S as Span, a as TraceEvent, A as Artifact, B as BudgetLedgerEntry, f as RunStatus, g as RunLayer, c as SpanKind, E as EventKind } from './schema-m0gsnbt3.js';
1
+ import { R as Run, S as Span, e as TraceEvent, A as Artifact, B as BudgetLedgerEntry, f as RunStatus, g as RunLayer, b as SpanKind, E as EventKind } from './schema-SGWcK9wa.js';
2
2
 
3
3
  interface RunFilter {
4
4
  scenarioId?: string;
@@ -1,4 +1,4 @@
1
- import { S as Span } from '../schema-m0gsnbt3.js';
1
+ import { S as Span } from '../schema-SGWcK9wa.js';
2
2
 
3
3
  /**
4
4
  * Code-edit extraction + the "watch the agent write code" animation.
@@ -1,5 +1,5 @@
1
- import { R as RunRecord } from './run-record-I-Z3JNvO.js';
2
- import { F as FailureClusterReport } from './failure-cluster-DH9Flgcf.js';
1
+ import { R as RunRecord } from './run-record-DksGsfgv.js';
2
+ import { F as FailureClusterReport } from './failure-cluster-C48PiReX.js';
3
3
 
4
4
  /**
5
5
  * HeldOutGate — first-class held-out paired-delta promotion gate.
@@ -1,6 +1,6 @@
1
- import { T as TraceEmitter } from './emitter-C2rqGH_l.js';
2
- import { R as Run, F as FailureClass } from './schema-m0gsnbt3.js';
3
- import { T as TraceStore } from './store-BcFXE6LG.js';
1
+ import { T as TraceEmitter } from './emitter-BRchAAAx.js';
2
+ import { R as Run, F as FailureClass } from './schema-SGWcK9wa.js';
3
+ import { T as TraceStore } from './store-BsVi7ncX.js';
4
4
 
5
5
  /**
6
6
  * SandboxHarness — executes a scenario in an isolated environment and
package/dist/traces.d.ts CHANGED
@@ -1,20 +1,19 @@
1
1
  import { N as NotFoundError, R as ReplayError } from './errors-oeQrLqXC.js';
2
2
  import { P as ProviderRedactor, R as RawProviderSink, d as RawProviderEvent } from './raw-provider-sink-C46HDghv.js';
3
3
  export { F as FileSystemRawProviderSink, a as FileSystemRawProviderSinkOptions, I as InMemoryRawProviderSink, b as InMemoryRawProviderSinkOptions, N as NoopRawProviderSink, c as RawProviderDirection, e as RawProviderSinkFilter, f as defaultProviderRedactor, p as providerFromBaseUrl } from './raw-provider-sink-C46HDghv.js';
4
- import { a as RunCompleteHookContext, R as RunCompleteHook } from './emitter-C2rqGH_l.js';
5
- export { S as SpanHandle, T as TraceEmitter, b as TraceEmitterOptions, l as llmSpanFromProvider } from './emitter-C2rqGH_l.js';
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-DqGZg3st.js';
7
- import { T as TraceStore } from './store-BcFXE6LG.js';
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-0aTmbmQe.js';
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
- import { R as Run } from './schema-m0gsnbt3.js';
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';
4
+ import { a as RunCompleteHookContext, R as RunCompleteHook } from './emitter-BRchAAAx.js';
5
+ export { S as SpanHandle, T as TraceEmitter, b as TraceEmitterOptions, l as llmSpanFromProvider } from './emitter-BRchAAAx.js';
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-qemeBAyx.js';
7
+ import { T as TraceStore } from './store-BsVi7ncX.js';
8
+ export { E as EventFilter, F as FileSystemTraceStore, a as FileSystemTraceStoreOptions, I as InMemoryTraceStore, R as RunFilter, S as SpanFilter } from './store-BsVi7ncX.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-Ck190MOd.js';
10
+ import { R as Run } from './schema-SGWcK9wa.js';
11
+ 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, c as RetrievalSpan, g as RunLayer, a as RunOutcome, f as RunStatus, d as SandboxSpan, S as Span, j as SpanBase, b as SpanKind, k as SpanStatus, l as TRACE_SCHEMA_VERSION, T as ToolSpan, e as TraceEvent, m as isJudgeSpan, n as isLlmSpan, o as isRetrievalSpan, p as isSandboxSpan, q as isToolSpan } from './schema-SGWcK9wa.js';
13
12
  import { A as AnalyzeTracesOptions, b as AnalyzeTracesResult } from './analyst-C8HHvfJp.js';
14
13
  export { a as AnalyzeTracesInput, c as AnalyzeTracesTurnSnapshot, d as analyzeTraces } from './analyst-C8HHvfJp.js';
15
14
  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
15
  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-I-Z3JNvO.js';
16
+ import { b as RunSplitTag, c as RunTokenUsage, R as RunRecord } from './run-record-DksGsfgv.js';
18
17
  import { AxFunction } from '@ax-llm/ax';
19
18
  import '@tangle-network/agent-interface';
20
19
 
@@ -782,6 +781,50 @@ declare function otelRunCompleteHook(exporter: OtelExporter): RunCompleteHook;
782
781
  */
783
782
  declare function createOtelTracingStore(inner: TraceStore, exporter: OtelExporter, traceId: string): TraceStore;
784
783
 
784
+ /**
785
+ * Redaction — remove PII / secrets from trace payloads before persist.
786
+ *
787
+ * Pre-persistence rules mean raw traces in storage are already scrubbed.
788
+ * Unredacted variants (for debugging / post-mortems) live in a separate
789
+ * storage layer with stricter access controls; this module only covers
790
+ * the default scrub-then-persist path.
791
+ *
792
+ * Rules compose: pass an array of `RedactionRule`, each is applied in
793
+ * order. Strings that match get replaced with a tagged sentinel so the
794
+ * eval framework can count how many redactions happened per run
795
+ * (surfaced via `redaction_applied` events).
796
+ */
797
+ interface RedactionRule {
798
+ id: string;
799
+ pattern: RegExp;
800
+ /** Replacement — e.g. '[PII:email]'. Defaults to `[redacted:{id}]`. */
801
+ replacement?: string;
802
+ }
803
+ interface RedactionReport {
804
+ redactionCount: number;
805
+ byRule: Record<string, number>;
806
+ }
807
+ /** OWASP / common-sense defaults — extend per-domain. */
808
+ declare const DEFAULT_REDACTION_RULES: RedactionRule[];
809
+ declare const REDACTION_VERSION = "1.0.0";
810
+ /**
811
+ * Redact a single string. Returns the new string and a per-rule count of
812
+ * how many substitutions fired.
813
+ */
814
+ declare function redactString(input: string, rules?: RedactionRule[]): {
815
+ output: string;
816
+ report: RedactionReport;
817
+ };
818
+ /**
819
+ * Walk a JSON-ish value applying `redactString` to every string leaf.
820
+ * Arrays and plain objects are recursed; other types pass through
821
+ * untouched. Circular references throw — traces should be tree-shaped.
822
+ */
823
+ declare function redactValue(value: unknown, rules?: RedactionRule[], report?: RedactionReport): {
824
+ value: unknown;
825
+ report: RedactionReport;
826
+ };
827
+
785
828
  /**
786
829
  * Convert agent-eval's internal trace shape (`FileSystemTraceStore` → `Run`,
787
830
  * `Span`, `TraceEvent`) into the OTLP-flat JSONL the trace analyst
@@ -973,4 +1016,4 @@ declare function iterateRawCalls(sink: RawProviderSink, filter?: {
973
1016
  spanId?: string;
974
1017
  }): AsyncGenerator<ReplayCacheEntry>;
975
1018
 
976
- export { AnalyzeTracesOptions, AnalyzeTracesResult, type CaptureFetchContext, type CaptureFetchOptions, DatasetOverview, type ExportableSpan, type ExtractedUsage, type FlattenOtlpOptions, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, 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, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, type OtelExportConfig, type OtelExporter, type OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, type OtlpResourceSpans, type OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, ProviderRedactor, QueryTracesPage, RawProviderEvent, RawProviderSink, ReplayCache, type ReplayCacheEntry, ReplayCacheMissError, type ReplayCacheStats, type ReplayFetchOptions, Run, RunCompleteHook, RunCompleteHookContext, SPAN_KIND_ATTR_KEYS, SearchSpanResult, SearchTraceResult, SpanNotFoundError, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, type TraceAggregate, TraceAnalysisStore, TraceAnalystFilters, type TraceAnalystHookOptions, TraceAnalystSpanKind, TraceAnalystSpanStatus, TraceFileMissingError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, TraceStore, type TraceStoreSource, type TraceStoreToOtlpOptions, type TracesToOtlpResult, ViewSpansResult, ViewTraceResult, asNumber, asString, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, inferDomainKeywords, inferOtlpKind, iterateRawCalls, otelRunCompleteHook, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, readOtlpStatus, scoreTraceInsightReadiness, stringField, tokenizeDomainWords, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
1019
+ export { AnalyzeTracesOptions, AnalyzeTracesResult, type CaptureFetchContext, type CaptureFetchOptions, DEFAULT_REDACTION_RULES, DatasetOverview, type ExportableSpan, type ExtractedUsage, type FlattenOtlpOptions, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, 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, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, type OtelExportConfig, type OtelExporter, type OtlpExport, OtlpFileTraceStore, type OtlpFileTraceStoreOptions, type OtlpFlatLine, type OtlpResourceSpans, type OtlpSpan, type OtlpToRunRecordsOptions, type OtlpTraceRunRecord, type ProjectedOtlpSpan, ProviderRedactor, QueryTracesPage, REDACTION_VERSION, RawProviderEvent, RawProviderSink, type RedactionReport, type RedactionRule, ReplayCache, type ReplayCacheEntry, ReplayCacheMissError, type ReplayCacheStats, type ReplayFetchOptions, Run, RunCompleteHook, RunCompleteHookContext, SPAN_KIND_ATTR_KEYS, SearchSpanResult, SearchTraceResult, SpanNotFoundError, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, type TraceAggregate, TraceAnalysisStore, TraceAnalystFilters, type TraceAnalystHookOptions, TraceAnalystSpanKind, TraceAnalystSpanStatus, TraceFileMissingError, type TraceInsightContext, type TraceInsightFinding, type TraceInsightPanelRole, type TraceInsightPromptInput, type TraceInsightQualityGate, type TraceInsightQuestion, type TraceInsightReadiness, type TraceInsightSuite, type TraceInsightTask, TraceNotFoundError, TraceStore, type TraceStoreSource, type TraceStoreToOtlpOptions, type TracesToOtlpResult, ViewSpansResult, ViewTraceResult, asNumber, asString, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, inferDomainKeywords, inferOtlpKind, iterateRawCalls, otelRunCompleteHook, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, readOtlpStatus, redactString, redactValue, scoreTraceInsightReadiness, stringField, tokenizeDomainWords, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind };
package/dist/traces.js CHANGED
@@ -28,7 +28,24 @@ import {
28
28
  scoreTraceInsightReadiness,
29
29
  tokenizeDomainWords,
30
30
  traceAnalystOnRunComplete
31
- } from "./chunk-V7HNA47Z.js";
31
+ } from "./chunk-RSVSSZKF.js";
32
+ import {
33
+ FAILURE_CLASSES,
34
+ TRACE_SCHEMA_VERSION,
35
+ aggregateLlm,
36
+ argHash,
37
+ groupBy,
38
+ isJudgeSpan,
39
+ isLlmSpan,
40
+ isRetrievalSpan,
41
+ isSandboxSpan,
42
+ isToolSpan,
43
+ judgeSpans,
44
+ llmSpans,
45
+ runFailureClass,
46
+ runsForScenario,
47
+ toolSpans
48
+ } from "./chunk-MHNQWM4I.js";
32
49
  import {
33
50
  TRACE_ANALYST_ACTOR_DESCRIPTION,
34
51
  TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION,
@@ -41,25 +58,6 @@ import {
41
58
  redactString,
42
59
  redactValue
43
60
  } from "./chunk-GGE4NNQT.js";
44
- import {
45
- aggregateLlm,
46
- argHash,
47
- groupBy,
48
- judgeSpans,
49
- llmSpans,
50
- runFailureClass,
51
- runsForScenario,
52
- toolSpans
53
- } from "./chunk-JZXGWLK5.js";
54
- import {
55
- FAILURE_CLASSES,
56
- TRACE_SCHEMA_VERSION,
57
- isJudgeSpan,
58
- isLlmSpan,
59
- isRetrievalSpan,
60
- isSandboxSpan,
61
- isToolSpan
62
- } from "./chunk-5BKGXME7.js";
63
61
  import {
64
62
  DEFAULT_TRACE_ANALYST_BUDGETS,
65
63
  LLM_CACHED_TOKENS,
@@ -99,6 +97,13 @@ import {
99
97
  assertRunCaptured,
100
98
  throwIfRunIncomplete
101
99
  } from "./chunk-TT4KNT67.js";
100
+ import {
101
+ TraceEmitter,
102
+ llmSpanFromProvider
103
+ } from "./chunk-TVVP3ZZQ.js";
104
+ import "./chunk-VK6HBGAE.js";
105
+ import "./chunk-XJYR7XFV.js";
106
+ import "./chunk-VSMTAMNK.js";
102
107
  import {
103
108
  FileSystemRawProviderSink,
104
109
  InMemoryRawProviderSink,
@@ -106,13 +111,6 @@ import {
106
111
  defaultProviderRedactor,
107
112
  providerFromBaseUrl
108
113
  } from "./chunk-PC4UYEBM.js";
109
- import "./chunk-VK6HBGAE.js";
110
- import {
111
- TraceEmitter,
112
- llmSpanFromProvider
113
- } from "./chunk-TVVP3ZZQ.js";
114
- import "./chunk-XJYR7XFV.js";
115
- import "./chunk-VSMTAMNK.js";
116
114
  import "./chunk-ONWEPEDO.js";
117
115
  import "./chunk-PZ5AY32C.js";
118
116
  export {
@@ -1,4 +1,4 @@
1
- import { c as RunTokenUsage } from './run-record-I-Z3JNvO.js';
1
+ import { c as RunTokenUsage } from './run-record-DksGsfgv.js';
2
2
 
3
3
  /**
4
4
  * Pass A substrate types — `runCampaign` is the one primitive every
@@ -557,4 +557,4 @@ interface CampaignResult<TArtifact = unknown, TScenario extends Scenario = Scena
557
557
  scenarios: Array<Pick<TScenario, 'id' | 'kind'>>;
558
558
  }
559
559
 
560
- export { type JudgeAggregate as A, type ScenarioAggregate as B, type CampaignResult as C, type DispatchFn as D, isProposedCandidate as E, labelTrustRank as F, type GateResult as G, type JudgeScore as J, type LabeledScenarioStore as L, type MutableSurface as M, type OptimizationProposer as O, type ParetoParent as P, type RedactionStatus as R, type Scenario as S, type TraceSpan as T, type JudgeConfig as a, type DispatchContext as b, type CampaignTraceWriter as c, type GenerationRecord as d, type SurfaceProposer as e, type Gate as f, type JudgeDimension as g, type GateDecision as h, type CampaignAggregates as i, type CampaignArtifactWriter as j, type CampaignCellResult as k, type CampaignCostMeter as l, type CodeSurface as m, type GateContext as n, type GenerationCandidate as o, type Mutator as p, type OptimizerConfig as q, type SessionScript as r, type LabeledScenarioWrite as s, type LabeledScenarioSampleArgs as t, type LabeledScenarioRecord as u, type LabelTrust as v, type ProposedCandidate as w, type ProposeContext as x, type LabeledScenarioSource as y, type CampaignTokenUsage as z };
560
+ export { type JudgeAggregate as A, type ScenarioAggregate as B, type CampaignResult as C, type DispatchContext as D, isProposedCandidate as E, labelTrustRank as F, type GateResult as G, type JudgeScore as J, type LabeledScenarioStore as L, type MutableSurface as M, type OptimizationProposer as O, type ParetoParent as P, type RedactionStatus as R, type Scenario as S, type TraceSpan as T, type JudgeDimension as a, type JudgeConfig as b, type DispatchFn as c, type CampaignTraceWriter as d, type GenerationRecord as e, type SurfaceProposer as f, type Gate as g, type GateDecision as h, type CampaignAggregates as i, type CampaignArtifactWriter as j, type CampaignCellResult as k, type CampaignCostMeter as l, type CodeSurface as m, type GateContext as n, type GenerationCandidate as o, type Mutator as p, type OptimizerConfig as q, type SessionScript as r, type LabeledScenarioWrite as s, type LabeledScenarioSampleArgs as t, type LabeledScenarioRecord as u, type LabelTrust as v, type ProposedCandidate as w, type ProposeContext as x, type LabeledScenarioSource as y, type CampaignTokenUsage as z };
@@ -1,14 +1,13 @@
1
- import { F as FeedbackTrajectoryStore } from '../feedback-trajectory-C9KCo8ag.js';
2
- import { T as TraceStore } from '../store-BcFXE6LG.js';
1
+ import { F as FeedbackTrajectoryStore } from '../feedback-trajectory-pDcz1lQ1.js';
2
+ import { T as TraceStore } from '../store-BsVi7ncX.js';
3
3
  import { z } from 'zod';
4
4
  import { OpenAPIObject } from 'openapi3-ts/oas31';
5
5
  import * as hono_types from 'hono/types';
6
6
  import { ServerType } from '@hono/node-server';
7
7
  import { Hono } from 'hono';
8
- import '../control-runtime-Acf9CGhw.js';
9
- import '../emitter-C2rqGH_l.js';
10
- import '../schema-m0gsnbt3.js';
11
- import '../dataset-DS7ytHZU.js';
8
+ import '../emitter-BRchAAAx.js';
9
+ import '../schema-SGWcK9wa.js';
10
+ import '../dataset-NENEzRgk.js';
12
11
  import '../errors-oeQrLqXC.js';
13
12
 
14
13
  declare const RubricDimensionSchema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-eval",
3
- "version": "0.109.1",
3
+ "version": "0.110.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": {
@@ -39,11 +39,6 @@
39
39
  "import": "./dist/rl.js",
40
40
  "default": "./dist/rl.js"
41
41
  },
42
- "./diagnose": {
43
- "types": "./dist/diagnose.d.ts",
44
- "import": "./dist/diagnose.js",
45
- "default": "./dist/diagnose.js"
46
- },
47
42
  "./fuzz": {
48
43
  "types": "./dist/fuzz.d.ts",
49
44
  "import": "./dist/fuzz.js",
@@ -54,16 +49,6 @@
54
49
  "import": "./dist/traces.js",
55
50
  "default": "./dist/traces.js"
56
51
  },
57
- "./telemetry": {
58
- "types": "./dist/telemetry/index.d.ts",
59
- "import": "./dist/telemetry/index.js",
60
- "default": "./dist/telemetry/index.js"
61
- },
62
- "./telemetry/file": {
63
- "types": "./dist/telemetry/file.d.ts",
64
- "import": "./dist/telemetry/file.js",
65
- "default": "./dist/telemetry/file.js"
66
- },
67
52
  "./wire": {
68
53
  "types": "./dist/wire/index.d.ts",
69
54
  "import": "./dist/wire/index.js",
@@ -84,41 +69,16 @@
84
69
  "import": "./dist/meta-eval/index.js",
85
70
  "default": "./dist/meta-eval/index.js"
86
71
  },
87
- "./prm": {
88
- "types": "./dist/prm/index.d.ts",
89
- "import": "./dist/prm/index.js",
90
- "default": "./dist/prm/index.js"
91
- },
92
72
  "./builder-eval": {
93
73
  "types": "./dist/builder-eval/index.d.ts",
94
74
  "import": "./dist/builder-eval/index.js",
95
75
  "default": "./dist/builder-eval/index.js"
96
76
  },
97
- "./governance": {
98
- "types": "./dist/governance/index.d.ts",
99
- "import": "./dist/governance/index.js",
100
- "default": "./dist/governance/index.js"
101
- },
102
- "./knowledge": {
103
- "types": "./dist/knowledge/index.d.ts",
104
- "import": "./dist/knowledge/index.js",
105
- "default": "./dist/knowledge/index.js"
106
- },
107
77
  "./matrix": {
108
78
  "types": "./dist/matrix/index.d.ts",
109
79
  "import": "./dist/matrix/index.js",
110
80
  "default": "./dist/matrix/index.js"
111
81
  },
112
- "./perf": {
113
- "types": "./dist/perf/index.d.ts",
114
- "import": "./dist/perf/index.js",
115
- "default": "./dist/perf/index.js"
116
- },
117
- "./product-benchmark": {
118
- "types": "./dist/product-benchmark/index.d.ts",
119
- "import": "./dist/product-benchmark/index.js",
120
- "default": "./dist/product-benchmark/index.js"
121
- },
122
82
  "./multishot": {
123
83
  "types": "./dist/multishot/index.d.ts",
124
84
  "import": "./dist/multishot/index.js",
@@ -139,51 +99,21 @@
139
99
  "import": "./dist/authenticity/index.js",
140
100
  "default": "./dist/authenticity/index.js"
141
101
  },
142
- "./groundedness": {
143
- "types": "./dist/groundedness/index.d.ts",
144
- "import": "./dist/groundedness/index.js",
145
- "default": "./dist/groundedness/index.js"
146
- },
147
102
  "./belief-state": {
148
103
  "types": "./dist/belief-state/index.d.ts",
149
104
  "import": "./dist/belief-state/index.js",
150
105
  "default": "./dist/belief-state/index.js"
151
106
  },
152
- "./workflow": {
153
- "types": "./dist/workflow/index.d.ts",
154
- "import": "./dist/workflow/index.js",
155
- "default": "./dist/workflow/index.js"
156
- },
157
107
  "./contract": {
158
108
  "types": "./dist/contract/index.d.ts",
159
109
  "import": "./dist/contract/index.js",
160
110
  "default": "./dist/contract/index.js"
161
111
  },
162
- "./adapters/langchain": {
163
- "types": "./dist/adapters/langchain.d.ts",
164
- "import": "./dist/adapters/langchain.js",
165
- "default": "./dist/adapters/langchain.js"
166
- },
167
- "./adapters/http": {
168
- "types": "./dist/adapters/http.d.ts",
169
- "import": "./dist/adapters/http.js",
170
- "default": "./dist/adapters/http.js"
171
- },
172
- "./adapters/otel": {
173
- "types": "./dist/adapters/otel.d.ts",
174
- "import": "./dist/adapters/otel.js",
175
- "default": "./dist/adapters/otel.js"
176
- },
177
112
  "./hosted": {
178
113
  "types": "./dist/hosted/index.d.ts",
179
114
  "import": "./dist/hosted/index.js",
180
115
  "default": "./dist/hosted/index.js"
181
116
  },
182
- "./testing": {
183
- "types": "./dist/testing.d.ts",
184
- "import": "./dist/testing.js",
185
- "default": "./dist/testing.js"
186
- },
187
117
  "./openapi.json": {
188
118
  "default": "./dist/openapi.json"
189
119
  }
@@ -1,142 +0,0 @@
1
- import { S as Scenario, D as DispatchFn, b as DispatchContext } from '../types-BdIv5dvA.js';
2
- import '../run-record-I-Z3JNvO.js';
3
- import '@tangle-network/agent-interface';
4
- import '../errors-oeQrLqXC.js';
5
- import '../schema-m0gsnbt3.js';
6
-
7
- /**
8
- * # `@tangle-network/agent-eval/adapters/http` — distributed Dispatch over HTTP.
9
- *
10
- * Decouples coordinator and worker. The coordinator (running
11
- * `runImprovementLoop` or `runCampaign`) can live anywhere — your VPC, a dev
12
- * laptop, a cron VM. The workers (running the actual agent) can live anywhere else — different
13
- * regions, different clouds, different boxes — as long as they speak HTTP.
14
- *
15
- * Both sides:
16
- *
17
- * - **`httpDispatch({ url | resolveUrl, ... })`** — client. Returns a
18
- * `Dispatch` that POSTs `{ scenario, ctx }` to a worker URL and parses
19
- * the artifact back. AbortSignal-aware, retries on idempotent errors,
20
- * bounded timeout per call.
21
- * - **`runDispatchServer({ dispatch, port, ... })`** — server. Wraps your
22
- * local `Dispatch` as an HTTP endpoint. Handles auth, JSON parsing,
23
- * error mapping, and cancellation when the client aborts.
24
- *
25
- * # Topology examples
26
- *
27
- * **Single-worker:** coordinator on box A, worker on box B. Set
28
- * `httpDispatch({ url: 'https://box-b/dispatch' })`.
29
- *
30
- * **Multi-region:** N workers across regions. Use `httpDispatch({ resolveUrl })`
31
- * with a function that picks the URL per cell from `ctx.placement`. Combined
32
- * with `cellPlacement` on `RunCampaignOptions`, the substrate fans cells
33
- * across geographies in parallel.
34
- *
35
- * **Coordinator-as-a-service:** coordinator runs as a long-lived process or service
36
- * (holds optimization state across generations); workers are stateless
37
- * HTTP services that can scale horizontally per cell.
38
- */
39
-
40
- interface HttpDispatchOptions<TScenario extends Scenario, _TArtifact> {
41
- /** Static endpoint URL. Mutually exclusive with `resolveUrl`. */
42
- url?: string;
43
- /**
44
- * Dynamic per-cell URL resolver. Receives the scenario + the substrate
45
- * placement key (from `RunCampaignOptions.cellPlacement`) and returns the
46
- * worker URL to invoke. Mutually exclusive with `url`.
47
- */
48
- resolveUrl?: (input: {
49
- scenario: TScenario;
50
- placement?: string;
51
- cellId: string;
52
- }) => string;
53
- /** Bearer token or static auth string set as `Authorization`. */
54
- auth?: string | (() => string | Promise<string>);
55
- /** Extra headers merged into every request. */
56
- headers?: Record<string, string>;
57
- /** Per-call timeout in ms. Default 5 minutes. */
58
- timeoutMs?: number;
59
- /** How many idempotent retries on 5xx / network errors. Default 2. */
60
- retries?: number;
61
- /** Optional fetch override (auth wrappers, custom agent, mocks). */
62
- fetchImpl?: typeof fetch;
63
- }
64
- interface HttpDispatchRequestBody<TScenario extends Scenario> {
65
- scenario: TScenario;
66
- cellId: string;
67
- rep: number;
68
- generation?: number;
69
- seed: number;
70
- placement?: string;
71
- cycleId?: string;
72
- }
73
- interface HttpDispatchResponseBody<TArtifact> {
74
- artifact: TArtifact;
75
- }
76
- /**
77
- * Wrap a remote HTTP endpoint as a `Dispatch`. The remote side should run
78
- * `runDispatchServer` (or any service that speaks the same wire shape).
79
- *
80
- * Cancellation: the substrate's per-cell `AbortSignal` is forwarded; the
81
- * server's `runDispatchServer` translates the resulting `AbortError` into
82
- * a 499 (client-closed) so the client doesn't retry.
83
- */
84
- declare function httpDispatch<TScenario extends Scenario, TArtifact>(opts: HttpDispatchOptions<TScenario, TArtifact>): DispatchFn<TScenario, TArtifact>;
85
- interface RunDispatchServerOptions<TScenario extends Scenario, TArtifact> {
86
- /** The Dispatch this server exposes — what runs when a request lands. */
87
- dispatch: DispatchFn<TScenario, TArtifact>;
88
- /** TCP port to bind. */
89
- port: number;
90
- /** Optional bind host; defaults to 0.0.0.0. */
91
- host?: string;
92
- /** Required for any non-test deployment: the bearer token clients must
93
- * send. The substrate refuses to start without auth unless `auth: false`
94
- * is set explicitly (intended ONLY for closed-network/internal testing). */
95
- auth: string | false;
96
- /** Path the server listens on. Default `/dispatch`. */
97
- path?: string;
98
- /**
99
- * Per-request handler that wraps `dispatch` with whatever context the
100
- * worker side needs to construct a `DispatchContext` — typically the
101
- * trace writer, artifact writer, and cost meter. The substrate provides
102
- * synthetic-but-typed defaults if not supplied; production deployments
103
- * should wire real ones (e.g. ship traces to your OTel collector).
104
- */
105
- contextFactory?: (req: HttpDispatchRequestBody<TScenario>, signal: AbortSignal) => Promise<DispatchContext>;
106
- /** Optional max payload size for the request body (bytes). Default 10 MB. */
107
- maxBodyBytes?: number;
108
- /** Hook for observability — called on every successful or failed turn. */
109
- onRequest?: (event: {
110
- cellId: string;
111
- durationMs: number;
112
- success: boolean;
113
- error?: unknown;
114
- }) => void;
115
- }
116
- interface DispatchServerHandle {
117
- /** The actual bound port (useful when `port: 0` requests an ephemeral port). */
118
- port: number;
119
- /** Stop accepting new connections and drain existing ones. */
120
- close: () => Promise<void>;
121
- }
122
- /**
123
- * Start an HTTP server exposing a local `Dispatch` over the wire. Pair with
124
- * `httpDispatch` on the driver side.
125
- *
126
- * Wire shape:
127
- *
128
- * POST /dispatch
129
- * Authorization: Bearer <token>
130
- * Body: HttpDispatchRequestBody
131
- * 200 OK: HttpDispatchResponseBody
132
- * 401: missing/invalid auth
133
- * 408: per-request timeout exceeded
134
- * 499: client aborted before completion
135
- * 500: dispatch threw
136
- *
137
- * The server is `node:http`-based to keep the runtime dependency surface
138
- * minimal — works in plain Node, sandbox, or any container.
139
- */
140
- declare function runDispatchServer<TScenario extends Scenario, TArtifact>(opts: RunDispatchServerOptions<TScenario, TArtifact>): Promise<DispatchServerHandle>;
141
-
142
- export { type DispatchServerHandle, type HttpDispatchOptions, type HttpDispatchRequestBody, type HttpDispatchResponseBody, type RunDispatchServerOptions, httpDispatch, runDispatchServer };