Skip to content

Commit 834e157

Browse files
committed
fix(cli): refuse what the help already says is invalid
- validate integer fields against the generated spec's own `kind`, so `--limit 1.5` names the flag and the value instead of surfacing zod's `expected int, received number` - enforce `--limit` >= 1 on the two non-paginated row mutations, which the help already promised and the server already required - refuse a blank `-c/--conversation`: it is falsy, so it was dropped from the body and silently started a new conversation instead of continuing one - refuse a blank `chat` message before the request rather than after - constrain `--recipe` to the recipes the generated body type declares, so regenerating the surface breaks the build if they diverge - announce truncation on `ls` the way `list` already does; the capped answer was printed silently - stop a successful message translation from vetoing itself: the veto now reads the message the server sent, not the rewritten one, which restores `--folder must name an existing folder` and unblocks 100+ operations - drop "destructive" from the `--yes` help line; the gate also covers operations that only add, such as `files unzip` - fix the `logs follow` help, which illustrated `--workflow` with a file id
1 parent a3705a7 commit 834e157

32 files changed

Lines changed: 609 additions & 161 deletions

apps/docs/content/docs/en/cli/billing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Show billing status and current-period credit usage (credits and storage require
3131
sim billing logs [options]
3232
```
3333

34-
List credit usage events (a personal API key reports only your own events; a workspace API key reports every member's)
34+
List credit usage events (a personal API key reports only your own events; a workspace API key reports every member's in aggregate, unattributed)
3535

3636
**Options**
3737

apps/docs/content/docs/en/cli/credentials.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Disconnect Credential (personal API key required)
3333

3434
| Option | Required | Description |
3535
| --- | --- | --- |
36-
| `-y, --yes` | Yes | Confirm this destructive operation. |
36+
| `-y, --yes` | Yes | Confirm this operation. |
3737

3838
</CommandTable>
3939

apps/docs/content/docs/en/cli/custom-tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ sim custom-tools delete <customToolId> [options]
4949

5050
| Option | Required | Description |
5151
| --- | --- | --- |
52-
| `-y, --yes` | Yes | Confirm this destructive operation. |
52+
| `-y, --yes` | Yes | Confirm this operation. |
5353

5454
</CommandTable>
5555

apps/docs/content/docs/en/cli/files.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sim files batch-delete [options]
2222
| Option | Required | Description |
2323
| --- | --- | --- |
2424
| `--file-ids <value...>` | Yes | File identifiers to update. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
25-
| `-y, --yes` | Yes | Confirm this destructive operation. |
25+
| `-y, --yes` | Yes | Confirm this operation. |
2626

2727
</CommandTable>
2828

@@ -85,7 +85,7 @@ sim files folders delete <path> [options]
8585
| Option | Required | Description |
8686
| --- | --- | --- |
8787
| `--recursive` | No | Delete the folder and its descendants. |
88-
| `-y, --yes` | Yes | Confirm this destructive operation. |
88+
| `-y, --yes` | Yes | Confirm this operation. |
8989

9090
</CommandTable>
9191

@@ -168,7 +168,7 @@ sim files delete <fileId> [options]
168168

169169
| Option | Required | Description |
170170
| --- | --- | --- |
171-
| `-y, --yes` | Yes | Confirm this destructive operation. |
171+
| `-y, --yes` | Yes | Confirm this operation. |
172172

173173
</CommandTable>
174174

@@ -377,7 +377,7 @@ sim files unzip <fileId> [options]
377377

378378
| Option | Required | Description |
379379
| --- | --- | --- |
380-
| `-y, --yes` | Yes | Confirm this destructive operation. |
380+
| `-y, --yes` | Yes | Confirm this operation. |
381381

382382
</CommandTable>
383383

apps/docs/content/docs/en/cli/knowledge.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Delete Tag (personal API key required)
120120

121121
| Option | Required | Description |
122122
| --- | --- | --- |
123-
| `-y, --yes` | Yes | Confirm this destructive operation. |
123+
| `-y, --yes` | Yes | Confirm this operation. |
124124

125125
</CommandTable>
126126

@@ -150,7 +150,7 @@ Remove tag definitions no document still uses (personal API key required)
150150
| --- | --- | --- |
151151
| `--unused` | No | Whether to remove only the tag definitions no document in the knowledge base still carries a value for. Defaults to true. Pass --no-unused to delete every definition on the knowledge base, which also clears its slot on every document and chunk and is not recoverable. |
152152
| `--no-unused` | No | Send --unused as false. |
153-
| `-y, --yes` | Yes | Confirm this destructive operation. |
153+
| `-y, --yes` | Yes | Confirm this operation. |
154154

155155
</CommandTable>
156156

@@ -273,7 +273,7 @@ Enable, disable, or delete many chunks at once (personal API key required)
273273
| --- | --- | --- |
274274
| `--operation <value>` | Yes | What to do with the selected chunks. Accepted values: `enable`, `disable`, `delete`. |
275275
| `--chunk <value...>` | Yes | Chunks to operate on, by identifier. An id naming no chunk in the document is reported in errors and does not fail the request. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
276-
| `-y, --yes` | Yes | Confirm this destructive operation. |
276+
| `-y, --yes` | Yes | Confirm this operation. |
277277

278278
</CommandTable>
279279

@@ -334,7 +334,7 @@ Delete Chunk (personal API key required)
334334

335335
| Option | Required | Description |
336336
| --- | --- | --- |
337-
| `-y, --yes` | Yes | Confirm this destructive operation. |
337+
| `-y, --yes` | Yes | Confirm this operation. |
338338

339339
</CommandTable>
340340

@@ -477,7 +477,7 @@ sim knowledge documents delete <knowledgeBaseId> <documentId> [options]
477477

478478
| Option | Required | Description |
479479
| --- | --- | --- |
480-
| `-y, --yes` | Yes | Confirm this destructive operation. |
480+
| `-y, --yes` | Yes | Confirm this operation. |
481481

482482
</CommandTable>
483483

@@ -606,8 +606,8 @@ sim knowledge documents upload <knowledgeBaseId> <path> [options]
606606
| --- | --- | --- |
607607
| `--name <name>` | No | Store it under a different name. |
608608
| `--tag <value...>` | No | Document tags, in tag1 through tag7 order. |
609-
| `--recipe <name>` | No | Document processing recipe. |
610-
| `--lang <code>` | No | Document language code. |
609+
| `--recipe <name>` | No | Document processing recipe. Accepted values: `default`, `plain`, `markdown`, `code`. |
610+
| `--lang <code>` | No | Document language tag: hyphen-separated letter and digit subtags, for example en or en-US. |
611611

612612
</CommandTable>
613613

@@ -689,7 +689,7 @@ Delete Knowledge Connector (personal API key required)
689689
| --- | --- | --- |
690690
| `--delete-documents` | No | Also permanently delete documents produced by this connector. |
691691
| `--no-delete-documents` | No | Send --delete-documents as false. |
692-
| `-y, --yes` | Yes | Confirm this destructive operation. |
692+
| `-y, --yes` | Yes | Confirm this operation. |
693693

694694
</CommandTable>
695695

@@ -903,11 +903,11 @@ sim knowledge folders delete <path> [options]
903903
| Option | Required | Description |
904904
| --- | --- | --- |
905905
| `--recursive` | No | Delete the folder and its descendants. |
906-
| `-y, --yes` | Yes | Confirm this destructive operation. |
906+
| `-y, --yes` | Yes | Confirm this operation. |
907907

908908
</CommandTable>
909909

910-
## List folders
910+
## List knowledge folders
911911

912912
```bash
913913
sim knowledge folders list [options]
@@ -969,7 +969,7 @@ sim knowledge delete <knowledgeBaseId> [options]
969969

970970
| Option | Required | Description |
971971
| --- | --- | --- |
972-
| `-y, --yes` | Yes | Confirm this destructive operation. |
972+
| `-y, --yes` | Yes | Confirm this operation. |
973973

974974
</CommandTable>
975975

apps/docs/content/docs/en/cli/logs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ sim logs get <runId> [options]
3535

3636
</CommandTable>
3737

38-
## Summarize run counts, failures, and cost over a window
38+
## Summarize run counts, failures and latency over a window
3939

4040
```bash
4141
sim logs stats [options]

apps/docs/content/docs/en/cli/mcp-servers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ sim mcp-servers delete <mcpServerId> [options]
5858

5959
| Option | Required | Description |
6060
| --- | --- | --- |
61-
| `-y, --yes` | Yes | Confirm this destructive operation. |
61+
| `-y, --yes` | Yes | Confirm this operation. |
6262

6363
</CommandTable>
6464

0 commit comments

Comments
 (0)