@miller-tech/uap 1.50.0 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/benchmarks/paired/ablation.d.ts +36 -0
- package/dist/benchmarks/paired/ablation.d.ts.map +1 -0
- package/dist/benchmarks/paired/ablation.js +96 -0
- package/dist/benchmarks/paired/ablation.js.map +1 -0
- package/dist/benchmarks/paired/adapter.d.ts +95 -0
- package/dist/benchmarks/paired/adapter.d.ts.map +1 -0
- package/dist/benchmarks/paired/adapter.js +456 -0
- package/dist/benchmarks/paired/adapter.js.map +1 -0
- package/dist/benchmarks/paired/index.d.ts +17 -0
- package/dist/benchmarks/paired/index.d.ts.map +1 -0
- package/dist/benchmarks/paired/index.js +17 -0
- package/dist/benchmarks/paired/index.js.map +1 -0
- package/dist/benchmarks/paired/report.d.ts +61 -0
- package/dist/benchmarks/paired/report.d.ts.map +1 -0
- package/dist/benchmarks/paired/report.js +204 -0
- package/dist/benchmarks/paired/report.js.map +1 -0
- package/dist/benchmarks/paired/runner.d.ts +25 -0
- package/dist/benchmarks/paired/runner.d.ts.map +1 -0
- package/dist/benchmarks/paired/runner.js +125 -0
- package/dist/benchmarks/paired/runner.js.map +1 -0
- package/dist/benchmarks/paired/scaffold.d.ts +28 -0
- package/dist/benchmarks/paired/scaffold.d.ts.map +1 -0
- package/dist/benchmarks/paired/scaffold.js +74 -0
- package/dist/benchmarks/paired/scaffold.js.map +1 -0
- package/dist/benchmarks/paired/stats.d.ts +68 -0
- package/dist/benchmarks/paired/stats.d.ts.map +1 -0
- package/dist/benchmarks/paired/stats.js +182 -0
- package/dist/benchmarks/paired/stats.js.map +1 -0
- package/dist/benchmarks/paired/suite.d.ts +43 -0
- package/dist/benchmarks/paired/suite.d.ts.map +1 -0
- package/dist/benchmarks/paired/suite.js +117 -0
- package/dist/benchmarks/paired/suite.js.map +1 -0
- package/dist/benchmarks/paired/types.d.ts +195 -0
- package/dist/benchmarks/paired/types.d.ts.map +1 -0
- package/dist/benchmarks/paired/types.js +111 -0
- package/dist/benchmarks/paired/types.js.map +1 -0
- package/dist/bin/cli.js +22 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/bench.d.ts +21 -0
- package/dist/cli/bench.d.ts.map +1 -0
- package/dist/cli/bench.js +94 -0
- package/dist/cli/bench.js.map +1 -0
- package/docs/INDEX.md +1 -1
- package/docs/benchmarks/PAIRED_HARNESS.md +112 -0
- package/docs/benchmarks/README.md +1 -0
- package/docs/getting-started/INSTALLATION.md +46 -10
- package/docs/guides/AUTOMATIC_FEATURES.md +21 -0
- package/docs/reference/CLI.md +25 -13
- package/package.json +1 -1
- package/src/policies/enforcers/__pycache__/_common.cpython-312.pyc +0 -0
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent adapters — drive the "agent under test" for one run.
|
|
3
|
+
*
|
|
4
|
+
* Two real adapters (opencode, claude) spawn the agent as a subprocess against
|
|
5
|
+
* the scratch repo and parse usage metrics from its output. A MockAdapter makes
|
|
6
|
+
* the whole harness runnable and unit-testable offline (it does NOT make real
|
|
7
|
+
* claims — it is a deterministic stand-in for exercising the runner/stats/report
|
|
8
|
+
* paths without a live model).
|
|
9
|
+
*
|
|
10
|
+
* Adapters never throw on agent failure: they capture it in `error` so a single
|
|
11
|
+
* crashed run degrades to an incorrect result rather than aborting the suite.
|
|
12
|
+
*/
|
|
13
|
+
import { spawn, spawnSync } from 'child_process';
|
|
14
|
+
import { mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
|
15
|
+
import { dirname, join, relative, resolve } from 'path';
|
|
16
|
+
import { applyScaffolding, scaffoldEnv } from './scaffold.js';
|
|
17
|
+
import { sanitizedEnv } from './suite.js';
|
|
18
|
+
import { isBaseline } from './types.js';
|
|
19
|
+
/** Cap on captured output per stream (bytes) to bound memory on runaway agents. */
|
|
20
|
+
const MAX_OUTPUT_BYTES = 64 * 1024 * 1024;
|
|
21
|
+
/** Grace period after the soft timeout before the hard backstop kill. */
|
|
22
|
+
const HARD_KILL_GRACE_MS = 10_000;
|
|
23
|
+
export class SubprocessAdapter {
|
|
24
|
+
cfg;
|
|
25
|
+
id;
|
|
26
|
+
constructor(cfg) {
|
|
27
|
+
this.cfg = cfg;
|
|
28
|
+
this.id = cfg.id;
|
|
29
|
+
}
|
|
30
|
+
async run(ctx) {
|
|
31
|
+
// Inject the UAP treatment surface (no-op for the baseline arm).
|
|
32
|
+
let injected = [];
|
|
33
|
+
if (!isBaseline(ctx.condition)) {
|
|
34
|
+
injected = applyScaffolding(ctx.workdir, ctx.condition).injectedFiles;
|
|
35
|
+
}
|
|
36
|
+
const args = this.cfg.args.map((a) => a.replace('{instruction}', ctx.task.instruction).replace('{workdir}', ctx.workdir));
|
|
37
|
+
const env = {
|
|
38
|
+
...sanitizedEnv(),
|
|
39
|
+
...scaffoldEnv(ctx.condition),
|
|
40
|
+
UAP_BENCH_MODEL: ctx.model,
|
|
41
|
+
};
|
|
42
|
+
const sec = ctx.task.agentTimeoutSec;
|
|
43
|
+
const { stdout, stderr, timedOut, status, spawnError } = await spawnGroup(this.cfg.bin, args, {
|
|
44
|
+
cwd: ctx.workdir,
|
|
45
|
+
env,
|
|
46
|
+
timeoutMs: sec * 1000,
|
|
47
|
+
input: this.cfg.instructionOnStdin ? ctx.task.instruction : undefined,
|
|
48
|
+
});
|
|
49
|
+
let error = null;
|
|
50
|
+
if (timedOut)
|
|
51
|
+
error = `agent timed out after ${sec}s`;
|
|
52
|
+
else if (spawnError)
|
|
53
|
+
error = spawnError;
|
|
54
|
+
else if (status !== 0)
|
|
55
|
+
error = `agent exited ${status}`;
|
|
56
|
+
const parsed = timedOut ? {} : this.cfg.parseUsage(stdout, stderr);
|
|
57
|
+
return {
|
|
58
|
+
tokens: parsed.tokens ?? null,
|
|
59
|
+
costUsd: parsed.costUsd ?? null,
|
|
60
|
+
turns: parsed.turns ?? null,
|
|
61
|
+
toolCalls: parsed.toolCalls ?? null,
|
|
62
|
+
wellFormed: parsed.wellFormed ?? null,
|
|
63
|
+
error,
|
|
64
|
+
rawLog: `# injected: ${injected.join(', ') || '(none)'}\n${stdout}\n---STDERR---\n${stderr}`,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Spawn a command in its OWN process group (detached) and enforce a timeout by
|
|
70
|
+
* SIGKILLing the whole group. Subprocess agents (opencode/claude) fork detached
|
|
71
|
+
* child trees — LSP servers, model-stream readers — that inherit our stdout pipe
|
|
72
|
+
* and keep it open. Node's spawnSync `timeout` only SIGTERMs the immediate
|
|
73
|
+
* child, so it hangs forever on those orphans (observed: 50-min wedged runs).
|
|
74
|
+
* Killing the negative pid reaps the entire tree; a hard backstop covers a
|
|
75
|
+
* child that escaped into its own session.
|
|
76
|
+
*/
|
|
77
|
+
function spawnGroup(bin, args, opts) {
|
|
78
|
+
return new Promise((resolve) => {
|
|
79
|
+
let child;
|
|
80
|
+
try {
|
|
81
|
+
child = spawn(bin, args, {
|
|
82
|
+
cwd: opts.cwd,
|
|
83
|
+
env: opts.env,
|
|
84
|
+
detached: process.platform !== 'win32', // new process group on POSIX
|
|
85
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
resolve({
|
|
90
|
+
stdout: '',
|
|
91
|
+
stderr: '',
|
|
92
|
+
status: null,
|
|
93
|
+
timedOut: false,
|
|
94
|
+
spawnError: e instanceof Error ? e.message : String(e),
|
|
95
|
+
});
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
let stdout = '';
|
|
99
|
+
let stderr = '';
|
|
100
|
+
let timedOut = false;
|
|
101
|
+
let spawnError = null;
|
|
102
|
+
let settled = false;
|
|
103
|
+
const append = (buf, chunk) => buf.length >= MAX_OUTPUT_BYTES ? buf : buf + chunk.toString('utf-8');
|
|
104
|
+
child.stdout?.on('data', (c) => (stdout = append(stdout, c)));
|
|
105
|
+
child.stderr?.on('data', (c) => (stderr = append(stderr, c)));
|
|
106
|
+
const killGroup = (signal) => {
|
|
107
|
+
try {
|
|
108
|
+
if (child.pid != null && process.platform !== 'win32')
|
|
109
|
+
process.kill(-child.pid, signal);
|
|
110
|
+
else
|
|
111
|
+
child.kill(signal);
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
try {
|
|
115
|
+
child.kill('SIGKILL');
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
/* already gone */
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const softTimer = setTimeout(() => {
|
|
123
|
+
timedOut = true;
|
|
124
|
+
killGroup('SIGTERM');
|
|
125
|
+
}, opts.timeoutMs);
|
|
126
|
+
// Hard backstop: if SIGTERM didn't reap the tree, SIGKILL the group and,
|
|
127
|
+
// if 'close' still never fires, force-settle so the runner can't wedge.
|
|
128
|
+
const hardTimer = setTimeout(() => {
|
|
129
|
+
killGroup('SIGKILL');
|
|
130
|
+
finish(null);
|
|
131
|
+
}, opts.timeoutMs + HARD_KILL_GRACE_MS);
|
|
132
|
+
const finish = (status) => {
|
|
133
|
+
if (settled)
|
|
134
|
+
return;
|
|
135
|
+
settled = true;
|
|
136
|
+
clearTimeout(softTimer);
|
|
137
|
+
clearTimeout(hardTimer);
|
|
138
|
+
resolve({ stdout, stderr, status, timedOut, spawnError });
|
|
139
|
+
};
|
|
140
|
+
child.on('error', (e) => {
|
|
141
|
+
spawnError = e.message;
|
|
142
|
+
finish(null);
|
|
143
|
+
});
|
|
144
|
+
child.on('close', (code) => finish(code));
|
|
145
|
+
if (opts.input != null)
|
|
146
|
+
child.stdin?.write(opts.input);
|
|
147
|
+
child.stdin?.end();
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// Built-in usage parsers
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
/** Sum the last token-usage object emitted in Claude Code's `--output-format json`. */
|
|
154
|
+
export const parseClaudeUsage = (stdout) => {
|
|
155
|
+
try {
|
|
156
|
+
const obj = JSON.parse(stdout.trim());
|
|
157
|
+
const usage = obj.usage ?? obj.message?.usage ?? {};
|
|
158
|
+
const tokens = (usage.input_tokens ?? 0) +
|
|
159
|
+
(usage.output_tokens ?? 0) +
|
|
160
|
+
(usage.cache_read_input_tokens ?? 0) +
|
|
161
|
+
(usage.cache_creation_input_tokens ?? 0);
|
|
162
|
+
return {
|
|
163
|
+
tokens: tokens > 0 ? tokens : null,
|
|
164
|
+
costUsd: typeof obj.total_cost_usd === 'number' ? obj.total_cost_usd : null,
|
|
165
|
+
turns: typeof obj.num_turns === 'number' ? obj.num_turns : null,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return {};
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Parser for opencode `--format json` output, which is a JSONL event stream
|
|
174
|
+
* (step_start / tool_use / step_finish / text). We aggregate it:
|
|
175
|
+
* - turns = number of step_finish events
|
|
176
|
+
* - toolCalls = number of tool_use events
|
|
177
|
+
* - tokens = total tokens metered = Σ over step_finish of
|
|
178
|
+
* (input + output + cache.read) — matches provider billing and
|
|
179
|
+
* captures the context overhead an injected UAP surface adds.
|
|
180
|
+
* - costUsd = Σ cost (often 0 for a local model → reported as null).
|
|
181
|
+
*/
|
|
182
|
+
export const parseOpencodeUsage = (stdout) => {
|
|
183
|
+
let turns = 0;
|
|
184
|
+
let toolCalls = 0;
|
|
185
|
+
let tokens = 0;
|
|
186
|
+
let cost = 0;
|
|
187
|
+
let sawTokens = false;
|
|
188
|
+
for (const line of stdout.split('\n')) {
|
|
189
|
+
const trimmed = line.trim();
|
|
190
|
+
if (!trimmed)
|
|
191
|
+
continue;
|
|
192
|
+
let ev;
|
|
193
|
+
try {
|
|
194
|
+
ev = JSON.parse(trimmed);
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const type = ev.type;
|
|
200
|
+
if (type === 'tool_use')
|
|
201
|
+
toolCalls++;
|
|
202
|
+
if (type === 'step_finish') {
|
|
203
|
+
turns++;
|
|
204
|
+
const part = (ev.part ?? {});
|
|
205
|
+
const tk = (part.tokens ?? {});
|
|
206
|
+
const cache = (tk.cache ?? {});
|
|
207
|
+
const input = num(tk.input);
|
|
208
|
+
const output = num(tk.output);
|
|
209
|
+
const cacheRead = num(cache.read);
|
|
210
|
+
if (tk.input != null || tk.output != null) {
|
|
211
|
+
tokens += input + output + cacheRead;
|
|
212
|
+
sawTokens = true;
|
|
213
|
+
}
|
|
214
|
+
cost += num(part.cost);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
tokens: sawTokens ? tokens : null,
|
|
219
|
+
costUsd: cost > 0 ? cost : null,
|
|
220
|
+
turns: turns > 0 ? turns : null,
|
|
221
|
+
toolCalls: toolCalls > 0 ? toolCalls : null,
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
function num(v) {
|
|
225
|
+
return typeof v === 'number' && Number.isFinite(v) ? v : 0;
|
|
226
|
+
}
|
|
227
|
+
/** Claude Code headless adapter (`claude -p ... --output-format json`). */
|
|
228
|
+
export function claudeAdapter(model) {
|
|
229
|
+
return new SubprocessAdapter({
|
|
230
|
+
id: 'claude',
|
|
231
|
+
bin: 'claude',
|
|
232
|
+
args: ['-p', '{instruction}', '--output-format', 'json', '--model', model],
|
|
233
|
+
parseUsage: parseClaudeUsage,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
/** opencode headless adapter (`opencode run ...`). */
|
|
237
|
+
export function opencodeAdapter(model) {
|
|
238
|
+
return new SubprocessAdapter({
|
|
239
|
+
id: 'opencode',
|
|
240
|
+
bin: 'opencode',
|
|
241
|
+
// --format json => JSONL event stream parsed by parseOpencodeUsage.
|
|
242
|
+
// --dir pins the working directory to the scratch repo.
|
|
243
|
+
args: ['run', '--model', model, '--format', 'json', '--dir', '{workdir}', '{instruction}'],
|
|
244
|
+
parseUsage: parseOpencodeUsage,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
const DEFAULT_MOCK = {
|
|
248
|
+
baseSuccess: { easy: 0.85, medium: 0.5, hard: 0.2 },
|
|
249
|
+
liftPerComponent: 0.06,
|
|
250
|
+
baseTokens: 8000,
|
|
251
|
+
overheadTokensPerComponent: 400,
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Deterministic simulated agent. Given a seed, it reproducibly "resolves" tasks
|
|
255
|
+
* with a probability that the UAP components nudge upward — purely to exercise
|
|
256
|
+
* the runner/stats/report end-to-end without a live model. Clearly NOT a source
|
|
257
|
+
* of real benchmark claims; the real adapters above are.
|
|
258
|
+
*/
|
|
259
|
+
export class MockAdapter {
|
|
260
|
+
behavior;
|
|
261
|
+
id = 'mock';
|
|
262
|
+
constructor(behavior = DEFAULT_MOCK) {
|
|
263
|
+
this.behavior = behavior;
|
|
264
|
+
}
|
|
265
|
+
async run(ctx) {
|
|
266
|
+
if (!isBaseline(ctx.condition))
|
|
267
|
+
applyScaffolding(ctx.workdir, ctx.condition);
|
|
268
|
+
const n = ctx.condition.components.size;
|
|
269
|
+
const overheadTokens = n * this.behavior.overheadTokensPerComponent;
|
|
270
|
+
// Deterministic pseudo-success driven by a hash of (task, seed) so pairing
|
|
271
|
+
// is stable: the same seed yields correlated draws across conditions.
|
|
272
|
+
const draw = hash01(`${ctx.task.id}:${ctx.seed}`);
|
|
273
|
+
const threshold = Math.min(0.99, this.behavior.baseSuccess[ctx.task.difficulty] + n * this.behavior.liftPerComponent);
|
|
274
|
+
const resolved = draw < threshold;
|
|
275
|
+
// Write a real resolution artifact so the runner's verify path is identical
|
|
276
|
+
// for the mock and real agents (mock fixtures verify with `test -f MOCK_SOLVED`).
|
|
277
|
+
if (resolved)
|
|
278
|
+
writeFileSync(join(ctx.workdir, 'MOCK_SOLVED'), 'ok\n', 'utf-8');
|
|
279
|
+
return {
|
|
280
|
+
// `correct` is computed by the runner from the verify command above.
|
|
281
|
+
tokens: this.behavior.baseTokens + overheadTokens + Math.floor(draw * 1000),
|
|
282
|
+
costUsd: null,
|
|
283
|
+
turns: 1 + n,
|
|
284
|
+
toolCalls: 2 + n,
|
|
285
|
+
wellFormed: true,
|
|
286
|
+
error: null,
|
|
287
|
+
rawLog: resolved ? 'MOCK_RESOLVED' : 'MOCK_UNRESOLVED',
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/** Stable hash of a string to [0,1). */
|
|
292
|
+
export function hash01(s) {
|
|
293
|
+
let h = 2166136261 >>> 0;
|
|
294
|
+
for (let i = 0; i < s.length; i++) {
|
|
295
|
+
h ^= s.charCodeAt(i);
|
|
296
|
+
h = Math.imul(h, 16777619);
|
|
297
|
+
}
|
|
298
|
+
return (h >>> 0) / 4294967296;
|
|
299
|
+
}
|
|
300
|
+
const FILE_MARKER_SYSTEM = 'You are a precise coding assistant. You will be given a task and the current ' +
|
|
301
|
+
'project files. Output the COMPLETE updated content of every file you change, ' +
|
|
302
|
+
'each wrapped EXACTLY like this and nothing else around it:\n' +
|
|
303
|
+
'<<<FILE relative/path.ext>>>\n<full file content>\n<<<END>>>\n' +
|
|
304
|
+
'Do not add commentary outside the markers. Do not use markdown code fences.';
|
|
305
|
+
/** Parse <<<FILE path>>> ... <<<END>>> blocks from a model response. Pure. */
|
|
306
|
+
export function parseFileBlocks(text) {
|
|
307
|
+
const out = [];
|
|
308
|
+
const re = /<<<FILE\s+(.+?)>>>\r?\n([\s\S]*?)\r?\n?<<<END>>>/g;
|
|
309
|
+
let m;
|
|
310
|
+
while ((m = re.exec(text)) !== null) {
|
|
311
|
+
const path = m[1].trim();
|
|
312
|
+
if (path)
|
|
313
|
+
out.push({ path, content: m[2] });
|
|
314
|
+
}
|
|
315
|
+
return out;
|
|
316
|
+
}
|
|
317
|
+
/** Read repo files to show the model (skips noise + binaries). */
|
|
318
|
+
function readRepoFiles(workdir) {
|
|
319
|
+
const SKIP = new Set(['node_modules', '.git', 'dist', '.uap', 'agents']);
|
|
320
|
+
const EXT_OK = /\.(js|ts|py|json|md|txt|cfg|toml|yaml|yml)$|^[^.]+$/;
|
|
321
|
+
const files = [];
|
|
322
|
+
const walk = (dir) => {
|
|
323
|
+
for (const name of readdirSync(dir)) {
|
|
324
|
+
if (SKIP.has(name))
|
|
325
|
+
continue;
|
|
326
|
+
const abs = join(dir, name);
|
|
327
|
+
const st = statSync(abs);
|
|
328
|
+
if (st.isDirectory())
|
|
329
|
+
walk(abs);
|
|
330
|
+
else if (st.size <= 64 * 1024 && EXT_OK.test(name) && name !== 'package.json') {
|
|
331
|
+
try {
|
|
332
|
+
files.push({ path: relative(workdir, abs), content: readFileSync(abs, 'utf-8') });
|
|
333
|
+
}
|
|
334
|
+
catch {
|
|
335
|
+
/* skip unreadable */
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
walk(workdir);
|
|
341
|
+
return files;
|
|
342
|
+
}
|
|
343
|
+
/** Write parsed file blocks into workdir, refusing path-escape. */
|
|
344
|
+
function applyFileBlocks(workdir, blocks) {
|
|
345
|
+
let written = 0;
|
|
346
|
+
for (const b of blocks) {
|
|
347
|
+
const dest = resolve(workdir, b.path);
|
|
348
|
+
if (dest !== workdir && !dest.startsWith(workdir + '/'))
|
|
349
|
+
continue; // no escape
|
|
350
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
351
|
+
writeFileSync(dest, b.content, 'utf-8');
|
|
352
|
+
written++;
|
|
353
|
+
}
|
|
354
|
+
return written;
|
|
355
|
+
}
|
|
356
|
+
async function chatCompletion(endpoint, model, messages, temperature, timeoutMs) {
|
|
357
|
+
const ctrl = new AbortController();
|
|
358
|
+
const timer = setTimeout(() => ctrl.abort(), timeoutMs);
|
|
359
|
+
try {
|
|
360
|
+
const res = await fetch(endpoint, {
|
|
361
|
+
method: 'POST',
|
|
362
|
+
headers: { 'Content-Type': 'application/json' },
|
|
363
|
+
body: JSON.stringify({ model, messages, temperature, max_tokens: 4096 }),
|
|
364
|
+
signal: ctrl.signal,
|
|
365
|
+
});
|
|
366
|
+
if (!res.ok)
|
|
367
|
+
return { content: '', tokens: 0, error: `http ${res.status}` };
|
|
368
|
+
const data = (await res.json());
|
|
369
|
+
return {
|
|
370
|
+
content: data.choices?.[0]?.message?.content ?? '',
|
|
371
|
+
tokens: data.usage?.total_tokens ?? 0,
|
|
372
|
+
error: null,
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
catch (e) {
|
|
376
|
+
return { content: '', tokens: 0, error: e instanceof Error ? e.message : String(e) };
|
|
377
|
+
}
|
|
378
|
+
finally {
|
|
379
|
+
clearTimeout(timer);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
export class RawCompletionAdapter {
|
|
383
|
+
id = 'raw';
|
|
384
|
+
endpoint;
|
|
385
|
+
maxGateIters;
|
|
386
|
+
temperature;
|
|
387
|
+
constructor(cfg = {}) {
|
|
388
|
+
this.endpoint =
|
|
389
|
+
cfg.endpoint ?? process.env.UAP_RAW_ENDPOINT ?? 'http://127.0.0.1:8080/v1/chat/completions';
|
|
390
|
+
this.maxGateIters = cfg.maxGateIters ?? Number(process.env.UAP_RAW_GATE_ITERS ?? 4);
|
|
391
|
+
this.temperature = cfg.temperature ?? Number(process.env.UAP_RAW_TEMPERATURE ?? 0.2);
|
|
392
|
+
}
|
|
393
|
+
async run(ctx) {
|
|
394
|
+
const useGate = ctx.condition.components.has('gates') && Boolean(ctx.task.gateCmd);
|
|
395
|
+
const files = readRepoFiles(ctx.workdir);
|
|
396
|
+
const fileDump = files
|
|
397
|
+
.map((f) => `<<<FILE ${f.path}>>>\n${f.content}\n<<<END>>>`)
|
|
398
|
+
.join('\n\n');
|
|
399
|
+
const messages = [
|
|
400
|
+
{ role: 'system', content: FILE_MARKER_SYSTEM },
|
|
401
|
+
{
|
|
402
|
+
role: 'user',
|
|
403
|
+
content: `Task: ${ctx.task.instruction}\n\nCurrent files:\n\n${fileDump}\n\n` +
|
|
404
|
+
'Output the full updated content of each file you change, using the FILE markers.',
|
|
405
|
+
},
|
|
406
|
+
];
|
|
407
|
+
let totalTokens = 0;
|
|
408
|
+
let turns = 0;
|
|
409
|
+
let gateRuns = 0;
|
|
410
|
+
let error = null;
|
|
411
|
+
const logParts = [];
|
|
412
|
+
const maxIters = useGate ? this.maxGateIters : 1;
|
|
413
|
+
for (let iter = 0; iter < maxIters; iter++) {
|
|
414
|
+
const chat = await chatCompletion(this.endpoint, ctx.model, messages, this.temperature, ctx.task.agentTimeoutSec * 1000);
|
|
415
|
+
turns++;
|
|
416
|
+
totalTokens += chat.tokens;
|
|
417
|
+
if (chat.error) {
|
|
418
|
+
error = chat.error;
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
const blocks = parseFileBlocks(chat.content);
|
|
422
|
+
applyFileBlocks(ctx.workdir, blocks);
|
|
423
|
+
logParts.push(`--- turn ${turns}: ${blocks.length} file(s) ---`);
|
|
424
|
+
if (!useGate)
|
|
425
|
+
break;
|
|
426
|
+
const gate = spawnSync('bash', ['-lc', ctx.task.gateCmd], {
|
|
427
|
+
cwd: ctx.workdir,
|
|
428
|
+
encoding: 'utf-8',
|
|
429
|
+
timeout: ctx.task.verifyTimeoutSec * 1000,
|
|
430
|
+
env: sanitizedEnv(),
|
|
431
|
+
});
|
|
432
|
+
gateRuns++;
|
|
433
|
+
if (gate.status === 0)
|
|
434
|
+
break;
|
|
435
|
+
if (iter === maxIters - 1)
|
|
436
|
+
break; // out of budget
|
|
437
|
+
const gateOut = `${gate.stdout ?? ''}\n${gate.stderr ?? ''}`.slice(-2000);
|
|
438
|
+
messages.push({ role: 'assistant', content: chat.content });
|
|
439
|
+
messages.push({
|
|
440
|
+
role: 'user',
|
|
441
|
+
content: `The gate command \`${ctx.task.gateCmd}\` failed:\n${gateOut}\n\n` +
|
|
442
|
+
'Fix the code and re-output the full updated files using the FILE markers.',
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
return {
|
|
446
|
+
tokens: totalTokens > 0 ? totalTokens : null,
|
|
447
|
+
costUsd: null,
|
|
448
|
+
turns,
|
|
449
|
+
toolCalls: useGate ? gateRuns : 0,
|
|
450
|
+
wellFormed: null,
|
|
451
|
+
error,
|
|
452
|
+
rawLog: logParts.join('\n'),
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/benchmarks/paired/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAiD,UAAU,EAAE,MAAM,YAAY,CAAC;AAuBvF,mFAAmF;AACnF,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1C,yEAAyE;AACzE,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,OAAO,iBAAiB;IAEC;IADpB,EAAE,CAAS;IACpB,YAA6B,GAA4B;QAA5B,QAAG,GAAH,GAAG,CAAyB;QACvD,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC;IACnB,CAAC;IAED,KAAK,C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C,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,EAAE,IAAI;YAChB,KAAK;YACL,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;SAC5B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paired UAP benchmark harness — public surface.
|
|
3
|
+
*
|
|
4
|
+
* A controlled A/B that holds the base model + agent constant and toggles the
|
|
5
|
+
* UAP scaffold on/off over the same task suite & seeds, reporting a vector of
|
|
6
|
+
* paired deltas (accuracy + efficiency) with confidence intervals, a McNemar
|
|
7
|
+
* gate-value 2x2, and per-component ablation.
|
|
8
|
+
*/
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export * from './stats.js';
|
|
11
|
+
export * from './suite.js';
|
|
12
|
+
export * from './scaffold.js';
|
|
13
|
+
export * from './adapter.js';
|
|
14
|
+
export * from './runner.js';
|
|
15
|
+
export * from './report.js';
|
|
16
|
+
export * from './ablation.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/benchmarks/paired/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paired UAP benchmark harness — public surface.
|
|
3
|
+
*
|
|
4
|
+
* A controlled A/B that holds the base model + agent constant and toggles the
|
|
5
|
+
* UAP scaffold on/off over the same task suite & seeds, reporting a vector of
|
|
6
|
+
* paired deltas (accuracy + efficiency) with confidence intervals, a McNemar
|
|
7
|
+
* gate-value 2x2, and per-component ablation.
|
|
8
|
+
*/
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export * from './stats.js';
|
|
11
|
+
export * from './suite.js';
|
|
12
|
+
export * from './scaffold.js';
|
|
13
|
+
export * from './adapter.js';
|
|
14
|
+
export * from './runner.js';
|
|
15
|
+
export * from './report.js';
|
|
16
|
+
export * from './ablation.js';
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/benchmarks/paired/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analysis + reporting.
|
|
3
|
+
*
|
|
4
|
+
* Turns raw paired RunRecords into the credible result shape the research
|
|
5
|
+
* prescribes: NOT a single headline number, but a vector of paired deltas with
|
|
6
|
+
* confidence intervals (accuracy AND efficiency), a McNemar 2x2 for gate value,
|
|
7
|
+
* and a cost-accuracy Pareto view. Treatment arms are always compared against
|
|
8
|
+
* the baseline cell-for-cell (same task + seed).
|
|
9
|
+
*/
|
|
10
|
+
import { McNemarResult, PairedDeltaResult, PairedOptions } from './stats.js';
|
|
11
|
+
import { RunnerOutput } from './runner.js';
|
|
12
|
+
import { ContinuousMetric } from './types.js';
|
|
13
|
+
export interface ConditionSummary {
|
|
14
|
+
label: string;
|
|
15
|
+
n: number;
|
|
16
|
+
successRate: number;
|
|
17
|
+
meanTokens: number | null;
|
|
18
|
+
meanTurns: number | null;
|
|
19
|
+
meanCostUsd: number | null;
|
|
20
|
+
meanLatencyMs: number;
|
|
21
|
+
errorRate: number;
|
|
22
|
+
}
|
|
23
|
+
export interface Comparison {
|
|
24
|
+
label: string;
|
|
25
|
+
baseline: string;
|
|
26
|
+
/** Paired correctness: rates, bootstrap CI on the delta, permutation p. */
|
|
27
|
+
correctness: {
|
|
28
|
+
baselineRate: number;
|
|
29
|
+
treatmentRate: number;
|
|
30
|
+
delta: PairedDeltaResult;
|
|
31
|
+
mcnemar: McNemarResult;
|
|
32
|
+
};
|
|
33
|
+
/** Paired deltas for each continuous metric where both arms reported a value. */
|
|
34
|
+
metrics: Partial<Record<ContinuousMetric, PairedDeltaResult>>;
|
|
35
|
+
}
|
|
36
|
+
export interface AnalysisReport {
|
|
37
|
+
meta: {
|
|
38
|
+
model: string;
|
|
39
|
+
adapter: string;
|
|
40
|
+
epochs: number;
|
|
41
|
+
taskCount: number;
|
|
42
|
+
conditions: string[];
|
|
43
|
+
baseline: string;
|
|
44
|
+
startedAt: string;
|
|
45
|
+
finishedAt: string;
|
|
46
|
+
};
|
|
47
|
+
perCondition: ConditionSummary[];
|
|
48
|
+
comparisons: Comparison[];
|
|
49
|
+
/** Cost-accuracy Pareto points (one per condition). */
|
|
50
|
+
pareto: {
|
|
51
|
+
label: string;
|
|
52
|
+
successRate: number;
|
|
53
|
+
meanTokens: number | null;
|
|
54
|
+
}[];
|
|
55
|
+
}
|
|
56
|
+
export interface AnalyzeOptions extends PairedOptions {
|
|
57
|
+
baselineLabel?: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function analyze(output: RunnerOutput, opts?: AnalyzeOptions): AnalysisReport;
|
|
60
|
+
export declare function renderMarkdown(r: AnalysisReport): string;
|
|
61
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../src/benchmarks/paired/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,aAAa,EAGb,iBAAiB,EACjB,aA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