refactor(workflow): stop assuming a human decides

An approval, ask or park can be resolved by an operator, a rule, a
classifier or automatically, so the vocabulary stops naming a person:

- step type human.approve -> workflow.approve
- park class needs_human -> needs_decision (ParkNeedsDecision)
- event kinds human_* -> operator_*
- alert kind task.needs_human -> task.needs_decision
- status grouping "needs you" -> "needs attention"

0061 rewrites the stored values, including the approval step type in the
workflow-definitions resource and each task's pinned definition, with the
digest recomputed so resumed tasks still match.
This commit is contained in:
sam committed 2026-10-25 17:31:16 +11:00
1 parent fc609171ca
commit f2b8681611
76 files changed
+373 -329

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ const LEAD = ["mission", "workflow", "message", "body", "plan", "then", "status"
const longText = /mission|body|detail|plan|rules/;
function kindOf(key: string, schema: SettingsSchema): Kind {
if ((["workflow.call", "workflow.handoff"].includes(type.value) && key === "workflow") || (type.value === "human.approve" && key === "then")) return "workflow";
if ((["workflow.call", "workflow.handoff"].includes(type.value) && key === "workflow") || (type.value === "workflow.approve" && key === "then")) return "workflow";
if (type.value === "agent.run" && key === "model") return "select";
if (schema.type === "string") return schema.enum ? "select" : longText.test(key) ? "text" : "line";
if (schema.type === "boolean") return "boolean";
+1 -3
View File
@@ -1,4 +1,4 @@
import { Bot, FileSearch, GitBranch, MessageSquare, ShieldCheck, Split, Terminal, UserCheck, Workflow } from "@lucide/vue";
import { Bot, FileSearch, GitBranch, MessageSquare, ShieldCheck, Split, Terminal, Workflow } from "@lucide/vue";
import type { Component } from "vue";
const GROUP_ICONS: Record<string, Component> = {
@@ -7,7 +7,6 @@ const GROUP_ICONS: Record<string, Component> = {
repo: GitBranch,
gate: ShieldCheck,
forge: MessageSquare,
human: UserCheck,
review: FileSearch,
workflow: Workflow,
};
@@ -18,7 +17,6 @@ const GROUP_TITLES: Record<string, string> = {
repo: "Repository",
gate: "Checks",
forge: "Issues and PRs",
human: "People",
review: "Review",
workflow: "Flow",
};
+2 -2
View File
@@ -158,7 +158,7 @@ const TYPE_TITLES: Record<string, string> = {
"gate.diff-rules": "Diff rules",
"forge.comment": "Comment",
"forge.close-issue": "Close issue",
"human.approve": "Human approval",
"workflow.approve": "Approval",
"workflow.call": "Call workflow",
"workflow.handoff": "Hand off",
"workflow.finish": "Finish",
@@ -196,7 +196,7 @@ function stepDetail(type: string, settings: Mapping): string {
return pick("workflow");
case "workflow.finish":
return pick("status") || "completed";
case "human.approve":
case "workflow.approve":
return pick("then") ? `then ${pick("then")}` : "";
case "gate.repository":
return pick("expect") === "test-failure" ? "tests must fail" : settings.repair ? "repair if red" : "";
+1 -1
View File
@@ -86,7 +86,7 @@ function startsVia(value: unknown, target: string): string {
case "workflow.handoff":
if (settings.workflow === target || resultChoices(all, settings.workflow).includes(target)) return "hands off to it";
break;
case "human.approve":
case "workflow.approve":
if (settings.then === target) return "runs it once approved";
break;
}