fix(gate): buildArtifactGate emits approve/reject options so the gate renders a forward button

This commit is contained in:
2026-07-02 18:27:11 +02:00
parent 541df01684
commit 2633b46199
2 changed files with 34 additions and 0 deletions
+9
View File
@@ -112,6 +112,14 @@ function buildArtifactGate({ id, phase, title, artifact, action }) {
`builders: artifact-gate action.kind must be one of ${[...VALID_ACTION_KINDS].join(", ")}`,
);
}
const ACTION_OPTIONS = {
approve_reject: [
{ id: "approve", label: "Conferma e prosegui", recommended: true },
{ id: "reject", label: "Rifiuta" },
],
confirm: [{ id: "approve", label: "Conferma e prosegui", recommended: true }],
view_only: [],
};
return {
type: "ui_request",
id,
@@ -121,6 +129,7 @@ function buildArtifactGate({ id, phase, title, artifact, action }) {
title,
artifact,
action,
options: ACTION_OPTIONS[action.kind],
reserved: RESERVED,
};
}