@tangle-network/agent-eval 0.93.0 → 0.94.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/adapters/otel.d.ts +4 -4
- package/dist/analyst/index.d.ts +10 -10
- package/dist/analyst/index.js +6 -6
- package/dist/{analyze-runs-DwCEkpO_.d.ts → analyze-runs-B6Ljo_dI.d.ts} +2 -2
- package/dist/{baseline-DE36-Np7.d.ts → baseline-Bbid3WoO.d.ts} +1 -1
- package/dist/belief-state/index.d.ts +2 -2
- package/dist/belief-state/index.js +1 -1
- package/dist/builder-eval/index.d.ts +3 -3
- package/dist/builder-eval/index.js +2 -2
- package/dist/{calibration-Cpr3WaX3.d.ts → calibration-BPmzuVPk.d.ts} +1 -1
- package/dist/campaign/index.d.ts +13 -13
- package/dist/campaign/index.js +8 -8
- package/dist/{chunk-TWS7AZEY.js → chunk-2K6UUZ7P.js} +2 -2
- package/dist/{chunk-Y47J2LJ3.js → chunk-2KNZHH3P.js} +5 -5
- package/dist/{chunk-LMZQ2Z4U.js → chunk-56GC6VYO.js} +126 -1
- package/dist/chunk-56GC6VYO.js.map +1 -0
- package/dist/{chunk-QG2OVF2D.js → chunk-CTBHKLEU.js} +99 -30
- package/dist/chunk-CTBHKLEU.js.map +1 -0
- package/dist/{chunk-CVVHBFGN.js → chunk-CWNP4DV4.js} +53 -5
- package/dist/chunk-CWNP4DV4.js.map +1 -0
- package/dist/{chunk-QS3RBQPI.js → chunk-D5KBVULY.js} +2 -2
- package/dist/{chunk-ZFIBGEOL.js → chunk-EGPMSBEZ.js} +4 -4
- package/dist/{chunk-GSH6QNNS.js → chunk-KW53MSA5.js} +101 -78
- package/dist/chunk-KW53MSA5.js.map +1 -0
- package/dist/{chunk-UMMZHCPB.js → chunk-MIFZUPEK.js} +7 -5
- package/dist/chunk-MIFZUPEK.js.map +1 -0
- package/dist/{chunk-XY4DDNEG.js → chunk-MPQWFX6Y.js} +2 -2
- package/dist/{chunk-L3JOU6XM.js → chunk-NACM5RS7.js} +3 -3
- package/dist/{chunk-D3V5B42D.js → chunk-Q5LIB7BC.js} +7 -4
- package/dist/{chunk-D3V5B42D.js.map → chunk-Q5LIB7BC.js.map} +1 -1
- package/dist/{chunk-QAY5UIJO.js → chunk-QMUEXQJS.js} +99 -57
- package/dist/chunk-QMUEXQJS.js.map +1 -0
- package/dist/{chunk-4FBZZIYD.js → chunk-QTMYW64F.js} +2 -2
- package/dist/{chunk-6SOJM3VR.js → chunk-SD2YFWQQ.js} +4 -4
- package/dist/{chunk-UHMJT4T7.js → chunk-TBDR6PAI.js} +2 -2
- package/dist/{chunk-47X6LRCE.js → chunk-UFSG7ACU.js} +10 -7
- package/dist/chunk-UFSG7ACU.js.map +1 -0
- package/dist/{chunk-CY6U5S3X.js → chunk-URWVKRCS.js} +2 -2
- package/dist/{chunk-T375SUOZ.js → chunk-ZOPLCJSY.js} +86 -31
- package/dist/chunk-ZOPLCJSY.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/contract/index.d.ts +17 -17
- package/dist/contract/index.js +11 -11
- package/dist/{control-_Qb7skHX.d.ts → control-D6qwHXIR.d.ts} +4 -4
- package/dist/{control-runtime-DuFBYg7A.d.ts → control-runtime-Acf9CGhw.d.ts} +2 -2
- package/dist/control.d.ts +5 -5
- package/dist/{corpus-BoR-041R.d.ts → corpus-B8A4BDR3.d.ts} +1 -1
- package/dist/{counterfactual-Dwibr5IW.d.ts → counterfactual-DlOz8PBx.d.ts} +3 -3
- package/dist/{default-registry-zoGHUQEH.d.ts → default-registry-6dhErQbs.d.ts} +2 -2
- package/dist/diagnose.d.ts +9 -9
- package/dist/diagnose.js +1 -1
- package/dist/{emitter-DEZwY14K.d.ts → emitter-C2rqGH_l.d.ts} +1 -1
- package/dist/{failure-cluster-CL7IVgkJ.d.ts → failure-cluster-DH9Flgcf.d.ts} +1 -1
- package/dist/{feedback-trajectory-D9OVLrg9.d.ts → feedback-trajectory-BxY0cKfs.d.ts} +1 -1
- package/dist/governance/index.d.ts +2 -2
- package/dist/{harness-optimizer-EnEnQPsr.d.ts → harness-optimizer-mOl9XX_O.d.ts} +1 -1
- package/dist/hosted/index.d.ts +4 -4
- package/dist/index.d.ts +68 -46
- package/dist/index.js +261 -87
- package/dist/index.js.map +1 -1
- package/dist/{insight-report-BBwvOh6x.d.ts → insight-report-DWl3z9tl.d.ts} +1 -1
- package/dist/{integrity-VJ9A7aST.d.ts → integrity-D2t12mMw.d.ts} +1 -1
- package/dist/{kind-factory-5b7xXXOr.d.ts → kind-factory-0BhLSI27.d.ts} +1 -1
- package/dist/knowledge/index.d.ts +3 -3
- package/dist/{llm-client-BeEcAokY.d.ts → llm-client-Bj7g0rqu.d.ts} +31 -0
- package/dist/meta-eval/index.d.ts +4 -4
- package/dist/meta-eval/index.js +1 -1
- package/dist/openapi.json +1 -1
- package/dist/pipelines/index.d.ts +6 -6
- package/dist/pipelines/index.js +40 -15
- package/dist/pipelines/index.js.map +1 -1
- package/dist/prm/index.d.ts +11 -7
- package/dist/prm/index.js +55 -12
- package/dist/prm/index.js.map +1 -1
- package/dist/{provenance-LnqRT0sS.d.ts → provenance-P-bCL2Fo.d.ts} +3 -3
- package/dist/{query-CqTxMwDw.d.ts → query-B7GGjRox.d.ts} +2 -1
- package/dist/{red-team-BXHil6c8.d.ts → red-team-BWdoyleI.d.ts} +1 -1
- package/dist/{release-report-euXIV_Sk.d.ts → release-report-BEbWmVYj.d.ts} +1 -1
- package/dist/reporting.d.ts +6 -6
- package/dist/reporting.js +3 -3
- package/dist/{researcher-DE6Gpnb4.d.ts → researcher-B0C2_fVO.d.ts} +5 -5
- package/dist/rl.d.ts +10 -10
- package/dist/rl.js +4 -4
- package/dist/{rubric-BOfxn4ja.d.ts → rubric-Cc6UHvUb.d.ts} +2 -2
- package/dist/{run-campaign-RDGAM5KJ.js → run-campaign-7WNXMDSN.js} +3 -3
- package/dist/{run-critic-BAIjX99r.d.ts → run-critic-CmMf05uV.d.ts} +1 -1
- package/dist/{run-improvement-loop-5z_l5zDz.d.ts → run-improvement-loop-DBahB8Ax.d.ts} +1 -1
- package/dist/{semantic-concept-judge-Dn8Z6KEG.d.ts → semantic-concept-judge-B9MgmBnM.d.ts} +3 -3
- package/dist/{statistics-C7PozGrZ.d.ts → statistics-CCJpTGOS.d.ts} +117 -2
- package/dist/{store-CKUAgsJz.d.ts → store-BcFXE6LG.d.ts} +16 -1
- package/dist/{summary-report-DGmUucwQ.d.ts → summary-report-BDOFevaT.d.ts} +1 -1
- package/dist/{test-graded-scenario-BdVaPyHT.d.ts → test-graded-scenario-DeODGLra.d.ts} +21 -2
- package/dist/traces.d.ts +19 -6
- package/dist/traces.js +4 -4
- package/dist/{trajectory-GEdXJCL5.d.ts → trajectory-2TkpSEVh.d.ts} +1 -1
- package/dist/{types-Croy5h7V.d.ts → types-C7DGg5ex.d.ts} +2 -0
- package/dist/{types-2VVIL04s.d.ts → types-Ce17tDlG.d.ts} +2 -2
- package/dist/wire/index.d.ts +4 -4
- package/dist/wire/index.js +2 -2
- package/dist/workflow/index.d.ts +13 -13
- package/dist/workflow/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-47X6LRCE.js.map +0 -1
- package/dist/chunk-CVVHBFGN.js.map +0 -1
- package/dist/chunk-GSH6QNNS.js.map +0 -1
- package/dist/chunk-LMZQ2Z4U.js.map +0 -1
- package/dist/chunk-QAY5UIJO.js.map +0 -1
- package/dist/chunk-QG2OVF2D.js.map +0 -1
- package/dist/chunk-T375SUOZ.js.map +0 -1
- package/dist/chunk-UMMZHCPB.js.map +0 -1
- /package/dist/{chunk-TWS7AZEY.js.map → chunk-2K6UUZ7P.js.map} +0 -0
- /package/dist/{chunk-Y47J2LJ3.js.map → chunk-2KNZHH3P.js.map} +0 -0
- /package/dist/{chunk-QS3RBQPI.js.map → chunk-D5KBVULY.js.map} +0 -0
- /package/dist/{chunk-ZFIBGEOL.js.map → chunk-EGPMSBEZ.js.map} +0 -0
- /package/dist/{chunk-XY4DDNEG.js.map → chunk-MPQWFX6Y.js.map} +0 -0
- /package/dist/{chunk-L3JOU6XM.js.map → chunk-NACM5RS7.js.map} +0 -0
- /package/dist/{chunk-4FBZZIYD.js.map → chunk-QTMYW64F.js.map} +0 -0
- /package/dist/{chunk-6SOJM3VR.js.map → chunk-SD2YFWQQ.js.map} +0 -0
- /package/dist/{chunk-UHMJT4T7.js.map → chunk-TBDR6PAI.js.map} +0 -0
- /package/dist/{chunk-CY6U5S3X.js.map → chunk-URWVKRCS.js.map} +0 -0
- /package/dist/{run-campaign-RDGAM5KJ.js.map → run-campaign-7WNXMDSN.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
pairedBootstrap,
|
|
6
6
|
pairedMde,
|
|
7
7
|
wilcoxonSignedRank
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-56GC6VYO.js";
|
|
9
9
|
import {
|
|
10
10
|
canonicalize,
|
|
11
11
|
hashJson
|
|
@@ -877,4 +877,4 @@ export {
|
|
|
877
877
|
RESEARCH_REPORT_HARD_PAIR_FLOOR,
|
|
878
878
|
researchReport
|
|
879
879
|
};
|
|
880
|
-
//# sourceMappingURL=chunk-
|
|
880
|
+
//# sourceMappingURL=chunk-URWVKRCS.js.map
|
|
@@ -67,48 +67,101 @@ var SubprocessSandboxDriver = class {
|
|
|
67
67
|
const start = Date.now();
|
|
68
68
|
const effectiveCwd = config.cwd ?? this.defaultCwd;
|
|
69
69
|
const effectiveEnv = { ...process.env, ...this.defaultEnv ?? {}, ...config.env ?? {} };
|
|
70
|
+
const maxOutputBytes = config.maxOutputBytes ?? 16 * 1024 * 1024;
|
|
70
71
|
return await new Promise((resolve) => {
|
|
71
72
|
const child = spawn(command, {
|
|
72
73
|
shell: true,
|
|
73
74
|
cwd: effectiveCwd,
|
|
74
|
-
env: effectiveEnv
|
|
75
|
+
env: effectiveEnv,
|
|
76
|
+
// Own process group so a timeout can SIGKILL the whole tree, not
|
|
77
|
+
// just the shell — otherwise a runaway grandchild keeps the pipes
|
|
78
|
+
// open and `close` never fires (the timeout silently does nothing).
|
|
79
|
+
detached: process.platform !== "win32"
|
|
75
80
|
});
|
|
76
81
|
let stdout = "";
|
|
77
82
|
let stderr = "";
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
83
|
+
let outputBytes = 0;
|
|
84
|
+
let outputTruncated = false;
|
|
85
|
+
let killedByTimeout = false;
|
|
86
|
+
let settled = false;
|
|
87
|
+
const onStdout = (d) => {
|
|
88
|
+
const chunk = capture(String(d));
|
|
89
|
+
if (chunk) stdout += chunk;
|
|
90
|
+
};
|
|
91
|
+
const onStderr = (d) => {
|
|
92
|
+
const chunk = capture(String(d));
|
|
93
|
+
if (chunk) stderr += chunk;
|
|
94
|
+
};
|
|
95
|
+
function capture(s) {
|
|
96
|
+
if (outputBytes >= maxOutputBytes) {
|
|
97
|
+
outputTruncated = true;
|
|
98
|
+
return "";
|
|
99
|
+
}
|
|
100
|
+
const room = maxOutputBytes - outputBytes;
|
|
101
|
+
if (s.length > room) {
|
|
102
|
+
outputBytes = maxOutputBytes;
|
|
103
|
+
outputTruncated = true;
|
|
104
|
+
return s.slice(0, room);
|
|
105
|
+
}
|
|
106
|
+
outputBytes += s.length;
|
|
107
|
+
return s;
|
|
108
|
+
}
|
|
109
|
+
child.stdout?.on("data", onStdout);
|
|
110
|
+
child.stderr?.on("data", onStderr);
|
|
111
|
+
const cleanup = () => {
|
|
95
112
|
clearTimeout(timeout);
|
|
113
|
+
if (forceResolve) clearTimeout(forceResolve);
|
|
114
|
+
child.stdout?.off("data", onStdout);
|
|
115
|
+
child.stderr?.off("data", onStderr);
|
|
116
|
+
child.removeAllListeners("close");
|
|
117
|
+
child.removeAllListeners("error");
|
|
118
|
+
};
|
|
119
|
+
const finish = (outcome) => {
|
|
120
|
+
if (settled) return;
|
|
121
|
+
settled = true;
|
|
122
|
+
cleanup();
|
|
96
123
|
const wallMs = Date.now() - start;
|
|
97
|
-
const
|
|
124
|
+
const exitCode = killedByTimeout ? outcome.code && outcome.code !== 0 ? outcome.code : 124 : outcome.code ?? 1;
|
|
125
|
+
const parsed = !killedByTimeout && phase === "test" && config.testParser ? config.testParser.parse(stdout, stderr, exitCode) : void 0;
|
|
98
126
|
resolve({
|
|
99
127
|
phase,
|
|
100
|
-
exitCode
|
|
128
|
+
exitCode,
|
|
101
129
|
stdout,
|
|
102
|
-
stderr,
|
|
130
|
+
stderr: outcome.runnerError ? stderr + outcome.runnerError : stderr,
|
|
103
131
|
wallMs,
|
|
104
132
|
testsTotal: parsed?.testsTotal,
|
|
105
|
-
testsPassed: parsed?.testsPassed
|
|
133
|
+
testsPassed: parsed?.testsPassed,
|
|
134
|
+
killedByTimeout: killedByTimeout || void 0,
|
|
135
|
+
outputTruncated: outputTruncated || void 0
|
|
106
136
|
});
|
|
137
|
+
};
|
|
138
|
+
const killTree = () => {
|
|
139
|
+
try {
|
|
140
|
+
if (process.platform !== "win32" && typeof child.pid === "number") {
|
|
141
|
+
process.kill(-child.pid, "SIGKILL");
|
|
142
|
+
} else {
|
|
143
|
+
child.kill("SIGKILL");
|
|
144
|
+
}
|
|
145
|
+
} catch (err) {
|
|
146
|
+
console.warn("[sandbox-harness] SIGKILL on timeout failed:", err);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
let forceResolve;
|
|
150
|
+
const timeout = setTimeout(
|
|
151
|
+
() => {
|
|
152
|
+
killedByTimeout = true;
|
|
153
|
+
killTree();
|
|
154
|
+
forceResolve = setTimeout(() => finish({ code: null }), 2e3);
|
|
155
|
+
},
|
|
156
|
+
config.timeoutMs ?? 10 * 6e4
|
|
157
|
+
);
|
|
158
|
+
child.on("close", (code) => {
|
|
159
|
+
if (forceResolve) clearTimeout(forceResolve);
|
|
160
|
+
finish({ code });
|
|
107
161
|
});
|
|
108
162
|
child.on("error", (err) => {
|
|
109
|
-
clearTimeout(
|
|
110
|
-
|
|
111
|
-
resolve({ phase, exitCode: 127, stdout, stderr: stderr + String(err), wallMs });
|
|
163
|
+
if (forceResolve) clearTimeout(forceResolve);
|
|
164
|
+
finish({ code: 127, runnerError: String(err) });
|
|
112
165
|
});
|
|
113
166
|
});
|
|
114
167
|
}
|
|
@@ -143,8 +196,9 @@ var SandboxHarness = class {
|
|
|
143
196
|
if (config.setupCommand) {
|
|
144
197
|
result.setup = await this.driver.exec("setup", config.setupCommand, config);
|
|
145
198
|
result.totalWallMs += result.setup.wallMs;
|
|
146
|
-
if (result.setup.exitCode !== 0) {
|
|
147
|
-
|
|
199
|
+
if (result.setup.killedByTimeout || result.setup.exitCode !== 0) {
|
|
200
|
+
const reason = result.setup.killedByTimeout ? `setup timed out after ${result.setup.wallMs}ms` : `setup failed (exit ${result.setup.exitCode})`;
|
|
201
|
+
await handle.fail(reason, {
|
|
148
202
|
exitCode: result.setup.exitCode,
|
|
149
203
|
wallMs: result.totalWallMs
|
|
150
204
|
});
|
|
@@ -154,8 +208,9 @@ var SandboxHarness = class {
|
|
|
154
208
|
if (config.runCommand) {
|
|
155
209
|
result.run = await this.driver.exec("run", config.runCommand, config);
|
|
156
210
|
result.totalWallMs += result.run.wallMs;
|
|
157
|
-
if (result.run.exitCode !== 0) {
|
|
158
|
-
|
|
211
|
+
if (result.run.killedByTimeout || result.run.exitCode !== 0) {
|
|
212
|
+
const reason = result.run.killedByTimeout ? `run timed out after ${result.run.wallMs}ms` : `run failed (exit ${result.run.exitCode})`;
|
|
213
|
+
await handle.fail(reason, {
|
|
159
214
|
exitCode: result.run.exitCode,
|
|
160
215
|
wallMs: result.totalWallMs
|
|
161
216
|
});
|
|
@@ -165,7 +220,7 @@ var SandboxHarness = class {
|
|
|
165
220
|
if (config.testCommand) {
|
|
166
221
|
result.test = await this.driver.exec("test", config.testCommand, config);
|
|
167
222
|
result.totalWallMs += result.test.wallMs;
|
|
168
|
-
const passed = result.test.exitCode === 0;
|
|
223
|
+
const passed = !result.test.killedByTimeout && result.test.exitCode === 0;
|
|
169
224
|
result.passed = passed;
|
|
170
225
|
if (result.test.testsTotal !== void 0 && result.test.testsTotal > 0) {
|
|
171
226
|
result.score = (result.test.testsPassed ?? 0) / result.test.testsTotal;
|
|
@@ -248,4 +303,4 @@ export {
|
|
|
248
303
|
SandboxHarness,
|
|
249
304
|
runTestGradedScenario
|
|
250
305
|
};
|
|
251
|
-
//# sourceMappingURL=chunk-
|
|
306
|
+
//# sourceMappingURL=chunk-ZOPLCJSY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sandbox-harness.ts","../src/test-graded-scenario.ts"],"sourcesContent":["/**\n * SandboxHarness — executes a scenario in an isolated environment and\n * emits a rich SandboxSpan into the trace.\n *\n * Two built-in drivers:\n * - `SubprocessSandboxDriver` — spawn in a local cwd with env vars.\n * Fast, no dependencies, fine for unit tests and most CI gates.\n * - `DockerSandboxDriver` — lifted from tangle-router's sandbox path;\n * shells out to `docker run`. Stronger isolation, slower startup.\n *\n * Consumers implement `SandboxDriver` for custom backends (Firecracker,\n * Cloudflare sandbox product, etc.). The harness doesn't care which.\n */\n\nimport { ConfigError } from './errors'\nimport type { TraceEmitter } from './trace/emitter'\nimport type { SandboxSpan } from './trace/schema'\n\nexport interface HarnessConfig {\n /** Setup command (e.g. \"pnpm install\"). Non-zero exit fails the run. */\n setupCommand?: string\n /** Run command (e.g. \"pnpm build\"). */\n runCommand?: string\n /** Test command (e.g. \"pnpm test --run\"). Drives the test count + pass count. */\n testCommand?: string\n /** Absolute cwd for the subprocess driver. Ignored by docker driver. */\n cwd?: string\n /** Max wall-clock per phase in ms. Default 10 minutes. */\n timeoutMs?: number\n /**\n * Cap on captured stdout+stderr bytes per phase. A runaway process can\n * otherwise grow the in-memory buffer without bound. Once hit, further\n * output is dropped and `outputTruncated` is set. Default 16 MiB.\n */\n maxOutputBytes?: number\n /** Image for the docker driver. */\n image?: string\n /** Extra env vars (validated; shell-escaped). */\n env?: Record<string, string>\n /** Parser for the test output — maps stdout/stderr/exit code → pass count. */\n testParser?: TestOutputParser\n}\n\nexport interface TestOutputParser {\n id: string\n parse(\n stdout: string,\n stderr: string,\n exitCode: number,\n ): { testsTotal: number; testsPassed: number } | undefined\n}\n\nexport interface SandboxResult {\n phase: 'setup' | 'run' | 'test'\n exitCode: number\n stdout: string\n stderr: string\n wallMs: number\n testsTotal?: number\n testsPassed?: number\n /**\n * True when the process was killed because it exceeded `timeoutMs`. A\n * SIGKILLed child can still close with exit code 0; callers MUST treat\n * a timed-out phase as a hard failure regardless of `exitCode`, never\n * as a pass. `undefined`/`false` means the process completed on its own.\n */\n killedByTimeout?: boolean\n /**\n * True when captured stdout/stderr hit `maxOutputBytes` and further\n * output was dropped. The result is still returned (the process was\n * not killed for this), but downstream parsers see truncated text.\n */\n outputTruncated?: boolean\n}\n\nexport interface SandboxDriver {\n id: string\n exec(\n phase: SandboxResult['phase'],\n command: string,\n config: HarnessConfig,\n ): Promise<SandboxResult>\n}\n\n// ── Parsers ──────────────────────────────────────────────────────────\n\n/** Vitest default summary line: \"Tests X passed | Y failed\". */\nexport const vitestTestParser: TestOutputParser = {\n id: 'vitest',\n parse(stdout) {\n const m = stdout.match(/Tests\\s+(\\d+)\\s+(passed|failed)(?:\\s*\\|\\s*(\\d+)\\s+(passed|failed))?/i)\n if (!m) return undefined\n let passed = 0\n let failed = 0\n const a = parseInt(m[1]!, 10)\n const aLabel = m[2]!.toLowerCase()\n if (aLabel === 'passed') passed += a\n else failed += a\n if (m[3] && m[4]) {\n const b = parseInt(m[3], 10)\n if (m[4].toLowerCase() === 'passed') passed += b\n else failed += b\n }\n return { testsTotal: passed + failed, testsPassed: passed }\n },\n}\n\n/** Pytest default: \"collected N items\" + \" X passed, Y failed\". */\nexport const pytestTestParser: TestOutputParser = {\n id: 'pytest',\n parse(stdout) {\n const total = stdout.match(/collected\\s+(\\d+)\\s+items?/i)\n const passed = stdout.match(/(\\d+)\\s+passed/)\n if (!total || !passed) return undefined\n return { testsTotal: parseInt(total[1]!, 10), testsPassed: parseInt(passed[1]!, 10) }\n },\n}\n\n/** Jest: \"Tests: X passed, Y total\" (and optional failed). */\nexport const jestTestParser: TestOutputParser = {\n id: 'jest',\n parse(stdout) {\n const m = stdout.match(/Tests:\\s+(?:(\\d+)\\s+failed[^,]*,\\s*)?(\\d+)\\s+passed,\\s+(\\d+)\\s+total/i)\n if (!m) return undefined\n return { testsTotal: parseInt(m[3]!, 10), testsPassed: parseInt(m[2]!, 10) }\n },\n}\n\n/** Composite parser — tries a list of parsers in order. */\nexport function composeParsers(...parsers: TestOutputParser[]): TestOutputParser {\n return {\n id: parsers.map((p) => p.id).join('|'),\n parse(stdout, stderr, exitCode) {\n for (const p of parsers) {\n const res = p.parse(stdout, stderr, exitCode)\n if (res) return res\n }\n return undefined\n },\n }\n}\n\n// ── Drivers ──────────────────────────────────────────────────────────\n\nexport interface SubprocessSandboxDriverOptions {\n /**\n * Default cwd for all `exec` calls. Used when the per-call `HarnessConfig`\n * does not set its own `cwd`. Lets callers bind the driver to a working\n * directory once instead of spreading cwd into every harness config —\n * useful when the harness config is constructed far from the call site\n * (e.g. starter-foundry's promoter passes a static HarnessConfig per\n * family taxonomy but needs a per-run composed-scaffold cwd).\n */\n cwd?: string\n /**\n * Default env merged into every `exec` call's env (per-call `HarnessConfig.env`\n * still wins on key collision). Same ergonomic rationale as `cwd` above.\n */\n env?: Record<string, string>\n}\n\nexport class SubprocessSandboxDriver implements SandboxDriver {\n id = 'subprocess'\n private defaultCwd?: string\n private defaultEnv?: Record<string, string>\n\n constructor(options: SubprocessSandboxDriverOptions = {}) {\n this.defaultCwd = options.cwd\n this.defaultEnv = options.env\n }\n\n async exec(\n phase: SandboxResult['phase'],\n command: string,\n config: HarnessConfig,\n ): Promise<SandboxResult> {\n const { spawn } = await import('node:child_process')\n const start = Date.now()\n // Per-call config wins; fall back to constructor defaults. Honoring\n // the constructor `cwd` keeps the subprocess from inheriting Node's\n // cwd when only the constructor arg is supplied.\n const effectiveCwd = config.cwd ?? this.defaultCwd\n const effectiveEnv = { ...process.env, ...(this.defaultEnv ?? {}), ...(config.env ?? {}) }\n const maxOutputBytes = config.maxOutputBytes ?? 16 * 1024 * 1024\n return await new Promise<SandboxResult>((resolve) => {\n const child = spawn(command, {\n shell: true,\n cwd: effectiveCwd,\n env: effectiveEnv,\n // Own process group so a timeout can SIGKILL the whole tree, not\n // just the shell — otherwise a runaway grandchild keeps the pipes\n // open and `close` never fires (the timeout silently does nothing).\n detached: process.platform !== 'win32',\n })\n let stdout = ''\n let stderr = ''\n let outputBytes = 0\n let outputTruncated = false\n let killedByTimeout = false\n let settled = false\n\n const onStdout = (d: unknown) => {\n const chunk = capture(String(d))\n if (chunk) stdout += chunk\n }\n const onStderr = (d: unknown) => {\n const chunk = capture(String(d))\n if (chunk) stderr += chunk\n }\n // Bound the in-memory buffer so a runaway process can't OOM the\n // harness. Once the cap is hit we keep draining the streams (to let\n // the child reach `close`) but discard the bytes.\n function capture(s: string): string {\n if (outputBytes >= maxOutputBytes) {\n outputTruncated = true\n return ''\n }\n const room = maxOutputBytes - outputBytes\n if (s.length > room) {\n outputBytes = maxOutputBytes\n outputTruncated = true\n return s.slice(0, room)\n }\n outputBytes += s.length\n return s\n }\n\n child.stdout?.on('data', onStdout)\n child.stderr?.on('data', onStderr)\n\n const cleanup = () => {\n clearTimeout(timeout)\n if (forceResolve) clearTimeout(forceResolve)\n child.stdout?.off('data', onStdout)\n child.stderr?.off('data', onStderr)\n child.removeAllListeners('close')\n child.removeAllListeners('error')\n }\n\n // Resolve exactly once. `code`/`signal` come from `close`; on the\n // timeout path we force a non-zero exit so a SIGKILLed child that\n // reports exit 0 can never read as a clean pass downstream.\n const finish = (outcome: { code: number | null; runnerError?: string }) => {\n if (settled) return\n settled = true\n cleanup()\n const wallMs = Date.now() - start\n const exitCode = killedByTimeout\n ? outcome.code && outcome.code !== 0\n ? outcome.code\n : 124\n : (outcome.code ?? 1)\n const parsed =\n !killedByTimeout && phase === 'test' && config.testParser\n ? config.testParser.parse(stdout, stderr, exitCode)\n : undefined\n resolve({\n phase,\n exitCode,\n stdout,\n stderr: outcome.runnerError ? stderr + outcome.runnerError : stderr,\n wallMs,\n testsTotal: parsed?.testsTotal,\n testsPassed: parsed?.testsPassed,\n killedByTimeout: killedByTimeout || undefined,\n outputTruncated: outputTruncated || undefined,\n })\n }\n\n // Kill the whole process group on win32-less platforms (we spawned\n // detached). On a clean close this is a no-op.\n const killTree = () => {\n try {\n if (process.platform !== 'win32' && typeof child.pid === 'number') {\n process.kill(-child.pid, 'SIGKILL')\n } else {\n child.kill('SIGKILL')\n }\n } catch (err) {\n console.warn('[sandbox-harness] SIGKILL on timeout failed:', err)\n }\n }\n\n let forceResolve: ReturnType<typeof setTimeout> | undefined\n const timeout = setTimeout(\n () => {\n killedByTimeout = true\n killTree()\n // Give `close` a brief window to fire (flushing any final output)\n // after the group dies; if an orphaned grandchild keeps the pipes\n // open, force-resolve so the harness can't hang on a runaway.\n forceResolve = setTimeout(() => finish({ code: null }), 2000)\n },\n config.timeoutMs ?? 10 * 60_000,\n )\n\n child.on('close', (code) => {\n if (forceResolve) clearTimeout(forceResolve)\n finish({ code })\n })\n child.on('error', (err) => {\n if (forceResolve) clearTimeout(forceResolve)\n finish({ code: 127, runnerError: String(err) })\n })\n })\n }\n}\n\nexport class DockerSandboxDriver implements SandboxDriver {\n id = 'docker'\n\n async exec(\n phase: SandboxResult['phase'],\n command: string,\n config: HarnessConfig,\n ): Promise<SandboxResult> {\n if (!config.image) throw new ConfigError('DockerSandboxDriver requires config.image')\n const sub = new SubprocessSandboxDriver()\n const envArgs = Object.entries(config.env ?? {})\n .map(([k, v]) => `-e ${shellQuote(k)}=${shellQuote(v)}`)\n .join(' ')\n const wrapped = `docker run --rm ${envArgs} ${shellQuote(config.image)} sh -c ${shellQuote(command)}`\n return sub.exec(phase, wrapped, { ...config, env: undefined })\n }\n}\n\nfunction shellQuote(v: string): string {\n if (/^[A-Za-z0-9_\\-/.@:=]+$/.test(v)) return v\n return `'${v.replace(/'/g, `'\\\\''`)}'`\n}\n\n// ── Harness orchestration ────────────────────────────────────────────\n\nexport interface SandboxHarnessResult {\n passed: boolean\n setup?: SandboxResult\n run?: SandboxResult\n test?: SandboxResult\n totalWallMs: number\n /** Final score — 0 when no tests; otherwise testsPassed/testsTotal. */\n score: number\n}\n\nexport class SandboxHarness {\n private driver: SandboxDriver\n constructor(driver: SandboxDriver = new SubprocessSandboxDriver()) {\n this.driver = driver\n }\n\n async run(config: HarnessConfig, emitter: TraceEmitter): Promise<SandboxHarnessResult> {\n const handle = await emitter.sandbox({\n name: `sandbox(${this.driver.id})`,\n image: config.image,\n command: [config.setupCommand, config.runCommand, config.testCommand]\n .filter(Boolean)\n .join(' && '),\n })\n const result: SandboxHarnessResult = { passed: false, totalWallMs: 0, score: 0 }\n try {\n if (config.setupCommand) {\n result.setup = await this.driver.exec('setup', config.setupCommand, config)\n result.totalWallMs += result.setup.wallMs\n if (result.setup.killedByTimeout || result.setup.exitCode !== 0) {\n const reason = result.setup.killedByTimeout\n ? `setup timed out after ${result.setup.wallMs}ms`\n : `setup failed (exit ${result.setup.exitCode})`\n await handle.fail(reason, {\n exitCode: result.setup.exitCode,\n wallMs: result.totalWallMs,\n } as Partial<SandboxSpan>)\n return result\n }\n }\n if (config.runCommand) {\n result.run = await this.driver.exec('run', config.runCommand, config)\n result.totalWallMs += result.run.wallMs\n if (result.run.killedByTimeout || result.run.exitCode !== 0) {\n const reason = result.run.killedByTimeout\n ? `run timed out after ${result.run.wallMs}ms`\n : `run failed (exit ${result.run.exitCode})`\n await handle.fail(reason, {\n exitCode: result.run.exitCode,\n wallMs: result.totalWallMs,\n } as Partial<SandboxSpan>)\n return result\n }\n }\n if (config.testCommand) {\n result.test = await this.driver.exec('test', config.testCommand, config)\n result.totalWallMs += result.test.wallMs\n // A timed-out test phase is a hard fail regardless of the exit code\n // a SIGKILLed child happens to report — never let it score as a pass.\n const passed = !result.test.killedByTimeout && result.test.exitCode === 0\n result.passed = passed\n if (result.test.testsTotal !== undefined && result.test.testsTotal > 0) {\n result.score = (result.test.testsPassed ?? 0) / result.test.testsTotal\n } else {\n result.score = passed ? 1 : 0\n }\n await handle.end({\n exitCode: result.test.exitCode,\n testsTotal: result.test.testsTotal,\n testsPassed: result.test.testsPassed,\n wallMs: result.totalWallMs,\n status: passed ? 'ok' : 'error',\n } as Partial<SandboxSpan>)\n } else {\n result.passed = true\n result.score = 1\n await handle.end({ wallMs: result.totalWallMs } as Partial<SandboxSpan>)\n }\n } catch (err) {\n await handle.fail(err instanceof Error ? err : String(err))\n throw err\n }\n return result\n }\n}\n","/**\n * TestGradedScenario — a scenario whose score comes from a test suite.\n *\n * This is the SWE-bench pattern generalized. The scenario ships:\n * - fixture data (setup instructions)\n * - a test command the harness runs\n * - optional assertion overrides\n *\n * The runner emits a run, delegates to SandboxHarness, records the\n * outcome, and returns a structured verdict. Consumers bind their own\n * agent execution to this contract.\n */\n\nimport type { HarnessConfig, SandboxDriver, SandboxHarnessResult } from './sandbox-harness'\nimport { SandboxHarness } from './sandbox-harness'\nimport { TraceEmitter } from './trace/emitter'\nimport type { FailureClass, Run } from './trace/schema'\nimport type { TraceStore } from './trace/store'\n\nexport interface TestGradedScenario {\n id: string\n description?: string\n harness: HarnessConfig\n /** Optional pass threshold in 0..1 (default 1.0 = all tests must pass). */\n passThreshold?: number\n /** Provenance for dataset tracking. */\n datasetVersion?: string\n /** Free-form tags (difficulty, category, etc.). */\n tags?: Record<string, string>\n}\n\nexport interface TestGradedRunOptions {\n variantId?: string\n driver?: SandboxDriver\n /** Metadata recorded on the Run (codeSha, promptSha, modelFingerprint, seed). */\n provenance?: Pick<Run, 'codeSha' | 'promptSha' | 'modelFingerprint' | 'seed' | 'envFingerprint'>\n}\n\nexport interface TestGradedRunResult {\n runId: string\n scenario: TestGradedScenario\n harness: SandboxHarnessResult\n pass: boolean\n score: number\n failureClass?: FailureClass\n}\n\nexport async function runTestGradedScenario(\n scenario: TestGradedScenario,\n store: TraceStore,\n options: TestGradedRunOptions = {},\n): Promise<TestGradedRunResult> {\n const emitter = new TraceEmitter(store)\n await emitter.startRun({\n scenarioId: scenario.id,\n variantId: options.variantId,\n datasetVersion: scenario.datasetVersion,\n tags: scenario.tags,\n ...options.provenance,\n })\n const harness = new SandboxHarness(options.driver)\n const result = await harness.run(scenario.harness, emitter)\n const threshold = scenario.passThreshold ?? 1.0\n const pass = result.passed && result.score >= threshold\n const setupFailed = result.setup !== undefined && result.setup.exitCode !== 0\n const runFailed = result.run !== undefined && result.run.exitCode !== 0\n const testFailed = result.test !== undefined && result.test.exitCode !== 0\n const failureClass: FailureClass | undefined = pass\n ? 'success'\n : setupFailed || runFailed\n ? 'sandbox_failure'\n : testFailed\n ? 'format_drift'\n : 'unknown'\n await emitter.endRun({\n pass,\n score: result.score,\n failureClass,\n notes: pass ? undefined : reasonForFailure(result),\n })\n return {\n runId: emitter.runId,\n scenario,\n harness: result,\n pass,\n score: result.score,\n failureClass,\n }\n}\n\nfunction reasonForFailure(result: SandboxHarnessResult): string {\n if (result.setup && result.setup.exitCode !== 0)\n return `setup failed: exit ${result.setup.exitCode}`\n if (result.run && result.run.exitCode !== 0) return `run failed: exit ${result.run.exitCode}`\n if (result.test) {\n if (result.test.testsTotal !== undefined) {\n return `tests: ${result.test.testsPassed ?? 0}/${result.test.testsTotal}`\n }\n return `test exit ${result.test.exitCode}`\n }\n return 'no test command'\n}\n"],"mappings":";;;;;;;;AAuFO,IAAM,mBAAqC;AAAA,EAChD,IAAI;AAAA,EACJ,MAAM,QAAQ;AACZ,UAAM,IAAI,OAAO,MAAM,sEAAsE;AAC7F,QAAI,CAAC,EAAG,QAAO;AACf,QAAI,SAAS;AACb,QAAI,SAAS;AACb,UAAM,IAA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AAQ,UAAa,OAAO,IAAI,aAAa;AACtE,QAAM,aAAa,OAAO,SAAS,UAAa,OAAO,KAAK,aAAa;AACzE,QAAM,eAAyC,OAC3C,YACA,eAAe,YACb,oBACA,aACE,iBACA;AACR,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,IACA,OAAO,OAAO;AAAA,IACd;AAAA,IACA,OAAO,OAAO,SAAY,iBAAiB,MAAM;AAAA,EACnD,CAAC;AACD,SAAO;AAAA,IACL,OAAO,QAAQ;AAAA,IACf;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,OAAO,OAAO;AAAA,IACd;AAAA,EACF;AACF;AAEA,SAAS,iBAAiB,QAAsC;AAC9D,MAAI,OAAO,SAAS,OAAO,MAAM,aAAa;AAC5C,WAAO,sBAAsB,OAAO,MAAM,QAAQ;AACpD,MAAI,OAAO,OAAO,OAAO,IAAI,aAAa,EAAG,QAAO,oBAAoB,OAAO,IAAI,QAAQ;AAC3F,MAAI,OAAO,MAAM;AACf,QAAI,OAAO,KAAK,eAAe,QAAW;AACxC,aAAO,UAAU,OAAO,KAAK,eAAe,CAAC,IAAI,OAAO,KAAK,UAAU;AAAA,IACzE;AACA,WAAO,aAAa,OAAO,KAAK,QAAQ;AAAA,EAC1C;AACA,SAAO;AACT;","names":[]}
|
package/dist/cli.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
runRpcBatch,
|
|
6
6
|
runRpcOnce,
|
|
7
7
|
startServer
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-D5KBVULY.js";
|
|
9
|
+
import "./chunk-CWNP4DV4.js";
|
|
10
10
|
import "./chunk-PC4UYEBM.js";
|
|
11
11
|
import "./chunk-3BFEG2F6.js";
|
|
12
12
|
import "./chunk-PZ5AY32C.js";
|
package/dist/contract/index.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { S as Scenario, M as MutableSurface, b as DispatchContext, a as JudgeConfig, I as ImprovementDriver, G as Gate, L as LabeledScenarioStore, c as GateDecision } from '../types-BU-7W85F.js';
|
|
2
2
|
export { C as CampaignAggregates, d as CampaignArtifactWriter, e as CampaignCellResult, f as CampaignCostMeter, g as CampaignResult, h as CampaignTraceWriter, i as CodeSurface, D as Dispatch, j as GateContext, k as GateResult, l as GenerationCandidate, m as GenerationRecord, n as JudgeDimension, J as JudgeScore, o as Mutator, O as OptimizerConfig, p as SessionScript } from '../types-BU-7W85F.js';
|
|
3
|
-
import { L as LoopProvenanceRecord } from '../provenance-
|
|
4
|
-
export { A as AxisEvidence, a as AxisVerdict, B as BuildEvidenceVectorOptions, D as DefaultProductionGateOptions, E as EvidenceVector, b as EvolutionaryDriverOptions, H as HeldOutGateOptions, O as ObjectiveSource, P as ParetoSignificanceGateOptions, c as PromotionObjective, d as PromotionPolicy, R as RunEvalOptions, e as buildEvidenceVector, f as composeGate, g as defaultProductionGate, h as evolutionaryDriver, i as heldOutGate, p as paretoPolicy, j as paretoSignificanceGate, r as runEval } from '../provenance-
|
|
5
|
-
import { C as CampaignStorage, R as RunOptimizationOptions, a as RunImprovementLoopResult } from '../run-improvement-loop-
|
|
6
|
-
export { G as GepaDriverOptions, b as RunCampaignOptions, c as RunImprovementLoopOptions, f as fsCampaignStorage, g as gepaDriver, i as inMemoryCampaignStorage, r as runCampaign, d as runImprovementLoop } from '../run-improvement-loop-
|
|
3
|
+
import { L as LoopProvenanceRecord } from '../provenance-P-bCL2Fo.js';
|
|
4
|
+
export { A as AxisEvidence, a as AxisVerdict, B as BuildEvidenceVectorOptions, D as DefaultProductionGateOptions, E as EvidenceVector, b as EvolutionaryDriverOptions, H as HeldOutGateOptions, O as ObjectiveSource, P as ParetoSignificanceGateOptions, c as PromotionObjective, d as PromotionPolicy, R as RunEvalOptions, e as buildEvidenceVector, f as composeGate, g as defaultProductionGate, h as evolutionaryDriver, i as heldOutGate, p as paretoPolicy, j as paretoSignificanceGate, r as runEval } from '../provenance-P-bCL2Fo.js';
|
|
5
|
+
import { C as CampaignStorage, R as RunOptimizationOptions, a as RunImprovementLoopResult } from '../run-improvement-loop-DBahB8Ax.js';
|
|
6
|
+
export { G as GepaDriverOptions, b as RunCampaignOptions, c as RunImprovementLoopOptions, f as fsCampaignStorage, g as gepaDriver, i as inMemoryCampaignStorage, r as runCampaign, d as runImprovementLoop } from '../run-improvement-loop-DBahB8Ax.js';
|
|
7
7
|
export { D as DeploymentOutcome, F as FileSystemOutcomeStore, a as FileSystemOutcomeStoreOptions, I as InMemoryOutcomeStore, b as OutcomeStore } from '../outcome-store-rnXLEqSn.js';
|
|
8
8
|
import { HostedTenant, EvalRunCellScore, EvalRunGenerationSnapshot, EvalRunEvent, TraceSpanEvent } from '../hosted/index.js';
|
|
9
9
|
import { R as RunRecord, a as RunSplitTag } from '../run-record-e7vj1uZQ.js';
|
|
10
|
-
import { I as InsightReport } from '../insight-report-
|
|
11
|
-
export { F as FailureClusterInsight, a as InterRaterInsight, J as JudgeInsight, L as LiftInsight, O as OutcomeCorrelationInsight, R as Recommendation, b as ReleaseSummary, S as ScalarDistribution } from '../insight-report-
|
|
12
|
-
export { D as DefaultAnalystRegistryOptions, b as buildDefaultAnalystRegistry } from '../default-registry-
|
|
13
|
-
export { c as AnalystFinding } from '../types-
|
|
14
|
-
export { A as AnalyzeRunsOptions, a as analyzeRuns } from '../analyze-runs-
|
|
10
|
+
import { I as InsightReport } from '../insight-report-DWl3z9tl.js';
|
|
11
|
+
export { F as FailureClusterInsight, a as InterRaterInsight, J as JudgeInsight, L as LiftInsight, O as OutcomeCorrelationInsight, R as Recommendation, b as ReleaseSummary, S as ScalarDistribution } from '../insight-report-DWl3z9tl.js';
|
|
12
|
+
export { D as DefaultAnalystRegistryOptions, b as buildDefaultAnalystRegistry } from '../default-registry-6dhErQbs.js';
|
|
13
|
+
export { c as AnalystFinding } from '../types-Ce17tDlG.js';
|
|
14
|
+
export { A as AnalyzeRunsOptions, a as analyzeRuns } from '../analyze-runs-B6Ljo_dI.js';
|
|
15
15
|
export { C as CodeAgentSessionDiagnostic, a as CodeAgentSessionIntakeOptions, b as CodeAgentSessionIntakeResult, c as CodeAgentSessionMetrics, d as CodeAgentSessionSource, P as ParsedCodeAgentJsonl, f as fromClaudeCodeSession, e as fromCodexSession, g as fromKimiCodeSession, h as fromOpenCodeSession, i as fromPiSession, j as fromPigraphSession, p as parseCodeAgentJsonl } from '../code-agent-session-BO8nCnv3.js';
|
|
16
|
-
import '../red-team-
|
|
16
|
+
import '../red-team-BWdoyleI.js';
|
|
17
17
|
import '../dataset-BbGkaN2I.js';
|
|
18
18
|
import '../errors-CzMUYo7b.js';
|
|
19
|
-
import '../store-
|
|
19
|
+
import '../store-BcFXE6LG.js';
|
|
20
20
|
import '../schema-m0gsnbt3.js';
|
|
21
21
|
import '../pareto-E-pembql.js';
|
|
22
|
-
import '../statistics-
|
|
22
|
+
import '../statistics-CCJpTGOS.js';
|
|
23
23
|
import '../judge-calibration-0p2QcWNE.js';
|
|
24
|
-
import '../types-
|
|
24
|
+
import '../types-C7DGg5ex.js';
|
|
25
25
|
import '@tangle-network/tcloud';
|
|
26
|
-
import '../llm-client-
|
|
26
|
+
import '../llm-client-Bj7g0rqu.js';
|
|
27
27
|
import '../raw-provider-sink-C46HDghv.js';
|
|
28
|
-
import '../summary-report-
|
|
29
|
-
import '../failure-cluster-
|
|
28
|
+
import '../summary-report-BDOFevaT.js';
|
|
29
|
+
import '../failure-cluster-DH9Flgcf.js';
|
|
30
30
|
import '@ax-llm/ax';
|
|
31
|
-
import '../kind-factory-
|
|
31
|
+
import '../kind-factory-0BhLSI27.js';
|
|
32
32
|
import '../store-C1YxJDEK.js';
|
|
33
33
|
import 'zod';
|
|
34
34
|
|
package/dist/contract/index.js
CHANGED
|
@@ -18,40 +18,40 @@ import {
|
|
|
18
18
|
paretoPolicy,
|
|
19
19
|
paretoSignificanceGate,
|
|
20
20
|
runEval
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-SD2YFWQQ.js";
|
|
22
22
|
import {
|
|
23
23
|
analyzeRuns
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-2KNZHH3P.js";
|
|
25
25
|
import {
|
|
26
26
|
emitLoopProvenance,
|
|
27
27
|
gepaDriver,
|
|
28
28
|
heldOutGate,
|
|
29
29
|
runImprovementLoop,
|
|
30
30
|
surfaceContentHash
|
|
31
|
-
} from "../chunk-
|
|
31
|
+
} from "../chunk-EGPMSBEZ.js";
|
|
32
32
|
import {
|
|
33
33
|
fsCampaignStorage,
|
|
34
34
|
inMemoryCampaignStorage,
|
|
35
35
|
runCampaign
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-2K6UUZ7P.js";
|
|
37
37
|
import "../chunk-VI2UW6B6.js";
|
|
38
38
|
import {
|
|
39
39
|
buildDefaultAnalystRegistry
|
|
40
|
-
} from "../chunk-
|
|
41
|
-
import "../chunk-
|
|
40
|
+
} from "../chunk-MIFZUPEK.js";
|
|
41
|
+
import "../chunk-Q5LIB7BC.js";
|
|
42
42
|
import "../chunk-5HRORJQY.js";
|
|
43
43
|
import {
|
|
44
44
|
FileSystemOutcomeStore,
|
|
45
45
|
InMemoryOutcomeStore
|
|
46
46
|
} from "../chunk-3RF76KTD.js";
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-CWNP4DV4.js";
|
|
48
|
+
import "../chunk-URWVKRCS.js";
|
|
49
49
|
import "../chunk-45EEMHTC.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-56GC6VYO.js";
|
|
51
51
|
import "../chunk-GGE4NNQT.js";
|
|
52
|
-
import "../chunk-
|
|
52
|
+
import "../chunk-UFSG7ACU.js";
|
|
53
53
|
import "../chunk-5BKGXME7.js";
|
|
54
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-QMUEXQJS.js";
|
|
55
55
|
import "../chunk-PC4UYEBM.js";
|
|
56
56
|
import "../chunk-VSMTAMNK.js";
|
|
57
57
|
import "../chunk-3BFEG2F6.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as FeedbackLabel, p as ProposedSideEffect } from './feedback-trajectory-
|
|
2
|
-
import { C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig } from './control-runtime-
|
|
3
|
-
import { T as TraceEmitter } from './emitter-
|
|
1
|
+
import { b as FeedbackLabel, p as ProposedSideEffect } from './feedback-trajectory-BxY0cKfs.js';
|
|
2
|
+
import { C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig } from './control-runtime-Acf9CGhw.js';
|
|
3
|
+
import { T as TraceEmitter } from './emitter-C2rqGH_l.js';
|
|
4
4
|
import { F as FailureClass } from './schema-m0gsnbt3.js';
|
|
5
|
-
import { T as TraceStore } from './store-
|
|
5
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
6
6
|
import { a as RunSplitTag, b as RunTokenUsage, R as RunRecord } from './run-record-e7vj1uZQ.js';
|
|
7
7
|
|
|
8
8
|
interface ActionExecutionPolicy {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as TraceEmitter } from './emitter-
|
|
1
|
+
import { T as TraceEmitter } from './emitter-C2rqGH_l.js';
|
|
2
2
|
import { F as FailureClass } from './schema-m0gsnbt3.js';
|
|
3
|
-
import { T as TraceStore } from './store-
|
|
3
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Policy-based agent control runtime.
|
package/dist/control.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { A as ActionExecutionPolicy, a as ActionPolicyDecision, C as ControlRunToRunRecordOptions, e as ProposeReviewConfig, f as ProposeReviewControlAction, g as ProposeReviewControlConfig, h as ProposeReviewControlResult, i as ProposeReviewControlState, j as ProposeReviewReport, p as RunEvidenceMetadata, s as controlRunToRunRecord, u as evaluateActionPolicy, x as runProposeReview, y as runProposeReviewAsControlLoop, z as scoreFromEvals } from './control-
|
|
2
|
-
export { c as ControlActionFailureMode, d as ControlActionOutcome, e as ControlBudget, f as ControlContext, g as ControlDecision, C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig, i as ControlRuntimeError, j as ControlSeverity, b as ControlStep, k as ControlStopPolicies, S as StopDecision, l as allCriticalPassed, o as objectiveEval, r as runAgentControlLoop, s as stopOnNoProgress, m as stopOnRepeatedAction, n as subjectiveEval } from './control-runtime-
|
|
3
|
-
import './feedback-trajectory-
|
|
1
|
+
export { A as ActionExecutionPolicy, a as ActionPolicyDecision, C as ControlRunToRunRecordOptions, e as ProposeReviewConfig, f as ProposeReviewControlAction, g as ProposeReviewControlConfig, h as ProposeReviewControlResult, i as ProposeReviewControlState, j as ProposeReviewReport, p as RunEvidenceMetadata, s as controlRunToRunRecord, u as evaluateActionPolicy, x as runProposeReview, y as runProposeReviewAsControlLoop, z as scoreFromEvals } from './control-D6qwHXIR.js';
|
|
2
|
+
export { c as ControlActionFailureMode, d as ControlActionOutcome, e as ControlBudget, f as ControlContext, g as ControlDecision, C as ControlEvalResult, a as ControlRunResult, h as ControlRuntimeConfig, i as ControlRuntimeError, j as ControlSeverity, b as ControlStep, k as ControlStopPolicies, S as StopDecision, l as allCriticalPassed, o as objectiveEval, r as runAgentControlLoop, s as stopOnNoProgress, m as stopOnRepeatedAction, n as subjectiveEval } from './control-runtime-Acf9CGhw.js';
|
|
3
|
+
import './feedback-trajectory-BxY0cKfs.js';
|
|
4
4
|
import './dataset-BbGkaN2I.js';
|
|
5
5
|
import './errors-CzMUYo7b.js';
|
|
6
|
-
import './emitter-
|
|
6
|
+
import './emitter-C2rqGH_l.js';
|
|
7
7
|
import './schema-m0gsnbt3.js';
|
|
8
|
-
import './store-
|
|
8
|
+
import './store-BcFXE6LG.js';
|
|
9
9
|
import './run-record-e7vj1uZQ.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { R as RunRecord, a as RunSplitTag } from './run-record-e7vj1uZQ.js';
|
|
2
2
|
import { S as Span } from './schema-m0gsnbt3.js';
|
|
3
|
-
import { T as TraceStore } from './store-
|
|
3
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Preference dataset extraction — bridge from `RunRecord[]` to RL training.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as TraceEmitter } from './emitter-
|
|
2
|
-
import { T as TraceStore } from './store-
|
|
3
|
-
import { T as Trajectory, a as TrajectoryStep } from './trajectory-
|
|
1
|
+
import { T as TraceEmitter } from './emitter-C2rqGH_l.js';
|
|
2
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
3
|
+
import { T as Trajectory, a as TrajectoryStep } from './trajectory-2TkpSEVh.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Counterfactual replay — "what would have happened if we'd changed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxAIService } from '@ax-llm/ax';
|
|
2
|
-
import { T as TraceAnalystKindSpec } from './kind-factory-
|
|
3
|
-
import { A as Analyst, a as AnalystContext, b as AnalystRunSummary, c as AnalystFinding, d as AnalystRunResult, C as ChatClient, e as AnalystRunInputs, f as AnalystRunEvent } from './types-
|
|
2
|
+
import { T as TraceAnalystKindSpec } from './kind-factory-0BhLSI27.js';
|
|
3
|
+
import { A as Analyst, a as AnalystContext, b as AnalystRunSummary, c as AnalystFinding, d as AnalystRunResult, C as ChatClient, e as AnalystRunInputs, f as AnalystRunEvent } from './types-Ce17tDlG.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* AnalystRegistry — orchestrate N analysts against one run.
|
package/dist/diagnose.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { C as CounterfactualMutation, a as attributeCounterfactuals, b as CounterfactualRunner } from './counterfactual-
|
|
2
|
-
export { c as CounterfactualContext, d as CounterfactualResult } from './counterfactual-
|
|
1
|
+
import { C as CounterfactualMutation, a as attributeCounterfactuals, b as CounterfactualRunner } from './counterfactual-DlOz8PBx.js';
|
|
2
|
+
export { c as CounterfactualContext, d as CounterfactualResult } from './counterfactual-DlOz8PBx.js';
|
|
3
3
|
import { S as Span } from './schema-m0gsnbt3.js';
|
|
4
|
-
import { T as TraceStore } from './store-
|
|
5
|
-
import { a as TrajectoryStep, T as Trajectory } from './trajectory-
|
|
6
|
-
import { h as AnalystSeverity, c as AnalystFinding } from './types-
|
|
7
|
-
import { C as CorpusRecord } from './corpus-
|
|
4
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
5
|
+
import { a as TrajectoryStep, T as Trajectory } from './trajectory-2TkpSEVh.js';
|
|
6
|
+
import { h as AnalystSeverity, c as AnalystFinding } from './types-Ce17tDlG.js';
|
|
7
|
+
import { C as CorpusRecord } from './corpus-B8A4BDR3.js';
|
|
8
8
|
import { R as RunRecord } from './run-record-e7vj1uZQ.js';
|
|
9
|
-
import './emitter-
|
|
9
|
+
import './emitter-C2rqGH_l.js';
|
|
10
10
|
import './store-C1YxJDEK.js';
|
|
11
|
-
import './types-
|
|
11
|
+
import './types-C7DGg5ex.js';
|
|
12
12
|
import '@tangle-network/tcloud';
|
|
13
|
-
import './llm-client-
|
|
13
|
+
import './llm-client-Bj7g0rqu.js';
|
|
14
14
|
import './errors-CzMUYo7b.js';
|
|
15
15
|
import './raw-provider-sink-C46HDghv.js';
|
|
16
16
|
|
package/dist/diagnose.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as RunOutcome, R as Run, S as Span, c as SpanKind, L as LlmSpan, T as ToolSpan, d as RetrievalSpan, J as JudgeSpan, e as SandboxSpan, E as EventKind, a as TraceEvent, B as BudgetLedgerEntry, A as Artifact, M as Message } from './schema-m0gsnbt3.js';
|
|
2
|
-
import { T as TraceStore } from './store-
|
|
2
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* TraceEmitter — hierarchical span builder that auto-parents using an
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { R as Run, S as Span, a as TraceEvent, F as FailureClass } from './schema-m0gsnbt3.js';
|
|
2
|
-
import { T as TraceStore } from './store-
|
|
2
|
+
import { T as TraceStore } from './store-BcFXE6LG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Failure taxonomy — canonical classes + a default classifier.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ControlEvalResult, a as ControlRunResult, b as ControlStep } from './control-runtime-
|
|
1
|
+
import { C as ControlEvalResult, a as ControlRunResult, b as ControlStep } from './control-runtime-Acf9CGhw.js';
|
|
2
2
|
import { D as DatasetSplit, a as DatasetScenario } from './dataset-BbGkaN2I.js';
|
|
3
3
|
|
|
4
4
|
type FeedbackArtifactType = 'text' | 'code' | 'plan' | 'research' | 'action' | 'ui' | 'decision' | 'data' | 'other';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as DatasetManifest } from '../dataset-BbGkaN2I.js';
|
|
2
2
|
import { a as CalibrationResult } from '../judge-calibration-0p2QcWNE.js';
|
|
3
3
|
import { b as OutcomeStore } from '../outcome-store-rnXLEqSn.js';
|
|
4
|
-
import { d as RedTeamReport } from '../red-team-
|
|
5
|
-
import { T as TraceStore } from '../store-
|
|
4
|
+
import { d as RedTeamReport } from '../red-team-BWdoyleI.js';
|
|
5
|
+
import { T as TraceStore } from '../store-BcFXE6LG.js';
|
|
6
6
|
import '../errors-CzMUYo7b.js';
|
|
7
7
|
import '../schema-m0gsnbt3.js';
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as Objective, P as ParetoResult } from './pareto-E-pembql.js';
|
|
2
|
-
import { R as RunScore, a as RunTrace, b as RunScoreWeights } from './run-critic-
|
|
2
|
+
import { R as RunScore, a as RunTrace, b as RunScoreWeights } from './run-critic-CmMf05uV.js';
|
|
3
3
|
|
|
4
4
|
interface SteeringRolePrompt {
|
|
5
5
|
system?: string;
|
package/dist/hosted/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { M as MutableSurface, c as GateDecision } from '../types-BU-7W85F.js';
|
|
2
|
-
import { I as InsightReport } from '../insight-report-
|
|
2
|
+
import { I as InsightReport } from '../insight-report-DWl3z9tl.js';
|
|
3
3
|
import '../run-record-e7vj1uZQ.js';
|
|
4
4
|
import '../errors-CzMUYo7b.js';
|
|
5
5
|
import '../schema-m0gsnbt3.js';
|
|
6
|
-
import '../summary-report-
|
|
7
|
-
import '../failure-cluster-
|
|
8
|
-
import '../store-
|
|
6
|
+
import '../summary-report-BDOFevaT.js';
|
|
7
|
+
import '../failure-cluster-DH9Flgcf.js';
|
|
8
|
+
import '../store-BcFXE6LG.js';
|
|
9
9
|
import '../judge-calibration-0p2QcWNE.js';
|
|
10
10
|
|
|
11
11
|
/**
|