@parcha/agentrun-computer 0.1.0-beta.37 → 0.1.0-beta.39
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 +341 -260
- package/box/Dockerfile +18 -1
- package/box/README.md +14 -0
- package/box/build-daytona.py +2 -2
- package/box/build-e2b.mjs +41 -18
- package/box/recipe.d.mts +5 -0
- package/box/recipe.mjs +43 -0
- package/dist/agent37.d.ts +18 -66
- package/dist/agent37.js +187 -464
- package/dist/box-image.d.ts +14 -0
- package/dist/box-image.js +24 -0
- package/dist/browserbase.d.ts +0 -6
- package/dist/browserbase.js +1 -5
- package/dist/client.d.ts +12 -3
- package/dist/client.js +39 -4
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/computerd.json +4 -0
- package/dist/conformance/agent37.d.ts +9 -4
- package/dist/conformance/agent37.js +23 -11
- package/dist/conformance/browserbase.js +3 -3
- package/dist/conformance/cases/apps.d.ts +6 -0
- package/dist/conformance/cases/apps.js +18 -5
- package/dist/conformance/cases/isolation.d.ts +22 -5
- package/dist/conformance/cases/isolation.js +97 -16
- package/dist/conformance/cases/mount.js +5 -3
- package/dist/conformance/cases/provider.js +41 -0
- package/dist/conformance/cli.js +72 -11
- package/dist/conformance/daytona.d.ts +9 -20
- package/dist/conformance/daytona.js +12 -21
- package/dist/conformance/e2b.js +9 -4
- package/dist/conformance/exec-stream.d.ts +52 -0
- package/dist/conformance/exec-stream.js +493 -0
- package/dist/conformance/kernel.js +2 -2
- package/dist/conformance/modal.js +1 -1
- package/dist/conformance/orgo.js +2 -2
- package/dist/conformance/sweep.js +8 -8
- package/dist/conformance/types.d.ts +2 -2
- package/dist/create-requests.d.ts +1 -1
- package/dist/daytona.d.ts +17 -133
- package/dist/daytona.js +396 -1452
- package/dist/descriptor.d.ts +11 -4
- package/dist/descriptor.js +7 -0
- package/dist/descriptors/agent37.d.ts +3 -11
- package/dist/descriptors/agent37.js +9 -10
- package/dist/descriptors/daytona.d.ts +7 -6
- package/dist/descriptors/daytona.js +14 -7
- package/dist/descriptors/docker.d.ts +13 -1
- package/dist/descriptors/docker.js +3 -1
- package/dist/descriptors/e2b.d.ts +2 -9
- package/dist/descriptors/e2b.js +8 -8
- package/dist/descriptors/index.d.ts +25 -24
- package/dist/descriptors/index.js +1 -3
- package/dist/descriptors/modal.d.ts +2 -6
- package/dist/descriptors/modal.js +8 -6
- package/dist/descriptors/orgo.js +2 -1
- package/dist/descriptors/shared.d.ts +1 -1
- package/dist/descriptors/shared.js +2 -2
- package/dist/desktop.d.ts +18 -4
- package/dist/desktop.js +89 -9
- package/dist/docker/egress-main.js +23 -15
- package/dist/docker/egress.d.ts +6 -4
- package/dist/docker/egress.js +24 -16
- package/dist/docker/inspect.d.ts +2 -2
- package/dist/docker/inspect.js +5 -5
- package/dist/docker.d.ts +6 -11
- package/dist/docker.js +13 -16
- package/dist/drift.js +4 -4
- package/dist/e2b.d.ts +22 -130
- package/dist/e2b.js +163 -243
- package/dist/host.d.ts +136 -104
- package/dist/host.js +8 -1
- package/dist/hosted/network.d.ts +23 -0
- package/dist/hosted/network.js +77 -0
- package/dist/hosted/process.d.ts +24 -8
- package/dist/hosted/process.js +80 -44
- package/dist/hosted/provider.d.ts +38 -22
- package/dist/hosted/provider.js +500 -341
- package/dist/hosted/rest.d.ts +74 -0
- package/dist/hosted/rest.js +126 -0
- package/dist/hosted/scripts.d.ts +21 -3
- package/dist/hosted/scripts.js +76 -14
- package/dist/hosted/ssh-exec.d.ts +99 -0
- package/dist/hosted/ssh-exec.js +464 -0
- package/dist/hosted/values.d.ts +26 -0
- package/dist/hosted/values.js +63 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/isolation.d.ts +0 -2
- package/dist/isolation.js +3 -4
- package/dist/kernel.d.ts +0 -6
- package/dist/kernel.js +1 -5
- package/dist/kinds.d.ts +3 -1
- package/dist/local-chrome.d.ts +0 -6
- package/dist/local-chrome.js +1 -5
- package/dist/modal.d.ts +15 -86
- package/dist/modal.js +67 -185
- package/dist/mount-archil.d.ts +13 -8
- package/dist/mount-archil.js +27 -17
- package/dist/mount.d.ts +10 -4
- package/dist/mount.js +8 -4
- package/dist/orgo.d.ts +0 -9
- package/dist/orgo.js +8 -13
- package/dist/phone-harness.d.ts +0 -6
- package/dist/phone-harness.js +0 -4
- package/dist/protocol.d.ts +4 -1
- package/dist/protocol.js +1 -0
- package/dist/provider.d.ts +2 -2
- package/dist/providers.d.ts +15 -13
- package/dist/screen-watch.js +34 -6
- package/dist/surface/api.d.ts +14 -11
- package/dist/surface/core.d.ts +23 -5
- package/dist/surface/core.js +105 -15
- package/dist/surface/index.d.ts +1 -1
- package/dist/surface/index.js +1 -1
- package/dist/surface/outline.d.ts +2 -0
- package/dist/surface/outline.js +2 -1
- package/dist/surface/script.d.ts +4 -0
- package/dist/surface/script.js +11 -3
- package/dist/ui-engine.js +19 -3
- package/package.json +2 -3
- package/box/build-agent37.mjs +0 -177
- package/dist/conformance/daytona-sweep.d.ts +0 -18
- package/dist/conformance/daytona-sweep.js +0 -126
package/dist/descriptor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComputerSettingKind, KindCapabilities } from "./kinds.js";
|
|
2
|
-
import type { MountKind } from "./mount.js";
|
|
2
|
+
import type { MountKind, Unmounted } from "./mount.js";
|
|
3
3
|
import type { NetworkForm } from "./provider.js";
|
|
4
4
|
import type { ProviderModule } from "./providers.js";
|
|
5
5
|
/** One key a provider takes in Settings: its serve-side name, the create() option it fills, and whether it is needed. */
|
|
@@ -61,9 +61,16 @@ export interface ProviderDescriptor<Module extends ProviderModule = ProviderModu
|
|
|
61
61
|
/** The mount kinds its computers take, as its providers' capabilities().mount declare them; [] for none. */
|
|
62
62
|
readonly mounts: readonly MountKind[];
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
|
|
64
|
+
* Mount kinds its computers don't take though a caller would ask for them, each with why in one sentence: check()
|
|
65
|
+
* refuses such a mount in these words, and serve says them where the run's folder can't be had (Daytona's archil).
|
|
66
|
+
*/
|
|
67
|
+
readonly unmounted?: Unmounted;
|
|
68
|
+
/**
|
|
69
|
+
* The network forms its computers make and enforce, as its providers' capabilities().network declare them: ["none"],
|
|
70
|
+
* a remote computer whose programs run in a network of their own and nothing else; ["open"], the vendor's own network,
|
|
71
|
+
* which no allowlist of this server reaches; a hosted computer through init's egress proxy (hosted/network.ts) makes
|
|
72
|
+
* all three, as Docker's does. A form not declared is refused at check, never widened or narrowed to another. A
|
|
73
|
+
* provider of several configurations declares every form they make.
|
|
67
74
|
*/
|
|
68
75
|
readonly network: readonly NetworkForm[];
|
|
69
76
|
/**
|
package/dist/descriptor.js
CHANGED
|
@@ -26,6 +26,13 @@ export function descriptorProblems(value) {
|
|
|
26
26
|
problems.push("load is not a function that imports the provider module");
|
|
27
27
|
if (!Array.isArray(d.mounts) || d.mounts.some((kind) => kind !== "bind" && kind !== "archil"))
|
|
28
28
|
problems.push("mounts is not a list of mount kinds (bind, archil)");
|
|
29
|
+
if (d.unmounted !== undefined) {
|
|
30
|
+
const entries = typeof d.unmounted === "object" && d.unmounted !== null && !Array.isArray(d.unmounted) ? Object.entries(d.unmounted) : undefined;
|
|
31
|
+
if (entries === undefined || entries.some(([kind, why]) => (kind !== "bind" && kind !== "archil") || typeof why !== "string" || why.trim() === ""))
|
|
32
|
+
problems.push("unmounted maps mount kinds (bind, archil) to why, in words");
|
|
33
|
+
else if (Array.isArray(d.mounts) && entries.some(([kind]) => d.mounts?.includes(kind)))
|
|
34
|
+
problems.push("unmounted names a mount kind that mounts declares");
|
|
35
|
+
}
|
|
29
36
|
if (!Array.isArray(d.network) || d.network.length === 0 || d.network.some((form) => form !== "none" && form !== "open" && form !== "allow"))
|
|
30
37
|
problems.push("network is not a list of the network forms its computers make (none, open, allow)");
|
|
31
38
|
if (!Array.isArray(d.capabilities) || d.capabilities.length === 0)
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/** Agent37's plain Linux template
|
|
1
|
+
/** Agent37's plain Linux template, a spec's image for a caller of the provider that names its own. */
|
|
2
2
|
export declare const AGENT37_BASE_TEMPLATE = "agent37-base";
|
|
3
|
-
/**
|
|
4
|
-
* Our box image (box/Dockerfile and Xvfb) as a template of the key's own workspace, which box/build-agent37.mjs builds
|
|
5
|
-
* and publishes under this one name: a desktop when its setting names no image.
|
|
6
|
-
*/
|
|
7
|
-
export declare const AGENT37_BOX_TEMPLATE = "agentrun-box";
|
|
8
3
|
export declare const AGENT37: {
|
|
9
4
|
readonly id: "agent37";
|
|
10
5
|
readonly label: "Agent37";
|
|
@@ -19,7 +14,7 @@ export declare const AGENT37: {
|
|
|
19
14
|
}];
|
|
20
15
|
readonly metered: true;
|
|
21
16
|
readonly mounts: readonly ["archil"];
|
|
22
|
-
readonly network: readonly ["none"];
|
|
17
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
23
18
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
24
19
|
readonly options: {
|
|
25
20
|
readonly kind: "desktop";
|
|
@@ -33,9 +28,6 @@ export declare const AGENT37: {
|
|
|
33
28
|
};
|
|
34
29
|
readonly image?: string;
|
|
35
30
|
}];
|
|
36
|
-
readonly
|
|
37
|
-
readonly sandbox: "agent37-base";
|
|
38
|
-
readonly desktop: "agentrun-box";
|
|
39
|
-
};
|
|
31
|
+
readonly prepareImage: true;
|
|
40
32
|
readonly load: () => Promise<typeof import("../agent37.js")>;
|
|
41
33
|
};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
// Agent37's descriptor: a Linux sandbox or a Linux desktop on an Agent37 instance (a VM by default), the run's folder on
|
|
2
|
-
// an Archil disk.
|
|
2
|
+
// an Archil disk. Both start from our box image, which its prepareImage() registers in the key's own workspace from the
|
|
3
|
+
// public image the release publishes (box-image.ts).
|
|
3
4
|
import { defineProvider } from "../descriptor.js";
|
|
4
5
|
import { LINUX_DESKTOP, SANDBOX } from "./shared.js";
|
|
5
|
-
/** Agent37's plain Linux template
|
|
6
|
+
/** Agent37's plain Linux template, a spec's image for a caller of the provider that names its own. */
|
|
6
7
|
export const AGENT37_BASE_TEMPLATE = "agent37-base";
|
|
7
|
-
/**
|
|
8
|
-
* Our box image (box/Dockerfile and Xvfb) as a template of the key's own workspace, which box/build-agent37.mjs builds
|
|
9
|
-
* and publishes under this one name: a desktop when its setting names no image.
|
|
10
|
-
*/
|
|
11
|
-
export const AGENT37_BOX_TEMPLATE = "agentrun-box";
|
|
12
8
|
export const AGENT37 = defineProvider({
|
|
13
9
|
id: "agent37",
|
|
14
10
|
label: "Agent37",
|
|
@@ -19,10 +15,13 @@ export const AGENT37 = defineProvider({
|
|
|
19
15
|
],
|
|
20
16
|
metered: true,
|
|
21
17
|
mounts: ["archil"],
|
|
22
|
-
// None: its programs run in a network of their own (isolation.ts
|
|
23
|
-
|
|
18
|
+
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the instance is made
|
|
19
|
+
// deny-all. Open and a list: the instance is made allow-all, and its programs' one way out is init's egress proxy,
|
|
20
|
+
// which reaches the public internet alone, and with a list its hosts alone (hosted/network.ts).
|
|
21
|
+
network: ["none", "open", "allow"],
|
|
24
22
|
// Each configuration built by its own create() options: kind linux is the provider's default.
|
|
25
23
|
capabilities: [SANDBOX, { ...LINUX_DESKTOP, options: { kind: "desktop" } }],
|
|
26
|
-
|
|
24
|
+
// No default image: every computer starts from the box template its prepareImage() registers (agentrun-box-<hash>).
|
|
25
|
+
prepareImage: true,
|
|
27
26
|
load: () => import("../agent37.js"),
|
|
28
27
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { GpuCapability } from "../provider.js";
|
|
2
|
+
/** Why a Daytona computer takes no Archil mount: check() refuses one in these words. */
|
|
3
|
+
export declare const DAYTONA_NO_ARCHIL = "Archil mounts don't work on Daytona yet: Archil's client hangs on its sandboxes";
|
|
2
4
|
/** The image a Daytona computer starts from when its spec names "default": Daytona's own default snapshot. */
|
|
3
5
|
export declare const DAYTONA_DEFAULT_SNAPSHOT = "default";
|
|
4
6
|
/** The one region Daytona runs a GPU sandbox in, whatever the provider's target. */
|
|
@@ -56,14 +58,13 @@ export declare const DAYTONA: {
|
|
|
56
58
|
readonly name: "DAYTONA_TARGET";
|
|
57
59
|
readonly option: "target";
|
|
58
60
|
readonly required: false;
|
|
59
|
-
}, {
|
|
60
|
-
readonly name: "DAYTONA_ARCHIL_EGRESS";
|
|
61
|
-
readonly option: "archilEgress";
|
|
62
|
-
readonly required: false;
|
|
63
61
|
}];
|
|
64
62
|
readonly metered: true;
|
|
65
|
-
readonly mounts: readonly [
|
|
66
|
-
readonly
|
|
63
|
+
readonly mounts: readonly [];
|
|
64
|
+
readonly unmounted: {
|
|
65
|
+
readonly archil: "Archil mounts don't work on Daytona yet: Archil's client hangs on its sandboxes";
|
|
66
|
+
};
|
|
67
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
67
68
|
readonly capabilities: readonly [{
|
|
68
69
|
readonly gpu: Readonly<GpuCapability>;
|
|
69
70
|
readonly kind: import("../protocol.js").ComputerKind;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
// Daytona's descriptor: a sandbox on Daytona's cloud,
|
|
1
|
+
// Daytona's descriptor: a sandbox on Daytona's cloud, with GPUs when asked; no mount of the run's folder yet.
|
|
2
2
|
import { defineProvider } from "../descriptor.js";
|
|
3
3
|
import { SANDBOX } from "./shared.js";
|
|
4
|
+
/** Why a Daytona computer takes no Archil mount: check() refuses one in these words. */
|
|
5
|
+
export const DAYTONA_NO_ARCHIL = "Archil mounts don't work on Daytona yet: Archil's client hangs on its sandboxes";
|
|
4
6
|
/** The image a Daytona computer starts from when its spec names "default": Daytona's own default snapshot. */
|
|
5
7
|
export const DAYTONA_DEFAULT_SNAPSHOT = "default";
|
|
6
8
|
/** The one region Daytona runs a GPU sandbox in, whatever the provider's target. */
|
|
@@ -65,17 +67,22 @@ export const DAYTONA = defineProvider({
|
|
|
65
67
|
{ name: "DAYTONA_API_KEY", option: "apiKey", required: true },
|
|
66
68
|
{ name: "DAYTONA_API_URL", option: "apiUrl", required: false },
|
|
67
69
|
{ name: "DAYTONA_TARGET", option: "target", required: false },
|
|
68
|
-
{ name: "DAYTONA_ARCHIL_EGRESS", option: "archilEgress", required: false },
|
|
69
70
|
],
|
|
70
71
|
metered: true,
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
|
|
72
|
+
// No mount: Archil's client (0.10.1) mounts on Daytona's container sandboxes, but nothing reads its /dev/fuse after,
|
|
73
|
+
// so the first statx of the folder hangs, on every kernel and mount shape tried (live, 11-14), and Daytona offered
|
|
74
|
+
// no linux-vm class to try instead. An Archil mount is refused in these words, before any request.
|
|
75
|
+
mounts: [],
|
|
76
|
+
unmounted: { archil: DAYTONA_NO_ARCHIL },
|
|
77
|
+
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the sandbox is made with
|
|
78
|
+
// networkBlockAll. Open and a list: the sandbox is not blocked (the account's tier may still limit where it goes), and
|
|
79
|
+
// its programs' one way out is init's egress proxy, which reaches the public internet alone, and with a list its hosts
|
|
80
|
+
// alone (hosted/network.ts).
|
|
81
|
+
network: ["none", "open", "allow"],
|
|
74
82
|
// A linux computer, with GPUs when asked.
|
|
75
83
|
capabilities: [{ ...SANDBOX, gpu: DAYTONA_GPU }],
|
|
76
84
|
defaultImage: { sandbox: DAYTONA_DEFAULT_SNAPSHOT },
|
|
77
|
-
//
|
|
78
|
-
// builds one and prints its name): the operator names it here, and the default snapshot stands while unset.
|
|
85
|
+
// The operator's own snapshot for every Daytona computer, named here; the default snapshot stands while unset.
|
|
79
86
|
imageEnv: "AGENTRUN_DAYTONA_SNAPSHOT",
|
|
80
87
|
load: () => import("../daytona.js"),
|
|
81
88
|
});
|
|
@@ -5,7 +5,19 @@ export declare const DOCKER: {
|
|
|
5
5
|
readonly metered: false;
|
|
6
6
|
readonly mounts: readonly ["bind"];
|
|
7
7
|
readonly network: readonly ["none", "open", "allow"];
|
|
8
|
-
readonly capabilities: readonly [import("../kinds.js").KindCapabilities,
|
|
8
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
9
|
+
readonly options: {
|
|
10
|
+
readonly desktop: {};
|
|
11
|
+
};
|
|
12
|
+
readonly kind: import("../protocol.js").ComputerKind;
|
|
13
|
+
readonly groups: import("../protocol.js").Group[];
|
|
14
|
+
readonly gpu?: import("../provider.js").GpuCapability;
|
|
15
|
+
readonly persistence?: {
|
|
16
|
+
keepsState: true;
|
|
17
|
+
resume: boolean;
|
|
18
|
+
};
|
|
19
|
+
readonly image?: string;
|
|
20
|
+
}];
|
|
9
21
|
readonly prepareImage: true;
|
|
10
22
|
readonly local: true;
|
|
11
23
|
readonly load: () => Promise<typeof import("../docker.js")>;
|
|
@@ -9,7 +9,9 @@ export const DOCKER = defineProvider({
|
|
|
9
9
|
mounts: ["bind"],
|
|
10
10
|
// None, open, or an allowlist through the server's egress proxy.
|
|
11
11
|
network: ["none", "open", "allow"],
|
|
12
|
-
|
|
12
|
+
// Each configuration built by its own create() options: the desktop's start the X server (desktop: {}); without them
|
|
13
|
+
// the provider makes a linux computer, with no screen and no apps.
|
|
14
|
+
capabilities: [SANDBOX, { ...LINUX_DESKTOP, options: { desktop: {} } }],
|
|
13
15
|
// No default image: the server makes one from the provider's recipe (prepareImage) before the first create.
|
|
14
16
|
prepareImage: true,
|
|
15
17
|
local: true,
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/** E2B Desktop's template: a desktop computer when its setting names no image. */
|
|
2
|
-
export declare const E2B_DESKTOP_TEMPLATE = "desktop";
|
|
3
|
-
/** E2B's base template: a sandbox when its setting names no image. */
|
|
4
|
-
export declare const E2B_BASE_TEMPLATE = "base";
|
|
5
1
|
export declare const E2B: {
|
|
6
2
|
readonly id: "e2b";
|
|
7
3
|
readonly label: "E2B";
|
|
@@ -12,11 +8,8 @@ export declare const E2B: {
|
|
|
12
8
|
}];
|
|
13
9
|
readonly metered: true;
|
|
14
10
|
readonly mounts: readonly ["archil"];
|
|
15
|
-
readonly network: readonly ["none"];
|
|
11
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
16
12
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, import("../kinds.js").KindCapabilities];
|
|
17
|
-
readonly
|
|
18
|
-
readonly sandbox: "base";
|
|
19
|
-
readonly desktop: "desktop";
|
|
20
|
-
};
|
|
13
|
+
readonly prepareImage: true;
|
|
21
14
|
readonly load: () => Promise<typeof import("../e2b.js")>;
|
|
22
15
|
};
|
package/dist/descriptors/e2b.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
// E2B's descriptor: a sandbox
|
|
1
|
+
// E2B's descriptor: a sandbox or a desktop, the run's folder on an Archil disk. Both start from our box template, the
|
|
2
|
+
// public E2B template its prepareImage() answers (box-image.ts boxE2bTemplate), which has Archil's client and a desktop.
|
|
2
3
|
import { defineProvider } from "../descriptor.js";
|
|
3
4
|
import { LINUX_DESKTOP, SANDBOX } from "./shared.js";
|
|
4
|
-
/** E2B Desktop's template: a desktop computer when its setting names no image. */
|
|
5
|
-
export const E2B_DESKTOP_TEMPLATE = "desktop";
|
|
6
|
-
/** E2B's base template: a sandbox when its setting names no image. */
|
|
7
|
-
export const E2B_BASE_TEMPLATE = "base";
|
|
8
5
|
export const E2B = defineProvider({
|
|
9
6
|
id: "e2b",
|
|
10
7
|
label: "E2B",
|
|
11
8
|
keys: [{ name: "E2B_API_KEY", option: "apiKey", required: true }],
|
|
12
9
|
metered: true,
|
|
13
10
|
mounts: ["archil"],
|
|
14
|
-
// None: its programs run in a network of their own (isolation.ts
|
|
15
|
-
|
|
11
|
+
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the sandbox is made with
|
|
12
|
+
// no internet access. Open and a list: the sandbox gets internet access, and its programs' one way out is init's egress
|
|
13
|
+
// proxy, which reaches the public internet alone, and with a list its hosts alone (hosted/network.ts).
|
|
14
|
+
network: ["none", "open", "allow"],
|
|
16
15
|
capabilities: [SANDBOX, LINUX_DESKTOP],
|
|
17
|
-
|
|
16
|
+
// No default image: every computer, sandbox or desktop, starts from the box template its prepareImage() answers.
|
|
17
|
+
prepareImage: true,
|
|
18
18
|
load: () => import("../e2b.js"),
|
|
19
19
|
});
|
|
@@ -15,7 +15,19 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
15
15
|
readonly metered: false;
|
|
16
16
|
readonly mounts: readonly ["bind"];
|
|
17
17
|
readonly network: readonly ["none", "open", "allow"];
|
|
18
|
-
readonly capabilities: readonly [import("../kinds.js").KindCapabilities,
|
|
18
|
+
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
19
|
+
readonly options: {
|
|
20
|
+
readonly desktop: {};
|
|
21
|
+
};
|
|
22
|
+
readonly kind: import("../protocol.js").ComputerKind;
|
|
23
|
+
readonly groups: import("../protocol.js").Group[];
|
|
24
|
+
readonly gpu?: import("../provider.js").GpuCapability;
|
|
25
|
+
readonly persistence?: {
|
|
26
|
+
keepsState: true;
|
|
27
|
+
resume: boolean;
|
|
28
|
+
};
|
|
29
|
+
readonly image?: string;
|
|
30
|
+
}];
|
|
19
31
|
readonly prepareImage: true;
|
|
20
32
|
readonly local: true;
|
|
21
33
|
readonly load: () => Promise<typeof import("../docker.js")>;
|
|
@@ -34,14 +46,13 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
34
46
|
readonly name: "DAYTONA_TARGET";
|
|
35
47
|
readonly option: "target";
|
|
36
48
|
readonly required: false;
|
|
37
|
-
}, {
|
|
38
|
-
readonly name: "DAYTONA_ARCHIL_EGRESS";
|
|
39
|
-
readonly option: "archilEgress";
|
|
40
|
-
readonly required: false;
|
|
41
49
|
}];
|
|
42
50
|
readonly metered: true;
|
|
43
|
-
readonly mounts: readonly [
|
|
44
|
-
readonly
|
|
51
|
+
readonly mounts: readonly [];
|
|
52
|
+
readonly unmounted: {
|
|
53
|
+
readonly archil: "Archil mounts don't work on Daytona yet: Archil's client hangs on its sandboxes";
|
|
54
|
+
};
|
|
55
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
45
56
|
readonly capabilities: readonly [{
|
|
46
57
|
readonly gpu: Readonly<import("../provider.js").GpuCapability>;
|
|
47
58
|
readonly kind: import("../protocol.js").ComputerKind;
|
|
@@ -77,7 +88,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
77
88
|
}];
|
|
78
89
|
readonly metered: true;
|
|
79
90
|
readonly mounts: readonly ["archil"];
|
|
80
|
-
readonly network: readonly ["none"];
|
|
91
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
81
92
|
readonly capabilities: readonly [{
|
|
82
93
|
readonly gpu: Readonly<import("../provider.js").GpuCapability>;
|
|
83
94
|
readonly kind: import("../protocol.js").ComputerKind;
|
|
@@ -89,9 +100,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
89
100
|
readonly image?: string;
|
|
90
101
|
readonly options?: Readonly<Record<string, unknown>>;
|
|
91
102
|
}];
|
|
92
|
-
readonly
|
|
93
|
-
readonly sandbox: "debian:bookworm-slim";
|
|
94
|
-
};
|
|
103
|
+
readonly prepareImage: true;
|
|
95
104
|
readonly load: () => Promise<typeof import("../modal.js")>;
|
|
96
105
|
}, {
|
|
97
106
|
readonly id: "e2b";
|
|
@@ -103,12 +112,9 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
103
112
|
}];
|
|
104
113
|
readonly metered: true;
|
|
105
114
|
readonly mounts: readonly ["archil"];
|
|
106
|
-
readonly network: readonly ["none"];
|
|
115
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
107
116
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, import("../kinds.js").KindCapabilities];
|
|
108
|
-
readonly
|
|
109
|
-
readonly sandbox: "base";
|
|
110
|
-
readonly desktop: "desktop";
|
|
111
|
-
};
|
|
117
|
+
readonly prepareImage: true;
|
|
112
118
|
readonly load: () => Promise<typeof import("../e2b.js")>;
|
|
113
119
|
}, {
|
|
114
120
|
readonly id: "agent37";
|
|
@@ -124,7 +130,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
124
130
|
}];
|
|
125
131
|
readonly metered: true;
|
|
126
132
|
readonly mounts: readonly ["archil"];
|
|
127
|
-
readonly network: readonly ["none"];
|
|
133
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
128
134
|
readonly capabilities: readonly [import("../kinds.js").KindCapabilities, {
|
|
129
135
|
readonly options: {
|
|
130
136
|
readonly kind: "desktop";
|
|
@@ -138,10 +144,7 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
138
144
|
};
|
|
139
145
|
readonly image?: string;
|
|
140
146
|
}];
|
|
141
|
-
readonly
|
|
142
|
-
readonly sandbox: "agent37-base";
|
|
143
|
-
readonly desktop: "agentrun-box";
|
|
144
|
-
};
|
|
147
|
+
readonly prepareImage: true;
|
|
145
148
|
readonly load: () => Promise<typeof import("../agent37.js")>;
|
|
146
149
|
}, {
|
|
147
150
|
readonly id: "orgo";
|
|
@@ -283,10 +286,8 @@ export declare const DESCRIPTORS: readonly [{
|
|
|
283
286
|
readonly load: () => Promise<typeof import("../local-chrome.js")>;
|
|
284
287
|
}];
|
|
285
288
|
export { AGENT37, BROWSERBASE, DAYTONA, DOCKER, E2B, KERNEL, LOCAL, MODAL, ORGO, PHONE_HARNESS };
|
|
286
|
-
export { AGENT37_BASE_TEMPLATE
|
|
289
|
+
export { AGENT37_BASE_TEMPLATE } from "./agent37.js";
|
|
287
290
|
export { DAYTONA_DEFAULT_SNAPSHOT, DAYTONA_GPU_SNAPSHOT, type DaytonaGpuSnapshot, daytonaGpu, daytonaGpuSnapshot } from "./daytona.js";
|
|
288
|
-
export { E2B_BASE_TEMPLATE, E2B_DESKTOP_TEMPLATE } from "./e2b.js";
|
|
289
|
-
export { MODAL_DEFAULT_IMAGE } from "./modal.js";
|
|
290
291
|
export { ORGO_BASE_IMAGE } from "./orgo.js";
|
|
291
292
|
export { PHONE_GROUPS, PHONE_IMAGE } from "./phone-harness.js";
|
|
292
293
|
export { BROWSER_IMAGE, LINUX_DESKTOP, SANDBOX } from "./shared.js";
|
|
@@ -12,10 +12,8 @@ import { ORGO } from "./orgo.js";
|
|
|
12
12
|
import { PHONE_HARNESS } from "./phone-harness.js";
|
|
13
13
|
export const DESCRIPTORS = [DOCKER, DAYTONA, MODAL, E2B, AGENT37, ORGO, PHONE_HARNESS, BROWSERBASE, KERNEL, LOCAL];
|
|
14
14
|
export { AGENT37, BROWSERBASE, DAYTONA, DOCKER, E2B, KERNEL, LOCAL, MODAL, ORGO, PHONE_HARNESS };
|
|
15
|
-
export { AGENT37_BASE_TEMPLATE
|
|
15
|
+
export { AGENT37_BASE_TEMPLATE } from "./agent37.js";
|
|
16
16
|
export { DAYTONA_DEFAULT_SNAPSHOT, DAYTONA_GPU_SNAPSHOT, daytonaGpu, daytonaGpuSnapshot } from "./daytona.js";
|
|
17
|
-
export { E2B_BASE_TEMPLATE, E2B_DESKTOP_TEMPLATE } from "./e2b.js";
|
|
18
|
-
export { MODAL_DEFAULT_IMAGE } from "./modal.js";
|
|
19
17
|
export { ORGO_BASE_IMAGE } from "./orgo.js";
|
|
20
18
|
export { PHONE_GROUPS, PHONE_IMAGE } from "./phone-harness.js";
|
|
21
19
|
export { BROWSER_IMAGE, LINUX_DESKTOP, SANDBOX } from "./shared.js";
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { GpuCapability } from "../provider.js";
|
|
2
|
-
/** The image a Modal computer starts from when its setting names none. */
|
|
3
|
-
export declare const MODAL_DEFAULT_IMAGE = "debian:bookworm-slim";
|
|
4
2
|
/**
|
|
5
3
|
* The GPU types Modal takes, by its own names (guide/gpu, 11-10): "A100" is the 40 GB one, "A100-40GB" its explicit
|
|
6
4
|
* name. Its "H100!" and "B200+" variants (no upgrade to an H200; a B200 or B300) are not offered: what a computer gets
|
|
@@ -35,7 +33,7 @@ export declare const MODAL: {
|
|
|
35
33
|
}];
|
|
36
34
|
readonly metered: true;
|
|
37
35
|
readonly mounts: readonly ["archil"];
|
|
38
|
-
readonly network: readonly ["none"];
|
|
36
|
+
readonly network: readonly ["none", "open", "allow"];
|
|
39
37
|
readonly capabilities: readonly [{
|
|
40
38
|
readonly gpu: Readonly<GpuCapability>;
|
|
41
39
|
readonly kind: import("../protocol.js").ComputerKind;
|
|
@@ -47,8 +45,6 @@ export declare const MODAL: {
|
|
|
47
45
|
readonly image?: string;
|
|
48
46
|
readonly options?: Readonly<Record<string, unknown>>;
|
|
49
47
|
}];
|
|
50
|
-
readonly
|
|
51
|
-
readonly sandbox: "debian:bookworm-slim";
|
|
52
|
-
};
|
|
48
|
+
readonly prepareImage: true;
|
|
53
49
|
readonly load: () => Promise<typeof import("../modal.js")>;
|
|
54
50
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// Modal's descriptor: a sandbox in a Modal app, the run's folder on an Archil disk, with GPUs when asked.
|
|
1
|
+
// Modal's descriptor: a sandbox in a Modal app, the run's folder on an Archil disk, with GPUs when asked. It starts from
|
|
2
|
+
// our box image, the public registry tag its prepareImage() answers (box-image.ts), which Modal pulls at the first create.
|
|
2
3
|
import { defineProvider } from "../descriptor.js";
|
|
3
4
|
import { SANDBOX } from "./shared.js";
|
|
4
|
-
/** The image a Modal computer starts from when its setting names none. */
|
|
5
|
-
export const MODAL_DEFAULT_IMAGE = "debian:bookworm-slim";
|
|
6
5
|
/**
|
|
7
6
|
* The GPU types Modal takes, by its own names (guide/gpu, 11-10): "A100" is the 40 GB one, "A100-40GB" its explicit
|
|
8
7
|
* name. Its "H100!" and "B200+" variants (no upgrade to an H200; a B200 or B300) are not offered: what a computer gets
|
|
@@ -39,10 +38,13 @@ export const MODAL = defineProvider({
|
|
|
39
38
|
settings: [{ name: "modalApp", option: "app", default: "agentrun" }],
|
|
40
39
|
metered: true,
|
|
41
40
|
mounts: ["archil"],
|
|
42
|
-
// None: its programs run in a network of their own (isolation.ts
|
|
43
|
-
network:
|
|
41
|
+
// None: its programs run in a network of their own, their loopback alone (isolation.ts), and the sandbox is made with
|
|
42
|
+
// its network blocked. Open and a list: the sandbox's network is not blocked, and its programs' one way out is init's
|
|
43
|
+
// egress proxy, which reaches the public internet alone, and with a list its hosts alone (hosted/network.ts).
|
|
44
|
+
network: ["none", "open", "allow"],
|
|
44
45
|
// A linux computer, with GPUs when asked.
|
|
45
46
|
capabilities: [{ ...SANDBOX, gpu: MODAL_GPU }],
|
|
46
|
-
|
|
47
|
+
// No default image: every computer starts from the box image its prepareImage() answers.
|
|
48
|
+
prepareImage: true,
|
|
47
49
|
load: () => import("../modal.js"),
|
|
48
50
|
});
|
package/dist/descriptors/orgo.js
CHANGED
|
@@ -39,7 +39,8 @@ export const ORGO = defineProvider({
|
|
|
39
39
|
metered: true,
|
|
40
40
|
// None yet: an Archil mount needs an Orgo template that bakes the helper.
|
|
41
41
|
mounts: [],
|
|
42
|
-
// The Linux desktop's: none (computerd holds its programs to loopback).
|
|
42
|
+
// The Linux desktop's: none (computerd holds its programs to loopback). Not open or a list: Orgo's own adapter starts
|
|
43
|
+
// no egress proxy, the one way out of that loopback the shared hosted adapter has (hosted/network.ts).
|
|
43
44
|
network: ["none"],
|
|
44
45
|
capabilities: ORGO_CONFIGURATIONS,
|
|
45
46
|
parked: ORGO_PARKED,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { KindCapabilities } from "../kinds.js";
|
|
2
2
|
/** A Linux shell: exec, files and processes. */
|
|
3
3
|
export declare const SANDBOX: KindCapabilities;
|
|
4
|
-
/** A Linux desktop: a shell,
|
|
4
|
+
/** A Linux desktop: a shell, the screen, pointer and keys of an X display, and its apps (its .desktop files). */
|
|
5
5
|
export declare const LINUX_DESKTOP: KindCapabilities;
|
|
6
6
|
/** The image every browser computer runs: its vendor's own Chromium. */
|
|
7
7
|
export declare const BROWSER_IMAGE = "chromium";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** A Linux shell: exec, files and processes. */
|
|
2
2
|
export const SANDBOX = { kind: "linux", groups: ["exec", "files", "processes"] };
|
|
3
|
-
/** A Linux desktop: a shell,
|
|
4
|
-
export const LINUX_DESKTOP = { kind: "desktop", groups: ["exec", "files", "processes", "screen", "input.pointer", "input.keys"] };
|
|
3
|
+
/** A Linux desktop: a shell, the screen, pointer and keys of an X display, and its apps (its .desktop files). */
|
|
4
|
+
export const LINUX_DESKTOP = { kind: "desktop", groups: ["exec", "files", "processes", "screen", "input.pointer", "input.keys", "apps"] };
|
|
5
5
|
/** The image every browser computer runs: its vendor's own Chromium. */
|
|
6
6
|
export const BROWSER_IMAGE = "chromium";
|
package/dist/desktop.d.ts
CHANGED
|
@@ -8,17 +8,31 @@ export interface DesktopOptions {
|
|
|
8
8
|
/** How long create waits for the display to answer after starting the server. Default 30 s. */
|
|
9
9
|
timeoutMs?: number;
|
|
10
10
|
}
|
|
11
|
-
/** The groups a desktop declares besides exec, files and processes. */
|
|
12
|
-
export declare const DESKTOP_GROUPS: readonly ["screen", "input.pointer", "input.keys"];
|
|
11
|
+
/** The groups a desktop declares besides exec, files and processes: apps is computerd's, from the desktop's .desktop files. */
|
|
12
|
+
export declare const DESKTOP_GROUPS: readonly ["screen", "input.pointer", "input.keys", "apps"];
|
|
13
|
+
/**
|
|
14
|
+
* The window manager a host's desktops run where its facts say so (HostFacts.windowManager: E2B's and Agent37's), once
|
|
15
|
+
* the display answers: it frames, stacks and focuses the windows apps.launch opens. xfwm4, which both images have, with
|
|
16
|
+
* no compositor and no session manager. It reads its settings from xfconfd over a session bus, and exits at once
|
|
17
|
+
* without one ("Xfconf could not be initialized"). So it runs in a session bus of its own (dbus-run-session, WINDOW_MANAGER_BUS, written to a file of
|
|
18
|
+
* its own under /tmp), in a user namespace (the same uid) and a network namespace of its own: a program of the
|
|
19
|
+
* computer's user reaches no socket of that bus, unless it joins those namespaces (nsenter), as the same uid may
|
|
20
|
+
* ptrace xfwm4. xfwm4 reaches the display as any program does, by its path. First, xsetroot paints the screen behind
|
|
21
|
+
* every window one slate colour, so a desktop with no window open is not a black screen a person reads as broken; a
|
|
22
|
+
* paint that fails starts xfwm4 all the same.
|
|
23
|
+
*/
|
|
24
|
+
export declare const WINDOW_MANAGER: readonly string[];
|
|
13
25
|
/** The desktop options with their defaults, or a throw in words. */
|
|
14
26
|
export declare function desktopOf({ display, server, timeoutMs }: DesktopOptions): Required<DesktopOptions>;
|
|
15
27
|
/**
|
|
16
28
|
* Starts the desktop's X server through the daemon (process.start) and waits until hello declares the display: the
|
|
17
29
|
* server ending first, or the bound passing, is a failure in words, with the server's own last words, as the vendor's
|
|
18
|
-
* (code vendor, vendor the provider's id). version is the client's, sent with each hello.
|
|
30
|
+
* (code vendor, vendor the provider's id). version is the client's, sent with each hello. windowManager: the host's
|
|
31
|
+
* desktops run WINDOW_MANAGER (HostFacts.windowManager), started once the display answers.
|
|
19
32
|
*/
|
|
20
|
-
export declare function startDisplay(client: ComputerClient, desktop: Required<DesktopOptions>, { version, vendor, signal }: {
|
|
33
|
+
export declare function startDisplay(client: ComputerClient, desktop: Required<DesktopOptions>, { version, vendor, signal, windowManager }: {
|
|
21
34
|
version: string;
|
|
22
35
|
vendor: string;
|
|
23
36
|
signal?: AbortSignal | undefined;
|
|
37
|
+
windowManager?: boolean;
|
|
24
38
|
}): Promise<Result<void>>;
|