@parcha/agentrun-computer 0.1.0-beta.67 → 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 +243 -9
- package/box/README.md +8 -0
- package/box/install.sh +60 -6
- 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/instabox.d.ts +36 -0
- package/dist/conformance/instabox.js +43 -0
- package/dist/conformance/northflank.d.ts +44 -0
- package/dist/conformance/northflank.js +50 -0
- package/dist/conformance/sprites.d.ts +32 -0
- package/dist/conformance/sprites.js +40 -0
- package/dist/conformance/vercel.d.ts +35 -0
- package/dist/conformance/vercel.js +43 -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 +14 -0
- package/dist/descriptors/e2b.js +20 -3
- 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 +106 -1
- package/dist/descriptors/index.js +8 -2
- package/dist/descriptors/instabox.d.ts +20 -0
- package/dist/descriptors/instabox.js +22 -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/descriptors/sprites.d.ts +19 -0
- package/dist/descriptors/sprites.js +19 -0
- package/dist/descriptors/vercel.d.ts +23 -0
- package/dist/descriptors/vercel.js +24 -0
- package/dist/docker/egress-main.js +17 -10
- package/dist/docker/egress-proxy.d.ts +7 -0
- package/dist/docker/egress-proxy.js +12 -0
- package/dist/docker/egress.d.ts +3 -1
- package/dist/docker/egress.js +11 -4
- package/dist/docker/image.d.ts +8 -2
- package/dist/docker/image.js +24 -3
- package/dist/docker.d.ts +6 -0
- package/dist/docker.js +15 -5
- package/dist/e2b.d.ts +25 -10
- package/dist/e2b.js +36 -16
- 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 +25 -12
- package/dist/hosted/rest.js +23 -1
- package/dist/hosted/scripts.d.ts +2 -0
- package/dist/hosted/scripts.js +29 -0
- package/dist/hosted/ssh-exec.d.ts +17 -2
- package/dist/hosted/ssh-exec.js +17 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/instabox.d.ts +30 -0
- package/dist/instabox.js +424 -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/dist/render.js +4 -3
- package/dist/sprites.d.ts +37 -0
- package/dist/sprites.js +309 -0
- package/dist/vercel.d.ts +26 -0
- package/dist/vercel.js +262 -0
- package/package.json +22 -2
|
@@ -7,14 +7,18 @@ import { DOCKER } from "./docker.js";
|
|
|
7
7
|
import { E2B } from "./e2b.js";
|
|
8
8
|
import { FLY } from "./fly.js";
|
|
9
9
|
import { GROUNDBOX } from "./groundbox.js";
|
|
10
|
+
import { INSTABOX } from "./instabox.js";
|
|
10
11
|
import { KERNEL } from "./kernel.js";
|
|
11
12
|
import { LOCAL } from "./local-chrome.js";
|
|
12
13
|
import { MODAL } from "./modal.js";
|
|
13
14
|
import { MORPH } from "./morph.js";
|
|
15
|
+
import { NORTHFLANK } from "./northflank.js";
|
|
14
16
|
import { ORGO } from "./orgo.js";
|
|
15
17
|
import { PHONE_HARNESS } from "./phone-harness.js";
|
|
16
18
|
import { RENDER } from "./render.js";
|
|
17
19
|
import { SMOLCLOUD } from "./smolcloud.js";
|
|
20
|
+
import { SPRITES } from "./sprites.js";
|
|
21
|
+
import { VERCEL } from "./vercel.js";
|
|
18
22
|
export declare const DESCRIPTORS: readonly [{
|
|
19
23
|
readonly id: "docker";
|
|
20
24
|
readonly label: "Docker";
|
|
@@ -74,6 +78,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
74
78
|
}];
|
|
75
79
|
readonly connect: "either";
|
|
76
80
|
readonly metered: true;
|
|
81
|
+
readonly sized: true;
|
|
77
82
|
readonly mounts: readonly [];
|
|
78
83
|
readonly unmounted: {
|
|
79
84
|
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";
|
|
@@ -133,6 +138,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
133
138
|
}];
|
|
134
139
|
readonly connect: "either";
|
|
135
140
|
readonly metered: true;
|
|
141
|
+
readonly sized: true;
|
|
136
142
|
readonly mounts: readonly ["archil"];
|
|
137
143
|
readonly network: readonly ["none", "open", "allow"];
|
|
138
144
|
readonly capabilities: readonly [{
|
|
@@ -168,6 +174,18 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
168
174
|
readonly name: "E2B_API_KEY";
|
|
169
175
|
readonly option: "apiKey";
|
|
170
176
|
readonly required: true;
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "AGENTRUN_E2B_DOMAIN";
|
|
179
|
+
readonly option: "domain";
|
|
180
|
+
readonly required: false;
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "AGENTRUN_E2B_API_URL";
|
|
183
|
+
readonly option: "apiUrl";
|
|
184
|
+
readonly required: false;
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "AGENTRUN_E2B_TEMPLATE";
|
|
187
|
+
readonly option: "template";
|
|
188
|
+
readonly required: false;
|
|
171
189
|
}];
|
|
172
190
|
readonly settings: readonly [{
|
|
173
191
|
readonly name: "e2bConnect";
|
|
@@ -175,10 +193,12 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
175
193
|
}];
|
|
176
194
|
readonly connect: "either";
|
|
177
195
|
readonly metered: true;
|
|
196
|
+
readonly sized: true;
|
|
178
197
|
readonly mounts: readonly ["archil"];
|
|
179
198
|
readonly network: readonly ["none", "open", "allow"];
|
|
180
199
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, import("../kinds.js").KindCapabilities];
|
|
181
200
|
readonly prepareImage: true;
|
|
201
|
+
readonly imageEnv: "AGENTRUN_E2B_TEMPLATE";
|
|
182
202
|
readonly load: () => Promise<typeof import("../e2b.js")>;
|
|
183
203
|
}, {
|
|
184
204
|
readonly id: "agent37";
|
|
@@ -196,6 +216,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
196
216
|
readonly option: "secrets";
|
|
197
217
|
};
|
|
198
218
|
readonly metered: true;
|
|
219
|
+
readonly sized: true;
|
|
199
220
|
readonly mounts: readonly ["archil"];
|
|
200
221
|
readonly network: readonly ["none", "open", "allow"];
|
|
201
222
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
@@ -271,6 +292,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
271
292
|
readonly required: true;
|
|
272
293
|
}];
|
|
273
294
|
readonly metered: true;
|
|
295
|
+
readonly sized: true;
|
|
274
296
|
readonly connect: "dial";
|
|
275
297
|
readonly mounts: readonly [];
|
|
276
298
|
readonly network: readonly ["none", "open", "allow"];
|
|
@@ -302,6 +324,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
302
324
|
readonly required: true;
|
|
303
325
|
}];
|
|
304
326
|
readonly metered: true;
|
|
327
|
+
readonly sized: true;
|
|
305
328
|
readonly connect: "dial";
|
|
306
329
|
readonly mounts: readonly [];
|
|
307
330
|
readonly network: readonly ["none", "open", "allow"];
|
|
@@ -322,6 +345,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
322
345
|
readonly picked: true;
|
|
323
346
|
}];
|
|
324
347
|
readonly metered: true;
|
|
348
|
+
readonly sized: true;
|
|
325
349
|
readonly mounts: readonly [];
|
|
326
350
|
readonly unmounted: {
|
|
327
351
|
readonly sync: "Orgo's provider makes no /workspace for a synced folder yet";
|
|
@@ -531,6 +555,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
531
555
|
readonly required: true;
|
|
532
556
|
}];
|
|
533
557
|
readonly metered: true;
|
|
558
|
+
readonly sized: true;
|
|
534
559
|
readonly mounts: readonly [];
|
|
535
560
|
readonly network: readonly ["none", "open", "allow"];
|
|
536
561
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
@@ -548,11 +573,91 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
548
573
|
}];
|
|
549
574
|
readonly prepareImage: true;
|
|
550
575
|
readonly load: () => Promise<typeof import("../groundbox.js")>;
|
|
576
|
+
}, {
|
|
577
|
+
readonly id: "vercel";
|
|
578
|
+
readonly label: "Vercel Sandbox";
|
|
579
|
+
readonly keys: readonly [{
|
|
580
|
+
readonly name: "VERCEL_TOKEN";
|
|
581
|
+
readonly option: "token";
|
|
582
|
+
readonly required: true;
|
|
583
|
+
}, {
|
|
584
|
+
readonly name: "VERCEL_TEAM_ID";
|
|
585
|
+
readonly option: "teamId";
|
|
586
|
+
readonly required: true;
|
|
587
|
+
}, {
|
|
588
|
+
readonly name: "VERCEL_PROJECT_ID";
|
|
589
|
+
readonly option: "projectId";
|
|
590
|
+
readonly required: true;
|
|
591
|
+
}];
|
|
592
|
+
readonly metered: true;
|
|
593
|
+
readonly mounts: readonly [];
|
|
594
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
595
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
596
|
+
readonly prepareImage: true;
|
|
597
|
+
readonly load: () => Promise<typeof import("../vercel.js")>;
|
|
598
|
+
}, {
|
|
599
|
+
readonly id: "sprites";
|
|
600
|
+
readonly label: "Fly Sprites";
|
|
601
|
+
readonly keys: readonly [{
|
|
602
|
+
readonly name: "SPRITES_TOKEN";
|
|
603
|
+
readonly option: "token";
|
|
604
|
+
readonly required: true;
|
|
605
|
+
}];
|
|
606
|
+
readonly metered: true;
|
|
607
|
+
readonly mounts: readonly [];
|
|
608
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
609
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
610
|
+
readonly defaultImage: {
|
|
611
|
+
readonly sandbox: "default";
|
|
612
|
+
};
|
|
613
|
+
readonly load: () => Promise<typeof import("../sprites.js")>;
|
|
614
|
+
}, {
|
|
615
|
+
readonly id: "instabox";
|
|
616
|
+
readonly label: "InstaBox";
|
|
617
|
+
readonly keys: readonly [{
|
|
618
|
+
readonly name: "INSTABOX_API_KEY";
|
|
619
|
+
readonly option: "apiKey";
|
|
620
|
+
readonly required: true;
|
|
621
|
+
}];
|
|
622
|
+
readonly metered: true;
|
|
623
|
+
readonly sized: true;
|
|
624
|
+
readonly mounts: readonly [];
|
|
625
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
626
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
627
|
+
readonly defaultImage: {
|
|
628
|
+
readonly sandbox: "minimal";
|
|
629
|
+
};
|
|
630
|
+
readonly load: () => Promise<typeof import("../instabox.js")>;
|
|
631
|
+
}, {
|
|
632
|
+
readonly id: "northflank";
|
|
633
|
+
readonly label: "Northflank";
|
|
634
|
+
readonly keys: readonly [{
|
|
635
|
+
readonly name: "NORTHFLANK_API_TOKEN";
|
|
636
|
+
readonly option: "token";
|
|
637
|
+
readonly required: true;
|
|
638
|
+
}, {
|
|
639
|
+
readonly name: "NORTHFLANK_COMPUTER_PROJECT_ID";
|
|
640
|
+
readonly option: "projectId";
|
|
641
|
+
readonly required: true;
|
|
642
|
+
}, {
|
|
643
|
+
readonly name: "NORTHFLANK_COMPUTER_TEAM_ID";
|
|
644
|
+
readonly option: "teamId";
|
|
645
|
+
readonly required: false;
|
|
646
|
+
}];
|
|
647
|
+
readonly metered: true;
|
|
648
|
+
readonly sized: true;
|
|
649
|
+
readonly mounts: readonly [];
|
|
650
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
651
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
652
|
+
readonly prepareImage: true;
|
|
653
|
+
readonly load: () => Promise<typeof import("../northflank.js")>;
|
|
551
654
|
}];
|
|
552
|
-
export { AGENT37, BOXD, BROWSERBASE, CLOUDFLARE, DAYTONA, DOCKER, E2B, FLY, GROUNDBOX, KERNEL, LOCAL, MODAL, MORPH, ORGO, PHONE_HARNESS, RENDER, SMOLCLOUD };
|
|
655
|
+
export { AGENT37, BOXD, BROWSERBASE, CLOUDFLARE, DAYTONA, DOCKER, E2B, FLY, GROUNDBOX, INSTABOX, KERNEL, LOCAL, MODAL, MORPH, NORTHFLANK, ORGO, PHONE_HARNESS, RENDER, SMOLCLOUD, SPRITES, VERCEL };
|
|
553
656
|
export { AGENT37_BASE_TEMPLATE } from "./agent37.js";
|
|
554
657
|
export { BOXD_DEFAULT_IMAGE } from "./boxd.js";
|
|
555
658
|
export { GROUNDBOX_OWN_IMAGE } from "./groundbox.js";
|
|
659
|
+
export { INSTABOX_IMAGE } from "./instabox.js";
|
|
660
|
+
export { SPRITES_IMAGE } from "./sprites.js";
|
|
556
661
|
export { DAYTONA_DEFAULT_SNAPSHOT, DAYTONA_GPU_SNAPSHOT, type DaytonaGpuSnapshot, daytonaGpu, daytonaGpuSnapshot } from "./daytona.js";
|
|
557
662
|
export { ORGO_BASE_IMAGE } from "./orgo.js";
|
|
558
663
|
export { PHONE_GROUPS, PHONE_IMAGE } from "./phone-harness.js";
|
|
@@ -9,19 +9,25 @@ import { DOCKER } from "./docker.js";
|
|
|
9
9
|
import { E2B } from "./e2b.js";
|
|
10
10
|
import { FLY } from "./fly.js";
|
|
11
11
|
import { GROUNDBOX } from "./groundbox.js";
|
|
12
|
+
import { INSTABOX } from "./instabox.js";
|
|
12
13
|
import { KERNEL } from "./kernel.js";
|
|
13
14
|
import { LOCAL } from "./local-chrome.js";
|
|
14
15
|
import { MODAL } from "./modal.js";
|
|
15
16
|
import { MORPH } from "./morph.js";
|
|
17
|
+
import { NORTHFLANK } from "./northflank.js";
|
|
16
18
|
import { ORGO } from "./orgo.js";
|
|
17
19
|
import { PHONE_HARNESS } from "./phone-harness.js";
|
|
18
20
|
import { RENDER } from "./render.js";
|
|
19
21
|
import { SMOLCLOUD } from "./smolcloud.js";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
import { SPRITES } from "./sprites.js";
|
|
23
|
+
import { VERCEL } from "./vercel.js";
|
|
24
|
+
export const DESCRIPTORS = [DOCKER, DAYTONA, MODAL, E2B, AGENT37, MORPH, CLOUDFLARE, FLY, RENDER, ORGO, PHONE_HARNESS, BROWSERBASE, KERNEL, LOCAL, BOXD, SMOLCLOUD, GROUNDBOX, VERCEL, SPRITES, INSTABOX, NORTHFLANK];
|
|
25
|
+
export { AGENT37, BOXD, BROWSERBASE, CLOUDFLARE, DAYTONA, DOCKER, E2B, FLY, GROUNDBOX, INSTABOX, KERNEL, LOCAL, MODAL, MORPH, NORTHFLANK, ORGO, PHONE_HARNESS, RENDER, SMOLCLOUD, SPRITES, VERCEL };
|
|
22
26
|
export { AGENT37_BASE_TEMPLATE } from "./agent37.js";
|
|
23
27
|
export { BOXD_DEFAULT_IMAGE } from "./boxd.js";
|
|
24
28
|
export { GROUNDBOX_OWN_IMAGE } from "./groundbox.js";
|
|
29
|
+
export { INSTABOX_IMAGE } from "./instabox.js";
|
|
30
|
+
export { SPRITES_IMAGE } from "./sprites.js";
|
|
25
31
|
export { DAYTONA_DEFAULT_SNAPSHOT, DAYTONA_GPU_SNAPSHOT, daytonaGpu, daytonaGpuSnapshot } from "./daytona.js";
|
|
26
32
|
export { ORGO_BASE_IMAGE } from "./orgo.js";
|
|
27
33
|
export { PHONE_GROUPS, PHONE_IMAGE } from "./phone-harness.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** InstaBox's smallest template (unverified until the live run: on every paid plan). */
|
|
2
|
+
export declare const INSTABOX_IMAGE = "minimal";
|
|
3
|
+
export declare const INSTABOX: {
|
|
4
|
+
readonly id: "instabox";
|
|
5
|
+
readonly label: "InstaBox";
|
|
6
|
+
readonly keys: readonly [{
|
|
7
|
+
readonly name: "INSTABOX_API_KEY";
|
|
8
|
+
readonly option: "apiKey";
|
|
9
|
+
readonly required: true;
|
|
10
|
+
}];
|
|
11
|
+
readonly metered: true;
|
|
12
|
+
readonly sized: true;
|
|
13
|
+
readonly mounts: readonly [];
|
|
14
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
15
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
16
|
+
readonly defaultImage: {
|
|
17
|
+
readonly sandbox: "minimal";
|
|
18
|
+
};
|
|
19
|
+
readonly load: () => Promise<typeof import("../instabox.js")>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// InstaBox's descriptor: a Linux sandbox on an InstaBox machine (a Firecracker microVM), started from one of InstaBox's
|
|
2
|
+
// templates, the minimal one by default, or a snapshot of the key's workspace. One key, the workspace's API key, under the
|
|
3
|
+
// name InstaBox's own CLI and SDK read. No desktop and no Archil mount: both need our box image, and a machine takes
|
|
4
|
+
// InstaBox's templates alone.
|
|
5
|
+
import { defineProvider } from "../descriptor.js";
|
|
6
|
+
import { SANDBOX } from "./shared.js";
|
|
7
|
+
/** InstaBox's smallest template (unverified until the live run: on every paid plan). */
|
|
8
|
+
export const INSTABOX_IMAGE = "minimal";
|
|
9
|
+
export const INSTABOX = defineProvider({
|
|
10
|
+
id: "instabox",
|
|
11
|
+
label: "InstaBox",
|
|
12
|
+
keys: [{ name: "INSTABOX_API_KEY", option: "apiKey", required: true }],
|
|
13
|
+
metered: true,
|
|
14
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
15
|
+
sized: true,
|
|
16
|
+
mounts: [],
|
|
17
|
+
// All three are init's, through root in the microVM (the machine user's passwordless sudo).
|
|
18
|
+
network: ["none", "open", "allow"],
|
|
19
|
+
capabilities: [SANDBOX],
|
|
20
|
+
defaultImage: { sandbox: INSTABOX_IMAGE },
|
|
21
|
+
load: () => import("../instabox.js"),
|
|
22
|
+
});
|
|
@@ -43,6 +43,8 @@ export const MODAL = defineProvider({
|
|
|
43
43
|
],
|
|
44
44
|
connect: "either",
|
|
45
45
|
metered: true,
|
|
46
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
47
|
+
sized: true,
|
|
46
48
|
mounts: ["archil"],
|
|
47
49
|
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the sandbox is made with
|
|
48
50
|
// its network blocked. Open and a list: the sandbox's network is not blocked, and its programs' one way out is init's
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const NORTHFLANK: {
|
|
2
|
+
readonly id: "northflank";
|
|
3
|
+
readonly label: "Northflank";
|
|
4
|
+
readonly keys: readonly [{
|
|
5
|
+
readonly name: "NORTHFLANK_API_TOKEN";
|
|
6
|
+
readonly option: "token";
|
|
7
|
+
readonly required: true;
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "NORTHFLANK_COMPUTER_PROJECT_ID";
|
|
10
|
+
readonly option: "projectId";
|
|
11
|
+
readonly required: true;
|
|
12
|
+
}, {
|
|
13
|
+
readonly name: "NORTHFLANK_COMPUTER_TEAM_ID";
|
|
14
|
+
readonly option: "teamId";
|
|
15
|
+
readonly required: false;
|
|
16
|
+
}];
|
|
17
|
+
readonly metered: true;
|
|
18
|
+
readonly sized: true;
|
|
19
|
+
readonly mounts: readonly [];
|
|
20
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
21
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
22
|
+
readonly prepareImage: true;
|
|
23
|
+
readonly load: () => Promise<typeof import("../northflank.js")>;
|
|
24
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Northflank's descriptor: a Linux sandbox on a Northflank service (a Kata microVM on Northflank Cloud) in the customer's
|
|
2
|
+
// own project, started from our box image, the public registry tag its prepareImage() answers (box-image.ts), which
|
|
3
|
+
// Northflank pulls at each create. The token is under the name Northflank's own client reads (NORTHFLANK_API_TOKEN,
|
|
4
|
+
// @northflank/js-client). The project has no default, so Settings asks for it; its key is neither NF_PROJECT_ID, which
|
|
5
|
+
// Northflank injects into every service it runs, nor NORTHFLANK_PROJECT_ID, a name other tools use, so a server
|
|
6
|
+
// Northflank runs never takes its own project for the computers'. The team is for an organisation token alone. No Archil mount and no desktop yet: both are unverified until
|
|
7
|
+
// a live run.
|
|
8
|
+
import { defineProvider } from "../descriptor.js";
|
|
9
|
+
import { SANDBOX } from "./shared.js";
|
|
10
|
+
export const NORTHFLANK = defineProvider({
|
|
11
|
+
id: "northflank",
|
|
12
|
+
label: "Northflank",
|
|
13
|
+
keys: [
|
|
14
|
+
{ name: "NORTHFLANK_API_TOKEN", option: "token", required: true },
|
|
15
|
+
{ name: "NORTHFLANK_COMPUTER_PROJECT_ID", option: "projectId", required: true },
|
|
16
|
+
{ name: "NORTHFLANK_COMPUTER_TEAM_ID", option: "teamId", required: false },
|
|
17
|
+
],
|
|
18
|
+
metered: true,
|
|
19
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by: Northflank's
|
|
20
|
+
// get-service (API docs, services/get-service) answers billing.deploymentPlan, required, and the plan maps to its
|
|
21
|
+
// vCPUs and MB.
|
|
22
|
+
sized: true,
|
|
23
|
+
mounts: [],
|
|
24
|
+
// All three are init's, through root in the microVM (unverified until the live run: root makes a network namespace).
|
|
25
|
+
network: ["none", "open", "allow"],
|
|
26
|
+
capabilities: [SANDBOX],
|
|
27
|
+
// No default image: every computer starts from the box image its prepareImage() answers, unless its spec names one.
|
|
28
|
+
prepareImage: true,
|
|
29
|
+
load: () => import("../northflank.js"),
|
|
30
|
+
});
|
package/dist/descriptors/orgo.js
CHANGED
|
@@ -37,6 +37,8 @@ export const ORGO = defineProvider({
|
|
|
37
37
|
{ name: "ORGO_WORKSPACE_ID", option: "workspaceId", required: false, picked: true },
|
|
38
38
|
],
|
|
39
39
|
metered: true,
|
|
40
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
41
|
+
sized: true,
|
|
40
42
|
// None yet: an Archil mount needs an Orgo template that bakes the helper, and a synced folder a /workspace its create
|
|
41
43
|
// makes, which the shared hosted adapter's does and Orgo's own does not.
|
|
42
44
|
mounts: [],
|
|
@@ -13,6 +13,8 @@ export const RENDER = defineProvider({
|
|
|
13
13
|
{ name: "RENDER_WORKSPACE_ID", option: "ownerId", required: true },
|
|
14
14
|
],
|
|
15
15
|
metered: true,
|
|
16
|
+
// Its create answers the size the vendor runs the computer at (resources), which its time is priced by.
|
|
17
|
+
sized: true,
|
|
16
18
|
// Its machines dial the server: Render's runs take no stdin, so nothing reaches into one.
|
|
17
19
|
connect: "dial",
|
|
18
20
|
// None: a machine that dials takes no Archil mount (mountsOf).
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Fly's own image, the only one a sprite starts from. */
|
|
2
|
+
export declare const SPRITES_IMAGE = "default";
|
|
3
|
+
export declare const SPRITES: {
|
|
4
|
+
readonly id: "sprites";
|
|
5
|
+
readonly label: "Fly Sprites";
|
|
6
|
+
readonly keys: readonly [{
|
|
7
|
+
readonly name: "SPRITES_TOKEN";
|
|
8
|
+
readonly option: "token";
|
|
9
|
+
readonly required: true;
|
|
10
|
+
}];
|
|
11
|
+
readonly metered: true;
|
|
12
|
+
readonly mounts: readonly [];
|
|
13
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
14
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
15
|
+
readonly defaultImage: {
|
|
16
|
+
readonly sandbox: "default";
|
|
17
|
+
};
|
|
18
|
+
readonly load: () => Promise<typeof import("../sprites.js")>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Fly Sprites' descriptor: a Linux sandbox on a sprite (a Firecracker microVM Fly keeps by name), started from Fly's own
|
|
2
|
+
// Ubuntu image, the one image Sprites has. One key, the API token, under the name Fly's own CLI and SDK test client read.
|
|
3
|
+
// No desktop and no Archil mount: both need our box image, and a sprite takes no image.
|
|
4
|
+
import { defineProvider } from "../descriptor.js";
|
|
5
|
+
import { SANDBOX } from "./shared.js";
|
|
6
|
+
/** Fly's own image, the only one a sprite starts from. */
|
|
7
|
+
export const SPRITES_IMAGE = "default";
|
|
8
|
+
export const SPRITES = defineProvider({
|
|
9
|
+
id: "sprites",
|
|
10
|
+
label: "Fly Sprites",
|
|
11
|
+
keys: [{ name: "SPRITES_TOKEN", option: "token", required: true }],
|
|
12
|
+
metered: true,
|
|
13
|
+
mounts: [],
|
|
14
|
+
// All three are init's, through root in the microVM (unverified until the live run: the exec user's passwordless sudo).
|
|
15
|
+
network: ["none", "open", "allow"],
|
|
16
|
+
capabilities: [SANDBOX],
|
|
17
|
+
defaultImage: { sandbox: SPRITES_IMAGE },
|
|
18
|
+
load: () => import("../sprites.js"),
|
|
19
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const VERCEL: {
|
|
2
|
+
readonly id: "vercel";
|
|
3
|
+
readonly label: "Vercel Sandbox";
|
|
4
|
+
readonly keys: readonly [{
|
|
5
|
+
readonly name: "VERCEL_TOKEN";
|
|
6
|
+
readonly option: "token";
|
|
7
|
+
readonly required: true;
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "VERCEL_TEAM_ID";
|
|
10
|
+
readonly option: "teamId";
|
|
11
|
+
readonly required: true;
|
|
12
|
+
}, {
|
|
13
|
+
readonly name: "VERCEL_PROJECT_ID";
|
|
14
|
+
readonly option: "projectId";
|
|
15
|
+
readonly required: true;
|
|
16
|
+
}];
|
|
17
|
+
readonly metered: true;
|
|
18
|
+
readonly mounts: readonly [];
|
|
19
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
20
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities];
|
|
21
|
+
readonly prepareImage: true;
|
|
22
|
+
readonly load: () => Promise<typeof import("../vercel.js")>;
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Vercel Sandbox's descriptor: a Linux sandbox on a Vercel Sandbox (a Firecracker microVM), started from our box image
|
|
2
|
+
// as the project's registry holds it, the tag its prepareImage() answers (agentrun-box:<recipe hash>). Three keys: the
|
|
3
|
+
// access token, a secret, and the team and project ids, which aren't secrets but have no default, so Settings asks for
|
|
4
|
+
// them. No Archil mount yet: whether its client mounts in the microVM is unverified until a live run.
|
|
5
|
+
import { defineProvider } from "../descriptor.js";
|
|
6
|
+
import { SANDBOX } from "./shared.js";
|
|
7
|
+
export const VERCEL = defineProvider({
|
|
8
|
+
id: "vercel",
|
|
9
|
+
label: "Vercel Sandbox",
|
|
10
|
+
keys: [
|
|
11
|
+
{ name: "VERCEL_TOKEN", option: "token", required: true },
|
|
12
|
+
{ name: "VERCEL_TEAM_ID", option: "teamId", required: true },
|
|
13
|
+
{ name: "VERCEL_PROJECT_ID", option: "projectId", required: true },
|
|
14
|
+
],
|
|
15
|
+
metered: true,
|
|
16
|
+
mounts: [],
|
|
17
|
+
// All three are ours: root in the microVM makes a network namespace (unverified until the live run), so init's fence
|
|
18
|
+
// holds none and its egress proxy open and a list (hosted/network.ts).
|
|
19
|
+
network: ["none", "open", "allow"],
|
|
20
|
+
capabilities: [SANDBOX],
|
|
21
|
+
// No default image: every computer starts from the box image its prepareImage() answers, unless its spec names one.
|
|
22
|
+
prepareImage: true,
|
|
23
|
+
load: () => import("../vercel.js"),
|
|
24
|
+
});
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
// The entry a Docker computer's egress proxy container runs (egress.ts makes the container):
|
|
2
2
|
//
|
|
3
|
-
// node egress-main.js --socket <path> --deadline <ISO time> (--allow <entries,...> | --open public) [--local <addresses,...>] [--hint <words>]
|
|
3
|
+
// node egress-main.js --socket <path> --deadline <ISO time> (--allow <entries,...> | --open public) [--local <addresses,...>] [--hint <words>] [--max-tunnels <n>]
|
|
4
4
|
//
|
|
5
5
|
// `--open public` is every public host (a computer whose network is open); `--allow` a list. It refuses to start, exit 2
|
|
6
6
|
// and why on stdout, with neither or both, an empty list or a bad entry (no list never means open: only `--open public`
|
|
7
|
-
// does), with no socket, or with no deadline it can read. Started, it logs "egress
|
|
8
|
-
// open") once its socket listens, then one line per decision. It ends, exit 0 and its socket removed, on SIGTERM or SIGINT and at
|
|
7
|
+
// does), with no socket, or with no deadline it can read. Started, it logs "egress cap tunnels=<n>", the cap in force, and
|
|
8
|
+
// "egress ready allow=<list>" (or "egress ready open") once its socket listens, then one line per decision. It ends, exit 0 and its socket removed, on SIGTERM or SIGINT and at
|
|
9
9
|
// the deadline, the computer's own: an orphaned proxy forwards nothing past its computer's end. `--local` is the Docker
|
|
10
|
-
// host's own addresses, refused as this host's.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
// host's own addresses, refused as this host's. `--max-tunnels` is the operator's cap on connections open at once, 1 to
|
|
11
|
+
// MAX_TUNNELS_CEILING, default DEFAULT_MAX_TUNNELS; any other value refuses the start. It imports only node: modules and
|
|
12
|
+
// the proxy: it runs in a bare Node image.
|
|
13
|
+
import { DEFAULT_MAX_TUNNELS, EGRESS_READY, MAX_TUNNELS_CEILING, maxTunnelsOf, parseAllow, startEgressProxy } from "./egress-proxy.js";
|
|
14
|
+
/** Connections in all through one computer's proxy, for its life: serve's, for one run's box. */
|
|
14
15
|
const MAX_CONNECTIONS = 20_000;
|
|
15
16
|
/** The longest a Node timer holds; a later deadline is waited for in steps of it. */
|
|
16
17
|
const MAX_TIMER_MS = 2_147_483_647;
|
|
17
|
-
const FLAGS = new Set(["--socket", "--deadline", "--allow", "--open", "--local", "--hint"]);
|
|
18
|
+
const FLAGS = new Set(["--socket", "--deadline", "--allow", "--open", "--local", "--hint", "--max-tunnels"]);
|
|
18
19
|
const say = (line) => process.stdout.write(`${line}\n`);
|
|
19
20
|
const refuse = (why) => {
|
|
20
21
|
say(`egress: ${why}, so the proxy does not start`);
|
|
@@ -51,22 +52,28 @@ const deadline = Date.parse(given.get("--deadline") ?? "");
|
|
|
51
52
|
if (Number.isNaN(deadline))
|
|
52
53
|
refuse("no deadline was given as an ISO time");
|
|
53
54
|
const local = (given.get("--local") ?? "").split(",").filter(Boolean);
|
|
55
|
+
const capped = given.get("--max-tunnels");
|
|
56
|
+
const maxTunnels = capped === undefined ? DEFAULT_MAX_TUNNELS : maxTunnelsOf(capped);
|
|
57
|
+
if (maxTunnels === undefined)
|
|
58
|
+
refuse(`--max-tunnels takes a whole number from 1 to ${MAX_TUNNELS_CEILING}, not ${JSON.stringify(capped)}`);
|
|
54
59
|
const proxy = await startEgressProxy({
|
|
55
60
|
socketPath,
|
|
56
|
-
maxTunnels:
|
|
61
|
+
maxTunnels: maxTunnels,
|
|
57
62
|
maxConnections: MAX_CONNECTIONS,
|
|
58
63
|
log: say,
|
|
59
64
|
...(allow === undefined ? {} : { allow }),
|
|
60
65
|
alsoLocal: () => local,
|
|
61
66
|
...(given.has("--hint") ? { allowHint: given.get("--hint") } : {}),
|
|
62
67
|
});
|
|
63
|
-
say(allow === undefined ? `${EGRESS_READY} open` : `${EGRESS_READY} allow=${allow.join(",")}`);
|
|
64
68
|
const end = (why) => {
|
|
65
69
|
say(`egress: ${why}, the proxy ends`);
|
|
66
70
|
void proxy.close().finally(() => process.exit(0));
|
|
67
71
|
};
|
|
72
|
+
// The stop handlers come before the ready line: a caller that stops the proxy as soon as it reads ready gets exit 0.
|
|
68
73
|
for (const signal of ["SIGTERM", "SIGINT"])
|
|
69
74
|
process.once(signal, () => end(`${signal} came`));
|
|
75
|
+
say(`egress cap tunnels=${maxTunnels}`);
|
|
76
|
+
say(allow === undefined ? `${EGRESS_READY} open` : `${EGRESS_READY} allow=${allow.join(",")}`);
|
|
70
77
|
const wait = () => {
|
|
71
78
|
const left = deadline - Date.now();
|
|
72
79
|
if (left <= 0)
|
|
@@ -44,6 +44,13 @@ export interface EgressProxyOptions {
|
|
|
44
44
|
export declare function parseAllow(entries: string | readonly string[]): string[];
|
|
45
45
|
/** The ports a list opens: plain HTTP and HTTPS. */
|
|
46
46
|
export declare const LISTED_PORTS: readonly number[];
|
|
47
|
+
/** Connections open at once through one computer's proxy when its operator sets no cap (`maxTunnels`). */
|
|
48
|
+
export declare const DEFAULT_MAX_TUNNELS = 64;
|
|
49
|
+
/** The highest cap an operator may set: a tunnel holds two open files (the computer's side and the host's), and the
|
|
50
|
+
* proxy container is held to 1024, with room left for its own. */
|
|
51
|
+
export declare const MAX_TUNNELS_CEILING = 256;
|
|
52
|
+
/** `text` as a tunnel cap, a whole number from 1 to MAX_TUNNELS_CEILING written in digits alone, else undefined. */
|
|
53
|
+
export declare function maxTunnelsOf(text: string): number | undefined;
|
|
47
54
|
/** What the proxy container's entry (egress-main.ts) logs once its socket listens: the provider waits for it. */
|
|
48
55
|
export declare const EGRESS_READY = "egress ready";
|
|
49
56
|
export interface EgressProxy {
|
|
@@ -67,6 +67,18 @@ const listedHost = (names, host) => {
|
|
|
67
67
|
};
|
|
68
68
|
/** The ports a list opens: plain HTTP and HTTPS. */
|
|
69
69
|
export const LISTED_PORTS = [80, 443];
|
|
70
|
+
/** Connections open at once through one computer's proxy when its operator sets no cap (`maxTunnels`). */
|
|
71
|
+
export const DEFAULT_MAX_TUNNELS = 64;
|
|
72
|
+
/** The highest cap an operator may set: a tunnel holds two open files (the computer's side and the host's), and the
|
|
73
|
+
* proxy container is held to 1024, with room left for its own. */
|
|
74
|
+
export const MAX_TUNNELS_CEILING = 256;
|
|
75
|
+
/** `text` as a tunnel cap, a whole number from 1 to MAX_TUNNELS_CEILING written in digits alone, else undefined. */
|
|
76
|
+
export function maxTunnelsOf(text) {
|
|
77
|
+
if (!/^[1-9][0-9]{0,2}$/.test(text))
|
|
78
|
+
return undefined;
|
|
79
|
+
const value = Number(text);
|
|
80
|
+
return value <= MAX_TUNNELS_CEILING ? value : undefined;
|
|
81
|
+
}
|
|
70
82
|
/** What the proxy container's entry (egress-main.ts) logs once its socket listens: the provider waits for it. */
|
|
71
83
|
export const EGRESS_READY = "egress ready";
|
|
72
84
|
const HOP = new Set(["connection", "proxy-connection", "keep-alive", "proxy-authorization", "proxy-authenticate", "te", "trailer", "upgrade", "transfer-encoding"]);
|
package/dist/docker/egress.d.ts
CHANGED
|
@@ -101,11 +101,13 @@ export interface EgressRun {
|
|
|
101
101
|
deadline: string;
|
|
102
102
|
code: EgressCode;
|
|
103
103
|
hint?: string;
|
|
104
|
+
/** The operator's cap on the proxy's connections open at once (`--max-tunnels`); the proxy's default without one. */
|
|
105
|
+
maxTunnels?: number;
|
|
104
106
|
/** The spec's labels, which the proxy container carries too. */
|
|
105
107
|
labels?: Record<string, string>;
|
|
106
108
|
}
|
|
107
109
|
/** `docker run` of a computer's proxy container (see the head of this file). Pinned by a golden test. */
|
|
108
|
-
export declare function egressRunArgs({ name, user, image, allow, local, deadline, code, hint, labels }: EgressRun): string[];
|
|
110
|
+
export declare function egressRunArgs({ name, user, image, allow, local, deadline, code, hint, maxTunnels, labels }: EgressRun): string[];
|
|
109
111
|
/** What a computer's read-back needs of the computer itself. */
|
|
110
112
|
export interface EgressOwner {
|
|
111
113
|
name: string;
|
package/dist/docker/egress.js
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
// bound read-only from dist/docker with the package's package.json), in a pinned Node image, on the provider's own
|
|
12
12
|
// bridge alone (EGRESS_NETWORK), publishing no port, as the computer's uid:gid, with a read-only root, no capability,
|
|
13
13
|
// no privilege to gain, and bounded memory, pids and log. Its argv holds the list (or `--open public`), the computer's deadline (it ends itself then), the
|
|
14
|
-
// Docker host's own public addresses (refused as this host's) and the
|
|
14
|
+
// Docker host's own public addresses (refused as this host's), the hint, and the operator's cap on its connections open
|
|
15
|
+
// at once when one is set. It holds no key.
|
|
15
16
|
// - The network EGRESS_NETWORK: one user-defined bridge every proxy of every provider on this Docker host shares, made
|
|
16
17
|
// by the first create that needs it and never removed. Inter-container traffic on it is off (enable_icc=false), and
|
|
17
18
|
// no other workload's container is on it: on Docker's default bridge, one with NET_RAW could ARP-spoof the gateway
|
|
@@ -23,7 +24,7 @@ import { existsSync, readFileSync, statSync } from "node:fs";
|
|
|
23
24
|
import { networkInterfaces } from "node:os";
|
|
24
25
|
import { fileURLToPath } from "node:url";
|
|
25
26
|
import { DEADLINE_LABEL } from "../drift.js";
|
|
26
|
-
import { LISTED_PORTS, parseAllow } from "./egress-proxy.js";
|
|
27
|
+
import { LISTED_PORTS, maxTunnelsOf, parseAllow } from "./egress-proxy.js";
|
|
27
28
|
import { checkAddress } from "./egress-table.js";
|
|
28
29
|
/** The proxy container's image: node:22.23.5-trixie-slim (Node 22's November 2026 security release), pinned to its
|
|
29
30
|
* multi-arch index digest (amd64 and arm64 both listed), so every host runs the same Node. serve's macOS proxy pins the
|
|
@@ -196,7 +197,7 @@ const PROXY_CPU_QUOTA_US = 50_000;
|
|
|
196
197
|
const PROXY_NOFILE = 1024;
|
|
197
198
|
const PROXY_LOG = { driver: "json-file", options: { "max-size": "1m", "max-file": "2" } };
|
|
198
199
|
/** `docker run` of a computer's proxy container (see the head of this file). Pinned by a golden test. */
|
|
199
|
-
export function egressRunArgs({ name, user, image, allow, local, deadline, code, hint, labels = {} }) {
|
|
200
|
+
export function egressRunArgs({ name, user, image, allow, local, deadline, code, hint, maxTunnels, labels = {} }) {
|
|
200
201
|
const proxy = egressNameOf(name);
|
|
201
202
|
const args = ["run", "--detach", "--name", proxy, "--label", `${EGRESS_LABEL}=${name}`, "--label", `${DEADLINE_LABEL}=${deadline}`];
|
|
202
203
|
for (const [key, value] of Object.entries(labels))
|
|
@@ -226,6 +227,8 @@ export function egressRunArgs({ name, user, image, allow, local, deadline, code,
|
|
|
226
227
|
args.push("--local", local.join(","));
|
|
227
228
|
if (hint !== undefined)
|
|
228
229
|
args.push("--hint", hint);
|
|
230
|
+
if (maxTunnels !== undefined)
|
|
231
|
+
args.push("--max-tunnels", String(maxTunnels));
|
|
229
232
|
return args;
|
|
230
233
|
}
|
|
231
234
|
const show = (value) => (value === undefined ? "nothing" : JSON.stringify(value));
|
|
@@ -349,9 +352,13 @@ export function egressOf(proxy, owner, code, local = []) {
|
|
|
349
352
|
return other(`listens on ${show(flags.get("--socket"))}, not ${PROXY_SOCKET}`);
|
|
350
353
|
if (flags.get("--deadline") !== owner.deadline)
|
|
351
354
|
return other(`ends at ${show(flags.get("--deadline"))}, not the computer's deadline ${show(owner.deadline)}`);
|
|
352
|
-
const unknown = [...flags.keys()].filter((flag) => !["--socket", "--deadline", "--allow", "--open", "--local", "--hint"].includes(flag));
|
|
355
|
+
const unknown = [...flags.keys()].filter((flag) => !["--socket", "--deadline", "--allow", "--open", "--local", "--hint", "--max-tunnels"].includes(flag));
|
|
353
356
|
if (unknown.length > 0)
|
|
354
357
|
return other(`runs with flags ${unknown.join(", ")}, which create never gives`);
|
|
358
|
+
// A cap the operator set when the proxy was made holds for its life: any the proxy would start with is the
|
|
359
|
+
// provider's, whatever the setting reads now.
|
|
360
|
+
if (flags.has("--max-tunnels") && maxTunnelsOf(flags.get("--max-tunnels")) === undefined)
|
|
361
|
+
return other(`runs with --max-tunnels ${show(flags.get("--max-tunnels"))}, a cap create never gives`);
|
|
355
362
|
const read = form === "open" ? undefined : allowOf((flags.get("--allow") ?? "").split(","));
|
|
356
363
|
if (read !== undefined && "problem" in read)
|
|
357
364
|
return other(`holds a list this provider never makes: ${read.problem}`);
|