Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8518,8 +8518,9 @@ sim workflows run <workflowId> [options]
| `--manual` | No | Run the current saved workflow state instead of the active deployment. |
| `--deployment-version <n>` | No | Run this deployed version instead of the active one (a version number from `sim workflows versions list`); a Workflow block in it still runs its child workflow's active deployment. Needs workspace write access, through a full-access API key or an OAuth token with api:write. Not with --manual or any flag that runs the draft. |
| `--dry` | No | Dry run of the saved draft (implies --manual): writes are not sent but answered with placeholders and listed with their request payloads in sideEffects; reads, model calls and code run for real. Logged as a test run. Not with --follow, --async or --wait-timeout. |
| `--allow <block>` | No | Send this block's writes for real during a --dry run (its id, display name or key); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
| `--mock <block>=<json\|@file>` | No | Answer this block with the given JSON object instead of running it during a --dry run (its id, display name or key), to steer a branch or give a stubbed write a realistic result. Not a locked block; data only, so no cost, tokens, model or other field the run’s trace or billing reads, and no field starting with _. The run records only which blocks were mocked, so a rerun passes it again (its log shows the output like any other block’s); repeatable. |
| `--allow <block>` | No | Send this block's writes for real during a --dry run (its id, display name or key, or &lt;workflow&gt;.&lt;block&gt; for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
| `--mock <block>=<json\|@file>` | No | Answer this block with the given JSON object instead of running it during a --dry run (its id, display name or key, or &lt;workflow&gt;.&lt;block&gt; for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock &lt;block&gt; takes its output from --mock-from. Not a locked block, or one of a locked workflow or folder; data only, so no cost, tokens, model or other field the run’s trace or billing reads, and no field starting with _. The run records only which blocks were mocked, not the outputs (its log shows each like any other block’s output), so a rerun reads them again with --mock-from; repeatable. |
| `--mock-from <runId>` | No | Answer each block a bare --mock &lt;block&gt; names (this workflow's blocks only) with the output it recorded in this earlier run of the workflow, redacted as the run shows it; fields only a block sets, such as cost or model, are left out (requires --dry). |
| `--trigger <blockId>` | No | Enter the run through this runnable trigger, by its block id; runs the current saved workflow state (implies --manual). |
| `--mock-payload` | No | Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual). |
| `--from-block <block>` | No | Rerun the saved draft from this block (its id, display name or key), reusing the outputs --source-run produced before it; a failed run prints this command as next. |
Expand All @@ -8535,11 +8536,11 @@ sim workflows run <workflowId> [options]

Without --manual (or a flag that implies it) this runs the active deployment; a workflow never deployed has none. --deployment-version &lt;n&gt; runs that deployed version instead, as a pin for comparing or reproducing (it needs workspace write access, through a full-access API key or an OAuth token with api:write); the child workflows it calls still run their own active deployment. --manual runs the saved draft, as the source loop leaves it.

--dry runs the saved draft without its side effects: every tool call not declared read (sends, table writes, HTTP calls other than GET/HEAD/OPTIONS, custom and MCP tools) returns a placeholder and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. Code (a Function block's, a Condition's expressions, a While or Do While loop's condition, or code an Agent's model writes) runs: its GET/HEAD/OPTIONS fetches are sent (an API that writes on a GET is not stubbed), and any other fetch, or one with a method-override header, gets an empty 200 and is listed in sideEffects.stubbed. Code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked, since its network cannot be seen. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. Agents read memory but write none, and the run raises no workspace event. --allow &lt;block&gt; sends that block's writes (a Function's fetches included) for real (use a test resource); allowing an Agent sends only its own tool calls, not a workflow or custom block it calls. --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; a locked block cannot be mocked, and a mock is data, so it cannot set a field the run's execution, trace or billing reads (such as cost, tokens, model or a field starting with _). A dry run is the --source-run only of another dry run, and is never resumed.
--dry runs the saved draft without its side effects: every tool call not declared read (sends, table writes, HTTP calls other than GET/HEAD/OPTIONS, custom and MCP tools) returns a placeholder and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. Code (a Function block's, a Condition's expressions, a While or Do While loop's condition, or code an Agent's model writes) runs: its GET/HEAD/OPTIONS fetches are sent (an API that writes on a GET is not stubbed), and any other fetch, or one with a method-override header, gets an empty 200 and is listed in sideEffects.stubbed. Code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked, since its network cannot be seen. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. Agents read memory but write none, and the run raises no workspace event. --allow &lt;block&gt; sends that block's writes (a Function's fetches included) for real (use a test resource); allowing an Agent sends only its own tool calls, not a workflow or custom block it calls. --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; a locked block, or one of a locked workflow or folder, cannot be mocked, and a mock is data, so it cannot set a field the run's execution, trace or billing reads (such as cost, tokens, model or a field starting with _). --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers that block with the output it recorded in that run of this workflow (not a block a test run answered with a placeholder); fields only a block sets, such as cost or model, are left out and noted. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt; (the workflow's id or name); the entry applies wherever that workflow runs, at every depth. Blocks for --from-block, --stop-after and a bare --mock with --mock-from are this workflow's only. Blocks never reached, and mock fields a block does not declare, are noted. A dry run is the --source-run only of another dry run, and is never resumed.

