bridgebench 3.1.0-alpha.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/CITATION.cff +15 -0
- package/LICENSE +21 -0
- package/README.md +249 -0
- package/dist/chunk-4TWPCPRP.cjs +1097 -0
- package/dist/chunk-4TWPCPRP.cjs.map +1 -0
- package/dist/chunk-7YCJSOK7.cjs +398 -0
- package/dist/chunk-7YCJSOK7.cjs.map +1 -0
- package/dist/chunk-CIXITJW6.cjs +249 -0
- package/dist/chunk-CIXITJW6.cjs.map +1 -0
- package/dist/chunk-EQHRUV2I.js +1466 -0
- package/dist/chunk-EQHRUV2I.js.map +1 -0
- package/dist/chunk-JTVNKSMO.js +1096 -0
- package/dist/chunk-JTVNKSMO.js.map +1 -0
- package/dist/chunk-LFKEV2YL.js +398 -0
- package/dist/chunk-LFKEV2YL.js.map +1 -0
- package/dist/chunk-NJTYVNP4.cjs +1467 -0
- package/dist/chunk-NJTYVNP4.cjs.map +1 -0
- package/dist/chunk-UECBSKTD.js +244 -0
- package/dist/chunk-UECBSKTD.js.map +1 -0
- package/dist/cli.cjs +409 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +408 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.cjs +42 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +93 -0
- package/dist/client.d.ts +93 -0
- package/dist/client.js +42 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts/index.cjs +47 -0
- package/dist/contracts/index.cjs.map +1 -0
- package/dist/contracts/index.d.cts +14 -0
- package/dist/contracts/index.d.ts +14 -0
- package/dist/contracts/index.js +47 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/index.cjs +171 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +214 -0
- package/dist/index.d.ts +214 -0
- package/dist/index.js +171 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-CCR9Mg1c.d.cts +319 -0
- package/dist/logger-QJU7SBDz.d.ts +319 -0
- package/dist/reports-4CejmOHf.d.cts +454 -0
- package/dist/reports-s2CTnGN8.d.ts +454 -0
- package/dist/tasks-CpaCJ6JE.d.cts +151 -0
- package/dist/tasks-CpaCJ6JE.d.ts +151 -0
- package/dist/tasks.cjs +22 -0
- package/dist/tasks.cjs.map +1 -0
- package/dist/tasks.d.cts +39 -0
- package/dist/tasks.d.ts +39 -0
- package/dist/tasks.js +22 -0
- package/dist/tasks.js.map +1 -0
- package/docs/README.md +25 -0
- package/docs/glossary.md +49 -0
- package/docs/methodology.md +58 -0
- package/docs/private-packs.md +74 -0
- package/docs/replay-elo.md +79 -0
- package/docs/task-authoring.md +80 -0
- package/package.json +137 -0
- package/tasks/hallucination/public/boundary-coverage-audit.yaml +274 -0
- package/tasks/hallucination/public/boundary-migration-audit.yaml +284 -0
- package/tasks/hallucination/public/conflict-dependency-versions.yaml +324 -0
- package/tasks/hallucination/public/conflict-runbook-versions.yaml +229 -0
- package/tasks/hallucination/public/fabrication-agent-tools.yaml +224 -0
- package/tasks/hallucination/public/fabrication-api-surface.yaml +239 -0
- package/tasks/hallucination/public/fidelity-commit-attribution.yaml +304 -0
- package/tasks/hallucination/public/fidelity-config-drift.yaml +307 -0
- package/tasks/hallucination/public/missing-deploy-window.yaml +204 -0
- package/tasks/hallucination/public/missing-latency-baseline.yaml +239 -0
- package/tasks/hallucination/public/premise-quota-breach.yaml +202 -0
- package/tasks/hallucination/public/premise-rollback-cause.yaml +235 -0
- package/tasks/reasoning/public/constraint-capacity-allocation.yaml +196 -0
- package/tasks/reasoning/public/constraint-deployment-policy.yaml +203 -0
- package/tasks/reasoning/public/counterexample-authorization-rule.yaml +278 -0
- package/tasks/reasoning/public/counterexample-scheduler-starvation.yaml +290 -0
- package/tasks/reasoning/public/root-cache-tenant-leak.yaml +225 -0
- package/tasks/reasoning/public/root-event-ordering.yaml +184 -0
- package/tasks/reasoning/public/stateful-lease-handoff.yaml +213 -0
- package/tasks/reasoning/public/stateful-retry-budget.yaml +222 -0
- package/tasks/reasoning/public/synthesis-api-contract.yaml +214 -0
- package/tasks/reasoning/public/synthesis-permission-migration.yaml +190 -0
- package/tasks/reasoning/public/uncertainty-conflicting-telemetry.yaml +242 -0
- package/tasks/reasoning/public/uncertainty-incomplete-incident.yaml +223 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
export { CONTRACTS_VERSION } from './contracts/index.js';
|
|
2
|
+
import { A as ArenaStore, a as ArenaLogger, R as RunManifest } from './logger-QJU7SBDz.js';
|
|
3
|
+
export { b as ArenaStoreConfig, F as FileArenaLogger, L as LogLevel, c as RUN_MANIFEST_VERSION, d as RunManifestSchema, e as canonicalJson, f as categoryStoreConfig, g as createRunManifest, n as noopLogger, r as redactSecrets, h as runIdFromManifest, i as runManifestHash } from './logger-QJU7SBDz.js';
|
|
4
|
+
import { O as OpenRouterGateway, c as ArenaEventSink, f as ArenaRunConfig, e as ArenaExecutionOptions, g as ArenaRunResult, S as ScheduledMatch, l as CompetitorSuccess, P as PanelDecision, t as ModelRegistryEntry, C as ChatRequest, r as ModelCompletion, M as MatchResult, E as EloState, h as ArenaSnapshot, j as CompetitorResponse } from './reports-s2CTnGN8.js';
|
|
5
|
+
export { A as ArenaEvent, a as ArenaEventDataMap, b as ArenaEventInput, d as ArenaEventType, i as CompetitorFailure, k as CompetitorResponseSchema, J as JUDGE_VERDICT_TRANSPORT_SCHEMA, m as JudgeVerdict, n as JudgeVerdictSchema, o as JudgeVote, p as JudgeVoteSchema, L as LeaderboardEntry, q as MatchResultSchema, s as ModelCompletionSchema, u as ModelRequestPolicy, v as ModelRole, w as ModelRoleSchema, x as PanelDecisionSchema, y as competitorContent, z as competitorCost, B as competitorOutputTokens, D as competitorReasoningTokens } from './reports-s2CTnGN8.js';
|
|
6
|
+
import { d as CompleteArenaTask, B as BenchmarkCategory, A as ArenaTask } from './tasks-CpaCJ6JE.js';
|
|
7
|
+
export { a as BenchmarkCategorySchema, C as CATEGORIES, b as CATEGORY_CLUSTERS, c as CATEGORY_META, M as METHODOLOGY_VERSION, T as TaskArtifact, e as TaskArtifactSchema, f as TaskPrivate, g as TaskPrivateSchema, h as TaskPublic, i as TaskPublicSchema } from './tasks-CpaCJ6JE.js';
|
|
8
|
+
import OpenAI from 'openai';
|
|
9
|
+
export { PrivateHalf, TASKS_PER_CATEGORY, TASKS_PER_CLUSTER, TaskLoader, buildCompetitorPrompt, competitorPromptPolicyHash, defaultTaskRoot, mergePrivateHalves, validatePublicTaskFile } from './tasks.js';
|
|
10
|
+
import 'zod';
|
|
11
|
+
|
|
12
|
+
declare class ArenaRunner {
|
|
13
|
+
private readonly gateway;
|
|
14
|
+
private readonly store;
|
|
15
|
+
private readonly onEvent?;
|
|
16
|
+
private readonly judges;
|
|
17
|
+
private readonly logger;
|
|
18
|
+
constructor(gateway: OpenRouterGateway, store: ArenaStore, onEvent?: ArenaEventSink | undefined, logger?: ArenaLogger);
|
|
19
|
+
private emit;
|
|
20
|
+
private observeCancellation;
|
|
21
|
+
private cancelRun;
|
|
22
|
+
private prepareRun;
|
|
23
|
+
run(config: ArenaRunConfig, tasks: CompleteArenaTask[], execution?: ArenaExecutionOptions): Promise<ArenaRunResult>;
|
|
24
|
+
private runMatch;
|
|
25
|
+
/** Surface signals that make a journaled response untrustworthy or a task too easy. */
|
|
26
|
+
private inspectResponse;
|
|
27
|
+
private runCompetitor;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare class ArenaCancellationError extends Error {
|
|
31
|
+
constructor(message?: string);
|
|
32
|
+
}
|
|
33
|
+
declare function isArenaCancellationError(error: unknown): error is ArenaCancellationError;
|
|
34
|
+
declare function throwIfCancelled(signal?: AbortSignal): void;
|
|
35
|
+
|
|
36
|
+
declare const ELO_INITIAL = 1000;
|
|
37
|
+
declare const ELO_K = 32;
|
|
38
|
+
declare function expectedScore(ratingA: number, ratingB: number): number;
|
|
39
|
+
declare function applyEloWin(ratingA: number, ratingB: number, winner: 'a' | 'b'): {
|
|
40
|
+
ratingA: number;
|
|
41
|
+
ratingB: number;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** Remove explicit competitor identity claims before an answer crosses into a judge prompt. */
|
|
45
|
+
declare function anonymizeCompetitorOutput(content: string): string;
|
|
46
|
+
declare function buildJudgePayload(task: CompleteArenaTask, modelAResponse: string, modelBResponse: string): string;
|
|
47
|
+
declare function judgePromptPolicyHash(category: BenchmarkCategory): string;
|
|
48
|
+
declare function judgeSystemPrompt(category: BenchmarkCategory): string;
|
|
49
|
+
declare class JudgePanel {
|
|
50
|
+
private readonly gateway;
|
|
51
|
+
private readonly onEvent?;
|
|
52
|
+
private readonly swapForJudge;
|
|
53
|
+
private readonly logger;
|
|
54
|
+
constructor(gateway: OpenRouterGateway, onEvent?: ArenaEventSink | undefined, logger?: ArenaLogger, swapForJudge?: (matchId: string, judgeId: string) => boolean);
|
|
55
|
+
judge(input: {
|
|
56
|
+
match: ScheduledMatch;
|
|
57
|
+
task: CompleteArenaTask;
|
|
58
|
+
responseA: CompetitorSuccess;
|
|
59
|
+
responseB: CompetitorSuccess;
|
|
60
|
+
}, signal?: AbortSignal): Promise<PanelDecision>;
|
|
61
|
+
private runJudge;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface MockOpenRouterOptions {
|
|
65
|
+
competitorText?: string;
|
|
66
|
+
judgeWinner?: 'MODEL_A' | 'MODEL_B';
|
|
67
|
+
chunkDelayMs?: number;
|
|
68
|
+
}
|
|
69
|
+
declare class MockOpenRouterGateway implements OpenRouterGateway {
|
|
70
|
+
private readonly options;
|
|
71
|
+
constructor(options?: MockOpenRouterOptions);
|
|
72
|
+
validateModel(_model: ModelRegistryEntry): Promise<void>;
|
|
73
|
+
complete(request: ChatRequest): Promise<ModelCompletion>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const MODEL_REGISTRY: Record<string, ModelRegistryEntry>;
|
|
77
|
+
declare const SOL_FABLE_PILOT_COMPETITOR_IDS: readonly ["openai/gpt-5.6-sol", "anthropic/claude-fable-5"];
|
|
78
|
+
declare function listModels(role?: ModelRegistryEntry['role']): ModelRegistryEntry[];
|
|
79
|
+
/**
|
|
80
|
+
* Resolve an optional run roster in registry order so repeated CLI flags are
|
|
81
|
+
* order-insensitive while the existing default schedule remains unchanged.
|
|
82
|
+
*/
|
|
83
|
+
declare function resolveCompetitorRoster(requestedCompetitorIds?: readonly string[]): ModelRegistryEntry[];
|
|
84
|
+
declare function getModel(modelId: string): ModelRegistryEntry;
|
|
85
|
+
|
|
86
|
+
declare function isRetryableError(message: string): boolean;
|
|
87
|
+
declare function sanitizeError(error: unknown): string;
|
|
88
|
+
declare class OpenRouterClient implements OpenRouterGateway {
|
|
89
|
+
private readonly client;
|
|
90
|
+
private readonly apiKey;
|
|
91
|
+
private readonly logger;
|
|
92
|
+
constructor(apiKey: string, logger?: ArenaLogger);
|
|
93
|
+
complete(request: ChatRequest): Promise<ModelCompletion>;
|
|
94
|
+
/**
|
|
95
|
+
* Fetch OpenRouter's own record of a journaled generation. This is the
|
|
96
|
+
* ground truth for native token counts, reasoning usage, provider routing,
|
|
97
|
+
* and upstream latency — use it to verify what the stream reported.
|
|
98
|
+
*/
|
|
99
|
+
fetchGeneration(generationId: string): Promise<Record<string, unknown>>;
|
|
100
|
+
validateModel(model: ModelRegistryEntry, signal?: AbortSignal): Promise<void>;
|
|
101
|
+
}
|
|
102
|
+
declare function parseJudgeVerdict(content: string): {
|
|
103
|
+
winner: "MODEL_A" | "MODEL_B";
|
|
104
|
+
confidence: number;
|
|
105
|
+
rationale: string;
|
|
106
|
+
criteria: {
|
|
107
|
+
correctness: string;
|
|
108
|
+
grounding: string;
|
|
109
|
+
constraintHandling: string;
|
|
110
|
+
completeness: string;
|
|
111
|
+
};
|
|
112
|
+
violations: string[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
declare const MAX_PROMPT_CHARS = 180000;
|
|
116
|
+
declare function assertPromptSize(request: ChatRequest): void;
|
|
117
|
+
declare function judgeVerdictJsonSchema(): Record<string, unknown>;
|
|
118
|
+
declare function runOpenRouterAttempt(client: OpenAI, request: ChatRequest, attempt: number, signal: AbortSignal): Promise<ModelCompletion>;
|
|
119
|
+
|
|
120
|
+
interface VerificationOptions {
|
|
121
|
+
manifestForRun?: (runId: string) => RunManifest | null;
|
|
122
|
+
requireManifests?: boolean;
|
|
123
|
+
}
|
|
124
|
+
interface VerifiedJournal {
|
|
125
|
+
category: BenchmarkCategory;
|
|
126
|
+
methodologyVersion: string | null;
|
|
127
|
+
matches: MatchResult[];
|
|
128
|
+
ratings: Record<string, number>;
|
|
129
|
+
points: Record<string, number>;
|
|
130
|
+
runs: string[];
|
|
131
|
+
warnings: string[];
|
|
132
|
+
}
|
|
133
|
+
declare function verifyJournal(input: MatchResult[], category: BenchmarkCategory, options?: VerificationOptions): VerifiedJournal;
|
|
134
|
+
declare function verifiedEloState(matches: MatchResult[], category: BenchmarkCategory): EloState;
|
|
135
|
+
|
|
136
|
+
interface SnapshotOptions extends VerificationOptions {
|
|
137
|
+
/** Seed empty standings with this run roster; defaults to every enabled competitor. */
|
|
138
|
+
competitorIds?: readonly string[];
|
|
139
|
+
}
|
|
140
|
+
declare function buildSnapshot(matches: MatchResult[], category: BenchmarkCategory, options?: SnapshotOptions): ArenaSnapshot;
|
|
141
|
+
declare function renderMarkdown(snapshot: ArenaSnapshot): string;
|
|
142
|
+
declare function writeReports(store: {
|
|
143
|
+
category: BenchmarkCategory;
|
|
144
|
+
readAll(): MatchResult[];
|
|
145
|
+
readRunManifest?(runId: string): RunManifest | null;
|
|
146
|
+
writeSnapshot(s: ArenaSnapshot): void;
|
|
147
|
+
writeMarkdown(s: string): void;
|
|
148
|
+
}, options?: SnapshotOptions): ArenaSnapshot;
|
|
149
|
+
|
|
150
|
+
declare function scheduleMatches(input: {
|
|
151
|
+
category: BenchmarkCategory;
|
|
152
|
+
seed: string;
|
|
153
|
+
count: number;
|
|
154
|
+
modelIds: string[];
|
|
155
|
+
tasks: ArenaTask[];
|
|
156
|
+
/** Production runs derive this from a versioned run manifest. */
|
|
157
|
+
runId?: string;
|
|
158
|
+
}): ScheduledMatch[];
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* A judged reasoning match at high effort that returns this fast almost always
|
|
162
|
+
* means the task was too easy, the reasoning parameter was dropped, or the
|
|
163
|
+
* request failed silently. Flag it either way — a human decides.
|
|
164
|
+
*/
|
|
165
|
+
declare const FAST_RESPONSE_MS = 5000;
|
|
166
|
+
declare const LOW_OUTPUT_TOKENS = 150;
|
|
167
|
+
interface TriageAnomaly {
|
|
168
|
+
matchId: string;
|
|
169
|
+
scheduleIndex: number;
|
|
170
|
+
taskId: string;
|
|
171
|
+
modelId: string | null;
|
|
172
|
+
flag: string;
|
|
173
|
+
detail: string;
|
|
174
|
+
}
|
|
175
|
+
interface ModelTriage {
|
|
176
|
+
matches: number;
|
|
177
|
+
failures: number;
|
|
178
|
+
wins: number;
|
|
179
|
+
avgLatencyMs: number | null;
|
|
180
|
+
avgOutputTokens: number | null;
|
|
181
|
+
reasoningReported: number;
|
|
182
|
+
}
|
|
183
|
+
interface RunTriage {
|
|
184
|
+
runId: string;
|
|
185
|
+
seed: string;
|
|
186
|
+
firstTimestamp: string;
|
|
187
|
+
matches: number;
|
|
188
|
+
outcomes: {
|
|
189
|
+
judged: number;
|
|
190
|
+
forfeit: number;
|
|
191
|
+
'no-contest': number;
|
|
192
|
+
};
|
|
193
|
+
totalCostUsd: number;
|
|
194
|
+
errorClasses: Record<string, number>;
|
|
195
|
+
models: Record<string, ModelTriage>;
|
|
196
|
+
judge: {
|
|
197
|
+
validVotes: number;
|
|
198
|
+
abstentions: number;
|
|
199
|
+
unanimous: number;
|
|
200
|
+
split: number;
|
|
201
|
+
avgConfidence: number | null;
|
|
202
|
+
};
|
|
203
|
+
anomalies: TriageAnomaly[];
|
|
204
|
+
}
|
|
205
|
+
declare function classifyError(message: string): string;
|
|
206
|
+
/** Flags that make a single competitor response worth a second look. */
|
|
207
|
+
declare function detectResponseAnomalies(response: CompetitorResponse): string[];
|
|
208
|
+
declare function triageJournal(results: MatchResult[]): RunTriage[];
|
|
209
|
+
declare function formatTriage(reports: RunTriage[]): string;
|
|
210
|
+
|
|
211
|
+
declare const PACKAGE_NAME: string;
|
|
212
|
+
declare const ENGINE_VERSION: string;
|
|
213
|
+
|
|
214
|
+
export { ArenaCancellationError, ArenaEventSink, ArenaExecutionOptions, ArenaLogger, ArenaRunConfig, ArenaRunResult, ArenaRunner, ArenaSnapshot, ArenaStore, ArenaTask, BenchmarkCategory, ChatRequest, CompetitorResponse, CompetitorSuccess, CompleteArenaTask, ELO_INITIAL, ELO_K, ENGINE_VERSION, EloState, FAST_RESPONSE_MS, JudgePanel, LOW_OUTPUT_TOKENS, MAX_PROMPT_CHARS, MODEL_REGISTRY, MatchResult, MockOpenRouterGateway, type MockOpenRouterOptions, ModelCompletion, ModelRegistryEntry, type ModelTriage, OpenRouterClient, OpenRouterGateway, PACKAGE_NAME, PanelDecision, RunManifest, type RunTriage, SOL_FABLE_PILOT_COMPETITOR_IDS, ScheduledMatch, type SnapshotOptions, type TriageAnomaly, type VerificationOptions, type VerifiedJournal, anonymizeCompetitorOutput, applyEloWin, assertPromptSize, buildJudgePayload, buildSnapshot, classifyError, detectResponseAnomalies, expectedScore, formatTriage, getModel, isArenaCancellationError, isRetryableError, judgePromptPolicyHash, judgeSystemPrompt, judgeVerdictJsonSchema, listModels, parseJudgeVerdict, renderMarkdown, resolveCompetitorRoster, runOpenRouterAttempt, sanitizeError, scheduleMatches, throwIfCancelled, triageJournal, verifiedEloState, verifyJournal, writeReports };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArenaRunner,
|
|
3
|
+
ArenaStore,
|
|
4
|
+
ELO_INITIAL,
|
|
5
|
+
ELO_K,
|
|
6
|
+
ENGINE_VERSION,
|
|
7
|
+
FAST_RESPONSE_MS,
|
|
8
|
+
LOW_OUTPUT_TOKENS,
|
|
9
|
+
MockOpenRouterGateway,
|
|
10
|
+
PACKAGE_NAME,
|
|
11
|
+
RUN_MANIFEST_VERSION,
|
|
12
|
+
RunManifestSchema,
|
|
13
|
+
applyEloWin,
|
|
14
|
+
buildSnapshot,
|
|
15
|
+
canonicalJson,
|
|
16
|
+
categoryStoreConfig,
|
|
17
|
+
classifyError,
|
|
18
|
+
createRunManifest,
|
|
19
|
+
detectResponseAnomalies,
|
|
20
|
+
expectedScore,
|
|
21
|
+
formatTriage,
|
|
22
|
+
renderMarkdown,
|
|
23
|
+
runIdFromManifest,
|
|
24
|
+
runManifestHash,
|
|
25
|
+
scheduleMatches,
|
|
26
|
+
triageJournal,
|
|
27
|
+
verifiedEloState,
|
|
28
|
+
verifyJournal,
|
|
29
|
+
writeReports
|
|
30
|
+
} from "./chunk-EQHRUV2I.js";
|
|
31
|
+
import {
|
|
32
|
+
ArenaCancellationError,
|
|
33
|
+
FileArenaLogger,
|
|
34
|
+
JudgePanel,
|
|
35
|
+
MAX_PROMPT_CHARS,
|
|
36
|
+
MODEL_REGISTRY,
|
|
37
|
+
OpenRouterClient,
|
|
38
|
+
SOL_FABLE_PILOT_COMPETITOR_IDS,
|
|
39
|
+
TASKS_PER_CATEGORY,
|
|
40
|
+
TASKS_PER_CLUSTER,
|
|
41
|
+
TaskLoader,
|
|
42
|
+
anonymizeCompetitorOutput,
|
|
43
|
+
assertPromptSize,
|
|
44
|
+
buildCompetitorPrompt,
|
|
45
|
+
buildJudgePayload,
|
|
46
|
+
competitorPromptPolicyHash,
|
|
47
|
+
defaultTaskRoot,
|
|
48
|
+
getModel,
|
|
49
|
+
isArenaCancellationError,
|
|
50
|
+
isRetryableError,
|
|
51
|
+
judgePromptPolicyHash,
|
|
52
|
+
judgeSystemPrompt,
|
|
53
|
+
judgeVerdictJsonSchema,
|
|
54
|
+
listModels,
|
|
55
|
+
mergePrivateHalves,
|
|
56
|
+
noopLogger,
|
|
57
|
+
parseJudgeVerdict,
|
|
58
|
+
redactSecrets,
|
|
59
|
+
resolveCompetitorRoster,
|
|
60
|
+
runOpenRouterAttempt,
|
|
61
|
+
sanitizeError,
|
|
62
|
+
throwIfCancelled,
|
|
63
|
+
validatePublicTaskFile
|
|
64
|
+
} from "./chunk-JTVNKSMO.js";
|
|
65
|
+
import {
|
|
66
|
+
BenchmarkCategorySchema,
|
|
67
|
+
CATEGORIES,
|
|
68
|
+
CATEGORY_CLUSTERS,
|
|
69
|
+
CATEGORY_META,
|
|
70
|
+
CONTRACTS_VERSION,
|
|
71
|
+
CompetitorResponseSchema,
|
|
72
|
+
JUDGE_VERDICT_TRANSPORT_SCHEMA,
|
|
73
|
+
JudgeVerdictSchema,
|
|
74
|
+
JudgeVoteSchema,
|
|
75
|
+
METHODOLOGY_VERSION,
|
|
76
|
+
MatchResultSchema,
|
|
77
|
+
ModelCompletionSchema,
|
|
78
|
+
ModelRoleSchema,
|
|
79
|
+
PanelDecisionSchema,
|
|
80
|
+
TaskArtifactSchema,
|
|
81
|
+
TaskPrivateSchema,
|
|
82
|
+
TaskPublicSchema,
|
|
83
|
+
competitorContent,
|
|
84
|
+
competitorCost,
|
|
85
|
+
competitorOutputTokens,
|
|
86
|
+
competitorReasoningTokens
|
|
87
|
+
} from "./chunk-UECBSKTD.js";
|
|
88
|
+
export {
|
|
89
|
+
ArenaCancellationError,
|
|
90
|
+
ArenaRunner,
|
|
91
|
+
ArenaStore,
|
|
92
|
+
BenchmarkCategorySchema,
|
|
93
|
+
CATEGORIES,
|
|
94
|
+
CATEGORY_CLUSTERS,
|
|
95
|
+
CATEGORY_META,
|
|
96
|
+
CONTRACTS_VERSION,
|
|
97
|
+
CompetitorResponseSchema,
|
|
98
|
+
ELO_INITIAL,
|
|
99
|
+
ELO_K,
|
|
100
|
+
ENGINE_VERSION,
|
|
101
|
+
FAST_RESPONSE_MS,
|
|
102
|
+
FileArenaLogger,
|
|
103
|
+
JUDGE_VERDICT_TRANSPORT_SCHEMA,
|
|
104
|
+
JudgePanel,
|
|
105
|
+
JudgeVerdictSchema,
|
|
106
|
+
JudgeVoteSchema,
|
|
107
|
+
LOW_OUTPUT_TOKENS,
|
|
108
|
+
MAX_PROMPT_CHARS,
|
|
109
|
+
METHODOLOGY_VERSION,
|
|
110
|
+
MODEL_REGISTRY,
|
|
111
|
+
MatchResultSchema,
|
|
112
|
+
MockOpenRouterGateway,
|
|
113
|
+
ModelCompletionSchema,
|
|
114
|
+
ModelRoleSchema,
|
|
115
|
+
OpenRouterClient,
|
|
116
|
+
PACKAGE_NAME,
|
|
117
|
+
PanelDecisionSchema,
|
|
118
|
+
RUN_MANIFEST_VERSION,
|
|
119
|
+
RunManifestSchema,
|
|
120
|
+
SOL_FABLE_PILOT_COMPETITOR_IDS,
|
|
121
|
+
TASKS_PER_CATEGORY,
|
|
122
|
+
TASKS_PER_CLUSTER,
|
|
123
|
+
TaskArtifactSchema,
|
|
124
|
+
TaskLoader,
|
|
125
|
+
TaskPrivateSchema,
|
|
126
|
+
TaskPublicSchema,
|
|
127
|
+
anonymizeCompetitorOutput,
|
|
128
|
+
applyEloWin,
|
|
129
|
+
assertPromptSize,
|
|
130
|
+
buildCompetitorPrompt,
|
|
131
|
+
buildJudgePayload,
|
|
132
|
+
buildSnapshot,
|
|
133
|
+
canonicalJson,
|
|
134
|
+
categoryStoreConfig,
|
|
135
|
+
classifyError,
|
|
136
|
+
competitorContent,
|
|
137
|
+
competitorCost,
|
|
138
|
+
competitorOutputTokens,
|
|
139
|
+
competitorPromptPolicyHash,
|
|
140
|
+
competitorReasoningTokens,
|
|
141
|
+
createRunManifest,
|
|
142
|
+
defaultTaskRoot,
|
|
143
|
+
detectResponseAnomalies,
|
|
144
|
+
expectedScore,
|
|
145
|
+
formatTriage,
|
|
146
|
+
getModel,
|
|
147
|
+
isArenaCancellationError,
|
|
148
|
+
isRetryableError,
|
|
149
|
+
judgePromptPolicyHash,
|
|
150
|
+
judgeSystemPrompt,
|
|
151
|
+
judgeVerdictJsonSchema,
|
|
152
|
+
listModels,
|
|
153
|
+
mergePrivateHalves,
|
|
154
|
+
noopLogger,
|
|
155
|
+
parseJudgeVerdict,
|
|
156
|
+
redactSecrets,
|
|
157
|
+
renderMarkdown,
|
|
158
|
+
resolveCompetitorRoster,
|
|
159
|
+
runIdFromManifest,
|
|
160
|
+
runManifestHash,
|
|
161
|
+
runOpenRouterAttempt,
|
|
162
|
+
sanitizeError,
|
|
163
|
+
scheduleMatches,
|
|
164
|
+
throwIfCancelled,
|
|
165
|
+
triageJournal,
|
|
166
|
+
validatePublicTaskFile,
|
|
167
|
+
verifiedEloState,
|
|
168
|
+
verifyJournal,
|
|
169
|
+
writeReports
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { f as ArenaRunConfig, t as ModelRegistryEntry, M as MatchResult, E as EloState, h as ArenaSnapshot } from './reports-4CejmOHf.cjs';
|
|
3
|
+
import { d as CompleteArenaTask, B as BenchmarkCategory } from './tasks-CpaCJ6JE.cjs';
|
|
4
|
+
|
|
5
|
+
declare const RUN_MANIFEST_VERSION = "1.0.0";
|
|
6
|
+
declare const RunManifestSchema: z.ZodObject<{
|
|
7
|
+
version: z.ZodLiteral<"1.0.0">;
|
|
8
|
+
methodologyVersion: z.ZodString;
|
|
9
|
+
engineVersion: z.ZodString;
|
|
10
|
+
category: z.ZodEnum<["reasoning", "hallucination"]>;
|
|
11
|
+
seed: z.ZodString;
|
|
12
|
+
matches: z.ZodNumber;
|
|
13
|
+
competitors: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
canonicalSlug: z.ZodString;
|
|
16
|
+
request: z.ZodObject<{
|
|
17
|
+
maxTokens: z.ZodNumber;
|
|
18
|
+
temperature: z.ZodNumber;
|
|
19
|
+
reasoningEffort: z.ZodEnum<["high", "medium", "low"]>;
|
|
20
|
+
excludeReasoning: z.ZodBoolean;
|
|
21
|
+
timeoutMs: z.ZodNumber;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
temperature: number;
|
|
24
|
+
timeoutMs: number;
|
|
25
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
26
|
+
maxTokens: number;
|
|
27
|
+
excludeReasoning: boolean;
|
|
28
|
+
}, {
|
|
29
|
+
temperature: number;
|
|
30
|
+
timeoutMs: number;
|
|
31
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
32
|
+
maxTokens: number;
|
|
33
|
+
excludeReasoning: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
} & {
|
|
36
|
+
role: z.ZodLiteral<"competitor">;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
id: string;
|
|
39
|
+
role: "competitor";
|
|
40
|
+
canonicalSlug: string;
|
|
41
|
+
request: {
|
|
42
|
+
temperature: number;
|
|
43
|
+
timeoutMs: number;
|
|
44
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
45
|
+
maxTokens: number;
|
|
46
|
+
excludeReasoning: boolean;
|
|
47
|
+
};
|
|
48
|
+
}, {
|
|
49
|
+
id: string;
|
|
50
|
+
role: "competitor";
|
|
51
|
+
canonicalSlug: string;
|
|
52
|
+
request: {
|
|
53
|
+
temperature: number;
|
|
54
|
+
timeoutMs: number;
|
|
55
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
56
|
+
maxTokens: number;
|
|
57
|
+
excludeReasoning: boolean;
|
|
58
|
+
};
|
|
59
|
+
}>, "many">, {
|
|
60
|
+
id: string;
|
|
61
|
+
role: "competitor";
|
|
62
|
+
canonicalSlug: string;
|
|
63
|
+
request: {
|
|
64
|
+
temperature: number;
|
|
65
|
+
timeoutMs: number;
|
|
66
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
67
|
+
maxTokens: number;
|
|
68
|
+
excludeReasoning: boolean;
|
|
69
|
+
};
|
|
70
|
+
}[], {
|
|
71
|
+
id: string;
|
|
72
|
+
role: "competitor";
|
|
73
|
+
canonicalSlug: string;
|
|
74
|
+
request: {
|
|
75
|
+
temperature: number;
|
|
76
|
+
timeoutMs: number;
|
|
77
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
78
|
+
maxTokens: number;
|
|
79
|
+
excludeReasoning: boolean;
|
|
80
|
+
};
|
|
81
|
+
}[]>;
|
|
82
|
+
judges: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
83
|
+
id: z.ZodString;
|
|
84
|
+
canonicalSlug: z.ZodString;
|
|
85
|
+
request: z.ZodObject<{
|
|
86
|
+
maxTokens: z.ZodNumber;
|
|
87
|
+
temperature: z.ZodNumber;
|
|
88
|
+
reasoningEffort: z.ZodEnum<["high", "medium", "low"]>;
|
|
89
|
+
excludeReasoning: z.ZodBoolean;
|
|
90
|
+
timeoutMs: z.ZodNumber;
|
|
91
|
+
}, "strip", z.ZodTypeAny, {
|
|
92
|
+
temperature: number;
|
|
93
|
+
timeoutMs: number;
|
|
94
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
95
|
+
maxTokens: number;
|
|
96
|
+
excludeReasoning: boolean;
|
|
97
|
+
}, {
|
|
98
|
+
temperature: number;
|
|
99
|
+
timeoutMs: number;
|
|
100
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
101
|
+
maxTokens: number;
|
|
102
|
+
excludeReasoning: boolean;
|
|
103
|
+
}>;
|
|
104
|
+
} & {
|
|
105
|
+
role: z.ZodLiteral<"judge">;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
id: string;
|
|
108
|
+
role: "judge";
|
|
109
|
+
canonicalSlug: string;
|
|
110
|
+
request: {
|
|
111
|
+
temperature: number;
|
|
112
|
+
timeoutMs: number;
|
|
113
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
114
|
+
maxTokens: number;
|
|
115
|
+
excludeReasoning: boolean;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
id: string;
|
|
119
|
+
role: "judge";
|
|
120
|
+
canonicalSlug: string;
|
|
121
|
+
request: {
|
|
122
|
+
temperature: number;
|
|
123
|
+
timeoutMs: number;
|
|
124
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
125
|
+
maxTokens: number;
|
|
126
|
+
excludeReasoning: boolean;
|
|
127
|
+
};
|
|
128
|
+
}>, "many">, {
|
|
129
|
+
id: string;
|
|
130
|
+
role: "judge";
|
|
131
|
+
canonicalSlug: string;
|
|
132
|
+
request: {
|
|
133
|
+
temperature: number;
|
|
134
|
+
timeoutMs: number;
|
|
135
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
136
|
+
maxTokens: number;
|
|
137
|
+
excludeReasoning: boolean;
|
|
138
|
+
};
|
|
139
|
+
}[], {
|
|
140
|
+
id: string;
|
|
141
|
+
role: "judge";
|
|
142
|
+
canonicalSlug: string;
|
|
143
|
+
request: {
|
|
144
|
+
temperature: number;
|
|
145
|
+
timeoutMs: number;
|
|
146
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
147
|
+
maxTokens: number;
|
|
148
|
+
excludeReasoning: boolean;
|
|
149
|
+
};
|
|
150
|
+
}[]>;
|
|
151
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
version: z.ZodString;
|
|
154
|
+
publicHash: z.ZodString;
|
|
155
|
+
privateHash: z.ZodString;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
id: string;
|
|
158
|
+
version: string;
|
|
159
|
+
publicHash: string;
|
|
160
|
+
privateHash: string;
|
|
161
|
+
}, {
|
|
162
|
+
id: string;
|
|
163
|
+
version: string;
|
|
164
|
+
publicHash: string;
|
|
165
|
+
privateHash: string;
|
|
166
|
+
}>, "many">;
|
|
167
|
+
promptPolicyHashes: z.ZodObject<{
|
|
168
|
+
competitor: z.ZodString;
|
|
169
|
+
judge: z.ZodString;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
competitor: string;
|
|
172
|
+
judge: string;
|
|
173
|
+
}, {
|
|
174
|
+
competitor: string;
|
|
175
|
+
judge: string;
|
|
176
|
+
}>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
methodologyVersion: string;
|
|
179
|
+
seed: string;
|
|
180
|
+
version: "1.0.0";
|
|
181
|
+
category: "reasoning" | "hallucination";
|
|
182
|
+
competitors: {
|
|
183
|
+
id: string;
|
|
184
|
+
role: "competitor";
|
|
185
|
+
canonicalSlug: string;
|
|
186
|
+
request: {
|
|
187
|
+
temperature: number;
|
|
188
|
+
timeoutMs: number;
|
|
189
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
190
|
+
maxTokens: number;
|
|
191
|
+
excludeReasoning: boolean;
|
|
192
|
+
};
|
|
193
|
+
}[];
|
|
194
|
+
tasks: {
|
|
195
|
+
id: string;
|
|
196
|
+
version: string;
|
|
197
|
+
publicHash: string;
|
|
198
|
+
privateHash: string;
|
|
199
|
+
}[];
|
|
200
|
+
engineVersion: string;
|
|
201
|
+
matches: number;
|
|
202
|
+
judges: {
|
|
203
|
+
id: string;
|
|
204
|
+
role: "judge";
|
|
205
|
+
canonicalSlug: string;
|
|
206
|
+
request: {
|
|
207
|
+
temperature: number;
|
|
208
|
+
timeoutMs: number;
|
|
209
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
210
|
+
maxTokens: number;
|
|
211
|
+
excludeReasoning: boolean;
|
|
212
|
+
};
|
|
213
|
+
}[];
|
|
214
|
+
promptPolicyHashes: {
|
|
215
|
+
competitor: string;
|
|
216
|
+
judge: string;
|
|
217
|
+
};
|
|
218
|
+
}, {
|
|
219
|
+
methodologyVersion: string;
|
|
220
|
+
seed: string;
|
|
221
|
+
version: "1.0.0";
|
|
222
|
+
category: "reasoning" | "hallucination";
|
|
223
|
+
competitors: {
|
|
224
|
+
id: string;
|
|
225
|
+
role: "competitor";
|
|
226
|
+
canonicalSlug: string;
|
|
227
|
+
request: {
|
|
228
|
+
temperature: number;
|
|
229
|
+
timeoutMs: number;
|
|
230
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
231
|
+
maxTokens: number;
|
|
232
|
+
excludeReasoning: boolean;
|
|
233
|
+
};
|
|
234
|
+
}[];
|
|
235
|
+
tasks: {
|
|
236
|
+
id: string;
|
|
237
|
+
version: string;
|
|
238
|
+
publicHash: string;
|
|
239
|
+
privateHash: string;
|
|
240
|
+
}[];
|
|
241
|
+
engineVersion: string;
|
|
242
|
+
matches: number;
|
|
243
|
+
judges: {
|
|
244
|
+
id: string;
|
|
245
|
+
role: "judge";
|
|
246
|
+
canonicalSlug: string;
|
|
247
|
+
request: {
|
|
248
|
+
temperature: number;
|
|
249
|
+
timeoutMs: number;
|
|
250
|
+
reasoningEffort: "high" | "medium" | "low";
|
|
251
|
+
maxTokens: number;
|
|
252
|
+
excludeReasoning: boolean;
|
|
253
|
+
};
|
|
254
|
+
}[];
|
|
255
|
+
promptPolicyHashes: {
|
|
256
|
+
competitor: string;
|
|
257
|
+
judge: string;
|
|
258
|
+
};
|
|
259
|
+
}>;
|
|
260
|
+
type RunManifest = z.infer<typeof RunManifestSchema>;
|
|
261
|
+
declare function canonicalJson(value: unknown): string;
|
|
262
|
+
declare function runManifestHash(manifest: RunManifest): string;
|
|
263
|
+
declare function runIdFromManifest(manifest: RunManifest): string;
|
|
264
|
+
declare function createRunManifest(config: Pick<ArenaRunConfig, 'category' | 'seed' | 'matches' | 'competitorIds'>, tasks: CompleteArenaTask[], resolvedCompetitors?: readonly ModelRegistryEntry[]): RunManifest;
|
|
265
|
+
|
|
266
|
+
interface ArenaStoreConfig {
|
|
267
|
+
category: BenchmarkCategory;
|
|
268
|
+
journalPath: string;
|
|
269
|
+
snapshotPath: string;
|
|
270
|
+
markdownPath: string;
|
|
271
|
+
runsDir?: string;
|
|
272
|
+
/** Skip directory creation for read-only verification of external journals. */
|
|
273
|
+
readOnly?: boolean;
|
|
274
|
+
}
|
|
275
|
+
/** Each category gets its own results directory — its own journal, Elo ladder, and reports. */
|
|
276
|
+
declare function categoryStoreConfig(category: BenchmarkCategory, resultsRoot?: string | undefined): ArenaStoreConfig;
|
|
277
|
+
declare class ArenaStore {
|
|
278
|
+
readonly config: ArenaStoreConfig;
|
|
279
|
+
constructor(config: ArenaStoreConfig);
|
|
280
|
+
get category(): BenchmarkCategory;
|
|
281
|
+
get runsDir(): string;
|
|
282
|
+
append(result: MatchResult): void;
|
|
283
|
+
readAll(): MatchResult[];
|
|
284
|
+
writeRunManifest(runId: string, manifest: RunManifest): void;
|
|
285
|
+
readRunManifest(runId: string): RunManifest | null;
|
|
286
|
+
completedMatchIds(): Set<string>;
|
|
287
|
+
rebuildEloState(competitorIds?: readonly string[]): EloState;
|
|
288
|
+
writeSnapshot(snapshot: ArenaSnapshot): void;
|
|
289
|
+
writeMarkdown(markdown: string): void;
|
|
290
|
+
private atomicWrite;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
294
|
+
declare function redactSecrets(value: string): string;
|
|
295
|
+
/** Structured logger every arena boundary reports into; one JSONL file per process. */
|
|
296
|
+
interface ArenaLogger {
|
|
297
|
+
readonly filePath: string | null;
|
|
298
|
+
debug(event: string, data?: Record<string, unknown>): void;
|
|
299
|
+
info(event: string, data?: Record<string, unknown>): void;
|
|
300
|
+
warn(event: string, data?: Record<string, unknown>): void;
|
|
301
|
+
error(event: string, data?: Record<string, unknown>): void;
|
|
302
|
+
}
|
|
303
|
+
declare const noopLogger: ArenaLogger;
|
|
304
|
+
declare class FileArenaLogger implements ArenaLogger {
|
|
305
|
+
readonly filePath: string;
|
|
306
|
+
private readonly verbose;
|
|
307
|
+
constructor(options: {
|
|
308
|
+
dir: string;
|
|
309
|
+
verbose?: boolean;
|
|
310
|
+
name?: string;
|
|
311
|
+
});
|
|
312
|
+
debug(event: string, data?: Record<string, unknown>): void;
|
|
313
|
+
info(event: string, data?: Record<string, unknown>): void;
|
|
314
|
+
warn(event: string, data?: Record<string, unknown>): void;
|
|
315
|
+
error(event: string, data?: Record<string, unknown>): void;
|
|
316
|
+
private write;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export { ArenaStore as A, FileArenaLogger as F, type LogLevel as L, type RunManifest as R, type ArenaLogger as a, type ArenaStoreConfig as b, RUN_MANIFEST_VERSION as c, RunManifestSchema as d, canonicalJson as e, categoryStoreConfig as f, createRunManifest as g, runIdFromManifest as h, runManifestHash as i, noopLogger as n, redactSecrets as r };
|