@tangle-network/sandbox-cli 0.13.0-develop.20260726092610.cc3ee18 → 0.13.0-develop.20260726134409.bbd1d33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -13
- package/SKILL.md +22 -25
- package/dist/index.mjs +16 -16
- package/hub-reference.md +12 -11
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -30,7 +30,9 @@ npx @tangle-network/sandbox-cli sandbox list
|
|
|
30
30
|
npx tangle-sandbox --help
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Never run bare `npx tangle` (or `npx tangle-cli`)
|
|
33
|
+
Never run bare `npx tangle` (or `npx tangle-cli`).
|
|
34
|
+
Those npm names belong to unrelated third-party packages and would execute someone else's code.
|
|
35
|
+
The official names are `@tangle-network/sandbox-cli` and its forwarding alias `tangle-sandbox`.
|
|
34
36
|
|
|
35
37
|
Install globally to expose the short `tangle` binary on PATH:
|
|
36
38
|
|
|
@@ -56,14 +58,13 @@ Three flows are supported:
|
|
|
56
58
|
|
|
57
59
|
- **Browser login** (default): `tangle auth login` opens a browser to complete OAuth with `github`, `google`, or `microsoft` identity providers.
|
|
58
60
|
- **Device code**: `tangle auth login --no-browser` for headless environments.
|
|
59
|
-
- **API key**: `tangle auth login --api-key sk-tan-...` (or set `TANGLE_API_KEY
|
|
61
|
+
- **API key**: `tangle auth login --api-key sk-tan-...` (or set `TANGLE_API_KEY`).
|
|
60
62
|
|
|
61
63
|
Credential lookup precedence:
|
|
62
64
|
|
|
63
65
|
1. `--api-key` flag
|
|
64
|
-
2. `TANGLE_API_KEY` environment variable
|
|
65
|
-
3. `
|
|
66
|
-
4. `~/.tangle/credentials` (populated by `tangle auth login`)
|
|
66
|
+
2. `TANGLE_API_KEY` environment variable
|
|
67
|
+
3. `~/.tangle/credentials` (populated by `tangle auth login`)
|
|
67
68
|
|
|
68
69
|
Common commands:
|
|
69
70
|
|
|
@@ -112,14 +113,14 @@ tangle sandbox delete sbx_123
|
|
|
112
113
|
tangle exec sbx_123 "npm test"
|
|
113
114
|
tangle ssh sbx_123
|
|
114
115
|
tangle agent prompt sbx_123 "Summarize this repo"
|
|
115
|
-
tangle agent
|
|
116
|
+
tangle agent prompt sbx_123 "Fix the failing tests"
|
|
116
117
|
tangle fleet create --count 4 --coordinator
|
|
117
118
|
|
|
118
119
|
# grant hub connections to the agent (see hub-reference.md for the 3 modes).
|
|
119
120
|
# the connection is an id or a provider name (resolved via `tangle hub connections`).
|
|
120
|
-
tangle agent
|
|
121
|
+
tangle agent prompt sbx_123 "triage issues" \
|
|
121
122
|
--connection github:github.issues.search,github.issues.create
|
|
122
|
-
tangle agent
|
|
123
|
+
tangle agent prompt sbx_123 "file the report" --connection github:* --allow-writes
|
|
123
124
|
|
|
124
125
|
# temporary GPU for an eval; omitted provider picks the cheapest configured cloud
|
|
125
126
|
tangle sandbox gpu run sbx_123 \
|
|
@@ -138,7 +139,7 @@ tangle fs ls sbx_123 /workspace
|
|
|
138
139
|
```
|
|
139
140
|
|
|
140
141
|
Hub commands (`tangle hub …`) and `tangle agent --connection` auto-mint a
|
|
141
|
-
short-lived platform Hub key from your `tangle auth login` session
|
|
142
|
+
short-lived platform Hub key from your `tangle auth login` session, with no separate
|
|
142
143
|
key needed. See [`hub-reference.md`](./hub-reference.md) for the `--connection`
|
|
143
144
|
grant modes, `--allow-writes`, and `permissions revert-writes`.
|
|
144
145
|
|
|
@@ -197,7 +198,3 @@ Run `tangle sandbox create --help` for the current flag list.
|
|
|
197
198
|
## Limitations
|
|
198
199
|
|
|
199
200
|
- `snapshot restore` creates a new sandbox from a snapshot; the command signature suggests in-place restore.
|
|
200
|
-
|
|
201
|
-
## Design Follow-Up
|
|
202
|
-
|
|
203
|
-
For the architecture review, parity checklist, and auth flow spec, see [CHECKLIST.md](./CHECKLIST.md).
|
package/SKILL.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tangle-cli
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use Tangle Sandbox CLI for lifecycle, prompts, files, fleets, Hub tools, and integrations.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tangle CLI
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
`tangle` is the CLI for Tangle Sandbox operations
|
|
10
|
+
`tangle` is the CLI for Tangle Sandbox operations: create sandboxes, run agents, execute hub tools, and manage files, secrets, snapshots, and git.
|
|
11
|
+
All commands support `--help` for inline reference.
|
|
11
12
|
|
|
12
13
|
## Auth
|
|
13
14
|
|
|
@@ -16,7 +17,7 @@ Generic command auth modes, resolved in order:
|
|
|
16
17
|
| Priority | Source | Set via |
|
|
17
18
|
|----------|--------|--------|
|
|
18
19
|
| 1 | CLI flag | `--api-key <key>` |
|
|
19
|
-
| 2 | Env var | `TANGLE_API_KEY`
|
|
20
|
+
| 2 | Env var | `TANGLE_API_KEY` |
|
|
20
21
|
| 3 | Profile store | `tangle auth login` (keychain or file) |
|
|
21
22
|
|
|
22
23
|
Hub commands resolve auth in this order:
|
|
@@ -25,10 +26,11 @@ Hub commands resolve auth in this order:
|
|
|
25
26
|
|----------|--------|--------|
|
|
26
27
|
| 1 | CLI flag | `--api-key <key>` |
|
|
27
28
|
| 2 | Hub capability | `TANGLE_HUB_CAPABILITY_TOKEN` |
|
|
28
|
-
| 3 | Env var | `TANGLE_API_KEY`
|
|
29
|
+
| 3 | Env var | `TANGLE_API_KEY` |
|
|
29
30
|
| 4 | Profile store | `tangle auth login` (keychain or file) |
|
|
30
31
|
|
|
31
|
-
**Inside a sandbox:** `tangle` is automatically authenticated.
|
|
32
|
+
**Inside a sandbox:** `tangle` is automatically authenticated.
|
|
33
|
+
No extra authentication is needed.
|
|
32
34
|
|
|
33
35
|
```bash
|
|
34
36
|
# Browser login (preferred)
|
|
@@ -48,7 +50,7 @@ tangle auth login --profile work
|
|
|
48
50
|
tangle auth profiles use work
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
For hub env auth, set **exactly one** of `TANGLE_API_KEY
|
|
53
|
+
For hub env auth, set **exactly one** of `TANGLE_API_KEY` or `TANGLE_HUB_CAPABILITY_TOKEN`.
|
|
52
54
|
|
|
53
55
|
## Sandbox Lifecycle
|
|
54
56
|
|
|
@@ -105,7 +107,7 @@ tangle fleet create --count 4 \
|
|
|
105
107
|
--gpu-idle-timeout 120
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
## Hub
|
|
110
|
+
## Full Hub Workflow
|
|
109
111
|
|
|
110
112
|
Hub lets agents use connected provider tools (GitHub, etc.) through Tangle without seeing provider OAuth tokens.
|
|
111
113
|
|
|
@@ -141,7 +143,7 @@ tangle hub tools describe github.issues.search --json
|
|
|
141
143
|
|
|
142
144
|
### Tool Execution
|
|
143
145
|
|
|
144
|
-
Two equivalent commands
|
|
146
|
+
Two equivalent commands are available: `call` and `exec`.
|
|
145
147
|
|
|
146
148
|
```bash
|
|
147
149
|
# Basic call: <path tokens...> <json-input>
|
|
@@ -154,7 +156,8 @@ tangle hub call github issues createIssue '{"owner":"foo","repo":"bar","title":"
|
|
|
154
156
|
|
|
155
157
|
### Policy & Approvals
|
|
156
158
|
|
|
157
|
-
Tools default to `ask` policy
|
|
159
|
+
Tools default to the `ask` policy.
|
|
160
|
+
They pause and require approval on first use.
|
|
158
161
|
|
|
159
162
|
```bash
|
|
160
163
|
# List pending approvals
|
|
@@ -210,20 +213,14 @@ tangle secret update DATABASE_URL "new-value"
|
|
|
210
213
|
tangle secret delete DATABASE_URL
|
|
211
214
|
```
|
|
212
215
|
|
|
213
|
-
## Snapshots
|
|
216
|
+
## Snapshots
|
|
214
217
|
|
|
215
218
|
```bash
|
|
216
|
-
# Snapshots (point-in-time for cloning/restoring)
|
|
217
219
|
tangle snapshot create <sandbox-id>
|
|
218
220
|
tangle snapshot list <sandbox-id>
|
|
219
221
|
tangle snapshot restore <sandbox-id> <snapshot-id> # creates new sandbox
|
|
220
222
|
tangle snapshot revert <sandbox-id> <snapshot-id> # reverts in-place
|
|
221
223
|
tangle snapshot delete <sandbox-id> <snapshot-id>
|
|
222
|
-
|
|
223
|
-
# Checkpoints (lightweight, local)
|
|
224
|
-
tangle checkpoint create <id>
|
|
225
|
-
tangle checkpoint list|ls <id>
|
|
226
|
-
tangle checkpoint delete|rm <id> <checkpoint-id>
|
|
227
224
|
```
|
|
228
225
|
|
|
229
226
|
## Templates
|
|
@@ -260,7 +257,7 @@ tangle team invitations [team] # List pending/historical invitations
|
|
|
260
257
|
## Workflows
|
|
261
258
|
|
|
262
259
|
Authenticate with the `sk-tan-*` API key (`TANGLE_API_KEY`), same as the other
|
|
263
|
-
platform commands
|
|
260
|
+
platform commands, not a hub capability token.
|
|
264
261
|
|
|
265
262
|
```bash
|
|
266
263
|
tangle workflows validate workflow.yml
|
|
@@ -337,22 +334,22 @@ tangle permissions add <sandboxId> --userId <userId> --role editor
|
|
|
337
334
|
|
|
338
335
|
| Goal | Commands |
|
|
339
336
|
|------|----------|
|
|
340
|
-
| Spin up sandbox, run agent | `tangle sandbox create --name X` → `tangle agent
|
|
337
|
+
| Spin up sandbox, run agent | `tangle sandbox create --name X` → `tangle agent prompt <id> "..."` |
|
|
341
338
|
| Connect GitHub, read issues | `tangle hub connect github` → `tangle hub tools search "issues" --provider github` → `tangle hub call github issues search '{"q":"repo:X/Y is:issue"}'` |
|
|
342
339
|
| Push code from sandbox to GitHub | `tangle hub connect github` → `tangle git add <id> files` → `tangle git commit <id> -m "msg"` → `tangle git push <id>` |
|
|
343
340
|
| Save and restore state | `tangle snapshot create <id>` → ...work... → `tangle snapshot revert <id> <snap-id>` |
|
|
344
341
|
| Set secret for agent use | `tangle secret create GITHUB_TOKEN "..."` → agent reads via `process.env.GITHUB_TOKEN` |
|
|
345
342
|
| Set hub permissions | `tangle hub permissions set --connection conn_xxx --action github.issues.createIssue --decision allow` |
|
|
346
|
-
| Batch parallel agent
|
|
343
|
+
| Batch parallel agent prompts | `tangle batch run --tasks tasks.json` (array of `{sandboxId, message}`) |
|
|
347
344
|
|
|
348
345
|
## Common Mistakes
|
|
349
346
|
|
|
350
|
-
- **Forgetting `--reveal` on `secret show
|
|
351
|
-
- **Using API-key env and `TANGLE_HUB_CAPABILITY_TOKEN` together for hub
|
|
352
|
-
- **Calling hub tools without `--approve` on first use
|
|
353
|
-
- **Missing `--json`
|
|
354
|
-
- **`tangle hub exec` vs `tangle exec
|
|
355
|
-
- **`hub resume`
|
|
347
|
+
- **Forgetting `--reveal` on `secret show`:** values are hidden by default for safety.
|
|
348
|
+
- **Using API-key env and `TANGLE_HUB_CAPABILITY_TOKEN` together for hub:** set exactly one env auth source, or use `--api-key` to override both.
|
|
349
|
+
- **Calling hub tools without `--approve` on first use:** use `--approve` or set policy to `allow` first.
|
|
350
|
+
- **Missing `--json` when piping output:** many commands need explicit `--json` for machine-readable output.
|
|
351
|
+
- **`tangle hub exec` vs `tangle exec`:** `hub exec` runs hub tools; `exec` runs shell commands in a sandbox.
|
|
352
|
+
- **`hub resume` does not replay:** after `hub resume --accept`, rerun the original `hub exec` with `--approve`.
|
|
356
353
|
|
|
357
354
|
## Token Safety
|
|
358
355
|
|