@tangle-network/agent-eval 0.118.0 → 0.118.2

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 (66) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/analyst/index.d.ts +10 -3
  3. package/dist/analyst/index.js +6 -6
  4. package/dist/benchmarks/index.js +9 -9
  5. package/dist/campaign/index.d.ts +22 -15
  6. package/dist/campaign/index.js +8 -8
  7. package/dist/{chunk-3EHHMC6E.js → chunk-63KG3ASG.js} +2 -2
  8. package/dist/{chunk-DP3BBMYJ.js → chunk-6JQE3YVE.js} +34 -45
  9. package/dist/chunk-6JQE3YVE.js.map +1 -0
  10. package/dist/{chunk-SVH2ANFD.js → chunk-7V3QDWNL.js} +2 -2
  11. package/dist/{chunk-QKEGNI5B.js → chunk-BUBU3YHT.js} +2 -2
  12. package/dist/{chunk-BFW56GTT.js → chunk-DRSFTBKU.js} +3 -3
  13. package/dist/{chunk-BFW56GTT.js.map → chunk-DRSFTBKU.js.map} +1 -1
  14. package/dist/{chunk-OIIMMLRB.js → chunk-DZBCDDIE.js} +3 -3
  15. package/dist/chunk-DZBCDDIE.js.map +1 -0
  16. package/dist/{chunk-IDZTTFRR.js → chunk-EGNRE7VA.js} +2 -2
  17. package/dist/chunk-EGNRE7VA.js.map +1 -0
  18. package/dist/{chunk-Q442S5AS.js → chunk-GCT3DQWU.js} +7 -7
  19. package/dist/chunk-GCT3DQWU.js.map +1 -0
  20. package/dist/{chunk-YLMUS4MM.js → chunk-I42AAGHL.js} +5 -5
  21. package/dist/chunk-I42AAGHL.js.map +1 -0
  22. package/dist/{chunk-33JA4TFA.js → chunk-J23QK2U5.js} +8 -3
  23. package/dist/chunk-J23QK2U5.js.map +1 -0
  24. package/dist/{chunk-LTVG32KX.js → chunk-JTMFT5QZ.js} +2 -2
  25. package/dist/chunk-JTMFT5QZ.js.map +1 -0
  26. package/dist/{chunk-JSDVRFAP.js → chunk-KK2O4VWA.js} +2 -2
  27. package/dist/{chunk-VCTY3W6J.js → chunk-MLHRFWQK.js} +1 -1
  28. package/dist/chunk-MLHRFWQK.js.map +1 -0
  29. package/dist/chunk-NW4AQBXD.js +53 -0
  30. package/dist/chunk-NW4AQBXD.js.map +1 -0
  31. package/dist/{chunk-KSDQVPLR.js → chunk-TVXPJJ7H.js} +2 -2
  32. package/dist/cli.js +2 -2
  33. package/dist/contract/index.d.ts +17 -10
  34. package/dist/contract/index.js +9 -9
  35. package/dist/contract/index.js.map +1 -1
  36. package/dist/fuzz.d.ts +8 -1
  37. package/dist/fuzz.js +1 -1
  38. package/dist/fuzz.js.map +1 -1
  39. package/dist/index.d.ts +52 -17
  40. package/dist/index.js +25 -15
  41. package/dist/index.js.map +1 -1
  42. package/dist/openapi.json +1 -1
  43. package/dist/{run-campaign-IM26A6PD.js → run-campaign-DWC67KJP.js} +3 -3
  44. package/dist/trace-attributes.d.ts +21 -1
  45. package/dist/trace-attributes.js +9 -3
  46. package/dist/traces.d.ts +29 -1
  47. package/dist/traces.js +16 -6
  48. package/dist/wire/index.d.ts +8 -1
  49. package/dist/wire/index.js +2 -2
  50. package/package.json +1 -1
  51. package/dist/chunk-33JA4TFA.js.map +0 -1
  52. package/dist/chunk-DP3BBMYJ.js.map +0 -1
  53. package/dist/chunk-IDZTTFRR.js.map +0 -1
  54. package/dist/chunk-LTVG32KX.js.map +0 -1
  55. package/dist/chunk-OIIMMLRB.js.map +0 -1
  56. package/dist/chunk-Q442S5AS.js.map +0 -1
  57. package/dist/chunk-VCTY3W6J.js.map +0 -1
  58. package/dist/chunk-WDHBCA3M.js +0 -31
  59. package/dist/chunk-WDHBCA3M.js.map +0 -1
  60. package/dist/chunk-YLMUS4MM.js.map +0 -1
  61. /package/dist/{chunk-3EHHMC6E.js.map → chunk-63KG3ASG.js.map} +0 -0
  62. /package/dist/{chunk-SVH2ANFD.js.map → chunk-7V3QDWNL.js.map} +0 -0
  63. /package/dist/{chunk-QKEGNI5B.js.map → chunk-BUBU3YHT.js.map} +0 -0
  64. /package/dist/{chunk-JSDVRFAP.js.map → chunk-KK2O4VWA.js.map} +0 -0
  65. /package/dist/{chunk-KSDQVPLR.js.map → chunk-TVXPJJ7H.js.map} +0 -0
  66. /package/dist/{run-campaign-IM26A6PD.js.map → run-campaign-DWC67KJP.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -5,9 +5,9 @@ import {
5
5
  runRpcBatch,
6
6
  runRpcOnce,
7
7
  startServer
8
- } from "./chunk-LTVG32KX.js";
8
+ } from "./chunk-JTMFT5QZ.js";
9
9
  import "./chunk-NJC7U437.js";