The result is the run: runId, status (completed, failed, paused or cancelled), error, output (the workflow's final output) and blockOutputs (what --select-output named). It has no success field: branch on status, or on the exit code. With --follow it is the stream's final frame instead: success and output.

A run that failed in a block has next: the command that reruns the saved draft from that block (or from the outermost loop or parallel holding it) with this run as --source-run, so after a fix only that block and those after it run again; a dry run's keeps --dry and --allow. The run records only which blocks were mocked, so pass each --mock again; its log shows a mocked block's output like any other. Add --stop-after &lt;block&gt; to stop after a block; naming the block next starts from reruns only it.
A run that failed in a block has next: the command that reruns the saved draft from that block (or from the outermost loop or parallel holding it) with this run as --source-run, so after a fix only that block and those after it run again; a dry run's keeps --dry and --allow, and reads its mocks again with --mock-from (this run, for mocks you passed). A mock of a child's block, or one passed beside --mock-from, comes back as --mock &lt;block&gt;=&lt;json&gt;: replace &lt;json&gt; with the output. Add --stop-after &lt;block&gt; to stop after a block; naming the block next starts from reruns only it.

Exit codes: 0 completed or paused (--async: queued); 1 failed or cancelled (the result is printed first, then the error on stderr), or the command failed; 4 still running when --wait-timeout elapsed.

Expand Down
9 changes: 5 additions & 4 deletions apps/docs/content/docs/cli/workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,9 @@ sim workflows run <workflowId> [options]
| `--manual` | No | Run the current saved workflow state instead of the active deployment. |
| `--deployment-version <n>` | No | Run this deployed version instead of the active one (a version number from `sim workflows versions list`); a Workflow block in it still runs its child workflow's active deployment. Needs workspace write access, through a full-access API key or an OAuth token with api:write. Not with --manual or any flag that runs the draft. |
| `--dry` | No | Dry run of the saved draft (implies --manual): writes are not sent but answered with placeholders and listed with their request payloads in sideEffects; reads, model calls and code run for real. Logged as a test run. Not with --follow, --async or --wait-timeout. |
| `--allow <block>` | No | Send this block's writes for real during a --dry run (its id, display name or key); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
| `--mock <block>=<json\|@file>` | No | Answer this block with the given JSON object instead of running it during a --dry run (its id, display name or key), to steer a branch or give a stubbed write a realistic result. Not a locked block; data only, so no cost, tokens, model or other field the run’s trace or billing reads, and no field starting with _. The run records only which blocks were mocked, so a rerun passes it again (its log shows the output like any other block’s); repeatable. |
| `--allow <block>` | No | Send this block's writes for real during a --dry run (its id, display name or key, or &lt;workflow&gt;.&lt;block&gt; for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
| `--mock <block>=<json\|@file>` | No | Answer this block with the given JSON object instead of running it during a --dry run (its id, display name or key, or &lt;workflow&gt;.&lt;block&gt; for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock &lt;block&gt; takes its output from --mock-from. Not a locked block, or one of a locked workflow or folder; data only, so no cost, tokens, model or other field the run’s trace or billing reads, and no field starting with _. The run records only which blocks were mocked, not the outputs (its log shows each like any other block’s output), so a rerun reads them again with --mock-from; repeatable. |
| `--mock-from <runId>` | No | Answer each block a bare --mock &lt;block&gt; names (this workflow's blocks only) with the output it recorded in this earlier run of the workflow, redacted as the run shows it; fields only a block sets, such as cost or model, are left out (requires --dry). |
| `--trigger <blockId>` | No | Enter the run through this runnable trigger, by its block id; runs the current saved workflow state (implies --manual). |
| `--mock-payload` | No | Use the selected trigger's server-derived mock payload; runs the current saved workflow state (implies --manual). |
| `--from-block <block>` | No | Rerun the saved draft from this block (its id, display name or key), reusing the outputs --source-run produced before it; a failed run prints this command as next. |
Expand All @@ -852,11 +853,11 @@ sim workflows run <workflowId> [options]

Without --manual (or a flag that implies it) this runs the active deployment; a workflow never deployed has none. --deployment-version &lt;n&gt; runs that deployed version instead, as a pin for comparing or reproducing (it needs workspace write access, through a full-access API key or an OAuth token with api:write); the child workflows it calls still run their own active deployment. --manual runs the saved draft, as the source loop leaves it.

--dry runs the saved draft without its side effects: every tool call not declared read (sends, table writes, HTTP calls other than GET/HEAD/OPTIONS, custom and MCP tools) returns a placeholder and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. Code (a Function block's, a Condition's expressions, a While or Do While loop's condition, or code an Agent's model writes) runs: its GET/HEAD/OPTIONS fetches are sent (an API that writes on a GET is not stubbed), and any other fetch, or one with a method-override header, gets an empty 200 and is listed in sideEffects.stubbed. Code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked, since its network cannot be seen. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. Agents read memory but write none, and the run raises no workspace event. --allow &lt;block&gt; sends that block's writes (a Function's fetches included) for real (use a test resource); allowing an Agent sends only its own tool calls, not a workflow or custom block it calls. --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; a locked block cannot be mocked, and a mock is data, so it cannot set a field the run's execution, trace or billing reads (such as cost, tokens, model or a field starting with _). A dry run is the --source-run only of another dry run, and is never resumed.
--dry runs the saved draft without its side effects: every tool call not declared read (sends, table writes, HTTP calls other than GET/HEAD/OPTIONS, custom and MCP tools) returns a placeholder and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. Code (a Function block's, a Condition's expressions, a While or Do While loop's condition, or code an Agent's model writes) runs: its GET/HEAD/OPTIONS fetches are sent (an API that writes on a GET is not stubbed), and any other fetch, or one with a method-override header, gets an empty 200 and is listed in sideEffects.stubbed. Code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked, since its network cannot be seen. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. Agents read memory but write none, and the run raises no workspace event. --allow &lt;block&gt; sends that block's writes (a Function's fetches included) for real (use a test resource); allowing an Agent sends only its own tool calls, not a workflow or custom block it calls. --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; a locked block, or one of a locked workflow or folder, cannot be mocked, and a mock is data, so it cannot set a field the run's execution, trace or billing reads (such as cost, tokens, model or a field starting with _). --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers that block with the output it recorded in that run of this workflow (not a block a test run answered with a placeholder); fields only a block sets, such as cost or model, are left out and noted. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt; (the workflow's id or name); the entry applies wherever that workflow runs, at every depth. Blocks for --from-block, --stop-after and a bare --mock with --mock-from are this workflow's only. Blocks never reached, and mock fields a block does not declare, are noted. A dry run is the --source-run only of another dry run, and is never resumed.

