@tangle-network/agent-eval 0.123.1 → 0.123.3

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 (94) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +191 -157
  3. package/dist/analyst/index.d.ts +27 -4
  4. package/dist/analyst/index.js +6 -6
  5. package/dist/authenticity/index.js +3 -2
  6. package/dist/authenticity/index.js.map +1 -1
  7. package/dist/benchmarks/index.d.ts +12 -4
  8. package/dist/benchmarks/index.js +9 -9
  9. package/dist/campaign/index.d.ts +270 -254
  10. package/dist/campaign/index.js +22 -18
  11. package/dist/{chunk-GS3FJGUF.js → chunk-22VO7T2I.js} +805 -366
  12. package/dist/chunk-22VO7T2I.js.map +1 -0
  13. package/dist/{chunk-LBAHQOBI.js → chunk-4KO6D2BO.js} +38 -12
  14. package/dist/chunk-4KO6D2BO.js.map +1 -0
  15. package/dist/{chunk-3FCG7FBV.js → chunk-D5JZ7UDZ.js} +2 -2
  16. package/dist/{chunk-XJYR7XFV.js → chunk-GC4ATIKK.js} +1 -1
  17. package/dist/chunk-GC4ATIKK.js.map +1 -0
  18. package/dist/{chunk-BGVTIE2C.js → chunk-GRCDRKII.js} +13 -2
  19. package/dist/chunk-GRCDRKII.js.map +1 -0
  20. package/dist/{chunk-FHFTYX2Q.js → chunk-JKDNAOF5.js} +2 -2
  21. package/dist/{chunk-S3UZOQ5Y.js → chunk-LOW3U7JZ.js} +2 -2
  22. package/dist/{chunk-FC5NDO3E.js → chunk-MHPEGJHC.js} +4 -4
  23. package/dist/{chunk-NJC7U437.js → chunk-MK3Q6GCL.js} +33 -18
  24. package/dist/chunk-MK3Q6GCL.js.map +1 -0
  25. package/dist/{chunk-U5CHZ5M3.js → chunk-N7ZS6PEF.js} +4 -4
  26. package/dist/{chunk-A5S77LSE.js → chunk-QFQZ3U3X.js} +2 -2
  27. package/dist/chunk-QFQZ3U3X.js.map +1 -0
  28. package/dist/{chunk-G2GPNLSX.js → chunk-QNVBALEX.js} +4 -4
  29. package/dist/{chunk-OYZAPX5G.js → chunk-R226UZOI.js} +2 -2
  30. package/dist/{chunk-6WX7CBAR.js → chunk-SJT4OBVL.js} +20 -9
  31. package/dist/chunk-SJT4OBVL.js.map +1 -0
  32. package/dist/{chunk-HZJF4IUO.js → chunk-SUN7QLPB.js} +6 -6
  33. package/dist/{chunk-HZJF4IUO.js.map → chunk-SUN7QLPB.js.map} +1 -1
  34. package/dist/{chunk-VJ7T5WIO.js → chunk-WP3GEXKI.js} +3 -3
  35. package/dist/cli.js +101 -11
  36. package/dist/cli.js.map +1 -1
  37. package/dist/contract/index.d.ts +115 -8
  38. package/dist/contract/index.js +11 -9
  39. package/dist/contract/index.js.map +1 -1
  40. package/dist/control.js +3 -3
  41. package/dist/fuzz.d.ts +8 -1
  42. package/dist/fuzz.js +7 -6
  43. package/dist/fuzz.js.map +1 -1
  44. package/dist/hosted/index.d.ts +8 -2
  45. package/dist/index.d.ts +36 -10
  46. package/dist/index.js +18 -16
  47. package/dist/index.js.map +1 -1
  48. package/dist/multishot/index.d.ts +2 -2
  49. package/dist/openapi.json +1 -1
  50. package/dist/rl.d.ts +24 -3
  51. package/dist/rl.js +6 -4
  52. package/dist/rl.js.map +1 -1
  53. package/dist/{run-campaign-ZKR5MQMQ.js → run-campaign-I3JXKVAK.js} +3 -3
  54. package/dist/storyboard/index.js +1 -1
  55. package/dist/storyboard/index.js.map +1 -1
  56. package/dist/traces.d.ts +2 -2
  57. package/dist/traces.js +3 -3
  58. package/dist/wire/index.d.ts +77 -5
  59. package/dist/wire/index.js +3 -3
  60. package/docs/adapters-observability.md +6 -6
  61. package/docs/building-doctrine.md +5 -5
  62. package/docs/campaign-proposers.md +142 -131
  63. package/docs/concepts.md +49 -53
  64. package/docs/customer-journeys.md +80 -155
  65. package/docs/design/loop-taxonomy.md +27 -29
  66. package/docs/design.md +69 -0
  67. package/docs/distributed-driver.md +14 -14
  68. package/docs/eval-surface-map.md +11 -11
  69. package/docs/hosted-ingest-spec.md +4 -4
  70. package/docs/insight-report.md +32 -27
  71. package/docs/multi-shot-optimization.md +41 -49
  72. package/docs/research-report-methodology.md +9 -9
  73. package/docs/trace-analysis.md +2 -2
  74. package/docs/wire-protocol.md +16 -16
  75. package/package.json +2 -1
  76. package/dist/chunk-6WX7CBAR.js.map +0 -1
  77. package/dist/chunk-A5S77LSE.js.map +0 -1
  78. package/dist/chunk-BGVTIE2C.js.map +0 -1
  79. package/dist/chunk-GS3FJGUF.js.map +0 -1
  80. package/dist/chunk-LBAHQOBI.js.map +0 -1
  81. package/dist/chunk-NJC7U437.js.map +0 -1
  82. package/dist/chunk-XJYR7XFV.js.map +0 -1
  83. package/docs/auto-research-loop-end-to-end.md +0 -186
  84. package/docs/improvement-glossary.md +0 -204
  85. package/docs/self-improvement-map.md +0 -115
  86. /package/dist/{chunk-3FCG7FBV.js.map → chunk-D5JZ7UDZ.js.map} +0 -0
  87. /package/dist/{chunk-FHFTYX2Q.js.map → chunk-JKDNAOF5.js.map} +0 -0
  88. /package/dist/{chunk-S3UZOQ5Y.js.map → chunk-LOW3U7JZ.js.map} +0 -0
  89. /package/dist/{chunk-FC5NDO3E.js.map → chunk-MHPEGJHC.js.map} +0 -0
  90. /package/dist/{chunk-U5CHZ5M3.js.map → chunk-N7ZS6PEF.js.map} +0 -0
  91. /package/dist/{chunk-G2GPNLSX.js.map → chunk-QNVBALEX.js.map} +0 -0
  92. /package/dist/{chunk-OYZAPX5G.js.map → chunk-R226UZOI.js.map} +0 -0
  93. /package/dist/{chunk-VJ7T5WIO.js.map → chunk-WP3GEXKI.js.map} +0 -0
  94. /package/dist/{run-campaign-ZKR5MQMQ.js.map → run-campaign-I3JXKVAK.js.map} +0 -0
@@ -81,9 +81,16 @@ interface CostReceiptInput extends CostUsage {
81
81
  costUnknown?: boolean;
82
82
  usageUnknown?: boolean;
83
83
  }
84
+ /** Per-million token rates for a model or endpoint not covered by package pricing. */
85
+ interface CustomTokenPricing {
86
+ inputUsdPerMillion: number;
87
+ outputUsdPerMillion: number;
88
+ }
84
89
  type MaximumCharge = {
85
90
  externallyEnforcedMaximumUsd: number;
86
91
  } | ({
92
+ customTokenPricing: CustomTokenPricing;
93
+ } & Pick<CostUsage, 'inputTokens' | 'outputTokens'>) | ({
87
94
  model: string;
88
95
  } & CostUsage);
