You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(spec): FlowSchema terminal messages are every-terminal-run, not screen-flow-only (#9512) (#9548)
Since #9414, AutomationResult.successMessage/errorMessage are carried on
EVERY terminal flow run — execute()'s exit, both retryExecution() exits, and
the resume exit — not only screen-flow runs. Rewrite the JSDoc and
describe() text above FlowSchema.successMessage/errorMessage to say so
explicitly and to kill the screen-flow-only reading, which was the premise
of a route considered and rejected at #9414's triage (narrowing the contract
to screen-flow-only). Regenerate the two mirrored reference pages.
Text-only: authorable-surface.base.json is unchanged (re-verified via
check:generated, not inherited from the filer's claim).
Claude-Session: https://claude.ai/code/session_01Fs18A2DdXLVN2h8PaaFBcP
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/references/api/automation-api.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,8 +88,8 @@ const result = AutomationApiErrorCode.parse(data);
88
88
|**name**|`string`| ✅ | Machine name |
89
89
|**label**|`string`| ✅ | Flow label |
90
90
|**description**|`string`| optional ||
91
-
|**successMessage**|`string`| optional |Toast shown when a screen flow completes (defaults to a generic "Done"). |
92
-
|**errorMessage**|`string`| optional |Toast shown when a screen flow fails (defaults to the raw error). |
91
+
|**successMessage**|`string`| optional |Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of a generic "Done". |
92
+
|**errorMessage**|`string`| optional |Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of the raw error. |
93
93
|**version**|`integer`| optional (default: `1`) | Version number |
|**template**|`never`| optional |[REMOVED]`flow.template` was removed in @objectstack/spec 17.0.0 (#3896 audit close-out) — no designer or engine path ever read it, so flagging a flow as a template/subflow did nothing. Delete the key. Shared logic is invoked via a subflow NODE referencing the flow by name. Run `os migrate meta --from 16` to rewrite existing sources automatically. |
Copy file name to clipboardExpand all lines: content/docs/references/automation/flow.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,8 @@ const result = FlowSchema.parse(data);
42
42
|**name**|`string`| ✅ | Machine name |
43
43
|**label**|`string`| ✅ | Flow label |
44
44
|**description**|`string`| optional ||
45
-
|**successMessage**|`string`| optional |Toast shown when a screen flow completes (defaults to a generic "Done"). |
46
-
|**errorMessage**|`string`| optional |Toast shown when a screen flow fails (defaults to the raw error). |
45
+
|**successMessage**|`string`| optional |Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of a generic "Done". |
46
+
|**errorMessage**|`string`| optional |Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of the raw error. |
47
47
|**version**|`integer`| optional (default: `1`) | Version number |
|**template**|`never`| optional |[REMOVED]`flow.template` was removed in @objectstack/spec 17.0.0 (#3896 audit close-out) — no designer or engine path ever read it, so flagging a flow as a template/subflow did nothing. Delete the key. Shared logic is invoked via a subflow NODE referencing the flow by name. Run `os migrate meta --from 16` to rewrite existing sources automatically. |
* Terminal messages for `screen`-flow runs. When the run reaches a terminal
620
-
* state, the UI flow-runner shows `successMessage` instead of a generic
621
-
* "Done" toast, and `errorMessage` instead of the raw error. Both are
622
-
* surfaced on the terminal {@link AutomationResult} (`successMessage` /
623
-
* `errorMessage`). Plain strings; `{var}` is NOT interpolated here.
619
+
* Terminal messages for the flow. Since #9414, carried on EVERY terminal
620
+
* run — `execute()`'s exit, both `retryExecution()` exits, and the resume
621
+
* exit — not only on `screen`-flow runs. The pair is set on the terminal
622
+
* {@link AutomationResult} (`successMessage` on success, `errorMessage` on
623
+
* failure) returned by any trigger route (e.g.
624
+
* `POST /api/v1/automation/:name/trigger`), whether or not a UI is
625
+
* listening; a `screen`-flow run additionally has the UI flow-runner show
626
+
* `successMessage` as a toast instead of a generic "Done", and
627
+
* `errorMessage` instead of the raw error. Reading this pair as
628
+
* screen-flow-only was the alternative considered and rejected at #9414's
629
+
* triage — narrowing the text would delete a declared, documented,
630
+
* console-consumed capability to make a bug disappear — so treat the
631
+
* screen-flow toast as one consumer, not the whole contract. Plain
632
+
* strings; `{var}` is NOT interpolated here.
624
633
*/
625
-
successMessage: z.string().optional().describe('Toast shown when a screen flow completes (defaults to a generic "Done").'),
626
-
errorMessage: z.string().optional().describe('Toast shown when a screen flow fails (defaults to the raw error).'),
634
+
successMessage: z.string().optional().describe('Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of a generic "Done".'),
635
+
errorMessage: z.string().optional().describe('Message carried on AutomationResult for every terminal run (not only screen flows); the screen-flow UI shows it as a toast instead of the raw error.'),
0 commit comments