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
{{ message }}
Repository navigation
Commit fe6eb23
Browse filesBrowse the repository at this point in the historyBrowse files
improvement(sim-cli): clearer run, parse and JSON-shape refusals (#10458)
* improvement(sim-cli): clearer run, parse and JSON-shape refusals
* improvement(sim-cli): keep typed options in corrected commands, restore primer write warning
* fix(sim-cli): name root flags that took a value, echo negated booleans once
* improvement(sim-cli): move a positional @file input to its JSON flag
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/reference.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8518,9 +8518,9 @@ sim workflows run <workflowId> [options]
8518
8518
|`--draft`| No | Run the saved draft instead of the active deployment, sending its writes. |
8519
8519
|`--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. |
8520
8520
|`--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. |
8521
-
|`--allow <block>`| No | Send this block's writes for real during a --dry run (its id, display name or key, or <workflow>.<block> for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
8522
-
|`--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 <workflow>.<block> for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock <block> 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. |
8523
-
|`--mock-from <runId>`| No | Answer each block a bare --mock <block> 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 (requires --dry). |
8521
+
|`--allow <block>`| No | Send this block's writes for real during a dry run (its id, display name or key, or <workflow>.<block> for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls.; repeatable. |
8522
+
|`--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 <workflow>.<block> for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock <block> 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. |
8523
+
|`--mock-from <runId>`| No | Answer each block a bare --mock <block> 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. |
8524
8524
|`--trigger <blockId>`| No | Enter the run through this runnable trigger, by its block id; runs the saved draft (implies --draft). |
8525
8525
|`--sample`| No | Run with the selected trigger's sample payload instead of --input; runs the saved draft (implies --draft), whose writes are sent unless --dry. |
8526
8526
|`--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. |
@@ -8536,7 +8536,7 @@ sim workflows run <workflowId> [options]
8536
8536
8537
8537
Without --draft (or a flag that implies it) this runs the active deployment; a workflow never deployed has none. --deployment-version <n> 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.
8538
8538
8539
-
--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 <block> sends that block's writes for real (use a test resource). --mock <block>=<json> answers a block with fixed output, to steer a branch; --mock-from <runId> with a bare --mock <block> answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as <workflow>.<block>. 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.
8539
+
--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 <block> sends that block's writes for real (use a test resource). --mock <block>=<json> answers a block with fixed output, to steer a branch; --mock-from <runId> with a bare --mock <block> answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as <workflow>.<block>. --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.
8540
8540
8541
8541
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.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/cli/workflows.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -835,9 +835,9 @@ sim workflows run <workflowId> [options]
835
835
|`--draft`| No | Run the saved draft instead of the active deployment, sending its writes. |
836
836
|`--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. |
837
837
|`--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. |
838
-
|`--allow <block>`| No | Send this block's writes for real during a --dry run (its id, display name or key, or <workflow>.<block> for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls; repeatable. |
839
-
|`--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 <workflow>.<block> for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock <block> 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. |
840
-
|`--mock-from <runId>`| No | Answer each block a bare --mock <block> 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 (requires --dry). |
838
+
|`--allow <block>`| No | Send this block's writes for real during a dry run (its id, display name or key, or <workflow>.<block> for a workflow it calls); for an Agent, only its own tool calls, not a workflow or custom block it calls.; repeatable. |
839
+
|`--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 <workflow>.<block> for a workflow it calls), to steer a branch or give a stubbed write a realistic result; a bare --mock <block> 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. |
840
+
|`--mock-from <runId>`| No | Answer each block a bare --mock <block> 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. |
841
841
|`--trigger <blockId>`| No | Enter the run through this runnable trigger, by its block id; runs the saved draft (implies --draft). |
842
842
|`--sample`| No | Run with the selected trigger's sample payload instead of --input; runs the saved draft (implies --draft), whose writes are sent unless --dry. |
843
843
|`--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. |
@@ -853,7 +853,7 @@ sim workflows run <workflowId> [options]
853
853
854
854
Without --draft (or a flag that implies it) this runs the active deployment; a workflow never deployed has none. --deployment-version <n> 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.
855
855
856
-
--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 <block> sends that block's writes for real (use a test resource). --mock <block>=<json> answers a block with fixed output, to steer a branch; --mock-from <runId> with a bare --mock <block> answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as <workflow>.<block>. 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.
856
+
--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 <block> sends that block's writes for real (use a test resource). --mock <block>=<json> answers a block with fixed output, to steer a branch; --mock-from <runId> with a bare --mock <block> answers it with the output that run recorded. --allow and --mock also name a block of a workflow this one calls as <workflow>.<block>. --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.
857
857
858
858
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.
- Rejoin: before one \`response\`, a Function picks the branch that ran with \`??\`.${extra.patterns??''}
70
70
- **Credentials**: \`sim credentials connect <provider> --name "<Name>"\`, send the owner its link, then \`credential('<key>')\`.
71
-
- **Run**: \`sim workflows run <workflowId>\` runs the active deployment; \`--draft\` runs the draft for real and \`--allow <block>\` sends that block's writes (use test resources); \`--dry\` runs it stubbing writes and MCP tools (even read-only: \`mcp-read-only\`), listed in \`sideEffects\` (\`dry_run_*\` placeholders); GET \`api\` calls and plain-JS GET fetches run; sandboxed code (Python, shell, imports): \`unchecked\`. \`--mock <block>='{…}'\` fixes its output (bare, with \`--mock-from <runId>\`: that run's); a child's block: \`<workflow>.<block>\`.
71
+
- **Run**: \`sim workflows run <workflowId>\` runs the active deployment; \`--dry\` runs the draft stubbing writes and MCP tools (even read-only: \`mcp-read-only\`), listed in \`sideEffects\` (\`dry_run_*\` placeholders); GET \`api\` calls and plain-JS GET fetches run; sandboxed code (Python, shell, imports): \`unchecked\`. With \`--dry\`, \`--allow <block>\` sends its writes; \`--draft\` sends all (use test resources). \`--mock <block>='{…}'\` fixes its output (bare, with \`--mock-from <runId>\`: that run's); a child's block: \`<workflow>.<block>\`.
72
72
- **Debug**: \`--dir <dir>\` maps a failure to file:line; \`sim logs get <runId> --trace --no-include-workflow-state\`; rows: \`sim tables rows list <table>\`; rerun: \`--from-block <block> --source-run <runId>\`; \`--stop-after <block>\`.${extra.debug??''}
73
73
- **Exit codes**: 0 ok, 1 errors, ${SOURCE_STALE_EXIT_CODE} stale (redo in a fresh get), ${RATE_LIMITED_EXIT_CODE} rate limited, ${SOURCE_BUSY_EXIT_CODE} busy, ${SOURCE_LOCAL_CHANGES_EXIT_CODE}/${SOURCE_DRIFT_EXIT_CODE} \`status\`: your edits / the server changed.`
0 commit comments