The result is the run: runId, status (completed, failed, paused or cancelled), error, output (the workflow's final output) and blockOutputs (what --select-output named). It has no success field: branch on status, or on the exit code. With --follow it is the stream's final frame instead: success and output.

A run that failed in a block has next: the command that reruns the saved draft from that block (or from the outermost loop or parallel holding it) with this run as --source-run, so after a fix only that block and those after it run again; a dry run's keeps --dry and --allow. The run records only which blocks were mocked, so pass each --mock again; its log shows a mocked block's output like any other. Add --stop-after &lt;block&gt; to stop after a block; naming the block next starts from reruns only it.
A run that failed in a block has next: the command that reruns the saved draft from that block (or from the outermost loop or parallel holding it) with this run as --source-run, so after a fix only that block and those after it run again; a dry run's keeps --dry and --allow, and reads its mocks again with --mock-from (this run, for mocks you passed). A mock of a child's block, or one passed beside --mock-from, comes back as --mock &lt;block&gt;=&lt;json&gt;: replace &lt;json&gt; with the output. Add --stop-after &lt;block&gt; to stop after a block; naming the block next starts from reruns only it.

Exit codes: 0 completed or paused (--async: queued); 1 failed or cancelled (the result is printed first, then the error on stderr), or the command failed; 4 still running when --wait-timeout elapsed.

Expand Down
Loading
Loading