instabox 0.8.201 → 0.8.203

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/cli/SHA256SUMS CHANGED
@@ -1,6 +1,6 @@
1
- 38416fa3961094c4dfef9a081e2d7b9ec2cd2c957e0e4e2bb694ccd16afe71b7 instabox-darwin-amd64
2
- 5a5d8bfcdc315df4b85154579e3d3917bd951666cfc02d3fb3d665441099a8e5 instabox-darwin-arm64
3
- 6136e3467111d51276da8297a1ba92f7e34df6d9add7f445fcccbf1a9251f420 instabox-linux-amd64
4
- 7d2703eba9963f0c383afe00d15323a31ad9ea54b00010484634cd3c68f0ef34 instabox-linux-arm64
5
- 255179fe9ae5c9c7041bd3e041932069c904e04fedee3aebf0768e5ebb64883b instabox-windows-amd64.exe
6
- 664e3d140730fba19b944a5c23e36ee6f6b67a7c2e62bcb15440f21334a08f8d instabox-windows-arm64.exe
1
+ e86020ce6005918942cbe21f227fdc8b92dcd5bed48680fb76366e139c7cf8e5 instabox-darwin-amd64
2
+ 067faedb41e90521806e8a774892be0b0d456d1b97d97a9e73150c77db77c4db instabox-darwin-arm64
3
+ c9a7fdc00ff5fad6f84657947a67b711c11493f414590d37dc3b8f76e6cbf6fa instabox-linux-amd64
4
+ 6a92faf3d6db53f7aed25a4094beb058c032a5e857daa5e59c2456f9b14599d0 instabox-linux-arm64
5
+ e4d91900942d720a8d17f1012abf60adbc74853567543f85865a94e971726257 instabox-windows-amd64.exe
6
+ b308f0cc3cb8d96897de91c9a7713432078394161008e95e1b4d3ed290244199 instabox-windows-arm64.exe
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instabox",
3
- "version": "0.8.201",
3
+ "version": "0.8.203",
4
4
  "description": "A cloud box for your coding agent, the instabox CLI and its agent skills in one command: npx instabox@latest",
5
5
  "type": "module",
