@sverka/arena 0.0.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +13 -0
- package/dist/bin.mjs.map +1 -0
- package/dist/index.d.mts +426 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1079 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -10
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
//#region src/bin.ts
|
|
4
|
+
async function main() {
|
|
5
|
+
process.stderr.write("arena CLI — not yet implemented\n");
|
|
6
|
+
return 1;
|
|
7
|
+
}
|
|
8
|
+
const code = await main();
|
|
9
|
+
process.exit(code);
|
|
10
|
+
//#endregion
|
|
11
|
+
export {};
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=bin.mjs.map
|
package/dist/bin.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport process from \"node:process\";\n// Stub — will be implemented in next phase\nasync function main(): Promise<number> {\n process.stderr.write(\"arena CLI — not yet implemented\\n\");\n return 1;\n}\n\nconst code = await main();\nprocess.exit(code);\n"],"mappings":";;;AAGA,eAAe,OAAwB;CACrC,QAAQ,OAAO,MAAM,mCAAmC;CACxD,OAAO;AACT;AAEA,MAAM,OAAO,MAAM,KAAK;AACxB,QAAQ,KAAK,IAAI"}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { ChildProcess } from "node:child_process";
|
|
2
|
+
import * as acp from "@agentclientprotocol/sdk";
|
|
3
|
+
import { PromptResponse, SessionUpdate, Usage } from "@agentclientprotocol/sdk";
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
/** Agent adapter — pluggable interface for different agent CLIs */
|
|
6
|
+
interface AgentAdapter {
|
|
7
|
+
id: string;
|
|
8
|
+
spawn(config: AgentSpawnConfig): AgentProcess;
|
|
9
|
+
}
|
|
10
|
+
interface AgentSpawnConfig {
|
|
11
|
+
model: ModelConfig;
|
|
12
|
+
workspace: string;
|
|
13
|
+
plugins: PluginConfig[];
|
|
14
|
+
permissionMode?: "auto" | "dangerous" | "accept-edits";
|
|
15
|
+
env?: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
interface AgentProcess {
|
|
18
|
+
run(prompt: string, timeoutMs: number): Promise<RunResult>;
|
|
19
|
+
kill(): void;
|
|
20
|
+
}
|
|
21
|
+
/** Model configuration */
|
|
22
|
+
interface ModelConfig {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
envVar?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Plugin/skill configuration — the variable we're testing */
|
|
28
|
+
interface PluginConfig {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
path: string;
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
installPath?: string;
|
|
34
|
+
}
|
|
35
|
+
/** Task to benchmark */
|
|
36
|
+
interface Task {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
prompt: string;
|
|
40
|
+
timeoutMs?: number;
|
|
41
|
+
/** Natural-language criteria the judge uses to evaluate the output */
|
|
42
|
+
successCriteria?: string;
|
|
43
|
+
/** Optional expected output for deterministic comparison */
|
|
44
|
+
expectedOutput?: string;
|
|
45
|
+
/** Fixture project to copy into the workspace for this task.
|
|
46
|
+
* Path relative to the arena package root (e.g. "fixtures/ts-fix-test").
|
|
47
|
+
* If omitted, the runner uses an empty temp directory. */
|
|
48
|
+
fixture?: string;
|
|
49
|
+
/** Optional deterministic checks to run after the agent finishes.
|
|
50
|
+
* Each check is a shell command; exit 0 = pass, non-zero = fail. */
|
|
51
|
+
checks?: DeterministicCheck[];
|
|
52
|
+
}
|
|
53
|
+
/** A deterministic check — shell command that exits 0 on success. */
|
|
54
|
+
interface DeterministicCheck {
|
|
55
|
+
id: string;
|
|
56
|
+
command: string;
|
|
57
|
+
description: string;
|
|
58
|
+
}
|
|
59
|
+
/** Full arena configuration — defines the matrix */
|
|
60
|
+
interface ArenaConfig {
|
|
61
|
+
tasks: Task[];
|
|
62
|
+
agent: AgentAdapter;
|
|
63
|
+
models: ModelConfig[];
|
|
64
|
+
plugins: PluginConfig[];
|
|
65
|
+
workspace?: string;
|
|
66
|
+
repetitions?: number;
|
|
67
|
+
outputDir: string;
|
|
68
|
+
/** Judge configuration for blind evaluation (optional) */
|
|
69
|
+
judge?: JudgeConfig;
|
|
70
|
+
}
|
|
71
|
+
/** Judge configuration — blind LLM evaluation of run outputs */
|
|
72
|
+
interface JudgeConfig {
|
|
73
|
+
/** Model to use for judging (can differ from agent models) */
|
|
74
|
+
model: ModelConfig;
|
|
75
|
+
/** Agent adapter for the judge (can differ from the agent under test) */
|
|
76
|
+
agent: AgentAdapter;
|
|
77
|
+
/** Number of judge repetitions per run (for confidence intervals) */
|
|
78
|
+
repetitions?: number;
|
|
79
|
+
/** Whether to show the judge which plugins were active (default: false = blind) */
|
|
80
|
+
revealPlugins?: boolean;
|
|
81
|
+
/** Custom system prompt for the judge */
|
|
82
|
+
systemPrompt?: string;
|
|
83
|
+
}
|
|
84
|
+
/** Judge evaluation of a single run */
|
|
85
|
+
interface JudgeVerdict {
|
|
86
|
+
/** Run being judged (index into ArenaResult.results) */
|
|
87
|
+
runIndex: number;
|
|
88
|
+
/** Score 0-100 */
|
|
89
|
+
score: number;
|
|
90
|
+
/** Whether the judge considers this a pass (score >= threshold) */
|
|
91
|
+
passed: boolean;
|
|
92
|
+
/** Judge's reasoning */
|
|
93
|
+
reasoning: string;
|
|
94
|
+
/** Specific issues found */
|
|
95
|
+
issues: string[];
|
|
96
|
+
/** Which run this verdict applies to (for pairing) */
|
|
97
|
+
taskId: string;
|
|
98
|
+
modelId: string;
|
|
99
|
+
pluginIds: string[];
|
|
100
|
+
}
|
|
101
|
+
/** Result of a single matrix cell run */
|
|
102
|
+
interface RunResult {
|
|
103
|
+
taskId: string;
|
|
104
|
+
modelId: string;
|
|
105
|
+
pluginIds: string[];
|
|
106
|
+
metrics: RunMetrics;
|
|
107
|
+
trace: TraceData;
|
|
108
|
+
/** The agent's final output (text response to the prompt) */
|
|
109
|
+
output: string;
|
|
110
|
+
success: boolean;
|
|
111
|
+
/** Results of deterministic checks (empty if none configured) */
|
|
112
|
+
checkResults: CheckResult[];
|
|
113
|
+
error?: string;
|
|
114
|
+
/** Judge verdicts for this run (empty if no judge configured) */
|
|
115
|
+
verdicts: JudgeVerdict[];
|
|
116
|
+
}
|
|
117
|
+
/** Result of a single deterministic check */
|
|
118
|
+
interface CheckResult {
|
|
119
|
+
checkId: string;
|
|
120
|
+
passed: boolean;
|
|
121
|
+
output: string;
|
|
122
|
+
exitCode: number;
|
|
123
|
+
}
|
|
124
|
+
/** Metrics collected per run */
|
|
125
|
+
interface RunMetrics {
|
|
126
|
+
inputTokens: number;
|
|
127
|
+
outputTokens: number;
|
|
128
|
+
thoughtTokens: number;
|
|
129
|
+
totalTokens: number;
|
|
130
|
+
toolCallCount: number;
|
|
131
|
+
llmCallCount: number;
|
|
132
|
+
executionTimeMs: number;
|
|
133
|
+
stopReason: string;
|
|
134
|
+
}
|
|
135
|
+
/** Full trace data for visualization */
|
|
136
|
+
interface TraceData {
|
|
137
|
+
sessionId: string;
|
|
138
|
+
model: string;
|
|
139
|
+
steps: TraceStep[];
|
|
140
|
+
finalMetrics: {
|
|
141
|
+
totalPromptTokens: number;
|
|
142
|
+
totalCompletionTokens: number;
|
|
143
|
+
totalCachedTokens: number;
|
|
144
|
+
totalSteps: number;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
/** A single step in the trace */
|
|
148
|
+
interface TraceStep {
|
|
149
|
+
stepId: number;
|
|
150
|
+
timestamp: string;
|
|
151
|
+
source: "system" | "agent" | "user";
|
|
152
|
+
message: string;
|
|
153
|
+
toolCalls?: ToolCall[];
|
|
154
|
+
observations?: Observation[];
|
|
155
|
+
isLlmCall: boolean;
|
|
156
|
+
}
|
|
157
|
+
/** A tool call within a step */
|
|
158
|
+
interface ToolCall {
|
|
159
|
+
functionName: string;
|
|
160
|
+
arguments: Record<string, unknown>;
|
|
161
|
+
toolCallId: string;
|
|
162
|
+
}
|
|
163
|
+
/** Observation result from a tool call */
|
|
164
|
+
interface Observation {
|
|
165
|
+
sourceCallId: string;
|
|
166
|
+
content: string;
|
|
167
|
+
}
|
|
168
|
+
/** Aggregate metrics for a group of runs */
|
|
169
|
+
interface AggregateMetrics {
|
|
170
|
+
totalRuns: number;
|
|
171
|
+
successCount: number;
|
|
172
|
+
avgInputTokens: number;
|
|
173
|
+
avgOutputTokens: number;
|
|
174
|
+
avgTotalTokens: number;
|
|
175
|
+
avgToolCalls: number;
|
|
176
|
+
avgLlmCalls: number;
|
|
177
|
+
avgExecutionTimeMs: number;
|
|
178
|
+
/** Average judge score (0-100) across judged runs */
|
|
179
|
+
avgJudgeScore: number;
|
|
180
|
+
/** Number of runs that passed judge evaluation */
|
|
181
|
+
judgePassCount: number;
|
|
182
|
+
/** Label for this aggregate group (e.g. "glm-5-2/sverka=on") */
|
|
183
|
+
label: string;
|
|
184
|
+
}
|
|
185
|
+
/** Full arena result — all cells in the matrix */
|
|
186
|
+
interface ArenaResult {
|
|
187
|
+
timestamp: string;
|
|
188
|
+
config: {
|
|
189
|
+
models: string[];
|
|
190
|
+
plugins: string[];
|
|
191
|
+
tasks: string[];
|
|
192
|
+
repetitions: number;
|
|
193
|
+
judgeModel?: string;
|
|
194
|
+
};
|
|
195
|
+
results: RunResult[];
|
|
196
|
+
aggregates: AggregateMetrics[];
|
|
197
|
+
/** Per-task analysis comparing plugin on vs off */
|
|
198
|
+
analysis: CaseAnalysis[];
|
|
199
|
+
}
|
|
200
|
+
/** Analysis of a single case (task) across plugin combinations */
|
|
201
|
+
interface CaseAnalysis {
|
|
202
|
+
taskId: string;
|
|
203
|
+
taskName: string;
|
|
204
|
+
prompt: string;
|
|
205
|
+
/** Comparison between plugin combos for this task */
|
|
206
|
+
comparisons: ComboComparison[];
|
|
207
|
+
/** AI-generated summary of findings for this case */
|
|
208
|
+
summary?: string;
|
|
209
|
+
}
|
|
210
|
+
/** Comparison between two plugin combos for a task */
|
|
211
|
+
interface ComboComparison {
|
|
212
|
+
/** Plugin combo label (e.g. "no-plugins" vs "sverka") */
|
|
213
|
+
baseline: string;
|
|
214
|
+
candidate: string;
|
|
215
|
+
/** Metric deltas (candidate - baseline) */
|
|
216
|
+
deltaTokens: number;
|
|
217
|
+
deltaToolCalls: number;
|
|
218
|
+
deltaLlmCalls: number;
|
|
219
|
+
deltaTimeMs: number;
|
|
220
|
+
deltaJudgeScore: number;
|
|
221
|
+
/** Whether the candidate is better than baseline */
|
|
222
|
+
candidateBetter: boolean;
|
|
223
|
+
}
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/adapters/devin.d.ts
|
|
226
|
+
/** A single step in the raw Devin CLI transcript. */
|
|
227
|
+
interface TranscriptStep {
|
|
228
|
+
step_id: number;
|
|
229
|
+
source: "system" | "agent" | "user";
|
|
230
|
+
message: string;
|
|
231
|
+
timestamp: string;
|
|
232
|
+
extra?: {
|
|
233
|
+
generation_model?: string | null;
|
|
234
|
+
telemetry?: {
|
|
235
|
+
source?: string;
|
|
236
|
+
operation?: string;
|
|
237
|
+
} | null;
|
|
238
|
+
} | null;
|
|
239
|
+
}
|
|
240
|
+
/** Final metrics block in a Devin CLI transcript. */
|
|
241
|
+
interface TranscriptMetrics {
|
|
242
|
+
total_prompt_tokens: number;
|
|
243
|
+
total_completion_tokens: number;
|
|
244
|
+
total_cached_tokens: number;
|
|
245
|
+
total_steps: number;
|
|
246
|
+
}
|
|
247
|
+
/** Full raw transcript written by the Devin CLI. */
|
|
248
|
+
interface Transcript {
|
|
249
|
+
session_id: string;
|
|
250
|
+
schema_version: string;
|
|
251
|
+
agent: {
|
|
252
|
+
name: string;
|
|
253
|
+
version: string;
|
|
254
|
+
model_name: string;
|
|
255
|
+
};
|
|
256
|
+
final_metrics: TranscriptMetrics;
|
|
257
|
+
steps: TranscriptStep[];
|
|
258
|
+
}
|
|
259
|
+
/** Default transcript directory: ~/.local/share/devin/cli/transcripts */
|
|
260
|
+
export declare function transcriptDir(): string;
|
|
261
|
+
/** Count LLM inference calls in a transcript (agent steps with telemetry.operation === "inference"). */
|
|
262
|
+
export declare function countLlmCalls(transcript: Transcript): number;
|
|
263
|
+
/** Extract token counts from a Usage object, defaulting to 0. */
|
|
264
|
+
export declare function extractUsageTokens(usage: Usage | null | undefined): {
|
|
265
|
+
inputTokens: number;
|
|
266
|
+
outputTokens: number;
|
|
267
|
+
thoughtTokens: number;
|
|
268
|
+
totalTokens: number;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Install enabled plugins and remove disabled ones from the workspace.
|
|
272
|
+
*
|
|
273
|
+
* CRITICAL: This function first removes the entire `.agents/skills/`
|
|
274
|
+
* directory to ensure no inherited skills from the host contaminate the
|
|
275
|
+
* benchmark. Only explicitly enabled plugins are installed.
|
|
276
|
+
*
|
|
277
|
+
* Each enabled plugin's `path` is copied to `workspace/.agents/skills/<id>/`.
|
|
278
|
+
*/
|
|
279
|
+
export declare function installPlugins(workspace: string, plugins: PluginConfig[]): Promise<void>;
|
|
280
|
+
/**
|
|
281
|
+
* Devin ACP adapter — spawns `devin acp` as a subprocess.
|
|
282
|
+
*
|
|
283
|
+
* Usage:
|
|
284
|
+
* ```ts
|
|
285
|
+
* const adapter = new DevinAdapter();
|
|
286
|
+
* const proc = adapter.spawn({ model, workspace, plugins });
|
|
287
|
+
* const result = await proc.run("Fix the bug", 120_000);
|
|
288
|
+
* proc.kill();
|
|
289
|
+
* ```
|
|
290
|
+
*/
|
|
291
|
+
export declare class DevinAdapter implements AgentAdapter {
|
|
292
|
+
readonly id = "devin";
|
|
293
|
+
spawn(config: AgentSpawnConfig): AgentProcess;
|
|
294
|
+
}
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region src/acp.d.ts
|
|
297
|
+
/** A `session/update` notification whose `sessionUpdate` is `"tool_call"`. */
|
|
298
|
+
type ToolCallMessage = Extract<SessionUpdate, {
|
|
299
|
+
sessionUpdate: "tool_call";
|
|
300
|
+
}>;
|
|
301
|
+
/** A `session/update` notification whose `sessionUpdate` is `"tool_call_update"`. */
|
|
302
|
+
type ToolCallUpdateMessage = Extract<SessionUpdate, {
|
|
303
|
+
sessionUpdate: "tool_call_update";
|
|
304
|
+
}>;
|
|
305
|
+
/**
|
|
306
|
+
* Build a sanitized environment for an agent subprocess.
|
|
307
|
+
*
|
|
308
|
+
* Strips out host contamination: Gas City, Beads, MCP servers, project
|
|
309
|
+
* skills, and other variables that would leak the host's configuration
|
|
310
|
+
* into the benchmark. The agent must only see what we explicitly install.
|
|
311
|
+
*
|
|
312
|
+
* Sets `DEVIN_PERMISSION_MODE` and `DEVIN_MODEL` from the spawn config,
|
|
313
|
+
* then merges any explicit `config.env` overrides (which win).
|
|
314
|
+
*/
|
|
315
|
+
export declare function sanitizeEnv(config: AgentSpawnConfig): Record<string, string>;
|
|
316
|
+
/**
|
|
317
|
+
* Create a permission-request handler that auto-approves tool calls.
|
|
318
|
+
*
|
|
319
|
+
* Selects the first `allow_once` or `allow_always` option, falling back to
|
|
320
|
+
* the first available option. This is the same handler used by both the
|
|
321
|
+
* Devin adapter and the benchmark runner.
|
|
322
|
+
*/
|
|
323
|
+
export declare function createPermissionHandler(): acp.ClientRequestHandler<acp.RequestPermissionRequest, acp.RequestPermissionResponse>;
|
|
324
|
+
/**
|
|
325
|
+
* Run a full ACP session against a spawned agent subprocess.
|
|
326
|
+
*
|
|
327
|
+
* Connects to the agent, initializes the protocol, creates a session in
|
|
328
|
+
* `workspace`, sends `prompt`, and collects update events until the session
|
|
329
|
+
* stops or `timeoutMs` elapses.
|
|
330
|
+
*
|
|
331
|
+
* The `onToolCall` and `onToolUpdate` callbacks let callers collect tool
|
|
332
|
+
* calls and observations without duplicating the session loop logic. The
|
|
333
|
+
* optional `onSession` callback reports the session ID once created. All
|
|
334
|
+
* callbacks are optional.
|
|
335
|
+
*
|
|
336
|
+
* @returns The final {@link PromptResponse} from the agent.
|
|
337
|
+
*/
|
|
338
|
+
export declare function runAcpSession(proc: ChildProcess, workspace: string, prompt: string, timeoutMs: number, onToolCall?: (update: ToolCallMessage) => void, onToolUpdate?: (update: ToolCallUpdateMessage) => void, onSession?: (sessionId: string) => void): Promise<PromptResponse>;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/runner.d.ts
|
|
341
|
+
/**
|
|
342
|
+
* Generate all plugin on/off combinations.
|
|
343
|
+
*
|
|
344
|
+
* For N plugins this produces 2^N combinations, each a full copy of the
|
|
345
|
+
* plugins array with `enabled` set appropriately.
|
|
346
|
+
*
|
|
347
|
+
* - 0 plugins → `[[]]` (one empty combination)
|
|
348
|
+
* - 1 plugin → `[[off], [on]]`
|
|
349
|
+
* - 2 plugins → `[[off,off], [on,off], [off,on], [on,on]]`
|
|
350
|
+
*/
|
|
351
|
+
export declare function pluginCombinations(plugins: PluginConfig[]): PluginConfig[][];
|
|
352
|
+
/**
|
|
353
|
+
* Run the full arena matrix: task × model × plugin combo × repetitions.
|
|
354
|
+
*
|
|
355
|
+
* Each cell spawns the configured agent adapter, installs the plugin
|
|
356
|
+
* combination, runs the prompt, collects trace + metrics, and kills the
|
|
357
|
+
* agent. Results are written to `config.outputDir/results.json` and the
|
|
358
|
+
* full {@link ArenaResult} is returned.
|
|
359
|
+
*/
|
|
360
|
+
export declare function runArena(config: ArenaConfig): Promise<ArenaResult>;
|
|
361
|
+
/**
|
|
362
|
+
* Aggregate metrics for a group of runs selected by `filter`.
|
|
363
|
+
*
|
|
364
|
+
* Computes averages across all matching runs. Returns zeroed metrics when
|
|
365
|
+
* no runs match. Includes judge-related fields (`avgJudgeScore`,
|
|
366
|
+
* `judgePassCount`) and a `label` identifying the aggregate group.
|
|
367
|
+
*/
|
|
368
|
+
export declare function aggregateResults(results: RunResult[], filter: (r: RunResult) => boolean, label?: string): AggregateMetrics;
|
|
369
|
+
/**
|
|
370
|
+
* Compute per-task analysis comparing baseline (no plugins) vs each
|
|
371
|
+
* candidate plugin combo.
|
|
372
|
+
*
|
|
373
|
+
* For each task, groups runs by plugin combo, creates an averaged
|
|
374
|
+
* representative run per group, then compares the baseline (empty
|
|
375
|
+
* `pluginIds`) against every non-empty candidate combo using
|
|
376
|
+
* {@link compareCombos} from `judge.ts`.
|
|
377
|
+
*/
|
|
378
|
+
export declare function computeAnalysis(results: RunResult[], tasks: Task[]): CaseAnalysis[];
|
|
379
|
+
//#endregion
|
|
380
|
+
//#region src/judge.d.ts
|
|
381
|
+
/** Default system prompt for the judge. */
|
|
382
|
+
export declare const DEFAULT_JUDGE_PROMPT: string;
|
|
383
|
+
/**
|
|
384
|
+
* Build the judge prompt for a single run.
|
|
385
|
+
*
|
|
386
|
+
* Includes the task prompt, success criteria, and the agent's output. Does
|
|
387
|
+
* NOT include which plugins were active unless `config.revealPlugins` is
|
|
388
|
+
* true. Asks the judge for a JSON response with score, passed, reasoning,
|
|
389
|
+
* and issues.
|
|
390
|
+
*/
|
|
391
|
+
export declare function buildJudgePrompt(task: Task, runOutput: string, config: JudgeConfig, pluginIds?: string[]): string;
|
|
392
|
+
/**
|
|
393
|
+
* Parse a judge response into a {@link JudgeVerdict}.
|
|
394
|
+
*
|
|
395
|
+
* Extracts JSON from the response, handling markdown code fences
|
|
396
|
+
* (` ```json ... ``` `). Falls back to `score=0, passed=false` when the
|
|
397
|
+
* response cannot be parsed.
|
|
398
|
+
*/
|
|
399
|
+
export declare function parseJudgeResponse(response: string, runIndex: number, run: RunResult): JudgeVerdict;
|
|
400
|
+
/**
|
|
401
|
+
* Judge a single run — spawn the judge agent, send the prompt, collect the
|
|
402
|
+
* response, parse it into a {@link JudgeVerdict}, and kill the agent.
|
|
403
|
+
*/
|
|
404
|
+
export declare function judgeRun(run: RunResult, task: Task, config: JudgeConfig, runIndex: number): Promise<JudgeVerdict>;
|
|
405
|
+
/**
|
|
406
|
+
* Judge all runs in a list, pairing each run with its matching task.
|
|
407
|
+
*
|
|
408
|
+
* Supports `config.repetitions` — the judge is run N times per run for
|
|
409
|
+
* confidence. All verdicts are returned (one per repetition).
|
|
410
|
+
*/
|
|
411
|
+
export declare function judgeAllRuns(results: RunResult[], tasks: Task[], config: JudgeConfig): Promise<JudgeVerdict[]>;
|
|
412
|
+
/**
|
|
413
|
+
* Compare two plugin combos for a task (for {@link ComboComparison}).
|
|
414
|
+
*
|
|
415
|
+
* Computes deltas as `candidate - baseline`. Determines whether the
|
|
416
|
+
* candidate is better:
|
|
417
|
+
* - Lower tokens / toolCalls / llmCalls / time = better
|
|
418
|
+
* - Higher judgeScore = better
|
|
419
|
+
*
|
|
420
|
+
* The judge score for each run is the average of its verdicts' scores
|
|
421
|
+
* (0 when there are no verdicts).
|
|
422
|
+
*/
|
|
423
|
+
export declare function compareCombos(baseline: RunResult, candidate: RunResult): ComboComparison;
|
|
424
|
+
//#endregion
|
|
425
|
+
export type { AgentAdapter, AgentProcess, AgentSpawnConfig, AggregateMetrics, ArenaConfig, ArenaResult, CaseAnalysis, CheckResult, ComboComparison, DeterministicCheck, JudgeConfig, JudgeVerdict, ModelConfig, Observation, PluginConfig, RunMetrics, RunResult, Task, ToolCall, ToolCallMessage, ToolCallUpdateMessage, TraceData, TraceStep };
|
|
426
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/adapters/devin.ts","../src/acp.ts","../src/runner.ts","../src/judge.ts"],"mappings":";;;;;UACiB;EACf;EACA,MAAM,QAAQ,mBAAmB;;UAGlB;EACf,OAAO;EACP;EACA,SAAS;EACT;EACA,MAAM;;UAGS;EACf,IAAI,gBAAgB,oBAAoB,QAAQ;EAChD;;;UAIe;EACf;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;;EAEA;;EAEA;;;;EAIA;;;EAGA,SAAS;;;UAIM;EACf;EACA;EACA;;;UAIe;EACf,OAAO;EACP,OAAO;EACP,QAAQ;EACR,SAAS;EACT;EACA;EACA;;EAEA,QAAQ;;;UAIO;;EAEf,OAAO;;EAEP,OAAO;;EAEP;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA,SAAS;EACT,OAAO;;EAEP;EACA;;EAEA,cAAc;EACd;;EAEA,UAAU;;;UAIK;EACf;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;UAIe;EACf;EACA;EACA,OAAO;EACP;IACE;IACA;IACA;IACA;;;;UAKa;EACf;EACA;EACA;EACA;EACA,YAAY;EACZ,eAAe;EACf;;;UAIe;EACf;EACA,WAAW;EACX;;;UAIe;EACf;EACA;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;;EAEA;;;UAIe;EACf;EACA;IACE;IACA;IACA;IACA;IACA;;EAEF,SAAS;EACT,YAAY;;EAEZ,UAAU;;;UAIK;EACf;EACA;EACA;;EAEA,aAAa;;EAEb;;;UAIe;;EAEf;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;;;;;UCvMQ;EACR;EACA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;;;;;UAMI;EACR;EACA;EACA;EACA;;;UAIQ;EACR;EACA;EACA;IACE;IACA;IACA;;EAEF,eAAe;EACf,OAAO;;;wBAMO;;wBAeA,cAAc,YAAY;;wBAqC1B,mBAAmB,OAAO;EACxC;EACA;EACA;EACA;;;;;;;;;;;wBA0DoB,eACpB,mBACA,SAAS,iBACR;;;;;;;;;;;;qBAoCU,wBAAwB;WAC1B;EAET,MAAM,QAAQ,mBAAmB;;;;;KC/MvB,kBAAkB,QAAQ;EAAiB;;;KAG3C,wBAAwB,QAClC;EACE;;;;;;;;;;;;wBAqEY,YAAY,QAAQ,mBAAmB;;;;;;;;wBAgBvC,2BAA2B,IAAI,qBAC7C,IAAI,0BACJ,IAAI;;;;;;;;;;;;;;;wBAqFgB,cACpB,MAAM,cACN,mBACA,gBACA,mBACA,cAAc,QAAQ,0BACtB,gBAAgB,QAAQ,gCACxB,aAAa,6BACZ,QAAQ;;;;;;;;;;;;;wBClKK,mBAAmB,SAAS,iBAAiB;;;;;;;;;wBAgCvC,SAAS,QAAQ,cAAc,QAAQ;;;;;;;;wBAkQ7C,iBACd,SAAS,aACT,SAAS,GAAG,uBACZ,iBACC;;;;;;;;;;wBAoIa,gBACd,SAAS,aACT,OAAO,SACN;;;;qBCxcU;;;;;;;;;wBAkBG,iBACd,MAAM,MACN,mBACA,QAAQ,aACR;;;;;;;;wBAgDc,mBACd,kBACA,kBACA,KAAK,YACJ;;;;;wBAsDmB,SACpB,KAAK,WACL,MAAM,MACN,QAAQ,aACR,mBACC,QAAQ;;;;;;;wBAoCW,aACpB,SAAS,aACT,OAAO,QACP,QAAQ,cACP,QAAQ;;;;;;;;;;;;wBAoCK,cACd,UAAU,WACV,WAAW,YACV"}
|