instabox 0.8.199 → 0.8.201

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
- a8c869b62ab08a43d071bdd2e7360f6842f9112e763cd77b11cb15313c57cff7 instabox-darwin-amd64
2
- 50c4ec4a70a5294b7c53f4dfbf7c03065f2aef85f6b2466d8b1c5ecc9df9b750 instabox-darwin-arm64
3
- a599ab1602d94de4dd8ccbc6e90d71a295d2915e0a07b6a1302ac90645200f25 instabox-linux-amd64
4
- 50f8c77c2930458d6567fee61215a5d1afd25fe0976ab6f8e12c9db50349bdce instabox-linux-arm64
5
- 8d1477d4036a93c6d4bdb4ba00bec06442ad1f5c69aa352bb6685c841e288c43 instabox-windows-amd64.exe
6
- a3e1d28695a86944d8c5d24555b7aa77c48c6dcde0970e2d4d0cc34d5b06b1f5 instabox-windows-arm64.exe
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
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.199",
3
+ "version": "0.8.201",
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": {
@@ -101,7 +101,7 @@ instabox rm --yes work # delete the box (without --yes
101
101
  - `instabox ps work [--all] [--json]` lists the processes running in the box (the server runs `ps` through exec, so it wakes a box that paused itself). Kernel threads and the listing's own processes (its shell, `ps`, `head` and the sshd sessions exec uses) are left out unless `--all`. `--json` prints an array of `{pid, ppid, user, cpuPercent, memPercent, elapsedSeconds, command}`: `instabox ps work --json | jq '.[] | select(.command | test("node"))'`. A stopped or manually paused box shows the list the server read just before it stopped or paused (a stderr note says when it is from), so you can see what was running when a box went down; a box that was never listed while running says so and asks you to start it.
102
102
  - `instabox history work [--limit N] [--json]` lists the commands run in the box through `exec` (by anyone: the CLI, the API, other agents; not SSH sessions), newest first, with ID, start time, duration and exit code, also while the box is stopped. The server keeps the newest 200 with the first 64 KiB of each output stream. `instabox output work [ex_<id>]` prints a past command's stored stdout and stderr (the last command's by default) and exits with its exit code, as `exec` did; `--json` gives `{id, command, cwd, startedAt, durationMs, status, exitCode, stdout, stderr, ...}`. Use them to find out what an earlier session or another agent ran in a box and what it printed, instead of rerunning it. The `jobs` polls and `ps` are not recorded; `exec --background` is recorded as `exec --background: <cmd>` (its output is in `jobs logs`).
103
103
  - To copy a box (try something risky, or run agents side by side from the same state), use `instabox fork work [--name N] [--count N] [--keep-snapshot] [--json]` (`clone` works too): the server copies `work`'s disks (running or stopped) on its host into `--count` boxes (1-5) with the same template and size and boots them, in a few seconds and with no snapshot (memory and running programs are not copied); with an older server that has no native fork, or with `--keep-snapshot`, it saves a snapshot, creates the boxes from it and deletes the snapshot, also on error or Ctrl-C, unless `--keep-snapshot`; a suspended box is copied neither way, so resume it first. `work` is not changed. The boxes keep `work`'s idle pause, max-run, metadata and delete time (the same moment) unless you pass `--auto-suspend`, `--max-run-minutes`, `--meta` or `--delete-after`. Several boxes are named `N-1` to `N-N`; each box counts toward the plan's starts a minute, which fork waits out (as long as the server says, up to 5 times). When the workspace cannot run `--count` more boxes, fork creates none, says how many fit and exits 5: retry with that `--count`, or stop or pause boxes first. If the source's size is no longer one of the plan's sizes, pass `--vcpus N --mem-mib M`. On a failure part-way it prints which boxes were created; they are kept, so delete those you do not need. `--json` prints `{source, machines, native, snapshotId, snapshotName, kept, snapshotMs, createMs, totalMs}` (`native` true: no snapshot was used).