10
- import "./chunk-VCTY3W6J.js";
10
+ import "./chunk-MLHRFWQK.js";
11
11
  import "./chunk-VI2UW6B6.js";
12
12
  import "./chunk-PC4UYEBM.js";
13
13
  import "./chunk-ONWEPEDO.js";
@@ -617,6 +617,13 @@ declare class CostLedger {
617
617
  private ensureCostLimitPersisted;
618
618
  private appendEvent;
619
619
  }
620
+ /** Public callback surface for a shared cost ledger.
621
+ *
622
+ * Declaration bundles may expose this type through multiple package subpaths.
623
+ * Keeping callback contracts structural lets those subpaths compose while the
624
+ * concrete {@link CostLedger} retains its private durable state.
625
+ */
626
+ type CostLedgerHandle = Pick<CostLedger, keyof CostLedger>;
620
627
 
621
628
  interface Scenario$1 {
622
629
  id: string;
@@ -673,7 +680,7 @@ interface JudgeInput {
673
680
  turns: TurnResult[];
674
681
  artifacts: CollectedArtifacts;
675
682
  /** Shared ledger for paid built-in judges. Direct calls default to an uncapped ledger. */
676
- costLedger?: CostLedger;
683
+ costLedger?: CostLedgerHandle;
677
684
  costPhase?: string;
678
685
  costTags?: Record<string, string>;
679
686
  signal?: AbortSignal;
@@ -1389,7 +1396,7 @@ interface JudgeConfig<TArtifact, TScenario extends Scenario = Scenario> {
1389
1396
  scenario: TScenario;
1390
1397
  signal: AbortSignal;
1391
1398
  /** Shared run spend account and receipt attribution phase. */
1392
- costLedger?: CostLedger;
1399
+ costLedger?: CostLedgerHandle;
1393
1400
  costPhase?: string;
1394
1401
  costTags?: Record<string, string>;
1395
1402
  }): JudgeScore | Promise<JudgeScore>;
@@ -1573,7 +1580,7 @@ interface ProposeContext<TFindings = unknown> {
1573
1580
  * reflection may ignore it. See {@link ParetoParent}. */
1574
1581
  paretoParents?: ParetoParent[];
1575
1582
  /** Shared run spend account and receipt attribution phase. */
1576
- costLedger?: CostLedger;
1583
+ costLedger?: CostLedgerHandle;
1577
1584
  costPhase?: string;
1578
1585
  /** FIREWALL (non-negotiable): the held-out judge is write-only — its verdicts
1579
1586
  * score the chosen output and gate promotion, and are NEVER an input to
@@ -1657,7 +1664,7 @@ interface GateContext<TArtifact, TScenario extends Scenario> {
1657
1664
  baseline: number;
1658
1665
  };
1659
1666
  /** Shared run spend account and receipt attribution phase. */
1660
- costLedger?: CostLedger;
1667
+ costLedger?: CostLedgerHandle;
1661
1668
  costPhase?: string;
1662
1669
  signal: AbortSignal;
1663
1670
  }
@@ -1999,7 +2006,7 @@ interface RunCampaignOptions<TScenario extends Scenario, TArtifact> {
1999
2006
  costCeiling?: number;
2000
2007
  /** Shared spend account. Improvement loops pass one ledger through every
2001
2008
  * campaign so the ceiling and returned total are run-wide. */
2002
- costLedger?: CostLedger;
2009
+ costLedger?: CostLedgerHandle;
2003
2010
  /** Attribution label for receipts recorded by this campaign. */
2004
2011
  costPhase?: string;
2005
2012
  /** Max concurrent cells. Default 2. */
@@ -2196,7 +2203,7 @@ interface RunOptimizationBaseOptions<TScenario extends Scenario, TArtifact> exte
2196
2203
  }>;
2197
2204
  history: GenerationRecord[];
2198
2205
  /** Shared run spend account and receipt attribution phase. */
2199
- costLedger?: CostLedger;
2206
+ costLedger?: CostLedgerHandle;
2200
2207
  costPhase?: string;
2201
2208
  }) => Promise<unknown[]>;
