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
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { B as BenchmarkCategory } from './tasks-CpaCJ6JE.js';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
interface ResponseSummary {
|
|
5
|
+
success: boolean;
|
|
6
|
+
latencyMs: number;
|
|
7
|
+
costUsd: number;
|
|
8
|
+
outputTokens: number;
|
|
9
|
+
reasoningTokens: number | null;
|
|
10
|
+
}
|
|
11
|
+
interface ArenaEventDataMap {
|
|
12
|
+
'run.started': {
|
|
13
|
+
runId: string;
|
|
14
|
+
category: BenchmarkCategory;
|
|
15
|
+
seed: string;
|
|
16
|
+
matches: number;
|
|
17
|
+
maxCostUsd: number;
|
|
18
|
+
competitorIds: string[];
|
|
19
|
+
};
|
|
20
|
+
'match.started': {
|
|
21
|
+
matchId: string;
|
|
22
|
+
index: number;
|
|
23
|
+
total: number;
|
|
24
|
+
category: BenchmarkCategory;
|
|
25
|
+
taskId: string;
|
|
26
|
+
taskTitle: string;
|
|
27
|
+
modelA: string;
|
|
28
|
+
modelB: string;
|
|
29
|
+
};
|
|
30
|
+
'competitor.delta': {
|
|
31
|
+
matchId: string;
|
|
32
|
+
modelId: string;
|
|
33
|
+
side: 'A' | 'B';
|
|
34
|
+
text: string;
|
|
35
|
+
done: boolean;
|
|
36
|
+
success: boolean;
|
|
37
|
+
};
|
|
38
|
+
'competitors.completed': {
|
|
39
|
+
matchId: string;
|
|
40
|
+
modelA: ResponseSummary;
|
|
41
|
+
modelB: ResponseSummary;
|
|
42
|
+
};
|
|
43
|
+
'judging.started': {
|
|
44
|
+
matchId: string;
|
|
45
|
+
judges: string[];
|
|
46
|
+
};
|
|
47
|
+
'judge.completed': {
|
|
48
|
+
matchId: string;
|
|
49
|
+
judgeModelId: string;
|
|
50
|
+
anonymousWinner: 'MODEL_A' | 'MODEL_B' | null;
|
|
51
|
+
votedFor: string | null;
|
|
52
|
+
confidence: number | null;
|
|
53
|
+
valid: boolean;
|
|
54
|
+
error: string | null;
|
|
55
|
+
};
|
|
56
|
+
'match.completed': {
|
|
57
|
+
matchId: string;
|
|
58
|
+
taskId: string;
|
|
59
|
+
winnerModelId: string | null;
|
|
60
|
+
outcome: 'judged' | 'forfeit' | 'no-contest';
|
|
61
|
+
costUsd: number;
|
|
62
|
+
eloAfter: Record<string, number>;
|
|
63
|
+
completed: number;
|
|
64
|
+
total: number;
|
|
65
|
+
};
|
|
66
|
+
'run.budget-stopped': {
|
|
67
|
+
runId: string;
|
|
68
|
+
completed: number;
|
|
69
|
+
costUsd: number;
|
|
70
|
+
maxCostUsd: number;
|
|
71
|
+
};
|
|
72
|
+
'run.cancellation-requested': {
|
|
73
|
+
runId: string;
|
|
74
|
+
completed: number;
|
|
75
|
+
costUsd: number;
|
|
76
|
+
};
|
|
77
|
+
'run.cancelled': {
|
|
78
|
+
runId: string;
|
|
79
|
+
completed: number;
|
|
80
|
+
costUsd: number;
|
|
81
|
+
};
|
|
82
|
+
'run.completed': {
|
|
83
|
+
runId: string;
|
|
84
|
+
completed: number;
|
|
85
|
+
costUsd: number;
|
|
86
|
+
stoppedForBudget: boolean;
|
|
87
|
+
};
|
|
88
|
+
'run.failed': {
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
type ArenaEventType = keyof ArenaEventDataMap;
|
|
93
|
+
type ArenaEvent = {
|
|
94
|
+
[Type in ArenaEventType]: {
|
|
95
|
+
id: string;
|
|
96
|
+
type: Type;
|
|
97
|
+
timestamp: string;
|
|
98
|
+
data: ArenaEventDataMap[Type];
|
|
99
|
+
};
|
|
100
|
+
}[ArenaEventType];
|
|
101
|
+
type ArenaEventInput = {
|
|
102
|
+
[Type in ArenaEventType]: Omit<Extract<ArenaEvent, {
|
|
103
|
+
type: Type;
|
|
104
|
+
}>, 'timestamp'>;
|
|
105
|
+
}[ArenaEventType];
|
|
106
|
+
type ArenaEventSink = (event: ArenaEvent) => void;
|
|
107
|
+
|
|
108
|
+
declare const ModelRoleSchema: z.ZodEnum<["competitor", "judge"]>;
|
|
109
|
+
type ModelRole = z.infer<typeof ModelRoleSchema>;
|
|
110
|
+
interface ModelRequestPolicy {
|
|
111
|
+
maxTokens: number;
|
|
112
|
+
temperature: number;
|
|
113
|
+
reasoningEffort: 'high' | 'medium' | 'low';
|
|
114
|
+
excludeReasoning: boolean;
|
|
115
|
+
timeoutMs: number;
|
|
116
|
+
}
|
|
117
|
+
interface ModelRegistryEntry {
|
|
118
|
+
id: string;
|
|
119
|
+
canonicalSlug: string;
|
|
120
|
+
displayName: string;
|
|
121
|
+
vendor: string;
|
|
122
|
+
role: ModelRole;
|
|
123
|
+
enabled: boolean;
|
|
124
|
+
request: ModelRequestPolicy;
|
|
125
|
+
}
|
|
126
|
+
declare const ModelCompletionSchema: z.ZodObject<{
|
|
127
|
+
generationId: z.ZodString;
|
|
128
|
+
content: z.ZodString;
|
|
129
|
+
inputTokens: z.ZodNumber;
|
|
130
|
+
outputTokens: z.ZodNumber;
|
|
131
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
costUsd: z.ZodNumber;
|
|
133
|
+
latencyMs: z.ZodNumber;
|
|
134
|
+
finishReason: z.ZodString;
|
|
135
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
generationId: string;
|
|
138
|
+
content: string;
|
|
139
|
+
inputTokens: number;
|
|
140
|
+
outputTokens: number;
|
|
141
|
+
costUsd: number;
|
|
142
|
+
latencyMs: number;
|
|
143
|
+
finishReason: string;
|
|
144
|
+
reasoningTokens?: number | undefined;
|
|
145
|
+
attempts?: number | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
generationId: string;
|
|
148
|
+
content: string;
|
|
149
|
+
inputTokens: number;
|
|
150
|
+
outputTokens: number;
|
|
151
|
+
costUsd: number;
|
|
152
|
+
latencyMs: number;
|
|
153
|
+
finishReason: string;
|
|
154
|
+
reasoningTokens?: number | undefined;
|
|
155
|
+
attempts?: number | undefined;
|
|
156
|
+
}>;
|
|
157
|
+
type ModelCompletion = z.infer<typeof ModelCompletionSchema>;
|
|
158
|
+
interface ChatRequest {
|
|
159
|
+
model: ModelRegistryEntry;
|
|
160
|
+
system: string;
|
|
161
|
+
user: string;
|
|
162
|
+
structured?: boolean;
|
|
163
|
+
/** Execution-only cancellation; never serialized into a run manifest or provider payload. */
|
|
164
|
+
signal?: AbortSignal;
|
|
165
|
+
/** Called with the accumulated visible text as it streams in (throttled). */
|
|
166
|
+
onDelta?: (text: string) => void;
|
|
167
|
+
}
|
|
168
|
+
interface OpenRouterGateway {
|
|
169
|
+
complete(request: ChatRequest): Promise<ModelCompletion>;
|
|
170
|
+
validateModel(model: ModelRegistryEntry, signal?: AbortSignal): Promise<void>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
interface ArenaRunConfig {
|
|
174
|
+
category: BenchmarkCategory;
|
|
175
|
+
seed: string;
|
|
176
|
+
matches: number;
|
|
177
|
+
maxCostUsd: number;
|
|
178
|
+
resume: boolean;
|
|
179
|
+
/** Omit to use every enabled competitor in the registry. */
|
|
180
|
+
competitorIds?: readonly string[];
|
|
181
|
+
/** Abort early when most matches contain a failed response. */
|
|
182
|
+
healthStop?: boolean;
|
|
183
|
+
}
|
|
184
|
+
interface ArenaExecutionOptions {
|
|
185
|
+
/** Execution-only cancellation; deliberately excluded from the canonical manifest. */
|
|
186
|
+
signal?: AbortSignal;
|
|
187
|
+
/**
|
|
188
|
+
* Invoked after each match result is journaled, before the next match
|
|
189
|
+
* starts. Used to publish results incrementally instead of only at run end.
|
|
190
|
+
* Must not throw; handle and log failures internally.
|
|
191
|
+
*/
|
|
192
|
+
onMatchResult?: (result: MatchResult) => Promise<void> | void;
|
|
193
|
+
}
|
|
194
|
+
interface ArenaRunResult {
|
|
195
|
+
runId: string;
|
|
196
|
+
completed: number;
|
|
197
|
+
costUsd: number;
|
|
198
|
+
stoppedForBudget: boolean;
|
|
199
|
+
cancelled: boolean;
|
|
200
|
+
}
|
|
201
|
+
interface ScheduledMatch {
|
|
202
|
+
id: string;
|
|
203
|
+
runId: string;
|
|
204
|
+
index: number;
|
|
205
|
+
seed: string;
|
|
206
|
+
category: BenchmarkCategory;
|
|
207
|
+
taskId: string;
|
|
208
|
+
modelA: string;
|
|
209
|
+
modelB: string;
|
|
210
|
+
}
|
|
211
|
+
declare const CompetitorSuccessSchema: z.ZodObject<{
|
|
212
|
+
generationId: z.ZodString;
|
|
213
|
+
content: z.ZodString;
|
|
214
|
+
inputTokens: z.ZodNumber;
|
|
215
|
+
outputTokens: z.ZodNumber;
|
|
216
|
+
reasoningTokens: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
costUsd: z.ZodNumber;
|
|
218
|
+
latencyMs: z.ZodNumber;
|
|
219
|
+
finishReason: z.ZodString;
|
|
220
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
} & {
|
|
222
|
+
modelId: z.ZodString;
|
|
223
|
+
success: z.ZodLiteral<true>;
|
|
224
|
+
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
generationId: string;
|
|
226
|
+
content: string;
|
|
227
|
+
inputTokens: number;
|
|
228
|
+
outputTokens: number;
|
|
229
|
+
costUsd: number;
|
|
230
|
+
latencyMs: number;
|
|
231
|
+
finishReason: string;
|
|
232
|
+
modelId: string;
|
|
233
|
+
success: true;
|
|
234
|
+
reasoningTokens?: number | undefined;
|
|
235
|
+
attempts?: number | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
generationId: string;
|
|
238
|
+
content: string;
|
|
239
|
+
inputTokens: number;
|
|
240
|
+
outputTokens: number;
|
|
241
|
+
costUsd: number;
|
|
242
|
+
latencyMs: number;
|
|
243
|
+
finishReason: string;
|
|
244
|
+
modelId: string;
|
|
245
|
+
success: true;
|
|
246
|
+
reasoningTokens?: number | undefined;
|
|
247
|
+
attempts?: number | undefined;
|
|
248
|
+
}>;
|
|
249
|
+
type CompetitorSuccess = z.infer<typeof CompetitorSuccessSchema>;
|
|
250
|
+
declare const CompetitorFailureSchema: z.ZodObject<{
|
|
251
|
+
modelId: z.ZodString;
|
|
252
|
+
success: z.ZodLiteral<false>;
|
|
253
|
+
error: z.ZodString;
|
|
254
|
+
latencyMs: z.ZodNumber;
|
|
255
|
+
attempts: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
latencyMs: number;
|
|
258
|
+
modelId: string;
|
|
259
|
+
success: false;
|
|
260
|
+
error: string;
|
|
261
|
+
attempts?: number | undefined;
|
|
262
|
+
}, {
|
|
263
|
+
latencyMs: number;
|
|
264
|
+
modelId: string;
|
|
265
|
+
success: false;
|
|
266
|
+
error: string;
|
|
267
|
+
attempts?: number | undefined;
|
|
268
|
+
}>;
|
|
269
|
+
type CompetitorFailure = z.infer<typeof CompetitorFailureSchema>;
|
|
270
|
+
type CompetitorResponse = CompetitorSuccess | CompetitorFailure;
|
|
271
|
+
declare const CompetitorResponseSchema: z.ZodType<CompetitorResponse>;
|
|
272
|
+
declare const JudgeVerdictSchema: z.ZodObject<{
|
|
273
|
+
winner: z.ZodEnum<["MODEL_A", "MODEL_B"]>;
|
|
274
|
+
confidence: z.ZodNumber;
|
|
275
|
+
rationale: z.ZodString;
|
|
276
|
+
criteria: z.ZodObject<{
|
|
277
|
+
correctness: z.ZodString;
|
|
278
|
+
grounding: z.ZodString;
|
|
279
|
+
constraintHandling: z.ZodString;
|
|
280
|
+
completeness: z.ZodString;
|
|
281
|
+
}, "strip", z.ZodTypeAny, {
|
|
282
|
+
correctness: string;
|
|
283
|
+
grounding: string;
|
|
284
|
+
constraintHandling: string;
|
|
285
|
+
completeness: string;
|
|
286
|
+
}, {
|
|
287
|
+
correctness: string;
|
|
288
|
+
grounding: string;
|
|
289
|
+
constraintHandling: string;
|
|
290
|
+
completeness: string;
|
|
291
|
+
}>;
|
|
292
|
+
violations: z.ZodArray<z.ZodString, "many">;
|
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
|
294
|
+
winner: "MODEL_A" | "MODEL_B";
|
|
295
|
+
confidence: number;
|
|
296
|
+
rationale: string;
|
|
297
|
+
criteria: {
|
|
298
|
+
correctness: string;
|
|
299
|
+
grounding: string;
|
|
300
|
+
constraintHandling: string;
|
|
301
|
+
completeness: string;
|
|
302
|
+
};
|
|
303
|
+
violations: string[];
|
|
304
|
+
}, {
|
|
305
|
+
winner: "MODEL_A" | "MODEL_B";
|
|
306
|
+
confidence: number;
|
|
307
|
+
rationale: string;
|
|
308
|
+
criteria: {
|
|
309
|
+
correctness: string;
|
|
310
|
+
grounding: string;
|
|
311
|
+
constraintHandling: string;
|
|
312
|
+
completeness: string;
|
|
313
|
+
};
|
|
314
|
+
violations: string[];
|
|
315
|
+
}>;
|
|
316
|
+
type JudgeVerdict = z.infer<typeof JudgeVerdictSchema>;
|
|
317
|
+
/**
|
|
318
|
+
* Provider-safe JSON Schema subset generated from the same verdict shape.
|
|
319
|
+
* Runtime Zod parsing above enforces the local string and array limits.
|
|
320
|
+
*/
|
|
321
|
+
declare const JUDGE_VERDICT_TRANSPORT_SCHEMA: {
|
|
322
|
+
readonly type: "object";
|
|
323
|
+
readonly additionalProperties: false;
|
|
324
|
+
readonly required: readonly ["winner", "confidence", "rationale", "criteria", "violations"];
|
|
325
|
+
readonly properties: {
|
|
326
|
+
readonly winner: {
|
|
327
|
+
readonly type: "string";
|
|
328
|
+
readonly enum: readonly ["MODEL_A", "MODEL_B"];
|
|
329
|
+
};
|
|
330
|
+
readonly confidence: {
|
|
331
|
+
readonly type: "number";
|
|
332
|
+
readonly minimum: 0;
|
|
333
|
+
readonly maximum: 1;
|
|
334
|
+
};
|
|
335
|
+
readonly rationale: {
|
|
336
|
+
readonly type: "string";
|
|
337
|
+
};
|
|
338
|
+
readonly criteria: {
|
|
339
|
+
readonly type: "object";
|
|
340
|
+
readonly additionalProperties: false;
|
|
341
|
+
readonly required: readonly ["correctness", "grounding", "constraintHandling", "completeness"];
|
|
342
|
+
readonly properties: {
|
|
343
|
+
readonly correctness: {
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
};
|
|
346
|
+
readonly grounding: {
|
|
347
|
+
readonly type: "string";
|
|
348
|
+
};
|
|
349
|
+
readonly constraintHandling: {
|
|
350
|
+
readonly type: "string";
|
|
351
|
+
};
|
|
352
|
+
readonly completeness: {
|
|
353
|
+
readonly type: "string";
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
readonly violations: {
|
|
358
|
+
readonly type: "array";
|
|
359
|
+
readonly items: {
|
|
360
|
+
readonly type: "string";
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
interface JudgeVote {
|
|
366
|
+
judgeModelId: string;
|
|
367
|
+
modelAIdentity: string;
|
|
368
|
+
modelBIdentity: string;
|
|
369
|
+
verdict: JudgeVerdict | null;
|
|
370
|
+
winnerModelId: string | null;
|
|
371
|
+
completion: ModelCompletion | null;
|
|
372
|
+
error?: string;
|
|
373
|
+
}
|
|
374
|
+
interface PanelDecision {
|
|
375
|
+
winnerModelId: string | null;
|
|
376
|
+
validVotes: number;
|
|
377
|
+
votesByModel: Record<string, number>;
|
|
378
|
+
agreement: 'unanimous' | 'split' | 'insufficient';
|
|
379
|
+
votes: JudgeVote[];
|
|
380
|
+
}
|
|
381
|
+
interface EloState {
|
|
382
|
+
ratings: Record<string, number>;
|
|
383
|
+
points: Record<string, number>;
|
|
384
|
+
}
|
|
385
|
+
interface MatchResult {
|
|
386
|
+
methodologyVersion: string;
|
|
387
|
+
runId: string;
|
|
388
|
+
/** Absent on legacy journal lines written before run manifests. */
|
|
389
|
+
runManifestHash?: string;
|
|
390
|
+
matchId: string;
|
|
391
|
+
scheduleIndex: number;
|
|
392
|
+
seed: string;
|
|
393
|
+
timestamp: string;
|
|
394
|
+
task: {
|
|
395
|
+
id: string;
|
|
396
|
+
version: string;
|
|
397
|
+
/** Absent on reasoning-only legacy lines. */
|
|
398
|
+
category?: BenchmarkCategory;
|
|
399
|
+
cluster: string;
|
|
400
|
+
publicHash: string;
|
|
401
|
+
privateHash: string;
|
|
402
|
+
};
|
|
403
|
+
competitors: {
|
|
404
|
+
modelA: string;
|
|
405
|
+
modelB: string;
|
|
406
|
+
responseA: CompetitorResponse;
|
|
407
|
+
responseB: CompetitorResponse;
|
|
408
|
+
};
|
|
409
|
+
outcome: 'judged' | 'forfeit' | 'no-contest';
|
|
410
|
+
winnerModelId: string | null;
|
|
411
|
+
panel: PanelDecision | null;
|
|
412
|
+
eloBefore: Record<string, number>;
|
|
413
|
+
eloAfter: Record<string, number>;
|
|
414
|
+
pointAwarded: boolean;
|
|
415
|
+
matchCostUsd: number;
|
|
416
|
+
}
|
|
417
|
+
declare const JudgeVoteSchema: z.ZodType<JudgeVote>;
|
|
418
|
+
declare const PanelDecisionSchema: z.ZodType<PanelDecision>;
|
|
419
|
+
declare const MatchResultSchema: z.ZodType<MatchResult>;
|
|
420
|
+
declare function competitorCost(response: CompetitorResponse): number;
|
|
421
|
+
declare function competitorOutputTokens(response: CompetitorResponse): number;
|
|
422
|
+
declare function competitorReasoningTokens(response: CompetitorResponse): number | undefined;
|
|
423
|
+
declare function competitorContent(response: CompetitorResponse): string;
|
|
424
|
+
|
|
425
|
+
interface LeaderboardEntry {
|
|
426
|
+
rank: number;
|
|
427
|
+
modelId: string;
|
|
428
|
+
displayName: string;
|
|
429
|
+
elo: number;
|
|
430
|
+
points: number;
|
|
431
|
+
wins: number;
|
|
432
|
+
losses: number;
|
|
433
|
+
forfeits: number;
|
|
434
|
+
matches: number;
|
|
435
|
+
winRate: number;
|
|
436
|
+
unanimousWins: number;
|
|
437
|
+
totalCostUsd: number;
|
|
438
|
+
byCluster: Partial<Record<string, {
|
|
439
|
+
wins: number;
|
|
440
|
+
losses: number;
|
|
441
|
+
}>>;
|
|
442
|
+
}
|
|
443
|
+
interface ArenaSnapshot {
|
|
444
|
+
version: '0.2.0';
|
|
445
|
+
methodologyVersion: string;
|
|
446
|
+
category: BenchmarkCategory;
|
|
447
|
+
generatedAt: string;
|
|
448
|
+
initialElo: number;
|
|
449
|
+
kFactor: number;
|
|
450
|
+
leaderboard: LeaderboardEntry[];
|
|
451
|
+
matches: MatchResult[];
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export { type ArenaEvent as A, competitorOutputTokens as B, type ChatRequest as C, competitorReasoningTokens as D, type EloState as E, JUDGE_VERDICT_TRANSPORT_SCHEMA as J, type LeaderboardEntry as L, type MatchResult as M, type OpenRouterGateway as O, type PanelDecision as P, type ScheduledMatch as S, type ArenaEventDataMap as a, type ArenaEventInput as b, type ArenaEventSink as c, type ArenaEventType as d, type ArenaExecutionOptions as e, type ArenaRunConfig as f, type ArenaRunResult as g, type ArenaSnapshot as h, type CompetitorFailure as i, type CompetitorResponse as j, CompetitorResponseSchema as k, type CompetitorSuccess as l, type JudgeVerdict as m, JudgeVerdictSchema as n, type JudgeVote as o, JudgeVoteSchema as p, MatchResultSchema as q, type ModelCompletion as r, ModelCompletionSchema as s, type ModelRegistryEntry as t, type ModelRequestPolicy as u, type ModelRole as v, ModelRoleSchema as w, PanelDecisionSchema as x, competitorContent as y, competitorCost as z };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const METHODOLOGY_VERSION = "arena-v0.3.0";
|
|
4
|
+
declare const BenchmarkCategorySchema: z.ZodEnum<["reasoning", "hallucination"]>;
|
|
5
|
+
type BenchmarkCategory = z.infer<typeof BenchmarkCategorySchema>;
|
|
6
|
+
declare const CATEGORIES: ["reasoning", "hallucination"];
|
|
7
|
+
declare const CATEGORY_CLUSTERS: Record<BenchmarkCategory, readonly string[]>;
|
|
8
|
+
declare const CATEGORY_META: Record<BenchmarkCategory, {
|
|
9
|
+
label: string;
|
|
10
|
+
tagline: string;
|
|
11
|
+
}>;
|
|
12
|
+
|
|
13
|
+
declare const TaskArtifactSchema: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
type: z.ZodEnum<["code", "log", "config", "spec", "diff", "table", "note"]>;
|
|
16
|
+
label: z.ZodString;
|
|
17
|
+
content: z.ZodString;
|
|
18
|
+
}, "strict", z.ZodTypeAny, {
|
|
19
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
20
|
+
id: string;
|
|
21
|
+
content: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}, {
|
|
24
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
25
|
+
id: string;
|
|
26
|
+
content: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}>;
|
|
29
|
+
type TaskArtifact = z.infer<typeof TaskArtifactSchema>;
|
|
30
|
+
declare const TaskPublicSchema: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
version: z.ZodString;
|
|
33
|
+
category: z.ZodEnum<["reasoning", "hallucination"]>;
|
|
34
|
+
cluster: z.ZodString;
|
|
35
|
+
difficulty: z.ZodEnum<["hard", "expert"]>;
|
|
36
|
+
title: z.ZodString;
|
|
37
|
+
summary: z.ZodString;
|
|
38
|
+
prompt: z.ZodString;
|
|
39
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
type: z.ZodEnum<["code", "log", "config", "spec", "diff", "table", "note"]>;
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
content: z.ZodString;
|
|
44
|
+
}, "strict", z.ZodTypeAny, {
|
|
45
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
46
|
+
id: string;
|
|
47
|
+
content: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}, {
|
|
50
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
51
|
+
id: string;
|
|
52
|
+
content: string;
|
|
53
|
+
label: string;
|
|
54
|
+
}>, "many">;
|
|
55
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
56
|
+
}, "strict", z.ZodTypeAny, {
|
|
57
|
+
id: string;
|
|
58
|
+
version: string;
|
|
59
|
+
category: "reasoning" | "hallucination";
|
|
60
|
+
cluster: string;
|
|
61
|
+
difficulty: "hard" | "expert";
|
|
62
|
+
title: string;
|
|
63
|
+
summary: string;
|
|
64
|
+
prompt: string;
|
|
65
|
+
artifacts: {
|
|
66
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
67
|
+
id: string;
|
|
68
|
+
content: string;
|
|
69
|
+
label: string;
|
|
70
|
+
}[];
|
|
71
|
+
tags: string[];
|
|
72
|
+
}, {
|
|
73
|
+
id: string;
|
|
74
|
+
version: string;
|
|
75
|
+
category: "reasoning" | "hallucination";
|
|
76
|
+
cluster: string;
|
|
77
|
+
difficulty: "hard" | "expert";
|
|
78
|
+
title: string;
|
|
79
|
+
summary: string;
|
|
80
|
+
prompt: string;
|
|
81
|
+
artifacts: {
|
|
82
|
+
type: "code" | "log" | "config" | "spec" | "diff" | "table" | "note";
|
|
83
|
+
id: string;
|
|
84
|
+
content: string;
|
|
85
|
+
label: string;
|
|
86
|
+
}[];
|
|
87
|
+
tags?: string[] | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
type TaskPublic = z.infer<typeof TaskPublicSchema>;
|
|
90
|
+
declare const TaskPrivateSchema: z.ZodObject<{
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
version: z.ZodString;
|
|
93
|
+
expectedResolution: z.ZodString;
|
|
94
|
+
requiredEvidence: z.ZodArray<z.ZodString, "many">;
|
|
95
|
+
disqualifyingErrors: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
96
|
+
rubric: z.ZodObject<{
|
|
97
|
+
correctness: z.ZodString;
|
|
98
|
+
evidenceGrounding: z.ZodString;
|
|
99
|
+
constraintHandling: z.ZodString;
|
|
100
|
+
completeness: z.ZodString;
|
|
101
|
+
}, "strict", z.ZodTypeAny, {
|
|
102
|
+
correctness: string;
|
|
103
|
+
constraintHandling: string;
|
|
104
|
+
completeness: string;
|
|
105
|
+
evidenceGrounding: string;
|
|
106
|
+
}, {
|
|
107
|
+
correctness: string;
|
|
108
|
+
constraintHandling: string;
|
|
109
|
+
completeness: string;
|
|
110
|
+
evidenceGrounding: string;
|
|
111
|
+
}>;
|
|
112
|
+
}, "strict", z.ZodTypeAny, {
|
|
113
|
+
id: string;
|
|
114
|
+
version: string;
|
|
115
|
+
expectedResolution: string;
|
|
116
|
+
requiredEvidence: string[];
|
|
117
|
+
disqualifyingErrors: string[];
|
|
118
|
+
rubric: {
|
|
119
|
+
correctness: string;
|
|
120
|
+
constraintHandling: string;
|
|
121
|
+
completeness: string;
|
|
122
|
+
evidenceGrounding: string;
|
|
123
|
+
};
|
|
124
|
+
}, {
|
|
125
|
+
id: string;
|
|
126
|
+
version: string;
|
|
127
|
+
expectedResolution: string;
|
|
128
|
+
requiredEvidence: string[];
|
|
129
|
+
rubric: {
|
|
130
|
+
correctness: string;
|
|
131
|
+
constraintHandling: string;
|
|
132
|
+
completeness: string;
|
|
133
|
+
evidenceGrounding: string;
|
|
134
|
+
};
|
|
135
|
+
disqualifyingErrors?: string[] | undefined;
|
|
136
|
+
}>;
|
|
137
|
+
type TaskPrivate = z.infer<typeof TaskPrivateSchema>;
|
|
138
|
+
interface ArenaTask {
|
|
139
|
+
public: TaskPublic;
|
|
140
|
+
/** Null when loaded without a private overlay. */
|
|
141
|
+
private: TaskPrivate | null;
|
|
142
|
+
publicHash: string;
|
|
143
|
+
privateHash: string | null;
|
|
144
|
+
}
|
|
145
|
+
/** A task whose hidden reference is present — required for judged matches. */
|
|
146
|
+
type CompleteArenaTask = ArenaTask & {
|
|
147
|
+
private: TaskPrivate;
|
|
148
|
+
privateHash: string;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { type ArenaTask as A, type BenchmarkCategory as B, CATEGORIES as C, METHODOLOGY_VERSION as M, type TaskArtifact as T, BenchmarkCategorySchema as a, CATEGORY_CLUSTERS as b, CATEGORY_META as c, type CompleteArenaTask as d, TaskArtifactSchema as e, type TaskPrivate as f, TaskPrivateSchema as g, type TaskPublic as h, TaskPublicSchema as i };
|