@tangle-network/sandbox-cli 0.8.3-develop.20260623083050.fc79e13 → 0.8.3-develop.20260623145823.af08643
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 +11 -0
- package/dist/index.mjs +13 -11
- package/hub-reference.md +79 -11
- package/package.json +4 -4
package/hub-reference.md
CHANGED
|
@@ -40,7 +40,7 @@ tangle hub connections --json
|
|
|
40
40
|
{
|
|
41
41
|
"connections": [
|
|
42
42
|
{
|
|
43
|
-
"id": "
|
|
43
|
+
"id": "hubconn_github_a1",
|
|
44
44
|
"providerId": "github",
|
|
45
45
|
"displayName": "GitHub",
|
|
46
46
|
"accountDisplay": "octocat",
|
|
@@ -59,6 +59,25 @@ Connection `status`: `active`, `revoked`, `unhealthy`, `reconnect_required`.
|
|
|
59
59
|
|
|
60
60
|
Connection `health`: `unknown`, `healthy`, `unhealthy`, `rate_limited`.
|
|
61
61
|
|
|
62
|
+
#### Connection references
|
|
63
|
+
|
|
64
|
+
Anywhere a command takes a connection (`--connection`, `connections revoke`,
|
|
65
|
+
`agent --connection`), you may pass a raw connection id (`hubconn_...`) or a
|
|
66
|
+
human reference instead:
|
|
67
|
+
|
|
68
|
+
- `<provider>` — e.g. `github`, resolves when you hold exactly one connection
|
|
69
|
+
for that provider.
|
|
70
|
+
- `<provider>:<account>` — e.g. `gmail:alice@example.com`, disambiguates when
|
|
71
|
+
you hold several connections for one provider (matches `accountDisplay` or
|
|
72
|
+
`displayName`).
|
|
73
|
+
|
|
74
|
+
A reference resolves against `tangle hub connections`; revoked connections are
|
|
75
|
+
skipped. If it matches no connection, or more than one, the CLI fails loud and
|
|
76
|
+
lists the candidates so you can pass an id or `provider:account`. Raw ids never
|
|
77
|
+
contact the hub for resolution. The `agent --connection` head is followed by
|
|
78
|
+
`:capabilities`, so it accepts a provider or an id but not `provider:account` —
|
|
79
|
+
use an id when a provider is ambiguous there.
|
|
80
|
+
|
|
62
81
|
### OAuth Connect
|
|
63
82
|
|
|
64
83
|
```bash
|
|
@@ -196,7 +215,7 @@ tangle hub approvals list --json
|
|
|
196
215
|
"approvals": [
|
|
197
216
|
{
|
|
198
217
|
"id": "app_xxx",
|
|
199
|
-
"connectionId": "
|
|
218
|
+
"connectionId": "hubconn_github_a1",
|
|
200
219
|
"providerId": "github",
|
|
201
220
|
"actionPath": "github.issues.create",
|
|
202
221
|
"inputHash": "sha256:...",
|
|
@@ -224,7 +243,7 @@ tangle hub approvals deny app_xxx --json
|
|
|
224
243
|
"approval": {
|
|
225
244
|
"id": "app_xxx",
|
|
226
245
|
"status": "approved",
|
|
227
|
-
"connectionId": "
|
|
246
|
+
"connectionId": "hubconn_github_a1",
|
|
228
247
|
"actionPath": "github.issues.create"
|
|
229
248
|
},
|
|
230
249
|
"capabilityToken": {
|
|
@@ -239,7 +258,7 @@ tangle hub approvals deny app_xxx --json
|
|
|
239
258
|
### Permissions
|
|
240
259
|
|
|
241
260
|
```bash
|
|
242
|
-
tangle hub permissions list --connection
|
|
261
|
+
tangle hub permissions list --connection hubconn_github_a1 --json
|
|
243
262
|
```
|
|
244
263
|
|
|
245
264
|
```json
|
|
@@ -247,7 +266,7 @@ tangle hub permissions list --connection conn_xxx --json
|
|
|
247
266
|
"policies": [
|
|
248
267
|
{
|
|
249
268
|
"id": "pol_xxx",
|
|
250
|
-
"connectionId": "
|
|
269
|
+
"connectionId": "hubconn_github_a1",
|
|
251
270
|
"providerId": "github",
|
|
252
271
|
"actionPath": "github.issues.create",
|
|
253
272
|
"decision": "ask",
|
|
@@ -263,14 +282,14 @@ tangle hub permissions list --connection conn_xxx --json
|
|
|
263
282
|
### Permission Set
|
|
264
283
|
|
|
265
284
|
```bash
|
|
266
|
-
tangle hub permissions set --connection
|
|
285
|
+
tangle hub permissions set --connection hubconn_github_a1 --action github.issues.create --decision allow --json
|
|
267
286
|
```
|
|
268
287
|
|
|
269
288
|
```json
|
|
270
289
|
{
|
|
271
290
|
"policy": {
|
|
272
291
|
"id": "pol_xxx",
|
|
273
|
-
"connectionId": "
|
|
292
|
+
"connectionId": "hubconn_github_a1",
|
|
274
293
|
"providerId": "github",
|
|
275
294
|
"actionPath": "github.issues.create",
|
|
276
295
|
"decision": "allow",
|
|
@@ -280,6 +299,55 @@ tangle hub permissions set --connection conn_xxx --action github.issues.create -
|
|
|
280
299
|
}
|
|
281
300
|
```
|
|
282
301
|
|
|
302
|
+
### Granting connections to an agent
|
|
303
|
+
|
|
304
|
+
`tangle agent prompt`/`tangle agent task` expose granted hub connections to the
|
|
305
|
+
agent as MCP tools with `--connection <spec>` (repeatable). Three modes, from
|
|
306
|
+
least to most privilege:
|
|
307
|
+
|
|
308
|
+
The spec head is a connection id or a provider name (see
|
|
309
|
+
[Connection references](#connection-references)).
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Least privilege (recommended): the agent sees exactly these tool paths.
|
|
313
|
+
tangle agent task sbx_123 "triage issues" \
|
|
314
|
+
--connection github:github.issues.listIssues,github.issues.create
|
|
315
|
+
|
|
316
|
+
# All capabilities of one connection (by id when a provider is ambiguous).
|
|
317
|
+
tangle agent task sbx_123 "triage issues" --connection hubconn_github_a1:*
|
|
318
|
+
|
|
319
|
+
# All capabilities of every connected provider (broadest).
|
|
320
|
+
tangle agent task sbx_123 "do the thing" --connection '*:*'
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
A grant controls what the agent can **see**. Each call is still policy-gated
|
|
324
|
+
(`allow`/`ask`/`deny`); by default reads are allowed and writes/destructive
|
|
325
|
+
actions prompt for approval.
|
|
326
|
+
|
|
327
|
+
### `--allow-writes`
|
|
328
|
+
|
|
329
|
+
Pre-approve every **write** action of each granted connection so an autonomous
|
|
330
|
+
run can write without per-action prompts. Reads are already allowed; destructive
|
|
331
|
+
actions still prompt. The grant is persistent and scoped to the named
|
|
332
|
+
connections only.
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
tangle agent task sbx_123 "file the weekly report" \
|
|
336
|
+
--connection github:* --allow-writes
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
Revert the bulk grant at any time — it deletes only the rows `--allow-writes`
|
|
340
|
+
created, leaving manual `permissions set` decisions intact:
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
tangle hub permissions revert-writes --connection github
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
> `--allow-writes` needs a named connection (id or provider); the `*:*`
|
|
347
|
+
> wildcard can't be bulk-granted. Pass `--no-hub-key` (or set
|
|
348
|
+
> `TANGLE_SKIP_HUB_KEY=1`) to skip auto-minting a platform Hub key and use your
|
|
349
|
+
> stored credential as-is.
|
|
350
|
+
|
|
283
351
|
## Error Format
|
|
284
352
|
|
|
285
353
|
```bash
|
|
@@ -345,7 +413,7 @@ tangle hub tools describe github.issues.listIssues --json
|
|
|
345
413
|
tangle hub exec github.issues.listIssues '{"owner":"tangle-network","repo":"agent-dev-container"}' --approve
|
|
346
414
|
|
|
347
415
|
# 5. Set permanent policy
|
|
348
|
-
tangle hub permissions set --connection
|
|
416
|
+
tangle hub permissions set --connection hubconn_github_a1 --action github.issues.listIssues --decision allow
|
|
349
417
|
```
|
|
350
418
|
|
|
351
419
|
### Batch Approvals
|
|
@@ -364,11 +432,11 @@ done
|
|
|
364
432
|
|
|
365
433
|
```bash
|
|
366
434
|
# Show all policies for one connection
|
|
367
|
-
tangle hub permissions list --connection
|
|
435
|
+
tangle hub permissions list --connection hubconn_github_a1 --json
|
|
368
436
|
|
|
369
437
|
# Set all read actions to allow, write actions to ask
|
|
370
|
-
tangle hub permissions set --connection
|
|
371
|
-
tangle hub permissions set --connection
|
|
438
|
+
tangle hub permissions set --connection hubconn_github_a1 --action github.issues.listIssues --decision allow
|
|
439
|
+
tangle hub permissions set --connection hubconn_github_a1 --action github.issues.create --decision ask
|
|
372
440
|
```
|
|
373
441
|
|
|
374
442
|
## GitHub App Primitives
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-cli",
|
|
3
|
-
"version": "0.8.3-develop.
|
|
3
|
+
"version": "0.8.3-develop.20260623145823.af08643",
|
|
4
4
|
"description": "CLI for Tangle Sandbox operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"hub-reference.md"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@tangle-network/agent-eval": "^0.
|
|
19
|
-
"@tangle-network/agent-runtime": "^0.
|
|
18
|
+
"@tangle-network/agent-eval": "^0.99.0",
|
|
19
|
+
"@tangle-network/agent-runtime": "^0.76.0",
|
|
20
20
|
"chalk": "^5.4.1",
|
|
21
21
|
"commander": "12.1.0",
|
|
22
22
|
"dotenv": "17.2.3",
|
|
23
23
|
"ora": "^9.4.0",
|
|
24
24
|
"ws": "^8.20.0",
|
|
25
25
|
"@tangle-network/hub-sdk": "0.2.2",
|
|
26
|
-
"@tangle-network/sandbox": "0.8.3-develop.
|
|
26
|
+
"@tangle-network/sandbox": "0.8.3-develop.20260623145823.af08643"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "25.6.0",
|