89
96
  interface RunPaidCallInput<T> {
@@ -95,7 +102,7 @@ interface RunPaidCallInput<T> {
95
102
  model?: string;
96
103
  tags?: Record<string, string>;
97
104
  signal?: AbortSignal;
98
- /** Provider-enforced dollar maximum, or maximum priced token usage. Required when capped. */
105
+ /** Provider-enforced dollar maximum, or maximum token usage with known pricing. Required when capped. */
99
106
  maximumCharge?: MaximumCharge;
100
107
  /** `callId` can be forwarded as the provider's idempotency key. */
101
108
  execute(signal: AbortSignal, callId: string): Promise<T>;
@@ -517,9 +524,10 @@ interface RunLineageResult {
517
524
  declare function runLineage(opts: RunLineageOptions): Promise<RunLineageResult>;
518
525
 
519
526
  type AgentProfileCellSchemaVersion = 'agent-profile-cell/v1';
520
- type AgentProfileJson = string | number | boolean | null | AgentProfileJson[] | {
527
+ type AgentProfileJsonObject = {
521
528
  [key: string]: AgentProfileJson;
522
529
  };
530
+ type AgentProfileJson = string | number | boolean | null | AgentProfileJson[] | AgentProfileJsonObject;
523
531
  type AgentProfileDimensionValue = string | number | boolean | null;
524
532
  interface AgentProfileSource {
525
533
  /** Runtime/profile contract being fingerprinted, e.g. `agent-interface-profile`. */
@@ -1134,8 +1142,8 @@ interface LlmCallResult {
1134
1142
  content: string;
1135
1143
  usage: LlmUsage;
1136
1144
  /**
1137
- * Cost in USD. Pulled from proxy's `_response_cost` field when present;
1138
- * `null` when neither the proxy nor the caller can derive it.
1145
+ * Cost in USD. Uses the provider's reported cost when present, otherwise
1146
+ * caller-supplied token pricing. `null` when neither is available.
1139
1147
  */
1140
1148
  costUsd: number | null;
1141
1149
  /** Model name actually used (echoed from response). */
@@ -1194,6 +1202,21 @@ interface LlmClientOptions {
1194
1202
  deadlineMs?: number;
1195
1203
  /** Total provider attempts. Legacy option name; default 3 (1 initial + 2 retries). */
1196
1204
  maxRetries?: number;
1205
+ /** Token rates used when the provider omits cost or package pricing does not cover the model. */
1206
+ customTokenPricing?: CustomTokenPricing;
1207
+ /**
1208
+ * Transport for requests that declare `jsonSchema`. `native` sends
1209
+ * `response_format: json_schema`; `json-object` sends the broadly supported
1210
+ * JSON mode and relies on the caller to include the schema in model-visible
1211
+ * instructions. Default: `native`.
1212
+ */
1213
+ jsonSchemaTransport?: 'native' | 'json-object';
1214
+ /**
1215
+ * JSON payload parsing policy. `extract` accepts fenced or prose-prefixed JSON.
1216
+ * `exact` requires the complete response content to be one JSON value.
1217
+ * Default: `extract`.
1218
+ */
1219
+ jsonPayloadMode?: 'extract' | 'exact';
1197
1220
  /** Fetch implementation — defaults to global `fetch`. Override for custom transport (e.g. tests). */
1198
1221
  fetch?: typeof fetch;
1199
1222
  /**
@@ -2366,35 +2389,18 @@ interface AnalyzeTracesOptions {
2366
2389
  }
2367
2390
 
2368
2391
  /**
2369
- * Make the trace-analyst's OWN prompt a GEPA-optimizable surface.
2370
- *
2371
- * The analyst that drives self-improvement is itself a prompt — and a
2372
- * hand-tuned one (a hardcoded, hand-versioned `const`). This module lets the
2373
- * loop optimize it: the analyst `actorDescription` becomes a `MutableSurface`
2374
- * that `gepaProposer` / `haloProposer` / any `SurfaceProposer` can mutate inside
2375
- * `runImprovementLoop` or `compareProposers`. That is the second-order loop —
2376
- * optimizing the optimizer's eyes, not just the agent's prompt.
2392
+ * Treat the trace analyst's instructions as an optimizable text surface.
2377
2393
  *
2378
- * Two pieces, both deliberately small (the loop engine already exists — this
2379
- * only supplies the analyst-shaped dispatch + an objective scorer):
2394
+ * `buildAnalystSurfaceDispatch` analyzes a fixed trace corpus using the
2395
+ * supplied surface as `actorDescription`. `failureModeRecallJudge` scores the
2396
+ * findings against failure labels derived independently from the analyst output.
2380
2397
  *
2381
- * - `buildAnalystSurfaceDispatch` — `dispatchWithSurface(surface, scenario)`
2382
- * runs `analyzeTraces` with `surface` as the actorDescription over the
2383
- * scenario's fixed trace corpus, returning its findings.
2384
- * - `failureModeRecallJudge` — a DETERMINISTIC judge (no LLM, no opinion)
2385
- * that scores those findings against the scenario's GROUND-TRUTH failure
2386
- * modes. This is what keeps optimizing the analyst prompt ungameable: the
2387
- * labels come from objective signal (e.g. AppWorld `world.evaluate()` tells
2388
- * us which task failed and which API calls were wrong), so we reward an
2389
- * analyst for surfacing the failures that really happened — not for
2390
- * pleasing a judge that could be talked into anything (Goodhart).
2391
- *
2392
- * Wiring (the loop is unchanged; you only pass these in):
2398
+ * Example:
2393
2399
  *
2394
2400
  * const dispatchWithSurface = buildAnalystSurfaceDispatch({ analystOptions: { ai } })
2395
2401
  * await runImprovementLoop({
2396
- * baselineSurface: TRACE_ANALYST_ACTOR_DESCRIPTION, // the prompt under optimization
2397
- * scenarios: trainScenarios, // labeled trace corpora
2402
+ * baselineSurface: TRACE_ANALYST_ACTOR_DESCRIPTION,
2403
+ * scenarios: trainScenarios,
2398
2404
  * holdoutScenarios: heldOutScenarios,
2399
2405
  * dispatchWithSurface,
2400
2406
  * judges: [failureModeRecallJudge()],
@@ -4188,6 +4194,152 @@ interface ParameterSweepProposerOptions {
4188
4194
  /** Config/parameter-level proposer for FAPO's middle escalation level. */
4189
4195
  declare function parameterSweepProposer(opts: ParameterSweepProposerOptions): SurfaceProposer;
4190
4196
 
4197
+ /**
4198
+ * Compare optimization methods on shared train, selection, and test data.
4199
+ * Optimizers receive only train and selection data. After every optimizer
4200
+ * finishes, their selected surfaces are measured on the same untouched test
4201
+ * data and compared with paired confidence intervals.
4202
+ */
4203
+
4204
+ /** Per-method campaign settings. Each method receives its own spend account. */
4205
+ type OptimizationMethodRunOptions<TScenario extends Scenario, TArtifact> = Omit<RunCampaignOptions<TScenario, TArtifact>, 'costLedger' | 'dispatch' | 'judges' | 'runDir' | 'scenarios' | 'seed'>;
4206
+ /** Cost reported by a method or by final test scoring. */
4207
+ interface ComparisonCost {
4208
+ totalCostUsd: number;
4209
+ accountingComplete: boolean;
4210
+ incompleteReasons: string[];
4211
+ }
4212
+ /** Shared inputs for one optimization method. Final test data is absent. */
4213
+ interface OptimizationMethodInput<TScenario extends Scenario, TArtifact> {
4214
+ /** Surface every method starts from. */
4215
+ readonly baselineSurface: MutableSurface;
4216
+ /** Evidence used to author or fit candidates. */
4217
+ readonly trainScenarios: readonly TScenario[];
4218
+ /** Data used for candidate acceptance, early stopping, and model selection. */
4219
+ readonly selectionScenarios: readonly TScenario[];
4220
+ /** Runs one scenario with a candidate surface. */
4221
+ readonly dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
4222
+ /** Scores artifacts produced by `dispatchWithSurface`. */
4223
+ readonly judges: readonly JudgeConfig<TArtifact, TScenario>[];
4224
+ /** Method-specific artifacts are written below this directory. */
4225
+ readonly runDir: string;
4226
+ readonly seed: number;
4227
+ /** Shared defaults for every method. A method may override them explicitly. */
4228
+ readonly runOptions: Readonly<OptimizationMethodRunOptions<TScenario, TArtifact>>;
4229
+ }
4230
+ interface OptimizationMethodResult {
4231
+ /** Surface selected without using the final test partition. */
4232
+ winnerSurface: MutableSurface;
4233
+ /** Optimization spend. Excludes final test scoring. */
4234
+ cost: ComparisonCost;
4235
+ /** Optimization duration. Excludes final test scoring. */
4236
+ durationMs?: number;
4237
+ }
4238
+ /** A complete optimization method, including candidate generation and selection. */
4239
+ interface OptimizationMethod<TScenario extends Scenario = Scenario, TArtifact = unknown> {
4240
+ /** Unique, trimmed display name. Its normalized form must also be unique. */
4241
+ name: string;
4242
+ optimize: (input: OptimizationMethodInput<TScenario, TArtifact>) => Promise<OptimizationMethodResult>;
4243
+ }
4244
+ interface OptimizationMethodScore {
4245
+ name: string;
4246
+ /** Mean final-test composite of the baseline (identical across methods). */
4247
+ baselineComposite: number;
4248
+ /** Mean final-test composite of this method's selected surface. */
4249
+ winnerComposite: number;
4250
+ /** Mean per-scenario final-test lift (winner minus baseline). */
4251
+ lift: number;
4252
+ /** Simultaneous paired-bootstrap interval for per-scenario lift.
4253
+ * `low > 0` excludes zero after adjustment for all reported contrasts. */
4254
+ liftCi: {
4255
+ low: number;
4256
+ high: number;
4257
+ };
4258
+ /** Optimization spend reported by the method. Excludes final test scoring. */
4259
+ optimizationCost: ComparisonCost;
4260
+ /** Optimization duration reported by the method. Excludes final test scoring. */
4261
+ durationMs?: number;
4262
+ /** Paired final-test values used to compute lift and its interval. */
4263
+ scenarioScores: Array<{
4264
+ scenarioId: string;
4265
+ baselineComposite: number;
4266
+ winnerComposite: number;
4267
+ lift: number;
4268
+ }>;
4269
+ winnerSurface: MutableSurface;
4270
+ /** 1-based, by descending lift. */
4271
+ rank: number;
4272
+ }
4273
+ interface OptimizationMethodPairwise {
4274
+ /** Higher-ranked method. */
4275
+ a: string;
4276
+ b: string;
4277
+ /** Mean per-scenario untouched-test delta (a − b). */
4278
+ deltaMean: number;
4279
+ low: number;
4280
+ high: number;
4281
+ /** `a` if the CI clears 0, `b` if it is entirely negative, else `'tie'`. */
4282
+ favored: string;
4283
+ }
4284
+ interface OptimizationMethodComparison {
4285
+ /** Sorted by descending lift; `rank` set accordingly. */
4286
+ scores: OptimizationMethodScore[];
4287
+ best: OptimizationMethodScore;
4288
+ /** Best vs each other method, using simultaneous paired-bootstrap intervals. */
4289
+ pairwise: OptimizationMethodPairwise[];
4290
+ testScenarioIds: string[];
4291
+ /** Sum of the costs reported by every optimization method. */
4292
+ optimizationCost: ComparisonCost;
4293
+ /** Baseline and distinct winner scoring on the final test partition. */
4294
+ testCost: ComparisonCost;
4295
+ /** Optimization plus final test scoring. */
4296
+ totalCost: ComparisonCost;
4297
+ /** Caller-requested simultaneous coverage across all reported contrasts. */
4298
+ confidence: number;
4299
+ /** Bonferroni-adjusted confidence used for each bootstrap interval. */
4300
+ intervalConfidence: number;
4301
+ /** Method-vs-baseline plus all possible method-vs-method contrasts. */
4302
+ comparisonCount: number;
4303
+ /** Deterministic bootstrap and campaign seed. */
4304
+ seed: number;
4305
+ /** Bootstrap draws used for each interval. */
4306
+ resamples: number;
4307
+ /** Agent runs averaged within each test scenario before resampling scenarios. */
4308
+ reps: number;
4309
+ }
4310
+ interface CompareOptimizationMethodsOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch' | 'judges' | 'scenarios'> {
4311
+ methods: OptimizationMethod<TScenario, TArtifact>[];
4312
+ baselineSurface: MutableSurface;
4313
+ /** Evidence used by every optimizer to author or fit candidates. */
4314
+ trainScenarios: TScenario[];
4315
+ /** Candidate acceptance, early-stopping, and optimizer-selection data. */
4316
+ selectionScenarios: TScenario[];
4317
+ /** Untouched final comparison data. Never passed to an optimization method. */
4318
+ testScenarios: TScenario[];
4319
+ /** Scores a surface on a scenario. The methods and final test share this function. */
4320
+ dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
4321
+ judges: JudgeConfig<TArtifact, TScenario>[];
4322
+ /** Bootstrap resamples for the lift intervals. Default is at least 2000 and
4323
+ * rises when the requested simultaneous confidence needs finer tails. */
4324
+ resamples?: number;
4325
+ /** Shared defaults for each method's train and selection campaigns. */
4326
+ optimizationRunOptions?: OptimizationMethodRunOptions<TScenario, TArtifact>;
4327
+ /** Number of optimization methods to run concurrently. Default 1. */
4328
+ optimizationConcurrency?: number;
4329
+ /** Simultaneous confidence across method-vs-baseline and method-vs-method contrasts.
4330
+ * Each bootstrap interval is Bonferroni-adjusted. Default 0.95. */
4331
+ confidence?: number;
4332
+ /** Shared spend limit across baseline and winner scoring on the final test partition.
4333
+ * Each method owns its optimization budget through `optimizationRunOptions.costCeiling`. */
4334
+ costCeiling?: number;
4335
+ }
4336
+ /**
4337
+ * Compare complete optimization methods on disjoint train, selection, and final test data.
4338
+ */
4339
+ declare function compareOptimizationMethods<TScenario extends Scenario, TArtifact>(opts: CompareOptimizationMethodsOptions<TScenario, TArtifact>): Promise<OptimizationMethodComparison>;
4340
+ /** Keep the cost fields a custom optimization method must report. */
4341
+ declare function costFromLedgerSummary(summary: CostLedgerSummary): ComparisonCost;
4342
+
4191
4343
  /**
4192
4344
  * `runOptimization` — the improvement loop body. Runs N generations: the
4193
4345
  * `SurfaceProposer` proposes K candidate surfaces per generation, each
@@ -4390,100 +4542,13 @@ interface RunImprovementLoopResult<TArtifact, TScenario extends Scenario> extend
4390
4542
  */
4391
4543
  declare function runImprovementLoop<TScenario extends Scenario, TArtifact>(opts: RunImprovementLoopOptions<TScenario, TArtifact>): Promise<RunImprovementLoopResult<TArtifact, TScenario>>;
4392
4544
 
4393
- /**
4394
- * `compareProposers` — a head-to-head lift benchmark across surface proposers
4395
- * on ONE corpus. This is the forcing function: optimizer quality (GEPA
4396
- * reflection vs GEPA+Pareto vs SkillOpt) becomes a NUMBER with a confidence
4397
- * interval, so a proposer regression — or shipping a simplified proposer and
4398
- * calling it the real one — turns a build red instead of going
4399
- * measurement-invisible.
4400
- *
4401
- * Every entrant is scored the SAME way: each proposer returns the surface it
4402
- * promoted, then the benchmark scores the baseline + every winner on the
4403
- * SAME held-out scenarios with the SAME judges. Apples-to-apples by
4404
- * construction — the comparison never depends on how a proposer measured itself.
4405
- * The per-scenario held-out composites feed a paired bootstrap (`statistics.ts`)
4406
- * for each proposer's lift CI and for the pairwise "which proposer wins" CI.
4407
- */
4408
-
4409
- /** What an optimizer produced: the surface it promoted + what it cost to get
4410
- * there. The comparison does the held-out scoring itself, so an entry only
4411
- * needs to run its loop and hand back the winner. */
4412
- interface ProposerEntry {
4413
- name: string;
4414
- optimize: () => Promise<{
4415
- winnerSurface: MutableSurface;
4416
- costUsd: number;
4417
- durationMs?: number;
4418
- }>;
4419
- }
4420
- interface ProposerScore {
4421
- name: string;
4422
- /** Mean held-out composite of the baseline (identical across proposers). */
4423
- baselineComposite: number;
4424
- /** Mean held-out composite of this proposer's promoted surface. */
4425
- winnerComposite: number;
4426
- /** Mean per-scenario held-out lift (winner − baseline). */
4427
- lift: number;
4428
- /** Paired-bootstrap CI of the per-scenario lift. `low > 0` ⇒ a real gain. */
4429
- liftCi: {
4430
- low: number;
4431
- high: number;
4432
- };
4433
- costUsd: number;
4434
- durationMs?: number;
4435
- winnerSurface: MutableSurface;
4436
- /** 1-based, by descending lift. */
4437
- rank: number;
4438
- }
4439
- interface ProposerPairwise {
4440
- /** Higher-ranked proposer. */
4441
- a: string;
4442
- b: string;
4443
- /** Mean per-scenario held-out delta (a − b). */
4444
- deltaMean: number;
4445
- low: number;
4446
- high: number;
4447
- /** `a` if the CI clears 0, `b` if it is entirely negative, else `'tie'`. */
4448
- favored: string;
4449
- }
4450
- interface ProposerComparison {
4451
- /** Sorted by descending lift; `rank` set accordingly. */
4452
- scores: ProposerScore[];
4453
- best: ProposerScore;
4454
- /** Best vs each other proposer, paired-bootstrap on the held-out winners. */
4455
- pairwise: ProposerPairwise[];
4456
- holdoutScenarioIds: string[];
4457
- }
4458
- interface CompareProposersOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch' | 'scenarios'> {
4459
- proposers: ProposerEntry[];
4460
- baselineSurface: MutableSurface;
4461
- /** The held-out scenarios every winner is scored on. */
4462
- holdoutScenarios: TScenario[];
4463
- /** Scores a surface on a scenario — the same dispatcher the proposers used. */
4464
- dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
4465
- /** Bootstrap resamples for the lift CIs. Default 2000. */
4466
- resamples?: number;
4467
- /** CI confidence. Default 0.95. */
4468
- confidence?: number;
4469
- }
4470
- /**
4471
- * Run a head-to-head lift benchmark across surface proposers on a shared holdout, returning per-proposer lift CIs and pairwise "who wins" verdicts.
4472
- */
4473
- declare function compareProposers<TScenario extends Scenario, TArtifact>(opts: CompareProposersOptions<TScenario, TArtifact>): Promise<ProposerComparison>;
4474
- /** Shared corpus + transport for the three built-in optimizer entries. */
4475
- interface OptimizerEntryConfig<TScenario extends Scenario, TArtifact> {
4476
- baselineSurface: string;
4477
- /** Training scenarios the proposers reflect on. */
4478
- trainScenarios: TScenario[];
4479
- /** Held-out scenarios (the gate axis + the benchmark scoring axis). */
4480
- holdoutScenarios: TScenario[];
4481
- dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
4482
- judges: JudgeConfig<TArtifact, TScenario>[];
4545
+ interface BuiltinOptimizationMethodConfig<TScenario extends Scenario = Scenario, TArtifact = unknown> {
4483
4546
  llm: LlmClientOptions;
4484
4547
  model: string;
4485
4548
  target: string;
4486
- runDir: string;
4549
+ /** Override shared method-run settings for this method only. */
4550
+ runOptions?: OptimizationMethodRunOptions<TScenario, TArtifact>;
4551
+ /** Override the comparison seed for this method only. */
4487
4552
  seed?: number;
4488
4553
  /** GEPA population per generation. Default 2. */
4489
4554
  populationSize?: number;
@@ -4492,51 +4557,33 @@ interface OptimizerEntryConfig<TScenario extends Scenario, TArtifact> {
4492
4557
  /** SkillOpt epochs. Default 6. */
4493
4558
  maxEpochs?: number;
4494
4559
  mutationPrimitives?: string[];
4495
- /** Static findings seed forwarded to each GEPA proposer's `propose()` as
4496
- * `ctx.findings`. Forwarded by `gepaReflectionEntry` / `gepaParetoEntry`;
4497
- * `skillOptEntry` runs without findings (see its doc). */
4560
+ /** Static findings passed to each GEPA candidate-generation call. */
4498
4561
  findings?: unknown[];
4499
- /** Per-generation findings producer: after each generation scores, this
4500
- * re-diagnoses and REPLACES `ctx.findings` for the
4501
- * next generation's `propose()`. Reuses the `runOptimization` field type so
4502
- * it cannot drift. GEPA entries only. */
4562
+ /** Recompute findings after each GEPA generation. */
4503
4563
  analyzeGeneration?: RunImprovementLoopOptions<TScenario, TArtifact>['analyzeGeneration'];
4504
- /** Optional analysis report forwarded to `propose()` as `ctx.report`. */
4564
+ /** Optional analysis report passed to candidate generation. */
4505
4565
  report?: unknown;
4506
4566
  }
4507
4567
  /** GEPA, reflection-only (single-parent, no Pareto combine). */
4508
- declare function gepaReflectionEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
4509
- /** GEPA with the Pareto frontier + combine-complementary-lessons. */
4510
- declare function gepaParetoEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
4511
- /** SkillOpt patch-mode hill-climb. Runs findings-BLIND: `runSkillOpt` owns its
4512
- * own epoch acceptance/budget loop and does not thread `analyzeGeneration`, so
4513
- * `config.findings` is intentionally NOT forwarded here. In a findings-fed
4514
- * comparison this entry is the blind control do not read its result as
4515
- * findings-fed. (Threading findings into the SkillOpt epoch loop is a separate
4516
- * refactor, deferred not faked.) */
4517
- declare function skillOptEntry<TScenario extends Scenario, TArtifact>(config: OptimizerEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
4518
- /** FAPO reviewed-escalation policy. This is an orchestration layer over
4519
- * level-specific proposers, not a new mutation operator:
4520
- * prompt -> parameter -> structural, with scope + reviewer + plateau rules in
4521
- * `fapoProposer`. The prompt proposer defaults to GEPA+Pareto because that is
4522
- * the package's strongest prompt-tier proposer; parameter/structural proposers
4523
- * are opt-in so we do not fake code-generation inside agent-eval. */
4524
- interface FapoEntryConfig<TScenario extends Scenario, TArtifact> extends OptimizerEntryConfig<TScenario, TArtifact> {
4525
- /** Override the prompt-level proposer. Default: `gepaProposer({ combineParents: true })`. */
4568
+ declare function gepaReflectionMethod<TScenario extends Scenario, TArtifact>(config: BuiltinOptimizationMethodConfig<TScenario, TArtifact>, name?: string): OptimizationMethod<TScenario, TArtifact>;
4569
+ /** GEPA with the Pareto frontier and complementary-parent combination. */
4570
+ declare function gepaParetoMethod<TScenario extends Scenario, TArtifact>(config: BuiltinOptimizationMethodConfig<TScenario, TArtifact>, name?: string): OptimizationMethod<TScenario, TArtifact>;
4571
+ /** SkillOpt patch-mode hill climb. */
4572
+ declare function skillOptMethod<TScenario extends Scenario, TArtifact>(config: BuiltinOptimizationMethodConfig<TScenario, TArtifact>, name?: string): OptimizationMethod<TScenario, TArtifact>;
4573
+ interface FapoOptimizationMethodConfig<TScenario extends Scenario, TArtifact> extends BuiltinOptimizationMethodConfig<TScenario, TArtifact> {
4574
+ /** Override the prompt-level proposer. Default: GEPA with Pareto parents. */
4526
4575
  promptProposer?: SurfaceProposer;
4527
4576
  /** Parameter/config-level proposer. If omitted, `parameterCandidates` builds one. */
4528
4577
  parameterProposer?: SurfaceProposer;
4529
4578
  /** Structural/code-level proposer, typically supplied by agent-runtime. */
4530
4579
  structuralProposer?: SurfaceProposer;
4531
- /** Convenience: build a `parameterSweepProposer` from these candidates. */
4580
+ /** Convenience: build a parameter sweep from these candidates. */
4532
4581
  parameterCandidates?: readonly ParameterCandidate[];
4533
- /** FAPO policy knobs: scope, reviewer, plateau thresholds. */
4582
+ /** FAPO policy settings: scope, reviewer, and plateau thresholds. */
4534
4583
  fapo?: Omit<FapoProposerOptions, 'proposers' | 'promptProposer' | 'parameterProposer' | 'structuralProposer'>;
4535
4584
  }
4536
- /**
4537
- * Build a `ProposerEntry` that runs the full FAPO escalation policy (prompt parameter structural) as a single comparable optimizer entry.
4538
- */
4539
- declare function fapoEscalationEntry<TScenario extends Scenario, TArtifact>(config: FapoEntryConfig<TScenario, TArtifact>, name?: string): ProposerEntry;
4585
+ /** Build one method that runs the complete FAPO escalation policy. */
4586
+ declare function fapoEscalationMethod<TScenario extends Scenario, TArtifact>(config: FapoOptimizationMethodConfig<TScenario, TArtifact>, name?: string): OptimizationMethod<TScenario, TArtifact>;
4540
4587
 
4541
4588
  /**
4542
4589
  * Artifact validators.
@@ -5278,17 +5325,17 @@ declare function patchEditCount(patch: SkillPatch): number;
5278
5325
  * meta-note steer the optimizer away from dead ends.
5279
5326
  *
5280
5327
  * This module is the PROPOSER — the LLM call that turns evidence into
5281
- * structured patches. The accept-only-if-held-out-improves loop, the budget
5328
+ * structured patches. The accept-only-if-selection-improves loop, the budget
5282
5329
  * annealing, and the rejected buffer live in the `runSkillOpt` preset, which
5283
5330
  * owns the epoch hill-climb. The proposer also conforms to `SurfaceProposer`
5284
5331
  * (`propose` applies its patches to the current surface and returns the
5285
5332
  * candidate surfaces) so it is a drop-in for `runOptimization` and a fair
5286
- * entrant in `compareProposers`.
5333
+ * entrant in `compareOptimizationMethods`.
5287
5334
  */
5288
5335
 
5289
5336
  /** Evidence the optimizer reflects on: where the current surface is weakest.
5290
5337
  * Computed by the caller (the preset uses a TRAIN campaign so proposals never
5291
- * see the held-out split; the generic loop derives it from history). */
5338
+ * see the selection split; the generic loop derives it from history). */
5292
5339
  interface SkillOptEvidence {
5293
5340
  /** Lowest-scoring scenarios (drives WHICH behavior to patch). */
5294
5341
  weakScenarios: Array<{
@@ -5365,28 +5412,14 @@ declare class SkillPatchParseError extends Error {
5365
5412
  declare function parseSkillPatchResponse(raw: string, maxPatches: number, editBudget: number): SkillPatch[];
5366
5413
 
5367
5414
  /**
5368
- * `runSkillOpt` the SkillOpt epoch hill-climb (Microsoft, arXiv:2605.23904).
5369
- * Unlike `runOptimization`'s population search around one global incumbent,
5370
- * SkillOpt is a sequential, held-out-gated hill-climb on ONE skill document:
5371
- *
5372
- * each epoch:
5373
- * 1. reflect on the CURRENT surface's weakest TRAIN scenarios/dimensions
5374
- * (never the held-out split — proposals must not see the acceptance axis)
5375
- * 2. propose ≤ `patchesPerEpoch` bounded patches (≤ `editBudget` ops each)
5376
- * 3. apply each; score the candidate on the HELD-OUT split
5377
- * 4. ACCEPT the first patch that STRICTLY improves the held-out composite;
5378
- * otherwise push it to the rejected-edit buffer (fed back so the model
5379
- * does not re-propose dead ends)
5380
- * 5. anneal the edit budget down after consecutive rejections (the
5381
- * "textual learning rate" decay); refresh the slow-update meta note
5382
- * 6. stop at `maxEpochs` or after `patience` epochs with no acceptance
5415
+ * Optimize one skill document with the repeated selection method from SkillOpt
5416
+ * (Microsoft, arXiv:2605.23904).
5383
5417
  *
5384
- * The accept-only-if-held-out-improves rule is the same discipline as
5385
- * `HeldOutGate`/`defaultProductionGate`, applied per edit instead of once at
5386
- * the end which is why the held-out composite is monotonically
5387
- * non-decreasing and a regression can never ship. `runCampaign` is the
5388
- * measurement; `applySkillPatch` applies the edits; `skillOptProposer` proposes
5389
- * them.
5418
+ * Each round proposes bounded patches from item-level training evidence, then
5419
+ * accepts the first patch that improves the selection score. Later rounds see
5420
+ * aggregate acceptance feedback and prior rejected edits, so selection data is
5421
+ * adaptively reused. It is not a final test. Use `compareOptimizationMethods` when you
5422
+ * need a separate test partition.
5390
5423
  */
5391
5424
 
5392
5425
  interface RunSkillOptOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch' | 'scenarios'> {
@@ -5395,18 +5428,17 @@ interface RunSkillOptOptions<TScenario extends Scenario, TArtifact> extends Omit
5395
5428
  /** Dispatcher taking the CURRENT skill surface + scenario → artifact. */
5396
5429
  dispatchWithSurface: (surface: string, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
5397
5430
  proposer: SkillOptProposer;
5398
- /** Scenarios the optimizer reflects on for evidence. MUST be disjoint from
5399
- * `holdoutScenarios` — proposals never see the acceptance axis. */
5431
+ /** Item-level evidence shown to the proposer. Must be disjoint from selection. */
5400
5432
  trainScenarios: TScenario[];
5401
- /** Held-out scenarios. An edit is accepted ONLY if it strictly improves the
5402
- * mean composite here. */
5403
- holdoutScenarios: TScenario[];
5433
+ /** Adaptively reused candidate-selection scenarios. An edit is accepted ONLY
5434
+ * if it strictly improves the mean composite here. This is not a final test. */
5435
+ selectionScenarios: TScenario[];
5404
5436
  maxEpochs: number;
5405
5437
  /** Candidate patches proposed per epoch. Default 2. */
5406
5438
  patchesPerEpoch?: number;
5407
5439
  /** Initial ops-per-patch cap (the textual learning rate). Default 3. */
5408
5440
  editBudget?: number;
5409
- /** Strict acceptance margin: accept iff the held-out composite improves by
5441
+ /** Strict acceptance margin: accept iff the selection composite improves by
5410
5442
  * MORE than this. Default 0 (any strict improvement). */
5411
5443
  minImprovement?: number;
5412
5444
  /** Stop after this many consecutive epochs with no acceptance. Default =
@@ -5428,8 +5460,8 @@ interface AcceptedEdit {
5428
5460
  epoch: number;
5429
5461
  label: string;
5430
5462
  rationale: string;
5431
- /** Held-out composite improvement vs the surface before this edit. */
5432
- holdoutDelta: number;
5463
+ /** Selection composite improvement vs the surface before this edit. */
5464
+ selectionDelta: number;
5433
5465
  }
5434
5466
  interface SkillOptEpochRecord {
5435
5467
  epoch: number;
@@ -5438,28 +5470,27 @@ interface SkillOptEpochRecord {
5438
5470
  /** The accepted edit this epoch, or null if every proposal was rejected. */
5439
5471
  accepted: AcceptedEdit | null;
5440
5472
  rejected: RejectedEdit[];
5441
- /** Held-out composite of the CURRENT surface at the END of the epoch. */
5442
- holdoutComposite: number;
5473
+ /** Selection composite of the CURRENT surface at the END of the epoch. */
5474
+ selectionComposite: number;
5443
5475
  }
5444
5476
  interface RunSkillOptResult {
5445
5477
  winnerSurface: string;
5446
- baselineHoldoutComposite: number;
5447
- winnerHoldoutComposite: number;
5448
- /** `winnerHoldoutComposite - baselineHoldoutComposite` monotonically 0
5449
- * by construction (only strictly-improving edits are accepted). */
5450
- lift: number;
5478
+ baselineSelectionComposite: number;
5479
+ winnerSelectionComposite: number;
5480
+ /** `winnerSelectionComposite - baselineSelectionComposite`. This is not test lift. */
5481
+ selectionLift: number;
5451
5482
  acceptedEdits: AcceptedEdit[];
5452
5483
  rejectedEdits: RejectedEdit[];
5453
5484
  epochsRun: number;
5454
5485
  history: SkillOptEpochRecord[];
5455
- /** Total cost across every scoring campaign (train evidence + holdout
5456
- * acceptance) the hill-climb ran. */
5486
+ /** Full run spend. Alias of `cost.totalCostUsd`; includes scoring, proposals,
5487
+ * and judges. */
5457
5488
  totalCostUsd: number;
5458
5489
  /** Run-wide spend, including scoring, proposals, and judges. */
5459
5490
  cost: CostLedgerSummary;
5460
5491
  }
5461
5492
  /**
5462
- * SkillOpt sequential hill-climb: each epoch reflects on train-scenario weaknesses, proposes bounded patches, accepts the first patch that strictly improves the held-out composite, and anneals the edit budget on consecutive rejections.
5493
+ * SkillOpt sequential hill-climb: each epoch reflects on train-scenario weaknesses, proposes bounded patches, accepts the first patch that strictly improves the selection composite, and anneals the edit budget on consecutive rejections.
5463
5494
  */
5464
5495
  declare function runSkillOpt<TScenario extends Scenario, TArtifact>(opts: RunSkillOptOptions<TScenario, TArtifact>): Promise<RunSkillOptResult>;
5465
5496
 
@@ -5500,36 +5531,11 @@ interface AceProposerOptions {
5500
5531
  declare function aceProposer(opts?: AceProposerOptions): SurfaceProposer;
5501
5532
 
5502
5533
  /**
5503
- * `compositeProposer` run N proposers TOGETHER on the same surface.
5504
- *
5505
- * The question this answers ("why can't we combine GEPA + skillOpt + ACE + a
5506
- * trace-analyst?"): nothing in the loop cares where candidates come from — the
5507
- * generation's population is one pool and the Pareto frontier / promotion logic
5508
- * evaluates every candidate identically. The only missing piece was a proposer
5509
- * that fans the population budget out across members and merges their proposals.
5510
- * This is that piece.
5511
- *
5512
- * Semantics:
5513
- * - Budget: each member is asked for a share of `populationSize`
5514
- * (near-equal split by default, or explicit `weights`). Members may return
5515
- * fewer; the pool is topped up round-robin from members that can offer more
5516
- * is NOT attempted — proposers are not obligated to be re-entrant.
5517
- * - Provenance: every candidate's `label` is prefixed with its member's kind
5518
- * (`gepa:...`, `skill-opt:...`) so generation records and the promotion
5519
- * provenance attribute each winner to the proposer family that made it —
5520
- * the cheap, honest version of proposer-level credit assignment.
5521
- * - Dedup: identical surfaces from different members collapse to the first.
5522
- * - Failure isolation: one member throwing does not sink the generation; its
5523
- * error is logged into the surviving candidates' generation via a warning
5524
- * and the pool proceeds (a generation with zero candidates from all members
5525
- * failing still throws — that is a real failure).
5526
- * - Early stop: the composite stops only when EVERY member with a `decide`
5527
- * votes stop (a member without `decide` never votes stop).
5528
- *
5529
- * This is deliberately NOT joint multi-surface mutation: every member mutates
5530
- * the SAME `MutableSurface`. Joint profile-patch surfaces (prompt+skills+tools
5531
- * in one candidate) require the composite-surface contract and measured
5532
- * component attribution — see the experiment-optimal research brief.
5534
+ * Split one generation's candidate budget across independent proposers.
5535
+ * Candidate labels retain the originating proposer kind, duplicate surfaces
5536
+ * collapse to the first result, and one failed proposer does not discard the
5537
+ * other results. The composite stops only when every member with `decide`
5538
+ * votes to stop.
5533
5539
  */
5534
5540
 
5535
5541
  interface CompositeProposerOptions<TFindings = unknown> {
@@ -5658,20 +5664,11 @@ declare function extractH2Sections(text: string): string[];
5658
5664
  declare function countSentenceEdits(baseline: string, candidate: string): number;
5659
5665
 
5660
5666
  /**
5661
- * `haloProposer` — wraps the REAL halo-engine (Inference.net's hierarchical
5662
- * agentic trace analyzer, `pip install halo-engine`, repo context-labs/halo)
5663
- * as an agent-eval `SurfaceProposer`, so HALO competes head-to-head with
5664
- * `gepaProposer` — and with our own `traceAnalystProposer` — inside `compareProposers`
5665
- * on identical traces / scenarios / held-out scoring.
5667
+ * Adapt the published `halo-engine` CLI to `SurfaceProposer`.
5666
5668
  *
5667
- * It PRESERVES halo's actual working usage `analyze` shells out to the
5668
- * published CLI (`halo <traces.jsonl> -p <prompt> -m <model>`) and uses its real
5669
- * RLM findings verbatim. We do NOT reimplement its analysis; that would make the
5670
- * benchmark meaningless. The materialize/apply pipeline is the shared
5671
- * `analysisEditProposer` — identical to `traceAnalystProposer`, which is what makes
5672
- * the comparison apples-to-apples.
5673
- *
5674
- * Fail-loud: no traces → throw; halo errors → throw; empty findings → throw.
5669
+ * The proposer runs `halo <traces.jsonl> -p <prompt> -m <model>` and passes its
5670
+ * findings to the shared edit step also used by `traceAnalystProposer`. It
5671
+ * rejects missing traces, CLI errors, and empty findings.
5675
5672
  */
5676
5673
 
5677
5674
  interface HaloProposerOptions {
@@ -5829,7 +5826,7 @@ interface LlmPolicyEditProposerOptions {
5829
5826
  targetSurface: JsonPolicyEditTargetSurface;
5830
5827
  /** Exact JSON paths the author may change. Prefix or fuzzy matches are not accepted. */
5831
5828
  allowedJsonPaths: readonly string[];
5832
- /** Exact search objectives forecasts may name. Unknown keys or mismatched directions fail. */
5829
+ /** Caller-owned search objective bound into every authored forecast. */
5833
5830
  objectives: readonly PolicyEditObjective[];
5834
5831
  /** Default: evidence-only, so uncertain edits are measured rather than
5835
5832
  * suppressed by their own model-authored predictions. */
@@ -5852,6 +5849,13 @@ interface LlmPolicyEditProposerOptions {
5852
5849
  maxAuthorContextChars?: number;
5853
5850
  /** Optional one-to-one pseudonymizer applied to every author-visible evidence field. */
5854
5851
  scenarioIdTransform?: (scenarioId: string) => string;
5852
+ /**
5853
+ * Remove credentials or unrelated fields from the current surface before it
5854
+ * is sent to the model. The callback receives a clone and must preserve every
5855
+ * editable path unchanged. Validated edits apply to the complete original.
5856
+ * This callback does not redact findings or scored history.
5857
+ */
5858
+ redactCurrentSurfaceForModel?: (surface: AgentProfileJsonObject) => AgentProfileJsonObject;
5855
5859
  onAdmission?: (admission: PolicyEditAdmission) => void;
5856
5860
  }
5857
5861
  /**
@@ -6176,23 +6180,29 @@ interface RegistryRunOpts {
6176
6180
  }
6177
6181
 
6178
6182
  /**
6179
- * `traceAnalystProposer` wraps agent-eval's OWN trace-analyst engine
6180
- * (`AnalystRegistry` over the agentic OTLP reader) as a `SurfaceProposer`.
6181
- * It is the symmetric opponent to `haloProposer`: both run the SAME shared
6182
- * `analysisEditProposer` pipeline (materialize identical traces → apply via one
6183
- * identical LLM edit), so a `compareProposers` lift delta isolates a single
6184
- * variable — ANALYSIS QUALITY. The benchmark answers "is our HALO clone as good
6185
- * as the real HALO?" as a held-out lift CI, not a vibe.
6186
- *
6187
- * Findings come from the REGISTRY (structured `AnalystFinding[]` carrying
6188
- * area / severity / recommended_action), rendered into the report the shared
6189
- * apply step consumes.
6183
+ * Adapt the built-in analyst registry to `SurfaceProposer`.
6190
6184
  *
6191
- * Fail-loud: no traces throw; analyst run errors throw; zero findings →
6192
- * throw. Never fabricate a candidate.
6185
+ * The proposer produces structured findings from OTLP traces, then uses the
6186
+ * same edit step as `haloProposer`. It rejects missing traces, analysis errors,
6187
+ * and empty findings instead of returning a fabricated candidate.
6193
6188
  */
6194
6189
 
6195
6190
  type TraceAnalystPriorFindings = NonNullable<RegistryRunOpts['priorFindings']>;
6191
+ interface AnalyzeOtlpTraceFileOptions {
6192
+ tracePath: string;
6193
+ runId: string;
6194
+ baseUrl: string;
6195
+ apiKey: string;
6196
+ model: string;
6197
+ provider?: AxAIArgs<unknown>['name'];
6198
+ kinds?: readonly TraceAnalystKindSpec[];
6199
+ signal?: AbortSignal;
6200
+ costLedger?: CostLedgerHandle;
6201
+ costPhase?: string;
6202
+ priorFindings?: TraceAnalystPriorFindings;
6203
+ }
6204
+ /** Run the built-in analyst registry against one OTLP JSONL file. */
6205
+ declare function analyzeOtlpTraceFile(opts: AnalyzeOtlpTraceFileOptions): Promise<AnalystFinding[]>;
6196
6206
  interface TraceAnalystProposerOptions<TFindings = unknown> {
6197
6207
  /** OpenAI-compatible base URL for BOTH the analyst's agentic reads and the
6198
6208
  * apply step (e.g. `https://api.deepseek.com/v1` or the Tangle router). */
@@ -6500,9 +6510,15 @@ interface InterRaterInsight {
6500
6510
  raters: number;
6501
6511
  /** Number of runs every rater scored. */
6502
6512
  jointlyRated: number;
6503
- /** Cohen's κ averaged across rater pairs. */
6513
+ /** Multi-rater weighted kappa over the jointly rated runs. */
6504
6514
  kappa: number;
6505
- /** Pairwise κ per rater pair (key = `"raterA::raterB"`). */
6515
+ /** Absolute agreement across raters, using ICC(2,1). */
6516
+ icc: number;
6517
+ /** Mean pairwise Pearson correlation. Correlation is not agreement. */
6518
+ pearson: number;
6519
+ /** Mean pairwise Spearman rank correlation. */
6520
+ spearman: number;
6521
+ /** Pairwise weighted kappa per rater pair (key = `"raterA::raterB"`). */
6506
6522
  perPair: Record<string, number>;
6507
6523
  /** Run ids where raters disagree the most — the high-value triage list. */
6508
6524
  disagreementCases: Array<{
@@ -7138,7 +7154,7 @@ declare function selectDiscriminative(signals: ScenarioSignal[], k: number, opts
7138
7154
 
7139
7155
  /**
7140
7156
  * Shared campaign-score reductions used by every optimizer preset
7141
- * (`runOptimization`, `runSkillOpt`, `compareProposers`). ONE definition of
7157
+ * (`runOptimization`, `runSkillOpt`, `compareOptimizationMethods`). ONE definition of
7142
7158
  * "composite of a campaign" and "per-scenario / per-dimension breakdown" so
7143
7159
  * the optimizers cannot drift on how a surface's score is computed.
7144
7160
  */
@@ -7662,4 +7678,4 @@ declare function verifyCodeSurface(surface: CodeSurface, worktreeDir?: string):
7662
7678
  * identity against the checkout at `worktreeRef`. */
7663
7679
  declare function resolveWorktreePath(surface: CodeSurface, worktreeDir?: string): string;
7664
7680
 
7665
- export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareProposersOptions, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoEntryConfig, type FapoFailureCluster, type FapoOptimizationLevel, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, LineageStoreConflictError, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationProposer, type OptimizerConfig, type OptimizerEntryConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PendingCostCallView, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposalTrackContext, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type ProposerComparison, type ProposerEntry, type ProposerPairwise, type ProposerScore, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystPriorFindings, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignLineageStore, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareProposers, composeGate, compositeProposer, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationEntry, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoEntry, gepaProposer, gepaReflectionEntry, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptEntry, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };
7681
+ export { type AcceptedEdit, type AceProposerOptions, type AnalystArtifact, type AnalystScenario, type AnalyzeCrossSurfaceInteractionsInput, type AnalyzeOtlpTraceFileOptions, type ApplySkillPatchResult, type AxisEvidence, type AxisVerdict, type BuildAnalystSurfaceDispatchOptions, type BuildEvidenceVectorOptions, type BuildLoopProvenanceArgs, type BuiltinOptimizationMethodConfig, type CampaignAggregates, type CampaignArtifactWriter, type CampaignBreakdown, type CampaignCellResult, type CampaignCostMeter, type CampaignResult, type CampaignRunPlan, type CampaignRunPlanCell, type CampaignScenarioIdentity, type CampaignStorage, type CampaignTokenUsage, type CampaignTraceWriter, type CodeSurface, type CodeSurfaceVerification, type CompareOptimizationMethodsOptions, type ComparisonCost, type CompositeProposerOptions, type CostLedgerHandle, type CrossSurfaceAdditionDecision, type CrossSurfaceAdditionRejectionReason, type CrossSurfaceAttemptCompleteness, type CrossSurfaceBestSingleSelection, type CrossSurfaceBootstrapPolicy, type CrossSurfaceCandidate, type CrossSurfaceCandidateComparison, type CrossSurfaceCandidateEvidence, type CrossSurfaceCandidateOutcome, type CrossSurfaceCandidateSummary, type CrossSurfaceComponent, type CrossSurfaceComponentEvidence, type CrossSurfaceCompositionStep, type CrossSurfaceDistribution, type CrossSurfaceEligibility, type CrossSurfaceEvidenceBreakdown, type CrossSurfaceIneligibilityReason, type CrossSurfaceInteractionAwareSelection, type CrossSurfaceInteractionEffect, type CrossSurfaceInteractionPath, type CrossSurfaceInteractionReport, type CrossSurfaceInteractionTask, type CrossSurfaceNaiveStackSelection, type CrossSurfacePairCompatibility, type CrossSurfacePairEvidence, type CrossSurfacePairIncompatibilityReason, type CrossSurfacePairwiseEntry, type CrossSurfaceRankedSingle, type CrossSurfaceRelativeCost, type CrossSurfaceSelectionPolicy, type CrossSurfaceSelections, type CrossSurfaceTaskRow, DEFAULT_POLICY_EDIT_HISTORY_LIMITS, type DefaultProductionGateOptions, type DimensionRegression, type DiscriminationScore, type DispatchContext, type DispatchFn, type EmitLoopProvenanceArgs, type EmitLoopProvenanceResult, type EvalFixture, type EvalFixtureFile, type EvalFixtureLoadOptions, type EvalFixtureRunPlan, type EvalFixtureScenario, type EvalFixtureValidationMode, type EvidenceVector, type EvolutionaryProposerOptions, type FailureModeRecallJudgeOptions, type FapoAttributionSignals, type FapoFailureCluster, type FapoOptimizationLevel, type FapoOptimizationMethodConfig, type FapoProposerOptions, type FapoReviewInput, type FapoReviewIssue, type FapoReviewResult, type FapoScopeContract, FileSearchLedger, FsLabeledScenarioStore, type FsLabeledScenarioStoreOptions, type Gate, type GateContext, type GateDecision, type GateResult, type GenerationCandidate, type GenerationRecord, type GepaProposerConstraints, type GepaProposerOptions, type GitWorktreeAdapterOptions, type Governor, type GovernorContext, type GovernorOp, type HaloProposerOptions, type HeldOutGateOptions, type HeldoutSignificance, type HeldoutSignificanceOptions, type HeuristicGovernorOptions, type JsonPolicyEditTargetSurface, type JsonPrimitive, type JsonValue, type JudgeAggregate, type JudgeConfig, type JudgeDimension, type JudgeScore, type LabelTrust, type LabeledScenarioRecord, type LabeledScenarioSampleArgs, type LabeledScenarioSource, type LabeledScenarioStore, LabeledScenarioStoreError, type LabeledScenarioWrite, Lineage, type LineageEdge, type LineageGraph, type LineageNode, type LineageNodeInput, type LineageStore, LineageStoreConflictError, type LlmJudgeDimension, type LlmJudgeOptions, type LlmPolicyEditProposerOptions, type LoadEvalFixtureScenariosOptions, type LoopProvenanceArgsFromResult, type LoopProvenanceBackend, type LoopProvenanceCandidate, type LoopProvenanceEvidence, type LoopProvenanceRecord, type MemoryCurationProposerOptions, type MutableSurface, type Mutator, type NeutralizationGateOptions, type ObjectiveSource, type OpenAutoPrOptions, type OpenAutoPrResult, type OpenSearchLedgerOptions, type OptimizationMethod, type OptimizationMethodComparison, type OptimizationMethodInput, type OptimizationMethodPairwise, type OptimizationMethodResult, type OptimizationMethodRunOptions, type OptimizationMethodScore, type OptimizationProposer, type OptimizerConfig, POLICY_EDIT_CANDIDATE_RECORD_SCHEMA, type PairedHoldout, type ParameterCandidate, type ParameterChange, type ParameterSweepProposerOptions, type ParetoParent, type ParetoSignificanceGateOptions, type PendingCostCallView, type PlanCampaignRunOptions, type PlanEvalFixtureRunOptions, type PlaybackContext, type PlaybackDriver, type PlaybackStep, type PolicyEditAuthorScenarioRow, type PolicyEditCandidateRecord, type PolicyEditCandidateSummary, type PolicyEditFindingInput, type PolicyEditFindingSource, type PolicyEditHistoryCandidateContext, type PolicyEditHistoryGenerationContext, type PolicyEditHistoryProjectionOptions, type PolicyEditObjective, type PolicyEditOutcomeContext, type PolicyEditProposerOptions, type PowerPreflight, type PowerPreflightOptions, type PremeasuredOptimizationBaseline, type ProfileDispatchFn, ProfileMatrixError, type ProfileSummary, type PromotionObjective, type PromotionPolicy, type ProposalTrackContext, type ProposeContext, type ProposePatchesArgs, type ProposedCandidate, type RedactionStatus, type ReferenceEquivalenceJudgeOptions, type ReferenceEquivalenceScenario, type RejectedEdit, type RolloutArgumentDiff, type RolloutArgumentDiffOptions, type RolloutCall, type RunCampaignOptions, type RunEvalOptions, type RunImprovementLoopOptions, type RunImprovementLoopResult, type RunLineageLoopOptions, type RunLineageLoopResult, type RunLineageLoopSeed, type RunLineageOptions, type RunLineageResult, type RunLineageSeed, type RunLineageStepResult, type RunOptimizationOptions, type RunOptimizationResult, type RunProfileMatrixOptions, type RunProfileMatrixResult, type RunSkillOptOptions, type RunSkillOptResult, SEARCH_LEDGER_SCHEMA, type Scenario, type ScenarioAggregate, type ScenarioRollup, type ScenarioSignal, type ScoreboardRenderOptions, type ScoreboardRow, type ScoreboardSummary, type ScoredRollout, type ScoredSurfaceOutcome, type SearchAccountingAudit, type SearchArtifactRef, type SearchAttemptAccounting, type SearchCandidateDecidedEvent, type SearchCandidateLineage, type SearchCandidateRegisteredEvent, type SearchCandidateSlot, type SearchCandidateSlotClosedEvent, type SearchCandidateSurface, type SearchCompletedEvent, type SearchCostAccounting, type SearchFailureReason, type SearchLedger, type SearchLedgerAppendResult, SearchLedgerConflictError, type SearchLedgerEntry, SearchLedgerError, type SearchLedgerEvent, type SearchLedgerHash, SearchLedgerIntegrityError, type SearchLedgerReplay, type SearchModelIdentity, type SearchOperationKind, type SearchOperationRecordedEvent, type SearchPlan, type SearchPlannedEvent, type SearchPlannedOperation, type SearchPlannedTask, type SearchSourceRef, type SearchSurfaceEffect, type SearchSurfaceEvidence, type SearchSurfaceKind, type SearchTaskAttemptedEvent, type SearchTaskOutcome, type SearchTokenAccounting, type SelectPolicyEditAuthorRowsOptions, type SequentialDecideFn, type SequentialDecideOptions, type SequentialDecision, type SequentialObservation, type SequentialPairedGate, type SequentialPairedGateOptions, type SerializedJsonBudget, type SessionScript, type SingleRunLock, type SingleRunLockOptions, type SkillOptEpochRecord, type SkillOptEvidence, type SkillOptProposer, type SkillOptProposerOptions, type SkillPatch, type SkillPatchOp, SkillPatchParseError, type SkillPatchRejection, type SurfaceProposer, type SurfaceScore, type TraceAnalystPriorFindings, type TraceAnalystProposerOptions, type TraceSpan, type TransientFailureOptions, type UngroundedLiteralReport, type UserStory, type UserStoryVerdict, type Worktree, type WorktreeAdapter, WorktreeAdapterError, aceProposer, acquireSingleRunLock, analyzeCrossSurfaceInteractions, analyzeOtlpTraceFile, applySkillPatch, assertCampaignDesign, assertCampaignSplitIdentity, assertCodeSurfaceIdentity, assertPolicyEditAuthorContextBudget, buildAnalystSurfaceDispatch, buildEvidenceVector, buildLoopProvenanceRecord, callbackGovernor, campaignBreakdown, campaignLineageStore, campaignMeanComposite, campaignMeasurementDigest, campaignScenarioIdentity, campaignSplitDigest, campaignSplitDigestFromIdentities, canonicalDigest, classifyUngroundedLiterals, codeSurfaceIdentityMaterial, compareOptimizationMethods, composeGate, compositeProposer, costFromLedgerSummary, countSentenceEdits, createReferenceEquivalenceJudge, createRunCostLedger, defaultProductionGate, detectScale, dimensionRegressions, discoverEvalFixtures, emitLoopProvenance, evolutionaryProposer, extractFapoAttributionSignals, extractH2Sections, failureModeRecallJudge, fapoEscalationMethod, fapoProposer, fsCampaignStorage, fsLineageStore, gepaParetoMethod, gepaProposer, gepaReflectionMethod, gitWorktreeAdapter, haloProposer, heldOutGate, heldoutSignificance, heuristicGovernor, inMemoryCampaignStorage, isProposedCandidate, isTransientTransportFailure, labelTrustRank, lineageNodeId, llmJudge, llmPolicyEditProposer, loadEvalFixture, loadEvalFixtureScenarios, loopProvenanceArgsFromResult, loopProvenanceSpans, makePlaybackDispatch, memLineageStore, memoryCurationProposer, neutralizationGate, neutralizeText, openAutoPr, openSearchLedger, pairHoldout, parameterSweepProposer, paretoPolicy, paretoSignificanceGate, parseSkillPatchResponse, patchEditCount, planCampaignRun, planEvalFixtureRun, policyEditProposer, powerPreflight, projectPolicyEditHistory, provenanceRecordPath, provenanceSpansPath, renderScoreboardMarkdown, renderSurfaceDiff, resolveRunDir, resolveWorktreePath, rolloutArgumentDiff, runCampaign, runEval, runImprovementLoop, runLineage, runLineageLoop, runOptimization, runProfileMatrix, runSkillOpt, scoreDiscrimination, scoreUserStory, scoreboardSummary, selectDiscriminative, selectPolicyEditAuthorRows, sequentialDecide, sequentialPairedGate, skillOptMethod, skillOptProposer, surfaceContentHash, surfaceHash, tangleTracesRoot, traceAnalystProposer, userStoryScoreboard, validatePolicyEditCandidateRecord, validateSearchLedgerEvent, verifyCodeSurface, verifyLoopProvenanceRecord };