Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b3de17f
feat(files): folder operations for the File block, and folders as scope
mzxchandra Sep 2, 2026
bbf52ce
Update apps/sim/tools/file/compress.ts
mzxchandra Sep 2, 2026
92a8e0a
Update apps/sim/lib/workspace-files/application/workspace-file-folder…
mzxchandra Sep 2, 2026
b5aefde
Update apps/sim/lib/internal/file/operations.ts
mzxchandra Sep 2, 2026
9a53343
feat(files): confine content search to a folder scope
mzxchandra Sep 2, 2026
69ee273
feat(files): edit and insert file content in place
mzxchandra Sep 2, 2026
ea0370b
feat(files): ranged content reads and v2 surfaces for search and edit
mzxchandra Sep 2, 2026
9eeabe6
Update apps/docs/openapi-v2-files-audit.json
mzxchandra Sep 2, 2026
160f82d
Update apps/docs/content/docs/integrations/file.mdx
mzxchandra Sep 2, 2026
71368cb
Update apps/sim/lib/workspace-files/application/edit-workspace-file-c…
mzxchandra Sep 2, 2026
2826fb5
Update apps/docs/content/docs/cli/files.mdx
mzxchandra Sep 2, 2026
df498f4
refactor(files): share one folder-scope module with the table branch
mzxchandra Sep 2, 2026
99316fb
test(files): cover both non-text buffer shapes, and regenerate the spec
mzxchandra Sep 2, 2026
4591090
fix(cli): stop claiming a line limit caps a --filter match
mzxchandra Sep 2, 2026
2e8393e
fix(files): connect the scoped-search, edit and ranged-read fields en…
mzxchandra Sep 2, 2026
ba2e9ae
test(files): give the session principal fixture its required sessionId
mzxchandra Sep 2, 2026
afe2d80
fix(files): keep folder creation working under a slash-named parent
mzxchandra Sep 2, 2026
14e11cd
chore(files): sort the folder-scope import
mzxchandra Sep 2, 2026
0b1738f
fix(realtime): count room subscribers so one unmount cannot cut off a…
mzxchandra Sep 2, 2026
37986a9
test(realtime): type the room fixture instead of casting it
mzxchandra Sep 2, 2026
551abf3
fix(files): close the round-2 review findings
mzxchandra Sep 2, 2026
868e34d
fix(files): scope the picker from either half of the folder pair
mzxchandra Sep 2, 2026
3f96215
docs(files): say that a folder constrains a canonical id too
mzxchandra Sep 2, 2026
e71ba1f
fix(files): keep the root scope on a named append, edit or insert
mzxchandra Sep 2, 2026
b7470a2
fix(files): keep multi-folder search serializable and reclaim a stran…
mzxchandra Sep 2, 2026
cab6afd
fix(files): normalize a slash-omitted folder path instead of discardi…
mzxchandra Sep 2, 2026
01dbdad
docs(files): say what the search coverage flag actually covers
mzxchandra Sep 2, 2026
62fc234
Update apps/sim/lib/api/contracts/v2/openapi/files-audit.ts
mzxchandra Sep 2, 2026
d28e2d1
refactor(files): make the folder scope one advanced field, always rec…
mzxchandra Sep 2, 2026
823640b
chore(docs): regenerate the spec after the conflict-example wording c…
mzxchandra Sep 2, 2026
1f60e10
fix(files): let an exact file id win over a lookalike name
mzxchandra Sep 2, 2026
6f51939
fix(files): refuse an out-of-scope file id instead of matching a look…
mzxchandra Sep 2, 2026
e8e0d2e
feat(files): bring back Include Subfolders, in the advanced fields
mzxchandra Sep 2, 2026
068a163
Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components…
mzxchandra Sep 2, 2026
d46ea28
feat(files): complete folder scoping across surfaces
icecrasher321 Sep 2, 2026
a8dd9cf
test(files): align generated API and folder scope coverage
icecrasher321 Sep 2, 2026
aa33549
fix(files): close folder scope review gaps
icecrasher321 Sep 2, 2026
041fe42
feat(files): add anchor-based file edits
icecrasher321 Sep 2, 2026
e05944c
fix(files): harden scoped edit operations
icecrasher321 Sep 2, 2026
fcc2369
fix(files): preserve scoped listing semantics
icecrasher321 Sep 2, 2026
b2764fb
fix(files): bound expanded edit output
icecrasher321 Sep 2, 2026
dfb07a7
fix(files): keep replacement content literal
icecrasher321 Sep 2, 2026
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
51 changes: 51 additions & 0 deletions apps/docs/content/docs/cli/files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Also available as `sim files folders ls`.
| `--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`. |
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
| `--recursive <value>` | No | Whether parentPath includes every descendant instead of direct children only. Accepted values: `true`, `1`, `yes`, `on`, `y`, `enabled`, `false`, `0`, `no`, `off`, `n`, `disabled`. |
| `--depth <value>` | No | Deepest level below parentPath to include when recursive is true. |