6
6
  "bin": {
@@ -58,6 +58,7 @@ instabox create --name work # new box; waits until it is run
58
58
  instabox create --name work --setup-file ./setup.sh # then runs the script in it
59
59
  instabox create --devcontainer # from ./.devcontainer/devcontainer.json (no Dev Containers CLI needed)
60
60
  instabox ls # your boxes and their states
61
+ instabox ls --meta session=$SESSION # only the boxes with that metadata (create --meta session=$SESSION)
61
62
  instabox ssh work # interactive shell (leave with: exit; Ctrl+V pastes a local clipboard PNG)
62
63
  instabox exec work -- uname -a # one command, no SSH client needed
63
64
  instabox exec work --cwd /data/home -- ls -la # exec runs `bash -lc` as the box's user
@@ -86,6 +87,8 @@ instabox rm --yes work # delete the box (without --yes
86
87
  - `create` options: `--template T` or `--snapshot S`, `--vcpus N --mem-mib M` (a size of the plan, see Sizes), `--auto-suspend D|0`, `--max-run-minutes N`, `--delete-after D` (delete it D after creation, 1m-24h, whatever its state), `--meta K=V`, `--org O`, `--secrets all|NAME,NAME|none`, `--no-wait`, `--setup-file PATH|-` (`--wait-setup`), `--fail-fast` (when no host has room, fail at once and create nothing instead of failing the create after; with `--snapshot`, instead of creating it stopped).
87
88
  - `create --setup-file PATH` (`-`: stdin; at most 64 KB) runs that script in the new box once it is running, in HOME as the box's user (by its `#!` line, else with bash; CRLF line endings become LF), and prints its output; it replaces create + push + exec for provisioning. A failing script makes `create` exit with the script's code and keeps the box: debug it with `instabox exec work -- /tmp/instabox-setup.sh`. With `--json` the sandbox object gets a `setup` object (`exitCode`, `stdout`, `stderr`, `signal`, `timedOut`, `truncated`, `durationMs`). `create` always waits for the script (`--wait-setup` names that; `=false` is refused) and keeps its state in the box's metadata, so `instabox get work --json` shows it later: `metadata.setupStatus` (`pending`, `running`, `succeeded`, `failed`), `setupExitCode` (`124`: timed out) and `setupLog` (the last 512 characters of its stdout then stderr). The script is killed after `--setup-timeout` (default and at most 10m); for longer installs, use `ssh`. A missing, empty or over-64 KB file is refused before any box is created. `run --setup-file` does the same before its command, with its `-e` variables; when the script fails, run's `--json` `exitCode` is the script's. The script stays at `/tmp/instabox-setup.sh` (and in snapshots), so keep credentials out of it.
88
89
  - `create --devcontainer [PATH|DIR]` (also `run --devcontainer`) builds a box from a repo's devcontainer.json (default `.devcontainer/devcontainer.json` or `.devcontainer.json` here; JSONC): it pushes the repo into `workspaceFolder` (default `/workspaces/<dir>`), writes `containerEnv`/`remoteEnv` to `/etc/profile.d/instabox-devcontainer.sh` (login shells, nested `bash -l` and `instabox ssh BOX -- cmd` all get it; `PATH` entries appear once), installs `features` via their install.sh (ones the template already has, such as node/python/go/docker-in-docker/github-cli at the default version, are skipped), and runs `onCreateCommand`/`updateContentCommand`/`postCreateCommand`/`postStartCommand` in the workspace. Do not install the Dev Containers CLI in a box for this. `image`/`build`/compose are not booted (boxes are VM templates); the summary (stderr, or `--json`'s `devcontainer`: `applied`, `skipped`, `ports`, `steps`, `status`, `failedStep`) says what was skipped, and `forwardPorts` come with `instabox port-forward`/`port publish` commands. A failed step exits with its code and keeps the box (`metadata.setupStep` names it); `--name` defaults to the config's name. `${devcontainerId}` is the box's name; the summary shows commands as written (a `${localEnv:TOKEN}` is not printed), but the profile file keeps env values (readable by root and the box user's group, and in snapshots). In `run`, write `--devcontainer=PATH` when a command follows without `--`.
90
+ - To find the boxes your session made, tag each with `create --meta session=ID` and list them with `instabox ls --meta session=ID [--json]` (repeat `--meta` to match several pairs, all must match). The server filters, within your own orgs only. Do not keep box IDs by hand or probe for 404s.
91
+ - `create --ready-timeout D` (1s-1h): if the box is not running D after the request, `create` tries to delete it and exits 6 with `create_timeout` within seconds (Ctrl-C while it waits does the same, exit 130). The server deletes a box only once its create has ended, so a create still running is left: the `--json` error then has `deleted: false` and `createRunning: true`, and `hint` gives the `instabox rm --yes` command to run once `instabox get` no longer shows it creating. `deleted` is `true` only once the delete is confirmed; `deletePending: true` (with `deleteOperationId`) means the delete was requested but not confirmed within 20 s, so check with `instabox get` and `rm` it if it is still there. Always check `deleted`; add `--delete-after` as a backstop. `machineId` names the box (absent only when the create request got no answer: check with `instabox get NAME`). It bounds only the create, not the box's life: a box ready in time runs as usual. The setup script and devcontainer are not counted. On exit 6, create again or try another size or template.
89
92
  - Idle auto-pause defaults to 30 minutes. Paid boxes allow any whole minute from 5 to 30 (a part minute, below 5m or above 30m is refused, nothing created), or `0` to turn it off. Free boxes keep 30 minutes unless an admin grants an idle override; asking another value on a free box fails (`spec_not_allowed`, exit 5, nothing created), so leave `--auto-suspend` out there. Idle means no agent working, no terminal use and little CPU. `create --json` and `get --json` show the effective setting as `autoSuspendAfterSeconds` (`0`: off), and `readyAt` minus `createdAt` is the create time.
90
93
  - Max run minutes is independent of idle activity: `-1` is unlimited, `0` pauses immediately, and a positive integer forces a pause after that many running minutes. Free boxes default to a managed 480-minute cap that only an admin session can override; paid boxes default to `-1` and can change it. With dynamic runtime enabled, free runs start at 120 minutes; work can extend the deadline, up to 480 minutes total. Read the current `maxRunMinutes` and `runStartedAt` instead of assuming a fixed deadline. Lease renewals and wake requests do not earn extensions. An idle override does not permit changes to a free box's runtime cap. The first limit reached pauses the box; both timers restart after sleep and wake.
91
94
  - A runtime pause blocks every wake path during a server-configured cooldown, 5 to 20 minutes by default (`409 machine_cooldown` with `Retry-After`). On the free plan, back-to-back max-run pauses rest longer: 60 to 75 minutes for the 2nd in a row and 120 to 135 for later ones; the count starts over when a run ends with no cooldown owed (idle pause, a user pause or stop) or starts 2 hours or more after the last cooldown. A security lock (up to 24 h) is a cooldown too and keeps the count. Wait until the `cooldownUntil` deadline shown by `instabox get`; edits cannot clear it. Afterward, a box that paused itself (idle or runtime) wakes on `exec`, `ssh`, `files`, a public port request or `instabox wake <box>`. A box you paused (`instabox suspend`) or stopped does not wake on any of these, `wake` included: run `instabox resume <box>` or `instabox start <box>`. A zero runtime cap must be changed before waking. A normal pause preserves memory and processes.
@@ -106,7 +109,7 @@ instabox rm --yes work # delete the box (without --yes
106
109
  - To hand a task to a coding agent inside the box, use `instabox agent`: `instabox agent prompt work [--provider claude|codex] [--model M] [--new | --resume ID] [--attach FILE] [--cwd D] [--env K=V] [-f] [--json] "text"` starts a turn as a background job (`claude -p --output-format stream-json` or `codex exec --json`, permission prompts and sandboxing skipped: the box is the boundary) and prints the conversation ID (`--json`: `{conversationId, turn, jobId, pid}`; `-f` follows the turn and exits with its code). `instabox agent events work [-c ID] [-f] [--json]` prints the conversation's events, one JSON object per line: the agent's own, between `instabox.turn` (with the prompt) and `instabox.turn_end` (`exitCode`, `interrupted`). `instabox agent steer work [-c ID] "text"` interrupts the running turn, if any, and resumes the agent's session with the text; `instabox agent interrupt work [-c ID]` stops the turn (INT, then TERM, then KILL); `instabox agent ls work [--json]` lists conversations (status `running`, `idle`, `interrupted`, `failed(N)` or `lost`). Without `-c`, the conversation prompted last. The agent needs its key in the box's environment: `ANTHROPIC_API_KEY` (or `CLAUDE_CODE_OAUTH_TOKEN`) for claude, `OPENAI_API_KEY` (or `CODEX_API_KEY`) for codex, from an org Secret the box selects, or `--env`; the CLI warns when none is set. When the template lacks the agent CLI, the first turn installs it with npm into `~/.instabox/agent-cli` (an `instabox.install` event), or fails with an `instabox.error` event when there is no npm. State lives in `~/.instabox/agents/<id>` in the box. A turn waiting on the model API looks idle to auto-suspend (network does not count), so keep `agent events -f` (or `prompt -f`) going for a long turn you need to finish.
107
110
  - A box that does not boot, is unreachable, or failed to start or resume: `instabox logs work` prints its console log (kernel and systemd boot messages) and its last 20 operations with their errors, in any state, without waking it. Add `-f` to follow it or `--json` for `GET /v1/machines/{id}/logs`.
108
111
  - Output: `--json` (or `-o json`) works on every command (each command's `-h` lists it); the only exceptions are `ssh`, `mosh` and `port-forward`, which are interactive and refuse it with the JSON error code `json_unsupported` (use `exec --json`). With JSON output a failure prints `{"error":{"code","message",...}}` on stdout instead of text on stderr and still exits non-zero (2 for usage errors, code `usage`); API errors keep the server's `code`, `status`, `requestId` and `retryable` (present when true). Piped, the list and status commands (`ls`, `get`, `templates`, `usage`, `snapshot ls`, `port ls`, `keys ls`, `secrets ls`, `vault ls`, `workspace ls|get|members|invites`) print JSON on their own, so `instabox ls | jq` works; `--output table` or `INSTABOX_NO_AUTO_JSON=1` keeps the table. `exec`, `ssh`, `files` and the other commands print the same output piped or not.
109
- - Exit codes: a failed command exits 1 for any other error, 2 usage, 3 auth (not signed in, a bad or expired key, no permission: 401/403), 4 not found (404), 5 quota or plan limit (`quota_exceeded`, `credit_exhausted`, `spend_limit_reached`, `spec_not_allowed`, other 402/429), 75 retryable (`retryable: true`, such as `no_capacity` and `host_unavailable`, or another 5xx; retry with backoff; except `restart` on a box restarting itself after a reboot inside it: nothing to do, do not rerun `restart`). `--json` errors exit the same way. Commands that run something (`exec`, `ssh`, `jobs wait`, `output`, `run`, ...) exit with its code instead. Branch on the code (`case $? in 4) ...`), not on message text.
112
+ - Exit codes: a failed command exits 1 for any other error, 2 usage, 3 auth (not signed in, a bad or expired key, no permission: 401/403), 4 not found (404), 5 quota or plan limit (`quota_exceeded`, `credit_exhausted`, `spend_limit_reached`, `spec_not_allowed`, other 402/429), 6 `create --ready-timeout` passed (`create_timeout`: the box was not ready in time; `deleted` says whether it was deleted), 75 retryable (`retryable: true`, such as `no_capacity` and `host_unavailable`, or another 5xx; retry with backoff; except `restart` on a box restarting itself after a reboot inside it: nothing to do, do not rerun `restart`). `--json` errors exit the same way. Commands that run something (`exec`, `ssh`, `jobs wait`, `output`, `run`, ...) exit with its code instead. Branch on the code (`case $? in 4) ...`), not on message text.
110
113
  - The box's HOME has `MACHINE.md` (which box it is, its size, what survives a stop, the installed tools) and `AGENTS.md`, a moment after it starts. They are reference for when a task needs a fact about the box, not steps to run first.
111
114
  - A public URL for a web server in the box: `instabox port publish work 3000` prints it (`instabox port ls`, `instabox port unpublish work 3000`). The URL works while the box runs. A request wakes a box that paused itself for being idle; a box you paused or stopped answers `503` (Sandbox offline) until you `instabox resume` or `instabox start` it.
112
115
  - A raw TCP service (Postgres, Redis) reachable from anywhere, where the server enables it: `instabox port publish work 5432 --tcp` prints `5432-<id>.<tcp domain>:443`; clients connect with TLS and that host as SNI (`psql "host=<host> port=443 sslmode=require user=postgres"`). Otherwise, or for a private tunnel, use `instabox port-forward work 5432`.