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
fix(cli): resolve findings from a full command-surface audit (#6788)
* fix(cli): resolve findings from a full command-surface audit
Exercised all 147 commands against a live deployment. Fixes the defects
that surfaced, plus the docs and generator drift they exposed.
Transport
- Stop following redirects. A bare domain that 301s to www silently
converted POST to GET and dropped the body, so reads worked while every
write failed with a misleading validation error and login returned 405.
Both the client and the device flow now explain the redirect and name
the endpoint to configure, rather than carrying credentials off-origin.
- Report a non-JSON response as one instead of printing the HTML page.
- Name the personal-API-key remedy on a workspace-key refusal, reading the
machine-readable code the API actually sends.
- Drop union-branch noise from validation errors that contradicted itself.
- Show paging progress on stderr for multi-page fetches.
Output
- Clamp record values for table only. text is the format built for pipes,
and it was truncating signed URLs and tool source mid-value.
- Infer timestamp, duration, bytes and boolean formatting for API-owned
keys so undeclared commands stop printing raw ISO and float ms. Skips
user-defined table cells and leaves json/yaml on the raw payload.
- Render a declared-but-absent field as an em dash; billing credits were
vanishing silently.
Paths, naming and validation
- Percent-encode folder paths per segment and decode them for display, so
a folder reads and types as the name shown in the app.
- Reject a malformed endpoint where it is set and where it resolves,
instead of crashing with a URL parse trace.
- Request the detail level logs list's own columns need; its workflow
column could never populate.
- Rename three commands that described themselves wrongly and align two
flags with their siblings. Old spellings still work: hidden, warned on
stderr, and kept out of help and docs.
- Verify whoami against the API, separating a bad key from an unreachable
endpoint, and report the workspace by name.
- Correct the --yes help text, which advertised skipping a prompt that
does not exist.
Docs
- Teach the docs generator that a flag required by the runtime is required,
and that hidden commands are not documented.
* fix(cli): clear the paging progress line when a page fails
Progress is written without a trailing newline so it can be overwritten in
place, and both paging loops cleaned it up only on success. A page that
threw part-way through left `fetched 1200…` on the line the error was then
printed onto, so the two ran together.
* fix(cli): name a working API root when an endpoint redirects
The suggested endpoint was the redirect target's origin, which drops a path
prefix. A self-hosted deployment reached at https://host/sim was told to set
https://www.host — not an API root, so following the advice replaced one
broken endpoint with another.
Derive it by stripping the request's own path from the target instead, so a
prefix survives, and say nothing about --set-endpoint when the target
resolves to the endpoint already configured: a trailing-slash or path
normalization redirect keeps the origin, and naming the value the caller
already has explains nothing. The login poll shared both faults and now
shares the helper.
|`--file-ids <value...>`| Yes | File identifiers to update. (space-separated, or @path / @- with one value per line). |
25
-
|`-y, --yes`|No|Skip the confirmation. |
25
+
|`-y, --yes`|Yes|Confirm this destructive operation. |
26
26
27
27
</CommandTable>
28
28
@@ -40,7 +40,7 @@ sim files create [options]
40
40
| --- | --- | --- |
41
41
|`--name <value>`| Yes | File name, including its extension. Path separators and dot segments are rejected. |
42
42
|`--content-type <value>`| No | MIME type. When omitted, it is inferred from the file extension. |
43
-
|`--folder <value>`| No | Folder path; the leading / is optional. |
43
+
|`--folder <value>`| No | Folder path as shown in the app; the leading / is optional. |
44
44
|`--content <value>`| No | Initial file content. Omit or send an empty string for a zero-byte file. The 70,000,000-character bound guards the JSON envelope; the decoded bytes must be at most 50 MiB, and a longer base64 payload is rejected with `413`. Use an upload session for anything larger. |
45
45
|`--encoding <value>`| No | Encoding of the content field. Accepted values: `utf-8`, `base64`. |
46
46
@@ -58,7 +58,7 @@ sim files folders create <path>
58
58
59
59
| Argument | Required | Description |
60
60
| --- | --- | --- |
61
-
|`path`| Yes | Folder path; the leading / is optional |
61
+
|`path`| Yes | Folder path as shown in the app; the leading / is optional |
|`-y, --yes`|Yes|Confirm this destructive operation. |
155
155
156
156
</CommandTable>
157
157
@@ -238,7 +238,7 @@ sim files list [options]
238
238
239
239
| Option | Required | Description |
240
240
| --- | --- | --- |
241
-
|`--folder <value>`| No | Folder path; the leading / is optional. |
241
+
|`--folder <value>`| No | Folder path as shown in the app; the leading / is optional. |
242
242
|`--scope <value>`| No | Which lifecycle set to list: `active` (default) for live files, `archived` for files a `DELETE` soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too. Accepted values: `active`, `archived`. |
243
243
|`--search <value>`| No | Case-insensitive substring match against the file name. |
244
244
|`--sort-by <value>`| No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `size`, `uploadedAt`, `updatedAt`. |
|`-y, --yes`|Yes|Confirm this destructive operation. |
322
322
323
323
</CommandTable>
324
324
@@ -350,7 +350,7 @@ sim knowledge list [options]
350
350
351
351
| Option | Required | Description |
352
352
| --- | --- | --- |
353
-
|`--folder <value>`| No | Folder path; the leading / is optional. |
353
+
|`--folder <value>`| No | Folder path as shown in the app; the leading / is optional. |
354
354
|`--search <value>`| No | Case-insensitive substring match against the resource name. |
355
355
|`--sort-by <value>`| No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/cli/logs.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
@@ -57,12 +57,12 @@ sim logs list [options]
57
57
|`--min-cost <value>`| No | Minimum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run. |
58
58
|`--max-cost <value>`| No | Maximum execution cost in USD, from 0 to 1000000. A run is never charged a negative amount, so a negative bound is rejected rather than treated as a filter that matches every run. |
59
59
|`--model <value>`| No | AI model used during execution. |
|`--details <value>`| No | Response detail level; full is requested by default to name each run’s workflow. Accepted values: `basic`, `full`. |
61
61
|`--include-trace-spans`| No | Include trace spans in JSON or YAML output (implies full detail). |
62
62
|`--include-final-output`| No | Include final output in JSON or YAML output (implies full detail). |
63
63
|`--limit <n>`| No | Maximum items to return (0 for everything). Defaults to `100`. |
64
64
|`--order <value>`| No | Sort direction by execution start time. This list is sortable only by execution start time, so it takes `order` in place of `sortBy`/`sortOrder`, which it rejects. Accepted values: `asc`, `desc`. |
65
65
|`--run-id <value>`| No | Exact run identifier to match. |
66
-
|`--folder <value...>`| No | Folder path; the leading / is optional (space-separated, or @path / @- with one value per line). |
66
+
|`--folder <value...>`| No | Folder path as shown in the app; the leading / is optional (space-separated, or @path / @- with one value per line). |
0 commit comments