fix(ui): a new canvas workflow names the agent it runs as (#1622)
deploy / gate (push) Successful in 4m52s
Quality / check (push) Successful in 6m53s
deploy / archied-image (push) Successful in 3m21s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped

This commit is contained in:
sam committed 2026-11-08 05:49:40 +11:00
1 parent cf1be16763
commit ef84e18f46
4 files changed
+14 -8

No files matched your search

+4
View File
@@ -9,6 +9,10 @@ release's per-component sections are labelled beneath its heading.
- An image or voice attachment that arrives as a link is now checked against what the link serves, the same as an uploaded one. A link whose content is not the declared type, or that cannot be read, is refused.
### archie-ui
- A workflow created on the canvas now saves the agent it runs as, so it runs instead of parking with "declares no identity to run as".
### archie-state-store
- A workflow that no longer validates after an upgrade (for example it names a step type that was removed) is repaired at startup instead of breaking every workflow. A shipped workflow is restored from this release's copy; a workflow you created is removed and logged, and its earlier revision stays in the resource history. Valid workflows you created or edited are kept.
+2 -2
View File
@@ -35,7 +35,7 @@ import WorkflowCanvas from "./WorkflowCanvas.vue";
import WorkflowHistory from "./WorkflowHistory.vue";
import { useWorkflowHistory } from "./workflow-history";
import { revisionOfRun, type WorkflowRevision } from "./workflow-revisions";
import { deleteStep, duplicateStep, insertStep, moveStep, normalizeStepIDs, replaceStep, revertWorkflowChange, stepAt, workflowChanges, workflowField, type StepPath } from "./workflow-edit";
import { deleteStep, duplicateStep, insertStep, moveStep, normalizeStepIDs, replaceStep, revertWorkflowChange, SEEDED_AGENT_ID, stepAt, workflowChanges, workflowField, type StepPath } from "./workflow-edit";
import ChangeList from "@/components/ChangeList.vue";
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog";
import { useWorkflowRuns } from "./workflow-runs";
@@ -168,7 +168,7 @@ function load(value: string): void {
(candidate) => candidate.id === value,
);
id.value = entry?.id ?? value;
loadedYaml.value = workflows.drafts.find((draft) => draft.id === value)?.yaml ?? entry?.yaml ?? `id: ${value}\nsteps: []\n`;
loadedYaml.value = workflows.drafts.find((draft) => draft.id === value)?.yaml ?? entry?.yaml ?? `id: ${value}\nidentity: ${SEEDED_AGENT_ID}\nsteps: []\n`;
yaml.value = normalizeStepIDs(loadedYaml.value);
open.value = null;
localError.value = "";
+4 -6
View File
@@ -14,7 +14,7 @@ import { useOrgStore } from "@/stores/org";
import { useSettingsStore } from "@/stores/settings";
import OptionSelect from "./OptionSelect.vue";
import SpecList from "./SpecList.vue";
import { setWorkflowField, workflowField } from "./workflow-edit";
import { SEEDED_AGENT_ID, setWorkflowField, workflowField } from "./workflow-edit";
const props = defineProps<{ yaml: string }>();
const emit = defineEmits<{ "update:yaml": [string] }>();
@@ -27,10 +27,8 @@ function set(key: string, value: unknown): void {
emit("update:yaml", setWorkflowField(props.yaml, key, value));
}
// The identity a run acts as must be an agent, never a person; a workflow
// naming none is refused when it runs, so it defaults to the agent identity
// every install seeds (identity.AgentID).
const SEEDED_AGENT_ID = "6f129e29-0e26-5246-99bd-74cb4496203b";
// The identity a run acts as must be an agent, never a person.
const seededAgentId: string = SEEDED_AGENT_ID;
const identities = useOrgStore();
const agents = ref<Identity[]>([]);
const identitiesLoading = ref(true);
@@ -85,7 +83,7 @@ const needs = computed<{ captures?: boolean; gate_retries?: number }>(() => {
<span class="flex-1 text-label">Runs as</span>
<OptionSelect
:key="String(identitiesLoading)"
:model-value="text('identity') || (agents.some((agent) => agent.id === SEEDED_AGENT_ID) ? SEEDED_AGENT_ID : '')"
:model-value="text('identity') || (agents.some((agent) => agent.id === seededAgentId) ? seededAgentId : '')"
:options="identityOptions"
aria-label="Execution identity"
:placeholder="identitiesLoading ? 'Loading agents…' : 'Choose an agent'"
+4
View File
@@ -278,3 +278,7 @@ export function revertWorkflowChange(source: string, change: Change): string {
}
return document.toString();
}
// The agent identity every install seeds (identity.AgentID). A workflow naming
// no identity is refused when it runs, so a new one is created naming it.
export const SEEDED_AGENT_ID = "6f129e29-0e26-5246-99bd-74cb4496203b";