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
+14
View File
@@ -388,6 +388,7 @@ async function openRunDialog(pipeline) {
prompt: "",
workspace: String(state.workspace ?? "").startsWith("/") ? state.workspace : "",
notifyMode: "auto",
outputFormat: "",
directories: [],
loading: true,
sending: false,
@@ -445,6 +446,7 @@ async function startRun() {
prompt,
workspace: start.workspace,
notifyMode: start.notifyMode,
outputFormat: start.outputFormat,
title: "",
});
}
@@ -545,6 +547,18 @@ function renderRunStartDialog() {
notifyField.append(notify);
panel.append(notifyField);
const outputField = h("label", { class: "run-start-field", for: "runOutputFormat" });
outputField.append(h("span", { class: "run-start-label", text: "Report format" }));
const outputFormat = h("select", { id: "runOutputFormat", onchange: (event) => { start.outputFormat = event.target.value; } });
for (const [value, label] of [["", "No report requirement"], ["html", "HTML report"], ["markdown", "Markdown report"]]) {
const option = h("option", { value, text: label });
option.selected = start.outputFormat === value;
outputFormat.append(option);
}
outputField.append(outputFormat);
outputField.append(h("span", { class: "run-start-helper muted", text: "Requires a nonempty server-written report before success. Structure only; facts are not verified." }));
panel.append(outputField);
if (start.loading) panel.append(h("div", { class: "run-start-helper muted", text: "Loading directories…" }));
if (start.error) panel.append(h("div", { class: "run-start-error", role: "alert", text: start.error }));