</CommandTable>

Expand Down Expand Up @@ -172,6 +174,32 @@ sim files delete <fileId> [options]

</CommandTable>

## Apply one exact or anchor-based edit to a text file

```bash
sim files edit <fileId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | File identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--edit <json\|@file>` | Yes | One edit object: &#123;"mode":"search_replace","search":"old","content":"new","replaceAll":false&#125;, &#123;"mode":"replace_between","beforeAnchor":"start line","afterAnchor":"end line","content":"new"&#125;, &#123;"mode":"insert_after","anchor":"line","content":"new"&#125;, or &#123;"mode":"delete_between","startAnchor":"first line deleted","endAnchor":"ending line kept"&#125;. Anchored modes also accept occurrence starting at 1 (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

## Show file metadata and sharing status

```bash
Expand Down Expand Up @@ -310,6 +338,8 @@ sim files read <fileId> [options]
| Option | Required | Description |
| --- | --- | --- |
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
| `--offset <value>` | No | First line to return, 1-based. Absent starts at the first line. |
| `--limit <value>` | No | How many lines to return from `offset`. Absent reads to the end. |

</CommandTable>

Expand Down Expand Up @@ -355,6 +385,27 @@ sim files restore <fileId>

</CommandTable>

## Search file content

```bash
sim files search [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--query <value>` | Yes | Regular expression, or exact text when `mode` is `exact`. |
| `--mode <value>` | No | How `query` is read. Accepted values: `exact`, `regex`. |
| `--max-results <value>` | No | Maximum matching lines to return. |
| `--folder <value...>` | No | Folders to search, by path as shown in the app; omit to search the whole workspace (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
| `--include-subfolders` | No | Whether each folder scope includes nested folders; on by default. |
| `--no-include-subfolders` | No | Send --include-subfolders as false. |

</CommandTable>

## Unzip an archive into a new folder beside it

```bash
Expand Down
55 changes: 55 additions & 0 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@ Also available as `sim files folders ls`.
| `--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`. |
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
| `--recursive <value>` | No | Whether parentPath includes every descendant instead of direct children only. Accepted values: `true`, `1`, `yes`, `on`, `y`, `enabled`, `false`, `0`, `no`, `off`, `n`, `disabled`. |
| `--depth <value>` | No | Deepest level below parentPath to include when recursive is true. |

</CommandTable>

Expand Down Expand Up @@ -858,6 +860,34 @@ sim files delete <fileId> [options]

</CommandTable>

### sim files edit

Apply one exact or anchor-based edit to a text file

```bash
sim files edit <fileId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `fileId` | Yes | File identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--edit <json\|@file>` | Yes | One edit object: &#123;"mode":"search_replace","search":"old","content":"new","replaceAll":false&#125;, &#123;"mode":"replace_between","beforeAnchor":"start line","afterAnchor":"end line","content":"new"&#125;, &#123;"mode":"insert_after","anchor":"line","content":"new"&#125;, or &#123;"mode":"delete_between","startAnchor":"first line deleted","endAnchor":"ending line kept"&#125;. Anchored modes also accept occurrence starting at 1 (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

### sim files describe

Show file metadata and sharing status
Expand Down Expand Up @@ -1006,6 +1036,8 @@ sim files read <fileId> [options]
| Option | Required | Description |
| --- | --- | --- |
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
| `--offset <value>` | No | First line to return, 1-based. Absent starts at the first line. |
| `--limit <value>` | No | How many lines to return from `offset`. Absent reads to the end. |

</CommandTable>

Expand Down Expand Up @@ -1055,6 +1087,29 @@ sim files restore <fileId>

</CommandTable>

### sim files search

Search File Content

```bash
sim files search [options]
```

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--query <value>` | Yes | Regular expression, or exact text when `mode` is `exact`. |
| `--mode <value>` | No | How `query` is read. Accepted values: `exact`, `regex`. |
| `--max-results <value>` | No | Maximum matching lines to return. |
| `--folder <value...>` | No | Folders to search, by path as shown in the app; omit to search the whole workspace (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
| `--include-subfolders` | No | Whether each folder scope includes nested folders; on by default. |
| `--no-include-subfolders` | No | Send --include-subfolders as false. |

</CommandTable>

### sim files unzip

Unzip an archive into a new folder beside it
Expand Down
Loading
Loading