@parcha/agentrun-computer 0.1.0-beta.58 → 0.1.0-beta.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +187 -62
- package/box/Dockerfile +4 -3
- package/box/install.sh +57 -11
- package/dist/agent37.js +6 -9
- package/dist/attach.d.ts +24 -4
- package/dist/attach.js +50 -19
- package/dist/boxd.js +22 -9
- package/dist/browserbase.d.ts +6 -2
- package/dist/browserbase.js +50 -7
- package/dist/child-env.d.ts +11 -0
- package/dist/child-env.js +22 -0
- package/dist/chrome.d.ts +5 -2
- package/dist/chrome.js +5 -2
- package/dist/cloudflare.d.ts +2 -0
- package/dist/cloudflare.js +5 -3
- package/dist/computerd-linux-amd64 +0 -0
- package/dist/computerd-linux-arm64 +0 -0
- package/dist/computerd.json +1 -1
- package/dist/conformance/agent37.d.ts +10 -38
- package/dist/conformance/agent37.js +25 -113
- package/dist/conformance/archil.d.ts +13 -3
- package/dist/conformance/archil.js +22 -17
- package/dist/conformance/boxd.d.ts +8 -31
- package/dist/conformance/boxd.js +19 -74
- package/dist/conformance/browserbase.d.ts +3 -6
- package/dist/conformance/browserbase.js +6 -17
- package/dist/conformance/cases/health.js +6 -3
- package/dist/conformance/cli.d.ts +3 -1
- package/dist/conformance/cli.js +69 -9
- package/dist/conformance/cloudflare.d.ts +3 -6
- package/dist/conformance/cloudflare.js +7 -15
- package/dist/conformance/daytona.d.ts +6 -20
- package/dist/conformance/daytona.js +22 -57
- package/dist/conformance/dial-only.d.ts +4 -3
- package/dist/conformance/dial-only.js +3 -3
- package/dist/conformance/docker.d.ts +4 -5
- package/dist/conformance/docker.js +8 -14
- package/dist/conformance/e2b.d.ts +10 -36
- package/dist/conformance/e2b.js +27 -84
- package/dist/conformance/fly.d.ts +3 -6
- package/dist/conformance/fly.js +2 -6
- package/dist/conformance/groundbox.d.ts +7 -23
- package/dist/conformance/groundbox.js +16 -56
- package/dist/conformance/index.d.ts +1 -0
- package/dist/conformance/index.js +1 -0
- package/dist/conformance/kernel.d.ts +3 -6
- package/dist/conformance/kernel.js +5 -15
- package/dist/conformance/kind.d.ts +0 -6
- package/dist/conformance/kind.js +0 -4
- package/dist/conformance/local-chrome.d.ts +5 -7
- package/dist/conformance/local-chrome.js +7 -11
- package/dist/conformance/modal.d.ts +10 -38
- package/dist/conformance/modal.js +27 -74
- package/dist/conformance/module-kit.d.ts +87 -0
- package/dist/conformance/module-kit.js +88 -0
- package/dist/conformance/morph.d.ts +7 -23
- package/dist/conformance/morph.js +20 -66
- package/dist/conformance/orgo.d.ts +5 -10
- package/dist/conformance/orgo.js +15 -27
- package/dist/conformance/phone-harness.d.ts +3 -5
- package/dist/conformance/phone-harness.js +3 -11
- package/dist/conformance/runner.d.ts +13 -3
- package/dist/conformance/runner.js +32 -11
- package/dist/conformance/smolcloud.d.ts +7 -23
- package/dist/conformance/smolcloud.js +16 -49
- package/dist/conformance/sweep.d.ts +10 -5
- package/dist/conformance/sweep.js +91 -38
- package/dist/conformance/tti.d.ts +69 -0
- package/dist/conformance/tti.js +205 -0
- package/dist/conformance/types.d.ts +9 -2
- package/dist/daytona.js +60 -20
- package/dist/descriptor.d.ts +10 -0
- package/dist/descriptor.js +7 -0
- package/dist/descriptors/browserbase.d.ts +3 -0
- package/dist/descriptors/browserbase.js +4 -0
- package/dist/descriptors/docker.d.ts +1 -0
- package/dist/descriptors/docker.js +3 -0
- package/dist/descriptors/env-names.d.ts +32 -0
- package/dist/descriptors/env-names.js +60 -0
- package/dist/descriptors/index.d.ts +9 -2
- package/dist/descriptors/kernel.d.ts +3 -0
- package/dist/descriptors/kernel.js +2 -0
- package/dist/descriptors/local-chrome.d.ts +1 -1
- package/dist/descriptors/local-chrome.js +5 -3
- package/dist/descriptors/phone-harness.d.ts +1 -1
- package/dist/descriptors/phone-harness.js +4 -2
- package/dist/docker/egress.d.ts +7 -0
- package/dist/docker/egress.js +8 -0
- package/dist/docker/image.d.ts +5 -1
- package/dist/docker/image.js +12 -8
- package/dist/docker.d.ts +52 -13
- package/dist/docker.js +166 -92
- package/dist/drift.js +6 -6
- package/dist/e2b.d.ts +2 -2
- package/dist/e2b.js +2 -3
- package/dist/groundbox.js +6 -6
- package/dist/host.d.ts +23 -0
- package/dist/hosted/download.d.ts +23 -0
- package/dist/hosted/download.js +144 -0
- package/dist/hosted/process.d.ts +5 -0
- package/dist/hosted/process.js +20 -0
- package/dist/hosted/provider.js +120 -48
- package/dist/hosted/rest.d.ts +19 -8
- package/dist/hosted/rest.js +47 -14
- package/dist/hosted/scripts.d.ts +10 -0
- package/dist/hosted/scripts.js +23 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/janitor.d.ts +7 -1
- package/dist/janitor.js +2 -2
- package/dist/kernel.js +1 -1
- package/dist/local-chrome.d.ts +5 -2
- package/dist/local-chrome.js +4 -2
- package/dist/local-supervisor.js +1 -0
- package/dist/modal.d.ts +6 -5
- package/dist/modal.js +7 -7
- package/dist/morph.js +5 -8
- package/dist/orgo-channel.d.ts +3 -2
- package/dist/orgo-channel.js +3 -3
- package/dist/orgo-desktop.js +2 -4
- package/dist/orgo.js +2 -4
- package/dist/phone-harness.d.ts +7 -5
- package/dist/phone-harness.js +60 -61
- package/dist/protocol.d.ts +10 -0
- package/dist/protocol.js +17 -0
- package/dist/provider.d.ts +6 -2
- package/dist/screen-watch.d.ts +6 -1
- package/dist/screen-watch.js +166 -12
- package/dist/vendor-sdk.d.ts +9 -0
- package/dist/vendor-sdk.js +26 -0
- package/package.json +8 -1
|
@@ -7,12 +7,6 @@ export interface KindVerdict {
|
|
|
7
7
|
verdict: "pass" | "fail";
|
|
8
8
|
reasons: string[];
|
|
9
9
|
}
|
|
10
|
-
/** A hosted provider module's kind from its env variable `name` (COMPUTER_<VENDOR>_KIND), as create() options: none
|
|
11
|
-
* when it is unset or empty (the provider's default), else what it says, which create() refuses in words unless it is
|
|
12
|
-
* desktop or linux. */
|
|
13
|
-
export declare const kindFrom: (env: Record<string, string | undefined>, name: string) => {
|
|
14
|
-
kind?: "desktop" | "linux";
|
|
15
|
-
};
|
|
16
10
|
/** Why a run cannot be by this kind, in words; undefined when it can. Kind none is no computer. */
|
|
17
11
|
export declare function kindRunProblem(kind: ComputerSettingKind): string | undefined;
|
|
18
12
|
/**
|
package/dist/conformance/kind.js
CHANGED
|
@@ -6,10 +6,6 @@ import { SETTING_KIND_NAMES, SETTING_KINDS } from "../setting-kinds.js";
|
|
|
6
6
|
import { GROUPS } from "../protocol.js";
|
|
7
7
|
import { casesFor } from "./cases/index.js";
|
|
8
8
|
const groupsOf = (c) => c.needs.filter((need) => GROUPS.includes(need));
|
|
9
|
-
/** A hosted provider module's kind from its env variable `name` (COMPUTER_<VENDOR>_KIND), as create() options: none
|
|
10
|
-
* when it is unset or empty (the provider's default), else what it says, which create() refuses in words unless it is
|
|
11
|
-
* desktop or linux. */
|
|
12
|
-
export const kindFrom = (env, name) => (env[name] ? { kind: env[name] } : {});
|
|
13
9
|
/** Why a run cannot be by this kind, in words; undefined when it can. Kind none is no computer. */
|
|
14
10
|
export function kindRunProblem(kind) {
|
|
15
11
|
const spec = Object.hasOwn(SETTING_KINDS, kind) ? SETTING_KINDS[kind] : undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LocalBrowserOptions, type LocalBrowserProvider } from "../local-chrome.js";
|
|
2
|
-
|
|
2
|
+
import { type Env } from "./module-kit.js";
|
|
3
3
|
export declare const LOCAL_ENV: {
|
|
4
4
|
readonly live: "AGENTRUN_COMPUTER_LIVE_LOCAL_CHROME";
|
|
5
5
|
/** executablePath: the Chrome or Chromium to run; default the first on PATH, then the usual install places. */
|
|
@@ -7,7 +7,6 @@ export declare const LOCAL_ENV: {
|
|
|
7
7
|
/** headed: "1" shows the window. */
|
|
8
8
|
readonly headed: "COMPUTER_LOCAL_CHROME_HEADED";
|
|
9
9
|
};
|
|
10
|
-
/** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
|
|
11
10
|
export declare const ENV: {
|
|
12
11
|
readonly live: "AGENTRUN_COMPUTER_LIVE_LOCAL_CHROME";
|
|
13
12
|
/** executablePath: the Chrome or Chromium to run; default the first on PATH, then the usual install places. */
|
|
@@ -16,13 +15,12 @@ export declare const ENV: {
|
|
|
16
15
|
readonly headed: "COMPUTER_LOCAL_CHROME_HEADED";
|
|
17
16
|
};
|
|
18
17
|
export type LocalSettings = Pick<LocalBrowserOptions, "executablePath" | "headed" | "env">;
|
|
19
|
-
/** The provider's options this module reads from env, each only when its name is set;
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/** The provider's options this module reads from env, each only when its name is set; the names Chrome reads go in as the
|
|
19
|
+
* provider's env (CHROME_ENV_NAMES: PATH, to find a Chrome on it, HOME, the display, locale and fonts), and no other. */
|
|
20
|
+
export declare function settingsFromEnv(env?: Env): LocalSettings;
|
|
22
21
|
export declare const conformanceNotes: string[];
|
|
23
22
|
export interface LocalModuleOptions {
|
|
24
|
-
|
|
25
|
-
env?: Record<string, string | undefined>;
|
|
23
|
+
env?: Env;
|
|
26
24
|
}
|
|
27
25
|
/** The image every computer of the run asks for: this machine's Chrome. */
|
|
28
26
|
export declare function conformanceImage(): string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Local Chrome for the conformance CLI: `npm run conformance -w @parcha/agentrun-computer -- --provider local-chrome`.
|
|
2
|
-
// It starts a real Chrome on this machine (nothing billed, no key)
|
|
3
|
-
// AGENTRUN_COMPUTER_LIVE_LOCAL_CHROME=1. The provider reads no environment: this module reads its own
|
|
4
|
-
// COMPUTER_LOCAL_CHROME_* names, and PATH to find a Chrome, and passes each to create() as its option.
|
|
2
|
+
// It starts a real Chrome on this machine (nothing billed, no key).
|
|
5
3
|
import { BROWSER_IMAGE } from "../descriptors/shared.js";
|
|
4
|
+
import { CHROME_ENV_NAMES, childEnv } from "../child-env.js";
|
|
6
5
|
import { create } from "../local-chrome.js";
|
|
7
|
-
|
|
6
|
+
import { requireLive, setOptions } from "./module-kit.js";
|
|
8
7
|
export const LOCAL_ENV = {
|
|
9
8
|
live: "AGENTRUN_COMPUTER_LIVE_LOCAL_CHROME",
|
|
10
9
|
/** executablePath: the Chrome or Chromium to run; default the first on PATH, then the usual install places. */
|
|
@@ -12,15 +11,13 @@ export const LOCAL_ENV = {
|
|
|
12
11
|
/** headed: "1" shows the window. */
|
|
13
12
|
headed: "COMPUTER_LOCAL_CHROME_HEADED",
|
|
14
13
|
};
|
|
15
|
-
/** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
|
|
16
14
|
export const ENV = LOCAL_ENV;
|
|
17
|
-
/** The provider's options this module reads from env, each only when its name is set;
|
|
15
|
+
/** The provider's options this module reads from env, each only when its name is set; the names Chrome reads go in as the
|
|
16
|
+
* provider's env (CHROME_ENV_NAMES: PATH, to find a Chrome on it, HOME, the display, locale and fonts), and no other. */
|
|
18
17
|
export function settingsFromEnv(env = process.env) {
|
|
19
|
-
const executablePath = env[LOCAL_ENV.chrome] || undefined;
|
|
20
18
|
const headed = env[LOCAL_ENV.headed] === "1";
|
|
21
|
-
return { ...(
|
|
19
|
+
return { ...setOptions(env, { executablePath: LOCAL_ENV.chrome }), ...(headed ? { headed } : {}), env: childEnv(env, CHROME_ENV_NAMES) };
|
|
22
20
|
}
|
|
23
|
-
/** For the run's report: what this configuration means for the suite. */
|
|
24
21
|
export const conformanceNotes = [
|
|
25
22
|
"local-chrome: this machine's Chrome, one browser for the whole run, deleted by its last case and again at the run's end. Its supervisor ends it at its deadline, which list reads.",
|
|
26
23
|
];
|
|
@@ -30,7 +27,6 @@ export function conformanceImage() {
|
|
|
30
27
|
}
|
|
31
28
|
/** The provider the CLI runs; throws in words without the live switch. */
|
|
32
29
|
export async function createProvider({ env = process.env } = {}) {
|
|
33
|
-
|
|
34
|
-
throw new Error(`the Local Chrome conformance module starts a real Chrome on this machine: set ${LOCAL_ENV.live}=1 to run it`);
|
|
30
|
+
requireLive(env, LOCAL_ENV.live, "the Local Chrome conformance module starts a real Chrome on this machine");
|
|
35
31
|
return create(settingsFromEnv(env));
|
|
36
32
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { MachineHost } from "../host.js";
|
|
2
1
|
import { type ModalClientConstructor, type ModalCreateOptions, type ModalProvider } from "../modal.js";
|
|
3
|
-
import type { MountKind } from "../mount.js";
|
|
4
2
|
import type { ProviderNote } from "../mount-archil.js";
|
|
5
|
-
import { type
|
|
6
|
-
import type
|
|
3
|
+
import { type ArchilMountOptions } from "./archil.js";
|
|
4
|
+
import { type Env, type HostedModuleOptions } from "./module-kit.js";
|
|
5
|
+
export { CONFORMANCE_MAX_LIFETIME_MS } from "./module-kit.js";
|
|
7
6
|
/** The Archil disk's settings for the mount cases, by name (COMPUTER_ARCHIL_*: all five, or none). */
|
|
8
7
|
export { ARCHIL_ENV } from "./archil.js";
|
|
9
|
-
/** The environment this module reads, by name, each for the option its comment names, and the live switch. */
|
|
10
8
|
export declare const MODAL_ENV: {
|
|
11
9
|
readonly live: "AGENTRUN_COMPUTER_LIVE_MODAL";
|
|
12
10
|
/** tokenId and tokenSecret, required: the Modal token. */
|
|
@@ -21,7 +19,6 @@ export declare const MODAL_ENV: {
|
|
|
21
19
|
/** kind: linux (default) or desktop, which create() takes on dial alone. */
|
|
22
20
|
readonly kind: "COMPUTER_MODAL_KIND";
|
|
23
21
|
};
|
|
24
|
-
/** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
|
|
25
22
|
export declare const ENV: {
|
|
26
23
|
readonly live: "AGENTRUN_COMPUTER_LIVE_MODAL";
|
|
27
24
|
/** tokenId and tokenSecret, required: the Modal token. */
|
|
@@ -42,49 +39,24 @@ export type ModalSettings = Pick<ModalCreateOptions, "tokenId" | "tokenSecret" |
|
|
|
42
39
|
* The provider's options this module reads from env; throws in words without the token or the app, or while
|
|
43
40
|
* MODAL_SERVER_URL is set there (the SDK would send the token to it), never echoing a token.
|
|
44
41
|
*/
|
|
45
|
-
export declare function settingsFromEnv(env?:
|
|
46
|
-
|
|
47
|
-
export declare const CONFORMANCE_MAX_LIFETIME_MS: number;
|
|
48
|
-
export interface ModalModuleOptions {
|
|
49
|
-
/** The environment to read; process.env by default. */
|
|
50
|
-
env?: Record<string, string | undefined>;
|
|
42
|
+
export declare function settingsFromEnv(env?: Env): ModalSettings;
|
|
43
|
+
export interface ModalModuleOptions extends HostedModuleOptions, ArchilMountOptions {
|
|
51
44
|
/** The SDK's ModalClient; imported from the host's modal package by default. */
|
|
52
45
|
ModalClient?: ModalClientConstructor;
|
|
53
|
-
/** The daemon to upload
|
|
46
|
+
/** The daemon to upload. */
|
|
54
47
|
daemonPath?: string;
|
|
55
|
-
/** Builds this package's daemon for linux/amd64 stamped with version, and gives its path; default go build. */
|
|
56
|
-
buildDaemon?: (version: string) => Promise<string>;
|
|
57
|
-
/** For mountFor("archil"): the disk's object API, or the SDK's Archil client, in place of the host's disk package. */
|
|
58
|
-
archil?: Pick<ArchilRunFolderOptions, "objects" | "Archil" | "baseUrl">;
|
|
59
48
|
/** What the provider says that is no failure: the CLI gives it and puts it in the report. */
|
|
60
49
|
onNote?: ProviderNote;
|
|
61
50
|
/** The public server a dial machine dials (COMPUTER_MODAL_CONNECT=dial): its process alone gives it (dialKit). */
|
|
62
51
|
dial?: ModalCreateOptions["dial"];
|
|
63
52
|
}
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
export declare const createProvider: (options?: ModalModuleOptions | undefined) => Promise<ModalProvider>, createDriftedProvider: (options?: ModalModuleOptions | undefined) => Promise<ModalProvider>, createHost: (options?: ModalModuleOptions | undefined) => Promise<import("../host.js").MachineHost>, sweepScope: (options?: {
|
|
54
|
+
env?: Env;
|
|
55
|
+
}) => string;
|
|
66
56
|
/**
|
|
67
57
|
* The image every computer of the run starts from: on dial the box image, since only it holds agentrun-dial; on exec
|
|
68
58
|
* debian:bookworm-slim, the CLI's own default.
|
|
69
59
|
*/
|
|
70
60
|
export declare function conformanceImage({ env }?: Pick<ModalModuleOptions, "env">): string;
|
|
71
|
-
/** A dial machine (COMPUTER_MODAL_CONNECT=dial) runs its Core inside the public server's process: refused here (dial-only.ts). */
|
|
72
61
|
export declare const dialKit: () => import("./types.js").DialKit;
|
|
73
|
-
|
|
74
|
-
* A run folder for an Archil mount, and none for any other kind (a Modal computer takes no bind): a fresh folder on the
|
|
75
|
-
* disk the COMPUTER_ARCHIL_* names name (archilSettings), none when they name none (archilRunFolder, ./archil.ts).
|
|
76
|
-
* Reaching it is a call to Archil, so it needs the live switch.
|
|
77
|
-
*/
|
|
78
|
-
export declare function mountFor(kind: MountKind, { env, archil }?: ModalModuleOptions): Promise<RunFolder | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
* The Modal host the live sweep (sweep.ts) lists and deletes through, from the same settings; it needs no live switch,
|
|
81
|
-
* since the sweep makes nothing, and it calls nothing until the sweep does.
|
|
82
|
-
*/
|
|
83
|
-
export declare function createHost({ env, ModalClient }?: Pick<ModalModuleOptions, "env" | "ModalClient">): Promise<MachineHost>;
|
|
84
|
-
/**
|
|
85
|
-
* Where the sweep lists, in words: the app and the server the settings name. A before file of another app, or of the
|
|
86
|
-
* same app name on another server, would make every computer there read as new, so the sweep refuses it.
|
|
87
|
-
*/
|
|
88
|
-
export declare function sweepScope({ env }?: Pick<ModalModuleOptions, "env">): string;
|
|
89
|
-
/** The same provider uploading a daemon that reports version <version>-drift, for the drift.version case. */
|
|
90
|
-
export declare function createDriftedProvider({ env, ModalClient, buildDaemon }?: ModalModuleOptions): Promise<ModalProvider>;
|
|
62
|
+
export declare const mountFor: (kind: import("../mount.js").MountKind, options?: ArchilMountOptions) => Promise<import("./types.js").RunFolder | undefined>;
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
// Modal for the conformance CLI: `npm run conformance -w @parcha/agentrun-computer -- --provider modal`. It
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// to create() as its option; the provider gives the token to the client explicitly, pins the server it goes to and
|
|
6
|
-
// refuses an ambient MODAL_SERVER_URL (see modalClient in ../modal.ts). The live switch is checked first, before any
|
|
7
|
-
// other setting is read. The live sweep (sweep.ts, --provider modal) reads the same names through createHost, which
|
|
8
|
-
// needs no live switch: it makes nothing; sweepScope names the app and server a before file must have been listed from.
|
|
9
|
-
//
|
|
10
|
-
// The daemon is uploaded into each sandbox (dist/computerd-linux-amd64, `npm run build:daemon`), so a run publishes
|
|
11
|
-
// nothing. The drifted provider uploads a daemon built with Go as version <version>-drift. Every computer of a run
|
|
12
|
-
// lives at most 30 minutes: Modal's timeout is its lifetime, and a longer one is refused in words.
|
|
13
|
-
//
|
|
1
|
+
// Modal for the conformance CLI: `npm run conformance -w @parcha/agentrun-computer -- --provider modal`. It takes its
|
|
2
|
+
// token from COMPUTER_MODAL_TOKEN_ID and COMPUTER_MODAL_TOKEN_SECRET alone (never MODAL_TOKEN_ID or MODAL_TOKEN_SECRET,
|
|
3
|
+
// which may hold a production token); the provider gives the token to the client explicitly, pins the server it goes to
|
|
4
|
+
// and refuses an ambient MODAL_SERVER_URL (see modalClient in ../modal.ts).
|
|
14
5
|
// For the mount cases, mountFor("archil") makes a fresh run folder on the Archil disk COMPUTER_ARCHIL_DISK names (in
|
|
15
|
-
// COMPUTER_ARCHIL_REGION, mounted with the disk token COMPUTER_ARCHIL_TOKEN), and reaches it from outside
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
// are skipped.
|
|
6
|
+
// COMPUTER_ARCHIL_REGION, mounted with the disk token COMPUTER_ARCHIL_TOKEN), and reaches it from outside with the
|
|
7
|
+
// host's disk SDK (COMPUTER_ARCHIL_API_KEY and COMPUTER_ARCHIL_S3_URL, ./archil.ts); with no disk named the cases are
|
|
8
|
+
// skipped.
|
|
19
9
|
import { boxImageRef } from "../box-image.js";
|
|
10
|
+
import { MODAL } from "../descriptors/modal.js";
|
|
11
|
+
import { httpsBase } from "../hosted/rest.js";
|
|
20
12
|
import { create, MODAL_DEFAULT_SERVER_URL } from "../modal.js";
|
|
21
|
-
import {
|
|
13
|
+
import { archilMountFor } from "./archil.js";
|
|
22
14
|
import { dialOnlyFromServer } from "./dial-only.js";
|
|
23
|
-
import {
|
|
24
|
-
|
|
15
|
+
import { hostedModule, kindFrom } from "./module-kit.js";
|
|
16
|
+
// Modal ends each sandbox at its timeout, the lifetime.
|
|
17
|
+
export { CONFORMANCE_MAX_LIFETIME_MS } from "./module-kit.js";
|
|
25
18
|
/** The Archil disk's settings for the mount cases, by name (COMPUTER_ARCHIL_*: all five, or none). */
|
|
26
19
|
export { ARCHIL_ENV } from "./archil.js";
|
|
27
|
-
/** The environment this module reads, by name, each for the option its comment names, and the live switch. */
|
|
28
20
|
export const MODAL_ENV = {
|
|
29
21
|
live: "AGENTRUN_COMPUTER_LIVE_MODAL",
|
|
30
22
|
/** tokenId and tokenSecret, required: the Modal token. */
|
|
@@ -39,7 +31,6 @@ export const MODAL_ENV = {
|
|
|
39
31
|
/** kind: linux (default) or desktop, which create() takes on dial alone. */
|
|
40
32
|
kind: "COMPUTER_MODAL_KIND",
|
|
41
33
|
};
|
|
42
|
-
/** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
|
|
43
34
|
export const ENV = MODAL_ENV;
|
|
44
35
|
/**
|
|
45
36
|
* The provider's options this module reads from env; throws in words without the token or the app, or while
|
|
@@ -58,23 +49,21 @@ export function settingsFromEnv(env = process.env) {
|
|
|
58
49
|
if (!app)
|
|
59
50
|
throw new Error(`the Modal conformance module needs ${MODAL_ENV.app}: the app the run's sandboxes live in`);
|
|
60
51
|
const serverUrl = env[MODAL_ENV.serverUrl];
|
|
61
|
-
// create() refuses any other value in words.
|
|
62
52
|
const connect = env[MODAL_ENV.connect];
|
|
63
53
|
return { tokenId, tokenSecret, app, ...(serverUrl ? { serverUrl } : {}), ...(connect ? { connect } : {}) };
|
|
64
54
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
55
|
+
const modal = hostedModule({
|
|
56
|
+
live: { name: MODAL_ENV.live, what: "the Modal conformance module makes real sandboxes", whose: "a key for an account you can bill" },
|
|
57
|
+
settingsFromEnv,
|
|
58
|
+
create,
|
|
59
|
+
host: ["ModalClient"],
|
|
60
|
+
run: ["onNote", "dial"],
|
|
61
|
+
runDefined: ["daemonPath"],
|
|
62
|
+
runFromEnv: (env) => kindFrom(env, MODAL_ENV.kind),
|
|
63
|
+
// A before file of another app, or of the same app name on another server, would make every computer there read as new.
|
|
64
|
+
scope: ({ app, serverUrl = MODAL_DEFAULT_SERVER_URL }) => `the app ${app} on ${httpsBase(serverUrl, `the Modal server URL (${MODAL_ENV.serverUrl})`)}`,
|
|
65
|
+
});
|
|
66
|
+
export const { createProvider, createDriftedProvider, createHost, sweepScope } = modal;
|
|
78
67
|
/**
|
|
79
68
|
* The image every computer of the run starts from: on dial the box image, since only it holds agentrun-dial; on exec
|
|
80
69
|
* debian:bookworm-slim, the CLI's own default.
|
|
@@ -82,41 +71,5 @@ export async function createProvider({ env = process.env, ModalClient, daemonPat
|
|
|
82
71
|
export function conformanceImage({ env = process.env } = {}) {
|
|
83
72
|
return env[MODAL_ENV.connect] === "dial" ? boxImageRef() : "debian:bookworm-slim";
|
|
84
73
|
}
|
|
85
|
-
|
|
86
|
-
export const
|
|
87
|
-
/**
|
|
88
|
-
* A run folder for an Archil mount, and none for any other kind (a Modal computer takes no bind): a fresh folder on the
|
|
89
|
-
* disk the COMPUTER_ARCHIL_* names name (archilSettings), none when they name none (archilRunFolder, ./archil.ts).
|
|
90
|
-
* Reaching it is a call to Archil, so it needs the live switch.
|
|
91
|
-
*/
|
|
92
|
-
export async function mountFor(kind, { env = process.env, archil = {} } = {}) {
|
|
93
|
-
if (kind !== "archil")
|
|
94
|
-
return undefined;
|
|
95
|
-
const settings = archilSettings(env);
|
|
96
|
-
if (settings === undefined)
|
|
97
|
-
return undefined;
|
|
98
|
-
live(env);
|
|
99
|
-
return archilRunFolder({ ...settings, ...archil });
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* The Modal host the live sweep (sweep.ts) lists and deletes through, from the same settings; it needs no live switch,
|
|
103
|
-
* since the sweep makes nothing, and it calls nothing until the sweep does.
|
|
104
|
-
*/
|
|
105
|
-
export async function createHost({ env = process.env, ModalClient } = {}) {
|
|
106
|
-
return (await create({ ...settingsFromEnv(env), ...(ModalClient ? { ModalClient } : {}) })).host;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Where the sweep lists, in words: the app and the server the settings name. A before file of another app, or of the
|
|
110
|
-
* same app name on another server, would make every computer there read as new, so the sweep refuses it.
|
|
111
|
-
*/
|
|
112
|
-
export function sweepScope({ env = process.env } = {}) {
|
|
113
|
-
const { app, serverUrl = MODAL_DEFAULT_SERVER_URL } = settingsFromEnv(env);
|
|
114
|
-
return `the app ${app} on ${serverUrl}`;
|
|
115
|
-
}
|
|
116
|
-
/** The same provider uploading a daemon that reports version <version>-drift, for the drift.version case. */
|
|
117
|
-
export async function createDriftedProvider({ env = process.env, ModalClient, buildDaemon = (version) => buildDriftDaemon("amd64", version) } = {}) {
|
|
118
|
-
live(env);
|
|
119
|
-
const settings = settingsFromEnv(env);
|
|
120
|
-
const daemonPath = await buildDaemon(DRIFT_VERSION);
|
|
121
|
-
return create({ ...settings, daemonPath, ...(ModalClient ? { ModalClient } : {}), maxLifetimeMs: CONFORMANCE_MAX_LIFETIME_MS });
|
|
122
|
-
}
|
|
74
|
+
export const dialKit = dialOnlyFromServer(MODAL, `${MODAL_ENV.connect}=dial`);
|
|
75
|
+
export const mountFor = archilMountFor(modal.live);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { MachineHost } from "../host.js";
|
|
2
|
+
import type { Result } from "../result.js";
|
|
3
|
+
export type Env = Record<string, string | undefined>;
|
|
4
|
+
/** A conformance run's computers live at most this long, unless the vendor's own end says otherwise (Orgo, the phone). */
|
|
5
|
+
export declare const CONFORMANCE_MAX_LIFETIME_MS: number;
|
|
6
|
+
/** A run's cap: the one asked for (COMPUTER_<VENDOR>_MAX_LIFETIME_MS) when it is shorter, else CONFORMANCE_MAX_LIFETIME_MS. */
|
|
7
|
+
export declare const runCap: (asked: number | undefined) => number;
|
|
8
|
+
/** Refuses unless env[name] is "1": what the run does, then the switch, with whose key it takes when that is said. */
|
|
9
|
+
export declare function requireLive(env: Env, name: string, what: string, whose?: string): void;
|
|
10
|
+
/** env[name], set and not empty; else a refusal naming it and the bare name it is never read from. Never echoes a value. */
|
|
11
|
+
export declare function requiredSecret(env: Env, name: string, what: string): string;
|
|
12
|
+
/** Each option of names (option to env name) whose name is set to a value that is not empty. */
|
|
13
|
+
export declare function setOptions<N extends Record<string, string>>(env: Env, names: N): {
|
|
14
|
+
[K in keyof N]?: string;
|
|
15
|
+
};
|
|
16
|
+
/** maxLifetimeMs from env[name] when it is set: a whole number of milliseconds, else refused in words with an example. */
|
|
17
|
+
export declare function lifetimeFromEnv(env: Env, name: string, example: string): {
|
|
18
|
+
maxLifetimeMs?: number;
|
|
19
|
+
};
|
|
20
|
+
/** A module's kind from its COMPUTER_<VENDOR>_KIND as create() options: none when it is unset or empty, else what it says. */
|
|
21
|
+
export declare const kindFrom: (env: Env, name: string) => {
|
|
22
|
+
kind?: "desktop" | "linux";
|
|
23
|
+
};
|
|
24
|
+
/** A key as a sweep's scope names it, never the key itself: "sha256:" and the first 12 hex digits of its hash. */
|
|
25
|
+
export declare const keyPrint: (key: string) => string;
|
|
26
|
+
/** The image the provider's prepareImage() answers; on failure its words, after `prefix: ` when given. */
|
|
27
|
+
export declare function preparedImage(provider: {
|
|
28
|
+
prepareImage(context?: {
|
|
29
|
+
signal?: AbortSignal;
|
|
30
|
+
}): Promise<Result<string>>;
|
|
31
|
+
}, signal?: AbortSignal, prefix?: string): Promise<string>;
|
|
32
|
+
/** What a hosted module takes from its caller beside its vendor's options. */
|
|
33
|
+
export interface HostedModuleOptions {
|
|
34
|
+
/** Where the settings are read; default process.env. */
|
|
35
|
+
env?: Env;
|
|
36
|
+
/** Builds this package's daemon for linux/amd64 stamped with version, and gives its path; default go build. */
|
|
37
|
+
buildDaemon?: (version: string) => Promise<string>;
|
|
38
|
+
}
|
|
39
|
+
export interface HostedModuleSpec<O extends HostedModuleOptions, S extends object, P extends {
|
|
40
|
+
readonly host: MachineHost;
|
|
41
|
+
}> {
|
|
42
|
+
/** The live switch, and what its refusal says the run does and whose key it takes (requireLive). */
|
|
43
|
+
live: {
|
|
44
|
+
name: string;
|
|
45
|
+
what: string;
|
|
46
|
+
whose: string;
|
|
47
|
+
};
|
|
48
|
+
settingsFromEnv(env: Env): S;
|
|
49
|
+
/** The provider file's create(). */
|
|
50
|
+
create(options: object): Promise<P>;
|
|
51
|
+
/** Options every provider the module makes takes, the sweep's host's included: each when given (truthy). */
|
|
52
|
+
host: readonly (keyof O)[];
|
|
53
|
+
/** Options the run's provider and its twin alone take, after the host's: each when given (truthy). */
|
|
54
|
+
run: readonly (keyof O)[];
|
|
55
|
+
/** The same, each when it is not undefined: an empty daemonPath still stands over COMPUTER_<VENDOR>_DAEMON. */
|
|
56
|
+
runDefined?: readonly (keyof O)[];
|
|
57
|
+
/** Read from env for the run's provider and its twin alone, right after the settings (Modal's kind). */
|
|
58
|
+
runFromEnv?(env: Env): object;
|
|
59
|
+
/** Where the sweep lists, in words, from the settings. */
|
|
60
|
+
scope?(settings: S): string;
|
|
61
|
+
}
|
|
62
|
+
export interface HostedModule<O extends HostedModuleOptions, P> {
|
|
63
|
+
live(env: Env): void;
|
|
64
|
+
/** The provider the CLI runs; throws in words without the live switch, or when a setting is missing or wrong. */
|
|
65
|
+
createProvider(options?: O): Promise<P>;
|
|
66
|
+
/** The same provider uploading a daemon that reports version <version>-drift, for the drift.version case. */
|
|
67
|
+
createDriftedProvider(options?: O): Promise<P>;
|
|
68
|
+
/** The host the live sweep lists and deletes through, from the same settings; no live switch, since it makes nothing. */
|
|
69
|
+
createHost(options?: O): Promise<MachineHost>;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A hosted module's providers from its spec. Each create() gets the settings, then runFromEnv's, the host options, the
|
|
73
|
+
* run options, the twin's built daemon, then the run's cap, in that order: a later key wins, so an option's daemonPath
|
|
74
|
+
* is taken over COMPUTER_<VENDOR>_DAEMON, the twin's build over both, and the cap over an env lifetime that is longer.
|
|
75
|
+
*/
|
|
76
|
+
export declare function hostedModule<O extends HostedModuleOptions, S extends object, P extends {
|
|
77
|
+
readonly host: MachineHost;
|
|
78
|
+
}>(spec: HostedModuleSpec<O, S, P> & {
|
|
79
|
+
scope(settings: S): string;
|
|
80
|
+
}): HostedModule<O, P> & {
|
|
81
|
+
sweepScope(options?: {
|
|
82
|
+
env?: Env;
|
|
83
|
+
}): string;
|
|
84
|
+
};
|
|
85
|
+
export declare function hostedModule<O extends HostedModuleOptions, S extends object, P extends {
|
|
86
|
+
readonly host: MachineHost;
|
|
87
|
+
}>(spec: HostedModuleSpec<O, S, P>): HostedModule<O, P>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// The rules every conformance module reads its settings by, said once: the live switch before any other setting, a key
|
|
2
|
+
// from the module's own COMPUTER_* name alone, each option whose name is set, and the run's cap. hostedModule builds the
|
|
3
|
+
// run's provider, its drifted twin and the sweep's host of a module on the shared adapter from one spec.
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
import { buildDriftDaemon, DRIFT_VERSION } from "./drift-daemon.js";
|
|
6
|
+
/** A conformance run's computers live at most this long, unless the vendor's own end says otherwise (Orgo, the phone). */
|
|
7
|
+
export const CONFORMANCE_MAX_LIFETIME_MS = 30 * 60_000;
|
|
8
|
+
/** A run's cap: the one asked for (COMPUTER_<VENDOR>_MAX_LIFETIME_MS) when it is shorter, else CONFORMANCE_MAX_LIFETIME_MS. */
|
|
9
|
+
export const runCap = (asked) => Math.min(asked ?? CONFORMANCE_MAX_LIFETIME_MS, CONFORMANCE_MAX_LIFETIME_MS);
|
|
10
|
+
/** Refuses unless env[name] is "1": what the run does, then the switch, with whose key it takes when that is said. */
|
|
11
|
+
export function requireLive(env, name, what, whose) {
|
|
12
|
+
if (env[name] !== "1")
|
|
13
|
+
throw new Error(`${what}: set ${name}=1${whose === undefined ? "" : `, with ${whose},`} to run it`);
|
|
14
|
+
}
|
|
15
|
+
/** env[name], set and not empty; else a refusal naming it and the bare name it is never read from. Never echoes a value. */
|
|
16
|
+
export function requiredSecret(env, name, what) {
|
|
17
|
+
const value = env[name];
|
|
18
|
+
if (value === undefined || value === "")
|
|
19
|
+
throw new Error(`set ${name} to ${what}: the conformance module reads it there and nowhere else, never from ${name.replace(/^COMPUTER_/, "")}`);
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
/** Each option of names (option to env name) whose name is set to a value that is not empty. */
|
|
23
|
+
export function setOptions(env, names) {
|
|
24
|
+
const set = {};
|
|
25
|
+
for (const option of Object.keys(names)) {
|
|
26
|
+
const value = env[names[option]];
|
|
27
|
+
if (value)
|
|
28
|
+
set[option] = value;
|
|
29
|
+
}
|
|
30
|
+
return set;
|
|
31
|
+
}
|
|
32
|
+
/** maxLifetimeMs from env[name] when it is set: a whole number of milliseconds, else refused in words with an example. */
|
|
33
|
+
export function lifetimeFromEnv(env, name, example) {
|
|
34
|
+
const lifetime = env[name] || undefined;
|
|
35
|
+
if (lifetime === undefined)
|
|
36
|
+
return {};
|
|
37
|
+
if (!/^\d+$/.test(lifetime))
|
|
38
|
+
throw new Error(`${name} is a whole number of milliseconds, such as ${example}`);
|
|
39
|
+
return { maxLifetimeMs: Number(lifetime) };
|
|
40
|
+
}
|
|
41
|
+
/** A module's kind from its COMPUTER_<VENDOR>_KIND as create() options: none when it is unset or empty, else what it says. */
|
|
42
|
+
export const kindFrom = (env, name) => (env[name] ? { kind: env[name] } : {});
|
|
43
|
+
/** A key as a sweep's scope names it, never the key itself: "sha256:" and the first 12 hex digits of its hash. */
|
|
44
|
+
export const keyPrint = (key) => `sha256:${createHash("sha256").update(key, "utf8").digest("hex").slice(0, 12)}`;
|
|
45
|
+
/** The image the provider's prepareImage() answers; on failure its words, after `prefix: ` when given. */
|
|
46
|
+
export async function preparedImage(provider, signal, prefix) {
|
|
47
|
+
const ready = await provider.prepareImage(signal ? { signal } : {});
|
|
48
|
+
if (!ready.ok)
|
|
49
|
+
throw new Error(prefix === undefined ? ready.error.message : `${prefix}: ${ready.error.message}`);
|
|
50
|
+
return ready.value;
|
|
51
|
+
}
|
|
52
|
+
/** The options of `names` that `given` takes. */
|
|
53
|
+
function picked(options, names, given) {
|
|
54
|
+
const out = {};
|
|
55
|
+
for (const name of names)
|
|
56
|
+
if (given(options[name]))
|
|
57
|
+
out[name] = options[name];
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
export function hostedModule(spec) {
|
|
61
|
+
const live = (env) => requireLive(env, spec.live.name, spec.live.what, spec.live.whose);
|
|
62
|
+
const hostOptions = (options) => picked(options, spec.host, Boolean);
|
|
63
|
+
const runOptions = (options, env) => ({
|
|
64
|
+
...spec.runFromEnv?.(env),
|
|
65
|
+
...hostOptions(options),
|
|
66
|
+
...picked(options, spec.run, Boolean),
|
|
67
|
+
...picked(options, spec.runDefined ?? [], (value) => value !== undefined),
|
|
68
|
+
});
|
|
69
|
+
const capOf = (settings) => runCap(settings.maxLifetimeMs);
|
|
70
|
+
const { scope } = spec;
|
|
71
|
+
return {
|
|
72
|
+
live,
|
|
73
|
+
createProvider: async (options = {}) => {
|
|
74
|
+
const { env = process.env } = options;
|
|
75
|
+
live(env);
|
|
76
|
+
const settings = spec.settingsFromEnv(env);
|
|
77
|
+
return spec.create({ ...settings, ...runOptions(options, env), maxLifetimeMs: capOf(settings) });
|
|
78
|
+
},
|
|
79
|
+
createDriftedProvider: async (options = {}) => {
|
|
80
|
+
const { env = process.env, buildDaemon = (version) => buildDriftDaemon("amd64", version) } = options;
|
|
81
|
+
live(env);
|
|
82
|
+
const settings = spec.settingsFromEnv(env);
|
|
83
|
+
return spec.create({ ...settings, ...runOptions(options, env), daemonPath: await buildDaemon(DRIFT_VERSION), maxLifetimeMs: capOf(settings) });
|
|
84
|
+
},
|
|
85
|
+
createHost: async (options = {}) => (await spec.create({ ...spec.settingsFromEnv(options.env ?? process.env), ...hostOptions(options) })).host,
|
|
86
|
+
...(scope === undefined ? {} : { sweepScope: ({ env = process.env } = {}) => scope(spec.settingsFromEnv(env)) }),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MachineHost } from "../host.js";
|
|
2
1
|
import { type MorphOptions, type MorphProvider } from "../morph.js";
|
|
3
|
-
|
|
2
|
+
import { type Env, type HostedModuleOptions } from "./module-kit.js";
|
|
3
|
+
export { CONFORMANCE_MAX_LIFETIME_MS } from "./module-kit.js";
|
|
4
4
|
export declare const MORPH_ENV: {
|
|
5
5
|
readonly live: "AGENTRUN_COMPUTER_LIVE_MORPH";
|
|
6
6
|
/** apiKey, required: the account's API key. */
|
|
@@ -14,7 +14,6 @@ export declare const MORPH_ENV: {
|
|
|
14
14
|
/** maxLifetimeMs: the cap, in ms, at most 86400000; a run takes it when it is under 30 minutes, else 30 minutes. */
|
|
15
15
|
readonly maxLifetimeMs: "COMPUTER_MORPH_MAX_LIFETIME_MS";
|
|
16
16
|
};
|
|
17
|
-
/** The names this module reads, under the conformance modules' common name (ConformanceModule.ENV). */
|
|
18
17
|
export declare const ENV: {
|
|
19
18
|
readonly live: "AGENTRUN_COMPUTER_LIVE_MORPH";
|
|
20
19
|
/** apiKey, required: the account's API key. */
|
|
@@ -31,29 +30,14 @@ export declare const ENV: {
|
|
|
31
30
|
/** What this module reads from the environment: the key, and each other option whose name is set. */
|
|
32
31
|
export type MorphSettings = Pick<MorphOptions, "apiKey" | "apiUrl" | "daemonPath" | "maxLifetimeMs">;
|
|
33
32
|
/** The provider's options this module reads from env, each only when its name is set; throws in words without a key, never echoing it. */
|
|
34
|
-
export declare function settingsFromEnv(env?:
|
|
35
|
-
/** The longest lifetime a computer of a run may ask for: Morph's TTL and init end it at its deadline, the sweep deletes it. */
|
|
36
|
-
export declare const CONFORMANCE_MAX_LIFETIME_MS: number;
|
|
37
|
-
/** For the run's report: what this configuration means for the suite. */
|
|
33
|
+
export declare function settingsFromEnv(env?: Env): MorphSettings;
|
|
38
34
|
export declare const conformanceNotes: string[];
|
|
39
|
-
export interface MorphModuleOptions extends Pick<MorphOptions, "ssh2" | "fetch" | "daemonPath" | "timeouts" | "onNote" | "sshHost" | "sshPort"> {
|
|
40
|
-
/** Where the settings are read; default process.env. */
|
|
41
|
-
env?: Record<string, string | undefined>;
|
|
42
|
-
/** Builds this package's daemon for linux/amd64 stamped with version, and gives its path; default go build. */
|
|
43
|
-
buildDaemon?: (version: string) => Promise<string>;
|
|
35
|
+
export interface MorphModuleOptions extends HostedModuleOptions, Pick<MorphOptions, "ssh2" | "fetch" | "daemonPath" | "timeouts" | "onNote" | "sshHost" | "sshPort"> {
|
|
44
36
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export declare function createDriftedProvider(options?: MorphModuleOptions): Promise<MorphProvider>;
|
|
37
|
+
export declare const createProvider: (options?: MorphModuleOptions | undefined) => Promise<MorphProvider>, createDriftedProvider: (options?: MorphModuleOptions | undefined) => Promise<MorphProvider>, createHost: (options?: MorphModuleOptions | undefined) => Promise<import("../host.js").MachineHost>, sweepScope: (options?: {
|
|
38
|
+
env?: Env;
|
|
39
|
+
}) => string;
|
|
49
40
|
/** The run's snapshot: COMPUTER_MORPH_SNAPSHOT, else the box snapshot, found or built in the key's account first (live). */
|
|
50
41
|
export declare function conformanceImage(options?: MorphModuleOptions, { signal }?: {
|
|
51
42
|
signal?: AbortSignal;
|
|
52
43
|
}): Promise<string>;
|
|
53
|
-
/**
|
|
54
|
-
* The Morph host the live sweep (sweep.ts) lists and deletes through, from the same settings; it needs no live switch,
|
|
55
|
-
* since the sweep makes nothing, and it calls nothing until the sweep does.
|
|
56
|
-
*/
|
|
57
|
-
export declare function createHost(options?: Pick<MorphModuleOptions, "env" | "ssh2" | "fetch">): Promise<MachineHost>;
|
|
58
|
-
/** Where the host lists, in words: one key is one account, and one listing covers all of it. The key is named by its sha256 prefix alone. */
|
|
59
|
-
export declare function sweepScope({ env }?: Pick<MorphModuleOptions, "env">): string;
|