@tangle-network/agent-eval 0.6.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -1033,86 +1033,60 @@ declare class PromptOptimizer {
1033
1033
  run(config: OptimizationConfig): Promise<OptimizationResult>;
1034
1034
  }
1035
1035
 
1036
- /**
1037
- * Dual-agent convergence bench.
1038
- *
1039
- * Pattern lifted from tax-agent + legal-agent: two agents take turns until
1040
- * they converge on a consensus artifact. One proposes, the other critiques;
1041
- * the proposer revises; repeat until a score threshold is hit or max rounds.
1042
- *
1043
- * Generalized so any two "agents" (gateways, local functions, anything with
1044
- * `propose` + `critique`) compose in. Returns convergence rounds per
1045
- * scenario + whether convergence happened.
1046
- */
1047
- interface DualAgentScenario {
1048
- id: string;
1049
- initialPrompt: string;
1050
- /** Optional context the agents can read (e.g. source documents). */
1051
- context?: Record<string, unknown>;
1052
- }
1053
- interface DualAgentRound {
1054
- roundIndex: number;
1055
- proposal: string;
1056
- critique: string;
1057
- convergenceScore: number;
1058
- }
1059
- interface DualAgentScenarioResult {
1060
- scenarioId: string;
1061
- converged: boolean;
1062
- roundsToConverge: number | null;
1063
- finalProposal: string;
1064
- history: DualAgentRound[];
1065
- finalScore: number;
1036
+ interface SteeringRolePrompt {
1037
+ system?: string;
1038
+ append?: string;
1066
1039
  }
1067
- interface DualAgentBenchConfig {
1068
- scenarios: DualAgentScenario[];
1069
- maxRounds?: number;
1070
- /** Convergence threshold in 0..1 (default 0.85). */
1071
- convergenceThreshold?: number;
1072
- /**
1073
- * Propose an answer given the scenario + the critic's prior critique (if any).
1074
- * Returns the proposal string.
1075
- */
1076
- propose: (args: {
1077
- scenario: DualAgentScenario;
1078
- roundIndex: number;
1079
- priorProposal?: string;
1080
- priorCritique?: string;
1081
- }) => Promise<string>;
1082
- /**
1083
- * Critique the proposer's current output. Returns a structured critique
1084
- * (free text) plus a convergence score: how close the proposal is to
1085
- * acceptable. 1.0 = accept, 0.0 = totally off.
1086
- */
1087
- critique: (args: {
1088
- scenario: DualAgentScenario;
1089
- roundIndex: number;
1090
- proposal: string;
1091
- }) => Promise<{
1092
- critique: string;
1093
- convergenceScore: number;
1094
- }>;
1095
- /** Optional per-round hook for progress + tracing. */
1096
- onRoundComplete?: (info: {
1097
- scenarioId: string;
1098
- round: DualAgentRound;
1099
- }) => void;
1040
+ interface SteeringBundle {
1041
+ id: string;
1042
+ coderPrompt?: string;
1043
+ continuePrompt?: string;
1044
+ reviewerPrompts?: Record<string, string>;
1045
+ skills?: string[];
1046
+ rolePrompts?: Record<string, SteeringRolePrompt>;
1047
+ metadata?: Record<string, unknown>;
1100
1048
  }
1101
- interface DualAgentReport {
1102
- scenarios: DualAgentScenarioResult[];
1103
- aggregate: {
1104
- convergenceRate: number;
1105
- avgRoundsToConverge: number | null;
1106
- avgFinalScore: number;
1107
- };
1108
- config: {
1109
- maxRounds: number;
1110
- convergenceThreshold: number;
1111
- };
1049
+ interface SteeringDelta {
1050
+ coderPrompt?: string;
1051
+ continuePrompt?: string;
1052
+ reviewerPrompts?: Record<string, string>;
1053
+ skills?: string[];
1054
+ rolePrompts?: Record<string, SteeringRolePrompt>;
1055
+ metadata?: Record<string, unknown>;
1112
1056
  }
1113
- declare class DualAgentBench {
1114
- run(config: DualAgentBenchConfig): Promise<DualAgentReport>;
1057
+ declare function mergeSteeringBundle(base: SteeringBundle, delta: SteeringDelta): SteeringBundle;
1058
+ declare function renderSteeringText(bundle: SteeringBundle): string;
1059
+
1060
+ interface RunScore {
1061
+ success: number;
1062
+ goalProgress: number;
1063
+ repoGroundedness: number;
1064
+ driftPenalty: number;
1065
+ toolUseQuality: number;
1066
+ patchQuality: number;
1067
+ testReality: number;
1068
+ finalGate: number;
1069
+ reviewerBlockers: number;
1070
+ costUsd: number;
1071
+ wallSeconds: number;
1072
+ notes?: string[];
1073
+ }
1074
+ interface RunScoreWeights {
1075
+ success: number;
1076
+ goalProgress: number;
1077
+ repoGroundedness: number;
1078
+ driftPenalty: number;
1079
+ toolUseQuality: number;
1080
+ patchQuality: number;
1081
+ testReality: number;
1082
+ finalGate: number;
1083
+ reviewerBlockers: number;
1084
+ costUsd: number;
1085
+ wallSeconds: number;
1115
1086
  }
1087
+ declare const DEFAULT_RUN_SCORE_WEIGHTS: RunScoreWeights;
1088
+ declare function aggregateRunScore(score: RunScore, weights?: Partial<RunScoreWeights>): number;
1089
+ declare function clamp01(value: number): number;
1116
1090
 
1117
1091
  /**
1118
1092
  * TraceSchema v1 — the canonical data model for agent-eval.
@@ -1606,6 +1580,255 @@ interface OtlpExport {
1606
1580
  /** Export a single run's spans + events in OTLP/JSON. */
1607
1581
  declare function exportRunAsOtlp(store: TraceStore, runId: string, resourceAttrs?: Record<string, string | number | boolean>): Promise<OtlpExport>;
1608
1582
 
1583
+ interface RunTrace {
1584
+ run: Run;
1585
+ spans: Span[];
1586
+ events: TraceEvent[];
1587
+ artifacts: Artifact[];
1588
+ budget: BudgetLedgerEntry[];
1589
+ }
1590
+ interface RunCriticOptions {
1591
+ weights?: Partial<RunScoreWeights>;
1592
+ driftPatterns?: RegExp[];
1593
+ }
1594
+ declare class RunCritic {
1595
+ private readonly weights?;
1596
+ private readonly driftPatterns;
1597
+ constructor(options?: RunCriticOptions);
1598
+ score(store: TraceStore, runId: string): Promise<RunScore>;
1599
+ scoreTrace(trace: RunTrace): RunScore;
1600
+ rank(score: RunScore): number;
1601
+ private isDrift;
1602
+ }
1603
+
1604
+ interface PlaybookEntry {
1605
+ instruction: string;
1606
+ rationale: string;
1607
+ category?: string;
1608
+ evidence?: string;
1609
+ weight?: number;
1610
+ sourceRunId?: string;
1611
+ }
1612
+ interface Playbook {
1613
+ entries: PlaybookEntry[];
1614
+ }
1615
+ declare function distillPlaybook(entries: PlaybookEntry[], options?: {
1616
+ maxEntries?: number;
1617
+ }): Playbook;
1618
+ declare function renderPlaybookMarkdown(playbook: Playbook): string;
1619
+
1620
+ interface OptimizationExample {
1621
+ scenarioId: string;
1622
+ metadata?: Record<string, unknown>;
1623
+ }
1624
+ interface SteeringEvaluation {
1625
+ variant: SteeringBundle;
1626
+ example: OptimizationExample;
1627
+ trialIndex: number;
1628
+ }
1629
+ interface SteeringVariantReport {
1630
+ variantId: string;
1631
+ bundle: SteeringBundle;
1632
+ mean: number;
1633
+ ci95: {
1634
+ lower: number;
1635
+ upper: number;
1636
+ };
1637
+ scenarioScores: Record<string, {
1638
+ mean: number;
1639
+ n: number;
1640
+ samples: number[];
1641
+ }>;
1642
+ }
1643
+ interface OptimizationLoopResult {
1644
+ winner: SteeringBundle;
1645
+ significant: boolean;
1646
+ reports: SteeringVariantReport[];
1647
+ pairwise: Array<{
1648
+ variantA: string;
1649
+ variantB: string;
1650
+ pValue: number;
1651
+ qValue: number;
1652
+ significant: boolean;
1653
+ meanDelta: number;
1654
+ }>;
1655
+ }
1656
+ interface OptimizationLoopConfig {
1657
+ variants: SteeringBundle[];
1658
+ examples: OptimizationExample[];
1659
+ evaluate: (args: SteeringEvaluation) => Promise<RunScore>;
1660
+ scoreWeights?: Partial<RunScoreWeights>;
1661
+ trialsPerScenario?: number;
1662
+ }
1663
+ declare class OptimizationLoop {
1664
+ private readonly optimizer;
1665
+ constructor(optimizer?: PromptOptimizer);
1666
+ run(config: OptimizationLoopConfig): Promise<OptimizationLoopResult>;
1667
+ }
1668
+
1669
+ type SteeringOptimizerBackend = 'pairwise' | 'ax-gepa';
1670
+ interface SteeringOptimizationRow {
1671
+ variantId: string;
1672
+ scenarioId: string;
1673
+ bundle: SteeringBundle;
1674
+ score: RunScore;
1675
+ metadata?: Record<string, unknown>;
1676
+ }
1677
+ interface SteeringOptimizationSelector {
1678
+ backend: SteeringOptimizerBackend;
1679
+ signature?: string;
1680
+ labels?: string[];
1681
+ rationale?: string;
1682
+ }
1683
+ interface SteeringOptimizationResult {
1684
+ backend: SteeringOptimizerBackend;
1685
+ recommendedVariantId: string;
1686
+ rationale: string;
1687
+ rankings: Array<{
1688
+ variantId: string;
1689
+ mean: number;
1690
+ runs: number;
1691
+ }>;
1692
+ selector?: SteeringOptimizationSelector;
1693
+ skipped?: boolean;
1694
+ }
1695
+ interface SteeringOptimizerConfig {
1696
+ weights?: Partial<RunScoreWeights>;
1697
+ }
1698
+ interface AxSteeringOptimizerConfig extends SteeringOptimizerConfig {
1699
+ provider: 'openai' | 'anthropic';
1700
+ apiKey: string;
1701
+ model: string;
1702
+ teacherModel?: string;
1703
+ minRows?: number;
1704
+ }
1705
+ declare class PairwiseSteeringOptimizer {
1706
+ optimize(rows: SteeringOptimizationRow[], config?: SteeringOptimizerConfig): SteeringOptimizationResult;
1707
+ }
1708
+ declare class AxGepaSteeringOptimizer {
1709
+ private readonly config;
1710
+ constructor(config: AxSteeringOptimizerConfig);
1711
+ optimize(rows: SteeringOptimizationRow[]): Promise<SteeringOptimizationResult>;
1712
+ }
1713
+
1714
+ /**
1715
+ * Pareto frontier — multi-objective optimization over candidate runs.
1716
+ *
1717
+ * Lifted from ADC pareto.ts and blueprint-agent frontier.ts. When you're
1718
+ * trading off (cost, latency, quality) or (passRate, tokenBudget,
1719
+ * ttfb), you rarely have a single "winner" — you have a set of
1720
+ * non-dominated candidates. This module exposes:
1721
+ *
1722
+ * - `paretoFrontier`: filter a set of candidates to the non-dominated ones
1723
+ * - `dominates`: does A dominate B across all objectives?
1724
+ *
1725
+ * Each objective is declared with a direction: 'maximize' (higher=better)
1726
+ * or 'minimize' (lower=better). Candidates are any object; pass an
1727
+ * `objective(candidate)` accessor.
1728
+ */
1729
+ type Direction = 'maximize' | 'minimize';
1730
+ interface Objective<T> {
1731
+ /** Stable label used in reports. */
1732
+ name: string;
1733
+ direction: Direction;
1734
+ value: (candidate: T) => number;
1735
+ }
1736
+ interface ParetoResult<T> {
1737
+ frontier: T[];
1738
+ dominated: T[];
1739
+ /** Index map: frontier[i] dominates each of dominatedBy[i]. */
1740
+ dominanceMap: Array<{
1741
+ dominator: T;
1742
+ dominated: T[];
1743
+ }>;
1744
+ }
1745
+ /** Does candidate A weakly dominate B — strictly better on at least one objective and no worse on any? */
1746
+ declare function dominates<T>(a: T, b: T, objectives: Objective<T>[]): boolean;
1747
+ /**
1748
+ * Compute the non-dominated frontier. Candidates with NaN/Infinity on any
1749
+ * objective are excluded (can't rank them). A candidate enters the frontier
1750
+ * iff no other candidate dominates it.
1751
+ */
1752
+ declare function paretoFrontier<T>(candidates: T[], objectives: Objective<T>[]): ParetoResult<T>;
1753
+
1754
+ type HarnessIntervention = 'continue' | 'plan' | 'audit' | 'recover' | 'repair' | 'verify' | 'final_gate' | 'wait_for_measurement' | 'abort';
1755
+ interface WorkflowTopology {
1756
+ id: string;
1757
+ interventions: HarnessIntervention[];
1758
+ maxParallelBranches?: number;
1759
+ metadata?: Record<string, unknown>;
1760
+ }
1761
+ interface MeasurementPolicy {
1762
+ required: string[];
1763
+ optional?: string[];
1764
+ promoteOn?: Array<keyof RunScore | 'aggregate'>;
1765
+ }
1766
+ interface HarnessVariant {
1767
+ id: string;
1768
+ steering?: SteeringBundle;
1769
+ topology?: WorkflowTopology;
1770
+ measurement?: MeasurementPolicy;
1771
+ budgets?: Record<string, number>;
1772
+ models?: Record<string, string>;
1773
+ reviewers?: Record<string, string>;
1774
+ metadata?: Record<string, unknown>;
1775
+ }
1776
+ interface HarnessScenario {
1777
+ id: string;
1778
+ task: string;
1779
+ split?: 'train' | 'validation' | 'test' | string;
1780
+ metadata?: Record<string, unknown>;
1781
+ }
1782
+ interface HarnessRunRequest {
1783
+ variant: HarnessVariant;
1784
+ scenario: HarnessScenario;
1785
+ trialIndex: number;
1786
+ }
1787
+ interface HarnessAdapter {
1788
+ run(request: HarnessRunRequest): Promise<RunTrace>;
1789
+ }
1790
+ interface HarnessRunResult {
1791
+ variant: HarnessVariant;
1792
+ scenario: HarnessScenario;
1793
+ trialIndex: number;
1794
+ trace: RunTrace;
1795
+ score: RunScore;
1796
+ aggregate: number;
1797
+ }
1798
+ interface HarnessVariantReport {
1799
+ variant: HarnessVariant;
1800
+ runs: HarnessRunResult[];
1801
+ aggregateMean: number;
1802
+ passRate: number;
1803
+ costUsdMean: number;
1804
+ wallSecondsMean: number;
1805
+ scoreMean: RunScore;
1806
+ }
1807
+ interface HarnessSelection {
1808
+ winner: HarnessVariantReport;
1809
+ frontier: ParetoResult<HarnessVariantReport>;
1810
+ reports: HarnessVariantReport[];
1811
+ }
1812
+ interface HarnessExperimentResult {
1813
+ results: HarnessRunResult[];
1814
+ selection: HarnessSelection;
1815
+ }
1816
+ interface HarnessExperimentConfig {
1817
+ adapter: HarnessAdapter;
1818
+ variants: HarnessVariant[];
1819
+ scenarios: HarnessScenario[];
1820
+ trialsPerScenario?: number;
1821
+ parallelism?: number;
1822
+ weights?: Partial<RunScoreWeights>;
1823
+ objectives?: Array<Objective<HarnessVariantReport>>;
1824
+ score?: (trace: RunTrace, request: HarnessRunRequest) => RunScore | Promise<RunScore>;
1825
+ onResult?: (result: HarnessRunResult) => void | Promise<void>;
1826
+ }
1827
+ declare const DEFAULT_HARNESS_OBJECTIVES: Array<Objective<HarnessVariantReport>>;
1828
+ declare function runHarnessExperiment(config: HarnessExperimentConfig): Promise<HarnessExperimentResult>;
1829
+ declare function selectHarnessVariant(results: HarnessRunResult[], objectives?: Array<Objective<HarnessVariantReport>>): HarnessSelection;
1830
+ declare function summarizeHarnessResults(results: HarnessRunResult[]): HarnessVariantReport[];
1831
+
1609
1832
  /**
1610
1833
  * SandboxHarness — executes a scenario in an isolated environment and
1611
1834
  * emits a rich SandboxSpan into the trace.
@@ -1666,8 +1889,27 @@ declare const pytestTestParser: TestOutputParser;
1666
1889
  declare const jestTestParser: TestOutputParser;
1667
1890
  /** Composite parser — tries a list of parsers in order. */
1668
1891
  declare function composeParsers(...parsers: TestOutputParser[]): TestOutputParser;
1892
+ interface SubprocessSandboxDriverOptions {
1893
+ /**
1894
+ * Default cwd for all `exec` calls. Used when the per-call `HarnessConfig`
1895
+ * does not set its own `cwd`. Lets callers bind the driver to a working
1896
+ * directory once instead of spreading cwd into every harness config —
1897
+ * useful when the harness config is constructed far from the call site
1898
+ * (e.g. starter-foundry's promoter passes a static HarnessConfig per
1899
+ * family taxonomy but needs a per-run composed-scaffold cwd).
1900
+ */
1901
+ cwd?: string;
1902
+ /**
1903
+ * Default env merged into every `exec` call's env (per-call `HarnessConfig.env`
1904
+ * still wins on key collision). Same ergonomic rationale as `cwd` above.
1905
+ */
1906
+ env?: Record<string, string>;
1907
+ }
1669
1908
  declare class SubprocessSandboxDriver implements SandboxDriver {
1670
1909
  id: string;
1910
+ private defaultCwd?;
1911
+ private defaultEnv?;
1912
+ constructor(options?: SubprocessSandboxDriverOptions);
1671
1913
  exec(phase: SandboxResult['phase'], command: string, config: HarnessConfig): Promise<SandboxResult>;
1672
1914
  }
1673
1915
  declare class DockerSandboxDriver implements SandboxDriver {
@@ -1689,6 +1931,327 @@ declare class SandboxHarness {
1689
1931
  run(config: HarnessConfig, emitter: TraceEmitter): Promise<SandboxHarnessResult>;
1690
1932
  }
1691
1933
 
1934
+ type SandboxJudgeKind = 'compiler' | 'test' | 'linter' | 'security';
1935
+ interface SandboxJudgeSpec {
1936
+ id: string;
1937
+ kind: SandboxJudgeKind;
1938
+ config: HarnessConfig;
1939
+ }
1940
+ interface SandboxJudgeResult {
1941
+ id: string;
1942
+ kind: SandboxJudgeKind;
1943
+ passed: boolean;
1944
+ score: number;
1945
+ summary: string;
1946
+ detail: SandboxHarnessResult;
1947
+ }
1948
+ interface JudgeFleetOptions {
1949
+ driver?: SandboxDriver;
1950
+ parallel?: boolean;
1951
+ }
1952
+ declare class JudgeRunner {
1953
+ private readonly driver;
1954
+ constructor(driver?: SandboxDriver);
1955
+ run(spec: SandboxJudgeSpec): Promise<SandboxJudgeResult>;
1956
+ }
1957
+ declare function runJudgeFleet(specs: SandboxJudgeSpec[], options?: JudgeFleetOptions): Promise<SandboxJudgeResult[]>;
1958
+ declare function compilerJudge(id: string, config: HarnessConfig): SandboxJudgeSpec;
1959
+ declare function testJudge(id: string, config: HarnessConfig): SandboxJudgeSpec;
1960
+ declare function linterJudge(id: string, config: HarnessConfig): SandboxJudgeSpec;
1961
+ declare function securityJudge(id: string, config: HarnessConfig): SandboxJudgeSpec;
1962
+
1963
+ interface HostedJudgeDimension {
1964
+ name: string;
1965
+ weight: number;
1966
+ rubric: string;
1967
+ }
1968
+ interface HostedJudgeConfig {
1969
+ model: string;
1970
+ mode?: 'llm' | 'sandbox' | 'composite';
1971
+ systemPrompt?: string;
1972
+ rubricTemplate?: string;
1973
+ temperature?: number;
1974
+ maxTurns?: number;
1975
+ tools?: string[];
1976
+ dimensions?: HostedJudgeDimension[];
1977
+ setupCommand?: string;
1978
+ scripts?: Record<string, string>;
1979
+ }
1980
+ interface HostedJudgeRequest {
1981
+ prompt: string;
1982
+ response: string;
1983
+ rubric?: string;
1984
+ reference?: string;
1985
+ judge: HostedJudgeConfig;
1986
+ }
1987
+ interface HostedJudgeResponse {
1988
+ score: number;
1989
+ reasoning: string;
1990
+ cost: number;
1991
+ dimensions?: Array<{
1992
+ name: string;
1993
+ score: number;
1994
+ reasoning: string;
1995
+ }>;
1996
+ evidence?: Array<{
1997
+ type: string;
1998
+ content: string;
1999
+ }>;
2000
+ turns?: number;
2001
+ parseFailed?: boolean;
2002
+ rawOutput?: string;
2003
+ }
2004
+ interface HostedRunScoreRequest {
2005
+ trace: RunTrace;
2006
+ weights?: Partial<RunScoreWeights>;
2007
+ driftPatterns?: string[];
2008
+ }
2009
+ interface HostedRunScoreResponse {
2010
+ score: RunScore;
2011
+ aggregate: number;
2012
+ weights: RunScoreWeights;
2013
+ notes: string[];
2014
+ }
2015
+ type HostedRunCriticConfig = Pick<RunCriticOptions, 'weights'> & {
2016
+ driftPatterns?: string[];
2017
+ };
2018
+
2019
+ /**
2020
+ * Dual-agent convergence bench.
2021
+ *
2022
+ * Pattern lifted from tax-agent + legal-agent: two agents take turns until
2023
+ * they converge on a consensus artifact. One proposes, the other critiques;
2024
+ * the proposer revises; repeat until a score threshold is hit or max rounds.
2025
+ *
2026
+ * Generalized so any two "agents" (gateways, local functions, anything with
2027
+ * `propose` + `critique`) compose in. Returns convergence rounds per
2028
+ * scenario + whether convergence happened.
2029
+ */
2030
+ interface DualAgentScenario {
2031
+ id: string;
2032
+ initialPrompt: string;
2033
+ /** Optional context the agents can read (e.g. source documents). */
2034
+ context?: Record<string, unknown>;
2035
+ }
2036
+ interface DualAgentRound {
2037
+ roundIndex: number;
2038
+ proposal: string;
2039
+ critique: string;
2040
+ convergenceScore: number;
2041
+ }
2042
+ interface DualAgentScenarioResult {
2043
+ scenarioId: string;
2044
+ converged: boolean;
2045
+ roundsToConverge: number | null;
2046
+ finalProposal: string;
2047
+ history: DualAgentRound[];
2048
+ finalScore: number;
2049
+ }
2050
+ interface DualAgentBenchConfig {
2051
+ scenarios: DualAgentScenario[];
2052
+ maxRounds?: number;
2053
+ /** Convergence threshold in 0..1 (default 0.85). */
2054
+ convergenceThreshold?: number;
2055
+ /**
2056
+ * Propose an answer given the scenario + the critic's prior critique (if any).
2057
+ * Returns the proposal string.
2058
+ */
2059
+ propose: (args: {
2060
+ scenario: DualAgentScenario;
2061
+ roundIndex: number;
2062
+ priorProposal?: string;
2063
+ priorCritique?: string;
2064
+ }) => Promise<string>;
2065
+ /**
2066
+ * Critique the proposer's current output. Returns a structured critique
2067
+ * (free text) plus a convergence score: how close the proposal is to
2068
+ * acceptable. 1.0 = accept, 0.0 = totally off.
2069
+ */
2070
+ critique: (args: {
2071
+ scenario: DualAgentScenario;
2072
+ roundIndex: number;
2073
+ proposal: string;
2074
+ }) => Promise<{
2075
+ critique: string;
2076
+ convergenceScore: number;
2077
+ }>;
2078
+ /** Optional per-round hook for progress + tracing. */
2079
+ onRoundComplete?: (info: {
2080
+ scenarioId: string;
2081
+ round: DualAgentRound;
2082
+ }) => void;
2083
+ }
2084
+ interface DualAgentReport {
2085
+ scenarios: DualAgentScenarioResult[];
2086
+ aggregate: {
2087
+ convergenceRate: number;
2088
+ avgRoundsToConverge: number | null;
2089
+ avgFinalScore: number;
2090
+ };
2091
+ config: {
2092
+ maxRounds: number;
2093
+ convergenceThreshold: number;
2094
+ };
2095
+ }
2096
+ declare class DualAgentBench {
2097
+ run(config: DualAgentBenchConfig): Promise<DualAgentReport>;
2098
+ }
2099
+
2100
+ /**
2101
+ * Propose / Verify / Review — the core multi-shot primitive.
2102
+ *
2103
+ * shot N: propose(state, priorReview) → new state
2104
+ * verify(state) → pass/fail, optional layers
2105
+ * review(state, verification, memory) → observations + next-shot
2106
+ * instruction + shouldContinue
2107
+ * memory.append(entry)
2108
+ *
2109
+ * Roles are strictly separated:
2110
+ *
2111
+ * - The WORKER is whatever the caller wraps in `propose`. It is
2112
+ * stateful — caller owns its resume/session mechanism.
2113
+ * - The VERIFIER grades the state. It produces the ground truth.
2114
+ * The reviewer cannot overturn or downgrade a verification layer.
2115
+ * - The REVIEWER is stateless per call. Its continuity is the
2116
+ * `ReviewMemoryStore` — durable JSONL by default, or any store
2117
+ * implementing the interface. It reads memory + trace summary +
2118
+ * verification and directs the NEXT proposer shot.
2119
+ *
2120
+ * This shape is load-bearing. The reviewer never grades; the verifier
2121
+ * never directs. Two processes, two prompts, two concerns — which is
2122
+ * what keeps the loop from confirmation-biasing itself into "all
2123
+ * passed" when it didn't.
2124
+ *
2125
+ * Short-circuits and soft-fails are both first-class:
2126
+ * - verify.pass === true → reviewer LLM call is skipped, memory
2127
+ * records a success entry, loop exits.
2128
+ * - review throws → the shot still counts; the loop uses the
2129
+ * last-known instruction (or `fallbackInstruction`) for the next
2130
+ * propose call. A transient reviewer failure must NEVER abort a
2131
+ * valid arc.
2132
+ *
2133
+ * Composable: `propose` itself can be another `runProposeReview` call.
2134
+ * That's the dogfooding path — a harness built on this primitive is in
2135
+ * turn evaluable by it.
2136
+ */
2137
+
2138
+ interface Verification {
2139
+ pass: boolean;
2140
+ score?: number;
2141
+ failingLayers?: string[];
2142
+ details?: unknown;
2143
+ }
2144
+ interface Review {
2145
+ observations: string;
2146
+ diagnosis: string;
2147
+ nextShotInstruction: string;
2148
+ shouldContinue: boolean;
2149
+ confidence: number;
2150
+ }
2151
+ interface ReviewMemoryEntry extends Review {
2152
+ shot: number;
2153
+ timestamp: number;
2154
+ verification: {
2155
+ pass: boolean;
2156
+ score?: number;
2157
+ failingLayers?: string[];
2158
+ };
2159
+ }
2160
+ interface ProposeInput<State> {
2161
+ shot: number;
2162
+ goal: string;
2163
+ state: State;
2164
+ priorReview: Review | null;
2165
+ abortSignal: AbortSignal;
2166
+ emitter?: TraceEmitter;
2167
+ }
2168
+ interface ProposeOutput<State, Summary = unknown> {
2169
+ state: State;
2170
+ traceSummary?: Summary;
2171
+ }
2172
+ interface ReviewInput<State, Summary = unknown> {
2173
+ shot: number;
2174
+ goal: string;
2175
+ state: State;
2176
+ verification: Verification;
2177
+ traceSummary: Summary | undefined;
2178
+ memory: ReviewMemoryEntry[];
2179
+ }
2180
+ type ProposeFn<State, Summary = unknown> = (input: ProposeInput<State>) => Promise<ProposeOutput<State, Summary>>;
2181
+ type VerifyFn<State> = (state: State) => Promise<Verification>;
2182
+ type ReviewFn<State, Summary = unknown> = (input: ReviewInput<State, Summary>) => Promise<Review>;
2183
+ interface ReviewMemoryStore {
2184
+ load(): Promise<ReviewMemoryEntry[]>;
2185
+ append(entry: ReviewMemoryEntry): Promise<void>;
2186
+ }
2187
+ interface ProposeReviewConfig<State, Summary = unknown> {
2188
+ goal: string;
2189
+ initialState: State;
2190
+ propose: ProposeFn<State, Summary>;
2191
+ verify: VerifyFn<State>;
2192
+ review: ReviewFn<State, Summary>;
2193
+ /** Hard shot cap. Default 10. */
2194
+ maxShots?: number;
2195
+ /** Wall-clock cap in ms. Default 10 min. */
2196
+ maxWallMs?: number;
2197
+ /**
2198
+ * If the reviewer returns confidence ≤ floor on `confidenceFloorWindow`
2199
+ * consecutive shots, terminate early. Default floor 0.3, window 2.
2200
+ * Set window to 0 or floor to <0 to disable.
2201
+ */
2202
+ confidenceFloor?: number;
2203
+ confidenceFloorWindow?: number;
2204
+ /** Defaults to an in-memory store if omitted. */
2205
+ memory?: ReviewMemoryStore;
2206
+ /** If provided, emit a Run + per-shot spans. */
2207
+ store?: TraceStore;
2208
+ scenarioId?: string;
2209
+ projectId?: string;
2210
+ variantId?: string;
2211
+ /**
2212
+ * Used when the reviewer soft-fails on shot 1 (no prior instruction to
2213
+ * fall back to). Default is a generic "inspect failures and fix".
2214
+ */
2215
+ fallbackInstruction?: string;
2216
+ }
2217
+ interface ProposeReviewShot<State, Summary = unknown> {
2218
+ shot: number;
2219
+ state: State;
2220
+ verification: Verification;
2221
+ traceSummary: Summary | undefined;
2222
+ review: Review;
2223
+ reviewAvailable: boolean;
2224
+ reviewError?: string;
2225
+ durationMs: number;
2226
+ }
2227
+ interface ProposeReviewReport<State, Summary = unknown> {
2228
+ runId: string | null;
2229
+ completed: boolean;
2230
+ shots: ProposeReviewShot<State, Summary>[];
2231
+ finalState: State;
2232
+ finalVerification: Verification;
2233
+ failureClass?: FailureClass;
2234
+ wallMs: number;
2235
+ score: number;
2236
+ }
2237
+ declare function inMemoryReviewStore(initial?: ReviewMemoryEntry[]): ReviewMemoryStore;
2238
+ declare function jsonlReviewStore(path: string): ReviewMemoryStore;
2239
+ declare function runProposeReview<State, Summary = unknown>(config: ProposeReviewConfig<State, Summary>): Promise<ProposeReviewReport<State, Summary>>;
2240
+ interface LlmJsonCall {
2241
+ (req: {
2242
+ system: string;
2243
+ user: string;
2244
+ }): Promise<unknown>;
2245
+ }
2246
+ interface LlmReviewerConfig<State, Summary = unknown> {
2247
+ callJson: LlmJsonCall;
2248
+ renderState?: (state: State) => string;
2249
+ renderTraceSummary?: (summary: Summary | undefined) => string;
2250
+ /** Appended to the default system prompt. */
2251
+ systemPromptAddendum?: string;
2252
+ }
2253
+ declare function createLlmReviewer<State, Summary = unknown>(cfg: LlmReviewerConfig<State, Summary>): ReviewFn<State, Summary>;
2254
+
1692
2255
  /**
1693
2256
  * TestGradedScenario — a scenario whose score comes from a test suite.
1694
2257
  *
@@ -2280,46 +2843,6 @@ interface CostSummary {
2280
2843
  costPerCompletedTaskUsd: number | null;
2281
2844
  }
2282
2845
 
2283
- /**
2284
- * Pareto frontier — multi-objective optimization over candidate runs.
2285
- *
2286
- * Lifted from ADC pareto.ts and blueprint-agent frontier.ts. When you're
2287
- * trading off (cost, latency, quality) or (passRate, tokenBudget,
2288
- * ttfb), you rarely have a single "winner" — you have a set of
2289
- * non-dominated candidates. This module exposes:
2290
- *
2291
- * - `paretoFrontier`: filter a set of candidates to the non-dominated ones
2292
- * - `dominates`: does A dominate B across all objectives?
2293
- *
2294
- * Each objective is declared with a direction: 'maximize' (higher=better)
2295
- * or 'minimize' (lower=better). Candidates are any object; pass an
2296
- * `objective(candidate)` accessor.
2297
- */
2298
- type Direction = 'maximize' | 'minimize';
2299
- interface Objective<T> {
2300
- /** Stable label used in reports. */
2301
- name: string;
2302
- direction: Direction;
2303
- value: (candidate: T) => number;
2304
- }
2305
- interface ParetoResult<T> {
2306
- frontier: T[];
2307
- dominated: T[];
2308
- /** Index map: frontier[i] dominates each of dominatedBy[i]. */
2309
- dominanceMap: Array<{
2310
- dominator: T;
2311
- dominated: T[];
2312
- }>;
2313
- }
2314
- /** Does candidate A weakly dominate B — strictly better on at least one objective and no worse on any? */
2315
- declare function dominates<T>(a: T, b: T, objectives: Objective<T>[]): boolean;
2316
- /**
2317
- * Compute the non-dominated frontier. Candidates with NaN/Infinity on any
2318
- * objective are excluded (can't rank them). A candidate enters the frontier
2319
- * iff no other candidate dominates it.
2320
- */
2321
- declare function paretoFrontier<T>(candidates: T[], objectives: Objective<T>[]): ParetoResult<T>;
2322
-
2323
2846
  /**
2324
2847
  * Series convergence — detects whether a sequence of scalar measurements
2325
2848
  * is stabilizing, drifting, or noisy.
@@ -3102,10 +3625,25 @@ declare function resumeBuilderSession(store: TraceStore, projectId: string): Pro
3102
3625
  * is the highest-leverage signal the framework computes — if
3103
3626
  * meta_score doesn't predict runtime_score, the builder's self-scoring
3104
3627
  * is broken.
3628
+ *
3629
+ * Scaffold-only mode: when a project has no `app-runtime` runs (e.g. a
3630
+ * scaffold-builder eval that grades compose + build without driving a
3631
+ * runtime scenario), `kind` is `'scaffold-only'` and `complete` measures
3632
+ * meta + build only. Consumers can tell the two apart without having to
3633
+ * interpret null-runtime as either "not yet computed" or "N/A for this
3634
+ * project shape".
3105
3635
  */
3106
3636
 
3637
+ type ProjectKind = 'full' | 'scaffold-only';
3107
3638
  interface ThreeLayerProjectReport {
3108
3639
  projectId: string;
3640
+ /**
3641
+ * `'full'` when the project has at least one `app-runtime` run;
3642
+ * `'scaffold-only'` when it only has meta + build layers. Lets
3643
+ * downstream consumers treat a null runtime score as expected
3644
+ * (scaffold-only) vs. missing (full, pipeline broke).
3645
+ */
3646
+ kind: ProjectKind;
3109
3647
  builderRunId?: string;
3110
3648
  /** Judge-verdict score on the builder run (0..1 after normalization). */
3111
3649
  metaScore: number | null;
@@ -3113,10 +3651,14 @@ interface ThreeLayerProjectReport {
3113
3651
  /** 0..1 from the sandbox harness (testsPassed / testsTotal). */
3114
3652
  buildScore: number | null;
3115
3653
  appRuntimeRunIds: string[];
3116
- /** Mean of outcome.score over app-runtime runs, 0..1. */
3654
+ /** Mean of outcome.score over app-runtime runs, 0..1. Always null in scaffold-only mode. */
3117
3655
  runtimeScore: number | null;
3118
3656
  runtimePassRate: number | null;
3119
- /** True when all three layers produced a score. */
3657
+ /**
3658
+ * Layer-aware completeness:
3659
+ * - `kind='full'`: all three layers scored
3660
+ * - `kind='scaffold-only'`: meta + build scored (runtime not applicable)
3661
+ */
3120
3662
  complete: boolean;
3121
3663
  }
3122
3664
  declare function scoreProject(store: TraceStore, projectId: string): Promise<ThreeLayerProjectReport>;
@@ -4132,4 +4674,4 @@ interface UseCaseSignals {
4132
4674
  declare function classifyEuAiRisk(signals: UseCaseSignals): EuRiskClass;
4133
4675
  declare function euAiActReport(ctx: GovernanceContext, signals: UseCaseSignals): Promise<GovernanceReport>;
4134
4676
 
4135
- export { type ActiveLearningOptions, AgentDriver, type AgentDriverConfig, type AlignmentOp, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type Artifact, type ArtifactCheck, type Artifact$1 as ArtifactCheckArtifact, type ArtifactResult, type ArtifactValidator, type BaselineOptions, type BaselineReport, BehaviorAssertion, type BenchmarkReport, BenchmarkRunner, type BenchmarkRunnerConfig, type BestOfNResult, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, type BudgetBreachFinding, type BudgetBreachReport, BudgetGuard, type BudgetLedgerEntry, type BudgetSpec, BuilderSession, type BuilderSessionInit, type CalibrationBin, type CalibrationOptions, type CalibrationReport, type CalibrationResult, CallExpectation, type CanaryLeak, type CandidateScenario, type CandidateScore, type CausalAttributionReport, type ChatSummary, type CheckResult, type CollectedArtifacts, type CompletionCriterion, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrelationReport, type CorrelationResult, type CorrelationStudyOptions, type CorrelationStudyResult, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_RULES as DEFAULT_FAILURE_RULES, DEFAULT_MUTATORS, DEFAULT_REDACTION_RULES, DEFAULT_RED_TEAM_CORPUS, Dataset, type DatasetDifficulty, type DatasetManifest, type DatasetProvenance, type DatasetScenario, type DatasetSplit, type DeploymentOutcome, type Direction, type DivergenceOptions, type DivergenceReport, DockerSandboxDriver, type DriverResult, type DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, type EuRiskClass, type EvalMetricSpec, type EvalResult, type EventFilter, type EventKind, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run$1 as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, FAILURE_CLASSES, type FactorContribution, type FactorialCell, type FailureClass, type FailureClassification, type FailureCluster, type FailureClusterReport, type FailureContext, type FailureRule, type FeedbackPattern, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, FileSystemTraceStore, type FileSystemTraceStoreOptions, type GenericSpan, type GoldenItem, type GovernanceContext, type GovernanceFinding, type GovernanceReport, type GradedStep, type HarnessConfig, HoldoutAuditor, HoldoutLockedError, type HypothesisManifest, type HypothesisResult, type ImageData, InMemoryExperimentStore, InMemoryOutcomeStore, InMemoryTraceStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type InteractionContribution, type JudgeAgreementReport, type JudgeConfig, type JudgeFn, type JudgeInput, type JudgePair, type JudgeReplayResult, type JudgeRubric, type JudgeScore, type JudgeSpan, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, type LayerCorrelation, type LlmSpan, MODEL_PRICING, type MatcherResult, type Message, type MetricSamples, type MetricVerdict, MetricsCollector, type Mutator, OTEL_AGENT_EVAL_SCOPE, type Objective, type OptimizationConfig, type OptimizationResult, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OtlpExport, type OtlpResourceSpans, type OtlpSpan, type OutcomeFilter, type OutcomePair, type OutcomeStore, type PairwiseComparison, type ParetoResult, type PersonaConfig, type PositionalBiasResult, type PrmGradedTrace, PrmGrader, type PrmTrainingSample, ProductClient, type ProductClientConfig, ProjectRegistry, type ProjectSummary, type ProjectTimelineEntry, type PromptHandle, PromptOptimizer, PromptRegistry, type PromptVariant, REDACTION_VERSION, type RedTeamCase, type RedTeamCategory, type RedTeamFinding, type RedTeamPayload, type RedTeamReport, type RedactionReport, type RedactionRule, type RegressionOptions, type RegressionSpec, type RetrievalSpan, type RobustnessResult, type RouteMap, type RubricDimension, type Run, type RunAppScenarioOptions, type RunConfig, type RunDiff, type RunFilter, type RunLayer, type RunOutcome, type RunStatus, type SandboxDriver, SandboxHarness, type SandboxHarnessResult, type SandboxResult, type SandboxSpan, type Scenario, type ScenarioCost, type ScenarioFile, ScenarioRegistry, type ScenarioResult, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SelfPreferenceResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, type ShipOptions, type SignedManifest, type SliceOptions, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type Span, type SpanBase, type SpanFilter, type SpanHandle, type SpanKind, type SpanStatus, type StepAttribution, type StepContext, type StepRubric, type StuckLoopFinding, type StuckLoopOptions, type StuckLoopReport, SubprocessSandboxDriver, type SynthesisReason, type SynthesisTarget, TRACE_SCHEMA_VERSION, type TestGradedRunOptions, type TestGradedRunResult, type TestGradedScenario, type TestOutputParser, type TestResult, type ThreeLayerProjectReport, type ThresholdContract, TokenCounter, type TokenSpec, type ToolSpan, type ToolStats, type ToolUseMetrics, type ToolUseOptions, type ToolWasteFinding, type ToolWasteOptions, type ToolWasteReport, TraceEmitter, type TraceEmitterOptions, type TraceEvent, type TraceStore, type Trajectory, type TrajectoryStep, type Turn, type TurnMetrics, type TurnResult, type UseCaseSignals, type ValidationContext, type ValidationIssue, type ValidationResult, type VariantScore, type VerbosityBiasResult, type VisualDiffOptions, type VisualDiffResult, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, adversarialJudge, aggregateLlm, analyzeAntiSlop, analyzeSeries, argHash, attributeCounterfactuals, benjaminiHochberg, bisect, bonferroni, budgetBreachView, buildTrajectory, byteLengthRange, calibrateJudge, calibrationCurve, canaryLeakView, causalAttribution, checkCanaries, checkSlos, classifyEuAiRisk, classifyFailure, codeExecutionJudge, cohensD, coherenceJudge, collectionPreserved, commitBisect, compareToBaseline, composeParsers, composeValidators, computeToolUseMetrics, confidenceInterval, containsAll, correlateLayers, correlationStudy, createAntiSlopJudge, createCustomJudge, createDomainExpertJudge, crossTraceDiff, defaultJudges, dominates, estimateCost, estimateTokens, euAiActReport, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, exportRunAsOtlp, exportTrainingData, failureClusterView, fileContains, fileExists, firstDivergenceView, formatBenchmarkReport, formatDriverReport, groupBy, hashContent, hashScenarios, interRaterReliability, iqr, isJudgeSpan, isLlmSpan, isPrmVerdict, isRetrievalSpan, isSandboxSpan, isToolSpan, jestTestParser, jsonHasKeys, jsonShape, judgeAgreementView, judgeSpans, keyPreserved, llmSpanFromProvider, llmSpans, loadScorerFromGrader, lowercaseMutator, mannWhitneyU, nistAiRmfReport, nonRefusalRubric, normalizeScores, notBlocked, outputLengthRubric, pairedTTest, paraphraseRobustness, paretoFrontier, partialCredit, pixelDeltaRatio, politenessPrefixMutator, positionalBias, printDriverSummary, prmBestOfN, prmEnsembleBestOfN, promptBisect, proposeSynthesisTargets, pytestTestParser, redTeamDataset, redTeamReport, redactString, redactValue, regexMatch, regexMatches, regressionView, renderMarkdown, renderMarkdownReport, replayScorerOverCorpus, replayTraceThroughJudge, requiredSampleSize, resumeBuilderSession, rowCount, rowWhere, runAssertions, runCounterfactual, runE2EWorkflow, runExpectations, runFailureClass, runSelfPlay, runTestGradedScenario, runsForScenario, scoreAllProjects, scoreContinuity, scoreProject, scoreRedTeamOutput, selfPreference, sentenceReorderMutator, signManifest, soc2Report, statusAdvanced, stuckLoopView, summarize, textInSnapshot, toLangfuseEnvelope, toNdjson, toPrometheusText, toolIntentAlignmentRubric, toolNamesForRun, toolNonRedundantRubric, toolSpans, toolSuccessRubric, toolWasteView, typoMutator, urlContains, verbosityBias, verifyManifest, visualDiff, vitestTestParser, weightedMean, welchsTTest, whitespaceCollapseMutator, wilcoxonSignedRank };
4677
+ export { type ActiveLearningOptions, AgentDriver, type AgentDriverConfig, type AlignmentOp, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type Artifact, type ArtifactCheck, type Artifact$1 as ArtifactCheckArtifact, type ArtifactResult, type ArtifactValidator, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BaselineOptions, type BaselineReport, BehaviorAssertion, type BenchmarkReport, BenchmarkRunner, type BenchmarkRunnerConfig, type BestOfNResult, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, type BudgetBreachFinding, type BudgetBreachReport, BudgetGuard, type BudgetLedgerEntry, type BudgetSpec, BuilderSession, type BuilderSessionInit, type CalibrationBin, type CalibrationOptions, type CalibrationReport, type CalibrationResult, CallExpectation, type CanaryLeak, type CandidateScenario, type CandidateScore, type CausalAttributionReport, type ChatSummary, type CheckResult, type CollectedArtifacts, type CompletionCriterion, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrelationReport, type CorrelationResult, type CorrelationStudyOptions, type CorrelationStudyResult, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_RULES as DEFAULT_FAILURE_RULES, DEFAULT_HARNESS_OBJECTIVES, DEFAULT_MUTATORS, DEFAULT_REDACTION_RULES, DEFAULT_RED_TEAM_CORPUS, DEFAULT_RUN_SCORE_WEIGHTS, Dataset, type DatasetDifficulty, type DatasetManifest, type DatasetProvenance, type DatasetScenario, type DatasetSplit, type DeploymentOutcome, type Direction, type DivergenceOptions, type DivergenceReport, DockerSandboxDriver, type DriverResult, type DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, type EuRiskClass, type EvalMetricSpec, type EvalResult, type EventFilter, type EventKind, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run$1 as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, FAILURE_CLASSES, type FactorContribution, type FactorialCell, type FailureClass, type FailureClassification, type FailureCluster, type FailureClusterReport, type FailureContext, type FailureRule, type FeedbackPattern, FileSystemOutcomeStore, type FileSystemOutcomeStoreOptions, FileSystemTraceStore, type FileSystemTraceStoreOptions, type GenericSpan, type GoldenItem, type GovernanceContext, type GovernanceFinding, type GovernanceReport, type GradedStep, type HarnessAdapter, type HarnessConfig, type HarnessExperimentConfig, type HarnessExperimentResult, type HarnessIntervention, type HarnessRunRequest, type HarnessRunResult, type HarnessScenario, type HarnessSelection, type HarnessVariant, type HarnessVariantReport, HoldoutAuditor, HoldoutLockedError, type HostedJudgeConfig, type HostedJudgeDimension, type HostedJudgeRequest, type HostedJudgeResponse, type HostedRunCriticConfig, type HostedRunScoreRequest, type HostedRunScoreResponse, type HypothesisManifest, type HypothesisResult, type ImageData, InMemoryExperimentStore, InMemoryOutcomeStore, InMemoryTraceStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type InteractionContribution, type JudgeAgreementReport, type JudgeConfig, type JudgeFleetOptions, type JudgeFn, type JudgeInput, type JudgePair, type JudgeReplayResult, type JudgeRubric, JudgeRunner, type JudgeScore, type JudgeSpan, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, type LayerCorrelation, type LlmJsonCall, type LlmReviewerConfig, type LlmSpan, MODEL_PRICING, type MatcherResult, type MeasurementPolicy, type Message, type MetricSamples, type MetricVerdict, MetricsCollector, type Mutator, OTEL_AGENT_EVAL_SCOPE, type Objective, type OptimizationConfig, type OptimizationExample, OptimizationLoop, type OptimizationLoopConfig, type OptimizationLoopResult, type OptimizationResult, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OtlpExport, type OtlpResourceSpans, type OtlpSpan, type OutcomeFilter, type OutcomePair, type OutcomeStore, type PairwiseComparison, PairwiseSteeringOptimizer, type ParetoResult, type PersonaConfig, type Playbook, type PlaybookEntry, type PositionalBiasResult, type PrmGradedTrace, PrmGrader, type PrmTrainingSample, ProductClient, type ProductClientConfig, type ProjectKind, ProjectRegistry, type ProjectSummary, type ProjectTimelineEntry, type PromptHandle, PromptOptimizer, PromptRegistry, type PromptVariant, type ProposeFn, type ProposeInput, type ProposeOutput, type ProposeReviewConfig, type ProposeReviewReport, type ProposeReviewShot, REDACTION_VERSION, type RedTeamCase, type RedTeamCategory, type RedTeamFinding, type RedTeamPayload, type RedTeamReport, type RedactionReport, type RedactionRule, type RegressionOptions, type RegressionSpec, type RetrievalSpan, type Review, type ReviewFn, type ReviewInput, type ReviewMemoryEntry, type ReviewMemoryStore, type RobustnessResult, type RouteMap, type RubricDimension, type Run, type RunAppScenarioOptions, type RunConfig, RunCritic, type RunCriticOptions, type RunDiff, type RunFilter, type RunLayer, type RunOutcome, type RunScore, type RunScoreWeights, type RunStatus, type RunTrace, type SandboxDriver, SandboxHarness, type SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxResult, type SandboxSpan, type Scenario, type ScenarioCost, type ScenarioFile, ScenarioRegistry, type ScenarioResult, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SelfPreferenceResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, type ShipOptions, type SignedManifest, type SliceOptions, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type Span, type SpanBase, type SpanFilter, type SpanHandle, type SpanKind, type SpanStatus, type SteeringBundle, type SteeringDelta, type SteeringEvaluation, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type SteeringRolePrompt, type SteeringVariantReport, type StepAttribution, type StepContext, type StepRubric, type StuckLoopFinding, type StuckLoopOptions, type StuckLoopReport, SubprocessSandboxDriver, type SubprocessSandboxDriverOptions, type SynthesisReason, type SynthesisTarget, TRACE_SCHEMA_VERSION, type TestGradedRunOptions, type TestGradedRunResult, type TestGradedScenario, type TestOutputParser, type TestResult, type ThreeLayerProjectReport, type ThresholdContract, TokenCounter, type TokenSpec, type ToolSpan, type ToolStats, type ToolUseMetrics, type ToolUseOptions, type ToolWasteFinding, type ToolWasteOptions, type ToolWasteReport, TraceEmitter, type TraceEmitterOptions, type TraceEvent, type TraceStore, type Trajectory, type TrajectoryStep, type Turn, type TurnMetrics, type TurnResult, type UseCaseSignals, type ValidationContext, type ValidationIssue, type ValidationResult, type VariantScore, type VerbosityBiasResult, type Verification, type VerifyFn, type VisualDiffOptions, type VisualDiffResult, type WorkflowTopology, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, adversarialJudge, aggregateLlm, aggregateRunScore, analyzeAntiSlop, analyzeSeries, argHash, attributeCounterfactuals, benjaminiHochberg, bisect, bonferroni, budgetBreachView, buildTrajectory, byteLengthRange, calibrateJudge, calibrationCurve, canaryLeakView, causalAttribution, checkCanaries, checkSlos, clamp01, classifyEuAiRisk, classifyFailure, codeExecutionJudge, cohensD, coherenceJudge, collectionPreserved, commitBisect, compareToBaseline, compilerJudge, composeParsers, composeValidators, computeToolUseMetrics, confidenceInterval, containsAll, correlateLayers, correlationStudy, createAntiSlopJudge, createCustomJudge, createDomainExpertJudge, createLlmReviewer, crossTraceDiff, defaultJudges, distillPlaybook, dominates, estimateCost, estimateTokens, euAiActReport, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, exportRunAsOtlp, exportTrainingData, failureClusterView, fileContains, fileExists, firstDivergenceView, formatBenchmarkReport, formatDriverReport, groupBy, hashContent, hashScenarios, inMemoryReviewStore, interRaterReliability, iqr, isJudgeSpan, isLlmSpan, isPrmVerdict, isRetrievalSpan, isSandboxSpan, isToolSpan, jestTestParser, jsonHasKeys, jsonShape, jsonlReviewStore, judgeAgreementView, judgeSpans, keyPreserved, linterJudge, llmSpanFromProvider, llmSpans, loadScorerFromGrader, lowercaseMutator, mannWhitneyU, mergeSteeringBundle, nistAiRmfReport, nonRefusalRubric, normalizeScores, notBlocked, outputLengthRubric, pairedTTest, paraphraseRobustness, paretoFrontier, partialCredit, pixelDeltaRatio, politenessPrefixMutator, positionalBias, printDriverSummary, prmBestOfN, prmEnsembleBestOfN, promptBisect, proposeSynthesisTargets, pytestTestParser, redTeamDataset, redTeamReport, redactString, redactValue, regexMatch, regexMatches, regressionView, renderMarkdown, renderMarkdownReport, renderPlaybookMarkdown, renderSteeringText, replayScorerOverCorpus, replayTraceThroughJudge, requiredSampleSize, resumeBuilderSession, rowCount, rowWhere, runAssertions, runCounterfactual, runE2EWorkflow, runExpectations, runFailureClass, runHarnessExperiment, runJudgeFleet, runProposeReview, runSelfPlay, runTestGradedScenario, runsForScenario, scoreAllProjects, scoreContinuity, scoreProject, scoreRedTeamOutput, securityJudge, selectHarnessVariant, selfPreference, sentenceReorderMutator, signManifest, soc2Report, statusAdvanced, stuckLoopView, summarize, summarizeHarnessResults, testJudge, textInSnapshot, toLangfuseEnvelope, toNdjson, toPrometheusText, toolIntentAlignmentRubric, toolNamesForRun, toolNonRedundantRubric, toolSpans, toolSuccessRubric, toolWasteView, typoMutator, urlContains, verbosityBias, verifyManifest, visualDiff, vitestTestParser, weightedMean, welchsTTest, whitespaceCollapseMutator, wilcoxonSignedRank };