@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
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
import { S as Scenario, C as CampaignResult, l as GateResult, D as DispatchFn, a as JudgeConfig, L as LabeledScenarioStore, i as CampaignTraceWriter, n as GenerationRecord, M as MutableSurface, P as ParetoParent, c as SurfaceProposer, G as Gate } from './types-DQRY8ZT-.js';
|
|
2
|
+
import { L as LlmClientOptions } from './llm-client-Bj7g0rqu.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `openAutoPr` — thin shell-out helper for the `runImprovementLoop` preset's
|
|
6
|
+
* `autoOnPromote: 'pr'` mode. Substitutes for the per-product PR-opening
|
|
7
|
+
* code consumers duplicated 4 times. The PR body includes the campaign's
|
|
8
|
+
* manifest hash, gate verdict, and scorecard summary so reviewers can see
|
|
9
|
+
* exactly what was promoted + why.
|
|
10
|
+
*
|
|
11
|
+
* NOT a deploy mechanism — this only OPENS a PR. The human reviews + merges.
|
|
12
|
+
* The Shape B (`autoOnPromote: 'config'`) live-runtime-mutation path is
|
|
13
|
+
* deferred to Pass B with the full shadow / canary / rollback stack.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
interface OpenAutoPrOptions<TArtifact, TScenario extends Scenario> {
|
|
17
|
+
/** Campaign result to attach to the PR. */
|
|
18
|
+
result: CampaignResult<TArtifact, TScenario>;
|
|
19
|
+
/** Gate verdict explaining the promotion. Substrate refuses to open a PR
|
|
20
|
+
* when `gate.decision !== 'ship'` — fails loud. */
|
|
21
|
+
gate: GateResult;
|
|
22
|
+
/** Promoted surface diff — typically the new system prompt addendum or
|
|
23
|
+
* full profile diff. Substrate writes it as the PR body. */
|
|
24
|
+
promotedDiff: string;
|
|
25
|
+
/** GH owner/repo target (e.g., `tangle-network/gtm-agent`). */
|
|
26
|
+
ghOwner: string;
|
|
27
|
+
ghRepo: string;
|
|
28
|
+
/** Branch name for the PR. Default `auto/<manifestHash[:12]>`. */
|
|
29
|
+
branch?: string;
|
|
30
|
+
/** PR title. Default includes manifest hash. */
|
|
31
|
+
title?: string;
|
|
32
|
+
/** Whether to actually open the PR or just dry-run. Default reads
|
|
33
|
+
* `GH_AUTO_PR_TOKEN` env — present = open, absent = dry-run. */
|
|
34
|
+
dryRun?: boolean;
|
|
35
|
+
/** Test seam — substitute `gh pr create` invocation. */
|
|
36
|
+
ghExec?: (args: string[]) => {
|
|
37
|
+
stdout: string;
|
|
38
|
+
stderr: string;
|
|
39
|
+
status: number;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
interface OpenAutoPrResult {
|
|
43
|
+
opened: boolean;
|
|
44
|
+
prUrl?: string;
|
|
45
|
+
dryRun: boolean;
|
|
46
|
+
reason: string;
|
|
47
|
+
}
|
|
48
|
+
declare function openAutoPr<TArtifact, TScenario extends Scenario>(options: OpenAutoPrOptions<TArtifact, TScenario>): OpenAutoPrResult;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* `CampaignStorage` — the filesystem seam `runCampaign` writes through
|
|
52
|
+
* (run/cell dirs, the resumability cache, per-cell artifacts, trace spans).
|
|
53
|
+
*
|
|
54
|
+
* The default (`fsCampaignStorage`) is the Node filesystem — identical
|
|
55
|
+
* behavior to the inline `node:fs` calls it replaces, so existing CLI
|
|
56
|
+
* consumers are unaffected. `inMemoryCampaignStorage` keeps everything in a
|
|
57
|
+
* `Map`, so the substrate runs in environments WITHOUT a filesystem
|
|
58
|
+
* (Cloudflare Workers, Deno Deploy, other edge runtimes) — the campaign
|
|
59
|
+
* still produces its `CampaignResult` (cells + aggregates) in memory;
|
|
60
|
+
* artifacts/traces simply aren't persisted to disk.
|
|
61
|
+
*
|
|
62
|
+
* Paths are opaque keys to the in-memory adapter — it does not parse them,
|
|
63
|
+
* so the same `join(...)`-built paths work unchanged across both adapters.
|
|
64
|
+
*/
|
|
65
|
+
interface CampaignStorage {
|
|
66
|
+
/** Ensure a directory exists (recursive). No-op for in-memory. */
|
|
67
|
+
ensureDir(dir: string): void;
|
|
68
|
+
/** Does this path exist (as a written file or an ensured dir)? */
|
|
69
|
+
exists(path: string): boolean;
|
|
70
|
+
/** Read a UTF-8 file; `undefined` when missing or unreadable. */
|
|
71
|
+
read(path: string): string | undefined;
|
|
72
|
+
/** Write a file (string or bytes). Parent dir is assumed ensured. */
|
|
73
|
+
write(path: string, content: string | Uint8Array): void;
|
|
74
|
+
}
|
|
75
|
+
/** Node-filesystem storage — the default. Lazily requires `node:fs` so the
|
|
76
|
+
* module imports cleanly in non-Node runtimes (where the caller passes
|
|
77
|
+
* `inMemoryCampaignStorage` instead and never constructs this).
|
|
78
|
+
*
|
|
79
|
+
* `createRequire(import.meta.url)` is the ESM-native lazy require — a bare
|
|
80
|
+
* `require` is a ReferenceError under `"type": "module"`, which is exactly
|
|
81
|
+
* the shape this package publishes. */
|
|
82
|
+
declare function fsCampaignStorage(): CampaignStorage;
|
|
83
|
+
/** In-memory storage for filesystem-less runtimes. Artifacts + trace spans
|
|
84
|
+
* live in a `Map` for the duration of the run; the `CampaignResult` is
|
|
85
|
+
* fully populated, but nothing is persisted to disk. */
|
|
86
|
+
declare function inMemoryCampaignStorage(): CampaignStorage;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* `runCampaign` — Pass A substrate primitive. ONE function that orchestrates
|
|
90
|
+
* scenarios → dispatch → artifacts → judges → aggregates, with full
|
|
91
|
+
* reproducibility (seed + manifest hash), cell-level resumability, bootstrap
|
|
92
|
+
* CIs, and the `LabeledScenarioStore` capture flywheel.
|
|
93
|
+
*
|
|
94
|
+
* Improvement loops (optimizer / gate / autoOnPromote) ride on top of this
|
|
95
|
+
* primitive but live in `presets/run-improvement-loop.ts`. This file keeps
|
|
96
|
+
* the core orchestrator minimal — Phase 1 of the Pass A track.
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
interface RunCampaignOptions<TScenario extends Scenario, TArtifact> {
|
|
100
|
+
scenarios: TScenario[];
|
|
101
|
+
dispatch: DispatchFn<TScenario, TArtifact>;
|
|
102
|
+
judges?: JudgeConfig<TArtifact, TScenario>[];
|
|
103
|
+
/** Required for reproducibility. Default 42. */
|
|
104
|
+
seed?: number;
|
|
105
|
+
/** Per-scenario replicates for CI bands. Default 1; raise to 5+ for
|
|
106
|
+
* bootstrap-tight intervals on critical eval. */
|
|
107
|
+
reps?: number;
|
|
108
|
+
/** When true (default), completed cells are cached by
|
|
109
|
+
* (manifestHash, scenarioId, rep, generation). Re-runs skip cached cells. */
|
|
110
|
+
resumable?: boolean;
|
|
111
|
+
/** Optional store — when present, every artifact + judge score is captured
|
|
112
|
+
* with the configured `captureSource`. Capture is default ON; pass `'off'`
|
|
113
|
+
* to disable. */
|
|
114
|
+
labeledStore?: LabeledScenarioStore | 'off';
|
|
115
|
+
captureSource?: 'production-trace' | 'eval-run' | 'manual' | 'red-team' | 'synthetic';
|
|
116
|
+
captureSourceVersionHash?: string;
|
|
117
|
+
/** Wall-clock cost cap across all cells. Cells beyond ceiling are skipped. */
|
|
118
|
+
costCeiling?: number;
|
|
119
|
+
/** Max concurrent cells. Default 2. */
|
|
120
|
+
maxConcurrency?: number;
|
|
121
|
+
/**
|
|
122
|
+
* Per-cell dispatch deadline in ms. A `dispatch` that neither resolves nor
|
|
123
|
+
* rejects within this window is a hang (a stalled model request, an
|
|
124
|
+
* exhausted runtime resource, a backend that never closes its stream). When
|
|
125
|
+
* set, the cell's `ctx.signal` is aborted and the cell is recorded as a LOUD
|
|
126
|
+
* error (`dispatch exceeded <N>ms`) so the campaign proceeds and the failure
|
|
127
|
+
* is visible — instead of one wedged cell silently hanging the whole run (and
|
|
128
|
+
* every loop/CI job above it) forever. `undefined`/`0` = unbounded (legacy).
|
|
129
|
+
*/
|
|
130
|
+
dispatchTimeoutMs?: number;
|
|
131
|
+
/** Required: where artifacts + traces land. */
|
|
132
|
+
runDir: string;
|
|
133
|
+
/** Tracing posture. Default is the substrate's `FileSystemTraceStore` rooted
|
|
134
|
+
* at `<runDir>/traces/`. `'off'` disables capture entirely — substrate
|
|
135
|
+
* refuses this when the caller wires `autoOnPromote !== 'none'`. */
|
|
136
|
+
tracing?: 'on' | 'off';
|
|
137
|
+
/**
|
|
138
|
+
* Per-cell usage expectation — the early, fine-grained sibling of the
|
|
139
|
+
* batch `assertRealBackend` guard. A cell that produced an artifact (no
|
|
140
|
+
* error) but reported `costUsd === 0` AND zero tokens is a stub: the
|
|
141
|
+
* dispatch never reported LLM activity via `ctx.cost`. Modes:
|
|
142
|
+
* - `'warn'` (default) — log the offending cell loudly, keep going.
|
|
143
|
+
* - `'assert'` — throw `BackendIntegrityError` on the first such cell
|
|
144
|
+
* (fail-fast; recommended for CI campaigns expecting real LLM calls).
|
|
145
|
+
* - `'off'` — no check (replay / deterministic-only / offline analysis).
|
|
146
|
+
*/
|
|
147
|
+
expectUsage?: 'assert' | 'warn' | 'off';
|
|
148
|
+
/** Test seam — override the wall clock for deterministic tests. */
|
|
149
|
+
now?: () => Date;
|
|
150
|
+
/** Test seam — override per-cell trace writer factory. */
|
|
151
|
+
buildTraceWriter?: (cellId: string, dir: string) => CampaignTraceWriter;
|
|
152
|
+
/** Storage backend for run/cell dirs, the resumability cache, artifacts,
|
|
153
|
+
* and trace spans. Default: the Node filesystem (`fsCampaignStorage`).
|
|
154
|
+
* Pass `inMemoryCampaignStorage()` to run in a filesystem-less runtime
|
|
155
|
+
* (Cloudflare Workers, Deno, edge) — the `CampaignResult` is still
|
|
156
|
+
* produced; artifacts/traces just aren't persisted to disk. */
|
|
157
|
+
storage?: CampaignStorage;
|
|
158
|
+
/**
|
|
159
|
+
* Optional per-cell placement strategy. Returns an opaque string the
|
|
160
|
+
* substrate forwards as `ctx.placement` to the Dispatch — placement-aware
|
|
161
|
+
* Dispatches (e.g. `httpDispatch` from `/adapters/http`) use it to route
|
|
162
|
+
* each cell to the right worker, region, or sandbox. When unset, every
|
|
163
|
+
* cell receives `ctx.placement = undefined` and behaves identically to
|
|
164
|
+
* the in-process case.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* cellPlacement: ({ scenario }) => scenario.tags?.includes('eu') ? 'eu-west' : 'us-east'
|
|
168
|
+
*/
|
|
169
|
+
cellPlacement?: (input: {
|
|
170
|
+
scenario: TScenario;
|
|
171
|
+
rep: number;
|
|
172
|
+
generation?: number;
|
|
173
|
+
}) => string | undefined;
|
|
174
|
+
}
|
|
175
|
+
declare function runCampaign<TScenario extends Scenario, TArtifact>(opts: RunCampaignOptions<TScenario, TArtifact>): Promise<CampaignResult<TArtifact, TScenario>>;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* `runOptimization` — the improvement loop body. Runs N generations: the
|
|
179
|
+
* `SurfaceProposer` proposes K candidate surfaces per generation, each
|
|
180
|
+
* candidate runs a campaign (the measurement), top-scoring promote to the
|
|
181
|
+
* next generation. Proposer-agnostic — the same loop runs an evolutionary
|
|
182
|
+
* population mutator (`evolutionaryProposer`) or any reflective / agentic
|
|
183
|
+
* proposer; they differ only in how `propose()` picks candidates.
|
|
184
|
+
*
|
|
185
|
+
* This is `runLoop`'s shape (plan → measure → decide) specialized to surface
|
|
186
|
+
* improvement: `proposer.propose` = plan, `runCampaign` = the measurement
|
|
187
|
+
* (which runs the worker behind `dispatch`), the mean-composite ranking = the
|
|
188
|
+
* validator, `proposer.decide` = the stop check.
|
|
189
|
+
*
|
|
190
|
+
* The gated-promotion shell (`runImprovementLoop`) wraps this with a holdout
|
|
191
|
+
* re-score + release gate + optional PR.
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
interface RunOptimizationBaseOptions<TScenario extends Scenario, TArtifact> extends Omit<RunCampaignOptions<TScenario, TArtifact>, 'dispatch'> {
|
|
195
|
+
/** Initial mutable surface (typically system prompt or addendum). */
|
|
196
|
+
baselineSurface: MutableSurface;
|
|
197
|
+
/** Dispatcher that takes the CURRENT surface + scenario → artifact. */
|
|
198
|
+
dispatchWithSurface: (surface: MutableSurface, scenario: TScenario, ctx: Parameters<RunCampaignOptions<TScenario, TArtifact>['dispatch']>[1]) => Promise<TArtifact>;
|
|
199
|
+
/** The candidate-generation strategy. Wrap a population `Mutator` via
|
|
200
|
+
* `evolutionaryProposer({ mutator })`, or pass any reflective / agentic
|
|
201
|
+
* proposer that implements `SurfaceProposer`. */
|
|
202
|
+
proposer: SurfaceProposer;
|
|
203
|
+
populationSize: number;
|
|
204
|
+
maxGenerations: number;
|
|
205
|
+
/** How many top-scoring candidates carry to the next generation. Default 2. */
|
|
206
|
+
promoteTopK?: number;
|
|
207
|
+
/** DEPTH knob forwarded to the proposer's `propose()` — max iterations the
|
|
208
|
+
* agentic generator may take per candidate. */
|
|
209
|
+
maxImprovementShots?: number;
|
|
210
|
+
/** Optional analysis report forwarded to `propose()`. Opaque here; the
|
|
211
|
+
* proposer types it. */
|
|
212
|
+
report?: unknown;
|
|
213
|
+
/** Structured findings forwarded to `propose()` as `ctx.findings`. A
|
|
214
|
+
* findings producer emits these from the
|
|
215
|
+
* generation's traces; findings-grounded proposers consume them. Opaque here;
|
|
216
|
+
* the proposer types its `TFindings`. Empty when no producer is wired. */
|
|
217
|
+
findings?: unknown[];
|
|
218
|
+
/** Per-generation findings producer. After each
|
|
219
|
+
* generation's candidates are scored, this is called with that generation's
|
|
220
|
+
* results; whatever it returns REPLACES `ctx.findings` for the NEXT
|
|
221
|
+
* generation's `propose()`, so the diagnosis is refreshed each round instead
|
|
222
|
+
* of being a static one-shot. Generic by design: the substrate does not
|
|
223
|
+
* import an analyst — the consumer plugs its trace-analyst registry / HALO
|
|
224
|
+
* here (reading the per-candidate `runDir` traces). When absent, findings
|
|
225
|
+
* stay the static `opts.findings`. */
|
|
226
|
+
analyzeGeneration?: (input: {
|
|
227
|
+
generation: number;
|
|
228
|
+
runDir: string;
|
|
229
|
+
candidates: Array<{
|
|
230
|
+
surfaceHash: string;
|
|
231
|
+
campaign: CampaignResult<TArtifact, TScenario>;
|
|
232
|
+
composite: number;
|
|
233
|
+
}>;
|
|
234
|
+
history: GenerationRecord[];
|
|
235
|
+
}) => Promise<unknown[]>;
|
|
236
|
+
}
|
|
237
|
+
type RunOptimizationOptions<TScenario extends Scenario, TArtifact> = RunOptimizationBaseOptions<TScenario, TArtifact>;
|
|
238
|
+
interface RunOptimizationResult<TArtifact, TScenario extends Scenario> {
|
|
239
|
+
generations: Array<{
|
|
240
|
+
record: GenerationRecord;
|
|
241
|
+
surfaces: Array<{
|
|
242
|
+
surfaceHash: string;
|
|
243
|
+
surface: MutableSurface;
|
|
244
|
+
campaign: CampaignResult<TArtifact, TScenario>;
|
|
245
|
+
}>;
|
|
246
|
+
}>;
|
|
247
|
+
winnerSurface: MutableSurface;
|
|
248
|
+
winnerSurfaceHash: string;
|
|
249
|
+
/** Proposer label for the promoted surface. Present when the winning
|
|
250
|
+
* candidate came from a `ProposedCandidate` (a reflective proposer);
|
|
251
|
+
* absent when the winner is the baseline or a bare-surface mutator. */
|
|
252
|
+
winnerLabel?: string;
|
|
253
|
+
/** Proposer rationale for the promoted surface — the "because Z" that
|
|
254
|
+
* motivated the winning change. Survives to `SelfImproveResult` and the
|
|
255
|
+
* emitted provenance record. Absent when the winner is the baseline. */
|
|
256
|
+
winnerRationale?: string;
|
|
257
|
+
baselineCampaign: CampaignResult<TArtifact, TScenario>;
|
|
258
|
+
/** The GEPA Pareto frontier across every scored surface (baseline + all
|
|
259
|
+
* generations) by per-scenario objective vector — the non-dominated set.
|
|
260
|
+
* Each generation's `propose()` received the frontier-so-far as
|
|
261
|
+
* `ctx.paretoParents`; this is the final frontier. A surface here that is
|
|
262
|
+
* NOT the winner is uniquely best on some scenario the winner loses on. */
|
|
263
|
+
paretoFrontier: ParetoParent[];
|
|
264
|
+
}
|
|
265
|
+
declare function runOptimization<TScenario extends Scenario, TArtifact>(opts: RunOptimizationOptions<TScenario, TArtifact>): Promise<RunOptimizationResult<TArtifact, TScenario>>;
|
|
266
|
+
declare function surfaceHash(surface: MutableSurface): string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* `runImprovementLoop` — the gated-promotion shell around the improvement
|
|
270
|
+
* loop body (`runOptimization`). Proposes candidate surfaces via the
|
|
271
|
+
* `SurfaceProposer`, re-scores the winner against the baseline on a
|
|
272
|
+
* holdout set, runs the release gate, and optionally opens a PR.
|
|
273
|
+
*
|
|
274
|
+
* Role vocabulary (see docs/design/loop-taxonomy.md):
|
|
275
|
+
* - PROPOSER = the `SurfaceProposer` (evolutionary GEPA mutator OR
|
|
276
|
+
* reflective analyst). Proposes candidate SURFACES — the
|
|
277
|
+
* worker's system prompt / tool config — NOT conversation
|
|
278
|
+
* turns.
|
|
279
|
+
* - MEASUREMENT= `runCampaign`. Scores one surface by running the worker
|
|
280
|
+
* (via `dispatch`) over scenarios and judging the output.
|
|
281
|
+
* - WORKER = the agent harness in the sandbox, invoked behind the
|
|
282
|
+
* topology-opaque `dispatch` seam — never referenced here.
|
|
283
|
+
*
|
|
284
|
+
* Distinct from `runLoop` in `@tangle-network/agent-runtime`, which is the
|
|
285
|
+
* INNER conversation loop (execution driver ↔ workers in a sandbox). `runImprovementLoop`
|
|
286
|
+
* is the OUTER loop: it improves the surface that those workers run.
|
|
287
|
+
*
|
|
288
|
+
* Hard-refuses unsafe configurations:
|
|
289
|
+
* - `tracing: 'off'` when a proposer is wired (improvement is unattributable)
|
|
290
|
+
* - `autoOnPromote: 'config'` — DEFERRED to Pass B; v0.40 only ships
|
|
291
|
+
* `'pr'` and `'none'`.
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
type RunImprovementLoopOptions<TScenario extends Scenario, TArtifact> = RunOptimizationOptions<TScenario, TArtifact> & {
|
|
295
|
+
/** Holdout scenarios kept OUT of the training optimization pool — used
|
|
296
|
+
* ONLY to score baseline vs winner for the gate. */
|
|
297
|
+
holdoutScenarios: TScenario[];
|
|
298
|
+
/** Promotion gate. Substrate strongly recommends `defaultProductionGate`
|
|
299
|
+
* for production wiring (composes red-team / reward-hacking / canary /
|
|
300
|
+
* heldout). */
|
|
301
|
+
gate: Gate<TArtifact, TScenario>;
|
|
302
|
+
/** What to do when the gate ships:
|
|
303
|
+
* - `'pr'`: open a PR via `openAutoPr`
|
|
304
|
+
* - `'none'`: just report — caller decides what to do with the winner
|
|
305
|
+
* v0.40 does NOT support `'config'` (live-runtime self-mutation) —
|
|
306
|
+
* deferred to Pass B behind safety stack. */
|
|
307
|
+
autoOnPromote: 'pr' | 'none';
|
|
308
|
+
/** GH owner / repo for the auto-PR. Required when autoOnPromote === 'pr'. */
|
|
309
|
+
ghOwner?: string;
|
|
310
|
+
ghRepo?: string;
|
|
311
|
+
/** Optional render override — substrate writes a diff-shaped surface; pass
|
|
312
|
+
* a function to format the promoted surface differently. */
|
|
313
|
+
renderPromotedDiff?: (winnerSurface: MutableSurface, baselineSurface: MutableSurface) => string;
|
|
314
|
+
};
|
|
315
|
+
interface RunImprovementLoopResult<TArtifact, TScenario extends Scenario> extends RunOptimizationResult<TArtifact, TScenario> {
|
|
316
|
+
baselineOnHoldout: CampaignResult<TArtifact, TScenario>;
|
|
317
|
+
winnerOnHoldout: CampaignResult<TArtifact, TScenario>;
|
|
318
|
+
gateResult: Awaited<ReturnType<Gate<TArtifact, TScenario>['decide']>>;
|
|
319
|
+
/** Unified baseline→winner surface diff. Computed UNCONDITIONALLY (not only
|
|
320
|
+
* when `autoOnPromote === 'pr'`) so the diff that the gate decided on is
|
|
321
|
+
* always present on the result + in the emitted provenance record. Empty
|
|
322
|
+
* string when winner == baseline (no change to diff). */
|
|
323
|
+
promotedDiff: string;
|
|
324
|
+
prResult?: ReturnType<typeof openAutoPr>;
|
|
325
|
+
}
|
|
326
|
+
declare function runImprovementLoop<TScenario extends Scenario, TArtifact>(opts: RunImprovementLoopOptions<TScenario, TArtifact>): Promise<RunImprovementLoopResult<TArtifact, TScenario>>;
|
|
327
|
+
declare function defaultRenderDiff(winnerSurface: MutableSurface, baselineSurface: MutableSurface): string;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* `gepaProposer` — a reflective `SurfaceProposer` for prompt-tier surfaces.
|
|
331
|
+
* Each generation it reflects on the prior best candidate's per-scenario
|
|
332
|
+
* scores + weakest dimensions, asks an LLM to propose targeted rewrites of
|
|
333
|
+
* the current surface, and returns them as the next population.
|
|
334
|
+
*
|
|
335
|
+
* Maps onto the GEPA paper (Agrawal et al., arXiv:2507.19457):
|
|
336
|
+
* - *Reflection*: each generation reflects on the best parent's weakest
|
|
337
|
+
* dimensions + per-scenario top/bottom scores to propose targeted rewrites.
|
|
338
|
+
* - *Pareto frontier*: `runOptimization` maintains the non-dominated set of
|
|
339
|
+
* surfaces across generations (per-scenario objective vectors) and supplies
|
|
340
|
+
* it as `ctx.paretoParents`. A surface uniquely best on one hard scenario
|
|
341
|
+
* survives even when its mean composite is lower.
|
|
342
|
+
* - *Combine complementary lessons*: when the frontier has >1 member, the
|
|
343
|
+
* first population slot is a merge of those parents' strengths (one LLM
|
|
344
|
+
* call citing each parent's winning scenarios). Toggle via `combineParents`.
|
|
345
|
+
* Dominance is computed by the package-canonical `paretoFrontier` (`pareto.ts`).
|
|
346
|
+
*
|
|
347
|
+
* Optional `constraints` move structured-doc guards into the proposer
|
|
348
|
+
* (preserve H2 section headings, cap sentence-level edits) — useful when
|
|
349
|
+
* the surface IS a structured procedure like a SKILL.md / runbook /
|
|
350
|
+
* judge rubric. When `constraints` is omitted, behavior is unchanged.
|
|
351
|
+
*
|
|
352
|
+
* The proposer is surface-agnostic — any string surface in any consumer opts
|
|
353
|
+
* in by selecting it. Reuses the generic reflection primitive
|
|
354
|
+
* (`buildReflectionPrompt` / `parseReflectionResponse`) and the router client.
|
|
355
|
+
*
|
|
356
|
+
* Earns its keep where there is real per-instance signal (which the
|
|
357
|
+
* dimensional + per-scenario evidence + the `LabeledScenarioStore` flywheel
|
|
358
|
+
* now provide). For thin-signal surfaces it degrades to plain reflection.
|
|
359
|
+
* On generation 0 (no history) it reflects on the current surface against
|
|
360
|
+
* the mutation primitives alone.
|
|
361
|
+
*/
|
|
362
|
+
|
|
363
|
+
interface GepaProposerConstraints {
|
|
364
|
+
/** H2 section headings that MUST appear unchanged in every candidate.
|
|
365
|
+
* When set, the proposer auto-detects current H2s if this is empty AND
|
|
366
|
+
* rejects any candidate that drops or renames a preserved heading.
|
|
367
|
+
* Use when the surface is a structured doc (SKILL.md, runbook,
|
|
368
|
+
* sectioned system prompt, judge rubric). */
|
|
369
|
+
preserveSections?: string[];
|
|
370
|
+
/** Maximum sentence-level edits per candidate vs the parent surface.
|
|
371
|
+
* Rejection threshold = maxSentenceEdits × 2 (counts adds + removes).
|
|
372
|
+
* Inspired by SkillOpt's edit-budget as a "textual learning rate."
|
|
373
|
+
* Cap prevents an LLM rewrite from overwriting useful prior rules. */
|
|
374
|
+
maxSentenceEdits?: number;
|
|
375
|
+
}
|
|
376
|
+
interface GepaProposerOptions {
|
|
377
|
+
/** Router transport (apiKey/baseUrl). */
|
|
378
|
+
llm: LlmClientOptions;
|
|
379
|
+
/** Model that performs the reflection. */
|
|
380
|
+
model: string;
|
|
381
|
+
/** What is being optimized — appears in the reflection prompt for orientation. */
|
|
382
|
+
target: string;
|
|
383
|
+
/** Surface-specific mutation levers offered to the model. */
|
|
384
|
+
mutationPrimitives?: string[];
|
|
385
|
+
/** Top/bottom scenarios surfaced as evidence each generation. Default 3. */
|
|
386
|
+
evidenceK?: number;
|
|
387
|
+
/** Reflection sampling temperature. Default 0.7. */
|
|
388
|
+
temperature?: number;
|
|
389
|
+
/** Reflection max tokens. Default 6000. */
|
|
390
|
+
maxTokens?: number;
|
|
391
|
+
/** Structured-doc constraints. Candidates violating any are rejected
|
|
392
|
+
* post-parse and dropped from the returned population. */
|
|
393
|
+
constraints?: GepaProposerConstraints;
|
|
394
|
+
/** GEPA combine-complementary-lessons: when the loop supplies a Pareto
|
|
395
|
+
* frontier of >1 non-dominated parents (`ctx.paretoParents`), spend one
|
|
396
|
+
* slot of the population on a merge of their strengths. Default `true` —
|
|
397
|
+
* this is the GEPA-faithful behavior; the merge only fires once the
|
|
398
|
+
* frontier has more than one member (generation ≥ 1). Set `false` for
|
|
399
|
+
* pure single-parent reflection. */
|
|
400
|
+
combineParents?: boolean;
|
|
401
|
+
/** Cap on how many frontier parents feed one combine prompt (highest
|
|
402
|
+
* composite first), to bound prompt size. Default 4. */
|
|
403
|
+
combineMaxParents?: number;
|
|
404
|
+
}
|
|
405
|
+
declare function gepaProposer(opts: GepaProposerOptions): SurfaceProposer;
|
|
406
|
+
/** Extract H2 headings (`## Foo`) from a markdown surface. Exported for
|
|
407
|
+
* consumers building custom mutators that share the same invariant. */
|
|
408
|
+
declare function extractH2Sections(text: string): string[];
|
|
409
|
+
/** Sentence-level edit distance — count distinct add/remove ops between
|
|
410
|
+
* two surfaces via a normalised line-by-line set diff. Treats trivial
|
|
411
|
+
* whitespace as identical. Exported for tests + consumer-side validators. */
|
|
412
|
+
declare function countSentenceEdits(baseline: string, candidate: string): number;
|
|
413
|
+
|
|
414
|
+
export { type CampaignStorage as C, type GepaProposerOptions as G, type OpenAutoPrOptions as O, type RunOptimizationOptions as R, type RunImprovementLoopResult as a, type RunCampaignOptions as b, type RunImprovementLoopOptions as c, runImprovementLoop as d, type GepaProposerConstraints as e, fsCampaignStorage as f, gepaProposer as g, type OpenAutoPrResult as h, inMemoryCampaignStorage as i, type RunOptimizationResult as j, countSentenceEdits as k, defaultRenderDiff as l, extractH2Sections as m, runOptimization as n, openAutoPr as o, runCampaign as r, surfaceHash as s };
|
|
@@ -1,5 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { c as DatasetManifest } from '../dataset-BbGkaN2I.js';
|
|
2
|
+
import { a as CalibrationResult } from '../judge-calibration-0p2QcWNE.js';
|
|
3
|
+
import { b as OutcomeStore } from '../outcome-store-rnXLEqSn.js';
|
|
4
|
+
import { d as RedTeamReport } from '../red-team-BWdoyleI.js';
|
|
5
|
+
import { T as TraceStore } from '../store-BcFXE6LG.js';
|
|
6
|
+
import '../errors-CzMUYo7b.js';
|
|
7
|
+
import '../schema-m0gsnbt3.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Governance reporting — shared types.
|
|
11
|
+
*
|
|
12
|
+
* The framework collects a `GovernanceContext` (traces + outcomes +
|
|
13
|
+
* dataset manifests + red-team results + judge calibration) and each
|
|
14
|
+
* specific template (NIST AI RMF, SOC2, EU AI Act) renders a
|
|
15
|
+
* structured report from it.
|
|
16
|
+
*
|
|
17
|
+
* Reports are machine-readable JSON first; human-readable Markdown is a
|
|
18
|
+
* pure transform on top. External auditors consume the Markdown; CI
|
|
19
|
+
* consumes the JSON.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
interface GovernanceContext {
|
|
23
|
+
/** Legal / org identity for the report. */
|
|
24
|
+
organization: string;
|
|
25
|
+
/** System / agent identifier. */
|
|
26
|
+
systemName: string;
|
|
27
|
+
/** ISO8601 period the report covers. */
|
|
28
|
+
periodStart: string;
|
|
29
|
+
periodEnd: string;
|
|
30
|
+
/** Versioned dataset manifests used during the period. */
|
|
31
|
+
datasets: DatasetManifest[];
|
|
32
|
+
traceStore: TraceStore;
|
|
33
|
+
outcomeStore?: OutcomeStore;
|
|
34
|
+
/** Cached red-team results for the period, if available. */
|
|
35
|
+
redTeam?: RedTeamReport;
|
|
36
|
+
/** Judge-vs-human calibration results, if measured. */
|
|
37
|
+
judgeCalibration?: CalibrationResult[];
|
|
38
|
+
/** Responsible owner for the system — role + name + email. */
|
|
39
|
+
owner: {
|
|
40
|
+
role: string;
|
|
41
|
+
name: string;
|
|
42
|
+
email: string;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
interface GovernanceFinding {
|
|
46
|
+
id: string;
|
|
47
|
+
severity: 'info' | 'low' | 'medium' | 'high' | 'critical';
|
|
48
|
+
/** Control reference the finding maps to (e.g. "NIST-AI-RMF:MEASURE-2.1"). */
|
|
49
|
+
control: string;
|
|
50
|
+
summary: string;
|
|
51
|
+
evidence?: string;
|
|
52
|
+
remediation?: string;
|
|
53
|
+
}
|
|
54
|
+
interface GovernanceReport {
|
|
55
|
+
framework: 'NIST-AI-RMF' | 'SOC2' | 'EU-AI-ACT';
|
|
56
|
+
version: string;
|
|
57
|
+
context: Pick<GovernanceContext, 'organization' | 'systemName' | 'periodStart' | 'periodEnd' | 'owner'>;
|
|
58
|
+
summary: {
|
|
59
|
+
findings: number;
|
|
60
|
+
byeverity: Record<GovernanceFinding['severity'], number>;
|
|
61
|
+
overall: 'compliant' | 'compliant-with-findings' | 'non-compliant';
|
|
62
|
+
};
|
|
63
|
+
findings: GovernanceFinding[];
|
|
64
|
+
/** Framework-specific structured payload (mapped controls, risk class, etc.). */
|
|
65
|
+
payload: Record<string, unknown>;
|
|
66
|
+
generatedAt: string;
|
|
67
|
+
}
|
|
68
|
+
declare function renderMarkdown(report: GovernanceReport): string;
|
|
69
|
+
declare function summarize(findings: GovernanceFinding[]): GovernanceReport['summary'];
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* EU AI Act — risk-class classification + compliance checklist.
|
|
73
|
+
*
|
|
74
|
+
* Classification is declarative: caller supplies the domain/use-case
|
|
75
|
+
* signals (biometric? critical infrastructure? education? employment?
|
|
76
|
+
* access to services?) and we map to the Act's risk tiers:
|
|
77
|
+
* - "unacceptable" (prohibited)
|
|
78
|
+
* - "high" (Annex III — strict obligations)
|
|
79
|
+
* - "limited" (transparency obligations)
|
|
80
|
+
* - "minimal" (voluntary codes of conduct)
|
|
81
|
+
*
|
|
82
|
+
* Then the compliance checklist enumerates Article 9 (risk mgmt),
|
|
83
|
+
* 10 (data + data governance), 11 (technical documentation), 13
|
|
84
|
+
* (transparency), 14 (human oversight), 15 (accuracy + robustness)
|
|
85
|
+
* requirements and flags gaps.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
type EuRiskClass = 'unacceptable' | 'high' | 'limited' | 'minimal';
|
|
89
|
+
interface UseCaseSignals {
|
|
90
|
+
/** Used for biometric identification in public spaces? (Art. 5 — unacceptable). */
|
|
91
|
+
biometricPublic?: boolean;
|
|
92
|
+
/** Social scoring by public authorities? (Art. 5). */
|
|
93
|
+
socialScoring?: boolean;
|
|
94
|
+
/** Subliminal manipulation? (Art. 5). */
|
|
95
|
+
subliminal?: boolean;
|
|
96
|
+
/** Annex III sector: critical infrastructure / education / employment /
|
|
97
|
+
* access to essential services / law enforcement / migration /
|
|
98
|
+
* administration of justice / democratic processes? */
|
|
99
|
+
annexIII?: boolean;
|
|
100
|
+
/** Interacts directly with natural persons (chatbot, agent)? — limited risk. */
|
|
101
|
+
chatbot?: boolean;
|
|
102
|
+
/** Generates synthetic media (image/audio/video/text deepfakes)? — limited risk. */
|
|
103
|
+
generatesSyntheticMedia?: boolean;
|
|
104
|
+
}
|
|
105
|
+
declare function classifyEuAiRisk(signals: UseCaseSignals): EuRiskClass;
|
|
106
|
+
declare function euAiActReport(ctx: GovernanceContext, signals: UseCaseSignals): Promise<GovernanceReport>;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* NIST AI RMF 1.0 — Govern / Map / Measure / Manage mapping.
|
|
110
|
+
*
|
|
111
|
+
* Each subcategory derives its status from concrete framework state:
|
|
112
|
+
* MEASURE 2.x: do we have a calibration regime? contamination controls?
|
|
113
|
+
* MEASURE 2.7: are red-team results available?
|
|
114
|
+
* MANAGE 1.x: are outcome metrics captured? correlation measured?
|
|
115
|
+
* GOVERN 1.x: dataset + prompt provenance recorded?
|
|
116
|
+
*
|
|
117
|
+
* We ship the mapping and the derivation rules; consumers supply the
|
|
118
|
+
* GovernanceContext.
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
declare function nistAiRmfReport(ctx: GovernanceContext): Promise<GovernanceReport>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* SOC 2 — Common Criteria 7 (system operations + change management)
|
|
125
|
+
* audit trail derived from the trace corpus.
|
|
126
|
+
*
|
|
127
|
+
* This is NOT a formal SOC2 report — that requires an external
|
|
128
|
+
* auditor. What we ship is the machine-readable *evidence* package
|
|
129
|
+
* that an auditor consumes: run counts, deploy events, access log
|
|
130
|
+
* summary, anomaly tracking, response-time SLOs.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
declare function soc2Report(ctx: GovernanceContext): Promise<GovernanceReport>;
|
|
134
|
+
|
|
135
|
+
export { type EuRiskClass, type GovernanceContext, type GovernanceFinding, type GovernanceReport, type UseCaseSignals, classifyEuAiRisk, euAiActReport, nistAiRmfReport, renderMarkdown, soc2Report, summarize };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { O as Objective, P as ParetoResult } from './pareto-E-pembql.js';
|
|
2
|
+
import { R as RunScore, a as RunTrace, b as RunScoreWeights } from './run-critic-CmMf05uV.js';
|
|
3
|
+
|
|
4
|
+
interface SteeringRolePrompt {
|
|
5
|
+
system?: string;
|
|
6
|
+
append?: string;
|
|
7
|
+
}
|
|
8
|
+
interface SteeringBundle {
|
|
9
|
+
id: string;
|
|
10
|
+
coderPrompt?: string;
|
|
11
|
+
continuePrompt?: string;
|
|
12
|
+
reviewerPrompts?: Record<string, string>;
|
|
13
|
+
skills?: string[];
|
|
14
|
+
rolePrompts?: Record<string, SteeringRolePrompt>;
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
interface SteeringDelta {
|
|
18
|
+
coderPrompt?: string;
|
|
19
|
+
continuePrompt?: string;
|
|
20
|
+
reviewerPrompts?: Record<string, string>;
|
|
21
|
+
skills?: string[];
|
|
22
|
+
rolePrompts?: Record<string, SteeringRolePrompt>;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
declare function mergeSteeringBundle(base: SteeringBundle, delta: SteeringDelta): SteeringBundle;
|
|
26
|
+
declare function renderSteeringText(bundle: SteeringBundle): string;
|
|
27
|
+
|
|
28
|
+
type HarnessIntervention = 'continue' | 'plan' | 'audit' | 'recover' | 'repair' | 'verify' | 'final_gate' | 'wait_for_measurement' | 'abort';
|
|
29
|
+
interface WorkflowTopology {
|
|
30
|
+
id: string;
|
|
31
|
+
interventions: HarnessIntervention[];
|
|
32
|
+
maxParallelBranches?: number;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
interface MeasurementPolicy {
|
|
36
|
+
required: string[];
|
|
37
|
+
optional?: string[];
|
|
38
|
+
promoteOn?: Array<keyof RunScore | 'aggregate'>;
|
|
39
|
+
}
|
|
40
|
+
interface HarnessVariant {
|
|
41
|
+
id: string;
|
|
42
|
+
steering?: SteeringBundle;
|
|
43
|
+
topology?: WorkflowTopology;
|
|
44
|
+
measurement?: MeasurementPolicy;
|
|
45
|
+
budgets?: Record<string, number>;
|
|
46
|
+
models?: Record<string, string>;
|
|
47
|
+
reviewers?: Record<string, string>;
|
|
48
|
+
metadata?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
interface HarnessScenario {
|
|
51
|
+
id: string;
|
|
52
|
+
task: string;
|
|
53
|
+
split?: 'train' | 'validation' | 'test' | string;
|
|
54
|
+
metadata?: Record<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
interface HarnessRunRequest {
|
|
57
|
+
variant: HarnessVariant;
|
|
58
|
+
scenario: HarnessScenario;
|
|
59
|
+
trialIndex: number;
|
|
60
|
+
}
|
|
61
|
+
interface HarnessAdapter {
|
|
62
|
+
run(request: HarnessRunRequest): Promise<RunTrace>;
|
|
63
|
+
}
|
|
64
|
+
interface HarnessRunResult {
|
|
65
|
+
variant: HarnessVariant;
|
|
66
|
+
scenario: HarnessScenario;
|
|
67
|
+
trialIndex: number;
|
|
68
|
+
trace: RunTrace;
|
|
69
|
+
score: RunScore;
|
|
70
|
+
aggregate: number;
|
|
71
|
+
}
|
|
72
|
+
interface HarnessVariantReport {
|
|
73
|
+
variant: HarnessVariant;
|
|
74
|
+
runs: HarnessRunResult[];
|
|
75
|
+
aggregateMean: number;
|
|
76
|
+
passRate: number;
|
|
77
|
+
costUsdMean: number;
|
|
78
|
+
wallSecondsMean: number;
|
|
79
|
+
scoreMean: RunScore;
|
|
80
|
+
}
|
|
81
|
+
interface HarnessSelection {
|
|
82
|
+
winner: HarnessVariantReport;
|
|
83
|
+
frontier: ParetoResult<HarnessVariantReport>;
|
|
84
|
+
reports: HarnessVariantReport[];
|
|
85
|
+
}
|
|
86
|
+
interface HarnessExperimentResult {
|
|
87
|
+
results: HarnessRunResult[];
|
|
88
|
+
selection: HarnessSelection;
|
|
89
|
+
}
|
|
90
|
+
interface HarnessExperimentConfig {
|
|
91
|
+
adapter: HarnessAdapter;
|
|
92
|
+
variants: HarnessVariant[];
|
|
93
|
+
scenarios: HarnessScenario[];
|
|
94
|
+
trialsPerScenario?: number;
|
|
95
|
+
parallelism?: number;
|
|
96
|
+
weights?: Partial<RunScoreWeights>;
|
|
97
|
+
objectives?: Array<Objective<HarnessVariantReport>>;
|
|
98
|
+
score?: (trace: RunTrace, request: HarnessRunRequest) => RunScore | Promise<RunScore>;
|
|
99
|
+
onResult?: (result: HarnessRunResult) => void | Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
declare const DEFAULT_HARNESS_OBJECTIVES: Array<Objective<HarnessVariantReport>>;
|
|
102
|
+
declare function runHarnessExperiment(config: HarnessExperimentConfig): Promise<HarnessExperimentResult>;
|
|
103
|
+
declare function selectHarnessVariant(results: HarnessRunResult[], objectives?: Array<Objective<HarnessVariantReport>>): HarnessSelection;
|
|
104
|
+
declare function summarizeHarnessResults(results: HarnessRunResult[]): HarnessVariantReport[];
|
|
105
|
+
|
|
106
|
+
export { DEFAULT_HARNESS_OBJECTIVES as D, type HarnessAdapter as H, type MeasurementPolicy as M, type SteeringBundle as S, type WorkflowTopology as W, type HarnessExperimentConfig as a, type HarnessExperimentResult as b, type HarnessIntervention as c, type HarnessRunRequest as d, type HarnessRunResult as e, type HarnessScenario as f, type HarnessSelection as g, type HarnessVariant as h, type HarnessVariantReport as i, type SteeringDelta as j, type SteeringRolePrompt as k, runHarnessExperiment as l, mergeSteeringBundle as m, summarizeHarnessResults as n, renderSteeringText as r, selectHarnessVariant as s };
|