Skip to content

Commit 7dac487

Browse files
feat(sandboxes): add application operations, v2 API, and CLI commands (#7442)
* feat(sandboxes): add application operations, v2 API, and CLI commands * fix(docs): pin the combined OpenAPI document with the sandbox paths and tag * fix(sandboxes): spend the build budget after validation, conceal workspace ids on item routes, read manifest files in the CLI * fix(sandboxes): exempt delete from the write budget and stop describing runtime installs as images * fix(sandboxes): describe comment entries accurately and give the resources document a name-collision conflict example * fix(sandboxes): scope comment handling to manifest input and keep the shared conflict example generic * fix(cli): state inline list semantics beside the manifest-file rule in list flag help
1 parent c60a128 commit 7dac487

65 files changed

Lines changed: 5956 additions & 889 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/api-reference/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"(generated)/mcp-servers",
2020
"(generated)/skills",
2121
"(generated)/custom-tools",
22+
"(generated)/sandboxes",
2223
"(generated)/credentials",
2324
"(generated)/secrets",
2425
"(generated)/billing",

apps/docs/content/docs/cli/commands.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ These apply to every command, and may be written before or after it.
4343
| [`sim logs`](/cli/logs) | Manage logs |
4444
| [`sim mcp-servers`](/cli/mcp-servers) | Manage mcp servers |
4545
| [`sim meta`](/cli/meta) | Manage meta |
46+
| [`sim sandboxes`](/cli/sandboxes) | Manage sandboxes |
4647
| [`sim secrets`](/cli/secrets) | Manage secrets |
4748
| [`sim skills`](/cli/skills) | Manage skills |
4849
| [`sim tables`](/cli/tables) | Manage tables |

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"logs",
2525
"mcp-servers",
2626
"meta",
27+
"sandboxes",
2728
"secrets",
2829
"skills",
2930
"tables",

apps/docs/content/docs/cli/reference.mdx

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,131 @@ Show what this API supports and which limits apply
27412741
sim meta status
27422742
```
27432743

2744+
## sim sandboxes
2745+
2746+
Also spelled `sim sandbox`.
2747+
2748+
### sim sandboxes create
2749+
2750+
Create Sandbox (personal API key required)
2751+
2752+
```bash
2753+
sim sandboxes create [options]
2754+
```
2755+
2756+
**Options**
2757+
2758+
<CommandTable>
2759+
2760+
| Option | Required | Description |
2761+
| --- | --- | --- |
2762+
| `--name <value>` | Yes | Display name, unique within the workspace; 1 to 64 characters. |
2763+
| `--language <value>` | Yes | Dependency ecosystem: `javascript` installs from npm, `python` from PyPI. Accepted values: `javascript`, `python`. |
2764+
| `--dependencies <value...>` | No | Package specifiers installed into the sandbox, one per entry. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
2765+
| `--cli-tools <value...>` | No | Pinned managed CLI ids installed into the sandbox, at most 10, no duplicates. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
2766+
| `--system-packages <value...>` | No | Debian packages installed into the sandbox, one per entry. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
2767+
2768+
</CommandTable>
2769+
2770+
### sim sandboxes delete
2771+
2772+
Delete Sandbox (personal API key required)
2773+
2774+
```bash
2775+
sim sandboxes delete <sandboxId> [options]
2776+
```
2777+
2778+
**Arguments**
2779+
2780+
<CommandTable>
2781+
2782+
| Argument | Required | Description |
2783+
| --- | --- | --- |
2784+
| `sandboxId` | Yes | Unique sandbox identifier. |
2785+
2786+
</CommandTable>
2787+
2788+
**Options**
2789+
2790+
<CommandTable>
2791+
2792+
| Option | Required | Description |
2793+
| --- | --- | --- |
2794+
| `-y, --yes` | Yes | Confirm this operation. |
2795+
2796+
</CommandTable>
2797+
2798+
### sim sandboxes get
2799+
2800+
Get Sandbox
2801+
2802+
```bash
2803+
sim sandboxes get <sandboxId>
2804+
```
2805+
2806+
**Arguments**
2807+
2808+
<CommandTable>
2809+
2810+
| Argument | Required | Description |
2811+
| --- | --- | --- |
2812+
| `sandboxId` | Yes | Unique sandbox identifier. |
2813+
2814+
</CommandTable>
2815+
2816+
### sim sandboxes list
2817+
2818+
List Sandboxes
2819+
2820+
```bash
2821+
sim sandboxes list [options]
2822+
```
2823+
2824+
**Options**
2825+
2826+
<CommandTable>
2827+
2828+
| Option | Required | Description |
2829+
| --- | --- | --- |
2830+
| `--search <value>` | No | Case-insensitive substring match against the sandbox name. |
2831+
| `--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`. |
2832+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
2833+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
2834+
2835+
</CommandTable>
2836+
2837+
### sim sandboxes update
2838+
2839+
Update Sandbox (personal API key required)
2840+
2841+
```bash
2842+
sim sandboxes update <sandboxId> [options]
2843+
```
2844+
2845+
**Arguments**
2846+
2847+
<CommandTable>
2848+
2849+
| Argument | Required | Description |
2850+
| --- | --- | --- |
2851+
| `sandboxId` | Yes | Unique sandbox identifier. |
2852+
2853+
</CommandTable>
2854+
2855+
**Options**
2856+
2857+
<CommandTable>
2858+
2859+
| Option | Required | Description |
2860+
| --- | --- | --- |
2861+
| `--name <value>` | No | New display name, unique within the workspace; 1 to 64 characters. |
2862+
| `--language <value>` | No | Replacement dependency ecosystem. The whole spec is revalidated against it, so a Python dependency list does not survive a switch to JavaScript. Accepted values: `javascript`, `python`. |
2863+
| `--dependencies <value...>` | No | Replacement package list; replaces the whole list. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
2864+
| `--cli-tools <value...>` | No | Replacement managed CLI list; replaces the whole list. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
2865+
| `--system-packages <value...>` | No | Replacement Debian package list; replaces the whole list. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
2866+
2867+
</CommandTable>
2868+
27442869
## sim secrets
27452870

27462871
Also spelled `sim secret`.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: Sandboxes
3+
description: Manage sandboxes — every subcommand, argument, and flag
4+
---
5+
6+
import { CommandTable } from '@/components/ui/command-table'
7+
8+
`sim sandboxes` is also spelled `sim sandbox`.
9+
10+
Every command below also accepts the [global options](/cli/commands#global-options).
11+
12+
## Create sandbox
13+
14+
```bash
15+
sim sandboxes create [options]
16+
```
17+
18+
Create Sandbox (personal API key required)
19+
20+
**Options**
21+
22+
<CommandTable>
23+
24+
| Option | Required | Description |
25+
| --- | --- | --- |
26+
| `--name <value>` | Yes | Display name, unique within the workspace; 1 to 64 characters. |
27+
| `--language <value>` | Yes | Dependency ecosystem: `javascript` installs from npm, `python` from PyPI. Accepted values: `javascript`, `python`. |
28+
| `--dependencies <value...>` | No | Package specifiers installed into the sandbox, one per entry. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
29+
| `--cli-tools <value...>` | No | Pinned managed CLI ids installed into the sandbox, at most 10, no duplicates. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
30+
| `--system-packages <value...>` | No | Debian packages installed into the sandbox, one per entry. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
31+
32+
</CommandTable>
33+
34+
## Delete sandbox
35+
36+
```bash
37+
sim sandboxes delete <sandboxId> [options]
38+
```
39+
40+
Delete Sandbox (personal API key required)
41+
42+
**Arguments**
43+
44+
<CommandTable>
45+
46+
| Argument | Required | Description |
47+
| --- | --- | --- |
48+
| `sandboxId` | Yes | Unique sandbox identifier. |
49+
50+
</CommandTable>
51+
52+
**Options**
53+
54+
<CommandTable>
55+
56+
| Option | Required | Description |
57+
| --- | --- | --- |
58+
| `-y, --yes` | Yes | Confirm this operation. |
59+
60+
</CommandTable>
61+
62+
## Get sandbox
63+
64+
```bash
65+
sim sandboxes get <sandboxId>
66+
```
67+
68+
**Arguments**
69+
70+
<CommandTable>
71+
72+
| Argument | Required | Description |
73+
| --- | --- | --- |
74+
| `sandboxId` | Yes | Unique sandbox identifier. |
75+
76+
</CommandTable>
77+
78+
## List sandboxes
79+
80+
```bash
81+
sim sandboxes list [options]
82+
```
83+
84+
**Options**
85+
86+
<CommandTable>
87+
88+
| Option | Required | Description |
89+
| --- | --- | --- |
90+
| `--search <value>` | No | Case-insensitive substring match against the sandbox name. |
91+
| `--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`. |
92+
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
93+
| `--limit <n>` | No | Maximum items to return (0 for everything). Defaults to `100`. |
94+
95+
</CommandTable>
96+
97+
## Update sandbox
98+
99+
```bash
100+
sim sandboxes update <sandboxId> [options]
101+
```
102+
103+
Update Sandbox (personal API key required)
104+
105+
**Arguments**
106+
107+
<CommandTable>
108+
109+
| Argument | Required | Description |
110+
| --- | --- | --- |
111+
| `sandboxId` | Yes | Unique sandbox identifier. |
112+
113+
</CommandTable>
114+
115+
**Options**
116+
117+
<CommandTable>
118+
119+
| Option | Required | Description |
120+
| --- | --- | --- |
121+
| `--name <value>` | No | New display name, unique within the workspace; 1 to 64 characters. |
122+
| `--language <value>` | No | Replacement dependency ecosystem. The whole spec is revalidated against it, so a Python dependency list does not survive a switch to JavaScript. Accepted values: `javascript`, `python`. |
123+
| `--dependencies <value...>` | No | Replacement package list; replaces the whole list. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
124+
| `--cli-tools <value...>` | No | Replacement managed CLI list; replaces the whole list. (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
125+
| `--system-packages <value...>` | No | Replacement Debian package list; replaces the whole list. (space-separated, or @path / @- with one value per line; in a file, blank lines and # comments are ignored, while inline values are sent as typed and may not be empty; @@value for a literal leading @). |
126+
127+
</CommandTable>

apps/docs/content/docs/platform/enterprise/access-control.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Controls the modules, actions, and credentials available to group members. Every
9797
|---------|---------------------------|
9898
| Chat | Revokes Chat. Members cannot ask Sim to build or edit anything. |
9999
| Sim Mailer | Revokes the Sim Mailer inbox. Members cannot read or send mail. |
100+
| Sandboxes | Revokes the Sandboxes module. Members cannot view, create, or change a workspace sandbox. |
100101

101102
**Knowledge Base**
102103

apps/docs/lib/openapi-download.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('OpenAPI download', () => {
3333
const tags = document.tags as Array<{ name: string }>
3434

3535
expect(document.openapi).toBe('3.1.0')
36-
expect(Object.keys(paths)).toHaveLength(130)
36+
expect(Object.keys(paths)).toHaveLength(132)
3737
expect(tags.map((tag) => tag.name)).toEqual([
3838
'Workflows',
3939
'Workflow Runs',
@@ -48,6 +48,7 @@ describe('OpenAPI download', () => {
4848
'MCP Servers',
4949
'Skills',
5050
'Custom Tools',
51+
'Sandboxes',
5152
'Credentials',
5253
'Secrets',
5354
'Catalog',

0 commit comments

Comments
 (0)