@parcha/agentrun-computer 0.1.0-beta.68 → 0.1.0-beta.69
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 +55 -3
- package/box/README.md +8 -0
- package/box/install.sh +40 -2
- package/dist/boxd.js +43 -8
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/computerd.json +1 -1
- package/dist/conformance/cli.d.ts +6 -0
- package/dist/conformance/cli.js +14 -3
- package/dist/conformance/northflank.d.ts +44 -0
- package/dist/conformance/northflank.js +50 -0
- package/dist/descriptor.d.ts +6 -0
- package/dist/descriptor.js +2 -0
- package/dist/descriptors/agent37.d.ts +1 -0
- package/dist/descriptors/agent37.js +2 -0
- package/dist/descriptors/daytona.d.ts +1 -0
- package/dist/descriptors/daytona.js +2 -0
- package/dist/descriptors/e2b.d.ts +1 -0
- package/dist/descriptors/e2b.js +2 -0
- package/dist/descriptors/fly.d.ts +1 -0
- package/dist/descriptors/fly.js +2 -0
- package/dist/descriptors/groundbox.d.ts +1 -0
- package/dist/descriptors/groundbox.js +2 -0
- package/dist/descriptors/index.d.ts +34 -1
- package/dist/descriptors/index.js +3 -2
- package/dist/descriptors/instabox.d.ts +1 -0
- package/dist/descriptors/instabox.js +2 -0
- package/dist/descriptors/modal.d.ts +1 -0
- package/dist/descriptors/modal.js +2 -0
- package/dist/descriptors/northflank.d.ts +24 -0
- package/dist/descriptors/northflank.js +30 -0
- package/dist/descriptors/orgo.d.ts +1 -0
- package/dist/descriptors/orgo.js +2 -0
- package/dist/descriptors/render.d.ts +1 -0
- package/dist/descriptors/render.js +2 -0
- package/dist/groundbox.js +15 -2
- package/dist/hosted/download.d.ts +16 -0
- package/dist/hosted/download.js +108 -2
- package/dist/hosted/provider.js +11 -4
- package/dist/hosted/scripts.d.ts +2 -0
- package/dist/hosted/scripts.js +29 -0
- package/dist/northflank.d.ts +44 -0
- package/dist/northflank.js +448 -0
- package/dist/orgo-desktop.js +2 -2
- package/dist/orgo-names.d.ts +15 -1
- package/dist/orgo-names.js +13 -0
- package/dist/orgo.d.ts +10 -0
- package/dist/orgo.js +64 -4
- package/dist/providers.d.ts +10 -4
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ import { checkMount, readBackOf, WORKSPACE, type MountSpec } from "@parcha/agent
|
|
|
16
16
|
|
|
17
17
|
The package root holds the protocol, the registry and the descriptors, and loads no provider: a provider loads by its
|
|
18
18
|
id (`providerFor(id, options)`, which imports that one provider's file), or from its subpath (`/docker`, `/daytona`,
|
|
19
|
-
`/modal`, `/e2b`, `/orgo`, `/orgo-desktop`, `/phone-harness`, `/browserbase`, `/kernel`, `/local-chrome`, `/boxd`, `/smolcloud`, `/groundbox`, `/vercel`, `/sprites`, `/instabox`). A provider's
|
|
19
|
+
`/modal`, `/e2b`, `/orgo`, `/orgo-desktop`, `/phone-harness`, `/browserbase`, `/kernel`, `/local-chrome`, `/boxd`, `/smolcloud`, `/groundbox`, `/vercel`, `/sprites`, `/instabox`, `/northflank`). A provider's
|
|
20
20
|
option types (`DockerProviderOptions`, `ModalProviderOptions` and the like) come from its subpath too, not the root.
|
|
21
21
|
|
|
22
22
|
The package carries the daemon for Linux amd64 and arm64 in `dist/`, so a provider runs it with no Go on the host. A
|
|
@@ -691,6 +691,7 @@ live under:
|
|
|
691
691
|
| `VERCEL_TOKEN`, `VERCEL_TEAM_ID`, `VERCEL_PROJECT_ID` | Vercel Sandbox's `token`, `teamId` and `projectId`, all required |
|
|
692
692
|
| `SPRITES_TOKEN` | Fly Sprites' `token`: the name Fly's own CLI reads |
|
|
693
693
|
| `INSTABOX_API_KEY` | InstaBox's `apiKey`: the name InstaBox's own CLI and SDK read |
|
|
694
|
+
| `NORTHFLANK_API_TOKEN`, `NORTHFLANK_COMPUTER_PROJECT_ID`, `NORTHFLANK_COMPUTER_TEAM_ID` | Northflank's `token` (the name Northflank's own client reads), `projectId` (required, no default) and `teamId` (an organisation token's alone) |
|
|
694
695
|
|
|
695
696
|
- **the conformance CLI and the live harness** (`src/conformance/`: the CLI, each provider's conformance module and the
|
|
696
697
|
sweeps) read their own `COMPUTER_<ID>_*` names, the ones the live scripts set, through each module's
|
|
@@ -3024,8 +3025,9 @@ key's org has none, it builds it once, telling `onWait` "build" first:
|
|
|
3024
3025
|
(a restore carries a snapshot's labels over to every machine made from it) and boxd's delete timer at 2 hours;
|
|
3025
3026
|
2. the recipe as root through the image user's passwordless sudo: `mousepad` and `xfce4-terminal` from Ubuntu's
|
|
3026
3027
|
universe, and `firefox-esr` from Mozilla's APT repository (Ubuntu 24.04's `firefox` is a snap, and a microVM runs no
|
|
3027
|
-
snapd), its signing key held to a pinned sha256 before apt reads anything it signs
|
|
3028
|
-
|
|
3028
|
+
snapd), its signing key held to a pinned sha256 before apt reads anything it signs, and that origin pinned before
|
|
3029
|
+
its source is written: `firefox-esr*` at 500, every other package from it at -1, so it never replaces a distro
|
|
3030
|
+
package; each program and its desktop file (`org.xfce.mousepad`, `xfce4-terminal`, `firefox-esr`) checked;
|
|
3029
3031
|
3. `snapshots.create` under the name, read until boxd says `ready`;
|
|
3030
3032
|
4. the build machine deleted and read gone, pass, fail or cancel: the id create answered, read through `get` (a
|
|
3031
3033
|
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
|
|
@@ -3460,6 +3462,52 @@ ssh2 verifies, whose sha256 is `hostKeyFingerprint`; a taken name answering 409;
|
|
|
3460
3462
|
`deleted` record; sshd's port 22 being the one vendor listener; `minimal` being on every paid plan; the 8 KiB metadata
|
|
3461
3463
|
bound counting compact JSON; a silent SSH channel holding 75 s; and root making a network namespace.
|
|
3462
3464
|
|
|
3465
|
+
## Northflank
|
|
3466
|
+
|
|
3467
|
+
```ts
|
|
3468
|
+
import { providerFor } from "@parcha/agentrun-computer";
|
|
3469
|
+
|
|
3470
|
+
// The token and the project are the caller's to pass (serve's NORTHFLANK_API_TOKEN and NORTHFLANK_COMPUTER_PROJECT_ID).
|
|
3471
|
+
const northflank = await providerFor("northflank", { token, projectId });
|
|
3472
|
+
const image = await northflank.prepareImage();
|
|
3473
|
+
const made = await northflank.create({ image: image.value, lifetimeMs: 600_000, network: "none" }, { requestId: "r1#3" });
|
|
3474
|
+
```
|
|
3475
|
+
|
|
3476
|
+
A Northflank computer is a [Northflank sandbox](https://northflank.com/docs/v1/application/sandboxes): a service in your
|
|
3477
|
+
own project, on Northflank's cloud a Kata microVM, from the box image's public tag (`prepareImage()`, no call) or the
|
|
3478
|
+
spec's image, its command `sleep infinity`. The project is required and has no default; `teamId` is for an organisation
|
|
3479
|
+
token alone. It is a sandbox alone for now: no desktop and no Archil mount. Northflank runs on the shared machine-host
|
|
3480
|
+
adapter ([PROVIDERS.md](PROVIDERS.md)): `src/northflank.ts` is its `MachineHost`, over the Northflank API
|
|
3481
|
+
(`https://api.northflank.com/v1`, `Authorization: Bearer <token>`) with `fetch`, the shared REST client and Node's
|
|
3482
|
+
`WebSocket` (no SDK).
|
|
3483
|
+
|
|
3484
|
+
| MachineHost | Northflank |
|
|
3485
|
+
| --- | --- |
|
|
3486
|
+
| `create` | `POST .../projects/{project}/services/deployment` with the request's name, the plan of its size, the image as `external.imagePath` under `/bin/sh -c 'exec sleep infinity'`, one instance, the packed labels as the workload's annotations and `createOptions.expiryTime` at the backstop (300 s to 7 days); then `POST .../services/{name}/scale` to one instance; the name is the id. A scale that fails deletes the service before create answers, and where that delete fails too create answers `vendor`, so the adapter sweeps the name |
|
|
3487
|
+
| `get` | `GET .../services/{id}`: `PENDING` and `IN_PROGRESS` are starting, `COMPLETED` running; `FAILED`, one past its expiry (`expiredAt`) or one in a status it doesn't know is stopped, with the reason, so it stays listed and the janitor deletes it; a 404 is none |
|
|
3488
|
+
| `list` | `GET .../services`, every page, the `computer-` services kept (and the asked name alone when one is asked), each read by `get` for its annotations, which the listing lacks. That read answers the adapter's own read of each listed computer once, within 2 s, so a sweep reads each computer once; a create or delete drops it |
|
|
3489
|
+
| `delete` | `DELETE .../services/{id}`, a 404 done |
|
|
3490
|
+
| `exec` | the command-exec WebSocket (`wss://api.northflank.com/v1/command-exec/projects/{project}/services/{id}`) through `framedExec`: an `init` message with the token and argv (no shell, root, `latin1`, no tty), stdin as `payload` messages and its end as `stdInEnd`, `stdOut` and `stdErr` bytes as latin1 strings, the exit from `completion` once the socket closes or 30 s after the last output; `kill` is the shared pid wrapper's, Northflank having none |
|
|
3491
|
+
|
|
3492
|
+
An organisation token's paths start `/v1/teams/{team}/projects/...`. No `upload` and no `extend` (the janitor moves the
|
|
3493
|
+
deadline label, 7 days at most; past the backstop Northflank pauses the service and schedules its deletion). `check()`
|
|
3494
|
+
takes a registry image reference and the plans' sizes: 1 vCPU with 2048 MB, 2 with 4096, 4 with 8192, 8 with 16384, one
|
|
3495
|
+
alone taking the other's match. The adapter reads status every 2 s, since a token has 1000 requests an hour. A 409 on
|
|
3496
|
+
create is `exists`; a 429 a `limit`.
|
|
3497
|
+
|
|
3498
|
+
The conformance module, `dist/conformance/northflank.js`, checks `AGENTRUN_COMPUTER_LIVE_NORTHFLANK=1` first, then reads
|
|
3499
|
+
`COMPUTER_NORTHFLANK_TOKEN` (`token`) and `COMPUTER_NORTHFLANK_PROJECT_ID` (`projectId`), both required, and
|
|
3500
|
+
`COMPUTER_NORTHFLANK_TEAM_ID`, `COMPUTER_NORTHFLANK_API_URL`, `COMPUTER_NORTHFLANK_DAEMON` and
|
|
3501
|
+
`COMPUTER_NORTHFLANK_IMAGE` (the run's image, default the box image), never `NORTHFLANK_API_TOKEN`, `NF_API_TOKEN`,
|
|
3502
|
+
`NF_PROJECT_ID` (which Northflank injects into its own services) or `NORTHFLANK_PROJECT_ID`. Every computer of a run
|
|
3503
|
+
lives at most 30 minutes.
|
|
3504
|
+
|
|
3505
|
+
Unverified until the live run: latin1 carrying every byte both ways; the exec socket holding 75 s of silence with no
|
|
3506
|
+
ping; output trailing the `completion` message, and the socket closing after it; the exec user root being root; a taken
|
|
3507
|
+
name answering 409; a service's id being its name; the annotations read back on `get` as given; the quickstart's scale
|
|
3508
|
+
call after create being needed or harmless; a deleted service answering 404; amd64, with no vendor agent on TCP; and
|
|
3509
|
+
root making a network namespace.
|
|
3510
|
+
|
|
3463
3511
|
## Conformance
|
|
3464
3512
|
|
|
3465
3513
|
A provider for another vendor passes the same suite as Docker's, with one command. The suite is data: each case in
|
|
@@ -3564,6 +3612,10 @@ provider, or a conformance module's:
|
|
|
3564
3612
|
folder on the host for a bind, the disk's file API for Archil. `undefined` for a kind it cannot make. The runner
|
|
3565
3613
|
closes each folder when its case ends. `--provider docker` gives a bind of a new folder under the temp directory,
|
|
3566
3614
|
owned by the provider's user. Without this export the mount cases skip in words.
|
|
3615
|
+
- `export const conformanceClock`, for a host whose timers run on a clock of its own (a fake host's): `{ now(), sleep(ms) }`,
|
|
3616
|
+
the run's clock, which the deadline case reads and waits on, so a 45 s lifetime is waited out on it rather than in
|
|
3617
|
+
real time. It reads no earlier than the clock the provider stamps a deadline with. A vendor's module exports none:
|
|
3618
|
+
its run waits on the wall clock. `packages/serve/scripts/dial-conformance.mjs` takes it the same way.
|
|
3567
3619
|
|
|
3568
3620
|
Core and Full follow the Kubernetes agent-sandbox conformance levels (KEP-539.2):
|
|
3569
3621
|
|
package/box/README.md
CHANGED
|
@@ -10,6 +10,14 @@ Every step of the build is `install.sh`, POSIX shell run as root on the Dockerfi
|
|
|
10
10
|
account from a running machine (a snapshot, a blueprint, a template) boots that base, copies both files into one folder,
|
|
11
11
|
runs `sh install.sh` as root and snapshots the result. A second run on the same machine ends the same.
|
|
12
12
|
|
|
13
|
+
A vendor whose base is Ubuntu 24.04 runs the same `install.sh`. Ubuntu has no `firefox-esr` (its `firefox` is a snap),
|
|
14
|
+
so where `apt-cache policy firefox-esr` reads no candidate, the desktop step adds Mozilla's APT repository first: its
|
|
15
|
+
signing key fetched over https and refused unless the file holds that one key, fingerprint
|
|
16
|
+
`35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3`; a pin in `/etc/apt/preferences.d/mozilla` that lets
|
|
17
|
+
`packages.mozilla.org` supply `firefox-esr` and its `firefox-esr-*` packages and puts everything else from it at -1,
|
|
18
|
+
so it never replaces a package of the base's; and the source, signed by that key alone. A base whose apt has
|
|
19
|
+
`firefox-esr` (Debian's) keeps its own package and never reaches Mozilla.
|
|
20
|
+
|
|
13
21
|
The image also serves a vendor that boots it with env but has no exec stream into it: the machine dials the server
|
|
14
22
|
(`spec/computer/attach.md`). `install.sh` writes `agentrun-dial` to `/usr/local/bin`, root's, 0755, and the
|
|
15
23
|
Dockerfile's `CMD` runs it when the provider's create set `AGENTRUN_ATTACH_URL`, and `sleep infinity` otherwise, so
|
package/box/install.sh
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
# sh install.sh checked the last step alone: any sudo taken away, then every check. recipe.mjs's onImage runs it on
|
|
10
10
|
# the published image, after E2B's template builder has added sudo there.
|
|
11
11
|
#
|
|
12
|
-
# It reads the network only through apt (
|
|
13
|
-
# sha256.
|
|
12
|
+
# It reads the network only through apt (the base's mirrors), for Archil's package and for Node's release, the two checked
|
|
13
|
+
# by sha256, and, on a base whose apt has no firefox-esr (Ubuntu 24.04, whose firefox is a snap), for Mozilla's APT
|
|
14
|
+
# repository, its key checked by fingerprint (mozilla_apt). Run twice on one machine it ends the
|
|
14
15
|
# same, for a vendor's snapshot flow may retry it: each step that makes something looks for it first.
|
|
15
16
|
set -eu
|
|
16
17
|
|
|
@@ -28,6 +29,12 @@ NODE_SHA256_ARM64=6e51a2ada00f0011cc266f65d98922b403d7ad88f809ca2aa615a5fe1ce6e8
|
|
|
28
29
|
HELPER=/usr/local/sbin/agentrun-archil
|
|
29
30
|
# The entrypoint of a machine that dials the server (dial below).
|
|
30
31
|
DIAL=/usr/local/bin/agentrun-dial
|
|
32
|
+
# Mozilla's APT repository, for firefox-esr where the base's apt has none (mozilla_apt below): the fingerprint of its
|
|
33
|
+
# signing key as Mozilla publishes it, where the key is kept, apt's pin for the repository, and the source signed by it.
|
|
34
|
+
MOZILLA_FPR=35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3
|
|
35
|
+
MOZILLA_KEY=/etc/apt/keyrings/packages.mozilla.org.asc
|
|
36
|
+
MOZILLA_PIN=/etc/apt/preferences.d/mozilla
|
|
37
|
+
MOZILLA_LIST=/etc/apt/sources.list.d/mozilla.list
|
|
31
38
|
|
|
32
39
|
here=$(dirname "$0")
|
|
33
40
|
|
|
@@ -61,11 +68,42 @@ packages() {
|
|
|
61
68
|
install -d -o root -g root -m 0755 /workspace
|
|
62
69
|
}
|
|
63
70
|
|
|
71
|
+
# firefox-esr's source where the base's apt has none: Ubuntu 24.04 has no firefox-esr, and its firefox is a snap, which
|
|
72
|
+
# no image here runs. The test is apt's own: `apt-cache policy firefox-esr` in the C locale (its words are translated
|
|
73
|
+
# otherwise) reads no candidate, or nothing for a name apt never heard of. A base whose apt has one (Debian's) keeps it,
|
|
74
|
+
# and nothing below runs. Else Mozilla's key is fetched over https alone and read with gpg (installed for this alone,
|
|
75
|
+
# never imported into a keyring): the file must hold one key, MOZILLA_FPR, for apt trusts every key in a signed-by file.
|
|
76
|
+
# The pin is written before the source, so apt never reads the source unpinned: packages.mozilla.org supplies
|
|
77
|
+
# firefox-esr and its own firefox-esr-* packages and nothing else (-1 is never installed), so this source can never
|
|
78
|
+
# replace a package of the base's. A second run finds the candidate this one added, and runs nothing.
|
|
79
|
+
mozilla_apt() {
|
|
80
|
+
case "$(LC_ALL=C apt-cache policy firefox-esr | awk '$1 == "Candidate:" { print $2 }')" in
|
|
81
|
+
"" | "(none)") ;;
|
|
82
|
+
*) return 0 ;;
|
|
83
|
+
esac
|
|
84
|
+
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends gnupg >/dev/null
|
|
85
|
+
install -d -m 0755 "${MOZILLA_KEY%/*}"
|
|
86
|
+
curl -fsSL --proto =https -o "$MOZILLA_KEY" https://packages.mozilla.org/apt/repo-signing-key.gpg
|
|
87
|
+
home=$(mktemp -d)
|
|
88
|
+
fpr=$(gpg --homedir "$home" --quiet --show-keys --with-colons "$MOZILLA_KEY" | awk -F: '$1 == "pub" { pub = 1; next } $1 == "fpr" && pub { print $10; pub = 0 }' | tr '\n' ' ')
|
|
89
|
+
rm -rf "$home"
|
|
90
|
+
fpr=${fpr% }
|
|
91
|
+
if [ "$fpr" != "$MOZILLA_FPR" ]; then
|
|
92
|
+
rm -f "$MOZILLA_KEY"
|
|
93
|
+
echo "the APT signing key from packages.mozilla.org has the fingerprint ${fpr:-(none: gpg read no key)}, not Mozilla's published $MOZILLA_FPR: apt is given nothing from packages.mozilla.org" >&2
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
printf 'Package: firefox-esr*\nPin: origin packages.mozilla.org\nPin-Priority: 500\n\nPackage: *\nPin: origin packages.mozilla.org\nPin-Priority: -1\n' >"$MOZILLA_PIN"
|
|
97
|
+
echo "deb [signed-by=$MOZILLA_KEY] https://packages.mozilla.org/apt mozilla main" >"$MOZILLA_LIST"
|
|
98
|
+
apt-get update -qq
|
|
99
|
+
}
|
|
100
|
+
|
|
64
101
|
# The desktop: Xvfb and xfwm4, which the provider starts through computerd as the tool user on :0, and the apps an agent
|
|
65
102
|
# opens. Each program and each app's desktop file is checked here. It comes before the last step, so a package that
|
|
66
103
|
# brought sudo is taken away and checked gone there (a check here would refuse E2B's build, whose builder adds sudo first).
|
|
67
104
|
desktop() {
|
|
68
105
|
apt-get update -qq
|
|
106
|
+
mozilla_apt
|
|
69
107
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
|
70
108
|
xvfb xfwm4 x11-xserver-utils xfce4-terminal mousepad firefox-esr thunar xdotool fonts-dejavu-core adwaita-icon-theme >/dev/null
|
|
71
109
|
rm -rf /var/lib/apt/lists/*
|
package/dist/boxd.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createHash, randomBytes } from "node:crypto";
|
|
|
7
7
|
import { BOXD, BOXD_DEFAULT_IMAGE } from "./descriptors/boxd.js";
|
|
8
8
|
import { DEADLINE_LABEL, show } from "./drift.js";
|
|
9
9
|
import { HostError } from "./host.js";
|
|
10
|
-
import { CALL_SLACK_MS, codeOfError, orThrow, race, runChecked, until } from "./hosted/process.js";
|
|
10
|
+
import { CALL_SLACK_MS, codeOfError, orThrow, pause, race, runChecked, until } from "./hosted/process.js";
|
|
11
11
|
import { HostedProvider, mayHaveMade } from "./hosted/provider.js";
|
|
12
12
|
import { httpsBase } from "./hosted/rest.js";
|
|
13
13
|
import { shellLine } from "./hosted/scripts.js";
|
|
@@ -50,9 +50,11 @@ const MOZILLA_KEY_SHA256 = "3ecc63922b7795eb23fdc449ff9396f9114cb3cf186d6f5b53ad
|
|
|
50
50
|
* What a desktop needs that boxd's own image lacks (Xvfb, xdotool and Thunar are the image's already): Xfce's text
|
|
51
51
|
* editor and terminal (mousepad and xfce4-terminal, from Ubuntu's universe) and Firefox ESR, from Mozilla's APT
|
|
52
52
|
* repository, since Ubuntu 24.04's firefox is a snap and a microVM runs no snapd. Mozilla's key is held to its sha256
|
|
53
|
-
* before apt reads anything it signs.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
53
|
+
* before apt reads anything it signs. That origin is pinned before its source is written, so apt never reads it
|
|
54
|
+
* unpinned: firefox-esr and its own firefox-esr-* packages at 500, every other package from it at -1 (never installed),
|
|
55
|
+
* so it can never replace or downgrade a distro package. Each program and desktop file is checked. Run as root on a
|
|
56
|
+
* build machine of boxd's own image, with no single quote in it (it goes in one pair). The snapshot's name carries this
|
|
57
|
+
* recipe's hash, so a new recipe is a new snapshot.
|
|
56
58
|
*/
|
|
57
59
|
const DESKTOP_RECIPE = [
|
|
58
60
|
"set -e",
|
|
@@ -62,8 +64,8 @@ const DESKTOP_RECIPE = [
|
|
|
62
64
|
"install -d -m 0755 /etc/apt/keyrings",
|
|
63
65
|
`curl -fsSL https://packages.mozilla.org/apt/repo-signing-key.gpg -o ${MOZILLA_KEY}`,
|
|
64
66
|
`echo "${MOZILLA_KEY_SHA256} ${MOZILLA_KEY}" | sha256sum -c --quiet - || { echo "the APT signing key from packages.mozilla.org is not the one this recipe pins" >&2; exit 1; }`,
|
|
67
|
+
'printf "Package: firefox-esr*\\nPin: origin packages.mozilla.org\\nPin-Priority: 500\\n\\nPackage: *\\nPin: origin packages.mozilla.org\\nPin-Priority: -1\\n" > /etc/apt/preferences.d/mozilla',
|
|
65
68
|
`echo "deb [signed-by=${MOZILLA_KEY}] https://packages.mozilla.org/apt mozilla main" > /etc/apt/sources.list.d/mozilla.list`,
|
|
66
|
-
'printf "Package: *\\nPin: origin packages.mozilla.org\\nPin-Priority: 1000\\n" > /etc/apt/preferences.d/mozilla',
|
|
67
69
|
"apt-get update -qq",
|
|
68
70
|
"apt-get install -y -qq --no-install-recommends mousepad xfce4-terminal firefox-esr >/dev/null",
|
|
69
71
|
'for x in mousepad xfce4-terminal firefox-esr; do command -v "$x" >/dev/null || { echo "the desktop has no $x" >&2; exit 1; }; done',
|
|
@@ -79,6 +81,8 @@ const BUILD_TTL_S = 2 * 60 * 60;
|
|
|
79
81
|
const BUILD_POLL_MS = 2_000;
|
|
80
82
|
/** The most a build machine's cleanup waits for it to read gone. */
|
|
81
83
|
const GONE_MS = 120_000;
|
|
84
|
+
/** The pause before a wait for a machine boxd read not found just after its create, as the SDK's own wait polls. */
|
|
85
|
+
const NOT_YET_MS = 500;
|
|
82
86
|
/** The error with words added to its message (one that cannot be written stays as it was): the error is what the caller gets. */
|
|
83
87
|
function withWords(error, words) {
|
|
84
88
|
if (error instanceof Error) {
|
|
@@ -133,7 +137,8 @@ class BoxdHost {
|
|
|
133
137
|
/**
|
|
134
138
|
* An isolated machine (on none of the org's networks) with no standby, which would freeze a quiet computer. Once it is
|
|
135
139
|
* ready: nothing out (the allowlist ["none"]) and no hibernation, since boxd's idle timers watch traffic and a computer
|
|
136
|
-
* may have none. A
|
|
140
|
+
* may have none. A not found while boxd comes to read the new machine is waited past (#ready). A step after the
|
|
141
|
+
* machine exists that throws an error the adapter reads as a create that may have made
|
|
137
142
|
* one (mayHaveMade: vendor, timeout) is the adapter's to clean up: it sweeps the request's name, finds this machine and
|
|
138
143
|
* deletes it (a timeout's once this call settles). Deleted here first, the sweep would find none and keep listing, and
|
|
139
144
|
* delete a second create's machine of the same request instead. A refusal (limit, denied, ...) the adapter reads as a
|
|
@@ -155,7 +160,7 @@ class BoxdHost {
|
|
|
155
160
|
deleteAfter: Math.ceil((Date.parse(req.backstopAt) - Date.now()) / 1000),
|
|
156
161
|
});
|
|
157
162
|
try {
|
|
158
|
-
await this
|
|
163
|
+
await this.#ready(made.id, ctx.timeoutMs, ctx.signal);
|
|
159
164
|
await this.machines.setEgressAllow(made.id, ["none"]);
|
|
160
165
|
await this.machines.setAutoHibernateTimeout(made.id, 0);
|
|
161
166
|
}
|
|
@@ -166,6 +171,36 @@ class BoxdHost {
|
|
|
166
171
|
}
|
|
167
172
|
return { id: made.id };
|
|
168
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* waitUntilReady on a machine create just answered with, within ms, through boxd's not found: boxd can read such a
|
|
176
|
+
* machine as not found for a moment (live creates read "VM not found" about a second in, and a delete by id right
|
|
177
|
+
* after read not found too while the machine was there), so a not found is waited past, NOT_YET_MS apart. One still
|
|
178
|
+
* not found when ms run out is a timeout: the adapter's sweep by name settles it, where a delete by id would read not
|
|
179
|
+
* found and leave it. The first wait takes ms whole, each one after it what is left. A cancel is read before each wait
|
|
180
|
+
* (pause ends early on one, it doesn't throw), so none starts after it: an aborted build's wait would otherwise run on
|
|
181
|
+
* while its machine is deleted.
|
|
182
|
+
*/
|
|
183
|
+
async #ready(id, ms, signal) {
|
|
184
|
+
const end = Date.now() + ms;
|
|
185
|
+
let timeout = ms;
|
|
186
|
+
for (;;) {
|
|
187
|
+
if (signal?.aborted)
|
|
188
|
+
throw new HostError("aborted", `the wait for the machine ${id} was aborted`);
|
|
189
|
+
try {
|
|
190
|
+
await this.machines.waitUntilReady(id, { timeout });
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
if (codeOf(error) !== "not_found")
|
|
195
|
+
throw error;
|
|
196
|
+
if (Date.now() + NOT_YET_MS >= end) {
|
|
197
|
+
throw new HostError("timeout", `boxd made the machine ${id}, then read it not found until the wait for it ended (${error instanceof Error ? error.message : String(error)})`);
|
|
198
|
+
}
|
|
199
|
+
await pause(NOT_YET_MS, signal);
|
|
200
|
+
timeout = Math.max(1, end - Date.now());
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
169
204
|
/** The machine a failed create made, deleted by its id; the step's own error comes back, the delete's outcome in its message. */
|
|
170
205
|
async #unmade(id, error) {
|
|
171
206
|
let outcome;
|
|
@@ -270,7 +305,7 @@ class BoxdHost {
|
|
|
270
305
|
});
|
|
271
306
|
ids.add(made.id);
|
|
272
307
|
const ms = Math.max(1, end - Date.now());
|
|
273
|
-
orThrow(await race(this, this
|
|
308
|
+
orThrow(await race(this, this.#ready(made.id, ms, signal), `the build machine ${made.id}'s start`, ms + CALL_SLACK_MS, signal));
|
|
274
309
|
const what = `the desktop recipe (mousepad) on the build machine ${made.id}`;
|
|
275
310
|
await runChecked(this, made.id, ["sudo", "-n", "sh", "-c", DESKTOP_RECIPE], { ms: Math.max(1, end - Date.now()), signal, what });
|
|
276
311
|
await this.snapshots.create(made.id, name);
|
|
Binary file
|
|
Binary file
|
package/dist/computerd.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ProviderEnv } from "../providers.js";
|
|
2
|
+
import { type ExecStreamOptions } from "./exec-stream.js";
|
|
2
3
|
import type { CdpDialer } from "./cdp.js";
|
|
3
4
|
import type { Case, Clock } from "./types.js";
|
|
4
5
|
/** A stream as main writes to it: done is called once the text is handed on, as Writable.write's callback is. */
|
|
@@ -25,6 +26,11 @@ export interface CliIo {
|
|
|
25
26
|
providerOptions?: {
|
|
26
27
|
env?: ProviderEnv;
|
|
27
28
|
} & Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* --exec-stream's bounds, over its defaults (each named in ExecStreamOptions; longMs over --quick's too). A test gives
|
|
31
|
+
* shorter ones, so a pre-check of a good exec does not sit out the 10 s stdout is left unread.
|
|
32
|
+
*/
|
|
33
|
+
execStreamBounds?: Pick<ExecStreamOptions, "longMs" | "stepMs" | "largeBytes" | "largeMs" | "unreadMs">;
|
|
28
34
|
/** The clock the run reads, a TTI run's times among it; default the wall clock. A test gives one it moves. */
|
|
29
35
|
clock?: Clock;
|
|
30
36
|
}
|
package/dist/conformance/cli.js
CHANGED
|
@@ -266,7 +266,8 @@ export function plantSecrets(names) {
|
|
|
266
266
|
/**
|
|
267
267
|
* The provider a conformance module makes, its drifted twin and its run folders (mountFor) when it offers them, and what
|
|
268
268
|
* it says of its run: conformanceImage(), the image when --image names none (asked only then: a module's may make or
|
|
269
|
-
* register its image, so it is given the run's signal),
|
|
269
|
+
* register its image, so it is given the run's signal), conformanceNotes, strings for the report, and
|
|
270
|
+
* conformanceClock, the clock its provider's timers run on.
|
|
270
271
|
*/
|
|
271
272
|
async function load(label, module, options, { imageNamed, signal }, declared) {
|
|
272
273
|
const { createProvider, createDriftedProvider, conformanceImage, mountFor, dialKit } = module;
|
|
@@ -309,6 +310,13 @@ async function load(label, module, options, { imageNamed, signal }, declared) {
|
|
|
309
310
|
throw new Usage(`${label}: conformanceNotes is not an array of strings`);
|
|
310
311
|
target.notes = notes;
|
|
311
312
|
}
|
|
313
|
+
const clock = module.conformanceClock;
|
|
314
|
+
if (clock !== undefined) {
|
|
315
|
+
const { now, sleep } = (clock ?? {});
|
|
316
|
+
if (typeof now !== "function" || typeof sleep !== "function")
|
|
317
|
+
throw new Usage(`${label}: conformanceClock is not a clock: it has no now() and sleep(ms)`);
|
|
318
|
+
target.clock = clock;
|
|
319
|
+
}
|
|
312
320
|
return target;
|
|
313
321
|
}
|
|
314
322
|
/**
|
|
@@ -338,6 +346,7 @@ async function execStreamMain(name, { machine, quick }, json, cwd, io) {
|
|
|
338
346
|
}
|
|
339
347
|
const report = await checkExecStream(host, machine, {
|
|
340
348
|
longMs: quick ? QUICK_LONG_MS : DEFAULT_LONG_MS,
|
|
349
|
+
...io.execStreamBounds,
|
|
341
350
|
...(signal ? { signal } : {}),
|
|
342
351
|
...(progress ? { onCheck: (check) => stderr.write(`${check.status === "pass" ? "✓" : "✗"} ${check.id}\n`) } : {}),
|
|
343
352
|
});
|
|
@@ -378,6 +387,8 @@ export async function main(argv, io = {}) {
|
|
|
378
387
|
}
|
|
379
388
|
return 1;
|
|
380
389
|
}
|
|
390
|
+
// The test's clock, else the module's, else the runner's wall clock.
|
|
391
|
+
const clock = io.clock ?? target.clock;
|
|
381
392
|
const onResult = progress ? (r) => stderr.write(`${r.status === "pass" ? "✓" : r.status === "fail" ? "✗" : "-"} ${r.id}\n`) : undefined;
|
|
382
393
|
if (args.tti !== undefined || args.burst !== undefined) {
|
|
383
394
|
const report = await measureTti(target.provider, {
|
|
@@ -387,7 +398,7 @@ export async function main(argv, io = {}) {
|
|
|
387
398
|
...(args.run ? { run: args.run } : {}),
|
|
388
399
|
...(target.notes && target.notes.length > 0 ? { notes: target.notes } : {}),
|
|
389
400
|
...(signal ? { signal } : {}),
|
|
390
|
-
...(
|
|
401
|
+
...(clock ? { clock } : {}),
|
|
391
402
|
...(onResult ? { onResult } : {}),
|
|
392
403
|
});
|
|
393
404
|
if (providerNotes.length > 0)
|
|
@@ -415,7 +426,7 @@ export async function main(argv, io = {}) {
|
|
|
415
426
|
...(target.dial ? { dial: target.dial } : {}),
|
|
416
427
|
...(onResult ? { onResult } : {}),
|
|
417
428
|
...(io.cdp ? { cdp: io.cdp } : {}),
|
|
418
|
-
...(
|
|
429
|
+
...(clock ? { clock } : {}),
|
|
419
430
|
});
|
|
420
431
|
if (providerNotes.length > 0)
|
|
421
432
|
report.providerNotes = providerNotes;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type NorthflankProvider, type NorthflankProviderOptions } from "../northflank.js";
|
|
2
|
+
import { type Env, type HostedModuleOptions } from "./module-kit.js";
|
|
3
|
+
export { CONFORMANCE_MAX_LIFETIME_MS } from "./module-kit.js";
|
|
4
|
+
export declare const NORTHFLANK_ENV: {
|
|
5
|
+
readonly live: "AGENTRUN_COMPUTER_LIVE_NORTHFLANK";
|
|
6
|
+
/** token, required: a Northflank API token that may manage services and run commands in the project. */
|
|
7
|
+
readonly key: "COMPUTER_NORTHFLANK_TOKEN";
|
|
8
|
+
/** projectId, required: your project the run's services live in. */
|
|
9
|
+
readonly project: "COMPUTER_NORTHFLANK_PROJECT_ID";
|
|
10
|
+
/** teamId: the team, for an organisation token alone. */
|
|
11
|
+
readonly team: "COMPUTER_NORTHFLANK_TEAM_ID";
|
|
12
|
+
/** apiUrl: the API's root; default https://api.northflank.com. */
|
|
13
|
+
readonly apiUrl: "COMPUTER_NORTHFLANK_API_URL";
|
|
14
|
+
/** daemonPath: the daemon binary; default this package's dist/computerd-linux-amd64. */
|
|
15
|
+
readonly daemon: "COMPUTER_NORTHFLANK_DAEMON";
|
|
16
|
+
/** The image every computer of the run starts from; default the box image's public tag. */
|
|
17
|
+
readonly image: "COMPUTER_NORTHFLANK_IMAGE";
|
|
18
|
+
};
|
|
19
|
+
export declare const ENV: {
|
|
20
|
+
readonly live: "AGENTRUN_COMPUTER_LIVE_NORTHFLANK";
|
|
21
|
+
/** token, required: a Northflank API token that may manage services and run commands in the project. */
|
|
22
|
+
readonly key: "COMPUTER_NORTHFLANK_TOKEN";
|
|
23
|
+
/** projectId, required: your project the run's services live in. */
|
|
24
|
+
readonly project: "COMPUTER_NORTHFLANK_PROJECT_ID";
|
|
25
|
+
/** teamId: the team, for an organisation token alone. */
|
|
26
|
+
readonly team: "COMPUTER_NORTHFLANK_TEAM_ID";
|
|
27
|
+
/** apiUrl: the API's root; default https://api.northflank.com. */
|
|
28
|
+
readonly apiUrl: "COMPUTER_NORTHFLANK_API_URL";
|
|
29
|
+
/** daemonPath: the daemon binary; default this package's dist/computerd-linux-amd64. */
|
|
30
|
+
readonly daemon: "COMPUTER_NORTHFLANK_DAEMON";
|
|
31
|
+
/** The image every computer of the run starts from; default the box image's public tag. */
|
|
32
|
+
readonly image: "COMPUTER_NORTHFLANK_IMAGE";
|
|
33
|
+
};
|
|
34
|
+
export type NorthflankSettings = Pick<NorthflankProviderOptions, "token" | "projectId" | "teamId" | "apiUrl" | "daemonPath">;
|
|
35
|
+
/** The provider's options this module reads from env, each only when its name is set; throws in words without the token or the project, never echoing the token. */
|
|
36
|
+
export declare function settingsFromEnv(env?: Env): NorthflankSettings;
|
|
37
|
+
export declare const conformanceNotes: string[];
|
|
38
|
+
export interface NorthflankModuleOptions extends HostedModuleOptions, Pick<NorthflankProviderOptions, "fetch" | "webSocket" | "daemonPath" | "timeouts" | "onNote"> {
|
|
39
|
+
}
|
|
40
|
+
export declare const createProvider: (options?: NorthflankModuleOptions | undefined) => Promise<NorthflankProvider>, createDriftedProvider: (options?: NorthflankModuleOptions | undefined) => Promise<NorthflankProvider>, createHost: (options?: NorthflankModuleOptions | undefined) => Promise<import("../host.js").MachineHost>, sweepScope: (options?: {
|
|
41
|
+
env?: Env;
|
|
42
|
+
}) => string;
|
|
43
|
+
/** The image every computer of the run starts from: COMPUTER_NORTHFLANK_IMAGE, else the box image's public tag. */
|
|
44
|
+
export declare function conformanceImage({ env }?: Pick<NorthflankModuleOptions, "env">): Promise<string>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Northflank for the conformance CLI: `npm run conformance -w @parcha/agentrun-computer -- --provider northflank`. It
|
|
2
|
+
// makes real services, which bill while they run, so it runs only with AGENTRUN_COMPUTER_LIVE_NORTHFLANK=1 and your own
|
|
3
|
+
// token, under COMPUTER_NORTHFLANK_TOKEN (never NORTHFLANK_API_TOKEN or NF_API_TOKEN, which may hold another team's),
|
|
4
|
+
// with your project under COMPUTER_NORTHFLANK_PROJECT_ID (never NF_PROJECT_ID, which Northflank injects into its own
|
|
5
|
+
// services, or NORTHFLANK_PROJECT_ID). Every computer of a run has a deadline of at most 30 minutes, which the janitor keeps.
|
|
6
|
+
import { boxImageRef } from "../box-image.js";
|
|
7
|
+
import { httpsBase } from "../hosted/rest.js";
|
|
8
|
+
import { create, DEFAULT_API_URL } from "../northflank.js";
|
|
9
|
+
import { hostedModule, keyPrint, requiredSecret, setOptions } from "./module-kit.js";
|
|
10
|
+
export { CONFORMANCE_MAX_LIFETIME_MS } from "./module-kit.js";
|
|
11
|
+
export const NORTHFLANK_ENV = {
|
|
12
|
+
live: "AGENTRUN_COMPUTER_LIVE_NORTHFLANK",
|
|
13
|
+
/** token, required: a Northflank API token that may manage services and run commands in the project. */
|
|
14
|
+
key: "COMPUTER_NORTHFLANK_TOKEN",
|
|
15
|
+
/** projectId, required: your project the run's services live in. */
|
|
16
|
+
project: "COMPUTER_NORTHFLANK_PROJECT_ID",
|
|
17
|
+
/** teamId: the team, for an organisation token alone. */
|
|
18
|
+
team: "COMPUTER_NORTHFLANK_TEAM_ID",
|
|
19
|
+
/** apiUrl: the API's root; default https://api.northflank.com. */
|
|
20
|
+
apiUrl: "COMPUTER_NORTHFLANK_API_URL",
|
|
21
|
+
/** daemonPath: the daemon binary; default this package's dist/computerd-linux-amd64. */
|
|
22
|
+
daemon: "COMPUTER_NORTHFLANK_DAEMON",
|
|
23
|
+
/** The image every computer of the run starts from; default the box image's public tag. */
|
|
24
|
+
image: "COMPUTER_NORTHFLANK_IMAGE",
|
|
25
|
+
};
|
|
26
|
+
export const ENV = NORTHFLANK_ENV;
|
|
27
|
+
/** The provider's options this module reads from env, each only when its name is set; throws in words without the token or the project, never echoing the token. */
|
|
28
|
+
export function settingsFromEnv(env = process.env) {
|
|
29
|
+
return {
|
|
30
|
+
token: requiredSecret(env, NORTHFLANK_ENV.key, "a Northflank API token"),
|
|
31
|
+
projectId: requiredSecret(env, NORTHFLANK_ENV.project, "the id of your Northflank project"),
|
|
32
|
+
...setOptions(env, { teamId: NORTHFLANK_ENV.team, apiUrl: NORTHFLANK_ENV.apiUrl, daemonPath: NORTHFLANK_ENV.daemon }),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export const conformanceNotes = [
|
|
36
|
+
"northflank: every computer is a Northflank service (a Kata microVM on Northflank Cloud, amd64 unverified) in your project, from the box image, its command sleep infinity; the daemon is a child of a command on the command-exec WebSocket under the pid wrapper, its stdio the socket's latin1 text messages; labels are packed into the workload's annotations; lifetime is the janitor's, by the deadline label, capped at 30 minutes for the run, with the service's expiry at the backstop. Network none, open and a list are init's. No Archil mount and no desktop.",
|
|
37
|
+
];
|
|
38
|
+
export const { createProvider, createDriftedProvider, createHost, sweepScope } = hostedModule({
|
|
39
|
+
live: { name: NORTHFLANK_ENV.live, what: "the Northflank conformance module makes real services, which bill while they run", whose: "your own token and project" },
|
|
40
|
+
settingsFromEnv,
|
|
41
|
+
create,
|
|
42
|
+
host: ["fetch", "webSocket", "daemonPath", "timeouts"],
|
|
43
|
+
run: ["onNote"],
|
|
44
|
+
// The project (and team), the token named by its sha256 prefix alone.
|
|
45
|
+
scope: ({ token, projectId, teamId, apiUrl }) => `the Northflank project ${projectId}${teamId === undefined ? "" : ` of team ${teamId}`} at ${httpsBase(apiUrl ?? DEFAULT_API_URL, `the Northflank API URL (${NORTHFLANK_ENV.apiUrl})`)}, by the token ${keyPrint(token)}`,
|
|
46
|
+
});
|
|
47
|
+
/** The image every computer of the run starts from: COMPUTER_NORTHFLANK_IMAGE, else the box image's public tag. */
|
|
48
|
+
export async function conformanceImage({ env = process.env } = {}) {
|
|
49
|
+
return env[NORTHFLANK_ENV.image] || boxImageRef();
|
|
50
|
+
}
|
package/dist/descriptor.d.ts
CHANGED
|
@@ -73,6 +73,12 @@ export interface ProviderDescriptor<Module extends ProviderModule = ProviderModu
|
|
|
73
73
|
readonly settings?: readonly DescriptorSetting[];
|
|
74
74
|
/** The vendor bills by time; prices are the vendor's page, not ours. */
|
|
75
75
|
readonly metered: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Its create answers the size the vendor runs each computer at (CreatedComputer.resources: its CPUs and memory), on
|
|
78
|
+
* every create, the vendor's figure over the spec's. A metered provider's time is priced by that size, so one
|
|
79
|
+
* without it has its computer time unpriced, whatever its price setting says: time no one can measure is never $0.
|
|
80
|
+
*/
|
|
81
|
+
readonly sized?: boolean;
|
|
76
82
|
/**
|
|
77
83
|
* The mount kinds its computers take beside the synced folder, bind or archil; [] for none. sync is never listed: it
|
|
78
84
|
* is derived (syncs, derivedMounts), and capabilities().mount declares both.
|
package/dist/descriptor.js
CHANGED
|
@@ -25,6 +25,8 @@ export function descriptorProblems(value) {
|
|
|
25
25
|
problems.push("label is not a name in words");
|
|
26
26
|
if (typeof d.metered !== "boolean")
|
|
27
27
|
problems.push("metered is not true or false");
|
|
28
|
+
if (d.sized !== undefined && typeof d.sized !== "boolean")
|
|
29
|
+
problems.push("sized is not true or false");
|
|
28
30
|
if (typeof d.load !== "function")
|
|
29
31
|
problems.push("load is not a function that imports the provider module");
|
|
30
32
|
if (!Array.isArray(d.mounts) || d.mounts.some((kind) => kind !== "bind" && kind !== "archil"))
|
|
@@ -16,6 +16,7 @@ export declare const AGENT37: {
|
|
|
16
16
|
readonly option: "secrets";
|
|
17
17
|
};
|
|
18
18
|
readonly metered: true;
|
|
19
|
+
readonly sized: true;
|
|
19
20
|
readonly mounts: readonly ["archil"];
|
|
20
21
|
readonly network: readonly ["none", "open", "allow"];
|
|
21
22
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
@@ -17,6 +17,8 @@ export const AGENT37 = defineProvider({
|
|
|
17
17
|
// The SSH key the provider makes for itself, kept in the server's sealed store: one per server.
|
|
18
18
|
secrets: { option: "secrets" },
|
|
19
19
|
metered: true,
|
|
20
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
21
|
+
sized: true,
|
|
20
22
|
mounts: ["archil"],
|
|
21
23
|
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the instance is made
|
|
22
24
|
// deny-all. Open and a list: the instance is made allow-all, and its programs' one way out is init's egress proxy,
|
|
@@ -84,6 +84,7 @@ export declare const DAYTONA: {
|
|
|
84
84
|
}];
|
|
85
85
|
readonly connect: "either";
|
|
86
86
|
readonly metered: true;
|
|
87
|
+
readonly sized: true;
|
|
87
88
|
readonly mounts: readonly [];
|
|
88
89
|
readonly unmounted: {
|
|
89
90
|
readonly archil: "Archil mounts don't work on Daytona's hosted cloud, where Archil's client hangs on its sandboxes; a self-hosted Daytona target takes one once its operator sets DAYTONA_ARCHIL_EGRESS";
|
|
@@ -85,6 +85,8 @@ export const DAYTONA = defineProvider({
|
|
|
85
85
|
settings: [{ name: "daytonaConnect", option: "connect" }],
|
|
86
86
|
connect: "either",
|
|
87
87
|
metered: true,
|
|
88
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
89
|
+
sized: true,
|
|
88
90
|
// No mount by default: on Daytona's hosted cloud, Archil's client (0.10.1) mounts on its container sandboxes, but
|
|
89
91
|
// nothing reads its /dev/fuse after, so the first statx of the folder hangs, on every kernel and mount shape tried
|
|
90
92
|
// (live, 11-14). An Archil mount is refused in these words, before any request. A self-hosted Daytona target whose
|
|
@@ -24,6 +24,7 @@ export declare const E2B: {
|
|
|
24
24
|
}];
|
|
25
25
|
readonly connect: "either";
|
|
26
26
|
readonly metered: true;
|
|
27
|
+
readonly sized: true;
|
|
27
28
|
readonly mounts: readonly ["archil"];
|
|
28
29
|
readonly network: readonly ["none", "open", "allow"];
|
|
29
30
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, import("../kinds.js").KindCapabilities];
|
package/dist/descriptors/e2b.js
CHANGED
|
@@ -22,6 +22,8 @@ export const E2B = defineProvider({
|
|
|
22
22
|
settings: [{ name: "e2bConnect", option: "connect" }],
|
|
23
23
|
connect: "either",
|
|
24
24
|
metered: true,
|
|
25
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
26
|
+
sized: true,
|
|
25
27
|
mounts: ["archil"],
|
|
26
28
|
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the sandbox is made with
|
|
27
29
|
// no internet access. Open and a list: the sandbox gets internet access, and its programs' one way out is init's egress
|
package/dist/descriptors/fly.js
CHANGED
|
@@ -14,6 +14,8 @@ export const FLY = defineProvider({
|
|
|
14
14
|
{ name: "FLY_APP", option: "app", required: true },
|
|
15
15
|
],
|
|
16
16
|
metered: true,
|
|
17
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
18
|
+
sized: true,
|
|
17
19
|
// Its machines dial the server: Fly's exec answers only once the command ends, so nothing reaches into one.
|
|
18
20
|
connect: "dial",
|
|
19
21
|
// None: a machine that dials takes no Archil mount (mountsOf).
|
|
@@ -14,6 +14,7 @@ export declare const GROUNDBOX: {
|
|
|
14
14
|
readonly required: true;
|
|
15
15
|
}];
|
|
16
16
|
readonly metered: true;
|
|
17
|
+
readonly sized: true;
|
|
17
18
|
readonly mounts: readonly [];
|
|
18
19
|
readonly network: readonly ["none", "open", "allow"];
|
|
19
20
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
@@ -16,6 +16,8 @@ export const GROUNDBOX = defineProvider({
|
|
|
16
16
|
label: "Groundbox",
|
|
17
17
|
keys: [{ name: "GROUNDBOX_API_KEY", option: "apiKey", required: true }],
|
|
18
18
|
metered: true,
|
|
19
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
20
|
+
sized: true,
|
|
19
21
|
// None yet: the guest kernel has FUSE, and Archil's client there is untried.
|
|
20
22
|
mounts: [],
|
|
21
23
|
// All three are ours: root in the guest makes a network namespace, so init's fence holds none and its egress proxy
|