@tangle-network/agent-eval 0.95.0 → 0.95.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/adapters/http.d.ts +17 -10
- package/dist/adapters/langchain.d.ts +14 -7
- package/dist/adapters/otel.d.ts +25 -13
- package/dist/{rl/adversarial.d.ts → adversarial-DIVcDoI_.d.ts} +7 -6
- package/dist/analyst/index.d.ts +236 -28
- package/dist/{trace-analyst/analyst.d.ts → analyst-C8HHvfJp.d.ts} +14 -12
- package/dist/{contract/analyze-runs.d.ts → analyze-runs-DtT6F_6T.d.ts} +10 -9
- package/dist/authenticity/index.d.ts +16 -15
- package/dist/{baseline.d.ts → baseline-Bbid3WoO.d.ts} +44 -8
- package/dist/belief-state/index.d.ts +605 -14
- package/dist/benchmarks/index.d.ts +5 -23
- package/dist/builder-eval/index.d.ts +250 -5
- package/dist/calibration-BPmzuVPk.d.ts +101 -0
- package/dist/campaign/index.d.ts +1452 -38
- package/dist/cli.d.ts +0 -2
- package/dist/{contract/intake/code-agent-session.d.ts → code-agent-session-CPHRCb4-.d.ts} +17 -15
- package/dist/contract/index.d.ts +688 -106
- package/dist/control-Doncu-B_.d.ts +259 -0
- package/dist/{control-runtime.d.ts → control-runtime-Acf9CGhw.d.ts} +26 -23
- package/dist/control.d.ts +10 -11
- package/dist/corpus-D4YW9UoJ.d.ts +560 -0
- package/dist/{cost-ledger.d.ts → cost-ledger-DuSqlw5B.d.ts} +11 -10
- package/dist/{counterfactual.d.ts → counterfactual-DlOz8PBx.d.ts} +13 -12
- package/dist/{dataset.d.ts → dataset-BbGkaN2I.d.ts} +14 -11
- package/dist/{analyst/registry.d.ts → default-registry-GyE8X5SP.d.ts} +37 -8
- package/dist/diagnose.d.ts +252 -1
- package/dist/{trace/emitter.d.ts → emitter-C2rqGH_l.d.ts} +12 -9
- package/dist/{errors.d.ts → errors-CzMUYo7b.d.ts} +11 -10
- package/dist/failure-cluster-DH9Flgcf.d.ts +76 -0
- package/dist/{feedback-trajectory.d.ts → feedback-trajectory-BxY0cKfs.d.ts} +38 -36
- package/dist/fuzz.d.ts +547 -1
- package/dist/gepa-C1NCIZ9o.d.ts +414 -0
- package/dist/governance/index.d.ts +135 -5
- package/dist/harness-optimizer-mOl9XX_O.d.ts +106 -0
- package/dist/hosted/index.d.ts +239 -10
- package/dist/index-_Y4oNOOb.d.ts +159 -0
- package/dist/index.d.ts +5660 -277
- package/dist/{contract/insight-report.d.ts → insight-report-BnRjTibG.d.ts} +19 -16
- package/dist/{trace/integrity.d.ts → integrity-D2t12mMw.d.ts} +14 -11
- package/dist/{judge-calibration.d.ts → judge-calibration-0p2QcWNE.d.ts} +17 -16
- package/dist/{analyst/kind-factory.d.ts → kind-factory-X3eDYbKn.d.ts} +61 -10
- package/dist/knowledge/index.d.ts +103 -3
- package/dist/{llm-client.d.ts → llm-client-Bj7g0rqu.d.ts} +23 -21
- package/dist/matrix/index.d.ts +30 -12
- package/dist/meta-eval/index.d.ts +182 -6
- package/dist/{multi-layer-verifier.d.ts → multi-layer-verifier-DUZXrPDA.d.ts} +15 -12
- package/dist/multishot/index.d.ts +290 -7
- package/dist/{rl/off-policy.d.ts → off-policy-DiwuKKg7.d.ts} +9 -8
- package/dist/openapi.json +1 -1
- package/dist/{meta-eval/outcome-store.d.ts → outcome-store-rnXLEqSn.d.ts} +8 -7
- package/dist/{pareto.d.ts → pareto-E-pembql.d.ts} +10 -9
- package/dist/perf/index.d.ts +119 -13
- package/dist/pipelines/index.d.ts +173 -8
- package/dist/pre-registration-nfUdc9EQ.d.ts +483 -0
- package/dist/prm/index.d.ts +104 -5
- package/dist/provenance-CncDq9qE.d.ts +426 -0
- package/dist/query-B7GGjRox.d.ts +32 -0
- package/dist/{trace/raw-provider-sink.d.ts → raw-provider-sink-C46HDghv.d.ts} +14 -13
- package/dist/{red-team.d.ts → red-team-BWdoyleI.d.ts} +16 -14
- package/dist/{trace/redact.d.ts → redact-B40YG2M_.d.ts} +8 -7
- package/dist/release-report-pidWUMZ2.d.ts +233 -0
- package/dist/reporting.d.ts +16 -15
- package/dist/{eval-campaign.d.ts → researcher-Jr8ME1dZ.d.ts} +156 -34
- package/dist/rl.d.ts +1193 -1
- package/dist/{prm/rubric.d.ts → rubric-Cc6UHvUb.d.ts} +13 -10
- package/dist/{meta-eval/rubric-predictive-validity.d.ts → rubric-predictive-validity-C2hDKM8Z.d.ts} +11 -8
- package/dist/run-critic-CmMf05uV.d.ts +56 -0
- package/dist/{run-record.d.ts → run-record-CP2ObebC.d.ts} +117 -15
- package/dist/runtime-trajectory-BOUUjI0y.d.ts +49 -0
- package/dist/{trace/schema.d.ts → schema-m0gsnbt3.d.ts} +30 -29
- package/dist/semantic-concept-judge-DSBB2Cfp.d.ts +624 -0
- package/dist/{sequential.d.ts → sequential-5iSVfzl2.d.ts} +10 -9
- package/dist/{series-convergence.d.ts → series-convergence-D5OWMBg6.d.ts} +5 -4
- package/dist/sink-fetch-B1Yg4Til.d.ts +101 -0
- package/dist/{statistics.d.ts → statistics-CCJpTGOS.d.ts} +48 -46
- package/dist/{trace/store.d.ts → store-BcFXE6LG.d.ts} +12 -21
- package/dist/{trace-analyst/types.d.ts → store-C1YxJDEK.d.ts} +74 -18
- package/dist/storyboard/index.d.ts +81 -16
- package/dist/{summary-report.d.ts → summary-report-CInXwsza.d.ts} +160 -23
- package/dist/telemetry/{sink-file.d.ts → file.d.ts} +7 -5
- package/dist/telemetry/index.d.ts +35 -17
- package/dist/{sandbox-harness.d.ts → test-graded-scenario-DeODGLra.d.ts} +60 -15
- package/dist/{locked-jsonl-appender.d.ts → testing-C21CHsq2.d.ts} +4 -3
- package/dist/testing.d.ts +1 -5
- package/dist/traces.d.ts +976 -4
- package/dist/{trajectory.d.ts → trajectory-2TkpSEVh.d.ts} +9 -8
- package/dist/{analyst/types.d.ts → types-B5x54y6n.d.ts} +112 -19
- package/dist/{matrix/types.d.ts → types-BUxNaJ8c.d.ts} +11 -9
- package/dist/{types.d.ts → types-C7DGg5ex.d.ts} +33 -31
- package/dist/{campaign/types.d.ts → types-DQRY8ZT-.d.ts} +47 -44
- package/dist/{verdict.d.ts → verdict-C9MlYujm.d.ts} +3 -2
- package/dist/wire/index.d.ts +570 -13
- package/dist/workflow/index.d.ts +496 -22
- package/package.json +2 -2
- package/dist/action-policy.d.ts +0 -24
- package/dist/action-policy.d.ts.map +0 -1
- package/dist/action-policy.test.d.ts +0 -2
- package/dist/action-policy.test.d.ts.map +0 -1
- package/dist/active-learning.d.ts +0 -41
- package/dist/active-learning.d.ts.map +0 -1
- package/dist/adapters/http.d.ts.map +0 -1
- package/dist/adapters/langchain.d.ts.map +0 -1
- package/dist/adapters/otel.d.ts.map +0 -1
- package/dist/agent-profile-cell.d.ts +0 -101
- package/dist/agent-profile-cell.d.ts.map +0 -1
- package/dist/agent-profile.d.ts +0 -27
- package/dist/agent-profile.d.ts.map +0 -1
- package/dist/agent-profile.test.d.ts +0 -2
- package/dist/agent-profile.test.d.ts.map +0 -1
- package/dist/analyst/adapters.d.ts +0 -62
- package/dist/analyst/adapters.d.ts.map +0 -1
- package/dist/analyst/analyst.test.d.ts +0 -2
- package/dist/analyst/analyst.test.d.ts.map +0 -1
- package/dist/analyst/ax-service.d.ts +0 -27
- package/dist/analyst/ax-service.d.ts.map +0 -1
- package/dist/analyst/behavioral-analyst.d.ts +0 -28
- package/dist/analyst/behavioral-analyst.d.ts.map +0 -1
- package/dist/analyst/chat-client.d.ts +0 -91
- package/dist/analyst/chat-client.d.ts.map +0 -1
- package/dist/analyst/default-registry.d.ts +0 -27
- package/dist/analyst/default-registry.d.ts.map +0 -1
- package/dist/analyst/default-registry.test.d.ts +0 -2
- package/dist/analyst/default-registry.test.d.ts.map +0 -1
- package/dist/analyst/finding-signature.d.ts +0 -48
- package/dist/analyst/finding-signature.d.ts.map +0 -1
- package/dist/analyst/finding-subject.d.ts +0 -146
- package/dist/analyst/finding-subject.d.ts.map +0 -1
- package/dist/analyst/finding-subject.test.d.ts +0 -2
- package/dist/analyst/finding-subject.test.d.ts.map +0 -1
- package/dist/analyst/findings-store.d.ts +0 -75
- package/dist/analyst/findings-store.d.ts.map +0 -1
- package/dist/analyst/index.d.ts.map +0 -1
- package/dist/analyst/kind-factory.d.ts.map +0 -1
- package/dist/analyst/kinds/failure-mode.d.ts +0 -19
- package/dist/analyst/kinds/failure-mode.d.ts.map +0 -1
- package/dist/analyst/kinds/improvement.d.ts +0 -23
- package/dist/analyst/kinds/improvement.d.ts.map +0 -1
- package/dist/analyst/kinds/index.d.ts +0 -22
- package/dist/analyst/kinds/index.d.ts.map +0 -1
- package/dist/analyst/kinds/kinds.test.d.ts +0 -2
- package/dist/analyst/kinds/kinds.test.d.ts.map +0 -1
- package/dist/analyst/kinds/knowledge-gap.d.ts +0 -28
- package/dist/analyst/kinds/knowledge-gap.d.ts.map +0 -1
- package/dist/analyst/kinds/knowledge-poisoning.d.ts +0 -22
- package/dist/analyst/kinds/knowledge-poisoning.d.ts.map +0 -1
- package/dist/analyst/kinds/skill-usage.d.ts +0 -84
- package/dist/analyst/kinds/skill-usage.d.ts.map +0 -1
- package/dist/analyst/kinds/skill-usage.test.d.ts +0 -2
- package/dist/analyst/kinds/skill-usage.test.d.ts.map +0 -1
- package/dist/analyst/parse-tolerant.d.ts +0 -26
- package/dist/analyst/parse-tolerant.d.ts.map +0 -1
- package/dist/analyst/parse-tolerant.test.d.ts +0 -2
- package/dist/analyst/parse-tolerant.test.d.ts.map +0 -1
- package/dist/analyst/registry.budget.test.d.ts +0 -2
- package/dist/analyst/registry.budget.test.d.ts.map +0 -1
- package/dist/analyst/registry.d.ts.map +0 -1
- package/dist/analyst/steer-firewall.d.ts +0 -35
- package/dist/analyst/steer-firewall.d.ts.map +0 -1
- package/dist/analyst/steer-firewall.test.d.ts +0 -2
- package/dist/analyst/steer-firewall.test.d.ts.map +0 -1
- package/dist/analyst/structure-findings.d.ts +0 -37
- package/dist/analyst/structure-findings.d.ts.map +0 -1
- package/dist/analyst/structure-findings.test.d.ts +0 -2
- package/dist/analyst/structure-findings.test.d.ts.map +0 -1
- package/dist/analyst/tool-groups.d.ts +0 -34
- package/dist/analyst/tool-groups.d.ts.map +0 -1
- package/dist/analyst/types.d.ts.map +0 -1
- package/dist/anti-slop.d.ts +0 -59
- package/dist/anti-slop.d.ts.map +0 -1
- package/dist/artifact-validator.d.ts +0 -74
- package/dist/artifact-validator.d.ts.map +0 -1
- package/dist/attestation.d.ts +0 -63
- package/dist/attestation.d.ts.map +0 -1
- package/dist/attestation.test.d.ts +0 -2
- package/dist/attestation.test.d.ts.map +0 -1
- package/dist/authenticity/index.d.ts.map +0 -1
- package/dist/authenticity/index.test.d.ts +0 -2
- package/dist/authenticity/index.test.d.ts.map +0 -1
- package/dist/auto-pr.d.ts +0 -120
- package/dist/auto-pr.d.ts.map +0 -1
- package/dist/baseline.d.ts.map +0 -1
- package/dist/behavior-dsl.d.ts +0 -73
- package/dist/behavior-dsl.d.ts.map +0 -1
- package/dist/belief-state/calibration.d.ts +0 -10
- package/dist/belief-state/calibration.d.ts.map +0 -1
- package/dist/belief-state/calibration.test.d.ts +0 -2
- package/dist/belief-state/calibration.test.d.ts.map +0 -1
- package/dist/belief-state/code-agent-corpus.d.ts +0 -66
- package/dist/belief-state/code-agent-corpus.d.ts.map +0 -1
- package/dist/belief-state/code-agent-corpus.test.d.ts +0 -2
- package/dist/belief-state/code-agent-corpus.test.d.ts.map +0 -1
- package/dist/belief-state/code-agent-evidence.d.ts +0 -22
- package/dist/belief-state/code-agent-evidence.d.ts.map +0 -1
- package/dist/belief-state/code-agent-evidence.test.d.ts +0 -2
- package/dist/belief-state/code-agent-evidence.test.d.ts.map +0 -1
- package/dist/belief-state/extract.d.ts +0 -7
- package/dist/belief-state/extract.d.ts.map +0 -1
- package/dist/belief-state/extract.test.d.ts +0 -2
- package/dist/belief-state/extract.test.d.ts.map +0 -1
- package/dist/belief-state/index.d.ts.map +0 -1
- package/dist/belief-state/ope.d.ts +0 -17
- package/dist/belief-state/ope.d.ts.map +0 -1
- package/dist/belief-state/ope.test.d.ts +0 -2
- package/dist/belief-state/ope.test.d.ts.map +0 -1
- package/dist/belief-state/phase0-measurement.d.ts +0 -55
- package/dist/belief-state/phase0-measurement.d.ts.map +0 -1
- package/dist/belief-state/report.d.ts +0 -17
- package/dist/belief-state/report.d.ts.map +0 -1
- package/dist/belief-state/report.test.d.ts +0 -2
- package/dist/belief-state/report.test.d.ts.map +0 -1
- package/dist/belief-state/research-evidence.d.ts +0 -23
- package/dist/belief-state/research-evidence.d.ts.map +0 -1
- package/dist/belief-state/research-evidence.test.d.ts +0 -2
- package/dist/belief-state/research-evidence.test.d.ts.map +0 -1
- package/dist/belief-state/runtime-benchmark-corpus.d.ts +0 -32
- package/dist/belief-state/runtime-benchmark-corpus.d.ts.map +0 -1
- package/dist/belief-state/runtime-hooks.d.ts +0 -87
- package/dist/belief-state/runtime-hooks.d.ts.map +0 -1
- package/dist/belief-state/runtime-hooks.test.d.ts +0 -2
- package/dist/belief-state/runtime-hooks.test.d.ts.map +0 -1
- package/dist/belief-state/selective.d.ts +0 -15
- package/dist/belief-state/selective.d.ts.map +0 -1
- package/dist/belief-state/selective.test.d.ts +0 -2
- package/dist/belief-state/selective.test.d.ts.map +0 -1
- package/dist/belief-state/shadow-probe.d.ts +0 -80
- package/dist/belief-state/shadow-probe.d.ts.map +0 -1
- package/dist/belief-state/shadow-probe.test.d.ts +0 -2
- package/dist/belief-state/shadow-probe.test.d.ts.map +0 -1
- package/dist/belief-state/types.d.ts +0 -195
- package/dist/belief-state/types.d.ts.map +0 -1
- package/dist/belief-state/types.test.d.ts +0 -2
- package/dist/belief-state/types.test.d.ts.map +0 -1
- package/dist/benchmark.d.ts +0 -14
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmarks/index.d.ts.map +0 -1
- package/dist/benchmarks/routing/dataset.d.ts +0 -34
- package/dist/benchmarks/routing/dataset.d.ts.map +0 -1
- package/dist/benchmarks/routing/index.d.ts +0 -34
- package/dist/benchmarks/routing/index.d.ts.map +0 -1
- package/dist/benchmarks/types.d.ts +0 -49
- package/dist/benchmarks/types.d.ts.map +0 -1
- package/dist/bisector.d.ts +0 -81
- package/dist/bisector.d.ts.map +0 -1
- package/dist/budget-guard.d.ts +0 -31
- package/dist/budget-guard.d.ts.map +0 -1
- package/dist/builder-eval/builder-session.d.ts +0 -111
- package/dist/builder-eval/builder-session.d.ts.map +0 -1
- package/dist/builder-eval/correlation.d.ts +0 -32
- package/dist/builder-eval/correlation.d.ts.map +0 -1
- package/dist/builder-eval/index.d.ts.map +0 -1
- package/dist/builder-eval/project-registry.d.ts +0 -51
- package/dist/builder-eval/project-registry.d.ts.map +0 -1
- package/dist/builder-eval/three-layer-eval.d.ts +0 -55
- package/dist/builder-eval/three-layer-eval.d.ts.map +0 -1
- package/dist/campaign/analyst-surface.d.ts +0 -108
- package/dist/campaign/analyst-surface.d.ts.map +0 -1
- package/dist/campaign/analyst-surface.test.d.ts +0 -2
- package/dist/campaign/analyst-surface.test.d.ts.map +0 -1
- package/dist/campaign/auto-pr.d.ts +0 -46
- package/dist/campaign/auto-pr.d.ts.map +0 -1
- package/dist/campaign/distillation/agreement-judge.d.ts +0 -69
- package/dist/campaign/distillation/agreement-judge.d.ts.map +0 -1
- package/dist/campaign/distillation/cli.d.ts +0 -35
- package/dist/campaign/distillation/cli.d.ts.map +0 -1
- package/dist/campaign/distillation/distillation.test.d.ts +0 -2
- package/dist/campaign/distillation/distillation.test.d.ts.map +0 -1
- package/dist/campaign/distillation/gold-scenarios.d.ts +0 -54
- package/dist/campaign/distillation/gold-scenarios.d.ts.map +0 -1
- package/dist/campaign/distillation/run-distillation.d.ts +0 -119
- package/dist/campaign/distillation/run-distillation.d.ts.map +0 -1
- package/dist/campaign/gates/compose.d.ts +0 -12
- package/dist/campaign/gates/compose.d.ts.map +0 -1
- package/dist/campaign/gates/default-production-gate.d.ts +0 -58
- package/dist/campaign/gates/default-production-gate.d.ts.map +0 -1
- package/dist/campaign/gates/heldout-gate.d.ts +0 -12
- package/dist/campaign/gates/heldout-gate.d.ts.map +0 -1
- package/dist/campaign/gates/promotion-policy.d.ts +0 -125
- package/dist/campaign/gates/promotion-policy.d.ts.map +0 -1
- package/dist/campaign/gates/promotion-policy.test.d.ts +0 -2
- package/dist/campaign/gates/promotion-policy.test.d.ts.map +0 -1
- package/dist/campaign/gates/sequential.d.ts +0 -146
- package/dist/campaign/gates/sequential.d.ts.map +0 -1
- package/dist/campaign/gates/sequential.test.d.ts +0 -2
- package/dist/campaign/gates/sequential.test.d.ts.map +0 -1
- package/dist/campaign/gates/statistical-heldout.d.ts +0 -99
- package/dist/campaign/gates/statistical-heldout.d.ts.map +0 -1
- package/dist/campaign/gates/statistical-heldout.test.d.ts +0 -2
- package/dist/campaign/gates/statistical-heldout.test.d.ts.map +0 -1
- package/dist/campaign/index.d.ts.map +0 -1
- package/dist/campaign/labeled-store/fs-adapter.d.ts +0 -59
- package/dist/campaign/labeled-store/fs-adapter.d.ts.map +0 -1
- package/dist/campaign/presets/compare-proposers.d.ts +0 -146
- package/dist/campaign/presets/compare-proposers.d.ts.map +0 -1
- package/dist/campaign/presets/playback.d.ts +0 -120
- package/dist/campaign/presets/playback.d.ts.map +0 -1
- package/dist/campaign/presets/playback.test.d.ts +0 -2
- package/dist/campaign/presets/playback.test.d.ts.map +0 -1
- package/dist/campaign/presets/run-eval.d.ts +0 -14
- package/dist/campaign/presets/run-eval.d.ts.map +0 -1
- package/dist/campaign/presets/run-improvement-loop.d.ts +0 -63
- package/dist/campaign/presets/run-improvement-loop.d.ts.map +0 -1
- package/dist/campaign/presets/run-improvement-loop.test.d.ts +0 -2
- package/dist/campaign/presets/run-improvement-loop.test.d.ts.map +0 -1
- package/dist/campaign/presets/run-optimization.d.ts +0 -92
- package/dist/campaign/presets/run-optimization.d.ts.map +0 -1
- package/dist/campaign/presets/run-profile-matrix.d.ts +0 -151
- package/dist/campaign/presets/run-profile-matrix.d.ts.map +0 -1
- package/dist/campaign/presets/run-skill-opt.d.ts +0 -96
- package/dist/campaign/presets/run-skill-opt.d.ts.map +0 -1
- package/dist/campaign/proposers/_findings-text.d.ts +0 -22
- package/dist/campaign/proposers/_findings-text.d.ts.map +0 -1
- package/dist/campaign/proposers/ace.d.ts +0 -33
- package/dist/campaign/proposers/ace.d.ts.map +0 -1
- package/dist/campaign/proposers/ace.test.d.ts +0 -2
- package/dist/campaign/proposers/ace.test.d.ts.map +0 -1
- package/dist/campaign/proposers/analysis-edit.d.ts +0 -32
- package/dist/campaign/proposers/analysis-edit.d.ts.map +0 -1
- package/dist/campaign/proposers/evolutionary.d.ts +0 -20
- package/dist/campaign/proposers/evolutionary.d.ts.map +0 -1
- package/dist/campaign/proposers/fapo.d.ts +0 -120
- package/dist/campaign/proposers/fapo.d.ts.map +0 -1
- package/dist/campaign/proposers/gepa.d.ts +0 -86
- package/dist/campaign/proposers/gepa.d.ts.map +0 -1
- package/dist/campaign/proposers/halo.d.ts +0 -44
- package/dist/campaign/proposers/halo.d.ts.map +0 -1
- package/dist/campaign/proposers/halo.test.d.ts +0 -2
- package/dist/campaign/proposers/halo.test.d.ts.map +0 -1
- package/dist/campaign/proposers/memory.d.ts +0 -47
- package/dist/campaign/proposers/memory.d.ts.map +0 -1
- package/dist/campaign/proposers/memory.test.d.ts +0 -2
- package/dist/campaign/proposers/memory.test.d.ts.map +0 -1
- package/dist/campaign/proposers/skill-opt.d.ts +0 -88
- package/dist/campaign/proposers/skill-opt.d.ts.map +0 -1
- package/dist/campaign/proposers/trace-analyst.d.ts +0 -48
- package/dist/campaign/proposers/trace-analyst.d.ts.map +0 -1
- package/dist/campaign/proposers/trace-analyst.test.d.ts +0 -2
- package/dist/campaign/proposers/trace-analyst.test.d.ts.map +0 -1
- package/dist/campaign/provenance.d.ts +0 -185
- package/dist/campaign/provenance.d.ts.map +0 -1
- package/dist/campaign/run-campaign.d.ts +0 -90
- package/dist/campaign/run-campaign.d.ts.map +0 -1
- package/dist/campaign/score-utils.d.ts +0 -26
- package/dist/campaign/score-utils.d.ts.map +0 -1
- package/dist/campaign/skill-patch.d.ts +0 -62
- package/dist/campaign/skill-patch.d.ts.map +0 -1
- package/dist/campaign/storage.d.ts +0 -38
- package/dist/campaign/storage.d.ts.map +0 -1
- package/dist/campaign/types.d.ts.map +0 -1
- package/dist/campaign/worktree/index.d.ts +0 -53
- package/dist/campaign/worktree/index.d.ts.map +0 -1
- package/dist/canary.d.ts +0 -101
- package/dist/canary.d.ts.map +0 -1
- package/dist/causal-attribution.d.ts +0 -45
- package/dist/causal-attribution.d.ts.map +0 -1
- package/dist/ci-gate.d.ts +0 -44
- package/dist/ci-gate.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client.d.ts +0 -77
- package/dist/client.d.ts.map +0 -1
- package/dist/client.test.d.ts +0 -2
- package/dist/client.test.d.ts.map +0 -1
- package/dist/command-runner.d.ts +0 -74
- package/dist/command-runner.d.ts.map +0 -1
- package/dist/command-runner.test.d.ts +0 -2
- package/dist/command-runner.test.d.ts.map +0 -1
- package/dist/completion-verifier.d.ts +0 -147
- package/dist/completion-verifier.d.ts.map +0 -1
- package/dist/completion-verifier.test.d.ts +0 -9
- package/dist/completion-verifier.test.d.ts.map +0 -1
- package/dist/concurrency.d.ts +0 -23
- package/dist/concurrency.d.ts.map +0 -1
- package/dist/contamination-guard.d.ts +0 -81
- package/dist/contamination-guard.d.ts.map +0 -1
- package/dist/contract/analyze-runs.d.ts.map +0 -1
- package/dist/contract/define-agent-eval.d.ts +0 -52
- package/dist/contract/define-agent-eval.d.ts.map +0 -1
- package/dist/contract/diff.d.ts +0 -114
- package/dist/contract/diff.d.ts.map +0 -1
- package/dist/contract/index.d.ts.map +0 -1
- package/dist/contract/insight-report.d.ts.map +0 -1
- package/dist/contract/insight-types-fwd.d.ts +0 -7
- package/dist/contract/insight-types-fwd.d.ts.map +0 -1
- package/dist/contract/intake/agent-trace.d.ts +0 -97
- package/dist/contract/intake/agent-trace.d.ts.map +0 -1
- package/dist/contract/intake/code-agent-session.d.ts.map +0 -1
- package/dist/contract/intake/feedback-table.d.ts +0 -87
- package/dist/contract/intake/feedback-table.d.ts.map +0 -1
- package/dist/contract/intake/index.d.ts +0 -22
- package/dist/contract/intake/index.d.ts.map +0 -1
- package/dist/contract/intake/otel-spans.d.ts +0 -33
- package/dist/contract/intake/otel-spans.d.ts.map +0 -1
- package/dist/contract/self-improve.d.ts +0 -284
- package/dist/contract/self-improve.d.ts.map +0 -1
- package/dist/control-runtime.d.ts.map +0 -1
- package/dist/control-runtime.test.d.ts +0 -2
- package/dist/control-runtime.test.d.ts.map +0 -1
- package/dist/control.d.ts.map +0 -1
- package/dist/convergence.d.ts +0 -29
- package/dist/convergence.d.ts.map +0 -1
- package/dist/cost-ledger.d.ts.map +0 -1
- package/dist/cost-ledger.test.d.ts +0 -2
- package/dist/cost-ledger.test.d.ts.map +0 -1
- package/dist/cost-report.d.ts +0 -43
- package/dist/cost-report.d.ts.map +0 -1
- package/dist/cost-report.test.d.ts +0 -2
- package/dist/cost-report.test.d.ts.map +0 -1
- package/dist/cost-tracker.d.ts +0 -76
- package/dist/cost-tracker.d.ts.map +0 -1
- package/dist/counterfactual.d.ts.map +0 -1
- package/dist/cross-trace-diff.d.ts +0 -56
- package/dist/cross-trace-diff.d.ts.map +0 -1
- package/dist/dataset.d.ts.map +0 -1
- package/dist/deploy-gate-layer.d.ts +0 -125
- package/dist/deploy-gate-layer.d.ts.map +0 -1
- package/dist/deploy-gate-layer.test.d.ts +0 -2
- package/dist/deploy-gate-layer.test.d.ts.map +0 -1
- package/dist/description-length-gate.d.ts +0 -119
- package/dist/description-length-gate.d.ts.map +0 -1
- package/dist/detectors/edge.test.d.ts +0 -2
- package/dist/detectors/edge.test.d.ts.map +0 -1
- package/dist/detectors/index.d.ts +0 -81
- package/dist/detectors/index.d.ts.map +0 -1
- package/dist/detectors/index.test.d.ts +0 -2
- package/dist/detectors/index.test.d.ts.map +0 -1
- package/dist/diagnose/causal-sweep.d.ts +0 -100
- package/dist/diagnose/causal-sweep.d.ts.map +0 -1
- package/dist/diagnose/index.d.ts +0 -36
- package/dist/diagnose/index.d.ts.map +0 -1
- package/dist/diagnose/remediation.d.ts +0 -68
- package/dist/diagnose/remediation.d.ts.map +0 -1
- package/dist/diagnose/repair.d.ts +0 -77
- package/dist/diagnose/repair.d.ts.map +0 -1
- package/dist/discover-personas.d.ts +0 -35
- package/dist/discover-personas.d.ts.map +0 -1
- package/dist/driver.d.ts +0 -95
- package/dist/driver.d.ts.map +0 -1
- package/dist/driver.test.d.ts +0 -8
- package/dist/driver.test.d.ts.map +0 -1
- package/dist/dual-agent-bench.d.ts +0 -81
- package/dist/dual-agent-bench.d.ts.map +0 -1
- package/dist/error-count-extractor.d.ts +0 -47
- package/dist/error-count-extractor.d.ts.map +0 -1
- package/dist/error-count-extractor.test.d.ts +0 -2
- package/dist/error-count-extractor.test.d.ts.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/eval-campaign.d.ts.map +0 -1
- package/dist/eval-campaign.test.d.ts +0 -2
- package/dist/eval-campaign.test.d.ts.map +0 -1
- package/dist/eval-tools.d.ts +0 -55
- package/dist/eval-tools.d.ts.map +0 -1
- package/dist/eval-trace-store.d.ts +0 -107
- package/dist/eval-trace-store.d.ts.map +0 -1
- package/dist/eval-trace-store.test.d.ts +0 -2
- package/dist/eval-trace-store.test.d.ts.map +0 -1
- package/dist/executor.d.ts +0 -38
- package/dist/executor.d.ts.map +0 -1
- package/dist/executor.test.d.ts +0 -10
- package/dist/executor.test.d.ts.map +0 -1
- package/dist/experiment-tracker.d.ts +0 -178
- package/dist/experiment-tracker.d.ts.map +0 -1
- package/dist/experiment-tracker.test.d.ts +0 -2
- package/dist/experiment-tracker.test.d.ts.map +0 -1
- package/dist/failure-taxonomy.d.ts +0 -38
- package/dist/failure-taxonomy.d.ts.map +0 -1
- package/dist/feedback-trajectory.d.ts.map +0 -1
- package/dist/feedback-trajectory.test.d.ts +0 -2
- package/dist/feedback-trajectory.test.d.ts.map +0 -1
- package/dist/flow-layer.d.ts +0 -90
- package/dist/flow-layer.d.ts.map +0 -1
- package/dist/flow-layer.test.d.ts +0 -2
- package/dist/flow-layer.test.d.ts.map +0 -1
- package/dist/fuzz/capsule.d.ts +0 -46
- package/dist/fuzz/capsule.d.ts.map +0 -1
- package/dist/fuzz/cube.d.ts +0 -36
- package/dist/fuzz/cube.d.ts.map +0 -1
- package/dist/fuzz/explorer-cost.test.d.ts +0 -2
- package/dist/fuzz/explorer-cost.test.d.ts.map +0 -1
- package/dist/fuzz/explorer.d.ts +0 -64
- package/dist/fuzz/explorer.d.ts.map +0 -1
- package/dist/fuzz/fuzz-agent.d.ts +0 -16
- package/dist/fuzz/fuzz-agent.d.ts.map +0 -1
- package/dist/fuzz/fuzz-agent.test.d.ts +0 -2
- package/dist/fuzz/fuzz-agent.test.d.ts.map +0 -1
- package/dist/fuzz/gates.d.ts +0 -33
- package/dist/fuzz/gates.d.ts.map +0 -1
- package/dist/fuzz/index.d.ts +0 -26
- package/dist/fuzz/index.d.ts.map +0 -1
- package/dist/fuzz/policies.d.ts +0 -28
- package/dist/fuzz/policies.d.ts.map +0 -1
- package/dist/fuzz/tools.d.ts +0 -20
- package/dist/fuzz/tools.d.ts.map +0 -1
- package/dist/fuzz/types.d.ts +0 -307
- package/dist/fuzz/types.d.ts.map +0 -1
- package/dist/golden-matcher.d.ts +0 -71
- package/dist/golden-matcher.d.ts.map +0 -1
- package/dist/governance/eu-ai-act.d.ts +0 -37
- package/dist/governance/eu-ai-act.d.ts.map +0 -1
- package/dist/governance/index.d.ts.map +0 -1
- package/dist/governance/nist-ai-rmf.d.ts +0 -15
- package/dist/governance/nist-ai-rmf.d.ts.map +0 -1
- package/dist/governance/soc2.d.ts +0 -12
- package/dist/governance/soc2.d.ts.map +0 -1
- package/dist/governance/types.d.ts +0 -66
- package/dist/governance/types.d.ts.map +0 -1
- package/dist/harness-optimizer.d.ts +0 -82
- package/dist/harness-optimizer.d.ts.map +0 -1
- package/dist/held-out-gate.d.ts +0 -135
- package/dist/held-out-gate.d.ts.map +0 -1
- package/dist/hosted/client.d.ts +0 -73
- package/dist/hosted/client.d.ts.map +0 -1
- package/dist/hosted/from-env.test.d.ts +0 -8
- package/dist/hosted/from-env.test.d.ts.map +0 -1
- package/dist/hosted/index.d.ts.map +0 -1
- package/dist/hosted/types.d.ts +0 -159
- package/dist/hosted/types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/integrity/backend-integrity.d.ts +0 -71
- package/dist/integrity/backend-integrity.d.ts.map +0 -1
- package/dist/integrity/preflight.d.ts +0 -72
- package/dist/integrity/preflight.d.ts.map +0 -1
- package/dist/integrity/preflight.test.d.ts +0 -2
- package/dist/integrity/preflight.test.d.ts.map +0 -1
- package/dist/integrity/single-backend.d.ts +0 -67
- package/dist/integrity/single-backend.d.ts.map +0 -1
- package/dist/intent-match-judge.d.ts +0 -69
- package/dist/intent-match-judge.d.ts.map +0 -1
- package/dist/intent-match-judge.test.d.ts +0 -2
- package/dist/intent-match-judge.test.d.ts.map +0 -1
- package/dist/judge-calibration.d.ts.map +0 -1
- package/dist/judge-ensemble.d.ts +0 -66
- package/dist/judge-ensemble.d.ts.map +0 -1
- package/dist/judge-ensemble.test.d.ts +0 -8
- package/dist/judge-ensemble.test.d.ts.map +0 -1
- package/dist/judge-families.d.ts +0 -38
- package/dist/judge-families.d.ts.map +0 -1
- package/dist/judge-panel.d.ts +0 -65
- package/dist/judge-panel.d.ts.map +0 -1
- package/dist/judge-retry.d.ts +0 -70
- package/dist/judge-retry.d.ts.map +0 -1
- package/dist/judge-runner.d.ts +0 -36
- package/dist/judge-runner.d.ts.map +0 -1
- package/dist/judge-runner.test.d.ts +0 -2
- package/dist/judge-runner.test.d.ts.map +0 -1
- package/dist/judges.d.ts +0 -74
- package/dist/judges.d.ts.map +0 -1
- package/dist/keyword-coverage-judge.d.ts +0 -89
- package/dist/keyword-coverage-judge.d.ts.map +0 -1
- package/dist/keyword-coverage-judge.test.d.ts +0 -2
- package/dist/keyword-coverage-judge.test.d.ts.map +0 -1
- package/dist/knowledge/index.d.ts.map +0 -1
- package/dist/knowledge/readiness.d.ts +0 -26
- package/dist/knowledge/readiness.d.ts.map +0 -1
- package/dist/knowledge/types.d.ts +0 -75
- package/dist/knowledge/types.d.ts.map +0 -1
- package/dist/live-proof.d.ts +0 -62
- package/dist/live-proof.d.ts.map +0 -1
- package/dist/llm-client.d.ts.map +0 -1
- package/dist/llm-client.test.d.ts +0 -2
- package/dist/llm-client.test.d.ts.map +0 -1
- package/dist/locked-jsonl-appender.d.ts.map +0 -1
- package/dist/matrix/aggregation.d.ts +0 -16
- package/dist/matrix/aggregation.d.ts.map +0 -1
- package/dist/matrix/index.d.ts.map +0 -1
- package/dist/matrix/runner.d.ts +0 -15
- package/dist/matrix/runner.d.ts.map +0 -1
- package/dist/matrix/types.d.ts.map +0 -1
- package/dist/meta-eval/calibration.d.ts +0 -47
- package/dist/meta-eval/calibration.d.ts.map +0 -1
- package/dist/meta-eval/correlation-study.d.ts +0 -53
- package/dist/meta-eval/correlation-study.d.ts.map +0 -1
- package/dist/meta-eval/index.d.ts.map +0 -1
- package/dist/meta-eval/outcome-store.d.ts.map +0 -1
- package/dist/meta-eval/rubric-predictive-validity.d.ts.map +0 -1
- package/dist/meta-eval/sentinel.d.ts +0 -169
- package/dist/meta-eval/sentinel.d.ts.map +0 -1
- package/dist/metrics.d.ts +0 -63
- package/dist/metrics.d.ts.map +0 -1
- package/dist/model-seats.d.ts +0 -71
- package/dist/model-seats.d.ts.map +0 -1
- package/dist/model-seats.test.d.ts +0 -2
- package/dist/model-seats.test.d.ts.map +0 -1
- package/dist/muffled-gate-scanner.d.ts +0 -102
- package/dist/muffled-gate-scanner.d.ts.map +0 -1
- package/dist/multi-layer-verifier.d.ts.map +0 -1
- package/dist/multi-layer-verifier.test.d.ts +0 -2
- package/dist/multi-layer-verifier.test.d.ts.map +0 -1
- package/dist/multi-toolchain-layer.d.ts +0 -80
- package/dist/multi-toolchain-layer.d.ts.map +0 -1
- package/dist/multi-toolchain-layer.test.d.ts +0 -2
- package/dist/multi-toolchain-layer.test.d.ts.map +0 -1
- package/dist/multishot/default-tools.d.ts +0 -34
- package/dist/multishot/default-tools.d.ts.map +0 -1
- package/dist/multishot/index.d.ts.map +0 -1
- package/dist/multishot/judges.d.ts +0 -32
- package/dist/multishot/judges.d.ts.map +0 -1
- package/dist/multishot/matrix.d.ts +0 -107
- package/dist/multishot/matrix.d.ts.map +0 -1
- package/dist/multishot/multishot.d.ts +0 -23
- package/dist/multishot/multishot.d.ts.map +0 -1
- package/dist/multishot/router.d.ts +0 -37
- package/dist/multishot/router.d.ts.map +0 -1
- package/dist/multishot/types.d.ts +0 -60
- package/dist/multishot/types.d.ts.map +0 -1
- package/dist/observability.d.ts +0 -71
- package/dist/observability.d.ts.map +0 -1
- package/dist/oracle.d.ts +0 -55
- package/dist/oracle.d.ts.map +0 -1
- package/dist/orthogonality.d.ts +0 -35
- package/dist/orthogonality.d.ts.map +0 -1
- package/dist/otel-pipeline.d.ts +0 -31
- package/dist/otel-pipeline.d.ts.map +0 -1
- package/dist/paraphrase.d.ts +0 -107
- package/dist/paraphrase.d.ts.map +0 -1
- package/dist/pareto.d.ts.map +0 -1
- package/dist/partition-held-out.d.ts +0 -70
- package/dist/partition-held-out.d.ts.map +0 -1
- package/dist/partition-held-out.test.d.ts +0 -2
- package/dist/partition-held-out.test.d.ts.map +0 -1
- package/dist/perf/index.d.ts.map +0 -1
- package/dist/perf/integrity.d.ts +0 -30
- package/dist/perf/integrity.d.ts.map +0 -1
- package/dist/perf/journey.d.ts +0 -45
- package/dist/perf/journey.d.ts.map +0 -1
- package/dist/perf/ratchet.d.ts +0 -47
- package/dist/perf/ratchet.d.ts.map +0 -1
- package/dist/pipelines/budget-breach.d.ts +0 -31
- package/dist/pipelines/budget-breach.d.ts.map +0 -1
- package/dist/pipelines/budget-breach.test.d.ts +0 -2
- package/dist/pipelines/budget-breach.test.d.ts.map +0 -1
- package/dist/pipelines/failure-cluster.d.ts +0 -38
- package/dist/pipelines/failure-cluster.d.ts.map +0 -1
- package/dist/pipelines/failure-cluster.test.d.ts +0 -2
- package/dist/pipelines/failure-cluster.test.d.ts.map +0 -1
- package/dist/pipelines/first-divergence.d.ts +0 -26
- package/dist/pipelines/first-divergence.d.ts.map +0 -1
- package/dist/pipelines/first-divergence.test.d.ts +0 -2
- package/dist/pipelines/first-divergence.test.d.ts.map +0 -1
- package/dist/pipelines/index.d.ts.map +0 -1
- package/dist/pipelines/judge-agreement.d.ts +0 -26
- package/dist/pipelines/judge-agreement.d.ts.map +0 -1
- package/dist/pipelines/judge-agreement.test.d.ts +0 -2
- package/dist/pipelines/judge-agreement.test.d.ts.map +0 -1
- package/dist/pipelines/regression.d.ts +0 -23
- package/dist/pipelines/regression.d.ts.map +0 -1
- package/dist/pipelines/regression.test.d.ts +0 -2
- package/dist/pipelines/regression.test.d.ts.map +0 -1
- package/dist/pipelines/stuck-loop.d.ts +0 -32
- package/dist/pipelines/stuck-loop.d.ts.map +0 -1
- package/dist/pipelines/stuck-loop.test.d.ts +0 -2
- package/dist/pipelines/stuck-loop.test.d.ts.map +0 -1
- package/dist/pipelines/tool-waste.d.ts +0 -34
- package/dist/pipelines/tool-waste.d.ts.map +0 -1
- package/dist/pipelines/tool-waste.test.d.ts +0 -2
- package/dist/pipelines/tool-waste.test.d.ts.map +0 -1
- package/dist/playbook.d.ts +0 -16
- package/dist/playbook.d.ts.map +0 -1
- package/dist/pr-review-benchmark.d.ts +0 -88
- package/dist/pr-review-benchmark.d.ts.map +0 -1
- package/dist/pr-review-benchmark.test.d.ts +0 -2
- package/dist/pr-review-benchmark.test.d.ts.map +0 -1
- package/dist/pre-registration.d.ts +0 -125
- package/dist/pre-registration.d.ts.map +0 -1
- package/dist/prm/builtin-rubrics.d.ts +0 -33
- package/dist/prm/builtin-rubrics.d.ts.map +0 -1
- package/dist/prm/index.d.ts.map +0 -1
- package/dist/prm/inference.d.ts +0 -29
- package/dist/prm/inference.d.ts.map +0 -1
- package/dist/prm/inference.test.d.ts +0 -2
- package/dist/prm/inference.test.d.ts.map +0 -1
- package/dist/prm/rubric.d.ts.map +0 -1
- package/dist/prm/training-export.d.ts +0 -38
- package/dist/prm/training-export.d.ts.map +0 -1
- package/dist/produced-state.d.ts +0 -63
- package/dist/produced-state.d.ts.map +0 -1
- package/dist/produced-state.test.d.ts +0 -8
- package/dist/produced-state.test.d.ts.map +0 -1
- package/dist/profile/baselines.d.ts +0 -37
- package/dist/profile/baselines.d.ts.map +0 -1
- package/dist/profile/index.d.ts +0 -105
- package/dist/profile/index.d.ts.map +0 -1
- package/dist/promotion-gate.d.ts +0 -93
- package/dist/promotion-gate.d.ts.map +0 -1
- package/dist/prompt-registry.d.ts +0 -41
- package/dist/prompt-registry.d.ts.map +0 -1
- package/dist/propose-review-control.d.ts +0 -49
- package/dist/propose-review-control.d.ts.map +0 -1
- package/dist/propose-review-control.test.d.ts +0 -2
- package/dist/propose-review-control.test.d.ts.map +0 -1
- package/dist/propose-review.d.ts +0 -155
- package/dist/propose-review.d.ts.map +0 -1
- package/dist/red-team.d.ts.map +0 -1
- package/dist/reference-replay-steering.d.ts +0 -11
- package/dist/reference-replay-steering.d.ts.map +0 -1
- package/dist/reference-replay.d.ts +0 -176
- package/dist/reference-replay.d.ts.map +0 -1
- package/dist/reflective-mutation.d.ts +0 -79
- package/dist/reflective-mutation.d.ts.map +0 -1
- package/dist/registry.d.ts +0 -31
- package/dist/registry.d.ts.map +0 -1
- package/dist/release-confidence.d.ts +0 -128
- package/dist/release-confidence.d.ts.map +0 -1
- package/dist/release-report.d.ts +0 -11
- package/dist/release-report.d.ts.map +0 -1
- package/dist/replay.d.ts +0 -120
- package/dist/replay.d.ts.map +0 -1
- package/dist/reporter.d.ts +0 -14
- package/dist/reporter.d.ts.map +0 -1
- package/dist/reporting.d.ts.map +0 -1
- package/dist/researcher.d.ts +0 -140
- package/dist/researcher.d.ts.map +0 -1
- package/dist/reviewer.d.ts +0 -118
- package/dist/reviewer.d.ts.map +0 -1
- package/dist/reviewer.test.d.ts +0 -2
- package/dist/reviewer.test.d.ts.map +0 -1
- package/dist/reward-model-export.d.ts +0 -60
- package/dist/reward-model-export.d.ts.map +0 -1
- package/dist/rl/active-curriculum.d.ts +0 -110
- package/dist/rl/active-curriculum.d.ts.map +0 -1
- package/dist/rl/adaptation-eval.d.ts +0 -109
- package/dist/rl/adaptation-eval.d.ts.map +0 -1
- package/dist/rl/adversarial.d.ts.map +0 -1
- package/dist/rl/compute-curves.d.ts +0 -127
- package/dist/rl/compute-curves.d.ts.map +0 -1
- package/dist/rl/contamination.d.ts +0 -117
- package/dist/rl/contamination.d.ts.map +0 -1
- package/dist/rl/corpus.d.ts +0 -55
- package/dist/rl/corpus.d.ts.map +0 -1
- package/dist/rl/corpus.test.d.ts +0 -2
- package/dist/rl/corpus.test.d.ts.map +0 -1
- package/dist/rl/dataset.d.ts +0 -102
- package/dist/rl/dataset.d.ts.map +0 -1
- package/dist/rl/dataset.test.d.ts +0 -2
- package/dist/rl/dataset.test.d.ts.map +0 -1
- package/dist/rl/exporters.d.ts +0 -141
- package/dist/rl/exporters.d.ts.map +0 -1
- package/dist/rl/index.d.ts +0 -49
- package/dist/rl/index.d.ts.map +0 -1
- package/dist/rl/off-policy.d.ts.map +0 -1
- package/dist/rl/predictive-validity-researcher.d.ts +0 -69
- package/dist/rl/predictive-validity-researcher.d.ts.map +0 -1
- package/dist/rl/preferences.d.ts +0 -141
- package/dist/rl/preferences.d.ts.map +0 -1
- package/dist/rl/process-reward.d.ts +0 -122
- package/dist/rl/process-reward.d.ts.map +0 -1
- package/dist/rl/reward-hacking.d.ts +0 -104
- package/dist/rl/reward-hacking.d.ts.map +0 -1
- package/dist/rl/rl-campaign.d.ts +0 -85
- package/dist/rl/rl-campaign.d.ts.map +0 -1
- package/dist/rl/run-record-adapters.d.ts +0 -56
- package/dist/rl/run-record-adapters.d.ts.map +0 -1
- package/dist/rl/sim-fidelity.d.ts +0 -166
- package/dist/rl/sim-fidelity.d.ts.map +0 -1
- package/dist/rl/sim-fidelity.test.d.ts +0 -2
- package/dist/rl/sim-fidelity.test.d.ts.map +0 -1
- package/dist/rl/tournament.d.ts +0 -115
- package/dist/rl/tournament.d.ts.map +0 -1
- package/dist/rl/verifiable-reward.d.ts +0 -124
- package/dist/rl/verifiable-reward.d.ts.map +0 -1
- package/dist/run-critic.d.ts +0 -23
- package/dist/run-critic.d.ts.map +0 -1
- package/dist/run-evidence.d.ts +0 -32
- package/dist/run-evidence.d.ts.map +0 -1
- package/dist/run-record.d.ts.map +0 -1
- package/dist/run-record.test.d.ts +0 -2
- package/dist/run-record.test.d.ts.map +0 -1
- package/dist/run-score.d.ts +0 -31
- package/dist/run-score.d.ts.map +0 -1
- package/dist/runtime-trajectory.d.ts +0 -47
- package/dist/runtime-trajectory.d.ts.map +0 -1
- package/dist/sandbox-harness.d.ts.map +0 -1
- package/dist/sandbox-harness.test.d.ts +0 -2
- package/dist/sandbox-harness.test.d.ts.map +0 -1
- package/dist/sandbox-pool.d.ts +0 -74
- package/dist/sandbox-pool.d.ts.map +0 -1
- package/dist/sandbox-pool.test.d.ts +0 -2
- package/dist/sandbox-pool.test.d.ts.map +0 -1
- package/dist/scorecard.d.ts +0 -133
- package/dist/scorecard.d.ts.map +0 -1
- package/dist/scorecard.test.d.ts +0 -2
- package/dist/scorecard.test.d.ts.map +0 -1
- package/dist/self-play.d.ts +0 -69
- package/dist/self-play.d.ts.map +0 -1
- package/dist/semantic-concept-judge.d.ts +0 -135
- package/dist/semantic-concept-judge.d.ts.map +0 -1
- package/dist/semantic-concept-judge.test.d.ts +0 -2
- package/dist/semantic-concept-judge.test.d.ts.map +0 -1
- package/dist/sequential.d.ts.map +0 -1
- package/dist/series-convergence.d.ts.map +0 -1
- package/dist/slo.d.ts +0 -48
- package/dist/slo.d.ts.map +0 -1
- package/dist/state-continuity.d.ts +0 -47
- package/dist/state-continuity.d.ts.map +0 -1
- package/dist/statistics.d.ts.map +0 -1
- package/dist/statistics.test.d.ts +0 -2
- package/dist/statistics.test.d.ts.map +0 -1
- package/dist/steering-optimizer.d.ts +0 -58
- package/dist/steering-optimizer.d.ts.map +0 -1
- package/dist/steering.d.ts +0 -24
- package/dist/steering.d.ts.map +0 -1
- package/dist/storyboard/code-edit.d.ts +0 -64
- package/dist/storyboard/code-edit.d.ts.map +0 -1
- package/dist/storyboard/code-edit.test.d.ts +0 -2
- package/dist/storyboard/code-edit.test.d.ts.map +0 -1
- package/dist/storyboard/index.d.ts.map +0 -1
- package/dist/storyboard/index.test.d.ts +0 -2
- package/dist/storyboard/index.test.d.ts.map +0 -1
- package/dist/summary-report.d.ts.map +0 -1
- package/dist/telemetry/client.d.ts +0 -35
- package/dist/telemetry/client.d.ts.map +0 -1
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/schema.d.ts +0 -61
- package/dist/telemetry/schema.d.ts.map +0 -1
- package/dist/telemetry/sink-fetch.d.ts +0 -39
- package/dist/telemetry/sink-fetch.d.ts.map +0 -1
- package/dist/telemetry/sink-file.d.ts.map +0 -1
- package/dist/test-graded-scenario.d.ts +0 -42
- package/dist/test-graded-scenario.d.ts.map +0 -1
- package/dist/testing.d.ts.map +0 -1
- package/dist/tool-use-metrics.d.ts +0 -35
- package/dist/tool-use-metrics.d.ts.map +0 -1
- package/dist/trace/capture-fetch.d.ts +0 -48
- package/dist/trace/capture-fetch.d.ts.map +0 -1
- package/dist/trace/capture-fetch.test.d.ts +0 -2
- package/dist/trace/capture-fetch.test.d.ts.map +0 -1
- package/dist/trace/emitter.d.ts.map +0 -1
- package/dist/trace/extract-usage.d.ts +0 -46
- package/dist/trace/extract-usage.d.ts.map +0 -1
- package/dist/trace/extract-usage.test.d.ts +0 -2
- package/dist/trace/extract-usage.test.d.ts.map +0 -1
- package/dist/trace/index.d.ts +0 -15
- package/dist/trace/index.d.ts.map +0 -1
- package/dist/trace/integrity.d.ts.map +0 -1
- package/dist/trace/otel-bridge.d.ts +0 -29
- package/dist/trace/otel-bridge.d.ts.map +0 -1
- package/dist/trace/otel-export.d.ts +0 -52
- package/dist/trace/otel-export.d.ts.map +0 -1
- package/dist/trace/otel.d.ts +0 -57
- package/dist/trace/otel.d.ts.map +0 -1
- package/dist/trace/otlp-attributes.d.ts +0 -17
- package/dist/trace/otlp-attributes.d.ts.map +0 -1
- package/dist/trace/query.d.ts +0 -29
- package/dist/trace/query.d.ts.map +0 -1
- package/dist/trace/query.test.d.ts +0 -2
- package/dist/trace/query.test.d.ts.map +0 -1
- package/dist/trace/raw-provider-sink.d.ts.map +0 -1
- package/dist/trace/redact.d.ts.map +0 -1
- package/dist/trace/schema.d.ts.map +0 -1
- package/dist/trace/store-to-otlp.d.ts +0 -72
- package/dist/trace/store-to-otlp.d.ts.map +0 -1
- package/dist/trace/store-to-otlp.test.d.ts +0 -2
- package/dist/trace/store-to-otlp.test.d.ts.map +0 -1
- package/dist/trace/store.d.ts.map +0 -1
- package/dist/trace/store.test.d.ts +0 -2
- package/dist/trace/store.test.d.ts.map +0 -1
- package/dist/trace-analyst/analyst.d.ts.map +0 -1
- package/dist/trace-analyst/analyst.test.d.ts +0 -2
- package/dist/trace-analyst/analyst.test.d.ts.map +0 -1
- package/dist/trace-analyst/behavioral-metrics.d.ts +0 -40
- package/dist/trace-analyst/behavioral-metrics.d.ts.map +0 -1
- package/dist/trace-analyst/behavioral-metrics.test.d.ts +0 -2
- package/dist/trace-analyst/behavioral-metrics.test.d.ts.map +0 -1
- package/dist/trace-analyst/hook.d.ts +0 -55
- package/dist/trace-analyst/hook.d.ts.map +0 -1
- package/dist/trace-analyst/index.d.ts +0 -18
- package/dist/trace-analyst/index.d.ts.map +0 -1
- package/dist/trace-analyst/insights.d.ts +0 -71
- package/dist/trace-analyst/insights.d.ts.map +0 -1
- package/dist/trace-analyst/insights.test.d.ts +0 -2
- package/dist/trace-analyst/insights.test.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-flatten.d.ts +0 -42
- package/dist/trace-analyst/otlp-flatten.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-span.d.ts +0 -85
- package/dist/trace-analyst/otlp-span.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-span.test.d.ts +0 -2
- package/dist/trace-analyst/otlp-span.test.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-to-run-records.d.ts +0 -115
- package/dist/trace-analyst/otlp-to-run-records.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-to-run-records.test.d.ts +0 -2
- package/dist/trace-analyst/otlp-to-run-records.test.d.ts.map +0 -1
- package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts +0 -2
- package/dist/trace-analyst/otlp-to-run-records.timestamps.test.d.ts.map +0 -1
- package/dist/trace-analyst/prompts.d.ts +0 -6
- package/dist/trace-analyst/prompts.d.ts.map +0 -1
- package/dist/trace-analyst/store-otlp.d.ts +0 -126
- package/dist/trace-analyst/store-otlp.d.ts.map +0 -1
- package/dist/trace-analyst/store-otlp.test.d.ts +0 -8
- package/dist/trace-analyst/store-otlp.test.d.ts.map +0 -1
- package/dist/trace-analyst/store-otlp.timestamps.test.d.ts +0 -2
- package/dist/trace-analyst/store-otlp.timestamps.test.d.ts.map +0 -1
- package/dist/trace-analyst/store.d.ts +0 -63
- package/dist/trace-analyst/store.d.ts.map +0 -1
- package/dist/trace-analyst/tools.d.ts +0 -44
- package/dist/trace-analyst/tools.d.ts.map +0 -1
- package/dist/trace-analyst/tools.test.d.ts +0 -10
- package/dist/trace-analyst/tools.test.d.ts.map +0 -1
- package/dist/trace-analyst/types.d.ts.map +0 -1
- package/dist/trace-contracts.d.ts +0 -180
- package/dist/trace-contracts.d.ts.map +0 -1
- package/dist/traced-analyst.d.ts +0 -26
- package/dist/traced-analyst.d.ts.map +0 -1
- package/dist/traced-judges.d.ts +0 -27
- package/dist/traced-judges.d.ts.map +0 -1
- package/dist/traces.d.ts.map +0 -1
- package/dist/trajectory.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/ui-finding.d.ts +0 -104
- package/dist/ui-finding.d.ts.map +0 -1
- package/dist/verdict-cache.d.ts +0 -78
- package/dist/verdict-cache.d.ts.map +0 -1
- package/dist/verdict-cache.test.d.ts +0 -2
- package/dist/verdict-cache.test.d.ts.map +0 -1
- package/dist/verdict.d.ts.map +0 -1
- package/dist/visual-diff.d.ts +0 -32
- package/dist/visual-diff.d.ts.map +0 -1
- package/dist/wire/handlers.d.ts +0 -54
- package/dist/wire/handlers.d.ts.map +0 -1
- package/dist/wire/index.d.ts.map +0 -1
- package/dist/wire/openapi.d.ts +0 -3
- package/dist/wire/openapi.d.ts.map +0 -1
- package/dist/wire/rpc.d.ts +0 -21
- package/dist/wire/rpc.d.ts.map +0 -1
- package/dist/wire/rubrics.d.ts +0 -34
- package/dist/wire/rubrics.d.ts.map +0 -1
- package/dist/wire/schemas.d.ts +0 -410
- package/dist/wire/schemas.d.ts.map +0 -1
- package/dist/wire/server.d.ts +0 -60
- package/dist/wire/server.d.ts.map +0 -1
- package/dist/workflow/event-schema.d.ts +0 -5
- package/dist/workflow/event-schema.d.ts.map +0 -1
- package/dist/workflow/feedback-pack.d.ts +0 -99
- package/dist/workflow/feedback-pack.d.ts.map +0 -1
- package/dist/workflow/index.d.ts.map +0 -1
- package/dist/workflow/intelligence-export.d.ts +0 -62
- package/dist/workflow/intelligence-export.d.ts.map +0 -1
- package/dist/workflow/partner-report.d.ts +0 -49
- package/dist/workflow/partner-report.d.ts.map +0 -1
- package/dist/workflow/phase-graph.d.ts +0 -43
- package/dist/workflow/phase-graph.d.ts.map +0 -1
- package/dist/workflow/promotion-gate.d.ts +0 -61
- package/dist/workflow/promotion-gate.d.ts.map +0 -1
- package/dist/workflow/run-record.d.ts +0 -12
- package/dist/workflow/run-record.d.ts.map +0 -1
- package/dist/workflow/runtime-adapter.d.ts +0 -20
- package/dist/workflow/runtime-adapter.d.ts.map +0 -1
- package/dist/workflow/sanitize.d.ts +0 -21
- package/dist/workflow/sanitize.d.ts.map +0 -1
- package/dist/workflow/schema.d.ts +0 -5
- package/dist/workflow/schema.d.ts.map +0 -1
- package/dist/workflow/summary.d.ts +0 -43
- package/dist/workflow/summary.d.ts.map +0 -1
- package/dist/workflow/trace-event-fields.d.ts +0 -6
- package/dist/workflow/trace-event-fields.d.ts.map +0 -1
- package/dist/workflow/trajectory.d.ts +0 -15
- package/dist/workflow/trajectory.d.ts.map +0 -1
- package/dist/workflow/types.d.ts +0 -68
- package/dist/workflow/types.d.ts.map +0 -1
- package/dist/workspace-inspector.d.ts +0 -67
- package/dist/workspace-inspector.d.ts.map +0 -1
- package/dist/wrangler-deploy-runner.test.d.ts +0 -2
- package/dist/wrangler-deploy-runner.test.d.ts.map +0 -1
package/dist/rl.d.ts
CHANGED
|
@@ -1 +1,1193 @@
|
|
|
1
|
-
|
|
1
|
+
import { R as RunRecord, a as RunSplitTag } from './run-record-CP2ObebC.js';
|
|
2
|
+
export { A as AdversarialMutation, a as AdversarialScenario, b as AdversarialSearchOptions, c as AdversarialSearchReport, d as adversarialScenarioSearch } from './adversarial-DIVcDoI_.js';
|
|
3
|
+
import { P as PreferenceExtractionReport, D as DpoExportRow, G as GrpoExportRow, S as SftExportRow, E as ExtractPreferencesOptions, a as DpoLookups, b as GrpoLookups, c as SftLookups } from './corpus-D4YW9UoJ.js';
|
|
4
|
+
export { d as CorpusAppendResult, C as CorpusRecord, e as DatasetFormat, f as ExtractStepRewardsOptions, H as HarvestOptions, g as PreferenceStrategy, h as PreferenceTriple, i as PrmExportRow, j as PrmLookups, k as PrmTrainingTriple, R as RewardKind, l as RewardStats, m as RlDatasetBundle, n as RlDatasetConfig, o as RlDatasetManifest, p as RlDatasetStats, q as RunwiseStepSummary, r as StepReward, s as StepRewardJsonlRow, t as StepScorer, u as appendToCorpus, v as buildDatasetFromCorpus, w as buildRlDataset, x as datasheetToMarkdown, y as extractPreferences, z as extractStepRewards, A as prmTrainingPairs, B as readCorpus, F as runwiseStepRewardSummary, I as stepRewardsToJsonl, J as toAnthropicFormat, K as toDpoJsonl, L as toDpoRows, M as toGrpoJsonl, N as toGrpoRows, O as toPrmJsonl, Q as toPrmRows, T as toSftJsonl, U as toSftRows, V as toTRLFormat } from './corpus-D4YW9UoJ.js';
|
|
5
|
+
export { O as OffPolicyEstimate, a as OffPolicyOptions, b as OffPolicyTrajectory, d as doublyRobust, i as inverseProbabilityWeighting, o as offPolicyEstimateAll, s as selfNormalizedImportanceWeighting } from './off-policy-DiwuKKg7.js';
|
|
6
|
+
import { b as OutcomeStore } from './outcome-store-rnXLEqSn.js';
|
|
7
|
+
export { D as DeploymentOutcome, F as FileSystemOutcomeStore, a as FileSystemOutcomeStoreOptions, I as InMemoryOutcomeStore } from './outcome-store-rnXLEqSn.js';
|
|
8
|
+
import { b as RubricPredictiveValidityReport } from './rubric-predictive-validity-C2hDKM8Z.js';
|
|
9
|
+
import { R as Researcher, F as FailureMode, S as SteeringChange, E as ExperimentPlan, a as ExperimentResult, b as EvalCampaignResult, c as EvalCampaignOptions } from './researcher-Jr8ME1dZ.js';
|
|
10
|
+
export { r as runEvalCampaign } from './researcher-Jr8ME1dZ.js';
|
|
11
|
+
import { a as VerificationReport } from './multi-layer-verifier-DUZXrPDA.js';
|
|
12
|
+
import { I as InterimReleaseConfidence } from './sequential-5iSVfzl2.js';
|
|
13
|
+
import { C as CampaignResult } from './types-DQRY8ZT-.js';
|
|
14
|
+
import '@tangle-network/agent-interface';
|
|
15
|
+
import './errors-CzMUYo7b.js';
|
|
16
|
+
import './schema-m0gsnbt3.js';
|
|
17
|
+
import './store-BcFXE6LG.js';
|
|
18
|
+
import './llm-client-Bj7g0rqu.js';
|
|
19
|
+
import './raw-provider-sink-C46HDghv.js';
|
|
20
|
+
import './summary-report-CInXwsza.js';
|
|
21
|
+
import './failure-cluster-DH9Flgcf.js';
|
|
22
|
+
import './emitter-C2rqGH_l.js';
|
|
23
|
+
import './integrity-D2t12mMw.js';
|
|
24
|
+
import './verdict-C9MlYujm.js';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Adaptive curriculum / active scenario selection.
|
|
28
|
+
*
|
|
29
|
+
* Fixed scenario sets waste sample budget on cells the policy already
|
|
30
|
+
* passes (no information left) and cells the policy never passes (no
|
|
31
|
+
* gradient available either). Active learning over scenarios fixes this
|
|
32
|
+
* by allocating the next sample budget to cells where the policy's
|
|
33
|
+
* outcome is *uncertain* — those carry the most decision-relevant signal.
|
|
34
|
+
*
|
|
35
|
+
* This module ships two complementary strategies:
|
|
36
|
+
*
|
|
37
|
+
* 1. **Variance-based** — score each (variant, scenario) cell by the
|
|
38
|
+
* empirical variance of past observations. Allocate next-round budget
|
|
39
|
+
* proportional to variance. Standard active-learning-by-uncertainty
|
|
40
|
+
* heuristic; works well when the policy is non-deterministic and
|
|
41
|
+
* cells differ in observation noise.
|
|
42
|
+
*
|
|
43
|
+
* 2. **Bandit-based (Thompson sampling)** — model each (variant,
|
|
44
|
+
* scenario) cell as a Beta-Bernoulli arm; sample a posterior; pick
|
|
45
|
+
* cells whose posterior mean is closest to the per-scenario decision
|
|
46
|
+
* threshold. The right primitive when scenarios are
|
|
47
|
+
* "pass/fail" rather than continuous, and when promotion gates fire
|
|
48
|
+
* at a known threshold (e.g., 0.5).
|
|
49
|
+
*
|
|
50
|
+
* The output is a *next-round budget allocation* — a list of (variant,
|
|
51
|
+
* scenario, count) triples. The consumer's matrix runner consumes the
|
|
52
|
+
* allocation, runs those cells, feeds the new observations back. Loop.
|
|
53
|
+
*
|
|
54
|
+
* Out of scope (deliberate): scenario *generation* — that's the
|
|
55
|
+
* adversarial primitive's job. This module allocates over an existing
|
|
56
|
+
* scenario pool.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
interface CellObservation {
|
|
60
|
+
variantId: string;
|
|
61
|
+
scenarioId: string;
|
|
62
|
+
/** Observed score in [0, 1]. */
|
|
63
|
+
score: number;
|
|
64
|
+
/** For Bernoulli arms — derive from the score with a threshold if needed. */
|
|
65
|
+
pass?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface CurriculumAllocation {
|
|
68
|
+
variantId: string;
|
|
69
|
+
scenarioId: string;
|
|
70
|
+
/** How many additional reps to run on this cell. */
|
|
71
|
+
count: number;
|
|
72
|
+
/** Strategy-specific reason for the allocation. */
|
|
73
|
+
reason: string;
|
|
74
|
+
}
|
|
75
|
+
interface VarianceCurriculumOptions {
|
|
76
|
+
/** Total reps to allocate across all cells. */
|
|
77
|
+
budget: number;
|
|
78
|
+
/**
|
|
79
|
+
* Smoothing prior on variance — keeps the allocator from concentrating
|
|
80
|
+
* on a cell with one observation just because its 1-sample variance is
|
|
81
|
+
* 0. Default 0.05.
|
|
82
|
+
*/
|
|
83
|
+
variancePrior?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Minimum reps per cell — even when the variance estimate is low, give
|
|
86
|
+
* every cell at least this many. Default 1.
|
|
87
|
+
*/
|
|
88
|
+
floorPerCell?: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Variance-proportional allocation. For each cell, estimate variance from
|
|
92
|
+
* past observations + a prior, then allocate the budget proportional to
|
|
93
|
+
* (sqrt(variance) + 1/sqrt(n)) — a classical optimal-allocation rule
|
|
94
|
+
* (Neyman 1934) that balances "explore noisy cells" with "explore
|
|
95
|
+
* under-sampled cells."
|
|
96
|
+
*/
|
|
97
|
+
declare function varianceBasedCurriculum(observations: CellObservation[], candidateCells: Array<{
|
|
98
|
+
variantId: string;
|
|
99
|
+
scenarioId: string;
|
|
100
|
+
}>, opts: VarianceCurriculumOptions): CurriculumAllocation[];
|
|
101
|
+
interface ThompsonCurriculumOptions {
|
|
102
|
+
budget: number;
|
|
103
|
+
/**
|
|
104
|
+
* The per-scenario decision threshold. Cells whose posterior mean is
|
|
105
|
+
* closest to this get the most budget — that's where the next observation
|
|
106
|
+
* has the highest information value for the gate decision. Default 0.5.
|
|
107
|
+
*/
|
|
108
|
+
decisionThreshold?: number;
|
|
109
|
+
/** Beta prior parameters. Default α=β=1 (uniform). */
|
|
110
|
+
priorAlpha?: number;
|
|
111
|
+
priorBeta?: number;
|
|
112
|
+
/** Seed the Thompson sampler. Default unset (Math.random). */
|
|
113
|
+
seed?: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Thompson-sampling-style allocation for pass/fail cells. For each cell:
|
|
117
|
+
*
|
|
118
|
+
* - Maintain Beta(α + passes, β + failures) posterior on pass-rate
|
|
119
|
+
* - Allocation weight ∝ exp(-((sampledMean - threshold) / σ)^2):
|
|
120
|
+
* cells whose sampled posterior straddles the decision boundary get
|
|
121
|
+
* the most weight; cells already clearly above or below get less.
|
|
122
|
+
*
|
|
123
|
+
* This is the right primitive when promotion gates fire at a known
|
|
124
|
+
* threshold and you want to sharpen the posterior near the boundary.
|
|
125
|
+
*/
|
|
126
|
+
declare function thompsonCurriculum(observations: CellObservation[], candidateCells: Array<{
|
|
127
|
+
variantId: string;
|
|
128
|
+
scenarioId: string;
|
|
129
|
+
}>, opts: ThompsonCurriculumOptions): CurriculumAllocation[];
|
|
130
|
+
/** Convenience: extract `CellObservation[]` directly from `RunRecord[]`. */
|
|
131
|
+
declare function observationsFromRunRecords(runs: RunRecord[], opts?: {
|
|
132
|
+
passThreshold?: number;
|
|
133
|
+
useHoldout?: boolean;
|
|
134
|
+
}): CellObservation[];
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Sample-efficient adaptation evaluation.
|
|
138
|
+
*
|
|
139
|
+
* For foundation-model-based agents, the load-bearing capability isn't
|
|
140
|
+
* raw end-state performance — it's *how fast the agent reaches that
|
|
141
|
+
* performance from cold start*. The same model with a worse prompt that
|
|
142
|
+
* adapts in 5 demonstrations beats the same model with a better prompt
|
|
143
|
+
* that needs 50. Standard meta-learning eval (Finn et al., MAML, RL² lit)
|
|
144
|
+
* reports an *adaptation curve*: score after k=0, 1, 2, 4, 8, 16, …
|
|
145
|
+
* in-context examples or fine-tune steps.
|
|
146
|
+
*
|
|
147
|
+
* This module ships:
|
|
148
|
+
*
|
|
149
|
+
* 1. `runAdaptationCurve` — given a runner that takes k demonstrations
|
|
150
|
+
* and returns a score, produce the (k, score) curve.
|
|
151
|
+
* 2. `compareAdaptationCurves` — paired comparison across two policies.
|
|
152
|
+
* Returns per-k delta with bootstrap CIs and an "area-under-curve"
|
|
153
|
+
* summary statistic.
|
|
154
|
+
* 3. `firstPassK` — for pass/fail evaluation, the minimum k at which
|
|
155
|
+
* the policy reliably passes (≥ pass-rate threshold over reps).
|
|
156
|
+
*
|
|
157
|
+
* Use cases:
|
|
158
|
+
* - Compare two prompt designs that have similar end-state performance
|
|
159
|
+
* but different in-context efficiency.
|
|
160
|
+
* - Decide between fine-tuning and prompting based on adaptation cost.
|
|
161
|
+
* - Detect when a policy "memorizes" k=0 inputs vs. genuinely adapts.
|
|
162
|
+
*/
|
|
163
|
+
interface AdaptationRunner<S> {
|
|
164
|
+
/**
|
|
165
|
+
* Runs the policy on `scenario` with `k` demonstrations. Returns a
|
|
166
|
+
* scalar score in [0, 1]. The runner is responsible for any caching;
|
|
167
|
+
* the harness calls it once per (scenario, k, rep) cell.
|
|
168
|
+
*/
|
|
169
|
+
run(args: {
|
|
170
|
+
scenario: S;
|
|
171
|
+
k: number;
|
|
172
|
+
rep: number;
|
|
173
|
+
}): Promise<number>;
|
|
174
|
+
}
|
|
175
|
+
interface RunAdaptationCurveOptions<S> {
|
|
176
|
+
scenarios: S[];
|
|
177
|
+
/** Number-of-shots to evaluate at. Default `[0, 1, 2, 4, 8, 16]`. */
|
|
178
|
+
ks?: number[];
|
|
179
|
+
/** Reps per (scenario, k) cell. Default 3. */
|
|
180
|
+
reps?: number;
|
|
181
|
+
runner: AdaptationRunner<S>;
|
|
182
|
+
/** Pass-rate threshold for `firstPassK` reporting. Default 0.5. */
|
|
183
|
+
passThreshold?: number;
|
|
184
|
+
}
|
|
185
|
+
interface AdaptationPoint {
|
|
186
|
+
k: number;
|
|
187
|
+
meanScore: number;
|
|
188
|
+
passRate: number;
|
|
189
|
+
std: number;
|
|
190
|
+
n: number;
|
|
191
|
+
/** Per-scenario means at this k. */
|
|
192
|
+
perScenario: Array<{
|
|
193
|
+
scenarioId: string;
|
|
194
|
+
meanScore: number;
|
|
195
|
+
passes: number;
|
|
196
|
+
total: number;
|
|
197
|
+
}>;
|
|
198
|
+
}
|
|
199
|
+
interface AdaptationCurve {
|
|
200
|
+
points: AdaptationPoint[];
|
|
201
|
+
/**
|
|
202
|
+
* Smallest `k` at which `passRate ≥ passThreshold`. `null` if no `k`
|
|
203
|
+
* tested reaches it.
|
|
204
|
+
*/
|
|
205
|
+
firstPassK: number | null;
|
|
206
|
+
/**
|
|
207
|
+
* Area under the (k, meanScore) curve, normalized by max-k. A
|
|
208
|
+
* single-number summary of "how well does this policy adapt from
|
|
209
|
+
* cold-start to fully-conditioned." Higher = better adapter.
|
|
210
|
+
*/
|
|
211
|
+
adaptationArea: number;
|
|
212
|
+
}
|
|
213
|
+
declare function runAdaptationCurve<S extends {
|
|
214
|
+
scenarioId?: string;
|
|
215
|
+
}>(opts: RunAdaptationCurveOptions<S>): Promise<AdaptationCurve>;
|
|
216
|
+
interface CompareCurvesResult {
|
|
217
|
+
perK: Array<{
|
|
218
|
+
k: number;
|
|
219
|
+
deltaMean: number;
|
|
220
|
+
aLow: number;
|
|
221
|
+
aHigh: number;
|
|
222
|
+
bLow: number;
|
|
223
|
+
bHigh: number;
|
|
224
|
+
}>;
|
|
225
|
+
areaDelta: number;
|
|
226
|
+
firstPassKDelta: number | null;
|
|
227
|
+
/** Verdict: 'a_better' | 'b_better' | 'similar'. */
|
|
228
|
+
verdict: 'a_better' | 'b_better' | 'similar';
|
|
229
|
+
/** Rationale, ready to render. */
|
|
230
|
+
rationale: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Paired comparison of two adaptation curves. Per-k deltas with 95%
|
|
234
|
+
* bootstrap CIs (constructed from each curve's `perScenario` per-k means
|
|
235
|
+
* — the bootstrap unit is the scenario, not the rep).
|
|
236
|
+
*/
|
|
237
|
+
declare function compareAdaptationCurves(a: AdaptationCurve, b: AdaptationCurve, opts?: {
|
|
238
|
+
confidence?: number;
|
|
239
|
+
bootstrapResamples?: number;
|
|
240
|
+
seed?: number;
|
|
241
|
+
}): CompareCurvesResult;
|
|
242
|
+
/** First k at which the curve's per-scenario pass rate reliably hits the threshold. */
|
|
243
|
+
declare function firstPassK(curve: AdaptationCurve, threshold?: number): number | null;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Test-time compute scaling curves.
|
|
247
|
+
*
|
|
248
|
+
* The test-time-compute frontier paper (Snell et al. 2024) and the
|
|
249
|
+
* subsequent o1-style scaling work both show that LLM-agent capability
|
|
250
|
+
* is a function of the compute budget at inference, not just of the
|
|
251
|
+
* training run. The right way to characterize a candidate is therefore
|
|
252
|
+
* a *curve* — score at compute budgets {1×, 4×, 16×, …} — not a single
|
|
253
|
+
* point.
|
|
254
|
+
*
|
|
255
|
+
* This module ships:
|
|
256
|
+
*
|
|
257
|
+
* 1. The compute-curve harness — `runComputeCurve(runner, budgets)` —
|
|
258
|
+
* that evaluates one candidate at a sequence of compute budgets
|
|
259
|
+
* and returns the (compute, score) curve.
|
|
260
|
+
* 2. A best-of-N evaluator — `bestOfN(runner, n, scoreFn)` — the
|
|
261
|
+
* simplest test-time-compute scaling primitive: sample N
|
|
262
|
+
* independent rollouts, return the best.
|
|
263
|
+
* 3. A self-consistency evaluator — `selfConsistency(runner, n)` —
|
|
264
|
+
* the majority-vote variant of best-of-N for tasks with a small
|
|
265
|
+
* categorical answer space.
|
|
266
|
+
* 4. Pareto-frontier extraction over multiple candidates — given
|
|
267
|
+
* (candidate, compute, score) tuples, return the set of
|
|
268
|
+
* candidate-compute combinations that aren't dominated.
|
|
269
|
+
*
|
|
270
|
+
* Caveat: "compute" here is the caller's notion of a compute unit. For
|
|
271
|
+
* agent eval that's typically wall-time × parallelism, or token budget,
|
|
272
|
+
* or LLM-call count. We accept whatever the caller provides; the curve
|
|
273
|
+
* is on whatever axis they pick.
|
|
274
|
+
*/
|
|
275
|
+
interface ComputeCurveBudget {
|
|
276
|
+
/** Identifier — for the report. Common: '1x', '4x', '16x'. */
|
|
277
|
+
id: string;
|
|
278
|
+
/** Numeric value on the chosen axis (tokens, calls, USD, ms — caller picks). */
|
|
279
|
+
cost: number;
|
|
280
|
+
/** Free-form metadata (the caller can carry per-budget config). */
|
|
281
|
+
meta?: Record<string, unknown>;
|
|
282
|
+
}
|
|
283
|
+
interface ComputeCurvePoint {
|
|
284
|
+
budgetId: string;
|
|
285
|
+
cost: number;
|
|
286
|
+
score: number;
|
|
287
|
+
/** Number of underlying samples used at this budget. */
|
|
288
|
+
samples: number;
|
|
289
|
+
/** Optional spread / variance information. */
|
|
290
|
+
std?: number;
|
|
291
|
+
/** Any extra metrics the runner returned. */
|
|
292
|
+
metrics?: Record<string, number>;
|
|
293
|
+
}
|
|
294
|
+
interface ComputeCurve {
|
|
295
|
+
candidateId: string;
|
|
296
|
+
points: ComputeCurvePoint[];
|
|
297
|
+
/** Rough exponent fit: score ≈ a + b * log(cost). Useful for "how steep is the curve?" */
|
|
298
|
+
logSlope: number | null;
|
|
299
|
+
/** Best (highest-score) point on the curve. */
|
|
300
|
+
best: ComputeCurvePoint;
|
|
301
|
+
}
|
|
302
|
+
interface RunComputeCurveOptions {
|
|
303
|
+
candidateId: string;
|
|
304
|
+
budgets: ComputeCurveBudget[];
|
|
305
|
+
/**
|
|
306
|
+
* Run the candidate at one budget. Returns the realized score plus
|
|
307
|
+
* optional spread + extra metrics.
|
|
308
|
+
*/
|
|
309
|
+
runAtBudget: (budget: ComputeCurveBudget) => Promise<{
|
|
310
|
+
score: number;
|
|
311
|
+
samples: number;
|
|
312
|
+
std?: number;
|
|
313
|
+
metrics?: Record<string, number>;
|
|
314
|
+
}>;
|
|
315
|
+
}
|
|
316
|
+
declare function runComputeCurve(opts: RunComputeCurveOptions): Promise<ComputeCurve>;
|
|
317
|
+
interface ComputeBestOfNOptions<O> {
|
|
318
|
+
/** Number of independent samples to draw. */
|
|
319
|
+
n: number;
|
|
320
|
+
/** Sampler — produces one rollout. */
|
|
321
|
+
sample: (sampleIdx: number) => Promise<O>;
|
|
322
|
+
/** Score one rollout. */
|
|
323
|
+
scoreFn: (rollout: O) => Promise<number> | number;
|
|
324
|
+
}
|
|
325
|
+
interface ComputeBestOfNResult<O> {
|
|
326
|
+
best: O;
|
|
327
|
+
bestScore: number;
|
|
328
|
+
scores: number[];
|
|
329
|
+
meanScore: number;
|
|
330
|
+
/** Index of the best rollout, for diagnostics. */
|
|
331
|
+
bestIndex: number;
|
|
332
|
+
}
|
|
333
|
+
/** The simplest test-time scaling primitive. */
|
|
334
|
+
declare function bestOfN<O>(opts: ComputeBestOfNOptions<O>): Promise<ComputeBestOfNResult<O>>;
|
|
335
|
+
interface SelfConsistencyOptions<O> {
|
|
336
|
+
n: number;
|
|
337
|
+
sample: (sampleIdx: number) => Promise<O>;
|
|
338
|
+
/** Extract the canonical answer key (string) from a rollout. */
|
|
339
|
+
answerKey: (rollout: O) => string;
|
|
340
|
+
}
|
|
341
|
+
interface SelfConsistencyResult<O> {
|
|
342
|
+
/** Modal answer (the majority vote). */
|
|
343
|
+
answer: string;
|
|
344
|
+
/** Fraction of samples voting for the modal answer in [0, 1]. */
|
|
345
|
+
agreement: number;
|
|
346
|
+
/** Histogram of all answers. */
|
|
347
|
+
histogram: Record<string, number>;
|
|
348
|
+
/** A representative rollout that voted for the modal answer. */
|
|
349
|
+
representative: O;
|
|
350
|
+
/** All rollouts. */
|
|
351
|
+
rollouts: O[];
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Self-consistency / majority-vote test-time scaling. For tasks with a
|
|
355
|
+
* small categorical answer space (math problems, multiple choice).
|
|
356
|
+
*/
|
|
357
|
+
declare function selfConsistency<O>(opts: SelfConsistencyOptions<O>): Promise<SelfConsistencyResult<O>>;
|
|
358
|
+
/**
|
|
359
|
+
* Pareto frontier over (candidate, compute, score) tuples. A point is on
|
|
360
|
+
* the frontier iff no other point dominates it in both score (higher
|
|
361
|
+
* better) and cost (lower better). Returns the frontier sorted ascending
|
|
362
|
+
* by cost.
|
|
363
|
+
*/
|
|
364
|
+
interface ParetoPointInput {
|
|
365
|
+
candidateId: string;
|
|
366
|
+
budgetId: string;
|
|
367
|
+
cost: number;
|
|
368
|
+
score: number;
|
|
369
|
+
}
|
|
370
|
+
declare function paretoFrontier(points: ParetoPointInput[]): ParetoPointInput[];
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Contamination probe — held-out perturbation tests.
|
|
374
|
+
*
|
|
375
|
+
* The bug class: once a benchmark scenario set is published, models train
|
|
376
|
+
* on it, and your scores become invalid. SWE-Bench-Verified, GPQA, and
|
|
377
|
+
* MMLU-Pro all exist because their predecessors got contaminated within
|
|
378
|
+
* months. The right defense is to keep a held-out *perturbed* version of
|
|
379
|
+
* every scenario — same task, slightly different surface — and check
|
|
380
|
+
* whether scores diverge significantly. Genuine capability transfers; rote
|
|
381
|
+
* memorization doesn't.
|
|
382
|
+
*
|
|
383
|
+
* This module ships the probe contract:
|
|
384
|
+
*
|
|
385
|
+
* 1. A `ScenarioPerturbation` strategy type — function that produces a
|
|
386
|
+
* perturbed scenario from an original.
|
|
387
|
+
* 2. `runContaminationProbe({ originals, perturbed, scoreFn })` — runs
|
|
388
|
+
* both halves and reports per-scenario score divergence + a global
|
|
389
|
+
* contamination verdict via paired Wilcoxon.
|
|
390
|
+
* 3. Several stock perturbations: `renameVariables`, `shuffleOrder`,
|
|
391
|
+
* `paraphrasePrompt`, `injectIrrelevantClause`. Each preserves the
|
|
392
|
+
* task's structural difficulty while breaking surface memorization.
|
|
393
|
+
*
|
|
394
|
+
* The verdict is conservative: if the perturbed-vs-original score
|
|
395
|
+
* difference is statistically significant (BH-adjusted p < 0.05) AND
|
|
396
|
+
* the median drop is > 5 percentage points, we flag *contamination
|
|
397
|
+
* suspected*. False positives are possible (the perturbation might
|
|
398
|
+
* actually be harder); the default is to flag for review, not to
|
|
399
|
+
* autoreject.
|
|
400
|
+
*/
|
|
401
|
+
type ScenarioPerturbationKind = 'rename_variables' | 'shuffle_order' | 'paraphrase' | 'inject_irrelevant_clause' | 'custom';
|
|
402
|
+
interface ScenarioPerturbation<S> {
|
|
403
|
+
kind: ScenarioPerturbationKind;
|
|
404
|
+
/** Apply to one scenario, return its perturbed sibling. */
|
|
405
|
+
apply: (scenario: S) => Promise<S> | S;
|
|
406
|
+
/** Optional id — for the report. */
|
|
407
|
+
id?: string;
|
|
408
|
+
}
|
|
409
|
+
interface ContaminationProbeInput<S> {
|
|
410
|
+
/** Identity of every scenario. The probe's `runFingerprint` keys on these. */
|
|
411
|
+
scenarioId: (s: S) => string;
|
|
412
|
+
/** Original scenarios. */
|
|
413
|
+
originals: S[];
|
|
414
|
+
/**
|
|
415
|
+
* Either pre-computed perturbations (one per original, same order) OR a
|
|
416
|
+
* `perturbation` strategy that synthesizes them on the fly.
|
|
417
|
+
*/
|
|
418
|
+
perturbed?: S[];
|
|
419
|
+
perturbation?: ScenarioPerturbation<S>;
|
|
420
|
+
/**
|
|
421
|
+
* Run the policy/agent against one scenario and return a scalar score
|
|
422
|
+
* in [0, 1]. The probe doesn't care what the policy is — that's the
|
|
423
|
+
* caller's contract.
|
|
424
|
+
*/
|
|
425
|
+
scoreFn: (s: S) => Promise<number>;
|
|
426
|
+
}
|
|
427
|
+
interface ContaminationProbeOptions {
|
|
428
|
+
/** Drop scores below this from the probe; treats partial failures separately. Default 0. */
|
|
429
|
+
scoreFloor?: number;
|
|
430
|
+
/**
|
|
431
|
+
* BH-FDR threshold for declaring contamination on each per-scenario
|
|
432
|
+
* delta. Default 0.05.
|
|
433
|
+
*/
|
|
434
|
+
fdr?: number;
|
|
435
|
+
/**
|
|
436
|
+
* Minimum median per-scenario drop to flag global contamination. Default
|
|
437
|
+
* 0.05 (5 percentage points). Smaller drops may be noise.
|
|
438
|
+
*/
|
|
439
|
+
minMedianDrop?: number;
|
|
440
|
+
}
|
|
441
|
+
interface ContaminationProbeReport {
|
|
442
|
+
perScenario: Array<{
|
|
443
|
+
scenarioId: string;
|
|
444
|
+
originalScore: number;
|
|
445
|
+
perturbedScore: number;
|
|
446
|
+
delta: number;
|
|
447
|
+
/** Per-scenario q-value (single-test BH for a single scenario). Mainly for display. */
|
|
448
|
+
qValue: number;
|
|
449
|
+
}>;
|
|
450
|
+
/** Wilcoxon paired-test on the deltas. */
|
|
451
|
+
pairedTest: {
|
|
452
|
+
w: number;
|
|
453
|
+
p: number;
|
|
454
|
+
};
|
|
455
|
+
medianDelta: number;
|
|
456
|
+
meanDelta: number;
|
|
457
|
+
contaminationSuspected: boolean;
|
|
458
|
+
reason: string;
|
|
459
|
+
/** Number of scenarios processed. */
|
|
460
|
+
n: number;
|
|
461
|
+
}
|
|
462
|
+
declare function runContaminationProbe<S>(input: ContaminationProbeInput<S>, opts?: ContaminationProbeOptions): Promise<ContaminationProbeReport>;
|
|
463
|
+
/**
|
|
464
|
+
* Identifier-rename perturbation for code/text scenarios. Replaces every
|
|
465
|
+
* occurrence of the listed identifiers with synthesized aliases. Use when
|
|
466
|
+
* the scenario's structural difficulty is independent of variable names
|
|
467
|
+
* (e.g. SWE-Bench-style coding tasks).
|
|
468
|
+
*/
|
|
469
|
+
declare function renameVariables<S extends {
|
|
470
|
+
prompt: string;
|
|
471
|
+
}>(identifiers: string[], rename?: (name: string, idx: number) => string): ScenarioPerturbation<S>;
|
|
472
|
+
/**
|
|
473
|
+
* Order-shuffle perturbation. Reshuffles a list-shaped section of the
|
|
474
|
+
* prompt (for QA scenarios that present options A/B/C/D — answer depends
|
|
475
|
+
* on the option labels, not order). Caller provides the section extractor.
|
|
476
|
+
*/
|
|
477
|
+
declare function shuffleOrder<S extends {
|
|
478
|
+
prompt: string;
|
|
479
|
+
}>(shuffleSection: (prompt: string, rng: () => number) => string, seed: number): ScenarioPerturbation<S>;
|
|
480
|
+
/**
|
|
481
|
+
* Inject-irrelevant-clause perturbation. Adds a benign sentence that
|
|
482
|
+
* shouldn't change the answer. Tests for "did the model just memorize
|
|
483
|
+
* the input string."
|
|
484
|
+
*/
|
|
485
|
+
declare function injectIrrelevantClause<S extends {
|
|
486
|
+
prompt: string;
|
|
487
|
+
}>(clause: string, position?: 'prefix' | 'suffix'): ScenarioPerturbation<S>;
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* `PredictiveValidityResearcher` — concrete `Researcher` implementation
|
|
491
|
+
* that drives selection from outcome-anchored predictive validity.
|
|
492
|
+
*
|
|
493
|
+
* Each method:
|
|
494
|
+
*
|
|
495
|
+
* - `inspectFailures(runs)` — synthesizes failure modes from the
|
|
496
|
+
* bottom-quartile of `RunRecord`s on the configured proxy reward.
|
|
497
|
+
* - `proposeChange(failures)` — proposes steering changes that target
|
|
498
|
+
* the rubrics with the lowest predictive validity (decorative ones).
|
|
499
|
+
* Either reduce their weight in the composite, or recalibrate them.
|
|
500
|
+
* - `applyChange(changes, baseline)` — merges the proposed steering
|
|
501
|
+
* into the experiment plan.
|
|
502
|
+
* - `evaluateChange(plan)` — re-runs the predictive-validity check on
|
|
503
|
+
* the post-change runs and reports the delta.
|
|
504
|
+
*
|
|
505
|
+
* The result is a closed loop: the rubric weights drift toward the ones
|
|
506
|
+
* that actually predict deployment outcomes, automatically. Pair with
|
|
507
|
+
* `runRLCampaign` for the full auto-research story.
|
|
508
|
+
*/
|
|
509
|
+
|
|
510
|
+
interface PredictiveValidityResearcherOptions {
|
|
511
|
+
outcomes: OutcomeStore;
|
|
512
|
+
outcomeMetrics: string[];
|
|
513
|
+
/** Score threshold below which a run counts as a "failure." Default 0.5. */
|
|
514
|
+
failureThreshold?: number;
|
|
515
|
+
/** Spearman bucket below which a rubric is "decorative." Default 0.4. */
|
|
516
|
+
decorativeThreshold?: number;
|
|
517
|
+
/** Optional steering-namespace prefix for proposed changes. Default `'rubric_weight'`. */
|
|
518
|
+
steeringNamespace?: string;
|
|
519
|
+
/** Override the rubric set the researcher inspects. Default: every numeric `outcome.raw` key seen. */
|
|
520
|
+
rubrics?: string[];
|
|
521
|
+
/**
|
|
522
|
+
* Snapshot stash hook — called with the most recent predictive-validity
|
|
523
|
+
* report. Useful when a downstream system wants to log rubric drift over
|
|
524
|
+
* time. Default no-op.
|
|
525
|
+
*/
|
|
526
|
+
onReport?: (report: RubricPredictiveValidityReport) => void | Promise<void>;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Concrete `Researcher` driven by `rubricPredictiveValidity`. The brain:
|
|
530
|
+
* rubrics that don't predict deployment outcomes don't earn weight.
|
|
531
|
+
*/
|
|
532
|
+
declare class PredictiveValidityResearcher implements Researcher {
|
|
533
|
+
private opts;
|
|
534
|
+
private lastReport;
|
|
535
|
+
constructor(opts: PredictiveValidityResearcherOptions);
|
|
536
|
+
inspectFailures(runs: RunRecord[]): Promise<FailureMode[]>;
|
|
537
|
+
proposeChange(failures: FailureMode[]): Promise<SteeringChange[]>;
|
|
538
|
+
applyChange(changes: SteeringChange[], baseline: ExperimentPlan): Promise<ExperimentPlan>;
|
|
539
|
+
evaluateChange(plan: ExperimentPlan): Promise<ExperimentResult>;
|
|
540
|
+
/**
|
|
541
|
+
* Run the predictive-validity check explicitly against a fresh RunRecord
|
|
542
|
+
* set. Updates the researcher's cached report so subsequent
|
|
543
|
+
* `proposeChange` calls have evidence to draw from.
|
|
544
|
+
*/
|
|
545
|
+
runValidityCheck(runs: RunRecord[]): Promise<RubricPredictiveValidityReport>;
|
|
546
|
+
/**
|
|
547
|
+
* Force-feed a predictive-validity report into the researcher state —
|
|
548
|
+
* useful when the consumer ran the report out-of-band and wants the
|
|
549
|
+
* researcher's later proposals informed by it.
|
|
550
|
+
*/
|
|
551
|
+
setReport(report: RubricPredictiveValidityReport): void;
|
|
552
|
+
getLastReport(): RubricPredictiveValidityReport | null;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Verifiable reward channel.
|
|
557
|
+
*
|
|
558
|
+
* For RL on coding / math / theorem-proving / structured-output tasks, the
|
|
559
|
+
* reward signal is *decidable* — a test passes or fails, a proof checks or
|
|
560
|
+
* doesn't, an output validates against a schema or doesn't. These rewards
|
|
561
|
+
* are dramatically more useful for RL training than LLM-judge scores
|
|
562
|
+
* because they don't drift, can't be Goodhart-gamed by the policy in the
|
|
563
|
+
* same way, and don't require a separate calibration loop.
|
|
564
|
+
*
|
|
565
|
+
* The `MultiLayerVerifier` already produces this signal — it just doesn't
|
|
566
|
+
* surface it in a shape that's clean enough for RL training. This module
|
|
567
|
+
* wraps the verifier output so consumers can:
|
|
568
|
+
*
|
|
569
|
+
* 1. Extract a clean `VerifiableReward` from a `VerificationReport`
|
|
570
|
+
* 2. Distinguish *deterministic* rewards (compile, test, schema) from
|
|
571
|
+
* *probabilistic* rewards (judge) so they can be weighted differently
|
|
572
|
+
* in the RL training step
|
|
573
|
+
* 3. Filter `RunRecord[]` to only those with a verifiable reward,
|
|
574
|
+
* producing the clean training set that DeepSeek-R1-style GRPO and
|
|
575
|
+
* AlphaProof-style search both depend on
|
|
576
|
+
*
|
|
577
|
+
* Why this matters: every credible 2025-2026 frontier RL result on coding
|
|
578
|
+
* agents leans on verifiable reward (DeepSeek-R1 GRPO on test pass-rate,
|
|
579
|
+
* o-series RL on math/code, AlphaProof on Lean kernel checking). Mixing
|
|
580
|
+
* judge scores into the reward signal poisons the gradient. This module
|
|
581
|
+
* is the seam.
|
|
582
|
+
*/
|
|
583
|
+
|
|
584
|
+
type VerifiableRewardSource = 'compile' | 'test' | 'schema' | 'sandbox' | 'judge' | 'composite';
|
|
585
|
+
interface VerifiableReward {
|
|
586
|
+
/** Scalar in [0, 1]. The RL training signal. */
|
|
587
|
+
value: number;
|
|
588
|
+
/** What produced the reward — different sources have different determinism. */
|
|
589
|
+
source: VerifiableRewardSource;
|
|
590
|
+
/**
|
|
591
|
+
* Determinism class. `'deterministic'` rewards are repeatable byte-for-byte
|
|
592
|
+
* given the same inputs (compile, test, schema validation, sandbox exit code).
|
|
593
|
+
* `'probabilistic'` rewards depend on a stochastic component (LLM judge).
|
|
594
|
+
* Mixing these in the same training batch without separation is a known
|
|
595
|
+
* footgun in production RLHF pipelines.
|
|
596
|
+
*/
|
|
597
|
+
determinism: 'deterministic' | 'probabilistic';
|
|
598
|
+
/**
|
|
599
|
+
* Confidence in the reward value. For deterministic sources this is 1.0
|
|
600
|
+
* (the bit either flipped or didn't). For judge sources this is the
|
|
601
|
+
* judge-reported confidence or — when missing — a calibrated prior.
|
|
602
|
+
*/
|
|
603
|
+
confidence: number;
|
|
604
|
+
/** The layer / judge id that produced the signal, for provenance. */
|
|
605
|
+
origin: string;
|
|
606
|
+
/**
|
|
607
|
+
* Per-source contribution to `value`, keyed by layer/judge id. Single-source
|
|
608
|
+
* rewards carry one entry (`{ [origin]: value }`); composite rewards carry
|
|
609
|
+
* every contributing layer's score — the anti-scalar-collapse surface RL
|
|
610
|
+
* consumers weight per-source instead of trusting one blended number.
|
|
611
|
+
*/
|
|
612
|
+
components: Record<string, number>;
|
|
613
|
+
/**
|
|
614
|
+
* @deprecated Read `components` for per-source reward values. Kept for
|
|
615
|
+
* published-API compatibility: single-source rewards carry the layer's
|
|
616
|
+
* diagnostics here (e.g. `{ tests_passed: 7 }`); composite rewards carry
|
|
617
|
+
* the same per-layer scores `components` now holds.
|
|
618
|
+
*/
|
|
619
|
+
breakdown?: Record<string, number>;
|
|
620
|
+
}
|
|
621
|
+
interface VerifiableRewardExtractionOptions {
|
|
622
|
+
/**
|
|
623
|
+
* Which layers count as deterministic-reward sources. The verifier doesn't
|
|
624
|
+
* tag layers as "this is verifiable"; the caller declares it via this list
|
|
625
|
+
* (or via the layer name → source mapping). Default treats common names
|
|
626
|
+
* (`install`, `typecheck`, `build`, `lint`, `test`, `compile`, `schema`,
|
|
627
|
+
* `sandbox`) as deterministic.
|
|
628
|
+
*/
|
|
629
|
+
deterministicLayers?: string[];
|
|
630
|
+
/**
|
|
631
|
+
* Map layer name → reward source. Defaults to a sensible string-match.
|
|
632
|
+
*/
|
|
633
|
+
sourceFor?: (layerName: string) => VerifiableRewardSource;
|
|
634
|
+
/**
|
|
635
|
+
* Whether to fall back to a probabilistic (judge) reward when no
|
|
636
|
+
* deterministic layer produced a numeric score. Default `true`. Set to
|
|
637
|
+
* `false` for "deterministic-only" training pipelines that should
|
|
638
|
+
* discard runs without a verifiable signal.
|
|
639
|
+
*/
|
|
640
|
+
fallbackToJudge?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* Default confidence for probabilistic (judge) rewards when the judge
|
|
643
|
+
* doesn't report one. Default `0.7`.
|
|
644
|
+
*/
|
|
645
|
+
judgeConfidenceFloor?: number;
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Extract a `VerifiableReward` from a `VerificationReport`.
|
|
649
|
+
*
|
|
650
|
+
* Strategy: prefer the deterministic layers (in order: test → compile →
|
|
651
|
+
* schema → sandbox), fall back to the judge layer if `fallbackToJudge` is
|
|
652
|
+
* true, return `null` if no signal qualifies. When multiple deterministic
|
|
653
|
+
* layers contribute, return a `'composite'` source with a weighted blend.
|
|
654
|
+
*/
|
|
655
|
+
declare function extractVerifiableReward(report: VerificationReport, opts?: VerifiableRewardExtractionOptions): VerifiableReward | null;
|
|
656
|
+
/**
|
|
657
|
+
* Extract verifiable rewards from `RunRecord[]` produced via the
|
|
658
|
+
* `verificationReportToRunRecord` adapter (which encodes per-layer scores
|
|
659
|
+
* in `outcome.raw['layer.<name>']`). For records that don't carry layer
|
|
660
|
+
* scores, returns `null` for that record.
|
|
661
|
+
*
|
|
662
|
+
* This is the canonical bridge from "campaign-shaped artifacts" to
|
|
663
|
+
* "RL-training-ready reward signals": every record that has a clean
|
|
664
|
+
* verifiable reward becomes a training datum, every record that doesn't
|
|
665
|
+
* gets filtered out (or kept with `'probabilistic'` determinism for
|
|
666
|
+
* separate downstream handling).
|
|
667
|
+
*/
|
|
668
|
+
declare function extractVerifiableRewardsFromRecords(runs: RunRecord[], opts?: VerifiableRewardExtractionOptions): Array<{
|
|
669
|
+
runId: string;
|
|
670
|
+
reward: VerifiableReward | null;
|
|
671
|
+
}>;
|
|
672
|
+
/** Filter `RunRecord[]` to those with deterministic verifiable rewards. */
|
|
673
|
+
declare function filterDeterministicallyRewarded(runs: RunRecord[], opts?: VerifiableRewardExtractionOptions): Array<{
|
|
674
|
+
run: RunRecord;
|
|
675
|
+
reward: VerifiableReward;
|
|
676
|
+
}>;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* Reward hacking / Goodhart detection.
|
|
680
|
+
*
|
|
681
|
+
* Goodhart's Law says: when a measure becomes a target, it ceases to be
|
|
682
|
+
* a good measure. In RLHF and agentic-RL settings this is the dominant
|
|
683
|
+
* failure mode — the policy learns to produce outputs that score well on
|
|
684
|
+
* the proxy reward (judge, rubric, test pass-rate) without producing
|
|
685
|
+
* the underlying capability the proxy was meant to track.
|
|
686
|
+
*
|
|
687
|
+
* Krakovna et al. (2020, "Specification Gaming Examples in AI") and the
|
|
688
|
+
* subsequent RLHF reward-hacking literature (Skalse et al. 2022, Kim et al.
|
|
689
|
+
* 2023) converge on a few diagnostic signatures:
|
|
690
|
+
*
|
|
691
|
+
* 1. **Reward divergence:** the proxy reward grows while the held-out
|
|
692
|
+
* ground-truth signal stagnates or drops. Predictive validity over
|
|
693
|
+
* time captures this.
|
|
694
|
+
* 2. **Distributional shift in outputs:** after RL, the policy produces
|
|
695
|
+
* outputs that no longer match the reference distribution — usually
|
|
696
|
+
* because it found a high-reward attractor that's degenerate (e.g.
|
|
697
|
+
* one-token responses, repetition, formatting tricks).
|
|
698
|
+
* 3. **Disagreement between independent rewards:** if you train on
|
|
699
|
+
* reward A and a held-out independent reward B drops sharply, you're
|
|
700
|
+
* probably hacking A.
|
|
701
|
+
* 4. **Calibration drift:** the verifiable / deterministic component of
|
|
702
|
+
* the reward is stable; the probabilistic / judge component drifts up
|
|
703
|
+
* while the deterministic component doesn't. The judge is being
|
|
704
|
+
* gamed.
|
|
705
|
+
*
|
|
706
|
+
* This module ships explicit detectors for all four signatures, plus a
|
|
707
|
+
* combined verdict. The output is diagnostic — actionable signals,
|
|
708
|
+
* not autoreject — because each signature has known false positives
|
|
709
|
+
* (e.g., a policy that genuinely improves can show distributional shift).
|
|
710
|
+
*
|
|
711
|
+
* Differs from `rubricPredictiveValidity` (which is a *standing* check on
|
|
712
|
+
* whether rubrics correlate with deployment outcomes) — this is a
|
|
713
|
+
* *temporal* check on whether the reward-vs-truth gap is *widening over
|
|
714
|
+
* time during a training run*.
|
|
715
|
+
*/
|
|
716
|
+
|
|
717
|
+
type RewardHackingSignal = 'reward_divergence' | 'distribution_shift' | 'reward_disagreement' | 'judge_drift';
|
|
718
|
+
interface RewardHackingFinding {
|
|
719
|
+
signal: RewardHackingSignal;
|
|
720
|
+
/** Severity in [0, 1]. >0.5 = strong signal. */
|
|
721
|
+
severity: number;
|
|
722
|
+
message: string;
|
|
723
|
+
/** Numeric evidence the consumer can render. */
|
|
724
|
+
detail: Record<string, number>;
|
|
725
|
+
}
|
|
726
|
+
interface RewardHackingReport {
|
|
727
|
+
findings: RewardHackingFinding[];
|
|
728
|
+
/**
|
|
729
|
+
* Composite verdict. `'clean'` if every signal severity < 0.3;
|
|
730
|
+
* `'suspect'` if at least one ≥ 0.3 but none ≥ 0.6; `'gaming'` if any ≥ 0.6.
|
|
731
|
+
*/
|
|
732
|
+
verdict: 'clean' | 'suspect' | 'gaming';
|
|
733
|
+
/** Rationale for the verdict, ready to paste into an audit log. */
|
|
734
|
+
rationale: string[];
|
|
735
|
+
/** Number of paired (proxy, truth) data points the report saw. */
|
|
736
|
+
n: number;
|
|
737
|
+
}
|
|
738
|
+
interface DetectRewardHackingInput {
|
|
739
|
+
/**
|
|
740
|
+
* Run records ordered by recency (oldest first). The detector segments
|
|
741
|
+
* them into prefix/suffix windows to compute "did the gap widen."
|
|
742
|
+
*/
|
|
743
|
+
runs: RunRecord[];
|
|
744
|
+
/**
|
|
745
|
+
* The metric the policy was trained to optimize. Should be present on
|
|
746
|
+
* `outcome.raw` or `outcome.holdoutScore`. Default reads `outcome.holdoutScore`.
|
|
747
|
+
*/
|
|
748
|
+
proxyOf?: (run: RunRecord) => number | null;
|
|
749
|
+
/**
|
|
750
|
+
* The held-out ground-truth metric. For RL on coding, this is typically
|
|
751
|
+
* test pass-rate. For RLHF, it's downstream task performance or human
|
|
752
|
+
* preference. For knowledge tasks, it's an independently-graded score.
|
|
753
|
+
*/
|
|
754
|
+
truthOf?: (run: RunRecord) => number | null;
|
|
755
|
+
/**
|
|
756
|
+
* Independent secondary reward. Used for the `reward_disagreement`
|
|
757
|
+
* signal. Default uses the verifiable reward extractor (deterministic
|
|
758
|
+
* sources only).
|
|
759
|
+
*/
|
|
760
|
+
secondaryRewardOf?: (run: RunRecord) => number | null;
|
|
761
|
+
/**
|
|
762
|
+
* Window size — how many of the most recent runs count as the "after"
|
|
763
|
+
* cohort. Default min(50, half the runs).
|
|
764
|
+
*/
|
|
765
|
+
windowSize?: number;
|
|
766
|
+
/**
|
|
767
|
+
* Severity threshold to flag a signal. Default 0.3 (suspect) and 0.6
|
|
768
|
+
* (gaming).
|
|
769
|
+
*/
|
|
770
|
+
thresholds?: {
|
|
771
|
+
suspect?: number;
|
|
772
|
+
gaming?: number;
|
|
773
|
+
};
|
|
774
|
+
/**
|
|
775
|
+
* Verifiable-reward options used for the secondary-reward fallback.
|
|
776
|
+
*/
|
|
777
|
+
verifiableRewardOptions?: VerifiableRewardExtractionOptions;
|
|
778
|
+
}
|
|
779
|
+
declare function detectRewardHacking(input: DetectRewardHackingInput): RewardHackingReport;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* `runRLCampaign` — top-level orchestrator that runs the matrix and
|
|
783
|
+
* produces every RL-ready artifact in one call.
|
|
784
|
+
*
|
|
785
|
+
* Wires:
|
|
786
|
+
* 1. `runEvalCampaign` for the matrix run (capture, integrity, hooks)
|
|
787
|
+
* 2. `extractVerifiableReward` over each run, separating deterministic
|
|
788
|
+
* from probabilistic reward sources for the trainer
|
|
789
|
+
* 3. `extractPreferences` to produce DPO/PPO/KTO triples
|
|
790
|
+
* 4. `evaluateInterimReleaseConfidence` over paired deltas (anytime-valid)
|
|
791
|
+
* 5. `rubricPredictiveValidity` against an outcome store, when provided
|
|
792
|
+
* 6. `detectRewardHacking` as a standing hygiene check
|
|
793
|
+
* 7. Trainer-format export rows ready for prime-rl / TRL / verl
|
|
794
|
+
*
|
|
795
|
+
* The output `RLCampaignResult` is a single, audit-ready artifact: every
|
|
796
|
+
* stage's output is in there. The consumer's downstream fits in a single
|
|
797
|
+
* line: pass `result.preferences` to their DPO trainer, `result.grpoRows`
|
|
798
|
+
* to GRPO, `result.runs` plus `result.rewardSignals` to a custom RL loop.
|
|
799
|
+
*/
|
|
800
|
+
|
|
801
|
+
interface RunRLCampaignOptions<V> extends EvalCampaignOptions<V> {
|
|
802
|
+
/** Preference-extraction options. Default uses paired-by-scenario-and-seed with min-margin 0.05. */
|
|
803
|
+
preferences?: ExtractPreferencesOptions;
|
|
804
|
+
/** Verifiable-reward extraction options. */
|
|
805
|
+
verifiableReward?: VerifiableRewardExtractionOptions;
|
|
806
|
+
/** Outcome store + metric names — when supplied, runs `rubricPredictiveValidity` post-campaign. */
|
|
807
|
+
outcomeStore?: OutcomeStore;
|
|
808
|
+
outcomeMetrics?: string[];
|
|
809
|
+
/** Anytime-valid sequential evaluation options. */
|
|
810
|
+
sequential?: {
|
|
811
|
+
alpha?: number;
|
|
812
|
+
bound?: number;
|
|
813
|
+
rope?: {
|
|
814
|
+
low: number;
|
|
815
|
+
high: number;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
/** Trainer-format export lookups. When provided, the orchestrator builds the corresponding rows. */
|
|
819
|
+
trainerExport?: {
|
|
820
|
+
dpo?: DpoLookups;
|
|
821
|
+
grpo?: GrpoLookups;
|
|
822
|
+
sft?: SftLookups;
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
interface RLCampaignResult<V> {
|
|
826
|
+
campaign: EvalCampaignResult;
|
|
827
|
+
/** Per-run verifiable reward (deterministic when available, probabilistic fallback otherwise). */
|
|
828
|
+
rewardSignals: Array<{
|
|
829
|
+
runId: string;
|
|
830
|
+
reward: VerifiableReward | null;
|
|
831
|
+
}>;
|
|
832
|
+
/** Preference extraction report. */
|
|
833
|
+
preferences: PreferenceExtractionReport;
|
|
834
|
+
/** Anytime-valid interim verdict over the paired deltas (vs comparator). */
|
|
835
|
+
interimConfidence: InterimReleaseConfidence | null;
|
|
836
|
+
/** Standing reward-hacking hygiene check. */
|
|
837
|
+
rewardHacking: RewardHackingReport;
|
|
838
|
+
/** Predictive validity, when an outcome store was supplied. */
|
|
839
|
+
predictiveValidity: RubricPredictiveValidityReport | null;
|
|
840
|
+
/** Trainer-export rows, populated only for the formats the caller requested via `trainerExport`. */
|
|
841
|
+
trainerRows: {
|
|
842
|
+
dpo?: DpoExportRow[];
|
|
843
|
+
grpo?: GrpoExportRow[];
|
|
844
|
+
sft?: SftExportRow[];
|
|
845
|
+
};
|
|
846
|
+
/**
|
|
847
|
+
* One-line top-level summary the consumer can log.
|
|
848
|
+
*/
|
|
849
|
+
summary: string;
|
|
850
|
+
/**
|
|
851
|
+
* Convenience type-tag — consumers can branch on `result.kind`.
|
|
852
|
+
*/
|
|
853
|
+
kind: 'agent-eval-rl-campaign';
|
|
854
|
+
unusedVariant?: V;
|
|
855
|
+
}
|
|
856
|
+
declare function runRLCampaign<V>(opts: RunRLCampaignOptions<V>): Promise<RLCampaignResult<V>>;
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* Adapters: convert measurement outputs into the canonical `RunRecord[]`
|
|
860
|
+
* artifact that `replayCache`, `pairedEvalueSequence`, and
|
|
861
|
+
* `rubricPredictiveValidity` consume. Two sources:
|
|
862
|
+
* - `campaignToRunRecords` — the campaign substrate's per-cell results
|
|
863
|
+
* (the modern path: `runCampaign` / `runImprovementLoop` → records).
|
|
864
|
+
* - `verificationReportToRunRecord` — a `MultiLayerVerifier` report.
|
|
865
|
+
*
|
|
866
|
+
* Adapters are thin and explicit — every mandatory `RunRecord` field comes
|
|
867
|
+
* from a caller-supplied context (`commitSha`, `model`, `promptHash`,
|
|
868
|
+
* `configHash`) plus the cell's runtime data. The validator still rejects
|
|
869
|
+
* bare-alias model strings — the caller snapshot-pins.
|
|
870
|
+
*/
|
|
871
|
+
|
|
872
|
+
interface AdapterContext {
|
|
873
|
+
/** Logical experiment id — typically the campaign or sweep identifier. */
|
|
874
|
+
experimentId: string;
|
|
875
|
+
/** Snapshot model id (e.g. `claude-sonnet-4-6@2025-04-15`). */
|
|
876
|
+
model: string;
|
|
877
|
+
/** Git SHA the harness was run from. */
|
|
878
|
+
commitSha: string;
|
|
879
|
+
/** Hash of the effective prompt sent to the model. */
|
|
880
|
+
promptHash: string;
|
|
881
|
+
/** Hash of the effective config (model, temperature, tools, judges, splits). */
|
|
882
|
+
configHash: string;
|
|
883
|
+
/** Default split tag. Default `'search'`. */
|
|
884
|
+
splitTag?: RunSplitTag;
|
|
885
|
+
/** Default cost in USD when the source doesn't record one. Default `0`. */
|
|
886
|
+
defaultCostUsd?: number;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Convert a `CampaignResult` into canonical `RunRecord[]` — one record per
|
|
890
|
+
* scored cell. The cell's mean judge composite becomes the split score; every
|
|
891
|
+
* judge dimension is carried through to `outcome.raw`. A cell that errored
|
|
892
|
+
* becomes a record with `failureMode: 'cell_error'` (kept, not dropped — an
|
|
893
|
+
* unscored cell is signal). `candidateId` identifies the measured surface
|
|
894
|
+
* (defaults to the campaign manifest hash).
|
|
895
|
+
*/
|
|
896
|
+
declare function campaignToRunRecords(campaign: CampaignResult, ctx: AdapterContext & {
|
|
897
|
+
candidateId?: string;
|
|
898
|
+
}): RunRecord[];
|
|
899
|
+
/**
|
|
900
|
+
* Convert a `MultiLayerVerifier` `VerificationReport` into a `RunRecord`.
|
|
901
|
+
* `outcome.searchScore` (or `holdoutScore`) is `report.blendedScore`;
|
|
902
|
+
* `outcome.raw` carries every layer's score + a pass indicator; `failureMode`
|
|
903
|
+
* is the first failing layer's reason.
|
|
904
|
+
*/
|
|
905
|
+
declare function verificationReportToRunRecord(report: VerificationReport, ctx: AdapterContext & {
|
|
906
|
+
candidateId: string;
|
|
907
|
+
scenarioId?: string;
|
|
908
|
+
}, opts?: {
|
|
909
|
+
runId?: string;
|
|
910
|
+
}): RunRecord;
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Simulator fidelity — score a user SIMULATOR's realism against real-user
|
|
914
|
+
* trace distributions.
|
|
915
|
+
*
|
|
916
|
+
* Synthetic-persona evals (`PersonaConfig`-driven canonical evals, fuzz
|
|
917
|
+
* user-simulator objectives) stand in for real users in most of the numbers
|
|
918
|
+
* we publish. The standing threat is the Sim2Real gap: a simulator that is
|
|
919
|
+
* distributionally unlike production creates "easy mode" and silently
|
|
920
|
+
* inflates every score built on it. This module measures that gap from the
|
|
921
|
+
* SAME artifact both sides already produce — `RunRecord`s — so no new
|
|
922
|
+
* capture pipeline is needed:
|
|
923
|
+
*
|
|
924
|
+
* - `simFidelityReport` — per-feature Jensen-Shannon divergence between
|
|
925
|
+
* simulated and production record distributions, collapsed into a
|
|
926
|
+
* fidelity coefficient in [0,1].
|
|
927
|
+
* - `easyModeCheck` — the headline academic failure mode (sim inflates
|
|
928
|
+
* pass-rate over production) as its own named artifact.
|
|
929
|
+
*
|
|
930
|
+
* Every synthetic-persona eval result should publish its fidelity
|
|
931
|
+
* coefficient alongside the score — a number from an unrepresentative
|
|
932
|
+
* simulator is an unlabeled estimate. Wire-in points:
|
|
933
|
+
*
|
|
934
|
+
* - canonical persona evals: pass the campaign's `RunRecord`s as
|
|
935
|
+
* `simulated` and intake-adapter output (`contract/intake`: OTel spans,
|
|
936
|
+
* feedback tables, coding-agent sessions) as `production`
|
|
937
|
+
* - the fuzz user-sim objective: use `1 - report.fidelity` as a realism
|
|
938
|
+
* penalty when searching over generated personas
|
|
939
|
+
* - the durable corpus (`./corpus`): both sides read straight from
|
|
940
|
+
* `readCorpus` — tag sim vs production by `experimentId`
|
|
941
|
+
*/
|
|
942
|
+
|
|
943
|
+
/** Extracts a flat behavioral feature map from one record. `string` values
|
|
944
|
+
* are categorical, `number` values are quantile-bucketed over the union of
|
|
945
|
+
* both sides, `null` means the feature is absent on this record and is
|
|
946
|
+
* counted explicitly as its own category (never silently dropped). */
|
|
947
|
+
type BehaviorFeatures = (record: RunRecord) => Record<string, string | number | null>;
|
|
948
|
+
/** Reserved histogram category for `null` feature values. A capture-rate
|
|
949
|
+
* difference (one side instruments a signal, the other does not) registers
|
|
950
|
+
* as divergence by design: a simulator that produces no tool traces is not
|
|
951
|
+
* representative of production that does. */
|
|
952
|
+
declare const ABSENT_CATEGORY = "(absent)";
|
|
953
|
+
/** Minimum non-null observations PER SIDE for a feature to enter the
|
|
954
|
+
* fidelity mean. Below this the JSD estimate is sampling noise. */
|
|
955
|
+
declare const DEFAULT_MIN_N_PER_FEATURE = 20;
|
|
956
|
+
/** Quantile buckets used to discretize numeric features. Quartiles balance
|
|
957
|
+
* resolution against per-bucket sample size at the default minN. */
|
|
958
|
+
declare const DEFAULT_QUANTILE_BUCKETS = 4;
|
|
959
|
+
/** Fidelity at or above this → 'representative'; below → 'skewed'.
|
|
960
|
+
* 1 − 0.8 = mean JSD 0.2 ≈ distributions that mostly overlap with one
|
|
961
|
+
* clearly shifted mode — the point where per-feature shifts start changing
|
|
962
|
+
* which failure classes an eval can even observe. */
|
|
963
|
+
declare const REPRESENTATIVE_MIN_FIDELITY = 0.8;
|
|
964
|
+
/**
|
|
965
|
+
* Default feature set — ONLY fields verified present on both simulated and
|
|
966
|
+
* production records:
|
|
967
|
+
*
|
|
968
|
+
* - `score`, `wall_ms`, `output_tokens` — mandatory per the `RunRecord`
|
|
969
|
+
* validator (non-finite values read as absent rather than poisoning a
|
|
970
|
+
* bucket).
|
|
971
|
+
* - `failure_class` — optional taxonomy field; absent counted explicitly.
|
|
972
|
+
* - `turn_count`, `tool_errors`, `tool_error_recovery` — derived from the
|
|
973
|
+
* `outcome.raw` counters the intake adapters and eval harnesses write
|
|
974
|
+
* (`turns_completed`, `assistant_messages`, `tool_errors`,
|
|
975
|
+
* `turns_aborted`); absent on records whose producer did not capture
|
|
976
|
+
* them, counted explicitly.
|
|
977
|
+
* - `completion_length` — from the optional `CorpusRecord` trajectory
|
|
978
|
+
* text; the message-length proxy when records come from the corpus.
|
|
979
|
+
*
|
|
980
|
+
* `RunRecord` carries event COUNTS, not event ordering, so
|
|
981
|
+
* `tool_error_recovery` is a counts-only derivation: errors occurred and the
|
|
982
|
+
* run still completed cleanly ('recovered') vs aborted or classified as a
|
|
983
|
+
* failure ('unrecovered') — not a literal error→retry sequence check.
|
|
984
|
+
*/
|
|
985
|
+
declare const defaultBehaviorFeatures: BehaviorFeatures;
|
|
986
|
+
/**
|
|
987
|
+
* Jensen-Shannon divergence between two categorical histograms (raw counts;
|
|
988
|
+
* normalized internally). Log base 2 → bounded [0,1]: 0 = identical
|
|
989
|
+
* distributions, 1 = disjoint support. Symmetric, defined even where the
|
|
990
|
+
* supports differ — exactly the regime sim-vs-production comparison lives in.
|
|
991
|
+
* Throws on zero-mass or negative/non-finite counts: an empty histogram has
|
|
992
|
+
* no distribution and a silent 0 would read as "perfectly representative".
|
|
993
|
+
*/
|
|
994
|
+
declare function jsDivergence(p: Record<string, number>, q: Record<string, number>): number;
|
|
995
|
+
/**
|
|
996
|
+
* Deterministic quantile edges over a value set (the UNION of both sides, so
|
|
997
|
+
* sim and production land in the same buckets). Linear interpolation between
|
|
998
|
+
* order statistics; duplicate edges from heavy ties collapse into fewer,
|
|
999
|
+
* wider buckets. Returns `bucketCount - 1` edges before deduplication.
|
|
1000
|
+
*/
|
|
1001
|
+
declare function quantileEdges(values: number[], bucketCount?: number): number[];
|
|
1002
|
+
/** Stable half-open bucket label for a value against quantile edges:
|
|
1003
|
+
* `[-inf,e0)`, `[e0,e1)`, …, `[eLast,+inf)`. */
|
|
1004
|
+
declare function bucketLabel(value: number, edges: number[]): string;
|
|
1005
|
+
interface FeatureShift {
|
|
1006
|
+
/** Category label (a string value, a numeric bucket, or `ABSENT_CATEGORY`). */
|
|
1007
|
+
value: string;
|
|
1008
|
+
/** Probability of this category among ALL simulated records (nulls included
|
|
1009
|
+
* via `ABSENT_CATEGORY`, so each side's shifts sum to 1). */
|
|
1010
|
+
pSim: number;
|
|
1011
|
+
/** Probability among ALL production records. */
|
|
1012
|
+
pProd: number;
|
|
1013
|
+
}
|
|
1014
|
+
interface FeatureDivergence {
|
|
1015
|
+
feature: string;
|
|
1016
|
+
/** Jensen-Shannon divergence in [0,1] for this feature. */
|
|
1017
|
+
divergence: number;
|
|
1018
|
+
/** Largest |pSim − pProd| categories, descending — where the sim deviates. */
|
|
1019
|
+
topShifts: FeatureShift[];
|
|
1020
|
+
/** Non-null observations on the simulated side. */
|
|
1021
|
+
nSim: number;
|
|
1022
|
+
/** Non-null observations on the production side. */
|
|
1023
|
+
nProd: number;
|
|
1024
|
+
}
|
|
1025
|
+
type FidelityVerdict = 'representative' | 'skewed' | 'insufficient-data';
|
|
1026
|
+
interface FidelityReport {
|
|
1027
|
+
perDimension: FeatureDivergence[];
|
|
1028
|
+
/** 1 − mean divergence over features with sufficient data. NaN when the
|
|
1029
|
+
* verdict is 'insufficient-data' — a 0 would read as "maximally skewed"
|
|
1030
|
+
* and silently poison downstream aggregation; check `verdict` first. */
|
|
1031
|
+
fidelity: number;
|
|
1032
|
+
/** Features excluded because either side had fewer than `minNPerFeature`
|
|
1033
|
+
* non-null observations. Named, never silently dropped. */
|
|
1034
|
+
insufficientData: string[];
|
|
1035
|
+
/** 'representative' when fidelity >= REPRESENTATIVE_MIN_FIDELITY (0.8),
|
|
1036
|
+
* 'skewed' below, 'insufficient-data' when no feature met minN. */
|
|
1037
|
+
verdict: FidelityVerdict;
|
|
1038
|
+
}
|
|
1039
|
+
interface SimFidelityOptions {
|
|
1040
|
+
/** Feature extractor. Defaults to `defaultBehaviorFeatures`. */
|
|
1041
|
+
features?: BehaviorFeatures;
|
|
1042
|
+
/** Minimum non-null observations per side per feature. Default 20. */
|
|
1043
|
+
minNPerFeature?: number;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Compare a simulator's RunRecords against production RunRecords, feature by
|
|
1047
|
+
* feature. Numeric features are bucketed by deterministic quantiles of the
|
|
1048
|
+
* union; nulls count as an explicit `ABSENT_CATEGORY`. Throws on empty
|
|
1049
|
+
* inputs — "no records" is a wiring error, not a distribution.
|
|
1050
|
+
*/
|
|
1051
|
+
declare function simFidelityReport(simulated: RunRecord[], production: RunRecord[], opts?: SimFidelityOptions): FidelityReport;
|
|
1052
|
+
interface EasyModeOptions {
|
|
1053
|
+
/** A run passes when its score (holdout, else search) >= this. Default 0.5
|
|
1054
|
+
* — matches the pass-threshold convention across the rl/ primitives. */
|
|
1055
|
+
passThreshold?: number;
|
|
1056
|
+
/** Pass-rate gap above which the sim is flagged inflated. Default 0.1 —
|
|
1057
|
+
* a 10-point inflation is enough to flip most promotion gates. */
|
|
1058
|
+
inflationTolerance?: number;
|
|
1059
|
+
}
|
|
1060
|
+
interface EasyModeReport {
|
|
1061
|
+
simPassRate: number;
|
|
1062
|
+
prodPassRate: number;
|
|
1063
|
+
/** simPassRate − prodPassRate. Positive = the simulator is easier than reality. */
|
|
1064
|
+
gap: number;
|
|
1065
|
+
/** True when gap > inflationTolerance: numbers measured against this
|
|
1066
|
+
* simulator overstate production performance. */
|
|
1067
|
+
inflated: boolean;
|
|
1068
|
+
}
|
|
1069
|
+
/**
|
|
1070
|
+
* The headline simulator failure mode as its own named artifact: a simulator
|
|
1071
|
+
* that creates "easy mode" inflates pass-rate relative to production, and
|
|
1072
|
+
* every score measured against it overstates reality. Throws on empty inputs
|
|
1073
|
+
* and on records carrying neither score — a silently-skipped record would
|
|
1074
|
+
* bias the very rate this check exists to keep honest.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function easyModeCheck(simulated: RunRecord[], production: RunRecord[], opts?: EasyModeOptions): EasyModeReport;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* Bradley-Terry / Elo tournament evaluation.
|
|
1080
|
+
*
|
|
1081
|
+
* For multi-candidate sweeps, comparing every candidate's score against
|
|
1082
|
+
* a fixed comparator wastes information — the comparator becomes a high-
|
|
1083
|
+
* variance reference and rank flips between near-tied middle-rank
|
|
1084
|
+
* candidates are dominated by noise. Pairwise tournaments fix this:
|
|
1085
|
+
* every (i, j) pair contributes a comparison to a Bradley-Terry MLE that
|
|
1086
|
+
* estimates each candidate's strength on a unified scale.
|
|
1087
|
+
*
|
|
1088
|
+
* For online updating (rolling campaigns where new candidates arrive
|
|
1089
|
+
* over time), we also ship classical Elo with configurable K-factor.
|
|
1090
|
+
*
|
|
1091
|
+
* References:
|
|
1092
|
+
* - Bradley, R. A., Terry, M. E. (1952). Rank analysis of incomplete
|
|
1093
|
+
* block designs. Biometrika, 39(3/4), 324–345.
|
|
1094
|
+
* - Hunter, D. R. (2004). MM algorithms for generalized Bradley-Terry
|
|
1095
|
+
* models. Annals of Statistics, 32(1), 384–406. (The MLE algorithm
|
|
1096
|
+
* used here.)
|
|
1097
|
+
* - Elo, A. E. (1978). The Rating of Chess Players, Past and Present.
|
|
1098
|
+
*
|
|
1099
|
+
* This is a useful primitive because most LLM-eval communities (Chatbot
|
|
1100
|
+
* Arena, AlpacaEval, ELO-style ablation) have converged on pairwise
|
|
1101
|
+
* tournament eval as the most sample-efficient and most rank-stable
|
|
1102
|
+
* method when you have many candidates.
|
|
1103
|
+
*/
|
|
1104
|
+
interface PairwiseOutcome {
|
|
1105
|
+
/** Winner candidate id. */
|
|
1106
|
+
winner: string;
|
|
1107
|
+
/** Loser candidate id. */
|
|
1108
|
+
loser: string;
|
|
1109
|
+
/**
|
|
1110
|
+
* Optional draw flag. When true, both candidates get half-credit
|
|
1111
|
+
* (Bradley-Terry handles draws as half-wins for each side).
|
|
1112
|
+
*/
|
|
1113
|
+
draw?: boolean;
|
|
1114
|
+
/**
|
|
1115
|
+
* Optional weight — useful if some pairwise comparisons are stronger
|
|
1116
|
+
* signals than others (e.g. a paired test with a wider score gap is
|
|
1117
|
+
* a more confident comparison). Default 1.
|
|
1118
|
+
*/
|
|
1119
|
+
weight?: number;
|
|
1120
|
+
}
|
|
1121
|
+
interface BradleyTerryRating {
|
|
1122
|
+
candidateId: string;
|
|
1123
|
+
/** Latent strength θ ≥ 0 from the BT MLE. */
|
|
1124
|
+
strength: number;
|
|
1125
|
+
/** Log-strength = log(θ) — interpretable on a linear scale. */
|
|
1126
|
+
logStrength: number;
|
|
1127
|
+
/** Number of pairwise comparisons this candidate appears in. */
|
|
1128
|
+
n: number;
|
|
1129
|
+
/** Win count (+ 0.5 per draw). */
|
|
1130
|
+
wins: number;
|
|
1131
|
+
}
|
|
1132
|
+
interface BradleyTerryFit {
|
|
1133
|
+
ratings: BradleyTerryRating[];
|
|
1134
|
+
/** Iterations of the MM algorithm before convergence. */
|
|
1135
|
+
iterations: number;
|
|
1136
|
+
/** Final maximum |θ_new - θ_old| / θ_old. */
|
|
1137
|
+
finalDelta: number;
|
|
1138
|
+
converged: boolean;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Bradley-Terry MLE via Hunter's MM algorithm.
|
|
1142
|
+
*
|
|
1143
|
+
* Iteration: θ_i^new = W_i / Σ_{j ≠ i} N_ij / (θ_i + θ_j)
|
|
1144
|
+
* where W_i = wins by i (+ 0.5 per draw), N_ij = total comparisons.
|
|
1145
|
+
*
|
|
1146
|
+
* Returns log-strengths normalized so the smallest is 0 (any constant
|
|
1147
|
+
* offset is unobservable in BT — only differences are identified).
|
|
1148
|
+
*/
|
|
1149
|
+
declare function fitBradleyTerry(outcomes: PairwiseOutcome[], opts?: {
|
|
1150
|
+
tolerance?: number;
|
|
1151
|
+
maxIterations?: number;
|
|
1152
|
+
smoothing?: number;
|
|
1153
|
+
}): BradleyTerryFit;
|
|
1154
|
+
/**
|
|
1155
|
+
* Online Elo updates. Use when comparisons arrive over time and you want
|
|
1156
|
+
* a running rating without re-fitting the full BT MLE on every update.
|
|
1157
|
+
*
|
|
1158
|
+
* Initialize ratings to `defaultRating` (1500 by default). Each call to
|
|
1159
|
+
* `applyEloUpdate` mutates the map in place and returns the deltas so
|
|
1160
|
+
* the caller can log per-comparison rating changes.
|
|
1161
|
+
*/
|
|
1162
|
+
interface EloOptions {
|
|
1163
|
+
/** Default rating for unseen candidates. Default 1500. */
|
|
1164
|
+
defaultRating?: number;
|
|
1165
|
+
/** K-factor controls the step size. Default 32 (FIDE-ish). */
|
|
1166
|
+
kFactor?: number;
|
|
1167
|
+
}
|
|
1168
|
+
declare function applyEloUpdate(ratings: Map<string, number>, outcome: PairwiseOutcome, opts?: EloOptions): {
|
|
1169
|
+
winnerDelta: number;
|
|
1170
|
+
loserDelta: number;
|
|
1171
|
+
};
|
|
1172
|
+
/**
|
|
1173
|
+
* Build pairwise outcomes from the campaign artifact: for every scenario
|
|
1174
|
+
* shared by two candidates, the higher-scoring run wins. Useful when you
|
|
1175
|
+
* want a tournament view of an existing campaign without an additional
|
|
1176
|
+
* pairwise judge call.
|
|
1177
|
+
*/
|
|
1178
|
+
interface BuildPairwiseFromCampaignInput {
|
|
1179
|
+
runs: Array<{
|
|
1180
|
+
candidateId: string;
|
|
1181
|
+
/** Stable identifier for the matching unit (typically scenarioId). */
|
|
1182
|
+
matchKey: string;
|
|
1183
|
+
score: number;
|
|
1184
|
+
}>;
|
|
1185
|
+
/**
|
|
1186
|
+
* Tied-score margin. Below this, the comparison is a draw. Default 0
|
|
1187
|
+
* (no ties).
|
|
1188
|
+
*/
|
|
1189
|
+
drawMargin?: number;
|
|
1190
|
+
}
|
|
1191
|
+
declare function buildPairwiseFromCampaign(input: BuildPairwiseFromCampaignInput): PairwiseOutcome[];
|
|
1192
|
+
|
|
1193
|
+
export { ABSENT_CATEGORY, type AdaptationCurve, type AdaptationPoint, type AdaptationRunner, type AdapterContext, type BehaviorFeatures, type BradleyTerryFit, type BradleyTerryRating, type BuildPairwiseFromCampaignInput, type CellObservation, type CompareCurvesResult, type ComputeBestOfNOptions, type ComputeBestOfNResult, type ComputeCurve, type ComputeCurveBudget, type ComputeCurvePoint, type ContaminationProbeInput, type ContaminationProbeOptions, type ContaminationProbeReport, type CurriculumAllocation, DEFAULT_MIN_N_PER_FEATURE, DEFAULT_QUANTILE_BUCKETS, type DetectRewardHackingInput, DpoExportRow, DpoLookups, type EasyModeOptions, type EasyModeReport, type EloOptions, ExtractPreferencesOptions, type FeatureDivergence, type FeatureShift, type FidelityReport, type FidelityVerdict, GrpoExportRow, GrpoLookups, OutcomeStore, type PairwiseOutcome, type ParetoPointInput, PredictiveValidityResearcher, type PredictiveValidityResearcherOptions, PreferenceExtractionReport, REPRESENTATIVE_MIN_FIDELITY, type RLCampaignResult, type RewardHackingFinding, type RewardHackingReport, type RewardHackingSignal, type RunAdaptationCurveOptions, type RunComputeCurveOptions, type RunRLCampaignOptions, type ScenarioPerturbation, type ScenarioPerturbationKind, type SelfConsistencyOptions, type SelfConsistencyResult, SftExportRow, SftLookups, type SimFidelityOptions, type ThompsonCurriculumOptions, type VarianceCurriculumOptions, type VerifiableReward, type VerifiableRewardExtractionOptions, type VerifiableRewardSource, applyEloUpdate, bestOfN, bucketLabel, buildPairwiseFromCampaign, campaignToRunRecords, compareAdaptationCurves, defaultBehaviorFeatures, detectRewardHacking, easyModeCheck, extractVerifiableReward, extractVerifiableRewardsFromRecords, filterDeterministicallyRewarded, firstPassK, fitBradleyTerry, injectIrrelevantClause, jsDivergence, observationsFromRunRecords, paretoFrontier, quantileEdges, renameVariables, runAdaptationCurve, runComputeCurve, runContaminationProbe, runRLCampaign, selfConsistency, shuffleOrder, simFidelityReport, thompsonCurriculum, varianceBasedCurriculum, verificationReportToRunRecord };
|