2202
2209
  }
@@ -2325,7 +2332,7 @@ interface ReferenceEquivalenceJudgeOptions {
2325
2332
  /** Used only by the direct-call adapter. */
2326
2333
  signal?: AbortSignal;
2327
2334
  /** Optional receipt destination for direct calls; campaigns supply their own. */
2328
- costLedger?: CostLedger;
2335
+ costLedger?: CostLedgerHandle;
2329
2336
  }
2330
2337
  interface ReferenceEquivalenceJudgeResult extends LlmCallMetadata {
2331
2338
  kind: 'reference-equivalence';
@@ -2414,7 +2421,7 @@ interface GepaProposerOptions {
2414
2421
  /** Model that performs the reflection. */
2415
2422
  model: string;
2416
2423
  /** Optional ledger for direct proposer use. Campaign context takes precedence. */
2417
- costLedger?: CostLedger;
2424
+ costLedger?: CostLedgerHandle;
2418
2425
  /** What is being optimized — appears in the reflection prompt for orientation. */
2419
2426
  target: string;
2420
2427
  /** Surface-specific mutation levers offered to the model. */
@@ -3860,7 +3867,7 @@ interface SelfImproveResult<TScenario extends Scenario, TArtifact> {
3860
3867
  declare class SelfImproveRunError extends Error {
3861
3868
  readonly cost: CostLedgerSummary;
3862
3869
  readonly receipts: CostReceipt[];
3863
- constructor(cause: unknown, ledger: CostLedger);
3870
+ constructor(cause: unknown, ledger: CostLedgerHandle);
3864
3871
  }
3865
3872
  /**
3866
3873
  * One-shot self-improvement loop. See module docstring for defaults +
@@ -4829,4 +4836,4 @@ interface FromOtelSpansOptions {
4829
4836
  }
4830
4837
  declare function fromOtelSpans(opts: FromOtelSpansOptions): RunRecord[];
4831
4838
 
4832
- export { type AgentEvalAgent, type AgentEvalEvaluateOptions, type AgentEvalImproveOptions, type AgentTraceContributor, type AgentTraceContributorType, type AgentTraceConversation, type AgentTraceFile, type AgentTraceIndex, type AgentTraceRange, type AgentTraceRecord, type AnalystFinding, type AnalyzeRunsOptions, type AuthoringProvenance, type AxisEvidence, type AxisVerdict, type BuildEvidenceVectorOptions, type CampaignAggregates, type CampaignArtifactWriter, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignStorage, type CampaignTraceWriter, type ChatClient, type CodeAgentSessionDiagnostic, type CodeAgentSessionIntakeOptions, type CodeAgentSessionIntakeResult, type CodeAgentSessionMetrics, type CodeAgentSessionSource, type CodeSurface, type CostProvenanceSummary, type CreateChatClientOpts, type DefaultAnalystRegistryOptions, type DefaultProductionGateOptions, type DefineAgentEvalOptions, type DefinedAgentEval, type DeploymentOutcome, type DispatchFn as Dispatch, type DispatchContext, type EvalCellScoreDelta, type EvalDimensionDelta, type EvalGenerationDiff, type EvalReportingSuiteInput, type EvalReportingSuiteOptions, type EvalReportingSuiteResult, type EvalRunDiff, type EvidenceVector, type EvolutionaryProposerOptions, type ExecutionInsight, type ExecutionReport, type FailureClusterInsight, type FeedbackTableMeta, type FeedbackTableRow, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, type FromFeedbackTableOptions, type FromFeedbackTableResult, type FromOtelSpansOptions, type FromRunRecordDirOptions, type FromRunRecordDirResult, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerOptions, type HeldOutGateOptions, type HostedTenant, InMemoryOutcomeStore, type InsightReport, type InterRaterInsight, type JudgeConfig, type JudgeDimension, type JudgeInsight, type JudgeScore, type LiftInsight, type MutableSurface, type Mutator, type ObjectiveSource, type OptimizationProposer, type OptimizerConfig, type OutcomeCorrelationInsight, type OutcomeStore, type ParetoSignificanceGateOptions, type ParsedCodeAgentJsonl, type PartitionByAuthoringModelResult, type PromotionObjective, type PromotionPolicy, REFERENCE_EQUIVALENCE_INPUT_LIMITS, REFERENCE_EQUIVALENCE_JUDGE_VERSION, type Recommendation, type ReferenceEquivalenceJudgeInput, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceJudgeResult, type ReferenceEquivalenceScenario, type ReleaseSummary, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunRecordRejection, type ScalarDistribution, type Scenario, type SelfImproveBudget, type SelfImproveLlm, type SelfImproveOptions, type SelfImproveProgressEvent, type SelfImproveResult, SelfImproveRunError, type SessionScript, type SummarizeExecutionOptions, type SurfaceProposer, type TokenUsageInsight, analyzeRuns, buildDefaultAnalystRegistry, buildEvidenceVector, composeGate, createChatClient, createReferenceEquivalenceJudge, defaultProductionGate, defineAgentEval, diffGenerations, diffRunBaselineToWinner, diffRuns, evalReportingSuite, evolutionaryProposer, fromClaudeCodeSession, fromCodexSession, fromFeedbackTable, fromKimiCodeSession, fromOpenCodeSession, fromOtelSpans, fromPiSession, fromPigraphSession, fromRunRecordDir, fsCampaignStorage, gepaProposer, heldOutGate, inMemoryCampaignStorage, paretoPolicy, paretoSignificanceGate, parseAgentTrace, parseCodeAgentJsonl, partitionRunsByAuthoringModel, runCampaign, runEval, runImprovementLoop, runReferenceEquivalenceJudge, selfImprove, summarizeExecution };
4839
+ export { type AgentEvalAgent, type AgentEvalEvaluateOptions, type AgentEvalImproveOptions, type AgentTraceContributor, type AgentTraceContributorType, type AgentTraceConversation, type AgentTraceFile, type AgentTraceIndex, type AgentTraceRange, type AgentTraceRecord, type AnalystFinding, type AnalyzeRunsOptions, type AuthoringProvenance, type AxisEvidence, type AxisVerdict, type BuildEvidenceVectorOptions, type CampaignAggregates, type CampaignArtifactWriter, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignStorage, type CampaignTraceWriter, type ChatClient, type CodeAgentSessionDiagnostic, type CodeAgentSessionIntakeOptions, type CodeAgentSessionIntakeResult, type CodeAgentSessionMetrics, type CodeAgentSessionSource, type CodeSurface, type CostLedgerHandle, type CostProvenanceSummary, type CreateChatClientOpts, type DefaultAnalystRegistryOptions, type DefaultProductionGateOptions, type DefineAgentEvalOptions, type DefinedAgentEval, type DeploymentOutcome, type DispatchFn as Dispatch, type DispatchContext, type EvalCellScoreDelta, type EvalDimensionDelta, type EvalGenerationDiff, type EvalReportingSuiteInput, type EvalReportingSuiteOptions, type EvalReportingSuiteResult, type EvalRunDiff, type EvidenceVector, type EvolutionaryProposerOptions, type ExecutionInsight, type ExecutionReport, type FailureClusterInsight, type FeedbackTableMeta, type FeedbackTableRow, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, type FromFeedbackTableOptions, type FromFeedbackTableResult, type FromOtelSpansOptions, type FromRunRecordDirOptions, type FromRunRecordDirResult, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerOptions, type HeldOutGateOptions, type HostedTenant, InMemoryOutcomeStore, type InsightReport, type InterRaterInsight, type JudgeConfig, type JudgeDimension, type JudgeInsight, type JudgeScore, type LiftInsight, type MutableSurface, type Mutator, type ObjectiveSource, type OptimizationProposer, type OptimizerConfig, type OutcomeCorrelationInsight, type OutcomeStore, type ParetoSignificanceGateOptions, type ParsedCodeAgentJsonl, type PartitionByAuthoringModelResult, type PromotionObjective, type PromotionPolicy, REFERENCE_EQUIVALENCE_INPUT_LIMITS, REFERENCE_EQUIVALENCE_JUDGE_VERSION, type Recommendation, type ReferenceEquivalenceJudgeInput, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceJudgeResult, type ReferenceEquivalenceScenario, type ReleaseSummary, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunRecordRejection, type ScalarDistribution, type Scenario, type SelfImproveBudget, type SelfImproveLlm, type SelfImproveOptions, type SelfImproveProgressEvent, type SelfImproveResult, SelfImproveRunError, type SessionScript, type SummarizeExecutionOptions, type SurfaceProposer, type TokenUsageInsight, analyzeRuns, buildDefaultAnalystRegistry, buildEvidenceVector, composeGate, createChatClient, createReferenceEquivalenceJudge, defaultProductionGate, defineAgentEval, diffGenerations, diffRunBaselineToWinner, diffRuns, evalReportingSuite, evolutionaryProposer, fromClaudeCodeSession, fromCodexSession, fromFeedbackTable, fromKimiCodeSession, fromOpenCodeSession, fromOtelSpans, fromPiSession, fromPigraphSession, fromRunRecordDir, fsCampaignStorage, gepaProposer, heldOutGate, inMemoryCampaignStorage, paretoPolicy, paretoSignificanceGate, parseAgentTrace, parseCodeAgentJsonl, partitionRunsByAuthoringModel, runCampaign, runEval, runImprovementLoop, runReferenceEquivalenceJudge, selfImprove, summarizeExecution };
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  analyzeRuns,
15
15
  summarizeExecution
16
- } from "../chunk-SVH2ANFD.js";
16
+ } from "../chunk-7V3QDWNL.js";
17
17
  import {
18
18
  REFERENCE_EQUIVALENCE_INPUT_LIMITS,
19
19
  REFERENCE_EQUIVALENCE_JUDGE_VERSION,
@@ -34,20 +34,20 @@ import {
34
34
  runReferenceEquivalenceJudge,
35
35
  surfaceContentHash,
36
36
  surfaceHash
37
- } from "../chunk-YLMUS4MM.js";
37
+ } from "../chunk-I42AAGHL.js";
38
38
  import {
39
39
  createRunCostLedger,
40
40
  fsCampaignStorage,
41
41
  inMemoryCampaignStorage,
42
42
  resolveRunDir,
43
43
  runCampaign
44
- } from "../chunk-IDZTTFRR.js";
44
+ } from "../chunk-EGNRE7VA.js";
45
45
  import {
46
46
  buildDefaultAnalystRegistry,
47
47
  createChatClient
48
- } from "../chunk-33JA4TFA.js";
48
+ } from "../chunk-J23QK2U5.js";
49
49
  import "../chunk-HHWE3POT.js";
50
- import "../chunk-OIIMMLRB.js";
50
+ import "../chunk-DZBCDDIE.js";
51
51
  import {
52
52
  FileSystemOutcomeStore,
53
53
  InMemoryOutcomeStore
@@ -56,18 +56,18 @@ import "../chunk-ARU2PZFM.js";
56
56
  import "../chunk-NJC7U437.js";
57
57
  import "../chunk-DPZAEKA6.js";
58
58
  import "../chunk-PJQFMIOX.js";
59
- import "../chunk-VCTY3W6J.js";
59
+ import "../chunk-MLHRFWQK.js";
60
60
  import "../chunk-VI2UW6B6.js";
61
61
  import {
62
62
  recordAggregateMeasurements,
63
63
  summarizeExecutionMeasurements
64
- } from "../chunk-KSDQVPLR.js";
64
+ } from "../chunk-TVXPJJ7H.js";
65
65
  import "../chunk-PXE2VKMX.js";
66
66
  import "../chunk-ZET2UAYW.js";
67
67
  import "../chunk-GGE4NNQT.js";
68
68
  import {
69
69
  LLM_MODEL_ATTR_KEYS
70
- } from "../chunk-QKEGNI5B.js";
70
+ } from "../chunk-BUBU3YHT.js";
71
71
  import "../chunk-PC4UYEBM.js";
72
72
  import {
73
73
  parseRunRecordSafe
@@ -76,7 +76,7 @@ import "../chunk-MA6HLL3S.js";
76
76
  import "../chunk-XJYR7XFV.js";
77
77
  import "../chunk-VSMTAMNK.js";
78
78
  import "../chunk-ONWEPEDO.js";
79
- import "../chunk-WDHBCA3M.js";
79
+ import "../chunk-NW4AQBXD.js";
80
80
  import "../chunk-PZ5AY32C.js";
81
81
 
82
82
  // src/contract/self-improve.ts