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,249 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// node_modules/tsup/assets/cjs_shims.js
|
|
2
|
+
var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
|
|
3
|
+
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
4
|
+
|
|
5
|
+
// src/contracts/categories.ts
|
|
6
|
+
var _zod = require('zod');
|
|
7
|
+
var METHODOLOGY_VERSION = "arena-v0.3.0";
|
|
8
|
+
var BenchmarkCategorySchema = _zod.z.enum(["reasoning", "hallucination"]);
|
|
9
|
+
var CATEGORIES = BenchmarkCategorySchema.options;
|
|
10
|
+
var CATEGORY_CLUSTERS = {
|
|
11
|
+
reasoning: [
|
|
12
|
+
"stateful-execution",
|
|
13
|
+
"constraint-reconciliation",
|
|
14
|
+
"root-cause-reasoning",
|
|
15
|
+
"multi-artifact-synthesis",
|
|
16
|
+
"formal-counterexample",
|
|
17
|
+
"uncertainty-adversarial"
|
|
18
|
+
],
|
|
19
|
+
hallucination: [
|
|
20
|
+
"false-premise",
|
|
21
|
+
"missing-evidence",
|
|
22
|
+
"entity-fabrication",
|
|
23
|
+
"knowledge-boundary",
|
|
24
|
+
"conflicting-sources",
|
|
25
|
+
"citation-fidelity"
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
var CATEGORY_META = {
|
|
29
|
+
reasoning: {
|
|
30
|
+
label: "Reasoning",
|
|
31
|
+
tagline: "Every task is fully determinable from its artifacts \u2014 the arena measures who derives the one defensible resolution."
|
|
32
|
+
},
|
|
33
|
+
hallucination: {
|
|
34
|
+
label: "Hallucination",
|
|
35
|
+
tagline: "Tasks are seeded with false premises, missing evidence, and fabrication bait \u2014 the arena measures who stays grounded instead of inventing."
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// src/contracts/journal.ts
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
// src/contracts/models.ts
|
|
43
|
+
|
|
44
|
+
var ModelRoleSchema = _zod.z.enum(["competitor", "judge"]);
|
|
45
|
+
var ModelCompletionSchema = _zod.z.object({
|
|
46
|
+
generationId: _zod.z.string(),
|
|
47
|
+
content: _zod.z.string(),
|
|
48
|
+
inputTokens: _zod.z.number().finite().nonnegative(),
|
|
49
|
+
outputTokens: _zod.z.number().finite().nonnegative(),
|
|
50
|
+
reasoningTokens: _zod.z.number().finite().nonnegative().optional(),
|
|
51
|
+
costUsd: _zod.z.number().finite().nonnegative(),
|
|
52
|
+
latencyMs: _zod.z.number().finite().nonnegative(),
|
|
53
|
+
finishReason: _zod.z.string(),
|
|
54
|
+
attempts: _zod.z.number().int().positive().optional()
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/contracts/journal.ts
|
|
58
|
+
var CompetitorSuccessSchema = ModelCompletionSchema.extend({
|
|
59
|
+
modelId: _zod.z.string().min(1),
|
|
60
|
+
success: _zod.z.literal(true)
|
|
61
|
+
});
|
|
62
|
+
var CompetitorFailureSchema = _zod.z.object({
|
|
63
|
+
modelId: _zod.z.string().min(1),
|
|
64
|
+
success: _zod.z.literal(false),
|
|
65
|
+
error: _zod.z.string().min(1),
|
|
66
|
+
latencyMs: _zod.z.number().finite().nonnegative(),
|
|
67
|
+
attempts: _zod.z.number().int().positive().optional()
|
|
68
|
+
});
|
|
69
|
+
var LegacyCompetitorFailureSchema = _zod.z.object({
|
|
70
|
+
modelId: _zod.z.string().min(1),
|
|
71
|
+
success: _zod.z.literal(false),
|
|
72
|
+
error: _zod.z.string().min(1),
|
|
73
|
+
generationId: _zod.z.string(),
|
|
74
|
+
content: _zod.z.string(),
|
|
75
|
+
inputTokens: _zod.z.number().finite().nonnegative(),
|
|
76
|
+
outputTokens: _zod.z.number().finite().nonnegative(),
|
|
77
|
+
reasoningTokens: _zod.z.number().finite().nonnegative().optional(),
|
|
78
|
+
costUsd: _zod.z.number().finite().nonnegative(),
|
|
79
|
+
latencyMs: _zod.z.number().finite().nonnegative(),
|
|
80
|
+
finishReason: _zod.z.string(),
|
|
81
|
+
attempts: _zod.z.number().int().positive().optional()
|
|
82
|
+
}).transform(({ modelId, error, latencyMs, attempts }) => ({
|
|
83
|
+
modelId,
|
|
84
|
+
success: false,
|
|
85
|
+
error,
|
|
86
|
+
latencyMs,
|
|
87
|
+
...attempts === void 0 ? {} : { attempts }
|
|
88
|
+
}));
|
|
89
|
+
var CompetitorResponseSchema = _zod.z.union([
|
|
90
|
+
CompetitorSuccessSchema,
|
|
91
|
+
CompetitorFailureSchema,
|
|
92
|
+
LegacyCompetitorFailureSchema
|
|
93
|
+
]);
|
|
94
|
+
var JudgeVerdictSchema = _zod.z.object({
|
|
95
|
+
winner: _zod.z.enum(["MODEL_A", "MODEL_B"]),
|
|
96
|
+
confidence: _zod.z.number().min(0).max(1),
|
|
97
|
+
rationale: _zod.z.string().min(1).max(4e3),
|
|
98
|
+
criteria: _zod.z.object({
|
|
99
|
+
correctness: _zod.z.string().min(1).max(1e3),
|
|
100
|
+
grounding: _zod.z.string().min(1).max(1e3),
|
|
101
|
+
constraintHandling: _zod.z.string().min(1).max(1e3),
|
|
102
|
+
completeness: _zod.z.string().min(1).max(1e3)
|
|
103
|
+
}),
|
|
104
|
+
violations: _zod.z.array(_zod.z.string().max(500)).max(20)
|
|
105
|
+
});
|
|
106
|
+
var JUDGE_VERDICT_TRANSPORT_SCHEMA = {
|
|
107
|
+
type: "object",
|
|
108
|
+
additionalProperties: false,
|
|
109
|
+
required: ["winner", "confidence", "rationale", "criteria", "violations"],
|
|
110
|
+
properties: {
|
|
111
|
+
winner: { type: "string", enum: ["MODEL_A", "MODEL_B"] },
|
|
112
|
+
confidence: { type: "number", minimum: 0, maximum: 1 },
|
|
113
|
+
rationale: { type: "string" },
|
|
114
|
+
criteria: {
|
|
115
|
+
type: "object",
|
|
116
|
+
additionalProperties: false,
|
|
117
|
+
required: ["correctness", "grounding", "constraintHandling", "completeness"],
|
|
118
|
+
properties: {
|
|
119
|
+
correctness: { type: "string" },
|
|
120
|
+
grounding: { type: "string" },
|
|
121
|
+
constraintHandling: { type: "string" },
|
|
122
|
+
completeness: { type: "string" }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
violations: { type: "array", items: { type: "string" } }
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
var NumericRecordSchema = _zod.z.record(_zod.z.number().finite());
|
|
129
|
+
var JudgeVoteSchema = _zod.z.object({
|
|
130
|
+
judgeModelId: _zod.z.string().min(1),
|
|
131
|
+
modelAIdentity: _zod.z.string().min(1),
|
|
132
|
+
modelBIdentity: _zod.z.string().min(1),
|
|
133
|
+
verdict: JudgeVerdictSchema.nullable(),
|
|
134
|
+
winnerModelId: _zod.z.string().min(1).nullable(),
|
|
135
|
+
completion: ModelCompletionSchema.nullable(),
|
|
136
|
+
error: _zod.z.string().optional()
|
|
137
|
+
});
|
|
138
|
+
var PanelDecisionSchema = _zod.z.object({
|
|
139
|
+
winnerModelId: _zod.z.string().min(1).nullable(),
|
|
140
|
+
validVotes: _zod.z.number().int().nonnegative(),
|
|
141
|
+
votesByModel: NumericRecordSchema,
|
|
142
|
+
agreement: _zod.z.enum(["unanimous", "split", "insufficient"]),
|
|
143
|
+
votes: _zod.z.array(JudgeVoteSchema)
|
|
144
|
+
});
|
|
145
|
+
var MatchResultSchema = _zod.z.object({
|
|
146
|
+
methodologyVersion: _zod.z.string().min(1),
|
|
147
|
+
runId: _zod.z.string().min(1),
|
|
148
|
+
runManifestHash: _zod.z.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
149
|
+
matchId: _zod.z.string().min(1),
|
|
150
|
+
scheduleIndex: _zod.z.number().int().nonnegative(),
|
|
151
|
+
seed: _zod.z.string(),
|
|
152
|
+
timestamp: _zod.z.string().datetime(),
|
|
153
|
+
task: _zod.z.object({
|
|
154
|
+
id: _zod.z.string().min(1),
|
|
155
|
+
version: _zod.z.string().min(1),
|
|
156
|
+
category: BenchmarkCategorySchema.optional(),
|
|
157
|
+
cluster: _zod.z.string().min(1),
|
|
158
|
+
publicHash: _zod.z.string().min(1),
|
|
159
|
+
privateHash: _zod.z.string().min(1)
|
|
160
|
+
}),
|
|
161
|
+
competitors: _zod.z.object({
|
|
162
|
+
modelA: _zod.z.string().min(1),
|
|
163
|
+
modelB: _zod.z.string().min(1),
|
|
164
|
+
responseA: CompetitorResponseSchema,
|
|
165
|
+
responseB: CompetitorResponseSchema
|
|
166
|
+
}),
|
|
167
|
+
outcome: _zod.z.enum(["judged", "forfeit", "no-contest"]),
|
|
168
|
+
winnerModelId: _zod.z.string().min(1).nullable(),
|
|
169
|
+
panel: PanelDecisionSchema.nullable(),
|
|
170
|
+
eloBefore: NumericRecordSchema,
|
|
171
|
+
eloAfter: NumericRecordSchema,
|
|
172
|
+
pointAwarded: _zod.z.boolean(),
|
|
173
|
+
matchCostUsd: _zod.z.number().finite().nonnegative()
|
|
174
|
+
});
|
|
175
|
+
function competitorCost(response) {
|
|
176
|
+
return response.success ? response.costUsd : 0;
|
|
177
|
+
}
|
|
178
|
+
function competitorOutputTokens(response) {
|
|
179
|
+
return response.success ? response.outputTokens : 0;
|
|
180
|
+
}
|
|
181
|
+
function competitorReasoningTokens(response) {
|
|
182
|
+
return response.success ? response.reasoningTokens : void 0;
|
|
183
|
+
}
|
|
184
|
+
function competitorContent(response) {
|
|
185
|
+
return response.success ? response.content : "";
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// src/contracts/tasks.ts
|
|
189
|
+
|
|
190
|
+
var TaskArtifactSchema = _zod.z.object({
|
|
191
|
+
id: _zod.z.string().min(1).max(80),
|
|
192
|
+
type: _zod.z.enum(["code", "log", "config", "spec", "diff", "table", "note"]),
|
|
193
|
+
label: _zod.z.string().min(1).max(160),
|
|
194
|
+
content: _zod.z.string().min(1).max(4e4)
|
|
195
|
+
}).strict();
|
|
196
|
+
var TaskPublicSchema = _zod.z.object({
|
|
197
|
+
id: _zod.z.string().regex(/^[a-z0-9][a-z0-9-]{2,79}$/),
|
|
198
|
+
version: _zod.z.string().regex(/^\d+\.\d+\.\d+$/),
|
|
199
|
+
category: BenchmarkCategorySchema,
|
|
200
|
+
cluster: _zod.z.string().min(1).max(60),
|
|
201
|
+
difficulty: _zod.z.enum(["hard", "expert"]),
|
|
202
|
+
title: _zod.z.string().min(1).max(180),
|
|
203
|
+
summary: _zod.z.string().min(1).max(500),
|
|
204
|
+
prompt: _zod.z.string().min(1).max(1e4),
|
|
205
|
+
artifacts: _zod.z.array(TaskArtifactSchema).min(1).max(20),
|
|
206
|
+
tags: _zod.z.array(_zod.z.string().min(1).max(60)).default([])
|
|
207
|
+
}).strict();
|
|
208
|
+
var TaskPrivateSchema = _zod.z.object({
|
|
209
|
+
id: _zod.z.string().min(1),
|
|
210
|
+
version: _zod.z.string().min(1),
|
|
211
|
+
expectedResolution: _zod.z.string().min(1).max(1e4),
|
|
212
|
+
requiredEvidence: _zod.z.array(_zod.z.string().min(1)).min(1),
|
|
213
|
+
disqualifyingErrors: _zod.z.array(_zod.z.string().min(1)).default([]),
|
|
214
|
+
rubric: _zod.z.object({
|
|
215
|
+
correctness: _zod.z.string().min(1),
|
|
216
|
+
evidenceGrounding: _zod.z.string().min(1),
|
|
217
|
+
constraintHandling: _zod.z.string().min(1),
|
|
218
|
+
completeness: _zod.z.string().min(1)
|
|
219
|
+
}).strict()
|
|
220
|
+
}).strict();
|
|
221
|
+
|
|
222
|
+
// src/contracts/index.ts
|
|
223
|
+
var CONTRACTS_VERSION = "1.0.0";
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
exports.importMetaUrl = importMetaUrl; exports.METHODOLOGY_VERSION = METHODOLOGY_VERSION; exports.BenchmarkCategorySchema = BenchmarkCategorySchema; exports.CATEGORIES = CATEGORIES; exports.CATEGORY_CLUSTERS = CATEGORY_CLUSTERS; exports.CATEGORY_META = CATEGORY_META; exports.ModelRoleSchema = ModelRoleSchema; exports.ModelCompletionSchema = ModelCompletionSchema; exports.CompetitorResponseSchema = CompetitorResponseSchema; exports.JudgeVerdictSchema = JudgeVerdictSchema; exports.JUDGE_VERDICT_TRANSPORT_SCHEMA = JUDGE_VERDICT_TRANSPORT_SCHEMA; exports.JudgeVoteSchema = JudgeVoteSchema; exports.PanelDecisionSchema = PanelDecisionSchema; exports.MatchResultSchema = MatchResultSchema; exports.competitorCost = competitorCost; exports.competitorOutputTokens = competitorOutputTokens; exports.competitorReasoningTokens = competitorReasoningTokens; exports.competitorContent = competitorContent; exports.TaskArtifactSchema = TaskArtifactSchema; exports.TaskPublicSchema = TaskPublicSchema; exports.TaskPrivateSchema = TaskPrivateSchema; exports.CONTRACTS_VERSION = CONTRACTS_VERSION;
|
|
249
|
+
//# sourceMappingURL=chunk-CIXITJW6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/matthewmiller/Desktop/bridgemind/bridgebench/dist/chunk-CIXITJW6.cjs","../node_modules/tsup/assets/cjs_shims.js","../src/contracts/categories.ts","../src/contracts/journal.ts","../src/contracts/models.ts","../src/contracts/tasks.ts","../src/cont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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/Users/matthewmiller/Desktop/bridgemind/bridgebench/dist/chunk-CIXITJW6.cjs","sourcesContent":[null,"// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n","import { z } from 'zod';\n\nexport const METHODOLOGY_VERSION = 'arena-v0.3.0';\n\nexport const BenchmarkCategorySchema = z.enum(['reasoning', 'hallucination']);\nexport type BenchmarkCategory = z.infer<typeof BenchmarkCategorySchema>;\nexport const CATEGORIES = BenchmarkCategorySchema.options;\n\nexport const CATEGORY_CLUSTERS: Record<BenchmarkCategory, readonly string[]> = {\n reasoning: [\n 'stateful-execution',\n 'constraint-reconciliation',\n 'root-cause-reasoning',\n 'multi-artifact-synthesis',\n 'formal-counterexample',\n 'uncertainty-adversarial',\n ],\n hallucination: [\n 'false-premise',\n 'missing-evidence',\n 'entity-fabrication',\n 'knowledge-boundary',\n 'conflicting-sources',\n 'citation-fidelity',\n ],\n};\n\nexport const CATEGORY_META: Record<BenchmarkCategory, { label: string; tagline: string }> = {\n reasoning: {\n label: 'Reasoning',\n tagline:\n 'Every task is fully determinable from its artifacts — the arena measures who derives the one defensible resolution.',\n },\n hallucination: {\n label: 'Hallucination',\n tagline:\n 'Tasks are seeded with false premises, missing evidence, and fabrication bait — the arena measures who stays grounded instead of inventing.',\n },\n};\n","import { z } from 'zod';\n\nimport { BenchmarkCategorySchema, type BenchmarkCategory } from './categories.js';\nimport { ModelCompletionSchema, type ModelCompletion } from './models.js';\n\nexport interface ArenaRunConfig {\n category: BenchmarkCategory;\n seed: string;\n matches: number;\n maxCostUsd: number;\n resume: boolean;\n /** Omit to use every enabled competitor in the registry. */\n competitorIds?: readonly string[];\n /** Abort early when most matches contain a failed response. */\n healthStop?: boolean;\n}\n\nexport interface ArenaExecutionOptions {\n /** Execution-only cancellation; deliberately excluded from the canonical manifest. */\n signal?: AbortSignal;\n /**\n * Invoked after each match result is journaled, before the next match\n * starts. Used to publish results incrementally instead of only at run end.\n * Must not throw; handle and log failures internally.\n */\n onMatchResult?: (result: MatchResult) => Promise<void> | void;\n}\n\nexport interface ArenaRunResult {\n runId: string;\n completed: number;\n costUsd: number;\n stoppedForBudget: boolean;\n cancelled: boolean;\n}\n\nexport interface ScheduledMatch {\n id: string;\n runId: string;\n index: number;\n seed: string;\n category: BenchmarkCategory;\n taskId: string;\n modelA: string;\n modelB: string;\n}\n\nconst CompetitorSuccessSchema = ModelCompletionSchema.extend({\n modelId: z.string().min(1),\n success: z.literal(true),\n});\nexport type CompetitorSuccess = z.infer<typeof CompetitorSuccessSchema>;\n\nconst CompetitorFailureSchema = z.object({\n modelId: z.string().min(1),\n success: z.literal(false),\n error: z.string().min(1),\n latencyMs: z.number().finite().nonnegative(),\n attempts: z.number().int().positive().optional(),\n});\nexport type CompetitorFailure = z.infer<typeof CompetitorFailureSchema>;\n\nconst LegacyCompetitorFailureSchema = z\n .object({\n modelId: z.string().min(1),\n success: z.literal(false),\n error: z.string().min(1),\n generationId: z.string(),\n content: z.string(),\n inputTokens: z.number().finite().nonnegative(),\n outputTokens: z.number().finite().nonnegative(),\n reasoningTokens: z.number().finite().nonnegative().optional(),\n costUsd: z.number().finite().nonnegative(),\n latencyMs: z.number().finite().nonnegative(),\n finishReason: z.string(),\n attempts: z.number().int().positive().optional(),\n })\n .transform(({ modelId, error, latencyMs, attempts }) => ({\n modelId,\n success: false as const,\n error,\n latencyMs,\n ...(attempts === undefined ? {} : { attempts }),\n }));\n\nexport type CompetitorResponse = CompetitorSuccess | CompetitorFailure;\nexport const CompetitorResponseSchema: z.ZodType<CompetitorResponse> = z.union([\n CompetitorSuccessSchema,\n CompetitorFailureSchema,\n LegacyCompetitorFailureSchema,\n]);\n\nexport const JudgeVerdictSchema = z.object({\n winner: z.enum(['MODEL_A', 'MODEL_B']),\n confidence: z.number().min(0).max(1),\n rationale: z.string().min(1).max(4_000),\n criteria: z.object({\n correctness: z.string().min(1).max(1_000),\n grounding: z.string().min(1).max(1_000),\n constraintHandling: z.string().min(1).max(1_000),\n completeness: z.string().min(1).max(1_000),\n }),\n violations: z.array(z.string().max(500)).max(20),\n});\nexport type JudgeVerdict = z.infer<typeof JudgeVerdictSchema>;\n\n/**\n * Provider-safe JSON Schema subset generated from the same verdict shape.\n * Runtime Zod parsing above enforces the local string and array limits.\n */\nexport const JUDGE_VERDICT_TRANSPORT_SCHEMA = {\n type: 'object',\n additionalProperties: false,\n required: ['winner', 'confidence', 'rationale', 'criteria', 'violations'],\n properties: {\n winner: { type: 'string', enum: ['MODEL_A', 'MODEL_B'] },\n confidence: { type: 'number', minimum: 0, maximum: 1 },\n rationale: { type: 'string' },\n criteria: {\n type: 'object',\n additionalProperties: false,\n required: ['correctness', 'grounding', 'constraintHandling', 'completeness'],\n properties: {\n correctness: { type: 'string' },\n grounding: { type: 'string' },\n constraintHandling: { type: 'string' },\n completeness: { type: 'string' },\n },\n },\n violations: { type: 'array', items: { type: 'string' } },\n },\n} as const;\n\nexport interface JudgeVote {\n judgeModelId: string;\n modelAIdentity: string;\n modelBIdentity: string;\n verdict: JudgeVerdict | null;\n winnerModelId: string | null;\n completion: ModelCompletion | null;\n error?: string;\n}\n\nexport interface PanelDecision {\n winnerModelId: string | null;\n validVotes: number;\n votesByModel: Record<string, number>;\n agreement: 'unanimous' | 'split' | 'insufficient';\n votes: JudgeVote[];\n}\n\nexport interface EloState {\n ratings: Record<string, number>;\n points: Record<string, number>;\n}\n\nexport interface MatchResult {\n methodologyVersion: string;\n runId: string;\n /** Absent on legacy journal lines written before run manifests. */\n runManifestHash?: string;\n matchId: string;\n scheduleIndex: number;\n seed: string;\n timestamp: string;\n task: {\n id: string;\n version: string;\n /** Absent on reasoning-only legacy lines. */\n category?: BenchmarkCategory;\n cluster: string;\n publicHash: string;\n privateHash: string;\n };\n competitors: {\n modelA: string;\n modelB: string;\n responseA: CompetitorResponse;\n responseB: CompetitorResponse;\n };\n outcome: 'judged' | 'forfeit' | 'no-contest';\n winnerModelId: string | null;\n panel: PanelDecision | null;\n eloBefore: Record<string, number>;\n eloAfter: Record<string, number>;\n pointAwarded: boolean;\n matchCostUsd: number;\n}\n\nconst NumericRecordSchema = z.record(z.number().finite());\n\nexport const JudgeVoteSchema: z.ZodType<JudgeVote> = z.object({\n judgeModelId: z.string().min(1),\n modelAIdentity: z.string().min(1),\n modelBIdentity: z.string().min(1),\n verdict: JudgeVerdictSchema.nullable(),\n winnerModelId: z.string().min(1).nullable(),\n completion: ModelCompletionSchema.nullable(),\n error: z.string().optional(),\n});\n\nexport const PanelDecisionSchema: z.ZodType<PanelDecision> = z.object({\n winnerModelId: z.string().min(1).nullable(),\n validVotes: z.number().int().nonnegative(),\n votesByModel: NumericRecordSchema,\n agreement: z.enum(['unanimous', 'split', 'insufficient']),\n votes: z.array(JudgeVoteSchema),\n});\n\nexport const MatchResultSchema: z.ZodType<MatchResult> = z.object({\n methodologyVersion: z.string().min(1),\n runId: z.string().min(1),\n runManifestHash: z\n .string()\n .regex(/^[a-f0-9]{64}$/)\n .optional(),\n matchId: z.string().min(1),\n scheduleIndex: z.number().int().nonnegative(),\n seed: z.string(),\n timestamp: z.string().datetime(),\n task: z.object({\n id: z.string().min(1),\n version: z.string().min(1),\n category: BenchmarkCategorySchema.optional(),\n cluster: z.string().min(1),\n publicHash: z.string().min(1),\n privateHash: z.string().min(1),\n }),\n competitors: z.object({\n modelA: z.string().min(1),\n modelB: z.string().min(1),\n responseA: CompetitorResponseSchema,\n responseB: CompetitorResponseSchema,\n }),\n outcome: z.enum(['judged', 'forfeit', 'no-contest']),\n winnerModelId: z.string().min(1).nullable(),\n panel: PanelDecisionSchema.nullable(),\n eloBefore: NumericRecordSchema,\n eloAfter: NumericRecordSchema,\n pointAwarded: z.boolean(),\n matchCostUsd: z.number().finite().nonnegative(),\n});\n\nexport function competitorCost(response: CompetitorResponse): number {\n return response.success ? response.costUsd : 0;\n}\n\nexport function competitorOutputTokens(response: CompetitorResponse): number {\n return response.success ? response.outputTokens : 0;\n}\n\nexport function competitorReasoningTokens(response: CompetitorResponse): number | undefined {\n return response.success ? response.reasoningTokens : undefined;\n}\n\nexport function competitorContent(response: CompetitorResponse): string {\n return response.success ? response.content : '';\n}\n","import { z } from 'zod';\n\nexport const ModelRoleSchema = z.enum(['competitor', 'judge']);\nexport type ModelRole = z.infer<typeof ModelRoleSchema>;\n\nexport interface ModelRequestPolicy {\n maxTokens: number;\n temperature: number;\n reasoningEffort: 'high' | 'medium' | 'low';\n excludeReasoning: boolean;\n timeoutMs: number;\n}\n\nexport interface ModelRegistryEntry {\n id: string;\n canonicalSlug: string;\n displayName: string;\n vendor: string;\n role: ModelRole;\n enabled: boolean;\n request: ModelRequestPolicy;\n}\n\nexport const ModelCompletionSchema = z.object({\n generationId: z.string(),\n content: z.string(),\n inputTokens: z.number().finite().nonnegative(),\n outputTokens: z.number().finite().nonnegative(),\n reasoningTokens: z.number().finite().nonnegative().optional(),\n costUsd: z.number().finite().nonnegative(),\n latencyMs: z.number().finite().nonnegative(),\n finishReason: z.string(),\n attempts: z.number().int().positive().optional(),\n});\nexport type ModelCompletion = z.infer<typeof ModelCompletionSchema>;\n\nexport interface ChatRequest {\n model: ModelRegistryEntry;\n system: string;\n user: string;\n structured?: boolean;\n /** Execution-only cancellation; never serialized into a run manifest or provider payload. */\n signal?: AbortSignal;\n /** Called with the accumulated visible text as it streams in (throttled). */\n onDelta?: (text: string) => void;\n}\n\nexport interface OpenRouterGateway {\n complete(request: ChatRequest): Promise<ModelCompletion>;\n validateModel(model: ModelRegistryEntry, signal?: AbortSignal): Promise<void>;\n}\n","import { z } from 'zod';\n\nimport { BenchmarkCategorySchema } from './categories.js';\n\nexport const TaskArtifactSchema = z\n .object({\n id: z.string().min(1).max(80),\n type: z.enum(['code', 'log', 'config', 'spec', 'diff', 'table', 'note']),\n label: z.string().min(1).max(160),\n content: z.string().min(1).max(40_000),\n })\n .strict();\nexport type TaskArtifact = z.infer<typeof TaskArtifactSchema>;\n\nexport const TaskPublicSchema = z\n .object({\n id: z.string().regex(/^[a-z0-9][a-z0-9-]{2,79}$/),\n version: z.string().regex(/^\\d+\\.\\d+\\.\\d+$/),\n category: BenchmarkCategorySchema,\n cluster: z.string().min(1).max(60),\n difficulty: z.enum(['hard', 'expert']),\n title: z.string().min(1).max(180),\n summary: z.string().min(1).max(500),\n prompt: z.string().min(1).max(10_000),\n artifacts: z.array(TaskArtifactSchema).min(1).max(20),\n tags: z.array(z.string().min(1).max(60)).default([]),\n })\n .strict();\nexport type TaskPublic = z.infer<typeof TaskPublicSchema>;\n\nexport const TaskPrivateSchema = z\n .object({\n id: z.string().min(1),\n version: z.string().min(1),\n expectedResolution: z.string().min(1).max(10_000),\n requiredEvidence: z.array(z.string().min(1)).min(1),\n disqualifyingErrors: z.array(z.string().min(1)).default([]),\n rubric: z\n .object({\n correctness: z.string().min(1),\n evidenceGrounding: z.string().min(1),\n constraintHandling: z.string().min(1),\n completeness: z.string().min(1),\n })\n .strict(),\n })\n .strict();\nexport type TaskPrivate = z.infer<typeof TaskPrivateSchema>;\n\nexport interface ArenaTask {\n public: TaskPublic;\n /** Null when loaded without a private overlay. */\n private: TaskPrivate | null;\n publicHash: string;\n privateHash: string | null;\n}\n\n/** A task whose hidden reference is present — required for judged matches. */\nexport type CompleteArenaTask = ArenaTask & {\n private: TaskPrivate;\n privateHash: string;\n};\n","/**\n * Public BridgeBench arena contract version.\n *\n * Increment this when an exported contract changes incompatibly. The entry\n * point intentionally exports contracts only; it has no arena-runner or\n * provider implementation dependency.\n */\nexport const CONTRACTS_VERSION = '1.0.0' as const;\n\nexport * from './categories.js';\nexport * from './events.js';\nexport * from './journal.js';\nexport * from './models.js';\nexport * from './reports.js';\nexport * from './tasks.js';\n"]}
|