@parcha/agentrun-computer 0.1.0-beta.58 → 0.1.0-beta.59
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 +187 -62
- package/box/Dockerfile +4 -3
- package/box/install.sh +57 -11
- package/dist/agent37.js +6 -9
- package/dist/attach.d.ts +24 -4
- package/dist/attach.js +50 -19
- package/dist/boxd.js +22 -9
- package/dist/browserbase.d.ts +6 -2
- package/dist/browserbase.js +50 -7
- package/dist/child-env.d.ts +11 -0
- package/dist/child-env.js +22 -0
- package/dist/chrome.d.ts +5 -2
- package/dist/chrome.js +5 -2
- package/dist/cloudflare.d.ts +2 -0
- package/dist/cloudflare.js +5 -3
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/computerd.json +1 -1
- package/dist/conformance/agent37.d.ts +10 -38
- package/dist/conformance/agent37.js +25 -113
- package/dist/conformance/archil.d.ts +13 -3
- package/dist/conformance/archil.js +22 -17
- package/dist/conformance/boxd.d.ts +8 -31
- package/dist/conformance/boxd.js +19 -74
- package/dist/conformance/browserbase.d.ts +3 -6
- package/dist/conformance/browserbase.js +6 -17
- package/dist/conformance/cases/health.js +6 -3
- package/dist/conformance/cli.d.ts +3 -1
- package/dist/conformance/cli.js +69 -9
- package/dist/conformance/cloudflare.d.ts +3 -6
- package/dist/conformance/cloudflare.js +7 -15
- package/dist/conformance/daytona.d.ts +6 -20
- package/dist/conformance/daytona.js +22 -57
- package/dist/conformance/dial-only.d.ts +4 -3
- package/dist/conformance/dial-only.js +3 -3
- package/dist/conformance/docker.d.ts +4 -5
- package/dist/conformance/docker.js +8 -14
- package/dist/conformance/e2b.d.ts +10 -36
- package/dist/conformance/e2b.js +27 -84
- package/dist/conformance/fly.d.ts +3 -6
- package/dist/conformance/fly.js +2 -6
- package/dist/conformance/groundbox.d.ts +7 -23
- package/dist/conformance/groundbox.js +16 -56
- package/dist/conformance/index.d.ts +1 -0
- package/dist/conformance/index.js +1 -0
- package/dist/conformance/kernel.d.ts +3 -6
- package/dist/conformance/kernel.js +5 -15
- package/dist/conformance/kind.d.ts +0 -6
- package/dist/conformance/kind.js +0 -4
- package/dist/conformance/local-chrome.d.ts +5 -7
- package/dist/conformance/local-chrome.js +7 -11
- package/dist/conformance/modal.d.ts +10 -38
- package/dist/conformance/modal.js +27 -74
- package/dist/conformance/module-kit.d.ts +87 -0
- package/dist/conformance/module-kit.js +88 -0
- package/dist/conformance/morph.d.ts +7 -23
- package/dist/conformance/morph.js +20 -66
- package/dist/conformance/orgo.d.ts +5 -10
- package/dist/conformance/orgo.js +15 -27
- package/dist/conformance/phone-harness.d.ts +3 -5
- package/dist/conformance/phone-harness.js +3 -11
- package/dist/conformance/runner.d.ts +13 -3
- package/dist/conformance/runner.js +32 -11
- package/dist/conformance/smolcloud.d.ts +7 -23
- package/dist/conformance/smolcloud.js +16 -49
- package/dist/conformance/sweep.d.ts +10 -5
- package/dist/conformance/sweep.js +91 -38
- package/dist/conformance/tti.d.ts +69 -0
- package/dist/conformance/tti.js +205 -0
- package/dist/conformance/types.d.ts +9 -2
- package/dist/daytona.js +60 -20
- package/dist/descriptor.d.ts +10 -0
- package/dist/descriptor.js +7 -0
- package/dist/descriptors/browserbase.d.ts +3 -0
- package/dist/descriptors/browserbase.js +4 -0
- package/dist/descriptors/docker.d.ts +1 -0
- package/dist/descriptors/docker.js +3 -0
- package/dist/descriptors/env-names.d.ts +32 -0
- package/dist/descriptors/env-names.js +60 -0
- package/dist/descriptors/index.d.ts +9 -2
- package/dist/descriptors/kernel.d.ts +3 -0
- package/dist/descriptors/kernel.js +2 -0
- package/dist/descriptors/local-chrome.d.ts +1 -1
- package/dist/descriptors/local-chrome.js +5 -3
- package/dist/descriptors/phone-harness.d.ts +1 -1
- package/dist/descriptors/phone-harness.js +4 -2
- package/dist/docker/egress.d.ts +7 -0
- package/dist/docker/egress.js +8 -0
- package/dist/docker/image.d.ts +5 -1
- package/dist/docker/image.js +12 -8
- package/dist/docker.d.ts +52 -13
- package/dist/docker.js +166 -92
- package/dist/drift.js +6 -6
- package/dist/e2b.d.ts +2 -2
- package/dist/e2b.js +2 -3
- package/dist/groundbox.js +6 -6
- package/dist/host.d.ts +23 -0
- package/dist/hosted/download.d.ts +23 -0
- package/dist/hosted/download.js +144 -0
- package/dist/hosted/process.d.ts +5 -0
- package/dist/hosted/process.js +20 -0
- package/dist/hosted/provider.js +120 -48
- package/dist/hosted/rest.d.ts +19 -8
- package/dist/hosted/rest.js +47 -14
- package/dist/hosted/scripts.d.ts +10 -0
- package/dist/hosted/scripts.js +23 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/janitor.d.ts +7 -1
- package/dist/janitor.js +2 -2
- package/dist/kernel.js +1 -1
- package/dist/local-chrome.d.ts +5 -2
- package/dist/local-chrome.js +4 -2
- package/dist/local-supervisor.js +1 -0
- package/dist/modal.d.ts +6 -5
- package/dist/modal.js +7 -7
- package/dist/morph.js +5 -8
- package/dist/orgo-channel.d.ts +3 -2
- package/dist/orgo-channel.js +3 -3
- package/dist/orgo-desktop.js +2 -4
- package/dist/orgo.js +2 -4
- package/dist/phone-harness.d.ts +7 -5
- package/dist/phone-harness.js +60 -61
- package/dist/protocol.d.ts +10 -0
- package/dist/protocol.js +17 -0
- package/dist/provider.d.ts +6 -2
- package/dist/screen-watch.d.ts +6 -1
- package/dist/screen-watch.js +166 -12
- package/dist/vendor-sdk.d.ts +9 -0
- package/dist/vendor-sdk.js +26 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -710,7 +710,7 @@ fixtures of every evasion it catches.
|
|
|
710
710
|
```ts
|
|
711
711
|
import { DockerProvider } from "@parcha/agentrun-computer/docker";
|
|
712
712
|
|
|
713
|
-
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64" });
|
|
713
|
+
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64", env: process.env });
|
|
714
714
|
const made = await docker.create({ image: "debian:bookworm-slim", lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
715
715
|
if (!made.ok) throw new Error(made.error.message);
|
|
716
716
|
const connected = await docker.connect(made.value);
|
|
@@ -807,10 +807,11 @@ was deleted.
|
|
|
807
807
|
reported as a policy. `network(ref, policy)` returns the policy when it is the computer's (an allowlist with the same
|
|
808
808
|
entries, normalized, in any order); any change is refused: a Docker computer's network is fixed at create, since
|
|
809
809
|
Docker cannot move a container with no network onto one, and an allowlist needs its volume mounted at create.
|
|
810
|
-
- `release(ref, "stop" | "delete")`
|
|
811
|
-
computer
|
|
812
|
-
|
|
813
|
-
|
|
810
|
+
- `release(ref, "stop" | "delete")` finds the computer's egress proxy by its label (below), then runs `docker stop` on
|
|
811
|
+
the computer and then the proxy, or one `docker rm --force --volumes` of the computer and the proxy together, then on
|
|
812
|
+
delete removes its volume, found by its label too. A computer whose own stop or removal fails still has its proxy and
|
|
813
|
+
volume stopped or removed, and the computer's failure is the answer. `capabilities().release` declares both, and
|
|
814
|
+
`stopDeletes` is false: a stopped container is kept until it is deleted. A computer already gone is ok.
|
|
814
815
|
- Only containers with the label `agentrun.computer=1` and a computer's name count for `attach`, `list` and `network`;
|
|
815
816
|
any other container is `not_found`.
|
|
816
817
|
|
|
@@ -890,13 +891,18 @@ key.
|
|
|
890
891
|
then `docker pull` for one that is not; a failed pull fails create in words, with nothing made). It then makes the
|
|
891
892
|
volume, starts the proxy and waits for its ready line (`egress.readyMs`, 10 s), then runs the computer; both runs
|
|
892
893
|
take `--pull never`, so no pull happens between the volume and the computer. A proxy that ends first, or is not ready in time, fails create in its own words; the proxy and the
|
|
893
|
-
volume are removed, and the computer is never run. `release` removes the proxy
|
|
894
|
-
found by the label `agentrun.computer.egress=<computer>`, never by name alone,
|
|
895
|
-
`releaseOlder` remove them too.
|
|
894
|
+
volume are removed, and the computer is never run. `release` removes the proxy with the computer, in the same
|
|
895
|
+
`docker rm`, and then the volume, each found by the label `agentrun.computer.egress=<computer>`, never by name alone,
|
|
896
|
+
so the janitor's sweep and `releaseOlder` remove them too. A release cut off once that call is made leaves no proxy
|
|
897
|
+
running without its computer. Parts left with no computer (one removed by hand, or a provider that died between its
|
|
896
898
|
proxy and its computer) the sweep removes too (`sweepLeftovers`): a proxy or volume with the egress label, and the
|
|
897
|
-
sweep's labels,
|
|
898
|
-
|
|
899
|
-
|
|
899
|
+
sweep's labels, past its deadline label or older than a create could take (its ready wait and two minutes), and
|
|
900
|
+
whose computer is not there, read by name right before that part's removal (a read that fails keeps it). A sweep
|
|
901
|
+
given `mine` removes only the ones whose labels it answers true for, asked before the computer is read, so callers
|
|
902
|
+
sharing a Docker host each remove their own (serve: a run of its store that no claim holds). A part with an owner
|
|
903
|
+
label is never removed: Docker makes no agent's computer. Each is removed by what the label found, never by a name.
|
|
904
|
+
The volume carries the computer's deadline and the spec's labels for this. Until then the proxy stops forwarding at
|
|
905
|
+
its deadline.
|
|
900
906
|
- **Read-back.** `network`, `list` and `attach` read open or the allowlist from Docker: network mode none, the egress volume
|
|
901
907
|
read-only at its path, init's relay in its command, and a proxy container that carries the computer's label and
|
|
902
908
|
deadline, runs while the computer runs, is hardened and bounded as above (its memory and swap, pids limit, private
|
|
@@ -917,7 +923,7 @@ Docker): `/workspace` is only the mount.
|
|
|
917
923
|
import { WORKSPACE } from "@parcha/agentrun-computer";
|
|
918
924
|
import { DockerProvider } from "@parcha/agentrun-computer/docker";
|
|
919
925
|
|
|
920
|
-
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64" });
|
|
926
|
+
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64", env: process.env });
|
|
921
927
|
// The run folder must exist, by its canonical path, and be writable by docker.user (below).
|
|
922
928
|
const made = await docker.create({ image: "debian:bookworm-slim", lifetimeMs: 600_000, network: "none", mount: { kind: "bind", path: "/data/runs/r1/work" } }, { requestId: "r1#3" });
|
|
923
929
|
// In the computer: files.read({ path: `${WORKSPACE}/notes.md` }), exec.run({ argv: ["make"], cwd: WORKSPACE, ... })
|
|
@@ -1036,13 +1042,13 @@ no other process to wait on: Docker's own tag is the shared state.
|
|
|
1036
1042
|
```ts
|
|
1037
1043
|
import { DockerProvider } from "@parcha/agentrun-computer/docker";
|
|
1038
1044
|
|
|
1039
|
-
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64" }); // image: the default recipe
|
|
1045
|
+
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64", env: process.env }); // image: the default recipe
|
|
1040
1046
|
const image = await docker.image({ signal }); // built once; one inspect when Docker has it
|
|
1041
1047
|
if (!image.ok) throw new Error(image.error.message);
|
|
1042
1048
|
const made = await docker.create({ image: image.value, lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
1043
1049
|
```
|
|
1044
1050
|
|
|
1045
|
-
- `ensureImage(source, { docker?, signal?, timeoutMs?, onWait? })` (`src/docker/image.ts`) gives the tag. `source` is
|
|
1051
|
+
- `ensureImage(source, { docker?, env?, signal?, timeoutMs?, onWait? })` (`src/docker/image.ts`) gives the tag. `source` is
|
|
1046
1052
|
`{ recipe }`, a Dockerfile with no build context, or `{ image }`, an image by name.
|
|
1047
1053
|
- A recipe is built with `docker build --quiet --label agentrun.computer.recipe=<sha256> --tag
|
|
1048
1054
|
agentrun-computer:<first 12 hex digits> -`, the recipe on stdin (`recipeTag(recipe)`, `recipeHash(recipe)`,
|
|
@@ -1054,6 +1060,22 @@ const made = await docker.create({ image: image.value, lifetimeMs: 600_000, netw
|
|
|
1054
1060
|
image (`DEFAULT_DOCKER_IMAGE`): `python:3.12-slim` pinned by its index digest (`DOCKER_BASE`), with git, curl,
|
|
1055
1061
|
nodejs, npm, ripgrep and socat from apt. `docker.image({ signal?, timeoutMs?, onWait? })` is `ensureImage` of it with the
|
|
1056
1062
|
provider's docker CLI. A source that is neither throws at construction, in words.
|
|
1063
|
+
- **The docker CLI gets only what it reads.** The provider reads no environment: its `env` option is the host's (serve
|
|
1064
|
+
passes its own values of the docker descriptor's `hostEnv`), and every docker call it makes (`dockerArch`,
|
|
1065
|
+
`ensureImage` and the provider's own, each taking `env` too) is started with the names of it docker reads
|
|
1066
|
+
(`DOCKER_ENV_NAMES`), and none of the rest. Library callers pass `env` (serve does): without it docker gets no
|
|
1067
|
+
environment at all, so a bare `docker` is found only on the default path (`/usr/bin:/bin`), not in `/usr/local/bin` or
|
|
1068
|
+
a snap, and no credential helper is found on PATH; the `docker` option, the CLI's absolute path, is the other way to
|
|
1069
|
+
name it. The names: PATH, HOME, TMPDIR, the
|
|
1070
|
+
locale, `DOCKER_HOST`, `DOCKER_CONTEXT`, `DOCKER_CONFIG` and Docker's TLS, API and buildx settings, ssh's agent socket,
|
|
1071
|
+
`XDG_RUNTIME_DIR` and the proxy (either case), for a daemon or registry that is not local, and the places a pull's
|
|
1072
|
+
credential helper (`docker-credential-<name>` on PATH) looks: the Secret Service's bus, GnuPG's home and agent, an AWS
|
|
1073
|
+
profile, region and config file, gcloud's config. No key passes (`AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`,
|
|
1074
|
+
`AZURE_CLIENT_SECRET`, `DOCKER_CUSTOM_HEADERS`, a content trust passphrase), nor a name shaped as one, a pointer to a
|
|
1075
|
+
credential included (`AWS_SHARED_CREDENTIALS_FILE`, `AWS_WEB_IDENTITY_TOKEN_FILE`,
|
|
1076
|
+
`AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`, `GOOGLE_APPLICATION_CREDENTIALS`, `PASSWORD_STORE_DIR`). A helper that
|
|
1077
|
+
signs in from keys in the server's environment (ECR's, with access keys in env) gets none: give it a profile, the
|
|
1078
|
+
default credentials file or a role instead.
|
|
1057
1079
|
- **The image is an option only; there is no env name for it.** Another image is named with the `image` option, to
|
|
1058
1080
|
`new DockerProvider(...)` or to `create({ image: { image: "..." } })`. The library reads no environment (see
|
|
1059
1081
|
[Settings](#settings)), and Docker's conformance module reads no image name either: a `COMPUTER_DOCKER_IMAGE` in its
|
|
@@ -1217,7 +1239,7 @@ as a caller's labels, with no code of its own: Docker writes them with `--label`
|
|
|
1217
1239
|
import { releaseOlder, runLabels } from "@parcha/agentrun-computer";
|
|
1218
1240
|
import { DockerProvider } from "@parcha/agentrun-computer/docker";
|
|
1219
1241
|
|
|
1220
|
-
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64" });
|
|
1242
|
+
const docker = new DockerProvider({ daemonPath: "dist/computerd-linux-amd64", env: process.env });
|
|
1221
1243
|
// A claim at epoch 3 takes the run over: the computers of epochs 1 and 2 go first.
|
|
1222
1244
|
const older = await releaseOlder(docker, "r1", 3);
|
|
1223
1245
|
if (!older.ok) throw new Error(older.error.message); // fenced, or a computer that could not be released
|
|
@@ -1238,7 +1260,7 @@ vendor's types: the shared adapter's release, a create that deletes its machine,
|
|
|
1238
1260
|
## Modal
|
|
1239
1261
|
|
|
1240
1262
|
```ts
|
|
1241
|
-
import { ModalClient } from "modal"; //
|
|
1263
|
+
import { ModalClient } from "modal"; // this package's optional dependency; it imports nothing from the SDK at load
|
|
1242
1264
|
import { ModalProvider } from "@parcha/agentrun-computer/modal";
|
|
1243
1265
|
|
|
1244
1266
|
const modal = new ModalProvider({
|
|
@@ -1378,7 +1400,7 @@ unless they start with `modal_proto/`. Docs: modal.com, read 2026-11-05.
|
|
|
1378
1400
|
provider in `options.app` (required: without it, it refuses in words naming the option, before any client). It reads no
|
|
1379
1401
|
setting from the environment (see [Settings](#settings)) and passes the token to `ModalClient` explicitly, so a
|
|
1380
1402
|
`MODAL_TOKEN_ID` or `MODAL_TOKEN_SECRET` on the host is never used. The key goes only to `options.serverUrl` (https
|
|
1381
|
-
alone), else the SDK's default `https://api.modal.com
|
|
1403
|
+
alone), else the SDK's default `https://api.modal.com`: since the client cannot take a server, it refuses while `MODAL_SERVER_URL`
|
|
1382
1404
|
is set, and sets it to its choice only while it constructs the client, one construction at a time and put back after
|
|
1383
1405
|
each, so neither `MODAL_PROFILE` nor a profile in `MODAL_CONFIG_PATH` or `~/.modal.toml` can redirect the key. The
|
|
1384
1406
|
daemon is uploaded from `options.daemonPath`, else `dist/computerd-linux-amd64`, so a run publishes nothing.
|
|
@@ -1395,12 +1417,15 @@ declares no stop), and the Full `provider.janitor` case is skipped (`lifetime:ja
|
|
|
1395
1417
|
A live run is wrapped in the one sweep, with the same settings (it needs no live switch, since it makes nothing):
|
|
1396
1418
|
|
|
1397
1419
|
```sh
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1420
|
+
before="$(mktemp -d)/before.json" # each run its own: --before refuses a file that is already there
|
|
1421
|
+
node packages/computer/dist/conformance/sweep.js --provider modal --before "$before"
|
|
1422
|
+
AGENTRUN_COMPUTER_LIVE_MODAL=1 npm run conformance -w @parcha/agentrun-computer -- --provider modal --run "$(node -p 'require(process.argv[1]).run' "$before")"
|
|
1423
|
+
node packages/computer/dist/conformance/sweep.js --provider modal --after "$before"
|
|
1401
1424
|
```
|
|
1402
1425
|
|
|
1403
|
-
|
|
1426
|
+
`--after` deletes only the computers of the run the before file minted, the one `--run` names ([PROVIDERS.md](PROVIDERS.md),
|
|
1427
|
+
"The live sweep"). `npm run test:modal` runs the suite under its own run id, so it is no run this sweep wraps: its
|
|
1428
|
+
runner and its after hook delete what it made. Its output is `{"swept":n,"gone":m,"stillThere":[ids],"leftAlone":k}`, as for every provider on the adapter. The before
|
|
1404
1429
|
file records where it listed, the app and the server (`sweepScope`), and `--after` refuses, exit 2, before it lists
|
|
1405
1430
|
anything, a file of another app or server, or one that names none: every computer there would read as new.
|
|
1406
1431
|
|
|
@@ -1688,11 +1713,14 @@ The live sweep is the shared one, `dist/conformance/sweep.js --provider daytona
|
|
|
1688
1713
|
`COMPUTER_DAYTONA_API_URL` through the conformance module's `createHost`, with no live switch:
|
|
1689
1714
|
|
|
1690
1715
|
```sh
|
|
1691
|
-
|
|
1692
|
-
node packages/computer/dist/conformance/sweep.js --provider daytona --
|
|
1716
|
+
before="$(mktemp -d)/before.json" # each run its own: --before refuses a file that is already there
|
|
1717
|
+
node packages/computer/dist/conformance/sweep.js --provider daytona --before "$before" # before the run
|
|
1718
|
+
npm run conformance -w @parcha/agentrun-computer -- --provider daytona --run "$(node -p 'require(process.argv[1]).run' "$before")"
|
|
1719
|
+
node packages/computer/dist/conformance/sweep.js --provider daytona --after "$before" # after it
|
|
1693
1720
|
```
|
|
1694
1721
|
|
|
1695
|
-
|
|
1722
|
+
`--after` deletes only the computers of the run `--run` names, the id `--before` minted, so another run on the same
|
|
1723
|
+
account keeps its computers. It prints `{"swept":n,"gone":m,"stillThere":[ids],"leftAlone":k}` (`gone` was `notFound`). A conformance run of
|
|
1696
1724
|
Daytona also sweeps its own label through the host at its end (the report's `cleanup.sweep`).
|
|
1697
1725
|
|
|
1698
1726
|
### Daytona on dial
|
|
@@ -1711,9 +1739,13 @@ launch line E2B's dial runs (`dialLaunch`), with no rootOnly paths here. The URL
|
|
|
1711
1739
|
env, which the command inherits, and is on no command line. A session Daytona refuses fails create in its words, and
|
|
1712
1740
|
the sandbox is deleted. So the snapshot's entrypoint is not relied on: a box snapshot registered without one (name,
|
|
1713
1741
|
image and resources alone) dials too, and one whose entrypoint is the box CMD sleeps, with no `AGENTRUN_ATTACH_URL` in
|
|
1714
|
-
its env, so `agentrun-dial` never runs twice
|
|
1715
|
-
|
|
1716
|
-
|
|
1742
|
+
its env, so `agentrun-dial` never runs twice on its own. While create waits for the socket, it reads that command's
|
|
1743
|
+
exit (`dialExit`, the session's command of the id its start returned): an `agentrun-dial` that exited fails create at
|
|
1744
|
+
once, and an exit of 3 (its daemon fetch failed, after its own retries) or 5 (its init never listened, and was ended)
|
|
1745
|
+
starts it once more, by the same line, in a session of its own, `agentrun-dial-2` (`redial`), with a create note. One
|
|
1746
|
+
that runs and keeps writing is waited for past `createMs`, up to twice it. A machine that does not dial fails with that
|
|
1747
|
+
command's log first, its last 10 lines within 800 characters (`dialLog`; the adapter replaces every machine token in it
|
|
1748
|
+
by `<token>`), or "agentrun-dial never started" when create started none. No Archil mount, no GPU, and not `image: "default"` (Daytona's default snapshot holds
|
|
1717
1749
|
no `agentrun-dial`): `check()` refuses each in words. Labels as on exec. A dial sandbox may be a desktop
|
|
1718
1750
|
(`kind: "desktop"`): the box snapshot's X server, started over the socket it dialed, and xfwm4, which computerd starts
|
|
1719
1751
|
(init's `--window-manager`), at the snapshot's 2 CPUs and 4 GiB, with no GPU. On exec a Daytona computer is kind
|
|
@@ -1768,7 +1800,9 @@ What each part of a dial sandbox rests on:
|
|
|
1768
1800
|
`attachEgress` (`DAYTONA_ATTACH_EGRESS` in Settings), `<IPv4 relay>:<port>`, checked at construction: create puts it
|
|
1769
1801
|
in the boot env as `AGENTRUN_ATTACH_EGRESS`, and `agentrun-dial`'s daemon fetch (curl `--connect-to`) and
|
|
1770
1802
|
`computerd attach` both open TCP to it and speak TLS and HTTP to the public host through it, so the SNI, the
|
|
1771
|
-
certificate checked and `Host` stay the public host's and TLS is end to end. Unset, nothing changes.
|
|
1803
|
+
certificate checked and `Host` stay the public host's and TLS is end to end. Unset, nothing changes. A relay that
|
|
1804
|
+
closes a connection during TLS (curl exit 35) or resets it (56) costs a retry: the fetch is tried again after 1, 2, 4
|
|
1805
|
+
then 8 s, for at most 45 s, on any failed connection or HTTP 5xx, and never on a 4xx (exit 7).
|
|
1772
1806
|
- **No GPU on dial**, refused in words: `daytona-gpu` holds no `agentrun-dial`, and Daytona runs a GPU sandbox
|
|
1773
1807
|
unprivileged (`Privileged: gpuIndex == nil`,
|
|
1774
1808
|
[runner container_configs.go:205](https://github.com/daytonaio/daytona/blob/b5a5d9e7/apps/runner/pkg/docker/container_configs.go#L205)),
|
|
@@ -1871,7 +1905,7 @@ repository's main; the docs were read on 2026-11-05.
|
|
|
1871
1905
|
```ts
|
|
1872
1906
|
import { providerFor } from "@parcha/agentrun-computer";
|
|
1873
1907
|
|
|
1874
|
-
// The key is the caller's to pass (serve's E2B_API_KEY)
|
|
1908
|
+
// The key is the caller's to pass (serve's E2B_API_KEY); the e2b package (2.63.0) is an optional dependency.
|
|
1875
1909
|
const e2b = await providerFor("e2b", { apiKey });
|
|
1876
1910
|
const made = await e2b.create({ image: "desktop", lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
1877
1911
|
```
|
|
@@ -1892,8 +1926,10 @@ and its X11 shim drives it. With `kind: "linux"` it is kind `linux` on any templ
|
|
|
1892
1926
|
provider, minus the X server, so it costs nothing to offer. A caller that names a template (`create({ image })`) gets
|
|
1893
1927
|
that one: E2B Desktop's own, `desktop`, still works for kind `desktop`, since computerd needs only Xvfb and xfwm4 from
|
|
1894
1928
|
it. Every call goes through the host's E2B JS SDK, the `e2b` package's `Sandbox` class, whose types `src/e2b.ts` imports
|
|
1895
|
-
as types only (held as `typeof Sandbox` inside, `object` in the published types), so nothing loads from it at import
|
|
1896
|
-
|
|
1929
|
+
as types only (held as `typeof Sandbox` inside, `object` in the published types), so nothing loads from it at import. The
|
|
1930
|
+
package is one of this package's `optionalDependencies`, pinned exactly, as Modal's, boxd's, ssh2 and Archil's `disk`
|
|
1931
|
+
are: a plain `npm install` brings it, and after `npm install --omit=optional` `create` refuses with `E2B needs the e2b
|
|
1932
|
+
package: npm install e2b@2.63.0`. `@e2b/desktop` is not used: it starts Xvfb and Xfce with `commands.run`, outside computerd's process table
|
|
1897
1933
|
and with no bound or abort (`@e2b/desktop@2.5.0` `dist/index.mjs:387-415`), and the provider needs none of its other
|
|
1898
1934
|
calls.
|
|
1899
1935
|
|
|
@@ -2158,7 +2194,7 @@ A live run must show:
|
|
|
2158
2194
|
```ts
|
|
2159
2195
|
import { providerFor } from "@parcha/agentrun-computer";
|
|
2160
2196
|
|
|
2161
|
-
// Both keys are the caller's to pass (serve's AGENT37_API_KEY and AGENT37_SSH_KEY)
|
|
2197
|
+
// Both keys are the caller's to pass (serve's AGENT37_API_KEY and AGENT37_SSH_KEY); ssh2 (1.17.0) is an optional dependency.
|
|
2162
2198
|
const agent37 = await providerFor("agent37", { apiKey, sshKey });
|
|
2163
2199
|
const made = await agent37.create({ image: "agent37-base", lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
2164
2200
|
```
|
|
@@ -2312,7 +2348,7 @@ the live runs above.
|
|
|
2312
2348
|
```ts
|
|
2313
2349
|
import { providerFor } from "@parcha/agentrun-computer";
|
|
2314
2350
|
|
|
2315
|
-
// The key is the caller's to pass (serve's MORPH_API_KEY)
|
|
2351
|
+
// The key is the caller's to pass (serve's MORPH_API_KEY); ssh2 is an optional dependency.
|
|
2316
2352
|
const morph = await providerFor("morph", { apiKey });
|
|
2317
2353
|
const box = await morph.prepareImage(); // the box image as a snapshot in the key's account
|
|
2318
2354
|
const made = await morph.create({ image: box.value, lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
@@ -2519,7 +2555,7 @@ kind browser that declares them.
|
|
|
2519
2555
|
|
|
2520
2556
|
| | Browserbase | Kernel | Local Chrome |
|
|
2521
2557
|
| --- | --- | --- | --- |
|
|
2522
|
-
| `capabilities().browser` | wall-clock, `stealth`, `profiles` (settle
|
|
2558
|
+
| `capabilities().browser` | wall-clock, `stealth`, `profiles` (settle 10 s, its descriptor's `profiles`), `downloads` (`downloads/`) | inactivity, `headless`, `profiles` (settle 0) | wall-clock |
|
|
2523
2559
|
| `viewport` | `browserSettings.viewport` | `viewport` | the window's size |
|
|
2524
2560
|
| `stealth` | `browserSettings.verified` and `solveCaptchas` (the solver is off otherwise: Browserbase's default is on) | not declared (Kernel's stealth brings a proxy nothing prices yet) | not declared |
|
|
2525
2561
|
| `profile` | a context: `browserSettings.context { id, persist }` | a profile by name: `profile { name, save_changes }`, made first if Kernel does not know it | not declared |
|
|
@@ -2586,7 +2622,11 @@ deadline, so the janitor's `sweep` also ends a browser whose supervisor was kill
|
|
|
2586
2622
|
|
|
2587
2623
|
Finding Chrome: the `executablePath` option, else `PI_BROWSER_CHROME` or `CHROME_PATH` in the `env` option, else the
|
|
2588
2624
|
first `google-chrome`, `google-chrome-stable`, `chromium` or `chromium-browser` on that env's `PATH`, else the usual
|
|
2589
|
-
install places. The library reads no environment of its own: the host passes `env`.
|
|
2625
|
+
install places. The library reads no environment of its own: the host passes `env`. Of it, the supervisor and the Chrome
|
|
2626
|
+
it starts, and `testConnection()`'s Chrome, hold the names Chrome reads (`CHROME_ENV_NAMES`: PATH, HOME, TMPDIR, the
|
|
2627
|
+
locale, the display and `XAUTHORITY`, the XDG directories, fontconfig's files, the session bus, `CHROME_DEVEL_SANDBOX`)
|
|
2628
|
+
and nothing else, so no key the host holds reaches Chrome; serve passes its own values of these (the descriptor's
|
|
2629
|
+
`hostEnv`). With none found, `check()`,
|
|
2590
2630
|
`create()` and `testConnection()` say what to install and which setting names one. `testConnection()` starts the Chrome
|
|
2591
2631
|
once, headless on a blank page with a proxy that reaches nothing, to prove it starts here with its sandbox on. It
|
|
2592
2632
|
keeps nothing.
|
|
@@ -2688,8 +2728,10 @@ the API's control URL) is a later change: `platform: "ios"` is refused in words.
|
|
|
2688
2728
|
- **create** asks for `timeout_seconds` = the lifetime, and the phone harness ends the session then, whatever happens.
|
|
2689
2729
|
The lifetime includes the boot, so a phone ready past its deadline fails `timeout`.
|
|
2690
2730
|
- Each POST carries an Idempotency-Key, and a create whose answer is uncertain is found by it, never sent twice.
|
|
2691
|
-
Only a refusal (a 4xx, or `phones_busy`) says nothing was made. No answer, a 5xx, or a 2xx with no
|
|
2692
|
-
uncertain: create asks `GET /sessions/requests/<key>` before it forgets the key, and records the phone it
|
|
2731
|
+
Only a refusal (a 4xx, or `phones_busy`) says nothing was made. No answer, a 5xx, a redirect, or a 2xx with no
|
|
2732
|
+
session is uncertain: create asks `GET /sessions/requests/<key>` before it forgets the key, and records the phone it
|
|
2733
|
+
finds. A redirect is never followed: the API's calls go through the shared REST client (`hosted/rest.ts`), which
|
|
2734
|
+
refuses it in its own words. Its answer is unread, and a 303 after a create is the usual answer to a POST.
|
|
2693
2735
|
- A create cancelled during its POST is recovered by its key all the same, and the phone the service made is ended.
|
|
2694
2736
|
- A phone that fails, or is not ready within `readyMs` (240 s), is ended.
|
|
2695
2737
|
- Each request has a bound of its own, `requestMs` (30 s), beside the caller's signal, and a readiness read takes no
|
|
@@ -2720,11 +2762,13 @@ the API's control URL) is a later change: `platform: "ios"` is refused in words.
|
|
|
2720
2762
|
the `adb` CLI (Android platform-tools; default `adb` on PATH, which the phone's descriptor names as its
|
|
2721
2763
|
`hostCommand`, so a server says it is missing before any phone is rented), whose server it starts and speaks to on
|
|
2722
2764
|
the loopback (port 5037, adb's own, or `adbCli(path, { port })`). Every spawned adb names that port with `-P`, so the CLI and the
|
|
2723
|
-
socket requests reach one server. `adbCli(path, { env })` spawns adb
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
`
|
|
2727
|
-
|
|
2765
|
+
socket requests reach one server. `adbCli(path, { env })` spawns adb with only the names in `ADB_ENV_NAMES`
|
|
2766
|
+
taken from the environment given (`adbEnv(env)`): the base names (`PATH`, `HOME`, `TMPDIR`, locale) and the SDK's
|
|
2767
|
+
`ANDROID_HOME`, `ANDROID_SDK_ROOT`, `ANDROID_USER_HOME`, `ANDROID_SDK_HOME`. Nothing else reaches adb or the server it
|
|
2768
|
+
starts: no `ADB_*`, `ANDROID_ADB_*` or `ANDROID_SERIAL` that would point it at another server or device, no proxy, no
|
|
2769
|
+
key. The library reads no environment of its own, so a caller must pass `env`: the conformance module passes its own,
|
|
2770
|
+
and serve passes the phone's `hostEnv`. Without `env`, adb starts with no environment at all, and a bare `adb` is
|
|
2771
|
+
found only on the default path (`/usr/bin:/bin`): pass `env`, or give adb's absolute path. Without adb, connect says so in words.
|
|
2728
2772
|
- **testConnection** is list(): one `GET /sessions` joined to the ledger, and a GET of any phone the listing leaves out.
|
|
2729
2773
|
It rents nothing and reaches no phone: ok with the
|
|
2730
2774
|
count of this provider's phones, `unauthorized` for a refused key, `unreachable` when the phone harness is not
|
|
@@ -2758,7 +2802,7 @@ through `ui.observe` (`src/conformance/cases/settings.ts`):
|
|
|
2758
2802
|
```ts
|
|
2759
2803
|
import { providerFor } from "@parcha/agentrun-computer";
|
|
2760
2804
|
|
|
2761
|
-
// The key is the caller's to pass (serve's BOXD_API_KEY)
|
|
2805
|
+
// The key is the caller's to pass (serve's BOXD_API_KEY); the @boxd-sh/sdk package (0.3.1) is an optional dependency.
|
|
2762
2806
|
const boxd = await providerFor("boxd", { apiKey, org: "my-org", region: "fra" });
|
|
2763
2807
|
const made = await boxd.create({ image: "default", lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
2764
2808
|
```
|
|
@@ -2771,19 +2815,21 @@ to a machine, and `src/hosted/provider.ts` does everything that is not boxd's ow
|
|
|
2771
2815
|
create, the upload, the install, init's start, the stdio bridge, the probe, the janitor's extend, delete-then-wait-gone,
|
|
2772
2816
|
the sweep of a create that lands late). Every call goes through the host's boxd TypeScript SDK, the `@boxd-sh/sdk`
|
|
2773
2817
|
package's `Boxd` class, of which `src/boxd.ts` names only the slice it calls and imports nothing at load. The package is
|
|
2774
|
-
|
|
2818
|
+
an optional dependency, pinned exactly, as E2B's and Modal's are.
|
|
2775
2819
|
|
|
2776
2820
|
### The desktop snapshot
|
|
2777
2821
|
|
|
2778
|
-
boxd's own image (`"default"`) has Xvfb
|
|
2779
|
-
|
|
2822
|
+
boxd's own image (`"default"`) has Xvfb, xdotool and Thunar but not Xfce's text editor and terminal or a browser, so
|
|
2823
|
+
a boxd desktop starts from a snapshot that adds them. `prepareImage()` answers it by name,
|
|
2780
2824
|
`agentrun-desktop-<12 hex>`, the hash of the recipe in `src/boxd.ts`, so a new recipe is a new snapshot. When the
|
|
2781
2825
|
key's org has none, it builds it once, telling `onWait` "build" first:
|
|
2782
2826
|
|
|
2783
2827
|
1. `machines.create` of an isolated machine of boxd's own image, named `agentrun-desktop-build-<8 hex>`, with no labels
|
|
2784
2828
|
(a restore carries a snapshot's labels over to every machine made from it) and boxd's delete timer at 2 hours;
|
|
2785
|
-
2. the recipe as root through the image user's passwordless sudo: `
|
|
2786
|
-
`
|
|
2829
|
+
2. the recipe as root through the image user's passwordless sudo: `mousepad` and `xfce4-terminal` from Ubuntu's
|
|
2830
|
+
universe, and `firefox-esr` from Mozilla's APT repository (Ubuntu 24.04's `firefox` is a snap, and a microVM runs no
|
|
2831
|
+
snapd), its signing key held to a pinned sha256 before apt reads anything it signs; each program and its desktop
|
|
2832
|
+
file (`org.xfce.mousepad`, `xfce4-terminal`, `firefox-esr`) checked;
|
|
2787
2833
|
3. `snapshots.create` under the name, read until boxd says `ready`;
|
|
2788
2834
|
4. the build machine deleted and read gone, pass, fail or cancel: the id create answered, read through `get` (a
|
|
2789
2835
|
lagging list can't hide it), and any machine of its name in the org's list, so a create whose reply was lost is
|
|
@@ -2865,9 +2911,12 @@ alone (see [Init, the socket and the bridge](#init-the-socket-and-the-bridge)):
|
|
|
2865
2911
|
### Conformance on boxd
|
|
2866
2912
|
|
|
2867
2913
|
```sh
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
node packages/computer/dist/conformance/sweep.js --provider boxd --before
|
|
2914
|
+
export COMPUTER_BOXD_API_KEY=...
|
|
2915
|
+
before="$(mktemp -d)/before.json" # each run its own: --before refuses a file that is already there
|
|
2916
|
+
node packages/computer/dist/conformance/sweep.js --provider boxd --before "$before"
|
|
2917
|
+
AGENTRUN_COMPUTER_LIVE_BOXD=1 npm run conformance -w @parcha/agentrun-computer -- --provider boxd --run "$(node -p 'require(process.argv[1]).run' "$before")"
|
|
2918
|
+
node packages/computer/dist/conformance/sweep.js --provider boxd --after "$before"
|
|
2919
|
+
AGENTRUN_COMPUTER_LIVE_BOXD=1 npm run test:boxd -w @parcha/agentrun-computer # its own run id: it deletes what it made
|
|
2871
2920
|
```
|
|
2872
2921
|
|
|
2873
2922
|
The conformance module, `dist/conformance/boxd.js`, checks `AGENTRUN_COMPUTER_LIVE_BOXD=1` before it reads anything
|
|
@@ -2934,9 +2983,12 @@ What smol cloud refuses or this host works around:
|
|
|
2934
2983
|
### Conformance on smol cloud
|
|
2935
2984
|
|
|
2936
2985
|
```sh
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
node packages/computer/dist/conformance/sweep.js --provider smolcloud --before
|
|
2986
|
+
export COMPUTER_SMOLCLOUD_API_KEY=...
|
|
2987
|
+
before="$(mktemp -d)/before.json" # each run its own: --before refuses a file that is already there
|
|
2988
|
+
node packages/computer/dist/conformance/sweep.js --provider smolcloud --before "$before"
|
|
2989
|
+
AGENTRUN_COMPUTER_LIVE_SMOLCLOUD=1 npm run conformance -w @parcha/agentrun-computer -- --provider smolcloud --long --concurrency 4 \
|
|
2990
|
+
--run "$(node -p 'require(process.argv[1]).run' "$before")"
|
|
2991
|
+
node packages/computer/dist/conformance/sweep.js --provider smolcloud --after "$before"
|
|
2940
2992
|
```
|
|
2941
2993
|
|
|
2942
2994
|
The conformance module, `dist/conformance/smolcloud.js`, checks `AGENTRUN_COMPUTER_LIVE_SMOLCLOUD=1` first, then reads
|
|
@@ -3017,8 +3069,8 @@ What Groundbox refuses or this host works around:
|
|
|
3017
3069
|
templates it runs as the image's user, `runner` (uid 1001), with passwordless sudo, which the adapter's scripts use;
|
|
3018
3070
|
`daemonUser` may not be 1001 there.
|
|
3019
3071
|
- A desktop needs Xvfb and xfwm4 in its image. Groundbox's own image has Xvfb but not xfwm4, so `check()` refuses
|
|
3020
|
-
`"default"` for kind desktop; the box image has both, and Xfce's terminal
|
|
3021
|
-
its apps.
|
|
3072
|
+
`"default"` for kind desktop; the box image has both, and Xfce's terminal, text editor and file manager (Thunar),
|
|
3073
|
+
Firefox ESR and xdotool as its apps.
|
|
3022
3074
|
- Groundbox's own image keeps toolchains under `/opt` (corepack's pnpm under
|
|
3023
3075
|
`/opt/corepack/v1/pnpm/<version>/dist/node_modules/...`, and `/opt/hostedtoolcache`), deeper than the isolation probe's
|
|
3024
3076
|
8 levels, so `isolation.vendor-agent` can't prove the socket fence on it. That is why the box image is the default.
|
|
@@ -3035,13 +3087,20 @@ What Groundbox refuses or this host works around:
|
|
|
3035
3087
|
### Conformance on Groundbox
|
|
3036
3088
|
|
|
3037
3089
|
```sh
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3090
|
+
export COMPUTER_GROUNDBOX_API_KEY=...
|
|
3091
|
+
before="$(mktemp -d)/before.json" # each run its own: --before refuses a file that is already there
|
|
3092
|
+
node packages/computer/dist/conformance/sweep.js --provider groundbox --before "$before"
|
|
3093
|
+
run="$(node -p 'require(process.argv[1]).run' "$before")"
|
|
3094
|
+
AGENTRUN_COMPUTER_LIVE_GROUNDBOX=1 \
|
|
3095
|
+
npm run conformance -w @parcha/agentrun-computer -- --provider groundbox --long --run "$run"
|
|
3096
|
+
AGENTRUN_COMPUTER_LIVE_GROUNDBOX=1 COMPUTER_GROUNDBOX_KIND=desktop \
|
|
3097
|
+
npm run conformance -w @parcha/agentrun-computer -- --provider groundbox --kind desktop --long --fixture <computerd-fixture for linux/amd64> --run "$run"
|
|
3098
|
+
node packages/computer/dist/conformance/sweep.js --provider groundbox --after "$before"
|
|
3043
3099
|
```
|
|
3044
3100
|
|
|
3101
|
+
Both runs share the before file's `--run`, at once or one after the other: each run's own end-of-run sweep deletes only
|
|
3102
|
+
its own computers ([PROVIDERS.md](PROVIDERS.md), "The live sweep").
|
|
3103
|
+
|
|
3045
3104
|
The conformance module, `dist/conformance/groundbox.js`, checks `AGENTRUN_COMPUTER_LIVE_GROUNDBOX=1` first, then reads
|
|
3046
3105
|
`COMPUTER_GROUNDBOX_API_KEY` (`apiKey`, required), `COMPUTER_GROUNDBOX_API_URL` (`apiUrl`), `COMPUTER_GROUNDBOX_IMAGE`
|
|
3047
3106
|
(the run's image, default the box image), `COMPUTER_GROUNDBOX_DAEMON` (`daemonPath`), `COMPUTER_GROUNDBOX_USER`
|
|
@@ -3077,9 +3136,15 @@ A provider for another vendor passes the same suite as Docker's, with one comman
|
|
|
3077
3136
|
|
|
3078
3137
|
```sh
|
|
3079
3138
|
npm run conformance -w @parcha/agentrun-computer -- --provider docker # or modal, daytona: any registry id
|
|
3080
|
-
npm run conformance -w @parcha/agentrun-computer -- --provider ./my-provider.js [--image debian:bookworm-slim] [--only exec,files] [--fixture <path>] [--long] [--concurrency <n>] [--json]
|
|
3139
|
+
npm run conformance -w @parcha/agentrun-computer -- --provider ./my-provider.js [--image debian:bookworm-slim] [--only exec,files] [--fixture <path>] [--long] [--concurrency <n>] [--run <id>] [--json]
|
|
3081
3140
|
```
|
|
3082
3141
|
|
|
3142
|
+
`--run <id>` (`run` in `runConformance`'s options) is the run's id, which every computer it makes carries as
|
|
3143
|
+
`agentrun.conformance`: the one the live sweep's `--before` printed, so its `--after` deletes this run's computers and no
|
|
3144
|
+
other's ([PROVIDERS.md](PROVIDERS.md), "The live sweep"). Without it, the run mints a fresh one. Every computer also
|
|
3145
|
+
carries `agentrun.conformance.runner`, an id each run mints for itself, and the run's own end-of-run sweep and list go
|
|
3146
|
+
by both labels, so two processes given one `--run` never delete each other's computers.
|
|
3147
|
+
|
|
3083
3148
|
```text
|
|
3084
3149
|
computer conformance · docker · linux, daemon pid1 · computerd 0.1.0-beta.30 linux/amd64
|
|
3085
3150
|
core health hello ping unknown-method kind-consistent ✓ 5
|
|
@@ -3283,6 +3348,66 @@ computer's `HOME`, which the provider sets, is a directory its user can write, a
|
|
|
3283
3348
|
From code: `runConformance(provider, { image, only?, signal?, drifted?, mountFor?, caseTimeoutMs?, cleanupTimeoutMs?,
|
|
3284
3349
|
fixture?, fetch? })` returns the report, and `formatReport(report)` the text above.
|
|
3285
3350
|
|
|
3351
|
+
### Provider health: time to interactive (`--tti`, `--burst`)
|
|
3352
|
+
|
|
3353
|
+
Whether a provider works today, and how fast, measured through this package's own provider layer. Time to interactive
|
|
3354
|
+
(TTI) is the time from a computer's `create` call to the answer of its first command: `create`, `connect` (computerd's
|
|
3355
|
+
hello) and one `exec.run`, read on the run's clock; the delete comes after and is not timed. `--tti <n>` makes `n`
|
|
3356
|
+
computers one at a time, each deleted before the next; `--burst <n>` makes `n` at once. Either runs alone, or both, the
|
|
3357
|
+
burst after. It runs as cases of the conformance runner (`src/conformance/tti.ts`), so a provider the CLI can make gets
|
|
3358
|
+
it with nothing more: the module's settings and keys by name, its image, the run's label, the deletes, the sweep and
|
|
3359
|
+
the list that shows nothing is left.
|
|
3360
|
+
|
|
3361
|
+
```sh
|
|
3362
|
+
npm run conformance -w @parcha/agentrun-computer -- --provider daytona --tti 100 --burst 100 [--image <image>] [--json]
|
|
3363
|
+
```
|
|
3364
|
+
|
|
3365
|
+
```text
|
|
3366
|
+
computer tti · daytona · linux, daemon pid1 · image default
|
|
3367
|
+
came up: yes
|
|
3368
|
+
serial n 100 · ok 100/100 (100%) · median 512 ms · p95 640 ms · p99 702 ms · score 94.28
|
|
3369
|
+
burst n 100 at once · ok 98/100 (98%) · median 830 ms · p95 1410 ms · p99 1630 ms · score 87.27
|
|
3370
|
+
✗ 2x create failed (limit): ...
|
|
3371
|
+
cleanup ✓ 0 left · 200 deleted
|
|
3372
|
+
computers alive at once: 100 at most
|
|
3373
|
+
tti FAIL: 2 of 200 computers did not come up
|
|
3374
|
+
```
|
|
3375
|
+
|
|
3376
|
+
(The numbers above show the shape, not a measurement.) `came up` is `yes` when any computer ran its first command, else
|
|
3377
|
+
`no` with the first reason one did not. It exits 0 when every computer came up and the run left nothing behind, else 1,
|
|
3378
|
+
and 2 on a usage error; `--tti` and `--burst` take `--image` and `--json` and refuse the suite's flags. `--json` prints
|
|
3379
|
+
`{ provider, providerVersion, kind, daemonMode, image, command, cameUp, why?, serial?, burst?, pass, cleanup, computers,
|
|
3380
|
+
daemons, notes?, providerNotes? }`, each shape `{ n, ok, successRate, ttiMs, stats: { median, p95, p99 }, score, errors:
|
|
3381
|
+
[{ words, count }] }`. From code: `measureTti(provider, { image, iterations, burst, clock?, signal? })`, `formatTti`,
|
|
3382
|
+
`ttiStats` and `ttiScore`.
|
|
3383
|
+
|
|
3384
|
+
The yardstick is ComputeSDK's sandbox benchmark ([computesdk/benchmarks](https://github.com/computesdk/benchmarks), MIT;
|
|
3385
|
+
`benchmarks/sandbox/tti.bench.ts`, `scoring.ts`, `src/util/stats.ts`), and three things are theirs as they wrote them:
|
|
3386
|
+
TTI from create's call to the first command's success, with destroy left out; the statistics, 5% of the times trimmed
|
|
3387
|
+
from each end, the median of the rest, p95 and p99 by nearest rank; and the score, each of median, p95 and p99 as
|
|
3388
|
+
`100 * (1 - ms / 10000)` (0 at 10 s or more), weighted 0.6, 0.25 and 0.15, times the success rate. Their board's runs are
|
|
3389
|
+
100 computers through 100 slots, all launched at once: `--burst 100`. Where this differs:
|
|
3390
|
+
|
|
3391
|
+
- The first command is `echo agentrun` through computerd's `exec.run` (no shell; `cmd.exe /d /c echo agentrun` on
|
|
3392
|
+
Windows), not `node -v`: a run's image need not carry Node.
|
|
3393
|
+
- TTI is through this layer, so it holds what a provider does in `create` beyond the vendor's own call (on most remote
|
|
3394
|
+
providers, putting computerd in the machine and starting it) and `connect`'s hello. It is the time an agent waits
|
|
3395
|
+
here, not the vendor's SDK alone.
|
|
3396
|
+
- Each computer is made as the suite makes them: the run's label, a 30-minute lifetime, network `none` where the kind
|
|
3397
|
+
requires it, and the module's image (`conformanceImage()`, such as Daytona's `default` snapshot or E2B's `desktop`
|
|
3398
|
+
template) unless `--image` names one. ComputeSDK's sandboxes have an open network and each vendor's default image.
|
|
3399
|
+
- One computer has 150 s to come up in all (their bounds: 120 s for create, 30 s for the command), and the clock reads
|
|
3400
|
+
whole milliseconds.
|
|
3401
|
+
- The serial shape is their `sequential` one, retired from their board on 2026-08-11; it is kept here because a provider
|
|
3402
|
+
that fails only under a burst is a different finding from one that fails alone.
|
|
3403
|
+
- A burst's computers are deleted one after another once the burst ends, outside the time; theirs each destroy its own.
|
|
3404
|
+
|
|
3405
|
+
What it cannot drive, and why: a browser (Browserbase, Kernel, local Chrome) runs no command, only CDP, so it is not
|
|
3406
|
+
measured (`came up: no: the provider declares no exec`). A dial host (Cloudflare, Fly, and E2B, Modal or Daytona with
|
|
3407
|
+
`COMPUTER_<ID>_CONNECT=dial`) makes machines that dial a server the internet reaches, so from this CLI every create is
|
|
3408
|
+
refused in words; its Core runs inside `packages/serve/scripts/dial-conformance.mjs`, which has no TTI mode. Archil is a
|
|
3409
|
+
mount here, not a computer provider, so there is no Archil sandbox to time.
|
|
3410
|
+
|
|
3286
3411
|
## Persistent computers: an agent's own
|
|
3287
3412
|
|
|
3288
3413
|
A run's computer belongs to its run: it has a deadline (`lifetimeMs`, required), and the janitor or the vendor ends it
|
package/box/Dockerfile
CHANGED
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
# computer user's, 0700, before init (by the provider's install, or by agentrun-dial on a machine that dials);
|
|
15
15
|
# - a desktop, with nothing started: Xvfb and xfwm4 (with dbus-run-session, which xfconf's packages bring) and
|
|
16
16
|
# xsetroot (x11-xserver-utils, the desktop's background), which the provider starts through computerd as the tool
|
|
17
|
-
# user on :0 (src/desktop.ts), and the apps E2B Desktop has that are cheap to carry: Xfce's terminal
|
|
18
|
-
# Firefox ESR, and xdotool. computerd's apps group lists and opens them by their desktop
|
|
19
|
-
# with it. One image serves a sandbox and a desktop (an Agent37 desktop starts from it
|
|
17
|
+
# user on :0 (src/desktop.ts), and the apps E2B Desktop has that are cheap to carry: Xfce's terminal, text editor
|
|
18
|
+
# and file manager (Thunar), Firefox ESR, and xdotool. computerd's apps group lists and opens them by their desktop
|
|
19
|
+
# files. No VNC server comes with it. One image serves a sandbox and a desktop (an Agent37 desktop starts from it
|
|
20
|
+
# too).
|
|
20
21
|
#
|
|
21
22
|
# No sudo and no sudoers file: the image's user is root, so the provider's own exec (Daytona's toolbox, Modal's exec,
|
|
22
23
|
# E2B's commands as root) runs the helper as root, and the tool user has no way to root. The build fails if the base
|