@insforge/instabox-sdk 0.8.0 → 0.9.0
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 -8
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/skills/instabox/SKILL.md +10 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insforge/instabox-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "TypeScript SDK for instabox: create sandboxes on Firecracker dev machines, run commands, move files, pause, resume, snapshot, publish ports and SSH in.",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "TypeScript SDK for instabox: create sandboxes on Firecracker dev machines, run commands, move files, pause, resume, resize, snapshot, publish ports and SSH in.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
package/skills/instabox/SKILL.md
CHANGED
|
@@ -16,14 +16,14 @@ export INSTABOX_API_URL=https://api.instabox.sh
|
|
|
16
16
|
|
|
17
17
|
Obtain keys from the dashboard's API Keys page or `instabox keys create`. If no key is configured, ask the user to configure one. Never print keys, commit them, or put them into metadata.
|
|
18
18
|
|
|
19
|
-
| Scope | Operations
|
|
20
|
-
| ----------------- |
|
|
21
|
-
| `machines:read` | List/get machines, templates and operations, a machine's Vault view, published ports
|
|
22
|
-
| `machines:write` | Create, start, stop, pause, resume, metadata, exec, SSH, Vault push, publish and unpublish ports |
|
|
23
|
-
| `machines:delete` | Delete machines
|
|
24
|
-
| `images:read` | List/get snapshots and resolve snapshot names
|
|
25
|
-
| `images:write` | Save a stopped machine as a snapshot
|
|
26
|
-
| `images:delete` | Delete snapshots
|
|
19
|
+
| Scope | Operations |
|
|
20
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `machines:read` | List/get machines, templates and operations, a machine's Vault view, published ports |
|
|
22
|
+
| `machines:write` | Create, start, stop, pause, resume, resize, metadata, exec, SSH, Vault push, publish and unpublish ports |
|
|
23
|
+
| `machines:delete` | Delete machines |
|
|
24
|
+
| `images:read` | List/get snapshots and resolve snapshot names |
|
|
25
|
+
| `images:write` | Save a stopped machine as a snapshot |
|
|
26
|
+
| `images:delete` | Delete snapshots |
|
|
27
27
|
|
|
28
28
|
The current API calls snapshot scopes `images:*`. Write and delete imply read. Keys cannot manage keys or use admin routes. A `403 insufficient_scope` requires the relevant scope; do not retry it.
|
|
29
29
|
|
|
@@ -58,6 +58,8 @@ Drive the desktop with `box.desktop`: `start()`, `open(url)`, `screenshot()` (PN
|
|
|
58
58
|
|
|
59
59
|
Give a server in the box an HTTPS URL with `box.ports.publish(port, { name?, access?: 'public' | 'private' })`. It returns `{ url, access, token?, tokenUrl? }`, and WebSockets pass through. Use the returned `url`, never build one. A private port's `tokenUrl` comes only from the publish that created or rotated its token. `ports.list()` and `ports.unpublish(port)` manage them.
|
|
60
60
|
|
|
61
|
+
On a paid plan, `box.resize({ vcpus, memMiB })` moves the box to another of the plan's sizes. A running or paused box is restarted for it: files stay, processes do not. A size the plan does not offer throws `spec_not_allowed`.
|
|
62
|
+
|
|
61
63
|
Save and restore a private snapshot with the required snapshot scopes:
|
|
62
64
|
|
|
63
65
|
```ts
|