Enforce runtime report contracts and recoverable session exports

This commit is contained in:
2026-10-20 16:02:38 +01:00
parent 1d9cb80cdb
commit fdf0369ede
36 changed files with 1636 additions and 177 deletions
+11
View File
@@ -60,6 +60,17 @@ function lastFrame(ws) {
return frame;
}
test("runPipeline sends an explicit output_format and leaves legacy launches unchanged", async () => {
const { repo, ws } = connected();
ws.reply = (frame) => ({ id: frame.id, type: "run_started", run_detail: { id: 1 } });
for (const outputFormat of ["", "html", "markdown"]) {
await repo.runPipeline({ pipelineId: 2, version: 1, prompt: "report", workspace: "/scratch", outputFormat });
const frame = lastFrame(ws);
assert.equal(frame.output_format, outputFormat || undefined);
assert.deepEqual(frame.input, { prompt: "report" });
}
});
test("listTemplates sends exactly {type:'list_templates'} and returns the catalogue", async () => {
const { repo, ws } = connected();
ws.reply = (frame) => ({