U7: full mode × surface × own-settings matrix ledger with 5 gap-filling tests, default-workflow zero-binding parity assertions, changeset covering the complete feature, and a workflow-steps.md authoring section for column agents.
3.1 KiB
@runfusion/fusion
| @runfusion/fusion |
|---|
| minor |
Add per-column agent assignment for workflow columns, behind the combined experimentalFeatures.workflowColumns + experimentalFeatures.workflowGraphExecutor flags.
A workflow column can now name a permanent agent from the registry plus a mode — defer (the column agent is the default for work in that column that carries no agent/model settings of its own) or override (the column agent supersedes node- and task-level agent/model settings). The binding applies to all session-running work attributable to the column's nodes: custom prompt/gate/script nodes, the execute seam's coding session, and step-execute sessions. Precedence is resolved by one shared @fusion/core resolver (resolveColumnAgentBinding + resolveEffectiveAgent) consumed by every reader, with defer/override expressed as explicit named rules and defer granularity all-or-nothing (an own agent identity OR a complete modelProvider+modelId pair suppresses the column agent). The binding keys off the node's declared IR column; foreach template nodes inherit the enclosing foreach node's column. A missing/deleted agent at resolution time logs and falls back to normal resolution — a live session is never aborted. The built-in default workflow carries no column agents and stays byte-identical (parity oracle); with either flag off, column agents are inert.
The effective column agent is also the principal for the subsystems that previously assumed the running agent is always task.assignedAgentId: action gating (buildActionGateContext / buildPermanentAgentGatingContext) is computed for the agent actually running; heartbeat serialization honors it in both directions (the execute deferral gate, a second resumeTaskForAgent pass that re-dispatches tasks whose effective column agent matches, and a reverse-direction heartbeat-scheduler guard so an allowParallelExecution=false column agent never heartbeats concurrently with its own session); and a workflow-definition edit or agent runtimeConfig change that re-keys the column-effective agent/model hot-swaps the running graph session, while an agent deleted mid-session falls back without a restart.
Authoring lands in the workflow editor: the column panel gains a registry-backed per-column agent picker plus a defer/override mode toggle, bound columns are badged on their headers, and a node inside an override column shows that its own executor settings are superseded (so override never reads as a bug). Picker interaction states are explicit — flags off disables the picker with a tooltip naming both required flags, an in-flight fetch disables it, a failed fetch shows an inline error, and a stored agentId missing from the registry renders an "Agent not found" warning that preserves the IR until the author clears or replaces it. Agent references are validated at save time: the POST/PATCH workflow routes reject an unknown agentId with a typed 4xx naming the offending column, and binding an agent whose permission policy is broader than the project default requires an explicit confirmPolicyEscalation flag so override cannot silently re-key action gates to a more-privileged agent.