Skip to content

Commit 8c8b203

Browse files
committed
fix(agents): consolidate guidance and update authoring mocks
1 parent 6a16bfa commit 8c8b203

11 files changed

Lines changed: 235 additions & 300 deletions

File tree

‎apps/docs/content/docs/cli/authentication.mdx‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,38 @@ when the check could not be made at all — no workspace to check against, or an
166166
endpoint that did not answer. The split matters in CI: only `1` is fixed by
167167
logging in again.
168168

169+
## Choosing an integration credential
170+
171+
Your Sim login controls which workspaces and operations you can access. A tool's
172+
selected provider credential controls its external identity and grants. A workflow
173+
and a direct tool call can use different provider credentials under the same Sim login.
174+
175+
Discover the exact tool ID and its parameter schema, then inspect the connection
176+
you intend to use:
177+
178+
```bash
179+
sim tools list --search slack
180+
sim tools get slack_message
181+
sim credentials list --provider-id slack
182+
sim --output json credentials get "$CREDENTIAL_ID"
183+
```
184+
185+
Use the returned tool ID and argument names. For standalone OAuth execution, pass
186+
`--credential-id "$CREDENTIAL_ID"` to `sim tools execute`. HTTP and MCP callers
187+
supply the top-level `credentialId` field, outside `input`.
188+
189+
`credentials get` reports the credential type/provider, stored identity metadata,
190+
and recorded scopes with their source. `diagnostics.identity.verifiedLive: false`
191+
means it has not contacted the provider or verified token validity or resource access.
192+
Display names are labels. A scopes source of `unknown` with an empty `values` array
193+
means the grants are unknown, not that no scopes were granted. Custom bots may have
194+
no separately stored identity metadata; inspection leaves it unknown without
195+
reading secret payloads.
196+
197+
See [Slack credentials](/integrations/slack#standalone-tool-credentials) for
198+
OAuth versus bot-token selection and conversation-access limits. The
199+
[credentials command reference](/cli/credentials) lists connection-management commands.
200+
169201
## Signing out
170202

171203
```bash

‎apps/docs/content/docs/cli/index.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ move files, search knowledge bases, and read run logs from the terminal. Use
1212
pipelines. See [Output formats](/cli/output) for commands that emit raw content
1313
or local configuration.
1414

15-
For safe edits, compact run diagnostics, and partial retries, see
16-
[Workflow operations](/cli/workflow-operations).
15+
For workflow editing and retry recipes, see [Scripting](/cli/scripting).
1716

1817
## Install
1918

‎apps/docs/content/docs/cli/meta.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"output",
1010
"scripting",
1111
"workflow-sync",
12-
"workflow-operations",
1312
"troubleshooting",
1413
"usage-data",
1514
"---Commands---",

‎apps/docs/content/docs/cli/output.mdx‎

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,66 @@ with span inputs, outputs, errors, timing, and cost:
5959
sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --trace
6060
```
6161

62-
`json` and `yaml` always carry the complete response, so `--trace` is a no-op
63-
there:
62+
By default, `json` and `yaml` carry the complete response, so `--trace` does not
63+
change their output:
6464

6565
```bash
6666
sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --output json | jq '.traceSpans'
6767
```
6868

69+
### Compact run summaries
70+
71+
Use `--summary` to inspect a run without printing its full trace and workflow
72+
snapshot:
73+
74+
```bash
75+
sim --output json logs get "$RUN_ID" --summary
76+
```
77+
78+
The summary includes execution status, the workflow's existing `finalOutput`,
79+
recorded failures (including handled errors), compact failing inputs and outputs,
80+
observed block statuses, and file metadata. It bounds trace traversal and field
81+
sizes, reports `truncated` when detail is omitted, and omits binary fields and data
82+
URLs. Use `--trace` or [output selectors](/cli/scripting#selecting-workflow-output)
83+
when you need more detail.
84+
85+
`--summary` asks the server to omit the saved workflow snapshot, then formats the
86+
remaining authorized log response locally; it still loads the trace. To omit
87+
only the snapshot, use `--no-include-workflow-state`. HTTP and hosted MCP callers
88+
can set `includeWorkflowState=false` on the log read.
89+
90+
Execution status describes the run, not the quality of its output or whether an
91+
external delivery succeeded. Inspect `finalOutput` and recorded tool failures
92+
before treating a completed run as a successful result. Expired trace data can
93+
leave no block-level evidence. Find failures that a workflow recovered from with
94+
`sim logs list --level error --include-handled-errors`.
95+
96+
The log's `cost` includes a reconciled total and itemized `fixed`, `model`, and
97+
`tool` charges when a ledger is available.
98+
99+
## Downloading output files
100+
101+
Tools that store files return descriptors containing file IDs and metadata,
102+
rather than inline base64. Download a personal output from a direct tool call
103+
(`context: copilot`) with:
104+
105+
```bash
106+
sim tools files download "$FILE_ID" -o ./attachment.pdf
107+
```
108+
109+
For a workflow output, use the workflow and run that produced it:
110+
111+
```bash
112+
sim workflows runs files download "$WORKFLOW_ID" "$RUN_ID" "$FILE_ID" -o ./attachment.pdf
113+
```
114+
115+
These commands authenticate with the configured Sim credential and stream to
116+
disk. Direct personal outputs require their original human owner and current
117+
workspace access; workflow outputs use the run's access checks. A descriptor's
118+
URL or storage key alone grants no access. Output files can expire; copy durable
119+
artifacts into workspace files. See the [tool file](/cli/tools#download-a-direct-tool-output-owned-by-the-current-user)
120+
and [run file](/cli/workflows#download-a-workflow-run-output-file) command references.
121+
69122
## Exceptions
70123

71124
`sim configure` prints local configuration for humans. `sim profiles` honors `--output`.

‎apps/docs/content/docs/cli/scripting.mdx‎

Lines changed: 121 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,64 @@ case $? in
222222
esac
223223
```
224224

225+
## Inspecting and editing workflows
226+
227+
Find the workflow in its workspace before reading its draft:
228+
229+
```bash
230+
sim workspaces list --output json
231+
sim workflows list --workspace "$workspace_id" --search "Daily report" \
232+
--folder Reports --deployed-only --output json
233+
```
234+
235+
`--search` matches names; `--folder` and `--deployed-only` narrow the results.
236+
These lists [follow pages automatically](#pagination). There is no account-wide
237+
workflow-content search: use metadata to narrow candidates, then inspect them.
238+
239+
Start with a compact diagnostic view, then fetch editable state when you need to
240+
change the saved workflow:
241+
242+
```bash
243+
sim workflows inspect "$workflow_id" --output json
244+
sim workflows inspect "$workflow_id" --block-id "$block_id" --include-code --output json
245+
sim workflows state get "$workflow_id" --output json > state.json
246+
```
247+
248+
Inspection includes block IDs, names, enabled states, parents, connections, and
249+
bounded inputs. It omits code by default and withholds credential fields and
250+
opaque credential values; check `omittedInputs` and `truncated` for missing detail.
251+
Redaction cannot recognize every secret embedded in arbitrary text or code.
252+
The diagnostic view is not a format to save back.
253+
254+
A tool ID from `tools get` selects a standalone operation. A block type and its
255+
operation from `blocks get` define workflow behavior; a block ID identifies one
256+
instance in the saved workflow. These IDs are not interchangeable. Preserve the
257+
saved block type/version when editing; an unversioned catalog name can resolve
258+
to a newer definition with different fields.
259+
260+
For in-place edits, preserve the IDs and credential/table references from
261+
`state get`, then validate with `state replace --dry-run` before saving.
262+
`workflows export` is a sanitized portable format with credential bindings cleared;
263+
use it for [import and sync](/cli/workflow-sync), not to replace editable state.
264+
Review validation coverage, skipped checks, warnings, and `removedBindings`.
265+
Static validation cannot prove provider access, model behavior, or runtime success.
266+
267+
For a small change, use the existing operations command. An enablement-only batch
268+
needs no graph edit:
269+
270+
```bash
271+
sim workflows operations apply "$workflow_id" --dry-run --atomic \
272+
--set-block-enabled "[{\"block_id\":\"$block_id\",\"enabled\":false}]"
273+
```
274+
275+
Inspect `applied`, `skipped`, and `inputValidationErrors` before committing with
276+
`--yes` in place of `--dry-run`. `--atomic` prevents the batch from saving if an
277+
edit is declined or an input would be dropped. When adding blocks, dry-run
278+
`previewBlockIds` are provisional and `mintedBlockIds` is empty; use the IDs from
279+
the committed response. Read the saved state before deploying. Validation executes
280+
no blocks; it is not a mode that suppresses external writes during a later run.
281+
See the [workflow command reference](/cli/workflows) for full edit and validation flags.
282+
225283
## Selecting workflow output
226284

227285
`--select-output` returns the named values in `blockOutputs` on a sync run, or
@@ -242,9 +300,22 @@ sim workflows runs get "$run_id" --workflow 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8
242300
--select-output 1d4c8f02-7b63-4a19-8e52-63f0a7c5d9b1.content --output json
243301
```
244302

303+
To inspect an intermediate result, combine a selector with `--stop-after`:
304+
305+
```bash
306+
sim workflows run "$workflow_id" --stop-after "$block_id" \
307+
--select-output "$block_id.result" --output json
308+
```
309+
310+
This executes real actions and stops scheduling after the target finishes.
311+
Already-running parallel branches can still act; a condition that skips the
312+
target can let the remaining path complete. It does not edit the saved graph or
313+
suppress external writes. It cannot be used with `--async`, and a later explicit
314+
resume of a paused run does not inherit the limit.
315+
245316
## Polling a long run
246317

247-
Start the run asynchronously, then use the CLI’s wait command:
318+
Start a deployed run asynchronously, then use the CLI’s wait command:
248319

249320
```bash
250321
run_id=$(sim workflows run 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 --async --output json | jq -r '.runId')
@@ -258,6 +329,55 @@ outcome; `--wait-timeout 0` waits indefinitely.
258329
Use `sim logs get "$run_id" --trace` for full diagnostics. A run paused for human
259330
input includes the context ID needed by `sim workflows runs resume`.
260331

332+
Ordinary runs use the active deployment; `--manual`, `--trigger`, and `--from-block`
333+
use the current saved draft. Deployed runs support synchronous execution,
334+
`--follow`, or `--async`. Manual runs support synchronous execution or `--follow`;
335+
`--async` cannot be combined with manual execution or `--follow`.
336+
337+
The CLI prints a run ID to stderr before sending a manual request. Use it with
338+
`workflows runs get` or `workflows runs wait` in another terminal. A status record
339+
appears only after server admission, so a rejected request may never have one.
340+
The ID is a one-shot identifier, not a replayable idempotency key. After an
341+
uncertain network failure, inspect that ID before starting another execution;
342+
a fresh ID can repeat external actions.
343+
344+
Deployed runs retain the default API-compatible trigger priority. A deployment
345+
with one other runnable trigger can also run directly. If no API-compatible
346+
entry exists and multiple triggers remain, select the deployed entry through the
347+
API's `run.entry`; the CLI's `--trigger` instead selects an entry in the draft.
348+
See the [run command reference](/cli/workflows#run-a-deployed-workflow-or-execute-saved-state-manually)
349+
for all execution flags.
350+
351+
## Previewing a partial retry
352+
353+
Preview a retry using the source run's persisted upstream outputs before repeating
354+
external actions:
355+
356+
```bash
357+
sim workflows runs preview "$workflow_id" \
358+
--from-block "$block_id" --source-run "$source_run_id" --output json
359+
```
360+
361+
Review `validation`, `rerunBlocks`, and `upstreamBlocks`. Preview reports cached-output
362+
availability without returning values, executing blocks, or reserving a run ID.
363+
Its rerun blocks are candidates, not an execution order: conditions, disabled
364+
blocks, loops, and failures still affect the path. Preview does not lock the draft;
365+
the subsequent manual run uses the draft saved at that time.
366+
367+
After reviewing the preview, start the retry and use its printed run ID to
368+
[track it](#polling-a-long-run):
369+
370+
```bash
371+
sim workflows run "$workflow_id" \
372+
--from-block "$block_id" --source-run "$source_run_id" --follow
373+
```
374+
375+
An error connection is an alternative path: a consumer reached through an error
376+
bypass may lack the successful path's parser output. Keep required data on the
377+
path that produces it or handle its absence. A disabled block stops its branch;
378+
it is not a pass-through mock. Replay can reuse recorded ancestor outputs from
379+
the selected source run, but cannot supply outputs that run never produced.
380+
261381
## Working with folders
262382

263383
Every folder-backed resource — `workflows`, `tables`, `files`, `knowledge` —

0 commit comments

Comments
 (0)