@tangle-network/agent-eval 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/analyst/index.d.ts.map +1 -1
  3. package/dist/analyst/index.js +1 -1
  4. package/dist/{analyze-runs-ARGa3-a4.js → analyze-runs-dGYmYNtb.js} +4 -24
  5. package/dist/analyze-runs-dGYmYNtb.js.map +1 -0
  6. package/dist/{benchmark-command-C3mZhNh7.js → benchmark-command-CyNmaPml.js} +5 -2
  7. package/dist/benchmark-command-CyNmaPml.js.map +1 -0
  8. package/dist/cli.js +1 -1
  9. package/dist/contract/index.js +2 -2
  10. package/dist/{define-agent-eval-CGonw5ed.js → define-agent-eval-DyzJ0wOo.js} +2 -2
  11. package/dist/{define-agent-eval-CGonw5ed.js.map → define-agent-eval-DyzJ0wOo.js.map} +1 -1
  12. package/dist/diagnosis/index.js +1 -1
  13. package/dist/{eval-campaign-CkHn9y1S.js → eval-campaign-B-dQl_lA.js} +2 -2
  14. package/dist/{eval-campaign-CkHn9y1S.js.map → eval-campaign-B-dQl_lA.js.map} +1 -1
  15. package/dist/experiment/index.js +1 -1
  16. package/dist/index.d.ts +70 -42
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +196 -6
  19. package/dist/index.js.map +1 -1
  20. package/dist/openapi.json +1 -1
  21. package/dist/paired-arms-C0Vd9bGG.js.map +1 -1
  22. package/dist/pipelines/index.d.ts +1 -1
  23. package/dist/{promotion-gate-CixshGI8.d.ts → promotion-gate-DOkgJcLW.d.ts} +2 -6
  24. package/dist/promotion-gate-DOkgJcLW.d.ts.map +1 -0
  25. package/dist/reporting.d.ts +1 -1
  26. package/dist/reporting.js +1 -1
  27. package/dist/rl.js +1 -1
  28. package/dist/{summary-report-CPkHWJWr.js → summary-report-B4BLQb88.js} +6 -40
  29. package/dist/summary-report-B4BLQb88.js.map +1 -0
  30. package/dist/{tool-waste-BFG1vwTV.d.ts → tool-waste-CUASoTtk.d.ts} +3 -17
  31. package/dist/tool-waste-CUASoTtk.d.ts.map +1 -0
  32. package/dist/wire/index.d.ts +2 -2
  33. package/package.json +1 -1
  34. package/dist/analyze-runs-ARGa3-a4.js.map +0 -1
  35. package/dist/benchmark-command-C3mZhNh7.js.map +0 -1
  36. package/dist/promotion-gate-CixshGI8.d.ts.map +0 -1
  37. package/dist/summary-report-CPkHWJWr.js.map +0 -1
  38. package/dist/tool-waste-BFG1vwTV.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { a as groupRunsByAgentProfileCell, c as verifyAgentProfileCell, i as bui
6
6
  import { r as observedSplitScore, t as isRealnessGated } from "./reward-P0VD_Aft.js";
7
7
  import { i as isToolSpan, n as isJudgeSpan, r as isLlmSpan, t as FAILURE_CLASSES } from "./schema-D-xu3MU_.js";
8
8
  import { a as parseRunRecordSafe, c as validateRunRecord, i as modelHasSnapshot, n as UNKNOWN_MODEL, o as runTaskScore, r as isRunRecord, t as RunRecordValidationError } from "./run-record-DEjx43cI.js";
9
- import { a as cliffsDelta, c as pairedCohensDz, i as summaryTable, n as gainHistogram, o as cohensD, s as interpretCliffs } from "./summary-report-CPkHWJWr.js";
9
+ import { a as cliffsDelta, c as pairedCohensDz, i as summaryTable, n as gainHistogram, o as cohensD, s as interpretCliffs } from "./summary-report-B4BLQb88.js";
10
10
  import { t as interpolatedQuantile } from "./quantile-CncXP-Ss.js";
11
11
  import { a as wilcoxonSignedRank, i as mannWhitneyU, n as pairArms, r as pairRunRecords, t as comparePairedArms } from "./paired-arms-C0Vd9bGG.js";
12
12
  import { c as medianInPlace, i as assertFiniteSample, s as makeRng, t as mean$1 } from "./mean-DDFhslBt.js";
@@ -14,9 +14,9 @@ import { t as mulberry32 } from "./random-DrzcgC7F.js";
14
14
  import { a as ranks, c as summarizeNumberSeries, i as pearsonR, l as weightedComposite, n as meanConfidenceInterval, o as spearmanR, r as partialCredit, s as studentTCritical, t as confidenceInterval, u as weightedMean } from "./descriptive-BTzLL-aj.js";
15
15
  import { n as calibrateJudgeContinuous, o as verbosityBias, r as continuousAgreement, t as calibrateJudge } from "./judge-calibration-D93UCm1k.js";
16
16
  import { n as corpusInterRaterAgreementFromJudgeScores, r as interRaterReliability, t as corpusInterRaterAgreement } from "./agreement-irr-w-t3XUTD.js";
17
- import { a as welchsTTest, c as fisherExactTwoSided, d as studentTTwoSidedPValue, f as twoByTwoPValue, i as iqr, l as linearRegressionSlope, n as checkCanaries, o as chiSquared, s as chiSquaredPValue, t as analyzeRuns, u as normalTwoSidedPValue } from "./analyze-runs-ARGa3-a4.js";
18
- import { n as bonferroni, r as holm, t as benjaminiHochberg } from "./multiplicity-DAd4xaDC.js";
17
+ import { a as welchsTTest, c as fisherExactTwoSided, d as studentTTwoSidedPValue, f as twoByTwoPValue, i as iqr, l as linearRegressionSlope, n as checkCanaries, o as chiSquared, s as chiSquaredPValue, t as analyzeRuns, u as normalTwoSidedPValue } from "./analyze-runs-dGYmYNtb.js";
19
18
  import { a as pairedRiskDifferenceScore, i as pairedRiskDifferenceExact, o as passAtK, r as pairedRiskDifference, s as wilson, t as mcnemar } from "./paired-binary-B477lksS.js";
19
+ import { n as bonferroni, r as holm, t as benjaminiHochberg } from "./multiplicity-DAd4xaDC.js";
20
20
  import { a as pairedSignTest, o as pairedTTest, r as pairedBootstrap, t as BOOTSTRAP_GATE_MIN_N } from "./paired-tests-kASEKpc-.js";
21
21
  import { a as requiredSampleSize, i as requiredPairedSampleSize, n as mcnemarRequiredN, r as pairedMde, t as mcnemarPower } from "./power-and-mde-CRxepy8y.js";
22
22
  import { t as eProcess } from "./sequential-eprocess-C1YLwFaz.js";
@@ -32,7 +32,7 @@ import { c as redactText, l as shareAllowed, n as REDACTION_VERSION, o as redact
32
32
  import { a as makeProposalFinding, i as makeFinding, r as computeFindingId } from "./types-BK0blWhe.js";
33
33
  import { S as requiredPairsForPairedPromotion, n as paretoFrontier, t as dominates, x as pairedPromotionPower } from "./pareto-DY_x3HHg.js";
34
34
  import { a as LlmCallError, i as stripFencedJson, n as isRecord, o as LlmResponseError } from "./json-DtvZNAU9.js";
35
- import { r as selfImprove, t as defineAgentEval } from "./define-agent-eval-CGonw5ed.js";
35
+ import { r as selfImprove, t as defineAgentEval } from "./define-agent-eval-DyzJ0wOo.js";
36
36
  import { n as equivalenceVerdict, t as certificationEvidenceDigest } from "./verdict-C8TcdwfD.js";
37
37
  import { c as createBoundedTraceAnalysisStore, p as DEFAULT_TRACE_ANALYST_BUDGETS, t as createTraceAnalyst } from "./kind-factory-VKysp1ds.js";
38
38
  import { C as assertUniqueFindingIds, D as validateAnalystReviewDecisions, E as snapshotAnalystRun, S as analystRunDigest, T as readAnalystReview, c as FAILURE_MODE_KIND_SPEC, i as DEFAULT_TRACE_ANALYST_KINDS, n as AnalystRegistry, t as buildDefaultAnalystRegistry, w as completedAnalystReviewQuality, x as analystFindingDigest } from "./default-registry-gmDeN0KT.js";
@@ -47,7 +47,7 @@ import { t as packageVersion$1 } from "./package-version-CJl_pY9W.js";
47
47
  import { t as buildTrajectory } from "./trajectory-O3GDHmev.js";
48
48
  import { i as failureBlame, n as classifyFailure, r as classifyFailureReason } from "./failure-taxonomy-9eQfXKoW.js";
49
49
  import { n as runBoundedProcess, t as DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS } from "./bounded-process-BZrWXIKW.js";
50
- import { t as runEvalCampaign } from "./eval-campaign-CkHn9y1S.js";
50
+ import { t as runEvalCampaign } from "./eval-campaign-B-dQl_lA.js";
51
51
  import { _ as assertCrossFamily, a as maximumChargeForLlmRequest, d as assertServedModel, g as CrossFamilyError, h as describeServedModelCheck, i as costReceiptFromLlmError, l as ModelSubstitutionError, m as checkServedModel, p as assertServedModels, r as costReceiptFromLlm, s as isTransientLlmError, u as assertCrossFamilyServed, v as judgeFamily } from "./llm-client-BdSiZ4qz.js";
52
52
  import { n as createLlmCorrectnessChecker, r as verifyCompletion, t as completionVerdict } from "./completion-verifier-ClmJV_Yc.js";
53
53
  import "./rollout-BC4u-d_I.js";
@@ -66,6 +66,94 @@ import { accessSync, appendFileSync, constants, cpSync, existsSync, mkdirSync, p
66
66
  import { basename, delimiter, dirname, extname, isAbsolute, join, relative, resolve } from "node:path";
67
67
  import { spawnSync } from "node:child_process";
68
68
  import { ATTR, INPUT_TOKEN_ATTR_KEYS, MODEL_ATTR_KEYS, OUTPUT_TOKEN_ATTR_KEYS, SPAN_KINDS, TOOL_NAME_ATTR_KEYS, firstNumberAttr, firstStringAttr, resolveSpanKind } from "@tangle-network/agent-trace-contract";
69
+ // src/statistics/comparison-effects.ts
70
+ /** Independent means, oriented b − a: Welch 95% interval and Hedges' g with a normal 95% interval. */
71
+ function meanEffect(a, b) {
72
+ const n = [a.length, b.length];
73
+ const comparison = welchsTTest(a, b);
74
+ const diff = a.length && b.length ? comparison.delta : null;
75
+ if (comparison.status !== "ok") return {
76
+ n,
77
+ diff,
78
+ ci: comparison.status === "zero-variance" ? [comparison.delta, comparison.delta] : null,
79
+ g: null,
80
+ gCi: null
81
+ };
82
+ const g = (1 - 3 / (4 * (a.length + b.length) - 9)) * comparison.cohensD;
83
+ const gSe = Math.sqrt((a.length + b.length) / (a.length * b.length) + g ** 2 / (2 * (a.length + b.length)));
84
+ return {
85
+ n,
86
+ diff,
87
+ ci: comparison.ci95,
88
+ g,
89
+ gCi: [g - 1.96 * gSe, g + 1.96 * gSe]
90
+ };
91
+ }
92
+ function binary(values, name) {
93
+ if (values.some((value) => value !== 0 && value !== 1)) throw new ValidationError(`${name}: expected binary 0/1 values`);
94
+ }
95
+ /** Independent binary samples, oriented b − a, with Newcombe's hybrid Wilson 95% interval. */
96
+ function rateEffect(a, b) {
97
+ binary(a, "rateEffect.a");
98
+ binary(b, "rateEffect.b");
99
+ const n = [a.length, b.length];
100
+ if (!a.length || !b.length) return {
101
+ n,
102
+ diff: null,
103
+ ci: null,
104
+ g: null,
105
+ gCi: null
106
+ };
107
+ const s1 = a.reduce((sum, value) => sum + value, 0), s2 = b.reduce((sum, value) => sum + value, 0);
108
+ const { lower: l1, upper: u1 } = wilson(s1, a.length), { lower: l2, upper: u2 } = wilson(s2, b.length);
109
+ const p1 = s1 / a.length, p2 = s2 / b.length, diff = p2 - p1;
110
+ return {
111
+ n,
112
+ rates: [p1, p2],
113
+ diff,
114
+ ci: [diff - Math.sqrt((p2 - l2) ** 2 + (u1 - p1) ** 2), diff + Math.sqrt((u2 - p2) ** 2 + (p1 - l1) ** 2)],
115
+ g: null,
116
+ gCi: null
117
+ };
118
+ }
119
+ /** Mann–Whitney ROC area: ties count half; no observed member of either class means unknown. */
120
+ function rocAuc(scores, labels) {
121
+ assertFiniteSample("rocAuc", "scores", scores);
122
+ binary(labels, "rocAuc.labels");
123
+ if (scores.length !== labels.length) throw new ValidationError("rocAuc: scores and labels must have equal lengths");
124
+ const ranked = ranks(scores);
125
+ const positive = labels.reduce((sum, label) => sum + label, 0);
126
+ const sum = labels.reduce((total, label, index) => total + label * ranked[index], 0);
127
+ const negative = labels.length - positive;
128
+ return positive && negative ? (sum - positive * (positive + 1) / 2) / (positive * negative) : null;
129
+ }
130
+ /** L2 logistic fit by fixed-step gradient descent; the returned linear score preserves ROC ordering. */
131
+ function fitLogistic(rows, labels, { lambda = 1, steps = 600, rate = .3 } = {}) {
132
+ binary(labels, "fitLogistic.labels");
133
+ const width = rows[0]?.length ?? 0;
134
+ if (!rows.length || rows.length !== labels.length || rows.some((row) => row.length !== width)) throw new ValidationError("fitLogistic: nonempty equal-width rows and one label per row required");
135
+ rows.forEach((row) => assertFiniteSample("fitLogistic", "row", row));
136
+ if (!(Number.isFinite(lambda) && lambda >= 0 && Number.isInteger(steps) && steps >= 0 && Number.isFinite(rate) && rate > 0)) throw new ValidationError("fitLogistic: invalid optimizer bounds");
137
+ const weights = new Array(width).fill(0);
138
+ let bias = 0;
139
+ const score = (row) => bias + row.reduce((sum, value, index) => sum + value * weights[index], 0);
140
+ for (let step = 0; step < steps; step++) {
141
+ const gradient = new Array(width).fill(0);
142
+ let gradientBias = 0;
143
+ rows.forEach((row, index) => {
144
+ const error = 1 / (1 + Math.exp(-score(row))) - labels[index];
145
+ gradientBias += error;
146
+ row.forEach((value, column) => {
147
+ gradient[column] = gradient[column] + error * value;
148
+ });
149
+ });
150
+ bias -= rate * gradientBias / rows.length;
151
+ weights.forEach((weight, column) => {
152
+ weights[column] = weight - rate * (gradient[column] / rows.length + lambda * weight / rows.length);
153
+ });
154
+ }
155
+ return score;
156
+ }
69
157
  // src/statistics/samples.ts
70
158
  /** Interpolated sample median; an empty population has no measured median. */
71
159
  function sampleMedian(values) {
@@ -140,6 +228,42 @@ function summarizeSample(values, options = {}) {
140
228
  ].some((value) => value !== null && !Number.isFinite(value))) throw new ValidationError("summarizeSample: sample arithmetic exceeded finite range");
141
229
  return summary;
142
230
  }
231
+ // src/statistics/two-sample.ts
232
+ /** Welch's t and Satterthwaite df for unequal variances; nulls when unestimable. */
233
+ function welch(baseline, candidate) {
234
+ const sdA = baseline.stddev;
235
+ const sdB = candidate.stddev;
236
+ const meanA = baseline.mean;
237
+ const meanB = candidate.mean;
238
+ if (baseline.n < 2 || candidate.n < 2 || sdA === void 0 || sdB === void 0 || meanA === void 0 || meanB === void 0) return {
239
+ t: null,
240
+ df: null
241
+ };
242
+ const va = sdA ** 2 / baseline.n;
243
+ const vb = sdB ** 2 / candidate.n;
244
+ const denom = Math.sqrt(va + vb);
245
+ if (denom === 0) return {
246
+ t: null,
247
+ df: null
248
+ };
249
+ return {
250
+ t: (meanA - meanB) / denom,
251
+ df: (va + vb) ** 2 / (va ** 2 / (baseline.n - 1) + vb ** 2 / (candidate.n - 1))
252
+ };
253
+ }
254
+ /** Evidence that two independent windows differ; conservative on thin data. */
255
+ function twoSampleEvidence(baseline, candidate, alpha = .05) {
256
+ const { t, df } = welch(baseline, candidate);
257
+ const pValue = t !== null && df !== null ? studentTTwoSidedPValue(t, df) : null;
258
+ const ciDisjoint = baseline.ci95High !== void 0 && baseline.ci95Low !== void 0 && candidate.ci95High !== void 0 && candidate.ci95Low !== void 0 && (baseline.ci95Low > candidate.ci95High || candidate.ci95Low > baseline.ci95High);
259
+ return {
260
+ t,
261
+ df,
262
+ pValue,
263
+ ciDisjoint,
264
+ significant: ciDisjoint || pValue !== null && pValue < alpha
265
+ };
266
+ }
143
267
  // src/profile/baselines.ts
144
268
  /**
145
269
  * Strong, generically-useful baseline ROLES — the top zone of an `AgentProfile`
@@ -8799,6 +8923,72 @@ function rankRows(rows, weights) {
8799
8923
  runs: values.length
8800
8924
  })).sort((a, b) => b.mean - a.mean);
8801
8925
  }
8802
- export { AGENT_PROFILE_KINDS, ATTESTATION_ALGORITHM, AgentEvalError, AnalystRegistry, BOOTSTRAP_GATE_MIN_N, BackendIntegrityError, BudgetBreachError, BudgetGuard, CODING_HARNESSES, ConfigError, CostAccountingIncompleteError, CostCeilingReachedError, CostLedger, CostTracker, CrossFamilyError, DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS, DEFAULT_JUDGE_GATE_POLICY, DEFAULT_RED_TEAM_CORPUS, DEFAULT_TRACE_ANALYST_BUDGETS, DEFAULT_TRACE_ANALYST_KINDS, ERROR_COUNT_PATTERNS, EquivalenceProtocolError, FAILURE_CLASSES, FAILURE_MODE_KIND_SPEC, FileSystemFeedbackTrajectoryStore, FileSystemRawProviderSink, FileSystemTraceStore, FindingsStore, HARNESS_NATIVE_MODEL, HeldOutGate, InMemoryFeedbackTrajectoryStore, InMemoryRawProviderSink, InMemoryTraceStore, JudgeError, JudgeGateRefusedError, LlmCallError, LlmResponseError, MODEL_PRICING, ModelSubstitutionError, MultiLayerVerifier, NoopRawProviderSink, NotFoundError, OUTPUT_VALUE, OtlpFileTraceStore, PairwiseSteeringOptimizer, ProductClient, PromptRegistry, REDACTION_VERSION, RunIntegrityError, RunRecordValidationError, SEMANTIC_CONCEPT_JUDGE_VERSION, TraceEmitter, UNKNOWN_MODEL, VERIFICATION_STRATEGIES, VERIFICATION_STRATEGY_SOURCES, ValidationError, acquisitionPlansForKnowledgeGaps, addCalibrationVerdicts, agentProfileCellKey, agentProfileHash, agentProfileId, aggregateJudgeVerdicts, aggregateRunScore, analystRunDigest, analystRunToFeedbackTrajectory, analystRunToReviewRequests, analyzeAntiSlop, analyzeRuns, analyzeSeries, analyzeTraces, argHash, assertCapabilityHeadroom, assertCrossFamily, assertCrossFamilyServed, assertJudgeMayGate, assertNoHiddenLeak, assertProductBenchmarkRun, assertRealBackend, assertRunCaptured, assertServedModel, assertServedModels, assertSingleBackend, assessShareSafety, assignFeedbackSplit, attest, benjaminiHochberg, blendHeldout, blockingKnowledgeEval, bonferroni, bootstrapCi, budgetBreachView, buildAgentProfileCell, buildDefaultAnalystRegistry, buildReflectionPrompt, buildTraceInsightContext, buildTraceInsightPrompt, buildTrajectory, calibrateJudge, calibrateJudgeContinuous, canonicalJson, capabilityHeadroom, captureFetchToRawSink, certificationEvidenceDigest, checkCanaries, checkServedModel, checkTraceContracts, chiSquared, chiSquaredPValue, clamp01, classifyFailure, classifyFailureReason, cliffsDelta, cohensD, comparePairedArms, compileTraceContractSpec, completionVerdict, computeFindingId, computeToolUseMetrics, confidenceInterval, contentHash, continuousAgreement, controlRunToFeedbackTrajectory, corpusInterRaterAgreement, corpusInterRaterAgreementFromJudgeScores, costForTokenPricing, costForUsage, costReceiptFromLlm, costReceiptFromLlmError, createAntiSlopJudge, createBoundedTraceAnalysisStore, createChatClient, createChatTraceEngine, createDspyRlmTraceEngine, createFeedbackTrajectory, createLlmCorrectnessChecker, createLlmReviewer, createTraceAnalyst, decidePairedPromotion, defineAgentEval, defineEquivalenceCheck, deployGateLayer, describeServedModelCheck, describeTraceInsightScope, diffFindings, diffScorecard, discoverPersonas, domainEvidencePattern, dominates, eProcess, ensembleJudge, equivalenceVerdict, errorStreakDetector, estimateCost, estimateTokens, evaluateActionPolicy, evaluateInterimReleaseConfidence, evaluateOracles, evaluateReleaseConfidence, evaluateTraceContract, expandProfileAxes, explainTraceContract, exportProductBenchmark, exportProductBenchmarkRuns, exportRunAsOtlp, extractErrorCount, extractProducedState, extractUsage, extractUsageFromSse, failureBlame, failureClusterView, feedbackTrajectoriesToDatasetScenarios, feedbackTrajectoriesToOptimizerRows, feedbackTrajectoryToOptimizerRow, fileVerdictCache, fisherExactTwoSided, formatScorecardDiff, gainHistogram, gateTreatmentApplied, gradeSemanticStatus, groupRunsByAgentProfileCell, harnessAxisOf, hashContent, hashJson, holm, inMemoryReviewStore, inferDomainKeywords, interRaterReliability, interpretCliffs, iqr, isJudgeSpan, isLlmSpan, isModelPriced, isRunRecord, isToolSpan, isTransientLlmError, jsonShape, jsonlReviewStore, jsonlRunRecordBackend, judgeAgreementView, judgeFamily, judgeGateDecision, judgeSpans, knowledgeReadinessTracePayload, leaderboard, linearRegressionSlope, lintTraceContractSpec, llmJudge, loadScorecard, localCommandRunner, makeFinding, makePolicyEditCandidateRecord, makeProposalFinding, manifestContentDigest, mannWhitneyU, maximumChargeForLlmRequest, mcnemar, mcnemarPower, mcnemarRequiredN, meanConfidenceInterval, measureJudgeAgreement, minimumPairsForPairedDeltaTest, mintRolloutRows, modelHasSnapshot, mulberry32, normalTwoSidedPValue, objectiveEval, observeAll, otlpTextToTraceAnalysisStore, pairArms, pairRunRecords, pairedBootstrap, pairedCohensDz, pairedDeltaTest, pairedEvalueSequence, pairedMde, pairedPromotionPower, pairedRiskDifference, pairedRiskDifferenceExact, pairedRiskDifferenceScore, pairedSignTest, pairedTTest, paretoFrontier, parseReflectionResponse, parseRunRecordSafe, partialCredit, partitionHeldOut, passAtK, pearsonR, preflightModels, productBenchmarkRepoIdentity, profile_exports as profile, projectRuntimeTrajectoryEvidence, proposeSynthesisTargets, ranks, readProductBenchmarkManifest, recordRuns, recordRunsToScorecard, redTeamDataset, redTeamReport, redact, redactForShare, redactText, registerCalibrationSet, renderPreferenceMemoryMarkdown, repeatedActionDetector, requiredPairedSampleSize, requiredPairsForPairedPromotion, requiredSampleSize, resolveModelPricing, resolveSeat, runAgentControlLoop, runBoundedProcess, runCampaign, runCanaries, runEquivalenceCheck, runEvalCampaign, runIntentMatchJudge, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runProposeReview, runSemanticConceptJudge, runTaskScore, runsForScenario, sampleMedian, scoreKnowledgeReadiness, scoreRedTeamOutput, scoreTraceInsightReadiness, seatPresets, selfImprove, shareAllowed, snapshotFromJudgeAgreement, spanRecordsToTraceAnalysisStore, spearmanR, stripFencedJson, studentTCritical, studentTTwoSidedPValue, subjectiveEval, summarizeBackendIntegrity, summarizeNumberSeries, summarizePreferenceMemory, summarizeSample, summaryTable, toAgentProfileJson, tokenizeDomainWords, toolSpansToTraceAnalysisStore, toolWasteView, traceContract, transientDispatchFailure, twoByTwoPValue, userQuestionsForKnowledgeGaps, validateRunRecord, verbosityBias, verifyAgentProfileCell, verifyAttestation, verifyCompletion, viteDeployRunner, weightedComposite, weightedMean, welchsTTest, wilcoxonSignedRank, wilson, withAssignedFeedbackSplit, withJudgeRetry, wranglerDeployRunner };
8926
+ // src/sandbox-assertions.ts
8927
+ function assertHttpOk(name, res) {
8928
+ return {
8929
+ name,
8930
+ status: res.ok ? "pass" : "fail",
8931
+ expected: "2xx",
8932
+ actual: String(res.status)
8933
+ };
8934
+ }
8935
+ function assertStatus(name, actual, expected) {
8936
+ const valid = Array.isArray(expected) ? expected : [expected];
8937
+ return {
8938
+ name,
8939
+ status: valid.includes(actual) ? "pass" : "fail",
8940
+ expected: valid.join("|"),
8941
+ actual
8942
+ };
8943
+ }
8944
+ function assertExists(name, value) {
8945
+ return {
8946
+ name,
8947
+ status: value != null && value !== "" ? "pass" : "fail",
8948
+ expected: "non-null/non-empty",
8949
+ actual: String(value)
8950
+ };
8951
+ }
8952
+ function assertLatencyUnder(name, actualMs, targetMs) {
8953
+ return {
8954
+ name,
8955
+ status: actualMs <= targetMs ? "pass" : "fail",
8956
+ expected: `≤${targetMs}ms`,
8957
+ actual: `${actualMs}ms`
8958
+ };
8959
+ }
8960
+ function assertContains(name, actual, expected) {
8961
+ return {
8962
+ name,
8963
+ status: actual.includes(expected) ? "pass" : "fail",
8964
+ expected: `contains "${expected}"`,
8965
+ actual: actual.length > 200 ? `${actual.slice(0, 200)}...` : actual
8966
+ };
8967
+ }
8968
+ function assertNotContains(name, actual, forbidden) {
8969
+ return {
8970
+ name,
8971
+ status: !actual.includes(forbidden) ? "pass" : "fail",
8972
+ expected: `does not contain "${forbidden}"`,
8973
+ actual: actual.length > 200 ? `${actual.slice(0, 200)}...` : actual
8974
+ };
8975
+ }
8976
+ function assertEventCount(name, count, min, max) {
8977
+ return {
8978
+ name,
8979
+ status: count >= min && (max === void 0 || count <= max) ? "pass" : "fail",
8980
+ expected: max !== void 0 ? `${min}-${max} events` : `≥${min} events`,
8981
+ actual: `${count} events`
8982
+ };
8983
+ }
8984
+ function assertHasField(name, obj, field) {
8985
+ return {
8986
+ name,
8987
+ status: field in obj ? "pass" : "fail",
8988
+ expected: `has field "${field}"`,
8989
+ actual: `keys: ${Object.keys(obj).join(", ")}`
8990
+ };
8991
+ }
8992
+ export { AGENT_PROFILE_KINDS, ATTESTATION_ALGORITHM, AgentEvalError, AnalystRegistry, BOOTSTRAP_GATE_MIN_N, BackendIntegrityError, BudgetBreachError, BudgetGuard, CODING_HARNESSES, ConfigError, CostAccountingIncompleteError, CostCeilingReachedError, CostLedger, CostTracker, CrossFamilyError, DEFAULT_BOUNDED_PROCESS_TIMEOUT_MS, DEFAULT_JUDGE_GATE_POLICY, DEFAULT_RED_TEAM_CORPUS, DEFAULT_TRACE_ANALYST_BUDGETS, DEFAULT_TRACE_ANALYST_KINDS, ERROR_COUNT_PATTERNS, EquivalenceProtocolError, FAILURE_CLASSES, FAILURE_MODE_KIND_SPEC, FileSystemFeedbackTrajectoryStore, FileSystemRawProviderSink, FileSystemTraceStore, FindingsStore, HARNESS_NATIVE_MODEL, HeldOutGate, InMemoryFeedbackTrajectoryStore, InMemoryRawProviderSink, InMemoryTraceStore, JudgeError, JudgeGateRefusedError, LlmCallError, LlmResponseError, MODEL_PRICING, ModelSubstitutionError, MultiLayerVerifier, NoopRawProviderSink, NotFoundError, OUTPUT_VALUE, OtlpFileTraceStore, PairwiseSteeringOptimizer, ProductClient, PromptRegistry, REDACTION_VERSION, RunIntegrityError, RunRecordValidationError, SEMANTIC_CONCEPT_JUDGE_VERSION, TraceEmitter, UNKNOWN_MODEL, VERIFICATION_STRATEGIES, VERIFICATION_STRATEGY_SOURCES, ValidationError, acquisitionPlansForKnowledgeGaps, addCalibrationVerdicts, agentProfileCellKey, agentProfileHash, agentProfileId, aggregateJudgeVerdicts, aggregateRunScore, analystRunDigest, analystRunToFeedbackTrajectory, analystRunToReviewRequests, analyzeAntiSlop, analyzeRuns, analyzeSeries, analyzeTraces, argHash, assertCapabilityHeadroom, assertContains, assertCrossFamily, assertCrossFamilyServed, assertEventCount, assertExists, assertHasField, assertHttpOk, assertJudgeMayGate, assertLatencyUnder, assertNoHiddenLeak, assertNotContains, assertProductBenchmarkRun, assertRealBackend, assertRunCaptured, assertServedModel, assertServedModels, assertSingleBackend, assertStatus, assessShareSafety, assignFeedbackSplit, attest, benjaminiHochberg, blendHeldout, blockingKnowledgeEval, bonferroni, bootstrapCi, budgetBreachView, buildAgentProfileCell, buildDefaultAnalystRegistry, buildReflectionPrompt, buildTraceInsightContext, buildTraceInsightPrompt, buildTrajectory, calibrateJudge, calibrateJudgeContinuous, canonicalJson, capabilityHeadroom, captureFetchToRawSink, certificationEvidenceDigest, checkCanaries, checkServedModel, checkTraceContracts, chiSquared, chiSquaredPValue, clamp01, classifyFailure, classifyFailureReason, cliffsDelta, cohensD, comparePairedArms, compileTraceContractSpec, completionVerdict, computeFindingId, computeToolUseMetrics, confidenceInterval, contentHash, continuousAgreement, controlRunToFeedbackTrajectory, corpusInterRaterAgreement, corpusInterRaterAgreementFromJudgeScores, costForTokenPricing, costForUsage, costReceiptFromLlm, costReceiptFromLlmError, createAntiSlopJudge, createBoundedTraceAnalysisStore, createChatClient, createChatTraceEngine, createDspyRlmTraceEngine, createFeedbackTrajectory, createLlmCorrectnessChecker, createLlmReviewer, createTraceAnalyst, decidePairedPromotion, defineAgentEval, defineEquivalenceCheck, deployGateLayer, describeServedModelCheck, describeTraceInsightScope, diffFindings, diffScorecard, discoverPersonas, domainEvidencePattern, dominates, eProcess, ensembleJudge, equivalenceVerdict, errorStreakDetector, estimateCost, estimateTokens, evaluateActionPolicy, evaluateInterimReleaseConfidence, evaluateOracles, evaluateReleaseConfidence, evaluateTraceContract, expandProfileAxes, explainTraceContract, exportProductBenchmark, exportProductBenchmarkRuns, exportRunAsOtlp, extractErrorCount, extractProducedState, extractUsage, extractUsageFromSse, failureBlame, failureClusterView, feedbackTrajectoriesToDatasetScenarios, feedbackTrajectoriesToOptimizerRows, feedbackTrajectoryToOptimizerRow, fileVerdictCache, fisherExactTwoSided, fitLogistic, formatScorecardDiff, gainHistogram, gateTreatmentApplied, gradeSemanticStatus, groupRunsByAgentProfileCell, harnessAxisOf, hashContent, hashJson, holm, inMemoryReviewStore, inferDomainKeywords, interRaterReliability, interpretCliffs, iqr, isJudgeSpan, isLlmSpan, isModelPriced, isRunRecord, isToolSpan, isTransientLlmError, jsonShape, jsonlReviewStore, jsonlRunRecordBackend, judgeAgreementView, judgeFamily, judgeGateDecision, judgeSpans, knowledgeReadinessTracePayload, leaderboard, linearRegressionSlope, lintTraceContractSpec, llmJudge, loadScorecard, localCommandRunner, makeFinding, makePolicyEditCandidateRecord, makeProposalFinding, manifestContentDigest, mannWhitneyU, maximumChargeForLlmRequest, mcnemar, mcnemarPower, mcnemarRequiredN, meanConfidenceInterval, meanEffect, measureJudgeAgreement, minimumPairsForPairedDeltaTest, mintRolloutRows, modelHasSnapshot, mulberry32, normalTwoSidedPValue, objectiveEval, observeAll, otlpTextToTraceAnalysisStore, pairArms, pairRunRecords, pairedBootstrap, pairedCohensDz, pairedDeltaTest, pairedEvalueSequence, pairedMde, pairedPromotionPower, pairedRiskDifference, pairedRiskDifferenceExact, pairedRiskDifferenceScore, pairedSignTest, pairedTTest, paretoFrontier, parseReflectionResponse, parseRunRecordSafe, partialCredit, partitionHeldOut, passAtK, pearsonR, preflightModels, productBenchmarkRepoIdentity, profile_exports as profile, projectRuntimeTrajectoryEvidence, proposeSynthesisTargets, ranks, rateEffect, readProductBenchmarkManifest, recordRuns, recordRunsToScorecard, redTeamDataset, redTeamReport, redact, redactForShare, redactText, registerCalibrationSet, renderPreferenceMemoryMarkdown, repeatedActionDetector, requiredPairedSampleSize, requiredPairsForPairedPromotion, requiredSampleSize, resolveModelPricing, resolveSeat, rocAuc, runAgentControlLoop, runBoundedProcess, runCampaign, runCanaries, runEquivalenceCheck, runEvalCampaign, runIntentMatchJudge, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runProposeReview, runSemanticConceptJudge, runTaskScore, runsForScenario, sampleMedian, scoreKnowledgeReadiness, scoreRedTeamOutput, scoreTraceInsightReadiness, seatPresets, selfImprove, shareAllowed, snapshotFromJudgeAgreement, spanRecordsToTraceAnalysisStore, spearmanR, stripFencedJson, studentTCritical, studentTTwoSidedPValue, subjectiveEval, summarizeBackendIntegrity, summarizeNumberSeries, summarizePreferenceMemory, summarizeSample, summaryTable, toAgentProfileJson, tokenizeDomainWords, toolSpansToTraceAnalysisStore, toolWasteView, traceContract, transientDispatchFailure, twoByTwoPValue, twoSampleEvidence, userQuestionsForKnowledgeGaps, validateRunRecord, verbosityBias, verifyAgentProfileCell, verifyAttestation, verifyCompletion, viteDeployRunner, weightedComposite, weightedMean, welch, welchsTTest, wilcoxonSignedRank, wilson, withAssignedFeedbackSplit, withJudgeRetry, wranglerDeployRunner };
8803
8993
 
8804
8994
  //# sourceMappingURL=index.js.map