Skip to content
Merged
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
12 changes: 6 additions & 6 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8518,7 +8518,7 @@ sim workflows run <workflowId> [options]
| `--draft` | No | Run the saved draft instead of the active deployment, sending its writes. |
| `--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 --draft or any flag that runs the draft. |
| `--dry` | No | Dry run of the saved draft (implies --draft): 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, 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. |
| `--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 (the API reference lists the fields a mock cannot set). The run records only which blocks were mocked, not the outputs, so a rerun reads them again with --mock-from; repeatable. |
| `--mock-from <runId>` | No | Answer each block a bare --mock &lt;block&gt; names with the output it recorded in this earlier run of the workflow, redacted as the run shows it: this workflow's blocks (not a child's; not inside a loop or parallel unless that run mocked it); fields a mock cannot set, such as cost or model, are left out. |
| `--trigger <blockId>` | No | Enter the run through this runnable trigger, by its block id; runs the saved draft (implies --draft). |
Expand All @@ -8536,7 +8536,7 @@ sim workflows run <workflowId> [options]

Without --draft (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 (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. --draft runs the saved draft, as the source loop leaves it, sending its writes.

--dry runs the saved draft without its writes: each call that could change something (a write tool, any MCP call, an HTTP request other than GET/HEAD/OPTIONS, code's other fetches) gets a placeholder (ids like dry_run_row_1, numbers above 900000000) and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. A read that would send a placeholder is held back too (reason placeholder), and an MCP call its server calls read-only says so (reason mcp-read-only). Reads, model calls and code run for real; code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. --allow &lt;block&gt; sends that block's writes for real (use a test resource). --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt;. --allow, --mock and --mock-from imply --dry; --draft sends every write, so it refuses them. Overrides the run never reached are listed in sideEffects.unreached, and mock fields a block never gets in sideEffects.mockFields. The API reference describes each list and refusal.
--dry runs the saved draft without its writes: each call that could change something (a write tool, any MCP call, an HTTP request other than GET/HEAD/OPTIONS, code's other fetches) gets a placeholder (ids like dry_run_row_1, numbers above 900000000) and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. A read that would send a placeholder is held back too (reason placeholder), and an MCP call its server calls read-only says so (reason mcp-read-only). Reads, model calls and code run for real; code in a remote sandbox (shell, Python, imports) runs for real too, its network requests included, and is listed in sideEffects.unchecked. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. --allow &lt;block&gt; sends that block's writes for real (use a test resource). --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt;. --allow, --mock and --mock-from imply --dry; --draft sends every write, so it refuses them. Overrides the run never reached are listed in sideEffects.unreached, and mock fields a block never gets in sideEffects.mockFields. The API reference describes each list and refusal.

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.

Expand Down Expand Up @@ -8675,7 +8675,7 @@ sim workflows source apply [workflowId] [options]
| `--dir <dir>` | No | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. Defaults to `.`. |
| `--dry` | No | Check the source and show the outcome without saving or writing files. |
| `-y, --yes` | No | Apply without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--allow-delete` | No | Delete blocks and variables the source no longer declares; without it, an apply that deletes one is refused. |

Expand Down Expand Up @@ -8706,7 +8706,7 @@ sim workflows source create [options]
| `--name <name>` | No | The workflow name (default: the source's). |
| `--folder <path>` | No | The folder to create it in (default: the root). |
| `-y, --yes` | No | Create without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |

</CommandTable>
Expand Down Expand Up @@ -8841,7 +8841,7 @@ Exit codes: 0 printed; 1 no builder or namespace of that name (the closest one i

### sim workflows source find

Print a block's code, edges and readers with line numbers (offline)
Print a block's declaration, edges and readers with line numbers (offline)

```bash
sim workflows source find <block> [options]
Expand Down Expand Up @@ -10125,7 +10125,7 @@ sim workspaces source apply [options]
| `--delete-target-only` | No | With --to and --allow-delete, also delete the target's resources this directory never declared and no promotion from it left there (prod-only tables and their rows, skills made in prod). Without it a promotion keeps them, naming each with a warning. |
| `--only <kinds>` | No | Apply only these kinds (comma-separated folders: secrets.ts, credentials.ts, tools, skills, mcp, tables, knowledge, files, workflows, deployments). |
| `--to <workspaceId>` | No | Promote the directory to another workspace (dev to prod): its resources bind by key to that workspace's own and are updated in place. Only .sim/targets/&lt;workspaceId&gt;.json changes, the record the next promotion compares with: a resource changed there since is kept, or refused as stale (exit 5) when the directory changed it too. |
| `--run <key=input>` | No | After the apply, dry-run workflows/&lt;key&gt;/'s saved draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it; `--run <key>` alone: no input). Repeat it to test more workflows. deployments/ is applied only after every run completed, and only when every draft it publishes was test-run; a run that does not complete exits 1 and leaves the applied drafts in place. |
| `--run <key=input>` | No | After the apply, dry-run workflows/&lt;key&gt;/'s saved draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it; `--run <key>` alone: no input). Repeat it to test more workflows. deployments/ is applied only after every run completed, and only when every draft it publishes was test-run; a run that does not complete exits 1 and leaves the applied drafts in place. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in runs[].sideEffects.unchecked. |

</CommandTable>

Expand Down
10 changes: 5 additions & 5 deletions apps/docs/content/docs/cli/workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ sim workflows run <workflowId> [options]
| `--draft` | No | Run the saved draft instead of the active deployment, sending its writes. |
| `--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 --draft or any flag that runs the draft. |
| `--dry` | No | Dry run of the saved draft (implies --draft): 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, 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. |
| `--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 (the API reference lists the fields a mock cannot set). The run records only which blocks were mocked, not the outputs, so a rerun reads them again with --mock-from; repeatable. |
| `--mock-from <runId>` | No | Answer each block a bare --mock &lt;block&gt; names with the output it recorded in this earlier run of the workflow, redacted as the run shows it: this workflow's blocks (not a child's; not inside a loop or parallel unless that run mocked it); fields a mock cannot set, such as cost or model, are left out. |
| `--trigger <blockId>` | No | Enter the run through this runnable trigger, by its block id; runs the saved draft (implies --draft). |
Expand All @@ -853,7 +853,7 @@ sim workflows run <workflowId> [options]

Without --draft (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 (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. --draft runs the saved draft, as the source loop leaves it, sending its writes.

--dry runs the saved draft without its writes: each call that could change something (a write tool, any MCP call, an HTTP request other than GET/HEAD/OPTIONS, code's other fetches) gets a placeholder (ids like dry_run_row_1, numbers above 900000000) and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. A read that would send a placeholder is held back too (reason placeholder), and an MCP call its server calls read-only says so (reason mcp-read-only). Reads, model calls and code run for real; code in a remote sandbox (shell, Python, imports) is listed in sideEffects.unchecked. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. --allow &lt;block&gt; sends that block's writes for real (use a test resource). --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt;. --allow, --mock and --mock-from imply --dry; --draft sends every write, so it refuses them. Overrides the run never reached are listed in sideEffects.unreached, and mock fields a block never gets in sideEffects.mockFields. The API reference describes each list and refusal.
--dry runs the saved draft without its writes: each call that could change something (a write tool, any MCP call, an HTTP request other than GET/HEAD/OPTIONS, code's other fetches) gets a placeholder (ids like dry_run_row_1, numbers above 900000000) and is listed in sideEffects.stubbed with the request it would have sent; check those payloads. A read that would send a placeholder is held back too (reason placeholder), and an MCP call its server calls read-only says so (reason mcp-read-only). Reads, model calls and code run for real; code in a remote sandbox (shell, Python, imports) runs for real too, its network requests included, and is listed in sideEffects.unchecked. Child workflows run dry too; custom, Human in the loop and Wait blocks are answered whole, so the run never pauses. --allow &lt;block&gt; sends that block's writes for real (use a test resource). --mock &lt;block&gt;=&lt;json&gt; answers a block with fixed output, to steer a branch; --mock-from &lt;runId&gt; with a bare --mock &lt;block&gt; answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as &lt;workflow&gt;.&lt;block&gt;. --allow, --mock and --mock-from imply --dry; --draft sends every write, so it refuses them. Overrides the run never reached are listed in sideEffects.unreached, and mock fields a block never gets in sideEffects.mockFields. The API reference describes each list and refusal.

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.

Expand Down Expand Up @@ -1447,7 +1447,7 @@ sim workflows source create [options]
| `--name <name>` | No | The workflow name (default: the source's). |
| `--folder <path>` | No | The folder to create it in (default: the root). |
| `-y, --yes` | No | Create without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |

</CommandTable>
Expand Down Expand Up @@ -1483,7 +1483,7 @@ sim workflows source apply [workflowId] [options]
| `--dir <dir>` | No | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. Defaults to `.`. |
| `--dry` | No | Check the source and show the outcome without saving or writing files. |
| `-y, --yes` | No | Apply without asking for confirmation. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. |
| `--run [input]` | No | After the write is saved, dry-run the draft with this input (JSON or @file, as `sim workflows run --dry --input` takes it): a run that does not complete exits 1 and deploys nothing. Sandboxed code (Python, shell, imports) really runs in it, network requests included, and is listed in sideEffects.unchecked, so --run --deploy in CI sends those. |
| `--deploy` | No | After the write is saved (and a --run completed), deploy the workflow (as `sim workflows deploy <workflowId>` does). |
| `--allow-delete` | No | Delete blocks and variables the source no longer declares; without it, an apply that deletes one is refused. |

Expand Down Expand Up @@ -1571,7 +1571,7 @@ Without --server, each file created, edited or deleted since the directory was r

API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource).

### Print a block's code, edges and readers with line numbers
### Print a block's declaration, edges and readers with line numbers

Offline.

Expand Down
Loading
Loading