104
- - `exec` returns the command's exit code and takes `--stdin` to pipe input (any size up to 5 GiB, binary too: `instabox exec work --stdin -- tar -xz -C /data/workspace < src.tgz`; past 1 MiB the CLI uploads it as a file first). A CLI built before 2026-10-26 refuses stdin past 1 MiB (`stdin is larger than 1048576 bytes`): run `instabox update` instead of splitting the input. A big file can also go in with `push`, then exec reads it: `instabox push work bundle.tgz /tmp/` and `instabox exec work -- tar -xzf /tmp/bundle.tgz -C /data/workspace`. push checks the SHA-256 and sends a file of 64 MiB or more as parallel parts by itself; past 5 GiB, `split` the file, push the parts, and `cat` them together in the box. `exec --json` prints one object instead of the raw output (`stdout`, `stderr`, `exitCode`, `signal`, `timedOut`, `truncated`, `invalidUtf8`, `durationMs`) and still exits with the command's code: `instabox exec work --json -- make test | jq .exitCode`. exec output is UTF-8 text: each stream is cut at 1 MiB (`truncated`; `--stream` has no cap) and bytes that are not UTF-8 become U+FFFD (`invalidUtf8`), so never copy a file out with `exec -- cat` (an APK or tarball comes back corrupt); use `pull`/`cp`. A cut is noted on stderr and keeps the exit code; when the command exits 0 but its output was binary, exec says so on stderr and exits 65 (its own code, like 75 and 125, so it never looks like the command's). `exec --stream` prints the output as the command writes it instead of at the end (same timeout and exit code; with `--json`, one `{"type":"stdout"|"stderr","data"}` object per line, then `{"type":"exit","exitCode",...}`), so you can watch a build or test run as it goes. It stops the command after `--timeout` seconds: 60 by default, 600 at most (whole seconds; `run`'s also takes `90s` or `5m`). A larger or unparsable value is a one-line usage error, exit 2. It returns when the command exits, even if it left a process running in the background (`instabox exec work -- 'nohup ./server >server.log 2>&1 &'` returns at once and the server keeps running); background output written later than about a second after the exit is not returned, and a background process that still writes to exec's stdout or stderr after that gets a broken pipe (it may die, or a server may drop requests), so send both to a file (`>log 2>&1`) or use `exec --background`. Run longer commands (installs, builds, test suites) over SSH, which also returns the exit code: `instabox ssh work -- 'cd /data/workspace/app && npm ci'`. The box's runtime cap still applies during SSH or exec.
104
+ - `exec` returns the command's exit code and takes `--stdin` to pipe input (any size up to 5 GiB, binary too: `instabox exec work --stdin -- tar -xz -C /data/workspace < src.tgz`; past 1 MiB the CLI uploads it as a file first). A CLI built before 2026-10-26 refuses stdin past 1 MiB (`stdin is larger than 1048576 bytes`): run `instabox update` instead of splitting the input. Without `--stdin`, input piped to exec is refused with exit 2 instead of dropped; `--stdin=false` runs the command and leaves the input unread (a `while read` loop around exec). A big file can also go in with `push`, then exec reads it: `instabox push work bundle.tgz /tmp/` and `instabox exec work -- tar -xzf /tmp/bundle.tgz -C /data/workspace`. push checks the SHA-256 and sends a file of 64 MiB or more as parallel parts by itself; past 5 GiB, `split` the file, push the parts, and `cat` them together in the box. `exec --json` prints one object instead of the raw output (`stdout`, `stderr`, `exitCode`, `signal`, `timedOut`, `truncated`, `invalidUtf8`, `durationMs`) and still exits with the command's code: `instabox exec work --json -- make test | jq .exitCode`. exec output is UTF-8 text: each stream is cut at 1 MiB (`truncated`; `--stream` has no cap) and bytes that are not UTF-8 become U+FFFD (`invalidUtf8`), so never copy a file out with `exec -- cat` (an APK or tarball comes back corrupt); use `pull`/`cp`. A cut is noted on stderr and keeps the exit code; when the command exits 0 but its output was binary, exec says so on stderr and exits 65 (its own code, like 75 and 125, so it never looks like the command's). `exec --stream` prints the output as the command writes it instead of at the end (same timeout and exit code; with `--json`, one `{"type":"stdout"|"stderr","data"}` object per line, then `{"type":"exit","exitCode",...}`), so you can watch a build or test run as it goes. It stops the command after `--timeout` seconds: 60 by default, 600 at most (whole seconds; `run`'s also takes `90s` or `5m`). A larger or unparsable value is a one-line usage error, exit 2. It returns when the command exits, even if it left a process running in the background (`instabox exec work -- 'nohup ./server >server.log 2>&1 &'` returns at once and the server keeps running); background output written later than about a second after the exit is not returned, and a background process that still writes to exec's stdout or stderr after that gets a broken pipe (it may die, or a server may drop requests), so send both to a file (`>log 2>&1`) or use `exec --background`. Run longer commands (installs, builds, test suites) over SSH, which also returns the exit code: `instabox ssh work -- 'cd /data/workspace/app && npm ci'`. The box's runtime cap still applies during SSH or exec.
105
105
  - For work past 600 s, or to keep going while you do something else, start a background job: `instabox exec --background work -- 'npm run build'` prints a job ID at once (`--json`: `{jobId, pid}`); then `instabox jobs ls work`, `instabox jobs logs work <job> -f` (streams until it ends, exits with its code; Ctrl-C leaves the job running), `instabox jobs wait work <job> [--timeout 30m]` and `instabox jobs kill work <job> [--signal KILL]` (the whole process group). This is the CLI polling over plain exec calls. A job holds no activity lease: only its CPU use, or a running `jobs wait`/`logs -f`, counts as activity, so keep `jobs wait` going for a quiet job you need to finish. A pause freezes the job and it carries on after resume; a stop ends jobs (`exited(143)`, or `lost` after a hard stop).
106
106
  - 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
107
  - 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`.