@tangle-network/agent-eval 0.104.0 → 0.105.0
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 +248 -2
- package/dist/index.js +224 -0
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export { A as ArtifactCheckArtifact, d as ArtifactEventLike, e as ArtifactValida
|
|
|
23
23
|
export { DataAcquisitionPlan, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFallbackPolicy, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRecommendedAction, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeResponsibleSurface, KnowledgeSensitivity, ScoreKnowledgeReadinessOptions, UserQuestion, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, knowledgeReadinessTracePayload, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from './knowledge/index.js';
|
|
24
24
|
import { h as ReleaseConfidenceThresholds, f as ReleaseConfidenceScorecard } from './release-report-DeJpsBiA.js';
|
|
25
25
|
export { A as ActionableSideInfo, o as AsiSeverity, B as BootstrapOptions, a as BootstrapResult, J as JudgeReplayGateArgs, R as ReleaseConfidenceAxis, b as ReleaseConfidenceAxisName, c as ReleaseConfidenceInput, d as ReleaseConfidenceIssue, e as ReleaseConfidenceMetrics, g as ReleaseConfidenceStatus, i as ReleaseTraceEvidence, j as RenderReleaseReportOptions, V as Verdict, k as assertReleaseConfidence, l as bootstrapCi, m as evaluateReleaseConfidence, n as judgeReplayGate, r as renderReleaseReport } from './release-report-DeJpsBiA.js';
|
|
26
|
-
|
|
26
|
+
import { P as PairedBootstrapOptions, M as McNemarResult, R as RiskDifferenceResult, a as PairedBootstrapResult } from './statistics-D88peojY.js';
|
|
27
|
+
export { c as CliffsMagnitude, d as CorpusAgreementOptions, e as CorpusAgreementPerDimension, C as CorpusAgreementReport, f as CorpusScoreRecord, g as EProcess, h as EProcessOptions, E as EProcessState, i as EProcessStep, j as ProportionInterval, W as WeightedCompositeInput, k as WeightedCompositeResult, b as benjaminiHochberg, l as bonferroni, m as cliffsDelta, n as cohensD, o as confidenceInterval, q as corpusInterRaterAgreement, r as corpusInterRaterAgreementFromJudgeScores, s as eProcess, t as interRaterReliability, u as interpretCliffs, v as mannWhitneyU, x as mcnemar, y as mcnemarPower, z as mcnemarRequiredN, A as mulberry32, B as normalizeScores, p as pairedBootstrap, D as pairedMde, F as pairedRiskDifference, G as pairedTTest, H as partialCredit, I as passAtK, J as pearsonR, K as ranks, L as requiredSampleSize, N as spearmanR, O as weightedComposite, Q as weightedMean, w as wilcoxonSignedRank, S as wilson } from './statistics-D88peojY.js';
|
|
27
28
|
import { OtelExporter, OtelExportConfig } from './traces.js';
|
|
28
29
|
export { CaptureFetchContext, CaptureFetchOptions, ExportableSpan, ExtractedUsage, FlattenOtlpOptions, LLM_CACHED_TOKENS, LLM_CACHED_TOKEN_ATTR_KEYS, LLM_COST_ATTR_KEYS, LLM_COST_USD, LLM_INPUT_TOKENS, LLM_INPUT_TOKEN_ATTR_KEYS, LLM_MODEL_ATTR_KEYS, LLM_MODEL_NAME, LLM_OUTPUT_TOKENS, LLM_OUTPUT_TOKEN_ATTR_KEYS, OPENINFERENCE_SPAN_KIND, OTEL_AGENT_EVAL_SCOPE, OtlpExport, OtlpFileTraceStore, OtlpFileTraceStoreOptions, OtlpFlatLine, OtlpResourceSpans, OtlpSpan, OtlpToRunRecordsOptions, OtlpTraceRunRecord, ProjectedOtlpSpan, ReplayCache, ReplayCacheEntry, ReplayCacheMissError, ReplayCacheStats, ReplayFetchOptions, SPAN_KIND_ATTR_KEYS, SpanNotFoundError, TOOL_NAME, TOOL_NAME_ATTR_KEYS, TRACE_ANALYST_ACTOR_DESCRIPTION, TRACE_ANALYST_ACTOR_DESCRIPTION_VERSION, TRACE_ANALYST_SUBAGENT_DESCRIPTION, TraceAggregate, TraceAnalystHookOptions, TraceFileMissingError, TraceInsightContext, TraceInsightFinding, TraceInsightPanelRole, TraceInsightPromptInput, TraceInsightQualityGate, TraceInsightQuestion, TraceInsightReadiness, TraceInsightSuite, TraceInsightTask, TraceNotFoundError, TraceStoreSource, TraceStoreToOtlpOptions, TracesToOtlpResult, asNumber, asString, buildTraceAnalystTools, buildTraceInsightContext, buildTraceInsightPrompt, captureFetchToRawSink, convertTraceStoresToOtlp, createOtelExporter, createOtelTracingStore, createReplayFetch, defaultTraceInsightPanel, describeTraceInsightScope, domainEvidencePattern, exportRunAsOtlp, extractOtlpAttributes, extractUsage, extractUsageFromResponse, extractUsageFromSse, firstNumberAttr, firstStringAttr, flattenOtlpExportToNdjson, inferDomainKeywords, inferOtlpKind, iterateRawCalls, otelRunCompleteHook, otlpToRunRecords, otlpToTraceRunRecords, planTraceInsightQuestions, projectOtlpFlatLine, readOtlpStatus, scoreTraceInsightReadiness, stringField, tokenizeDomainWords, traceAnalystFunctionGroup, traceAnalystOnRunComplete, traceSpanKindToOpenInferenceKind } from './traces.js';
|
|
29
30
|
import { a as AnalyzeTracesInput, A as AnalyzeTracesOptions, b as AnalyzeTracesResult } from './analyst-C8HHvfJp.js';
|
|
@@ -217,6 +218,98 @@ declare class BenchmarkRunner {
|
|
|
217
218
|
run(scenarios?: Scenario[]): Promise<BenchmarkReport>;
|
|
218
219
|
}
|
|
219
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Capability-headroom gate — "can this task set even SEE the capability
|
|
223
|
+
* you're about to A/B?"
|
|
224
|
+
*
|
|
225
|
+
* A capability A/B (grant one arm a tool, a skill, extra context — anything)
|
|
226
|
+
* can only detect the capability on tasks the capability-ABSENT baseline
|
|
227
|
+
* FAILS. A task the baseline already passes is saturated: the treatment arm
|
|
228
|
+
* has no headroom to demonstrate anything, and averaging saturated tasks into
|
|
229
|
+
* the comparison dilutes a real effect toward a false null. Calibrate before
|
|
230
|
+
* measuring: run the baseline arm first, classify every task's headroom, and
|
|
231
|
+
* refuse to run the comparison when no task has a gap.
|
|
232
|
+
*
|
|
233
|
+
* Fail-closed on unknown outcomes: a baseline run whose outcome could not be
|
|
234
|
+
* determined (infra loss, unverified, missing) NEVER counts as a failure —
|
|
235
|
+
* treating "couldn't tell" as "failed" would manufacture headroom out of
|
|
236
|
+
* telemetry gaps and launder infra noise into a treatment effect.
|
|
237
|
+
*
|
|
238
|
+
* Domain-free by construction: the capability under test never appears here.
|
|
239
|
+
* Callers decide what the baseline arm lacks; this module only classifies
|
|
240
|
+
* baseline outcomes per task.
|
|
241
|
+
*/
|
|
242
|
+
/** One baseline-arm (capability-absent) observation of one task. */
|
|
243
|
+
interface HeadroomInput {
|
|
244
|
+
/** Stable task identity; multiple rows per task are multiple baseline reps. */
|
|
245
|
+
taskId: string;
|
|
246
|
+
/** Baseline outcome. 'unknown' = the outcome could not be determined —
|
|
247
|
+
* distinct from 'fail' and never counted as one. */
|
|
248
|
+
baselineOutcome: 'pass' | 'fail' | 'unknown';
|
|
249
|
+
}
|
|
250
|
+
/** Headroom classification for one task.
|
|
251
|
+
* - 'gap': the baseline fails it — the comparison can see the capability here.
|
|
252
|
+
* - 'saturated': the baseline already passes it — no headroom.
|
|
253
|
+
* - 'unknown': every baseline outcome is unknown — fail-closed, not a gap. */
|
|
254
|
+
type HeadroomClass = 'gap' | 'saturated' | 'unknown';
|
|
255
|
+
interface TaskHeadroom {
|
|
256
|
+
taskId: string;
|
|
257
|
+
/** Total baseline observations for this task (known + unknown). */
|
|
258
|
+
n: number;
|
|
259
|
+
/** Observations with a known ('pass' | 'fail') outcome — the evidence the
|
|
260
|
+
* classification actually rests on. A large `n` with a small `nKnown`
|
|
261
|
+
* means the headroom verdict is thin, not well-replicated. */
|
|
262
|
+
nKnown: number;
|
|
263
|
+
/** Pass rate over KNOWN outcomes only; NaN when every outcome is unknown
|
|
264
|
+
* (no data ≠ measured zero). */
|
|
265
|
+
baselinePassRate: number;
|
|
266
|
+
headroom: HeadroomClass;
|
|
267
|
+
}
|
|
268
|
+
interface CapabilityHeadroomOptions {
|
|
269
|
+
/** A task counts as 'gap' when its baseline pass rate is ≤ this. Default 0
|
|
270
|
+
* (the baseline must fail every known rep). Must be in [0, 1) — a
|
|
271
|
+
* threshold of 1 would classify a fully-saturated task as a gap. */
|
|
272
|
+
keepThreshold?: number;
|
|
273
|
+
}
|
|
274
|
+
interface CapabilityHeadroomResult {
|
|
275
|
+
/** Per-task classification, sorted by `taskId`. */
|
|
276
|
+
tasks: TaskHeadroom[];
|
|
277
|
+
summary: {
|
|
278
|
+
tasksWithGap: number;
|
|
279
|
+
tasksSaturated: number;
|
|
280
|
+
tasksUnknown: number;
|
|
281
|
+
/** Total unknown-outcome reps across ALL tasks (including tasks that
|
|
282
|
+
* still classified via their known reps) — the size of the telemetry
|
|
283
|
+
* hole behind the classifications. */
|
|
284
|
+
repsUnknown: number;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Classify every task's baseline headroom from capability-absent baseline
|
|
289
|
+
* outcomes.
|
|
290
|
+
*
|
|
291
|
+
* A task is 'gap' when it has ≥ 1 known outcome and its pass rate over known
|
|
292
|
+
* outcomes is ≤ `keepThreshold`; 'saturated' when the rate exceeds the
|
|
293
|
+
* threshold; 'unknown' when every outcome is unknown. Unknown reps never
|
|
294
|
+
* count toward the rate in either direction (fail-closed — see the module
|
|
295
|
+
* doc), and evidence strength stays visible: each task reports `nKnown`
|
|
296
|
+
* alongside `n`, and the summary totals the unknown reps in `repsUnknown`.
|
|
297
|
+
* Throws on empty input, an out-of-range `keepThreshold`, or an
|
|
298
|
+
* unrecognized outcome value (rows are often projected from untyped records).
|
|
299
|
+
*/
|
|
300
|
+
declare function capabilityHeadroom(rows: readonly HeadroomInput[], opts?: CapabilityHeadroomOptions): CapabilityHeadroomResult;
|
|
301
|
+
interface AssertCapabilityHeadroomOptions {
|
|
302
|
+
/** Minimum tasks classified 'gap' for the comparison to proceed. Default 1. */
|
|
303
|
+
minTasksWithGap?: number;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* The go/no-go guard: throws when fewer than `minTasksWithGap` tasks have
|
|
307
|
+
* baseline headroom — i.e. the benchmark cannot see the capability, so any
|
|
308
|
+
* comparison run on it would measure noise. Call between the baseline
|
|
309
|
+
* calibration run and the treatment run.
|
|
310
|
+
*/
|
|
311
|
+
declare function assertCapabilityHeadroom(result: CapabilityHeadroomResult, opts?: AssertCapabilityHeadroomOptions): void;
|
|
312
|
+
|
|
220
313
|
declare class ProductClient {
|
|
221
314
|
private baseUrl;
|
|
222
315
|
private routes;
|
|
@@ -864,6 +957,159 @@ declare class MetricsCollector {
|
|
|
864
957
|
getConvergenceCurve(): number[];
|
|
865
958
|
}
|
|
866
959
|
|
|
960
|
+
/**
|
|
961
|
+
* Matched-pair arm comparison — "did the treatment arm beat the baseline arm
|
|
962
|
+
* on the SAME work items?"
|
|
963
|
+
*
|
|
964
|
+
* An arm A/B over run records is only trustworthy when it is PAIRED: the same
|
|
965
|
+
* task/scenario/seed evaluated under both arms, compared item-by-item, so
|
|
966
|
+
* inter-item difficulty variance cancels instead of masquerading as an arm
|
|
967
|
+
* effect. This module owns the two error-prone steps every consumer otherwise
|
|
968
|
+
* hand-rolls:
|
|
969
|
+
*
|
|
970
|
+
* 1. Pairing — matching rows across arms by `pairKey` (and by `repKey`
|
|
971
|
+
* within multi-rep items), with leftovers REPORTED rather than silently
|
|
972
|
+
* dropped (a silently unbalanced pairing biases every paired statistic
|
|
973
|
+
* downstream). Pairing never keys on outcome content: matching reps by
|
|
974
|
+
* their outcomes deflates discordant-pair counts and makes McNemar
|
|
975
|
+
* anti-conservative, so reps pair only by (`pairKey`, `repKey`) identity.
|
|
976
|
+
* 2. Composition — feeding the matched pairs to the correct paired
|
|
977
|
+
* estimators that already live in `statistics`: `mcnemar` +
|
|
978
|
+
* `pairedRiskDifference` for pass/fail, `pairedBootstrap` +
|
|
979
|
+
* `wilcoxonSignedRank` for continuous metrics. No statistic is
|
|
980
|
+
* re-implemented here.
|
|
981
|
+
*
|
|
982
|
+
* The row shape is deliberately structural — callers project a `RunRecord`
|
|
983
|
+
* (or any record) into `{ pairKey, arm, pass?, metrics? }`. Arm names are
|
|
984
|
+
* caller-supplied parameters; the module ships no domain literal.
|
|
985
|
+
*/
|
|
986
|
+
|
|
987
|
+
/** One arm observation of one work item. Structural on purpose: callers
|
|
988
|
+
* project their own record type (e.g. a `RunRecord`) into this shape. */
|
|
989
|
+
interface PairedArmRow {
|
|
990
|
+
/** Matching key — rows sharing a `pairKey` across both arms form pairs
|
|
991
|
+
* (typically the task/scenario/seed identity). */
|
|
992
|
+
pairKey: string;
|
|
993
|
+
/** Rep identity within a `pairKey` (e.g. a seed or rep number). Required on
|
|
994
|
+
* every row of a `pairKey` that has more than one rep in either arm; reps
|
|
995
|
+
* then pair only on exact (`pairKey`, `repKey`) match, never on outcome
|
|
996
|
+
* content. Optional when each arm has at most one rep of the item. */
|
|
997
|
+
repKey?: string;
|
|
998
|
+
/** Arm label this row was produced under. */
|
|
999
|
+
arm: string;
|
|
1000
|
+
/** Binary outcome; omit when the comparison has no pass/fail notion. */
|
|
1001
|
+
pass?: boolean;
|
|
1002
|
+
/** Named numeric measurements (score, cost, latency, …). */
|
|
1003
|
+
metrics?: Record<string, number>;
|
|
1004
|
+
}
|
|
1005
|
+
interface PairArmsOptions {
|
|
1006
|
+
/** Arm treated as the control side of every pair. */
|
|
1007
|
+
baselineArm: string;
|
|
1008
|
+
/** Arm treated as the treatment side of every pair. */
|
|
1009
|
+
treatmentArm: string;
|
|
1010
|
+
}
|
|
1011
|
+
/** One matched (baseline, treatment) observation of the same work item. */
|
|
1012
|
+
interface MatchedPair {
|
|
1013
|
+
pairKey: string;
|
|
1014
|
+
/** 0-based position of this pair within its `pairKey`, ordered by sorted
|
|
1015
|
+
* `repKey` (always 0 for a single-rep item). The rep identity itself is on
|
|
1016
|
+
* the rows (`baseline.repKey` / `treatment.repKey`). */
|
|
1017
|
+
repIndex: number;
|
|
1018
|
+
baseline: PairedArmRow;
|
|
1019
|
+
treatment: PairedArmRow;
|
|
1020
|
+
}
|
|
1021
|
+
interface PairArmsResult {
|
|
1022
|
+
/** Matched pairs, ordered by (`pairKey`, `repIndex`). */
|
|
1023
|
+
pairs: MatchedPair[];
|
|
1024
|
+
/** Baseline rows left without a treatment counterpart — reported, never
|
|
1025
|
+
* silently dropped. */
|
|
1026
|
+
unpairedBaseline: PairedArmRow[];
|
|
1027
|
+
/** Treatment rows left without a baseline counterpart. */
|
|
1028
|
+
unpairedTreatment: PairedArmRow[];
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Match rows across two arms into (baseline, treatment) pairs by `pairKey`.
|
|
1032
|
+
*
|
|
1033
|
+
* A `pairKey` with at most one row per arm pairs directly, no `repKey`
|
|
1034
|
+
* needed. A `pairKey` with multiple reps in either arm requires `repKey` on
|
|
1035
|
+
* every one of its rows, and reps pair only on exact (`pairKey`, `repKey`)
|
|
1036
|
+
* match — pairing is keyed purely on row identity, never on outcome content
|
|
1037
|
+
* (outcome-keyed matching deflates discordant counts and biases McNemar), and
|
|
1038
|
+
* is therefore independent of input order. Reps whose `repKey` has no
|
|
1039
|
+
* counterpart in the other arm, and items present in only one arm, land in
|
|
1040
|
+
* the unpaired lists — reported, never truncated.
|
|
1041
|
+
*
|
|
1042
|
+
* Fail-loud: throws when either named arm has zero rows (an unknown arm
|
|
1043
|
+
* name would otherwise read as "everything unpaired"), when the two arm
|
|
1044
|
+
* names are equal, when a multi-rep `pairKey` has a row without `repKey`, or
|
|
1045
|
+
* when a (`pairKey`, arm) group repeats a `repKey` (the match would be
|
|
1046
|
+
* ambiguous).
|
|
1047
|
+
*/
|
|
1048
|
+
declare function pairArms(rows: readonly PairedArmRow[], opts: PairArmsOptions): PairArmsResult;
|
|
1049
|
+
/** Paired pass/fail comparison over the pairs where BOTH sides carry `pass`. */
|
|
1050
|
+
interface PairedCorrectness {
|
|
1051
|
+
/** Discordant pairs where the treatment passed and the baseline failed. */
|
|
1052
|
+
b10: number;
|
|
1053
|
+
/** Discordant pairs where the baseline passed and the treatment failed. */
|
|
1054
|
+
b01: number;
|
|
1055
|
+
/** Exact McNemar significance over the paired outcomes (`b === b10`, `c === b01`). */
|
|
1056
|
+
mcnemar: McNemarResult;
|
|
1057
|
+
/** Paired effect size: p(treatment) − p(baseline) with a paired-variance CI. */
|
|
1058
|
+
riskDifference: RiskDifferenceResult;
|
|
1059
|
+
}
|
|
1060
|
+
/** Paired delta summary for one named metric (delta = treatment − baseline). */
|
|
1061
|
+
interface PairedMetricDelta {
|
|
1062
|
+
name: string;
|
|
1063
|
+
/** Pairs where BOTH sides carry a finite value for this metric. */
|
|
1064
|
+
n: number;
|
|
1065
|
+
/** Pairs where at least one side does not carry the metric. */
|
|
1066
|
+
nMissing: number;
|
|
1067
|
+
/** Median paired delta; NaN when `n === 0` (no data ≠ measured zero). */
|
|
1068
|
+
medianDelta: number;
|
|
1069
|
+
/** Mean paired delta; NaN when `n === 0`. */
|
|
1070
|
+
meanDelta: number;
|
|
1071
|
+
/** Bootstrap CI on the paired delta (`pairedBootstrap`); null when
|
|
1072
|
+
* `n === 0` — a zero-width [0, 0] interval on no data would read as a
|
|
1073
|
+
* measured tight null. */
|
|
1074
|
+
bootstrapCi: PairedBootstrapResult | null;
|
|
1075
|
+
/** Wilcoxon signed-rank test on the paired deltas; null when `n === 0`. */
|
|
1076
|
+
wilcoxon: {
|
|
1077
|
+
w: number;
|
|
1078
|
+
p: number;
|
|
1079
|
+
} | null;
|
|
1080
|
+
}
|
|
1081
|
+
interface ComparePairedArmsOptions extends PairArmsOptions {
|
|
1082
|
+
/** Metrics to compare. Default: every metric name observed on any matched
|
|
1083
|
+
* pair, sorted. A name that appears on no pair is still reported (with
|
|
1084
|
+
* `n = 0`) so a misspelled metric is visible instead of vanishing. */
|
|
1085
|
+
metricNames?: string[];
|
|
1086
|
+
/** Passed through to `pairedBootstrap` — set `seed` for reproducible CIs. */
|
|
1087
|
+
bootstrap?: PairedBootstrapOptions;
|
|
1088
|
+
}
|
|
1089
|
+
interface PairedArmsComparison {
|
|
1090
|
+
nPairs: number;
|
|
1091
|
+
nUnpairedBaseline: number;
|
|
1092
|
+
nUnpairedTreatment: number;
|
|
1093
|
+
/** null when no matched pair carries `pass` on both sides — a pass/fail
|
|
1094
|
+
* verdict over rows that never measured pass/fail would be fabricated. */
|
|
1095
|
+
correctness: PairedCorrectness | null;
|
|
1096
|
+
metricDeltas: PairedMetricDelta[];
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Full matched-pair arm comparison: pair via {@link pairArms}, then compose
|
|
1100
|
+
* the paired estimators from `statistics` over the matched pairs.
|
|
1101
|
+
*
|
|
1102
|
+
* Correctness uses only the pairs where both sides carry `pass` (`mcnemar.n`
|
|
1103
|
+
* is that subset's size); each metric uses only the pairs where both sides
|
|
1104
|
+
* carry a finite value for it, with the remainder counted in `nMissing`.
|
|
1105
|
+
* Deltas are treatment − baseline throughout.
|
|
1106
|
+
*
|
|
1107
|
+
* Fail-loud: inherits {@link pairArms}'s unknown-arm throw, and throws on a
|
|
1108
|
+
* non-finite metric value — silently treating corrupt telemetry as "metric
|
|
1109
|
+
* absent" would misreport it as missing coverage.
|
|
1110
|
+
*/
|
|
1111
|
+
declare function comparePairedArms(rows: readonly PairedArmRow[], opts: ComparePairedArmsOptions): PairedArmsComparison;
|
|
1112
|
+
|
|
867
1113
|
type PrReviewSource = 'drew' | 'donovan' | 'shady' | 'codex' | 'claude-code' | 'gpt-5.5-high' | 'claude-opus-4.7-high' | 'kimi' | 'opencode' | (string & {});
|
|
868
1114
|
type PrReviewSeverity = 'critical' | 'high' | 'medium' | 'low' | 'nit';
|
|
869
1115
|
type PrReviewOutcome = 'accepted' | 'fixed' | 'rejected' | 'duplicate' | 'noise' | 'unknown';
|
|
@@ -6087,4 +6333,4 @@ type CachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1> = JudgeCo
|
|
|
6087
6333
|
*/
|
|
6088
6334
|
declare function cachedJudge<TArtifact, TScenario extends Scenario$1 = Scenario$1>(judge: JudgeConfig<TArtifact, TScenario>, store: VerdictCacheStore, options: CachedJudgeOptions): CachedJudge<TArtifact, TScenario>;
|
|
6089
6335
|
|
|
6090
|
-
export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BehavioralMetrics, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, type BlendWeights, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, CODING_HARNESSES, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DetectorEvent, type DetectorSeverity, type DetectorSignal, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type ErrorStreakOptions, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FailureClass, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FieldDestination, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HARNESS_NATIVE_MODEL, HarnessConfig, type HeldOutPartition, type HiddenCriteriaGrader, type HiddenGradeResult, type HiddenLeak, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeScoreInput, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LeaderboardOptions, type LeaderboardRow, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatcherResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type NoLeakOptions, type NoProgressOptions, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type ProfileAxisSpec, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepeatedActionOptions, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, type RoutedField, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type StreamingDetector, type SynthesisReason, type SynthesisTarget, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type ToolMatcher, ToolSpan, TraceAnalystSpan, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TreatmentClass, type TreatmentGate, type TreatmentGateInput, type TreatmentGateOptions, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkerDriverContext, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, agentProfileId, agentProfileModelId, agentVisibleFields, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCrossFamily, assertModelsServed, assertNoHiddenLeak, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, blendHeldout, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildWorkerDriverSystemPrompt, cachedJudge, canaryLeakView, canonicalJson, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, classifyTreatment, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultBlendWeights, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, errorStreakDetector, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expandProfileAxes, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, gateTreatmentApplied, gateTreatmentFromMetrics, gateTreatmentFromSpans, gateTreatmentFromToolSpans, ghCliClient, gitProvenanceReader, precision as goldenPrecision, gradeOnHidden, harnessAxisOf, hashContent, hashToUnit, hiddenGrade, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isHiddenDestination, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, leaderboard, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, noProgressDetector, notBlocked, observeAll, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, repeatedActionDetector, replayScorerOverCorpus, replayTraceThroughJudge, resolveModelPricing, resolveSeat, routeFields, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withHeldoutBlend, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
|
6336
|
+
export { ATTESTATION_ALGORITHM, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgreementResult, type AlignmentOp, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, type AssertCapabilityHeadroomOptions, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AttestationProvenance, type AttestationVerification, type AttestedReport, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BaselineReport, BehaviorAssertion, BehavioralMetrics, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, type BlendWeights, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, type BuildAgreementJudgeOptions, CODING_HARNESSES, type CachedJudge, type CachedJudgeOptions, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateComparison, type CandidateScenario, type CapabilityHeadroomOptions, type CapabilityHeadroomResult, type CausalAttributionReport, type CellVerdict, ChannelRollup, ChatRequest, CheckResult, CollectedArtifacts, type CommandRunner, type CompareLabels, type ComparePairedArmsOptions, CompletionCriterion, ConfigError, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractCheckResult, type ContractJudgeOptions, type ContractMetric, type ContractReport, type ContractRule, type ContractRuleKind, type ContractSpan, type ContractVerdict, type ContractViolation, ConvergenceTracker, CorrectnessChecker, type CostEntry, CostLedger, type CostReport, type CostSummary, CostTracker, CreateChatClientOpts, type CreateDefaultReviewerOptions, type CreateExperimentInput, type CreateSandboxPoolOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, DEFAULT_AGENT_SLOS, DEFAULT_FINDERS, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, DefaultVerdict, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DescriptionLengthCandidate, type DescriptionLengthConfig, type DescriptionLengthDecision, type DescriptionLengthEvidence, DescriptionLengthGate, type DescriptionLengthRejectionCode, type DetectorEvent, type DetectorSeverity, type DetectorSignal, type DiffScorecardOptions, type DirEntry, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type EnsembleAggregate, type EnsembleJudgeOptions, type ErrorCountPattern, type ErrorStreakOptions, type EvalToolDef, EvalTraceStore, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type ExperimentProvenance, type ExperimentRep, type ExperimentStats, type ExperimentStore, ExperimentTracker, type ExperimentTrackerOptions, type ExperimentVerdict, type ExportedRewardModel, type ExtractOptions, type ExtractResult, type FactorContribution, type FactorialCell, FailureClass, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FieldAgreementSpec, type FieldDestination, type FileChange, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldScenario, type GoldSplit, type GoldenSeverity, type GoldenSpec, HARNESS_NATIVE_MODEL, HarnessConfig, type HeadroomClass, type HeadroomInput, type HeldOutPartition, type HiddenCriteriaGrader, type HiddenGradeResult, type HiddenLeak, HoldoutAuditor, type HttpGithubClientOptions, INTENT_MATCH_JUDGE_VERSION, type ImageData, type ImprovementThresholds, type ImprovementVerdictResult, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, JudgeError, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeParseError, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, type JudgeScoreInput, type JudgeVerdict, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LeaderboardOptions, type LeaderboardRow, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, LlmSpan, MODEL_PRICING, type MakeEvalToolsConfig, type MatchResult, type MatchedPair, type MatcherResult, McNemarResult, type MergeOptions, MetricsCollector, type ModelCostRollup, type ModelPreflight, type ModelSeats, ModelsUnreachableError, type MuffledFinder, type MuffledFinding, type MultiToolchainLayerConfig, type Mutator, Mutex, type NoLeakOptions, type NoProgressOptions, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, type PairArmsOptions, type PairArmsResult, type PairedArmRow, type PairedArmsComparison, PairedBootstrapOptions, PairedBootstrapResult, type PairedCorrectness, type PairedMetricDelta, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParseStudentLabel, type PartitionHeldOutOptions, PersonaConfig, type Playbook, type PlaybookEntry, type PoolSlot, type PrReviewAuditCase, type PrReviewBenchmarkSummary, type PrReviewComment, type PrReviewMatchedFinding, type PrReviewOutcome, type PrReviewReferenceFinding, type PrReviewScore, type PrReviewScoreWeights, type PrReviewSeverity, type PrReviewSource, type PreflightModelsOptions, type PreflightOutcome, ProductClient, ProductClientConfig, type ProfileAxisSpec, type PromptHandle, PromptRegistry, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, type ProvenanceReader, type RecordRunsOptions, type ReferenceMatchResult, type ReferenceReplayAdapter, type ReferenceReplayAdapterFn, type ReferenceReplayAdapterLike, type ReferenceReplayAggregate, type ReferenceReplayCandidate, type ReferenceReplayCase, type ReferenceReplayCaseRun, type ReferenceReplayExecutionScenario, type ReferenceReplayItem, type ReferenceReplayMatch, type ReferenceReplayMatchStrategy, type ReferenceReplayMatcher, type ReferenceReplayPromotionDecision, type ReferenceReplayPromotionPolicy, type ReferenceReplayRun, type ReferenceReplayRunContext, type ReferenceReplayRunOptions, type ReferenceReplayRunStore, type ReferenceReplayScenario, type ReferenceReplayScenarioScore, type ReferenceReplayScore, type ReferenceReplayScoreOptions, type ReferenceReplaySplit, type ReferenceReplaySplitComparison, type ReferenceReplaySteeringRowsOptions, type ReflectionContext, type ReflectionProposal, ReleaseConfidenceScorecard, ReleaseConfidenceThresholds, type RenderStudentPrompt, type RepeatedActionOptions, type RepoRef, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, RiskDifferenceResult, type RobustnessResult, type RoutedField, Run, type RunCommandInput, type RunCommandResult, type RunDistillationOptions, type RunDistillationResult, RunFilter, RunRecord, type RunRecordBackend, type RunRecordFilter, RunScore, RunScoreWeights, RunSplitTag, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SeatName, type SeatPresetName, SeatUnsetError, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SerializedRegex, Severity, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, type SpanPredicate, type SplitGoldOptions, SteeringBundle, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type StepAttribution, type StreamingDetector, type SynthesisReason, type SynthesisTarget, type TaskHeadroom, TestResult, type TextMatcher, type ThresholdContract, TokenCounter, type TokenSpec, type ToolMatcher, ToolSpan, TraceAnalystSpan, type TraceContract, TraceContractBuilder, TraceEmitter, TraceStore, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TreatmentClass, type TreatmentGate, type TreatmentGateInput, type TreatmentGateOptions, type TrialTrace, TurnMetrics, UI_FINDING_SEVERITIES, UI_LENSES, UNIVERSAL_FINDERS, type UiFinding, type UiFindingScreenshot, type UiFindingSeverity, type UiLens, type VerdictCacheStats, type VerdictCacheStore, VerifyContext, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkerDriverContext, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, agentProfileId, agentProfileModelId, agentVisibleFields, aggregateJudgeVerdicts, aggregatePrReviewScore, analyzeAntiSlop, appendScorecard, assertCapabilityHeadroom, assertCrossFamily, assertModelsServed, assertNoHiddenLeak, assertSingleBackend, assignHeldOutTag, attachCostToReport, attest, bisect, blendHeldout, buildAgreementJudge, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildWorkerDriverSystemPrompt, cachedJudge, canaryLeakView, canonicalJson, capabilityHeadroom, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, checkTraceContracts, classifyTreatment, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, comparePairedArms, compareReferenceReplay, compilerJudge, computeExperimentStats, contentHash, contractJudge, costReport, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createSandboxPool, crossTraceDiff, dataDescriptionBits, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultBlendWeights, defaultJudges, defaultParseStudentLabel, defaultReferenceReplayMatcher, defaultRenderStudentPrompt, deployGateLayer, diffScorecard, discoverPersonas, distillPlaybook, ensembleJudge, errorStreakDetector, estimateCost, estimateTokens, evaluateContract, evaluateOracles, evaluateTraceContract, executeScenario, expandProfileAxes, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, fieldAgreement, fileContains, fileExists, fileExperimentStore, fileVerdictCache, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, fnv1a32, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, gateTreatmentApplied, gateTreatmentFromMetrics, gateTreatmentFromSpans, gateTreatmentFromToolSpans, ghCliClient, gitProvenanceReader, precision as goldenPrecision, gradeOnHidden, harnessAxisOf, hashContent, hashToUnit, hiddenGrade, htmlContainsElement, httpGithubClient, improvementVerdict, inMemoryExperimentStore, inMemoryReferenceReplayStore, inMemoryRunRecordBackend, inMemoryVerdictCache, isHiddenDestination, isModelPriced, isOtelConfigured, jsonShape, jsonlReferenceReplayStore, jsonlRunRecordBackend, judgeFamily, keyPreserved, leaderboard, linterJudge, loadGoldScenarios, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, makeEvalTools, matchGoldens, matchSpan, mergeLayerResults, modelDescriptionBits, multiToolchainLayer, noProgressDetector, notBlocked, observeAll, pairArms, paraphraseRobustness, paraphraseRobustnessScenarios, parseGoldJsonl, parseReflectionResponse, partitionHeldOut, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, preflightModels, printDriverSummary, index as profile, promptBisect, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatches, renderMarkdownReport, renderPlaybookMarkdown, repeatedActionDetector, replayScorerOverCorpus, replayTraceThroughJudge, resolveModelPricing, resolveSeat, routeFields, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runDistillation, runE2EWorkflow, runExpectations, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runScore, runSelfPlay, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, seatPresets, securityJudge, sentenceReorderMutator, splitGold, statusAdvanced, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toOpenAiTool, toPrometheusText, traceContract, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyAttestation, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withHeldoutBlend, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
package/dist/index.js
CHANGED
|
@@ -1069,6 +1069,77 @@ var BenchmarkRunner = class {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
};
|
|
1071
1071
|
|
|
1072
|
+
// src/capability-headroom.ts
|
|
1073
|
+
function capabilityHeadroom(rows, opts = {}) {
|
|
1074
|
+
const keepThreshold = opts.keepThreshold ?? 0;
|
|
1075
|
+
if (!Number.isFinite(keepThreshold) || keepThreshold < 0 || keepThreshold >= 1) {
|
|
1076
|
+
throw new ValidationError(
|
|
1077
|
+
`capabilityHeadroom: keepThreshold must be in [0, 1), got ${keepThreshold}`
|
|
1078
|
+
);
|
|
1079
|
+
}
|
|
1080
|
+
if (rows.length === 0) {
|
|
1081
|
+
throw new ValidationError(
|
|
1082
|
+
"capabilityHeadroom: no baseline rows supplied \u2014 run the capability-absent baseline arm first"
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
const byTask = /* @__PURE__ */ new Map();
|
|
1086
|
+
for (const row of rows) {
|
|
1087
|
+
if (row.baselineOutcome !== "pass" && row.baselineOutcome !== "fail" && row.baselineOutcome !== "unknown") {
|
|
1088
|
+
throw new ValidationError(
|
|
1089
|
+
`capabilityHeadroom: unrecognized baselineOutcome '${row.baselineOutcome}' for task '${row.taskId}' (expected 'pass' | 'fail' | 'unknown')`
|
|
1090
|
+
);
|
|
1091
|
+
}
|
|
1092
|
+
const agg = byTask.get(row.taskId) ?? { n: 0, passes: 0, known: 0 };
|
|
1093
|
+
agg.n++;
|
|
1094
|
+
if (row.baselineOutcome !== "unknown") {
|
|
1095
|
+
agg.known++;
|
|
1096
|
+
if (row.baselineOutcome === "pass") agg.passes++;
|
|
1097
|
+
}
|
|
1098
|
+
byTask.set(row.taskId, agg);
|
|
1099
|
+
}
|
|
1100
|
+
const tasks = [...byTask.entries()].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([taskId, agg]) => {
|
|
1101
|
+
if (agg.known === 0) {
|
|
1102
|
+
return {
|
|
1103
|
+
taskId,
|
|
1104
|
+
n: agg.n,
|
|
1105
|
+
nKnown: 0,
|
|
1106
|
+
baselinePassRate: Number.NaN,
|
|
1107
|
+
headroom: "unknown"
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
const baselinePassRate = agg.passes / agg.known;
|
|
1111
|
+
return {
|
|
1112
|
+
taskId,
|
|
1113
|
+
n: agg.n,
|
|
1114
|
+
nKnown: agg.known,
|
|
1115
|
+
baselinePassRate,
|
|
1116
|
+
headroom: baselinePassRate <= keepThreshold ? "gap" : "saturated"
|
|
1117
|
+
};
|
|
1118
|
+
});
|
|
1119
|
+
const summary = {
|
|
1120
|
+
tasksWithGap: tasks.filter((t) => t.headroom === "gap").length,
|
|
1121
|
+
tasksSaturated: tasks.filter((t) => t.headroom === "saturated").length,
|
|
1122
|
+
tasksUnknown: tasks.filter((t) => t.headroom === "unknown").length,
|
|
1123
|
+
repsUnknown: tasks.reduce((sum3, t) => sum3 + (t.n - t.nKnown), 0)
|
|
1124
|
+
};
|
|
1125
|
+
return { tasks, summary };
|
|
1126
|
+
}
|
|
1127
|
+
function assertCapabilityHeadroom(result, opts = {}) {
|
|
1128
|
+
const minTasksWithGap = opts.minTasksWithGap ?? 1;
|
|
1129
|
+
if (!Number.isInteger(minTasksWithGap) || minTasksWithGap < 1) {
|
|
1130
|
+
throw new ValidationError(
|
|
1131
|
+
`assertCapabilityHeadroom: minTasksWithGap must be an integer \u2265 1, got ${minTasksWithGap}`
|
|
1132
|
+
);
|
|
1133
|
+
}
|
|
1134
|
+
const { tasksWithGap, tasksSaturated, tasksUnknown } = result.summary;
|
|
1135
|
+
if (tasksWithGap < minTasksWithGap) {
|
|
1136
|
+
const total = result.tasks.length;
|
|
1137
|
+
throw new ValidationError(
|
|
1138
|
+
`assertCapabilityHeadroom: only ${tasksWithGap} of ${total} task(s) have baseline headroom (need \u2265 ${minTasksWithGap}). ${tasksSaturated} saturated (baseline already passes), ${tasksUnknown} unknown (no determinable baseline outcome). A capability A/B on this task set cannot detect the capability \u2014 add tasks the baseline fails, or fix baseline outcome capture, before measuring.`
|
|
1139
|
+
);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1072
1143
|
// src/client.ts
|
|
1073
1144
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|
|
1074
1145
|
var ProductClient = class {
|
|
@@ -2303,6 +2374,155 @@ function liveProofToReleaseTrace(config, trajectory, durationMs) {
|
|
|
2303
2374
|
};
|
|
2304
2375
|
}
|
|
2305
2376
|
|
|
2377
|
+
// src/paired-arms.ts
|
|
2378
|
+
function pairArms(rows, opts) {
|
|
2379
|
+
const { baselineArm, treatmentArm } = opts;
|
|
2380
|
+
if (baselineArm === treatmentArm) {
|
|
2381
|
+
throw new ValidationError(
|
|
2382
|
+
`pairArms: baselineArm and treatmentArm are both '${baselineArm}' \u2014 an arm cannot be compared to itself`
|
|
2383
|
+
);
|
|
2384
|
+
}
|
|
2385
|
+
const byArm = /* @__PURE__ */ new Map();
|
|
2386
|
+
const armsSeen = /* @__PURE__ */ new Set();
|
|
2387
|
+
for (const row of rows) {
|
|
2388
|
+
armsSeen.add(row.arm);
|
|
2389
|
+
if (row.arm !== baselineArm && row.arm !== treatmentArm) continue;
|
|
2390
|
+
const byKey = byArm.get(row.arm) ?? /* @__PURE__ */ new Map();
|
|
2391
|
+
const group = byKey.get(row.pairKey) ?? [];
|
|
2392
|
+
group.push(row);
|
|
2393
|
+
byKey.set(row.pairKey, group);
|
|
2394
|
+
byArm.set(row.arm, byKey);
|
|
2395
|
+
}
|
|
2396
|
+
for (const arm of [baselineArm, treatmentArm]) {
|
|
2397
|
+
if (!byArm.has(arm)) {
|
|
2398
|
+
const seen = [...armsSeen].sort().join(", ") || "<none>";
|
|
2399
|
+
throw new ValidationError(`pairArms: no rows for arm '${arm}' (arms present: ${seen})`);
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
const baselineByKey = byArm.get(baselineArm);
|
|
2403
|
+
const treatmentByKey = byArm.get(treatmentArm);
|
|
2404
|
+
const allKeys = [.../* @__PURE__ */ new Set([...baselineByKey.keys(), ...treatmentByKey.keys()])].sort();
|
|
2405
|
+
const pairs = [];
|
|
2406
|
+
const unpairedBaseline = [];
|
|
2407
|
+
const unpairedTreatment = [];
|
|
2408
|
+
for (const pairKey2 of allKeys) {
|
|
2409
|
+
const b = baselineByKey.get(pairKey2) ?? [];
|
|
2410
|
+
const t = treatmentByKey.get(pairKey2) ?? [];
|
|
2411
|
+
if (b.length <= 1 && t.length <= 1) {
|
|
2412
|
+
if (b.length === 1 && t.length === 1) {
|
|
2413
|
+
pairs.push({ pairKey: pairKey2, repIndex: 0, baseline: b[0], treatment: t[0] });
|
|
2414
|
+
} else {
|
|
2415
|
+
unpairedBaseline.push(...b);
|
|
2416
|
+
unpairedTreatment.push(...t);
|
|
2417
|
+
}
|
|
2418
|
+
continue;
|
|
2419
|
+
}
|
|
2420
|
+
const bByRep = indexByRepKey(b, pairKey2, baselineArm);
|
|
2421
|
+
const tByRep = indexByRepKey(t, pairKey2, treatmentArm);
|
|
2422
|
+
const repKeys = [.../* @__PURE__ */ new Set([...bByRep.keys(), ...tByRep.keys()])].sort();
|
|
2423
|
+
let repIndex = 0;
|
|
2424
|
+
for (const repKey of repKeys) {
|
|
2425
|
+
const baseline = bByRep.get(repKey);
|
|
2426
|
+
const treatment = tByRep.get(repKey);
|
|
2427
|
+
if (baseline !== void 0 && treatment !== void 0) {
|
|
2428
|
+
pairs.push({ pairKey: pairKey2, repIndex: repIndex++, baseline, treatment });
|
|
2429
|
+
} else if (baseline !== void 0) {
|
|
2430
|
+
unpairedBaseline.push(baseline);
|
|
2431
|
+
} else if (treatment !== void 0) {
|
|
2432
|
+
unpairedTreatment.push(treatment);
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
}
|
|
2436
|
+
return { pairs, unpairedBaseline, unpairedTreatment };
|
|
2437
|
+
}
|
|
2438
|
+
function indexByRepKey(group, pairKey2, arm) {
|
|
2439
|
+
const byRep = /* @__PURE__ */ new Map();
|
|
2440
|
+
for (const row of group) {
|
|
2441
|
+
if (row.repKey === void 0) {
|
|
2442
|
+
throw new ValidationError(
|
|
2443
|
+
`pairArms: pairKey '${pairKey2}' has multiple reps in an arm, but a row in arm '${arm}' is missing repKey \u2014 multi-rep items require an explicit repKey on every row so reps pair by identity (pairing reps by outcome or by index would bias the paired statistics)`
|
|
2444
|
+
);
|
|
2445
|
+
}
|
|
2446
|
+
if (byRep.has(row.repKey)) {
|
|
2447
|
+
throw new ValidationError(
|
|
2448
|
+
`pairArms: duplicate repKey '${row.repKey}' for pairKey '${pairKey2}' in arm '${arm}' \u2014 (pairKey, repKey) must uniquely identify a rep within an arm`
|
|
2449
|
+
);
|
|
2450
|
+
}
|
|
2451
|
+
byRep.set(row.repKey, row);
|
|
2452
|
+
}
|
|
2453
|
+
return byRep;
|
|
2454
|
+
}
|
|
2455
|
+
function comparePairedArms(rows, opts) {
|
|
2456
|
+
const { pairs, unpairedBaseline, unpairedTreatment } = pairArms(rows, opts);
|
|
2457
|
+
let correctness = null;
|
|
2458
|
+
const baselinePass = [];
|
|
2459
|
+
const treatmentPass = [];
|
|
2460
|
+
for (const pair of pairs) {
|
|
2461
|
+
if (pair.baseline.pass === void 0 || pair.treatment.pass === void 0) continue;
|
|
2462
|
+
baselinePass.push(pair.baseline.pass ? 1 : 0);
|
|
2463
|
+
treatmentPass.push(pair.treatment.pass ? 1 : 0);
|
|
2464
|
+
}
|
|
2465
|
+
if (baselinePass.length > 0) {
|
|
2466
|
+
const mc = mcnemar(baselinePass, treatmentPass);
|
|
2467
|
+
correctness = {
|
|
2468
|
+
b10: mc.b,
|
|
2469
|
+
b01: mc.c,
|
|
2470
|
+
mcnemar: mc,
|
|
2471
|
+
riskDifference: pairedRiskDifference(baselinePass, treatmentPass)
|
|
2472
|
+
};
|
|
2473
|
+
}
|
|
2474
|
+
const metricNames = opts.metricNames ?? [
|
|
2475
|
+
...new Set(
|
|
2476
|
+
pairs.flatMap((p) => [
|
|
2477
|
+
...Object.keys(p.baseline.metrics ?? {}),
|
|
2478
|
+
...Object.keys(p.treatment.metrics ?? {})
|
|
2479
|
+
])
|
|
2480
|
+
)
|
|
2481
|
+
].sort();
|
|
2482
|
+
const metricDeltas = metricNames.map((name) => {
|
|
2483
|
+
const before = [];
|
|
2484
|
+
const after = [];
|
|
2485
|
+
let nMissing = 0;
|
|
2486
|
+
for (const pair of pairs) {
|
|
2487
|
+
const b = metricValue(pair.baseline, name);
|
|
2488
|
+
const t = metricValue(pair.treatment, name);
|
|
2489
|
+
if (b === void 0 || t === void 0) {
|
|
2490
|
+
nMissing++;
|
|
2491
|
+
continue;
|
|
2492
|
+
}
|
|
2493
|
+
before.push(b);
|
|
2494
|
+
after.push(t);
|
|
2495
|
+
}
|
|
2496
|
+
const bootstrapCi2 = before.length === 0 ? null : pairedBootstrap(before, after, opts.bootstrap);
|
|
2497
|
+
return {
|
|
2498
|
+
name,
|
|
2499
|
+
n: before.length,
|
|
2500
|
+
nMissing,
|
|
2501
|
+
medianDelta: bootstrapCi2 === null ? Number.NaN : bootstrapCi2.median,
|
|
2502
|
+
meanDelta: bootstrapCi2 === null ? Number.NaN : bootstrapCi2.mean,
|
|
2503
|
+
bootstrapCi: bootstrapCi2,
|
|
2504
|
+
wilcoxon: before.length === 0 ? null : wilcoxonSignedRank(before, after)
|
|
2505
|
+
};
|
|
2506
|
+
});
|
|
2507
|
+
return {
|
|
2508
|
+
nPairs: pairs.length,
|
|
2509
|
+
nUnpairedBaseline: unpairedBaseline.length,
|
|
2510
|
+
nUnpairedTreatment: unpairedTreatment.length,
|
|
2511
|
+
correctness,
|
|
2512
|
+
metricDeltas
|
|
2513
|
+
};
|
|
2514
|
+
}
|
|
2515
|
+
function metricValue(row, name) {
|
|
2516
|
+
const v = row.metrics?.[name];
|
|
2517
|
+
if (v === void 0) return void 0;
|
|
2518
|
+
if (!Number.isFinite(v)) {
|
|
2519
|
+
throw new ValidationError(
|
|
2520
|
+
`comparePairedArms: non-finite value for metric '${name}' on pairKey '${row.pairKey}' (arm '${row.arm}'): ${v}`
|
|
2521
|
+
);
|
|
2522
|
+
}
|
|
2523
|
+
return v;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2306
2526
|
// src/pr-review-benchmark.ts
|
|
2307
2527
|
var DEFAULT_PR_REVIEW_SCORE_WEIGHTS = {
|
|
2308
2528
|
recall: 4,
|
|
@@ -10147,6 +10367,7 @@ export {
|
|
|
10147
10367
|
argHash,
|
|
10148
10368
|
asNumber,
|
|
10149
10369
|
asString,
|
|
10370
|
+
assertCapabilityHeadroom,
|
|
10150
10371
|
assertCrossFamily,
|
|
10151
10372
|
assertLlmRoute,
|
|
10152
10373
|
assertModelsServed,
|
|
@@ -10194,6 +10415,7 @@ export {
|
|
|
10194
10415
|
canaryLeakView,
|
|
10195
10416
|
canonicalJson,
|
|
10196
10417
|
canonicalize,
|
|
10418
|
+
capabilityHeadroom,
|
|
10197
10419
|
captureFetchToRawSink,
|
|
10198
10420
|
causalAttribution,
|
|
10199
10421
|
checkBehavioralCanary,
|
|
@@ -10212,6 +10434,7 @@ export {
|
|
|
10212
10434
|
collectionPreserved,
|
|
10213
10435
|
commentsForSource,
|
|
10214
10436
|
commitBisect,
|
|
10437
|
+
comparePairedArms,
|
|
10215
10438
|
compareReferenceReplay,
|
|
10216
10439
|
compareToBaseline,
|
|
10217
10440
|
compilerJudge,
|
|
@@ -10417,6 +10640,7 @@ export {
|
|
|
10417
10640
|
otelRunCompleteHook,
|
|
10418
10641
|
otlpToRunRecords,
|
|
10419
10642
|
otlpToTraceRunRecords,
|
|
10643
|
+
pairArms,
|
|
10420
10644
|
pairedBootstrap,
|
|
10421
10645
|
pairedEvalueSequence,
|
|
10422
10646
|
pairedMde,
|