@tangle-network/agent-eval 0.55.0 → 0.56.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/campaign/index.js +3 -3
- package/dist/{chunk-J3EIOI3O.js → chunk-74Y2EMNH.js} +2 -2
- package/dist/{chunk-UBQGWD3O.js → chunk-AIXHUIHG.js} +2 -2
- package/dist/{chunk-LYL4SOKT.js → chunk-GM476SZU.js} +2 -2
- package/dist/{chunk-YXD7GWJI.js → chunk-JB4UWIM6.js} +3 -3
- package/dist/{chunk-EGIPWXHL.js → chunk-OLIBRKRD.js} +2 -2
- package/dist/{chunk-H4TOS272.js → chunk-QDOSODID.js} +2 -2
- package/dist/{chunk-WP7SY7AI.js → chunk-S3SDD56V.js} +48 -1
- package/dist/chunk-S3SDD56V.js.map +1 -0
- package/dist/contract/index.d.ts +98 -1
- package/dist/contract/index.js +78 -4
- package/dist/contract/index.js.map +1 -1
- package/dist/index.d.ts +108 -3
- package/dist/index.js +139 -5
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +1 -1
- package/dist/pipelines/index.js +2 -2
- package/dist/{release-report-B6l5fi7T.d.ts → release-report-DmPjIce3.d.ts} +44 -1
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +3 -3
- package/dist/rl.js +3 -3
- package/dist/{run-campaign-6UEVBPP3.js → run-campaign-ZURVWMMI.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-WP7SY7AI.js.map +0 -1
- /package/dist/{chunk-J3EIOI3O.js.map → chunk-74Y2EMNH.js.map} +0 -0
- /package/dist/{chunk-UBQGWD3O.js.map → chunk-AIXHUIHG.js.map} +0 -0
- /package/dist/{chunk-LYL4SOKT.js.map → chunk-GM476SZU.js.map} +0 -0
- /package/dist/{chunk-YXD7GWJI.js.map → chunk-JB4UWIM6.js.map} +0 -0
- /package/dist/{chunk-EGIPWXHL.js.map → chunk-OLIBRKRD.js.map} +0 -0
- /package/dist/{chunk-H4TOS272.js.map → chunk-QDOSODID.js.map} +0 -0
- /package/dist/{run-campaign-6UEVBPP3.js.map → run-campaign-ZURVWMMI.js.map} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export { a as AgentEvalErrorCode, C as CaptureIntegrityError, b as ConfigError,
|
|
|
26
26
|
import { a as FeedbackLabel, F as FeedbackTrajectoryStore, b as FeedbackTrajectory } from './feedback-trajectory-DpUmE90J.js';
|
|
27
27
|
export { c as FeedbackArtifactType, d as FeedbackAttempt, e as FeedbackLabelKind, f as FeedbackLabelSource, g as FeedbackOptimizerRow, h as FeedbackOutcome, i as FeedbackReplayAdapter, j as FeedbackReplayResult, k as FeedbackSeverity, l as FeedbackSplitPolicy, m as FeedbackTask, n as FeedbackTrajectoryFilter, o as FileSystemFeedbackTrajectoryStore, I as InMemoryFeedbackTrajectoryStore, P as PreferenceMemoryEntry, p as ProposedSideEffect, q as assignFeedbackSplit, r as controlRunToFeedbackTrajectory, s as createFeedbackTrajectory, t as feedbackTrajectoriesToDatasetScenarios, u as feedbackTrajectoriesToOptimizerRows, v as feedbackTrajectoryToDatasetScenario, w as feedbackTrajectoryToOptimizerRow, x as parseFeedbackTrajectoriesJsonl, y as renderPreferenceMemoryMarkdown, z as replayFeedbackTrajectories, A as replayFeedbackTrajectory, B as serializeFeedbackTrajectoriesJsonl, C as summarizePreferenceMemory, D as withAssignedFeedbackSplit } from './feedback-trajectory-DpUmE90J.js';
|
|
28
28
|
export { DataAcquisitionPlan, KnowledgeAcquisitionMode, KnowledgeBundle, KnowledgeFallbackPolicy, KnowledgeFreshness, KnowledgeImportance, KnowledgeReadinessReport, KnowledgeRecommendedAction, KnowledgeRequirement, KnowledgeRequirementCategory, KnowledgeResponsibleSurface, KnowledgeSensitivity, ScoreKnowledgeReadinessOptions, UserQuestion, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, knowledgeReadinessTracePayload, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from './knowledge/index.js';
|
|
29
|
-
import { i as ReleaseConfidenceThresholds, g as ReleaseConfidenceScorecard } from './release-report-
|
|
30
|
-
export { A as ActionableSideInfo, s as AsiSeverity, B as BootstrapOptions, a as BootstrapResult, C as
|
|
29
|
+
import { i as ReleaseConfidenceThresholds, g as ReleaseConfidenceScorecard } from './release-report-DmPjIce3.js';
|
|
30
|
+
export { A as ActionableSideInfo, s as AsiSeverity, B as BootstrapOptions, a as BootstrapResult, C as CliffsMagnitude, t as CorpusAgreementOptions, u as CorpusAgreementPerDimension, v as CorpusAgreementReport, x as CorpusScoreRecord, J as JudgeReplayGateArgs, P as PairedBootstrapOptions, b as PairedBootstrapResult, R as ReleaseConfidenceAxis, c as ReleaseConfidenceAxisName, d as ReleaseConfidenceInput, e as ReleaseConfidenceIssue, f as ReleaseConfidenceMetrics, h as ReleaseConfidenceStatus, j as ReleaseTraceEvidence, k as RenderReleaseReportOptions, V as Verdict, W as WeightedCompositeInput, y as WeightedCompositeResult, l as assertReleaseConfidence, m as benjaminiHochberg, z as bonferroni, n as bootstrapCi, D as cliffsDelta, E as cohensD, F as confidenceInterval, G as corpusInterRaterAgreement, H as corpusInterRaterAgreementFromJudgeScores, o as evaluateReleaseConfidence, I as interRaterReliability, K as interpretCliffs, p as judgeReplayGate, L as mannWhitneyU, M as normalizeScores, q as pairedBootstrap, N as pairedMde, O as pairedTTest, Q as partialCredit, r as renderReleaseReport, S as requiredSampleSize, T as weightedComposite, U as weightedMean, w as wilcoxonSignedRank } from './release-report-DmPjIce3.js';
|
|
31
31
|
import { S as SandboxDriver, H as HarnessConfig, a as SandboxHarnessResult } from './test-graded-scenario-BdVaPyHT.js';
|
|
32
32
|
export { D as DockerSandboxDriver, c as SandboxHarness, d as SandboxResult, e as SubprocessSandboxDriver, f as SubprocessSandboxDriverOptions, g as TestGradedRunOptions, b as TestGradedRunResult, T as TestGradedScenario, h as TestOutputParser, i as composeParsers, j as jestTestParser, p as pytestTestParser, r as runTestGradedScenario, v as vitestTestParser } from './test-graded-scenario-BdVaPyHT.js';
|
|
33
33
|
import { T as TraceEmitter } from './emitter-DEZwY14K.js';
|
|
@@ -1191,6 +1191,111 @@ declare function assertRealBackend(records: ReadonlyArray<RunRecord>, opts?: {
|
|
|
1191
1191
|
allowMixed?: boolean;
|
|
1192
1192
|
}): BackendIntegrityReport;
|
|
1193
1193
|
|
|
1194
|
+
/**
|
|
1195
|
+
* Single-backend guard: assert the agent and the rubric judge run through the
|
|
1196
|
+
* SAME backend config, so the judge can't silently re-route through a
|
|
1197
|
+
* different (often paid) backend than the agent.
|
|
1198
|
+
*
|
|
1199
|
+
* The bug class: `--backend cli-bridge` rewires the agent, but the judge still
|
|
1200
|
+
* reads `process.env.TANGLE_API_KEY` → router. Cost is billed against the
|
|
1201
|
+
* router, the eval reports the cli-bridge model, and the data is unusable.
|
|
1202
|
+
* Four consumers hand-roll this comparison (legal at `canonical.ts:702-795`);
|
|
1203
|
+
* this is the one substrate copy.
|
|
1204
|
+
*
|
|
1205
|
+
* Complements `assertRealBackend` (records → stub vs real) and
|
|
1206
|
+
* `assertCrossFamily` (judge-ensemble family diversity): this one compares two
|
|
1207
|
+
* backend *configs* before the run.
|
|
1208
|
+
*/
|
|
1209
|
+
|
|
1210
|
+
/**
|
|
1211
|
+
* Minimal backend-config shape the assertion reads. Consumers may pass richer
|
|
1212
|
+
* types — only these five fields are inspected.
|
|
1213
|
+
*/
|
|
1214
|
+
interface BackendDescriptor {
|
|
1215
|
+
/** Backend route — e.g. `'tcloud' | 'cli-bridge' | 'sandbox' | 'direct-provider'`;
|
|
1216
|
+
* free-form for consumer extensibility. */
|
|
1217
|
+
kind: string;
|
|
1218
|
+
/** Resolved base URL. Compared lexically (trailing slash stripped). */
|
|
1219
|
+
baseUrl: string;
|
|
1220
|
+
/** Model id (with snapshot suffix). Compared lexically. */
|
|
1221
|
+
model: string;
|
|
1222
|
+
/** Optional provider override. Compared when both set; flagged when only
|
|
1223
|
+
* one side sets it. */
|
|
1224
|
+
provider?: string;
|
|
1225
|
+
/** Bearer token. Values are NEVER compared (security) — only that EITHER
|
|
1226
|
+
* both are set OR both are empty. Mismatched presence is a divergence. */
|
|
1227
|
+
apiKey?: string;
|
|
1228
|
+
}
|
|
1229
|
+
interface AssertSingleBackendOptions {
|
|
1230
|
+
/** When true, ANY field divergence fails. When false (default), only
|
|
1231
|
+
* `kind` / `baseUrl` / `provider` / `apiKeyPresence` divergence throws —
|
|
1232
|
+
* a different judge `model` on the same route is allowed (the legal
|
|
1233
|
+
* pattern: a cheaper judge model). */
|
|
1234
|
+
strict?: boolean;
|
|
1235
|
+
agentLabel?: string;
|
|
1236
|
+
judgeLabel?: string;
|
|
1237
|
+
}
|
|
1238
|
+
type SingleBackendField = 'kind' | 'baseUrl' | 'model' | 'provider' | 'apiKeyPresence';
|
|
1239
|
+
interface SingleBackendDivergence {
|
|
1240
|
+
field: SingleBackendField;
|
|
1241
|
+
agent: string | undefined;
|
|
1242
|
+
judge: string | undefined;
|
|
1243
|
+
}
|
|
1244
|
+
interface SingleBackendReport {
|
|
1245
|
+
/** True when agent + judge agree per the configured strictness. */
|
|
1246
|
+
ok: boolean;
|
|
1247
|
+
/** Every divergence detected (includes `model` even when non-blocking). */
|
|
1248
|
+
divergences: ReadonlyArray<SingleBackendDivergence>;
|
|
1249
|
+
}
|
|
1250
|
+
declare class SingleBackendError extends AgentEvalError {
|
|
1251
|
+
readonly report: SingleBackendReport;
|
|
1252
|
+
constructor(message: string, report: SingleBackendReport);
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Throw `SingleBackendError` when the agent and judge backends diverge in a
|
|
1256
|
+
* way that would re-route the judge through a different backend than the
|
|
1257
|
+
* agent. Returns the report so callers can log it in either case.
|
|
1258
|
+
*/
|
|
1259
|
+
declare function assertSingleBackend(agent: BackendDescriptor, judge: BackendDescriptor, opts?: AssertSingleBackendOptions): SingleBackendReport;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Judge model-family classification + cross-family enforcement.
|
|
1263
|
+
*
|
|
1264
|
+
* A judge ensemble built entirely from one provider family shares that
|
|
1265
|
+
* family's blind spots and self-preference — its "agreement" is correlated
|
|
1266
|
+
* bias, not independent signal. `assertCrossFamily` makes the consumer prove
|
|
1267
|
+
* the ensemble spans ≥2 families; `judgeFamily` is the single regex map that
|
|
1268
|
+
* replaces the per-consumer copies (tax/legal/creative/gtm each ship one).
|
|
1269
|
+
*/
|
|
1270
|
+
/** Provider family a model belongs to. `unknown` when no rule matches. */
|
|
1271
|
+
type JudgeFamily = 'anthropic' | 'openai' | 'google' | 'meta' | 'mistral' | 'deepseek' | 'xai' | 'qwen' | 'cohere' | 'amazon' | 'unknown';
|
|
1272
|
+
/**
|
|
1273
|
+
* Classify a model id into its provider family. Strips a `@snapshot` suffix
|
|
1274
|
+
* and prefers an explicit `provider/...` prefix; otherwise matches the model
|
|
1275
|
+
* name. Returns `unknown` when nothing matches (callers decide whether that's
|
|
1276
|
+
* acceptable — `assertCrossFamily` counts it as its own family).
|
|
1277
|
+
*/
|
|
1278
|
+
declare function judgeFamily(modelId: string): JudgeFamily;
|
|
1279
|
+
interface AssertCrossFamilyOptions {
|
|
1280
|
+
/** Minimum number of distinct families the ensemble must span. Default 2. */
|
|
1281
|
+
minFamilies?: number;
|
|
1282
|
+
/** When false (default), `unknown`-family models do NOT count toward the
|
|
1283
|
+
* family total — an ensemble of all-unclassifiable models is not provably
|
|
1284
|
+
* cross-family. Set true to count `unknown` as one shared family. */
|
|
1285
|
+
allowUnknown?: boolean;
|
|
1286
|
+
}
|
|
1287
|
+
declare class CrossFamilyError extends Error {
|
|
1288
|
+
readonly families: JudgeFamily[];
|
|
1289
|
+
readonly models: string[];
|
|
1290
|
+
constructor(message: string, families: JudgeFamily[], models: string[]);
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* Throw unless the judge models span at least `minFamilies` distinct provider
|
|
1294
|
+
* families. Pass the model ids backing your judge ensemble. Fail-loud by
|
|
1295
|
+
* design — a correlated single-family ensemble silently inflates agreement.
|
|
1296
|
+
*/
|
|
1297
|
+
declare function assertCrossFamily(models: string[], opts?: AssertCrossFamilyOptions): JudgeFamily[];
|
|
1298
|
+
|
|
1194
1299
|
/**
|
|
1195
1300
|
* Create a domain expert judge with a configurable domain.
|
|
1196
1301
|
*
|
|
@@ -5486,4 +5591,4 @@ declare function traceJudge(judge: JudgeFn, judgeName: string, opts: TracedJudge
|
|
|
5486
5591
|
*/
|
|
5487
5592
|
declare function traceJudgeEnsemble(judges: JudgeFn[], judgeNames: string[], opts: TracedJudgeOptions): JudgeFn;
|
|
5488
5593
|
|
|
5489
|
-
export { ANALYST_SEVERITIES, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgentProfile, type AlignmentOp, Analyst, AnalystContext, AnalystCost, AnalystFinding, AnalystSeverity, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, Artifact$1 as Artifact, type Artifact as ArtifactCheckArtifact, type ArtifactEventLike, type ArtifactValidator, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, BackendIntegrityError, type BackendIntegrityReport, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateScenario, type CausalAttributionReport, type CellVerdict, CheckResult, CollectedArtifacts, type CommandRunner, CompletionCriterion, type CompletionRequirement, type CompletionVerdict, type ConceptComplexity, type ConceptFinding, type ConceptSpec, type ConceptWeightStrategy, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrectnessChecker, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, type CreateDefaultReviewerOptions, type CreateSandboxPoolOpts, type CreateTraceAnalystKindOpts, type CrossTraceDiff, type CrossTraceDiffOptions, D1ExperimentStore, type D1ExperimentStoreOptions, type D1Like, type D1PreparedStatementLike, DEFAULT_AGENT_SLOS, DEFAULT_COMPLEXITY_WEIGHTS, DEFAULT_FINDERS, DEFAULT_HARNESS_OBJECTIVES, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_RUN_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, DEFAULT_TRACE_ANALYST_KINDS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DiffPolicy, type DiffScorecardOptions, type DirEntry, type Direction, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type ErrorCountPattern, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, type ExtractOptions, type ExtractResult, FAILURE_MODE_KIND_SPEC, FINDING_SUBJECT_GRAMMAR_PROMPT, FINDING_SUBJECT_KINDS, type FactorContribution, type FactorialCell, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FileChange, FileSystemExperimentStore, type FileSystemExperimentStoreOptions, type FindingSubject, type FindingSubjectKind, FindingSubjectStringSchema, type FindingsDiff, FindingsStore, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldenSeverity, type GoldenSpec, type HarnessAdapter, HarnessConfig, type HarnessExperimentConfig, type HarnessExperimentResult, type HarnessIntervention, type HarnessRunRequest, type HarnessRunResult, type HarnessScenario, type HarnessSelection, type HarnessVariant, type HarnessVariantReport, HoldoutAuditor, type HostedJudgeConfig, type HostedJudgeDimension, type HostedJudgeRequest, type HostedJudgeResponse, type HostedRunCriticConfig, type HostedRunScoreRequest, type HostedRunScoreResponse, type HttpGithubClientOptions, type HypothesisManifest, type HypothesisResult, IMPROVEMENT_KIND_SPEC, INTENT_MATCH_JUDGE_VERSION, type ImageData, InMemoryExperimentStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, type JudgeAdapterOpts, type JudgeFleetOptions, JudgeFn, JudgeInput, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, KIND_EXPECTED_SUBJECTS, KNOWLEDGE_GAP_KIND_SPEC, KNOWLEDGE_POISONING_KIND_SPEC, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, type LlmCorrectnessCheckerOpts, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MatchResult, type MatcherResult, type MeasurementPolicy, type MergeOptions, MetricsCollector, type MuffledFinder, type MuffledFinding, MultiLayerVerifier, type MultiToolchainLayerConfig, type Mutator, Mutex, type Objective, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParetoResult, type PersistedFinding, 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 ProducedProposal, type ProducedState, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposalEventLike, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, RAW_FINDING_SCHEMA_PROMPT, type RawAnalystFinding, RawAnalystFindingSchema, 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 RepoRef, type RequirementCheck, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run$1 as Run, type RunCommandInput, type RunCommandResult, type RunConfig, RunCritic, type RunCriticAdapterOpts, type RunCriticOptions, type RunDiff, RunFilter, RunRecord, type RunScore, type RunScoreWeights, type RunTrace, type RuntimeEventLike, SEMANTIC_CONCEPT_JUDGE_VERSION, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type SatisfiedBy, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SemanticConceptJudgeAdapterOpts, type SemanticConceptJudgeInput, type SemanticConceptJudgeOptions, type SemanticConceptJudgeResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, Severity, type SignedManifest, type SignedManifestAlgo, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, Span, type SteeringBundle, type SteeringDelta, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type SteeringRolePrompt, type StepAttribution, type SynthesisReason, type SynthesisTarget, type TaskGold, TestResult, type ThresholdContract, TokenCounter, type TokenSpec, type ToolCallEventLike, TraceAnalysisStore, type TraceAnalystAdapterOpts, type TraceAnalystGolden, type TraceAnalystKindSpec, TraceEmitter, TraceEvent, TraceStore, type TraceToolGroupName, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UNIVERSAL_FINDERS, type ValidationContext, type ValidationIssue, type ValidationResult, type VerifierAdapterOpts, VerifyContext, VerifyOptions, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkflowTopology, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, aggregatePrReviewScore, aggregateRunScore, analyzeAntiSlop, analyzeSeries, appendScorecard, assertRealBackend, attributeCounterfactuals, bisect, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildTraceToolsForGroup, byteLengthRange, canaryLeakView, canonicalize, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, clamp01, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, composeValidators, containsAll, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createJudgeAdapter, createLlmCorrectnessChecker, createRunCriticAdapter, createSandboxPool, createSemanticConceptJudge, createSemanticConceptJudgeAdapter, createTraceAnalystAdapter, createTraceAnalystKind, createVerifierAdapter, crossTraceDiff, crowdingDistance, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultIsMaterial, defaultJudges, defaultReferenceReplayMatcher, deployGateLayer, diffFindings, diffScorecard, discoverPersonas, distillPlaybook, dominates, estimateCost, estimateTokens, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, extractProducedState, fileContains, fileExists, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, precision as goldenPrecision, hashContent, hashJson, htmlContainsElement, httpGithubClient, inMemoryReferenceReplayStore, isOtelConfigured, jsonHasKeys, jsonShape, jsonlReferenceReplayStore, keyPreserved, liftSeverity, linterJudge, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, matchGoldens, mergeLayerResults, mergeSteeringBundle, multiToolchainLayer, notBlocked, paraphraseRobustness, paraphraseRobustnessScenarios, paretoFrontier, paretoFrontierWithCrowding, parseCorrectnessResponse, parseFindingSubject, parseRawFinding, parseReflectionResponse, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, printDriverSummary, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatch, regexMatches, renderFindingSubject, renderMarkdownReport, renderPlaybookMarkdown, renderPriorFindings, renderSteeringText, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runCounterfactual, runE2EWorkflow, runExpectations, runHarnessExperiment, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runSelfPlay, runSemanticConceptJudge, scalarScore, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, securityJudge, selectHarnessVariant, sentenceReorderMutator, signManifest, statusAdvanced, summarizeBackendIntegrity, summarizeHarnessResults, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toPrometheusText, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyCompletion, verifyManifest, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
|
5594
|
+
export { ANALYST_SEVERITIES, type ActiveLearningOptions, type AdapterRun, AgentDriver, type AgentDriverConfig, AgentEvalError, type AgentProfile, type AlignmentOp, Analyst, AnalystContext, AnalystCost, AnalystFinding, AnalystSeverity, AnalyzeTracesInput, AnalyzeTracesOptions, AnalyzeTracesResult, type AntiSlopConfig, type AntiSlopIssue, type AntiSlopReport, Artifact$1 as Artifact, type Artifact as ArtifactCheckArtifact, type ArtifactEventLike, type ArtifactValidator, type AssertCrossFamilyOptions, type AssertSingleBackendOptions, type AutoPrClient, AxGepaSteeringOptimizer, type AxSteeringOptimizerConfig, type BackendDescriptor, BackendIntegrityError, type BackendIntegrityReport, BaselineReport, BehaviorAssertion, BenchmarkReport, BenchmarkRunner, BenchmarkRunnerConfig, type BisectOptions, type BisectResult, type BisectStep, BudgetBreachError, BudgetGuard, BudgetLedgerEntry, BudgetSpec, CallExpectation, type CanaryAlert, type CanaryKind, type CanaryLeak, type CanaryOptions, type CanaryReport, type CanarySeverity, type CandidateScenario, type CausalAttributionReport, type CellVerdict, CheckResult, CollectedArtifacts, type CommandRunner, CompletionCriterion, type CompletionRequirement, type CompletionVerdict, type ConceptComplexity, type ConceptFinding, type ConceptSpec, type ConceptWeightStrategy, type ContinuityCheck, type ContinuityCheckResult, type ContinuityReport, type ContinuitySnapshotPair, type ContractMetric, type ContractReport, ConvergenceTracker, type CorrectnessChecker, type CostEntry, type CostSummary, CostTracker, type CounterfactualContext, type CounterfactualMutation, type CounterfactualResult, type CounterfactualRunner, type CreateDefaultReviewerOptions, type CreateSandboxPoolOpts, type CreateTraceAnalystKindOpts, CrossFamilyError, type CrossTraceDiff, type CrossTraceDiffOptions, D1ExperimentStore, type D1ExperimentStoreOptions, type D1Like, type D1PreparedStatementLike, DEFAULT_AGENT_SLOS, DEFAULT_COMPLEXITY_WEIGHTS, DEFAULT_FINDERS, DEFAULT_HARNESS_OBJECTIVES, DEFAULT_MUTATION_PRIMITIVES, DEFAULT_MUTATORS, DEFAULT_PR_REVIEW_SCORE_WEIGHTS, DEFAULT_RUN_SCORE_WEIGHTS, DEFAULT_SEVERITY_WEIGHTS, DEFAULT_TRACE_ANALYST_KINDS, Dataset, DatasetScenario, type DecideNextUserTurnOpts, type DeployFamily, type DeployGateLayerInput, type DeployRunResult, type DeployRunner, type DiffPolicy, type DiffScorecardOptions, type DirEntry, type Direction, type DiscoverPersonasOptions, type DiscoveredPersona, DriverResult, DriverState, DualAgentBench, type DualAgentBenchConfig, type DualAgentReport, type DualAgentRound, type DualAgentScenario, type DualAgentScenarioResult, ERROR_COUNT_PATTERNS, type ErrorCountPattern, type EvolutionRound, type ExecutorConfig, type Expectation, type Experiment, type Run as ExperimentRun, type ExperimentStore, ExperimentTracker, type ExportedRewardModel, type ExtractOptions, type ExtractResult, FAILURE_MODE_KIND_SPEC, FINDING_SUBJECT_GRAMMAR_PROMPT, FINDING_SUBJECT_KINDS, type FactorContribution, type FactorialCell, FeedbackLabel, FeedbackTrajectory, FeedbackTrajectoryStore, type FileChange, FileSystemExperimentStore, type FileSystemExperimentStoreOptions, type FindingSubject, type FindingSubjectKind, FindingSubjectStringSchema, type FindingsDiff, FindingsStore, type FlowAction, type FlowLayerEnv, type FlowLayerFactoryInput, type FlowRunner, type FlowRunnerStepResult, type FlowSpec, type FlowStep, type GhCliClientOptions, type GoldenSeverity, type GoldenSpec, type HarnessAdapter, HarnessConfig, type HarnessExperimentConfig, type HarnessExperimentResult, type HarnessIntervention, type HarnessRunRequest, type HarnessRunResult, type HarnessScenario, type HarnessSelection, type HarnessVariant, type HarnessVariantReport, HoldoutAuditor, type HostedJudgeConfig, type HostedJudgeDimension, type HostedJudgeRequest, type HostedJudgeResponse, type HostedRunCriticConfig, type HostedRunScoreRequest, type HostedRunScoreResponse, type HttpGithubClientOptions, type HypothesisManifest, type HypothesisResult, IMPROVEMENT_KIND_SPEC, INTENT_MATCH_JUDGE_VERSION, type ImageData, InMemoryExperimentStore, InMemoryWorkspaceInspector, type InferenceScorer, type InspectorContext, type IntentMatchInput, type IntentMatchOptions, type IntentMatchResult, type InteractionContribution, type JudgeAdapterOpts, type JudgeFamily, type JudgeFleetOptions, JudgeFn, JudgeInput, type JudgeReplayResult, type JudgeRetryOutcome, type JudgeRetryPolicy, JudgeRunner, KIND_EXPECTED_SUBJECTS, KNOWLEDGE_GAP_KIND_SPEC, KNOWLEDGE_POISONING_KIND_SPEC, type KeywordConceptSpec, type KeywordCoverageFinding, type KeywordCoverageOptions, type KeywordCoverageResult, type LangfuseEnvelope, type LangfuseGeneration, type LangfuseScore, Layer, LayerResult, type LiveProofArtifact, type LiveProofConfig, type LiveProofContext, type LiveProofResult, LlmClientOptions, type LlmCorrectnessCheckerOpts, LlmSpan, LockedJsonlAppender, MODEL_PRICING, type MatchResult, type MatcherResult, type MeasurementPolicy, type MergeOptions, MetricsCollector, type MuffledFinder, type MuffledFinding, MultiLayerVerifier, type MultiToolchainLayerConfig, type Mutator, Mutex, type Objective, type Oracle, type OracleObservation, type OracleReport, type OracleResult, type OrthogonalityInput, type OrthogonalityResult, OtelExportConfig, OtelExporter, type OtelPipelineHandle, type OtelPipelineOptions, PairwiseSteeringOptimizer, type ParaphraseRobustnessScenarioInput, type ParaphraseRobustnessScenarioResult, type ParetoResult, type PersistedFinding, 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 ProducedProposal, type ProducedState, ProductClient, ProductClientConfig, type PromptHandle, PromptRegistry, type ProposalEventLike, type ProposeAutomatedPullRequestInput, type ProposeAutomatedPullRequestResult, RAW_FINDING_SCHEMA_PROMPT, type RawAnalystFinding, RawAnalystFindingSchema, 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 RepoRef, type RequirementCheck, type ReviewerMemoryEntry, type ReviewerOutput, type ReviewerPromptInput, type ReviewerSoftFailDefaults, type ReviewerVerificationSummary, type RobustnessResult, Run$1 as Run, type RunCommandInput, type RunCommandResult, type RunConfig, RunCritic, type RunCriticAdapterOpts, type RunCriticOptions, type RunDiff, RunFilter, RunRecord, type RunScore, type RunScoreWeights, type RunTrace, type RuntimeEventLike, SEMANTIC_CONCEPT_JUDGE_VERSION, SandboxDriver, SandboxHarnessResult, type SandboxJudgeKind, type SandboxJudgeResult, type SandboxJudgeSpec, type SandboxPool, type SatisfiedBy, type ScanOptions, Scenario, type ScenarioCost, ScenarioFile, ScenarioRegistry, ScenarioResult, type Scorecard, type ScorecardCell, type ScorecardCellDiff, type ScorecardDiff, type ScorecardEntry, type ScorecardLogLine, type ScoredTarget, type SelfPlayOptions, type SelfPlayProposer, type SelfPlayScorer, type SemanticConceptJudgeAdapterOpts, type SemanticConceptJudgeInput, type SemanticConceptJudgeOptions, type SemanticConceptJudgeResult, type SeriesConvergenceOptions, type SeriesConvergenceResult, Severity, type SignedManifest, type SignedManifestAlgo, type SingleBackendDivergence, SingleBackendError, type SingleBackendField, type SingleBackendReport, type Slo, type SloCheckResult, type SloComparator, type SloReport, type SloSeverity, type SlopCategory, type SlotFactory, Span, type SteeringBundle, type SteeringDelta, type SteeringOptimizationResult, type SteeringOptimizationRow, type SteeringOptimizationSelector, type SteeringOptimizerBackend, type SteeringOptimizerConfig, type SteeringRolePrompt, type StepAttribution, type SynthesisReason, type SynthesisTarget, type TaskGold, TestResult, type ThresholdContract, TokenCounter, type TokenSpec, type ToolCallEventLike, TraceAnalysisStore, type TraceAnalystAdapterOpts, type TraceAnalystGolden, type TraceAnalystKindSpec, TraceEmitter, TraceEvent, TraceStore, type TraceToolGroupName, type TracedAnalystOptions, type TracedJudgeOptions, Trajectory, TrajectoryStep, type TrialTrace, TurnMetrics, UNIVERSAL_FINDERS, type ValidationContext, type ValidationIssue, type ValidationResult, type VerifierAdapterOpts, VerifyContext, VerifyOptions, type VisualDiffOptions, type VisualDiffResult, type ViteDeployRunnerInput, type WorkflowTopology, type WorkspaceAssertion, type WorkspaceAssertionResult, type WorkspaceInspector, type WorkspaceSnapshot, type WranglerDeployRunnerInput, adversarialJudge, agentProfileHash, aggregatePrReviewScore, aggregateRunScore, analyzeAntiSlop, analyzeSeries, appendScorecard, assertCrossFamily, assertRealBackend, assertSingleBackend, attributeCounterfactuals, bisect, buildDriverSystemPrompt, buildReflectionPrompt, buildReviewerPrompt, buildTraceToolsForGroup, byteLengthRange, canaryLeakView, canonicalize, causalAttribution, checkBehavioralCanary, checkCanaries, checkSlos, clamp01, codeExecutionJudge, coherenceJudge, collectionPreserved, commentsForSource, commitBisect, compareReferenceReplay, compilerJudge, composeValidators, containsAll, createAntiSlopJudge, createCustomJudge, createDefaultReviewer, createDomainExpertJudge, createIntentMatchJudge, createJudgeAdapter, createLlmCorrectnessChecker, createRunCriticAdapter, createSandboxPool, createSemanticConceptJudge, createSemanticConceptJudgeAdapter, createTraceAnalystAdapter, createTraceAnalystKind, createVerifierAdapter, crossTraceDiff, crowdingDistance, decideNextUserTurn, decideReferenceReplayPromotion, decideReferenceReplayRunPromotion, defaultIsMaterial, defaultJudges, defaultReferenceReplayMatcher, deployGateLayer, diffFindings, diffScorecard, discoverPersonas, distillPlaybook, dominates, estimateCost, estimateTokens, evaluateContract, evaluateHypothesis, evaluateOracles, executeScenario, expectAgent, exportRewardModel, extractAssetUrls, extractErrorCount, extractProducedState, fileContains, fileExists, findAutoMatchNoExpectation, findConstructorCwdDropped, findFallbackToPass, findLiteralTruePass, findSkipCountsAsPass, flowLayer, formatBenchmarkReport, formatDriverReport, formatFindings, formatScorecardDiff, ghCliClient, precision as goldenPrecision, hashContent, hashJson, htmlContainsElement, httpGithubClient, inMemoryReferenceReplayStore, isOtelConfigured, jsonHasKeys, jsonShape, jsonlReferenceReplayStore, judgeFamily, keyPreserved, liftSeverity, linterJudge, loadScorecard, loadScorerFromGrader, localCommandRunner, lowercaseMutator, matchGoldens, mergeLayerResults, mergeSteeringBundle, multiToolchainLayer, notBlocked, paraphraseRobustness, paraphraseRobustnessScenarios, paretoFrontier, paretoFrontierWithCrowding, parseCorrectnessResponse, parseFindingSubject, parseRawFinding, parseReflectionResponse, passOrthogonality, pixelDeltaRatio, politenessPrefixMutator, printDriverSummary, promptBisect, proposeAutomatedPullRequest, proposeSynthesisTargets, recordRuns, recordRunsToScorecard, referenceReplayRunsToSteeringRows, referenceReplayScenarioToRunScore, regexMatch, regexMatches, renderFindingSubject, renderMarkdownReport, renderPlaybookMarkdown, renderPriorFindings, renderSteeringText, replayScorerOverCorpus, replayTraceThroughJudge, resetLockedAppendersForTesting, rowCount, rowWhere, runAssertions, runBehavioralCanaries, runCanaries, runCounterfactual, runE2EWorkflow, runExpectations, runHarnessExperiment, runIntentMatchJudge, runJudgeFleet, runKeywordCoverageJudge, runKeywordCoverageJudgeUrl, runLiveProof, runReferenceReplay, runSelfPlay, runSemanticConceptJudge, scalarScore, scanForMuffledGates, scoreContinuity, scorePrReviewComments, scorePrReviewSource, scoreReferenceReplay, securityJudge, selectHarnessVariant, sentenceReorderMutator, signManifest, statusAdvanced, summarizeBackendIntegrity, summarizeHarnessResults, summarizePrReviewBenchmark, testJudge, textInSnapshot, toLangfuseEnvelope, toPrometheusText, traceJudge, traceJudgeEnsemble, tracedAnalyzeTraces, typoMutator, urlContains, verifyCompletion, verifyManifest, visualDiff, viteDeployRunner, weightedRecall, whitespaceCollapseMutator, withJudgeRetry, withOtelPipeline, wranglerDeployRunner };
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
computeToolUseMetrics,
|
|
32
32
|
iqr,
|
|
33
33
|
welchsTTest
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QDOSODID.js";
|
|
35
35
|
import {
|
|
36
36
|
exportTrainingData,
|
|
37
37
|
toNdjson
|
|
@@ -89,10 +89,10 @@ import {
|
|
|
89
89
|
evaluateReleaseConfidence,
|
|
90
90
|
judgeReplayGate,
|
|
91
91
|
renderReleaseReport
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-AIXHUIHG.js";
|
|
93
93
|
import {
|
|
94
94
|
runEvalCampaign
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-GM476SZU.js";
|
|
96
96
|
import {
|
|
97
97
|
AGENT_PROFILE_KINDS,
|
|
98
98
|
AgentProfileCellValidationError,
|
|
@@ -122,18 +122,20 @@ import {
|
|
|
122
122
|
paretoChart,
|
|
123
123
|
researchReport,
|
|
124
124
|
summaryTable
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-OLIBRKRD.js";
|
|
126
126
|
import {
|
|
127
127
|
benjaminiHochberg,
|
|
128
128
|
bonferroni,
|
|
129
129
|
calibrateJudge,
|
|
130
130
|
calibrateJudgeContinuous,
|
|
131
|
+
cliffsDelta,
|
|
131
132
|
cohensD,
|
|
132
133
|
confidenceInterval,
|
|
133
134
|
continuousAgreement,
|
|
134
135
|
corpusInterRaterAgreement,
|
|
135
136
|
corpusInterRaterAgreementFromJudgeScores,
|
|
136
137
|
interRaterReliability,
|
|
138
|
+
interpretCliffs,
|
|
137
139
|
mannWhitneyU,
|
|
138
140
|
normalizeScores,
|
|
139
141
|
pairedBootstrap,
|
|
@@ -144,9 +146,10 @@ import {
|
|
|
144
146
|
requiredSampleSize,
|
|
145
147
|
selfPreference,
|
|
146
148
|
verbosityBias,
|
|
149
|
+
weightedComposite,
|
|
147
150
|
weightedMean,
|
|
148
151
|
wilcoxonSignedRank
|
|
149
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-S3SDD56V.js";
|
|
150
153
|
import {
|
|
151
154
|
DEFAULT_TRACE_ANALYST_BUDGETS,
|
|
152
155
|
FileSystemTraceStore,
|
|
@@ -3589,6 +3592,129 @@ function assertRealBackend(records, opts = {}) {
|
|
|
3589
3592
|
return report;
|
|
3590
3593
|
}
|
|
3591
3594
|
|
|
3595
|
+
// src/integrity/single-backend.ts
|
|
3596
|
+
var SingleBackendError = class extends AgentEvalError {
|
|
3597
|
+
constructor(message, report) {
|
|
3598
|
+
super("backend_integrity", message);
|
|
3599
|
+
this.report = report;
|
|
3600
|
+
this.name = "SingleBackendError";
|
|
3601
|
+
}
|
|
3602
|
+
report;
|
|
3603
|
+
};
|
|
3604
|
+
function stripSlash(url) {
|
|
3605
|
+
return url.replace(/\/+$/, "");
|
|
3606
|
+
}
|
|
3607
|
+
function assertSingleBackend(agent2, judge, opts = {}) {
|
|
3608
|
+
const divergences = [];
|
|
3609
|
+
if (agent2.kind !== judge.kind) {
|
|
3610
|
+
divergences.push({ field: "kind", agent: agent2.kind, judge: judge.kind });
|
|
3611
|
+
}
|
|
3612
|
+
if (stripSlash(agent2.baseUrl) !== stripSlash(judge.baseUrl)) {
|
|
3613
|
+
divergences.push({ field: "baseUrl", agent: agent2.baseUrl, judge: judge.baseUrl });
|
|
3614
|
+
}
|
|
3615
|
+
if (agent2.model !== judge.model) {
|
|
3616
|
+
divergences.push({ field: "model", agent: agent2.model, judge: judge.model });
|
|
3617
|
+
}
|
|
3618
|
+
if (agent2.provider !== judge.provider) {
|
|
3619
|
+
divergences.push({ field: "provider", agent: agent2.provider, judge: judge.provider });
|
|
3620
|
+
}
|
|
3621
|
+
const agentHasKey = Boolean(agent2.apiKey);
|
|
3622
|
+
const judgeHasKey = Boolean(judge.apiKey);
|
|
3623
|
+
if (agentHasKey !== judgeHasKey) {
|
|
3624
|
+
divergences.push({
|
|
3625
|
+
field: "apiKeyPresence",
|
|
3626
|
+
agent: agentHasKey ? "set" : "empty",
|
|
3627
|
+
judge: judgeHasKey ? "set" : "empty"
|
|
3628
|
+
});
|
|
3629
|
+
}
|
|
3630
|
+
const blocking = opts.strict ? divergences : divergences.filter((d) => d.field !== "model");
|
|
3631
|
+
const ok = blocking.length === 0;
|
|
3632
|
+
const report = { ok, divergences };
|
|
3633
|
+
if (!ok) {
|
|
3634
|
+
const agentLabel = opts.agentLabel ?? "agent";
|
|
3635
|
+
const judgeLabel = opts.judgeLabel ?? "judge";
|
|
3636
|
+
const detail = blocking.map((d) => `${d.field}: ${agentLabel}=${d.agent ?? "\u2205"} vs ${judgeLabel}=${d.judge ?? "\u2205"}`).join("; ");
|
|
3637
|
+
throw new SingleBackendError(
|
|
3638
|
+
`single-backend: ${agentLabel} and ${judgeLabel} backends diverge \u2014 the judge would re-route through a different backend than the agent (${detail})`,
|
|
3639
|
+
report
|
|
3640
|
+
);
|
|
3641
|
+
}
|
|
3642
|
+
return report;
|
|
3643
|
+
}
|
|
3644
|
+
|
|
3645
|
+
// src/judge-families.ts
|
|
3646
|
+
var PROVIDER_PREFIX = {
|
|
3647
|
+
anthropic: "anthropic",
|
|
3648
|
+
openai: "openai",
|
|
3649
|
+
"azure-openai": "openai",
|
|
3650
|
+
google: "google",
|
|
3651
|
+
"google-vertex": "google",
|
|
3652
|
+
meta: "meta",
|
|
3653
|
+
"meta-llama": "meta",
|
|
3654
|
+
mistral: "mistral",
|
|
3655
|
+
mistralai: "mistral",
|
|
3656
|
+
deepseek: "deepseek",
|
|
3657
|
+
xai: "xai",
|
|
3658
|
+
qwen: "qwen",
|
|
3659
|
+
alibaba: "qwen",
|
|
3660
|
+
cohere: "cohere",
|
|
3661
|
+
amazon: "amazon",
|
|
3662
|
+
bedrock: "amazon"
|
|
3663
|
+
};
|
|
3664
|
+
var NAME_PATTERNS = [
|
|
3665
|
+
[/claude/i, "anthropic"],
|
|
3666
|
+
[/\b(gpt|davinci|babbage)\b|^o[134]\b|[-/]o[134]\b|gpt-/i, "openai"],
|
|
3667
|
+
[/gemini|palm|gemma|bison/i, "google"],
|
|
3668
|
+
[/llama/i, "meta"],
|
|
3669
|
+
[/mi(s|x)tral|codestral|magistral/i, "mistral"],
|
|
3670
|
+
[/deepseek/i, "deepseek"],
|
|
3671
|
+
[/grok/i, "xai"],
|
|
3672
|
+
[/qwen/i, "qwen"],
|
|
3673
|
+
[/command-?(r|a)?/i, "cohere"],
|
|
3674
|
+
[/\b(nova|titan)\b/i, "amazon"]
|
|
3675
|
+
];
|
|
3676
|
+
function judgeFamily(modelId) {
|
|
3677
|
+
const id = modelId.trim().split("@")[0].toLowerCase();
|
|
3678
|
+
const slash = id.indexOf("/");
|
|
3679
|
+
if (slash > 0) {
|
|
3680
|
+
const prefix = id.slice(0, slash);
|
|
3681
|
+
const mapped = PROVIDER_PREFIX[prefix];
|
|
3682
|
+
if (mapped) return mapped;
|
|
3683
|
+
}
|
|
3684
|
+
for (const [pattern, family] of NAME_PATTERNS) {
|
|
3685
|
+
if (pattern.test(id)) return family;
|
|
3686
|
+
}
|
|
3687
|
+
return "unknown";
|
|
3688
|
+
}
|
|
3689
|
+
var CrossFamilyError = class extends Error {
|
|
3690
|
+
constructor(message, families, models) {
|
|
3691
|
+
super(message);
|
|
3692
|
+
this.families = families;
|
|
3693
|
+
this.models = models;
|
|
3694
|
+
this.name = "CrossFamilyError";
|
|
3695
|
+
}
|
|
3696
|
+
families;
|
|
3697
|
+
models;
|
|
3698
|
+
};
|
|
3699
|
+
function assertCrossFamily(models, opts = {}) {
|
|
3700
|
+
const minFamilies = opts.minFamilies ?? 2;
|
|
3701
|
+
const families = /* @__PURE__ */ new Set();
|
|
3702
|
+
for (const m of models) {
|
|
3703
|
+
const f = judgeFamily(m);
|
|
3704
|
+
if (f === "unknown" && !opts.allowUnknown) continue;
|
|
3705
|
+
families.add(f);
|
|
3706
|
+
}
|
|
3707
|
+
const list = [...families].sort();
|
|
3708
|
+
if (list.length < minFamilies) {
|
|
3709
|
+
throw new CrossFamilyError(
|
|
3710
|
+
`judge ensemble spans ${list.length} provider famil${list.length === 1 ? "y" : "ies"} (${list.join(", ") || "none"}) but ${minFamilies} required \u2014 a single-family ensemble is correlated bias, not independent signal`,
|
|
3711
|
+
list,
|
|
3712
|
+
models
|
|
3713
|
+
);
|
|
3714
|
+
}
|
|
3715
|
+
return list;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3592
3718
|
// src/judges.ts
|
|
3593
3719
|
function createDomainExpertJudge(domain) {
|
|
3594
3720
|
return async (tc, { scenario, turns }) => {
|
|
@@ -10182,6 +10308,7 @@ export {
|
|
|
10182
10308
|
ConfigError,
|
|
10183
10309
|
ConvergenceTracker,
|
|
10184
10310
|
CostTracker,
|
|
10311
|
+
CrossFamilyError,
|
|
10185
10312
|
D1ExperimentStore,
|
|
10186
10313
|
DEFAULT_AGENT_SLOS,
|
|
10187
10314
|
DEFAULT_COMPLEXITY_WEIGHTS,
|
|
@@ -10256,6 +10383,7 @@ export {
|
|
|
10256
10383
|
SEMANTIC_CONCEPT_JUDGE_VERSION,
|
|
10257
10384
|
SandboxHarness,
|
|
10258
10385
|
ScenarioRegistry,
|
|
10386
|
+
SingleBackendError,
|
|
10259
10387
|
SpanNotFoundError,
|
|
10260
10388
|
SubprocessSandboxDriver,
|
|
10261
10389
|
TRACE_ANALYST_ACTOR_DESCRIPTION,
|
|
@@ -10284,11 +10412,13 @@ export {
|
|
|
10284
10412
|
analyzeTraces,
|
|
10285
10413
|
appendScorecard,
|
|
10286
10414
|
argHash,
|
|
10415
|
+
assertCrossFamily,
|
|
10287
10416
|
assertLlmRoute,
|
|
10288
10417
|
assertRealBackend,
|
|
10289
10418
|
assertReleaseConfidence,
|
|
10290
10419
|
assertRunAgentProfileCell,
|
|
10291
10420
|
assertRunCaptured,
|
|
10421
|
+
assertSingleBackend,
|
|
10292
10422
|
assignFeedbackSplit,
|
|
10293
10423
|
attributeCounterfactuals,
|
|
10294
10424
|
backoffMs,
|
|
@@ -10323,6 +10453,7 @@ export {
|
|
|
10323
10453
|
clamp01,
|
|
10324
10454
|
classifyEuAiRisk,
|
|
10325
10455
|
classifyFailure,
|
|
10456
|
+
cliffsDelta,
|
|
10326
10457
|
codeExecutionJudge,
|
|
10327
10458
|
cohensD,
|
|
10328
10459
|
coherenceJudge,
|
|
@@ -10429,6 +10560,7 @@ export {
|
|
|
10429
10560
|
inMemoryReviewStore,
|
|
10430
10561
|
inferDomainKeywords,
|
|
10431
10562
|
interRaterReliability,
|
|
10563
|
+
interpretCliffs,
|
|
10432
10564
|
iqr,
|
|
10433
10565
|
isJudgeSpan,
|
|
10434
10566
|
isLlmSpan,
|
|
@@ -10444,6 +10576,7 @@ export {
|
|
|
10444
10576
|
jsonShape,
|
|
10445
10577
|
jsonlReferenceReplayStore,
|
|
10446
10578
|
jsonlReviewStore,
|
|
10579
|
+
judgeFamily,
|
|
10447
10580
|
judgeReplayGate,
|
|
10448
10581
|
judgeSpans,
|
|
10449
10582
|
keyPreserved,
|
|
@@ -10600,6 +10733,7 @@ export {
|
|
|
10600
10733
|
visualDiff,
|
|
10601
10734
|
viteDeployRunner,
|
|
10602
10735
|
vitestTestParser,
|
|
10736
|
+
weightedComposite,
|
|
10603
10737
|
weightedMean,
|
|
10604
10738
|
weightedRecall,
|
|
10605
10739
|
welchsTTest,
|