@evermore.work/plugin-exe-dev 0.1.0

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 ADDED
@@ -0,0 +1,58 @@
1
+ # `@evermore.work/plugin-exe-dev`
2
+
3
+ Published exe.dev sandbox provider plugin for Evermore.
4
+
5
+ This package lives in the Evermore monorepo, but it is intentionally excluded from the root `pnpm` workspace and shaped to publish and install like a standalone npm package. That lets operators install it from the Plugins page by package name without introducing root lockfile churn.
6
+
7
+ ## Install
8
+
9
+ From an Evermore instance, install:
10
+
11
+ ```text
12
+ @evermore.work/plugin-exe-dev
13
+ ```
14
+
15
+ ## Configuration
16
+
17
+ Configure exe.dev from `Company Settings -> Environments`, not from the plugin's instance settings page.
18
+
19
+ - Put the exe.dev API token on the sandbox environment itself.
20
+ - When you save an environment, Evermore stores pasted API keys and pasted SSH private keys as company secrets.
21
+ - `EXE_API_KEY` remains an optional host-level fallback when an environment omits the API token.
22
+ - The current implementation provisions VMs through exe.dev's HTTPS API and runs commands through direct SSH to the created VM.
23
+
24
+ To use the provider successfully, the environment/host needs all of the following:
25
+
26
+ - An exe.dev API token that allows the lifecycle commands the provider uses: `new`, `ls`, and `rm`. `whoami` and `help` are recommended for manual debugging. `restart` is only needed if you extend the provider to restart retained VMs.
27
+ - SSH access from the Evermore host to the resulting `*.exe.xyz` VMs.
28
+ - An SSH private key that exe.dev already recognizes. You can either:
29
+ - paste the private key into the environment config via `sshPrivateKey`
30
+ - point `sshIdentityFile` at an absolute host path
31
+ - or leave both blank and rely on the host's default SSH agent/keychain
32
+ - The matching public key must already be registered with exe.dev before the provider can execute commands inside the VM.
33
+
34
+ Operational notes:
35
+
36
+ - If exe.dev replies `Please complete registration by running: ssh exe.dev`, the host key has not finished exe.dev onboarding yet.
37
+ - Reusable leases keep the VM alive between runs. exe.dev does not expose a documented "stop and later resume" command in the public CLI docs, so `reuseLease: true` means "retain the VM" rather than "suspend it."
38
+ - The provisioning path uses `https://exe.dev/exec`, which exe.dev documents as a command-style HTTPS API with a 30-second request timeout. Typical `new` calls are expected to fit inside that limit; command execution itself does not use `/exec`.
39
+ - Probes still create and delete a real exe.dev VM through `/exec`, and so do the `new`/`rm` calls inside the normal acquire/release lifecycle. Treat all of those as real provisioning cost, not just probes.
40
+ - exe.dev runs `--setup-script` as the unprivileged `exedev` user, not as root. That user has passwordless `sudo`, so any system-level steps in a custom `setupScript` must invoke `sudo` explicitly (for example `sudo apt-get install -y …`). When you omit `setupScript`, the plugin supplies a default that installs Node 20 via the official nodesource script — Evermore's sandbox callback bridge is a Node program, so the VM needs `node` on `PATH` before the bridge can launch.
41
+
42
+ ## Local development
43
+
44
+ ```bash
45
+ cd packages/plugins/sandbox-providers/exe-dev
46
+ pnpm install --ignore-workspace --no-lockfile
47
+ pnpm build
48
+ pnpm test
49
+ pnpm typecheck
50
+ ```
51
+
52
+ These commands assume the repo root has already been installed once so the local `@evermore.work/plugin-sdk` workspace package is available to the compiler during development.
53
+
54
+ ## Package layout
55
+
56
+ - `src/manifest.ts` declares the sandbox-provider driver metadata
57
+ - `src/plugin.ts` implements the environment lifecycle hooks
58
+ - `evermorePlugin.manifest` and `evermorePlugin.worker` point the host at the built plugin entrypoints in `dist/`
@@ -0,0 +1,3 @@
1
+ export { default as manifest } from "./manifest.js";
2
+ export { default as plugin } from "./plugin.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { default as manifest } from "./manifest.js";
2
+ export { default as plugin } from "./plugin.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { EvermorePluginManifestV1 } from "@evermore.work/plugin-sdk";
2
+ declare const manifest: EvermorePluginManifestV1;
3
+ export default manifest;
4
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAK1E,QAAA,MAAM,QAAQ,EAAE,wBAgIf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,125 @@
1
+ const PLUGIN_ID = "evermore.exe-dev-sandbox-provider";
2
+ const PLUGIN_VERSION = "0.1.0";
3
+ const manifest = {
4
+ id: PLUGIN_ID,
5
+ apiVersion: 1,
6
+ version: PLUGIN_VERSION,
7
+ displayName: "exe.dev Sandbox Provider",
8
+ description: "Sandbox provider plugin that provisions exe.dev VMs as Evermore execution environments.",
9
+ author: "Evermore",
10
+ categories: ["automation"],
11
+ capabilities: ["environment.drivers.register"],
12
+ entrypoints: {
13
+ worker: "./dist/worker.js",
14
+ },
15
+ environmentDrivers: [
16
+ {
17
+ driverKey: "exe-dev",
18
+ kind: "sandbox_provider",
19
+ displayName: "exe.dev VM",
20
+ description: "Provisions exe.dev VMs through the HTTPS API, then runs commands over direct SSH for long-lived Evermore workloads.",
21
+ configSchema: {
22
+ type: "object",
23
+ properties: {
24
+ apiKey: {
25
+ type: "string",
26
+ format: "secret-ref",
27
+ description: "Environment-specific exe.dev API token. Needs `/exec` permission for at least `new`, `ls`, and `rm`. Paste a token or an existing Evermore secret reference; saved environments store pasted values as company secrets. Falls back to EXE_API_KEY if omitted.",
28
+ },
29
+ apiUrl: {
30
+ type: "string",
31
+ description: "Optional exe.dev HTTPS API base URL or /exec endpoint. Defaults to https://exe.dev/exec.",
32
+ },
33
+ namePrefix: {
34
+ type: "string",
35
+ description: "Optional prefix used when generating VM names.",
36
+ default: "evermore",
37
+ },
38
+ image: {
39
+ type: "string",
40
+ description: "Optional container image to use when creating the VM.",
41
+ },
42
+ command: {
43
+ type: "string",
44
+ description: "Optional container command passed to `exe.dev new --command`.",
45
+ },
46
+ cpu: {
47
+ type: "number",
48
+ description: "Optional CPU count passed to `exe.dev new --cpu`.",
49
+ },
50
+ memory: {
51
+ type: "string",
52
+ description: "Optional memory size such as `4GB`.",
53
+ },
54
+ disk: {
55
+ type: "string",
56
+ description: "Optional disk size such as `20GB`.",
57
+ },
58
+ comment: {
59
+ type: "string",
60
+ description: "Optional short note attached to created VMs.",
61
+ },
62
+ env: {
63
+ type: "object",
64
+ description: "Optional environment variables applied at VM creation time.",
65
+ additionalProperties: { type: "string" },
66
+ },
67
+ integrations: {
68
+ type: "array",
69
+ description: "Optional exe.dev integrations to attach during VM creation.",
70
+ items: { type: "string" },
71
+ },
72
+ tags: {
73
+ type: "array",
74
+ description: "Optional tags to apply during VM creation.",
75
+ items: { type: "string" },
76
+ },
77
+ setupScript: {
78
+ type: "string",
79
+ description: "Optional first-boot setup script passed to `exe.dev new --setup-script`.",
80
+ },
81
+ prompt: {
82
+ type: "string",
83
+ description: "Optional Shelley prompt passed to `exe.dev new --prompt`.",
84
+ },
85
+ timeoutMs: {
86
+ type: "number",
87
+ description: "Timeout for VM lifecycle and SSH operations in milliseconds.",
88
+ default: 300000,
89
+ },
90
+ reuseLease: {
91
+ type: "boolean",
92
+ description: "Whether to keep the VM alive between runs instead of deleting it on release.",
93
+ default: false,
94
+ },
95
+ sshUser: {
96
+ type: "string",
97
+ description: "Optional SSH username for direct VM access.",
98
+ },
99
+ sshPrivateKey: {
100
+ type: "string",
101
+ format: "secret-ref",
102
+ maxLength: 4096,
103
+ description: "Optional exe.dev-registered SSH private key. Paste the private key or an existing Evermore secret reference; saved environments store pasted values as company secrets. If omitted, Evermore falls back to sshIdentityFile, then the host's default SSH agent/keychain.",
104
+ },
105
+ sshIdentityFile: {
106
+ type: "string",
107
+ description: "Optional absolute path to the SSH private key the Evermore host should use for VM access when sshPrivateKey is omitted. Leave both blank to rely on the host's default SSH agent/keychain.",
108
+ },
109
+ sshPort: {
110
+ type: "number",
111
+ description: "SSH port for direct VM access.",
112
+ default: 22,
113
+ },
114
+ strictHostKeyChecking: {
115
+ type: "string",
116
+ description: "Host key policy passed to ssh via StrictHostKeyChecking. Typical values are `accept-new`, `yes`, or `no`.",
117
+ default: "accept-new",
118
+ },
119
+ },
120
+ },
121
+ },
122
+ ],
123
+ };
124
+ export default manifest;
125
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,mCAAmC,CAAC;AACtD,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,MAAM,QAAQ,GAA6B;IACzC,EAAE,EAAE,SAAS;IACb,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,0BAA0B;IACvC,WAAW,EACT,yFAAyF;IAC3F,MAAM,EAAE,UAAU;IAClB,UAAU,EAAE,CAAC,YAAY,CAAC;IAC1B,YAAY,EAAE,CAAC,8BAA8B,CAAC;IAC9C,WAAW,EAAE;QACX,MAAM,EAAE,kBAAkB;KAC3B;IACD,kBAAkB,EAAE;QAClB;YACE,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,YAAY;YACzB,WAAW,EACT,qHAAqH;YACvH,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,YAAY;wBACpB,WAAW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BACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8DAA8D;wBAC3E,OAAO,EAAE,MAAM;qBAChB;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,8EAA8E;wBAChF,OAAO,EAAE,KAAK;qBACf;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6CAA6C;qBAC3D;oBACD,aAAa,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,YAAY;wBACpB,SAAS,EAAE,IAAI;wBACf,WAAW,EACT,yQAAyQ;qBAC5Q;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,4LAA4L;qBAC/L;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gCAAgC;wBAC7C,OAAO,EAAE,EAAE;qBACZ;oBACD,qBAAqB,EAAE;wBACrB,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,2GAA2G;wBAC7G,OAAO,EAAE,YAAY;qBACtB;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const plugin: import("@evermore.work/plugin-sdk").EvermorePlugin;
2
+ export default plugin;
3
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAsoBA,QAAA,MAAM,MAAM,oDAyOV,CAAC;AAEH,eAAe,MAAM,CAAC"}
package/dist/plugin.js ADDED
@@ -0,0 +1,674 @@
1
+ import path from "node:path";
2
+ import { randomUUID } from "node:crypto";
3
+ import { chmod, mkdtemp, rm, writeFile } from "node:fs/promises";
4
+ import { tmpdir } from "node:os";
5
+ import { spawn } from "node:child_process";
6
+ import { definePlugin } from "@evermore.work/plugin-sdk";
7
+ const DEFAULT_API_URL = "https://exe.dev/exec";
8
+ const DEFAULT_TIMEOUT_MS = 300_000;
9
+ const EXE_DEV_API_MAX_TIMEOUT_MS = 29_000;
10
+ const SSH_SIGKILL_GRACE_MS = 250;
11
+ const MAX_VM_RECORD_DEPTH = 4;
12
+ const EXE_DEV_SSH_ONBOARDING_MARKER = "Please complete registration by running: ssh exe.dev";
13
+ const EXE_DEV_SSH_EMAIL_PROMPT = "Please enter your email address:";
14
+ // exe.dev's `--setup-script` runs at VM init as the unprivileged `exedev` user, which
15
+ // has passwordless sudo. The Evermore sandbox callback bridge is a Node script, so
16
+ // every Evermore workload on this provider needs node on PATH before the bridge can
17
+ // start. When the operator hasn't supplied their own setup script, install Node 20 via
18
+ // nodesource so the VM comes up ready for Evermore out of the box.
19
+ const DEFAULT_SETUP_SCRIPT = "command -v node >/dev/null 2>&1 || " +
20
+ "(curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && " +
21
+ "sudo apt-get install -y nodejs)";
22
+ class ExeDevApiError extends Error {
23
+ status;
24
+ body;
25
+ constructor(message, status, body) {
26
+ super(message);
27
+ this.name = "ExeDevApiError";
28
+ this.status = status;
29
+ this.body = body;
30
+ }
31
+ }
32
+ function parseOptionalString(value) {
33
+ if (typeof value === "number" && Number.isFinite(value))
34
+ return String(value);
35
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : null;
36
+ }
37
+ function parseOptionalInteger(value) {
38
+ if (value == null || value === "")
39
+ return null;
40
+ const parsed = Number(value);
41
+ return Number.isFinite(parsed) ? Math.trunc(parsed) : null;
42
+ }
43
+ function parseStringArray(value) {
44
+ if (Array.isArray(value)) {
45
+ return value
46
+ .map((entry) => parseOptionalString(entry))
47
+ .filter((entry) => entry != null);
48
+ }
49
+ if (typeof value === "string") {
50
+ return value
51
+ .split(",")
52
+ .map((entry) => entry.trim())
53
+ .filter((entry) => entry.length > 0);
54
+ }
55
+ return [];
56
+ }
57
+ function parseEnvMap(value) {
58
+ if (!value || typeof value !== "object" || Array.isArray(value))
59
+ return {};
60
+ const env = {};
61
+ for (const [key, raw] of Object.entries(value)) {
62
+ const normalizedKey = key.trim();
63
+ const normalizedValue = parseOptionalString(raw);
64
+ if (normalizedKey.length > 0 && normalizedValue != null) {
65
+ env[normalizedKey] = normalizedValue;
66
+ }
67
+ }
68
+ return env;
69
+ }
70
+ function isValidUrl(value) {
71
+ try {
72
+ new URL(value);
73
+ return true;
74
+ }
75
+ catch {
76
+ return false;
77
+ }
78
+ }
79
+ function normalizeApiUrl(value) {
80
+ if (!value)
81
+ return DEFAULT_API_URL;
82
+ const trimmed = value.trim();
83
+ if (!trimmed)
84
+ return DEFAULT_API_URL;
85
+ try {
86
+ const parsed = new URL(trimmed);
87
+ const normalizedPath = parsed.pathname.replace(/\/+$/, "") || "/";
88
+ if (normalizedPath === "/exec") {
89
+ parsed.pathname = "/exec";
90
+ return parsed.toString();
91
+ }
92
+ parsed.pathname = `${normalizedPath === "/" ? "" : normalizedPath}/exec`.replace(/\/{2,}/g, "/");
93
+ return parsed.toString();
94
+ }
95
+ catch {
96
+ return trimmed;
97
+ }
98
+ }
99
+ function normalizeNamePrefix(value) {
100
+ const normalized = (value ?? "evermore")
101
+ .toLowerCase()
102
+ .replace(/[^a-z0-9-]+/g, "-")
103
+ .replace(/^-+|-+$/g, "")
104
+ .replace(/-{2,}/g, "-");
105
+ return normalized.length > 0 ? normalized.slice(0, 24) : "evermore";
106
+ }
107
+ function parseDriverConfig(raw) {
108
+ const timeoutMs = Number(raw.timeoutMs ?? DEFAULT_TIMEOUT_MS);
109
+ const sshPort = Number(raw.sshPort ?? 22);
110
+ return {
111
+ apiKey: parseOptionalString(raw.apiKey),
112
+ apiUrl: normalizeApiUrl(parseOptionalString(raw.apiUrl)),
113
+ namePrefix: normalizeNamePrefix(parseOptionalString(raw.namePrefix)),
114
+ image: parseOptionalString(raw.image),
115
+ command: parseOptionalString(raw.command),
116
+ cpu: parseOptionalInteger(raw.cpu),
117
+ memory: parseOptionalString(raw.memory),
118
+ disk: parseOptionalString(raw.disk),
119
+ comment: parseOptionalString(raw.comment),
120
+ env: parseEnvMap(raw.env),
121
+ integrations: parseStringArray(raw.integrations),
122
+ tags: parseStringArray(raw.tags),
123
+ setupScript: parseOptionalString(raw.setupScript),
124
+ prompt: parseOptionalString(raw.prompt),
125
+ timeoutMs: Number.isFinite(timeoutMs) ? Math.trunc(timeoutMs) : DEFAULT_TIMEOUT_MS,
126
+ reuseLease: raw.reuseLease === true,
127
+ sshUser: parseOptionalString(raw.sshUser),
128
+ sshPrivateKey: parseOptionalString(raw.sshPrivateKey),
129
+ sshIdentityFile: parseOptionalString(raw.sshIdentityFile),
130
+ sshPort: Number.isFinite(sshPort) ? Math.trunc(sshPort) : 22,
131
+ strictHostKeyChecking: parseOptionalString(raw.strictHostKeyChecking) ?? "accept-new",
132
+ };
133
+ }
134
+ function resolveApiKey(config) {
135
+ if (config.apiKey)
136
+ return config.apiKey;
137
+ const envApiKey = process.env.EXE_API_KEY?.trim() ?? "";
138
+ if (!envApiKey) {
139
+ throw new Error("exe.dev environments require an API key in config or EXE_API_KEY.");
140
+ }
141
+ return envApiKey;
142
+ }
143
+ function isValidShellEnvKey(value) {
144
+ return /^[A-Za-z_][A-Za-z0-9_]*$/.test(value);
145
+ }
146
+ function shellQuote(value) {
147
+ return `'${value.replace(/'/g, `'"'"'`)}'`;
148
+ }
149
+ function formatErrorMessage(error) {
150
+ return error instanceof Error ? error.message : String(error);
151
+ }
152
+ function buildVmName(config, params) {
153
+ const envPart = params.environmentId.replace(/[^a-z0-9]+/gi, "").slice(0, 8).toLowerCase() || "env";
154
+ const runPart = params.runId.replace(/[^a-z0-9]+/gi, "").slice(0, 8).toLowerCase() || randomUUID().slice(0, 8);
155
+ return `${config.namePrefix}-${envPart}-${runPart}`.slice(0, 63);
156
+ }
157
+ function buildFlag(name, value) {
158
+ if (value == null)
159
+ return [];
160
+ return [`--${name}=${shellQuote(String(value))}`];
161
+ }
162
+ function buildRepeatedFlag(name, values) {
163
+ return values.flatMap((value) => buildFlag(name, value));
164
+ }
165
+ function buildEnvFlags(env) {
166
+ return Object.entries(env).flatMap(([key, value]) => buildFlag("env", `${key}=${value}`));
167
+ }
168
+ function resolveSetupScript(config) {
169
+ if (config.setupScript === null)
170
+ return DEFAULT_SETUP_SCRIPT;
171
+ const trimmed = config.setupScript.trim();
172
+ return trimmed.length > 0 ? config.setupScript : null;
173
+ }
174
+ function buildCreateCommand(config, vmName) {
175
+ return [
176
+ "new",
177
+ "--json",
178
+ "--no-email",
179
+ ...buildFlag("name", vmName),
180
+ ...buildFlag("image", config.image),
181
+ ...buildFlag("command", config.command),
182
+ ...buildFlag("cpu", config.cpu),
183
+ ...buildFlag("memory", config.memory),
184
+ ...buildFlag("disk", config.disk),
185
+ ...buildFlag("comment", config.comment),
186
+ ...buildEnvFlags(config.env),
187
+ ...buildRepeatedFlag("integration", config.integrations),
188
+ ...buildRepeatedFlag("tag", config.tags),
189
+ ...buildFlag("setup-script", resolveSetupScript(config)),
190
+ ...buildFlag("prompt", config.prompt),
191
+ ].join(" ");
192
+ }
193
+ function replaceLiteralAll(input, search, replacement) {
194
+ return search.length === 0 ? input : input.split(search).join(replacement);
195
+ }
196
+ function redactCreateCommand(command, config) {
197
+ let redacted = command;
198
+ for (const [key, value] of Object.entries(config.env)) {
199
+ redacted = replaceLiteralAll(redacted, `--env=${shellQuote(`${key}=${value}`)}`, `--env=${shellQuote(`${key}=[REDACTED]`)}`);
200
+ }
201
+ if (config.prompt) {
202
+ redacted = replaceLiteralAll(redacted, `--prompt=${shellQuote(config.prompt)}`, `--prompt=${shellQuote("[REDACTED]")}`);
203
+ }
204
+ const resolvedSetupScript = resolveSetupScript(config);
205
+ if (resolvedSetupScript && resolvedSetupScript !== DEFAULT_SETUP_SCRIPT) {
206
+ redacted = replaceLiteralAll(redacted, `--setup-script=${shellQuote(resolvedSetupScript)}`, `--setup-script=${shellQuote("[REDACTED]")}`);
207
+ }
208
+ return redacted;
209
+ }
210
+ async function runLifecycleCommand(config, command, logCommand = command) {
211
+ const response = await fetch(config.apiUrl, {
212
+ method: "POST",
213
+ headers: {
214
+ Authorization: `Bearer ${resolveApiKey(config)}`,
215
+ "Content-Type": "text/plain; charset=utf-8",
216
+ },
217
+ body: command,
218
+ signal: AbortSignal.timeout(Math.min(config.timeoutMs, EXE_DEV_API_MAX_TIMEOUT_MS)),
219
+ });
220
+ const body = await response.text();
221
+ if (!response.ok) {
222
+ throw new ExeDevApiError(`exe.dev API command failed (${response.status}) for: ${logCommand}`, response.status, body);
223
+ }
224
+ const trimmed = body.trim();
225
+ if (!trimmed)
226
+ return null;
227
+ try {
228
+ return JSON.parse(trimmed);
229
+ }
230
+ catch {
231
+ return body;
232
+ }
233
+ }
234
+ function parseVmRecord(value, depth = 0) {
235
+ if (depth > MAX_VM_RECORD_DEPTH)
236
+ return null;
237
+ if (!value || typeof value !== "object" || Array.isArray(value))
238
+ return null;
239
+ const record = value;
240
+ const nested = parseVmRecord(record.vm, depth + 1) ?? parseVmRecord(record.data, depth + 1);
241
+ if (nested)
242
+ return nested;
243
+ const name = parseOptionalString(record.vm_name ?? record.name ?? record.vmName);
244
+ const sshDest = parseOptionalString(record.ssh_dest ?? record.sshDest)
245
+ ?? (name ? `${name}.exe.xyz` : null);
246
+ if (!name || !sshDest)
247
+ return null;
248
+ return {
249
+ name,
250
+ sshDest,
251
+ httpsUrl: parseOptionalString(record.https_url ?? record.httpsUrl),
252
+ status: parseOptionalString(record.status),
253
+ region: parseOptionalString(record.region),
254
+ regionDisplay: parseOptionalString(record.region_display ?? record.regionDisplay),
255
+ };
256
+ }
257
+ async function lookupVm(config, vmName) {
258
+ const response = await runLifecycleCommand(config, `ls --json ${shellQuote(vmName)}`);
259
+ const list = Array.isArray(response?.vms)
260
+ ? response.vms
261
+ : Array.isArray(response)
262
+ ? response
263
+ : response
264
+ ? [response]
265
+ : [];
266
+ for (const candidate of list) {
267
+ const parsed = parseVmRecord(candidate);
268
+ if (parsed?.name === vmName || parsed?.sshDest === vmName) {
269
+ return parsed;
270
+ }
271
+ }
272
+ return null;
273
+ }
274
+ async function createVm(config, params) {
275
+ const vmName = "runId" in params
276
+ ? buildVmName(config, params)
277
+ : `${config.namePrefix}-probe-${randomUUID().slice(0, 8)}`.slice(0, 63);
278
+ const command = buildCreateCommand(config, vmName);
279
+ const response = await runLifecycleCommand(config, command, redactCreateCommand(command, config));
280
+ const created = parseVmRecord(response) ?? await lookupVm(config, vmName);
281
+ if (!created) {
282
+ throw new Error(`exe.dev did not return VM metadata for ${vmName}.`);
283
+ }
284
+ return created;
285
+ }
286
+ async function deleteVm(config, vmName) {
287
+ await runLifecycleCommand(config, `rm --json ${shellQuote(vmName)}`);
288
+ }
289
+ function buildSshDestination(config, vm) {
290
+ return config.sshUser ? `${config.sshUser}@${vm.sshDest}` : vm.sshDest;
291
+ }
292
+ function buildSshArgs(config, vm, remoteCommand, sshIdentityFile) {
293
+ const args = [
294
+ "-T",
295
+ "-o",
296
+ "BatchMode=yes",
297
+ "-o",
298
+ `StrictHostKeyChecking=${config.strictHostKeyChecking}`,
299
+ "-o",
300
+ "ConnectTimeout=15",
301
+ "-p",
302
+ String(config.sshPort),
303
+ ];
304
+ if (sshIdentityFile) {
305
+ args.push("-i", sshIdentityFile, "-o", "IdentitiesOnly=yes");
306
+ }
307
+ args.push(buildSshDestination(config, vm), remoteCommand);
308
+ return args;
309
+ }
310
+ async function prepareSshIdentity(config) {
311
+ if (!config.sshPrivateKey) {
312
+ return {
313
+ sshIdentityFile: config.sshIdentityFile,
314
+ cleanup: async () => { },
315
+ };
316
+ }
317
+ const tempDir = await mkdtemp(path.join(tmpdir(), "evermore-exe-dev-ssh-"));
318
+ const sshIdentityFile = path.join(tempDir, "id_ed25519");
319
+ const privateKey = config.sshPrivateKey.endsWith("\n")
320
+ ? config.sshPrivateKey
321
+ : `${config.sshPrivateKey}\n`;
322
+ await writeFile(sshIdentityFile, privateKey, { mode: 0o600 });
323
+ await chmod(sshIdentityFile, 0o600);
324
+ return {
325
+ sshIdentityFile,
326
+ cleanup: async () => {
327
+ await rm(tempDir, { recursive: true, force: true });
328
+ },
329
+ };
330
+ }
331
+ function buildLoginShellScript(input) {
332
+ const env = input.env ?? {};
333
+ for (const key of Object.keys(env)) {
334
+ if (!isValidShellEnvKey(key)) {
335
+ throw new Error(`Invalid exe.dev environment variable key: ${key}`);
336
+ }
337
+ }
338
+ const envArgs = Object.entries(env)
339
+ .filter((entry) => typeof entry[1] === "string")
340
+ .map(([key, value]) => `${key}=${shellQuote(value)}`);
341
+ const commandParts = [shellQuote(input.command), ...input.args.map(shellQuote)].join(" ");
342
+ const finalLine = envArgs.length > 0
343
+ ? `exec env ${envArgs.join(" ")} ${commandParts}`
344
+ : `exec ${commandParts}`;
345
+ const lines = [
346
+ 'if [ -f /etc/profile ]; then . /etc/profile >/dev/null 2>&1 || true; fi',
347
+ 'if [ -f "$HOME/.profile" ]; then . "$HOME/.profile" >/dev/null 2>&1 || true; fi',
348
+ 'if [ -f "$HOME/.bash_profile" ]; then . "$HOME/.bash_profile" >/dev/null 2>&1 || true; elif [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" >/dev/null 2>&1 || true; fi',
349
+ 'if [ -f "$HOME/.zprofile" ]; then . "$HOME/.zprofile" >/dev/null 2>&1 || true; fi',
350
+ 'export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"',
351
+ '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" >/dev/null 2>&1 || true',
352
+ ];
353
+ if (input.cwd) {
354
+ lines.push(`cd ${shellQuote(input.cwd)}`);
355
+ }
356
+ lines.push(finalLine);
357
+ return lines.join(" && ");
358
+ }
359
+ function formatSshFailure(action, vmName, result) {
360
+ const combinedOutput = `${result.stderr}\n${result.stdout}`;
361
+ if (combinedOutput.includes(EXE_DEV_SSH_ONBOARDING_MARKER)
362
+ || combinedOutput.includes(EXE_DEV_SSH_EMAIL_PROMPT)) {
363
+ return [
364
+ `Failed to ${action} exe.dev VM ${vmName}: the Evermore host SSH key is not registered with exe.dev.`,
365
+ "Complete exe.dev's one-time SSH onboarding on this host by running `ssh exe.dev` and following the email verification prompt, then retry.",
366
+ ].join(" ");
367
+ }
368
+ return `Failed to ${action} exe.dev VM ${vmName}: ${result.stderr.trim() || result.stdout.trim() || "unknown error"}`;
369
+ }
370
+ async function runSshCommand(config, vm, remoteCommand, options = {}) {
371
+ const timeoutMs = options.timeoutMs ?? config.timeoutMs;
372
+ const identity = await prepareSshIdentity(config);
373
+ try {
374
+ return await new Promise((resolve, reject) => {
375
+ const child = spawn("ssh", buildSshArgs(config, vm, remoteCommand, identity.sshIdentityFile), {
376
+ stdio: [options.stdin != null ? "pipe" : "ignore", "pipe", "pipe"],
377
+ });
378
+ let stdout = "";
379
+ let stderr = "";
380
+ let timedOut = false;
381
+ let killTimer = null;
382
+ const timer = timeoutMs > 0
383
+ ? setTimeout(() => {
384
+ timedOut = true;
385
+ child.kill("SIGTERM");
386
+ killTimer = setTimeout(() => {
387
+ child.kill("SIGKILL");
388
+ }, SSH_SIGKILL_GRACE_MS);
389
+ }, timeoutMs)
390
+ : null;
391
+ child.stdout?.on("data", (chunk) => {
392
+ stdout += String(chunk);
393
+ });
394
+ child.stderr?.on("data", (chunk) => {
395
+ stderr += String(chunk);
396
+ });
397
+ child.on("error", (error) => {
398
+ if (timer)
399
+ clearTimeout(timer);
400
+ if (killTimer)
401
+ clearTimeout(killTimer);
402
+ reject(error);
403
+ });
404
+ child.on("close", (code, signal) => {
405
+ if (timer)
406
+ clearTimeout(timer);
407
+ if (killTimer)
408
+ clearTimeout(killTimer);
409
+ resolve({
410
+ exitCode: timedOut ? null : code,
411
+ signal,
412
+ timedOut,
413
+ stdout,
414
+ stderr,
415
+ });
416
+ });
417
+ if (options.stdin != null && child.stdin) {
418
+ child.stdin.write(options.stdin);
419
+ child.stdin.end();
420
+ }
421
+ });
422
+ }
423
+ finally {
424
+ await identity.cleanup();
425
+ }
426
+ }
427
+ async function detectRemoteContext(config, vm) {
428
+ const result = await runSshCommand(config, vm, `sh -lc ${shellQuote('home="${HOME:-}"; if [ -z "$home" ]; then home="$(pwd)"; fi; if command -v bash >/dev/null 2>&1; then shell=bash; else shell=sh; fi; printf "%s\\n%s\\n" "$home" "$shell"')}`);
429
+ if (result.timedOut || result.exitCode !== 0) {
430
+ throw new Error(formatSshFailure("inspect", vm.name, result));
431
+ }
432
+ const [homeDirRaw, shellRaw] = result.stdout.split(/\r?\n/);
433
+ const homeDir = homeDirRaw?.trim() || "/tmp";
434
+ return {
435
+ homeDir,
436
+ shellCommand: shellRaw?.trim() === "bash" ? "bash" : "sh",
437
+ };
438
+ }
439
+ async function ensureRemoteWorkspace(config, vm, remoteCwd) {
440
+ const result = await runSshCommand(config, vm, `sh -lc ${shellQuote(`mkdir -p ${shellQuote(remoteCwd)}`)}`);
441
+ if (result.timedOut || result.exitCode !== 0) {
442
+ throw new Error(formatSshFailure("create workspace for", vm.name, result));
443
+ }
444
+ }
445
+ async function buildLease(config, vm, requestedCwd, resumedLease) {
446
+ const remote = await detectRemoteContext(config, vm);
447
+ const remoteCwd = requestedCwd?.trim() || path.posix.join(remote.homeDir, "evermore-workspace");
448
+ await ensureRemoteWorkspace(config, vm, remoteCwd);
449
+ return {
450
+ providerLeaseId: vm.name,
451
+ metadata: {
452
+ provider: "exe-dev",
453
+ vmName: vm.name,
454
+ sshDest: vm.sshDest,
455
+ httpsUrl: vm.httpsUrl,
456
+ region: vm.region,
457
+ regionDisplay: vm.regionDisplay,
458
+ shellCommand: remote.shellCommand,
459
+ remoteCwd,
460
+ timeoutMs: config.timeoutMs,
461
+ reuseLease: config.reuseLease,
462
+ resumedLease,
463
+ },
464
+ };
465
+ }
466
+ function metadataVmRecord(params) {
467
+ if (!params.providerLeaseId)
468
+ return null;
469
+ const sshDest = parseOptionalString(params.leaseMetadata?.sshDest) ?? `${params.providerLeaseId}.exe.xyz`;
470
+ return {
471
+ name: params.providerLeaseId,
472
+ sshDest,
473
+ httpsUrl: parseOptionalString(params.leaseMetadata?.httpsUrl),
474
+ status: parseOptionalString(params.leaseMetadata?.status),
475
+ region: parseOptionalString(params.leaseMetadata?.region),
476
+ regionDisplay: parseOptionalString(params.leaseMetadata?.regionDisplay),
477
+ };
478
+ }
479
+ const plugin = definePlugin({
480
+ async setup(ctx) {
481
+ ctx.logger.info("exe.dev sandbox provider plugin ready");
482
+ },
483
+ async onHealth() {
484
+ return { status: "ok", message: "exe.dev sandbox provider plugin healthy" };
485
+ },
486
+ async onEnvironmentValidateConfig(params) {
487
+ const config = parseDriverConfig(params.config);
488
+ const errors = [];
489
+ const warnings = [];
490
+ if (config.apiUrl && !isValidUrl(config.apiUrl)) {
491
+ errors.push("apiUrl must be a valid URL.");
492
+ }
493
+ if (config.timeoutMs < 1 || config.timeoutMs > 86_400_000) {
494
+ errors.push("timeoutMs must be between 1 and 86400000.");
495
+ }
496
+ if (config.cpu != null && config.cpu <= 0) {
497
+ errors.push("cpu must be greater than 0 when provided.");
498
+ }
499
+ if (config.sshPort < 1 || config.sshPort > 65_535) {
500
+ errors.push("sshPort must be between 1 and 65535.");
501
+ }
502
+ if (!config.apiKey && !(process.env.EXE_API_KEY?.trim())) {
503
+ errors.push("exe.dev environments require an API key in config or EXE_API_KEY.");
504
+ }
505
+ for (const key of Object.keys(config.env)) {
506
+ if (!isValidShellEnvKey(key)) {
507
+ errors.push(`env contains an invalid key: ${key}`);
508
+ }
509
+ }
510
+ if (typeof params.config.strictHostKeyChecking === "string" &&
511
+ params.config.strictHostKeyChecking.trim().length === 0) {
512
+ errors.push("strictHostKeyChecking cannot be empty.");
513
+ }
514
+ warnings.push("The Evermore host must have SSH access to the created exe.dev VM, and its SSH key must be registered with exe.dev. The API token only covers provisioning.");
515
+ if (config.reuseLease) {
516
+ warnings.push("reuseLease keeps the VM alive between runs; this provider does not suspend retained VMs.");
517
+ }
518
+ if (errors.length > 0) {
519
+ return { ok: false, errors, warnings };
520
+ }
521
+ return {
522
+ ok: true,
523
+ warnings,
524
+ normalizedConfig: { ...config },
525
+ };
526
+ },
527
+ async onEnvironmentProbe(params) {
528
+ const config = parseDriverConfig(params.config);
529
+ let vm = null;
530
+ try {
531
+ vm = await createVm(config, params);
532
+ const lease = await buildLease(config, vm, undefined, false);
533
+ return {
534
+ ok: true,
535
+ summary: `Connected to exe.dev VM ${vm.name}.`,
536
+ metadata: {
537
+ provider: "exe-dev",
538
+ vmName: vm.name,
539
+ sshDest: vm.sshDest,
540
+ timeoutMs: config.timeoutMs,
541
+ reuseLease: config.reuseLease,
542
+ remoteCwd: lease.metadata?.remoteCwd,
543
+ shellCommand: lease.metadata?.shellCommand,
544
+ },
545
+ };
546
+ }
547
+ catch (error) {
548
+ return {
549
+ ok: false,
550
+ summary: "exe.dev environment probe failed.",
551
+ metadata: {
552
+ provider: "exe-dev",
553
+ timeoutMs: config.timeoutMs,
554
+ reuseLease: config.reuseLease,
555
+ error: formatErrorMessage(error),
556
+ },
557
+ };
558
+ }
559
+ finally {
560
+ if (vm) {
561
+ await deleteVm(config, vm.name).catch(() => undefined);
562
+ }
563
+ }
564
+ },
565
+ async onEnvironmentAcquireLease(params) {
566
+ const config = parseDriverConfig(params.config);
567
+ const vm = await createVm(config, params);
568
+ try {
569
+ return await buildLease(config, vm, params.requestedCwd, false);
570
+ }
571
+ catch (error) {
572
+ await deleteVm(config, vm.name).catch(() => undefined);
573
+ throw error;
574
+ }
575
+ },
576
+ async onEnvironmentResumeLease(params) {
577
+ const config = parseDriverConfig(params.config);
578
+ const vm = await lookupVm(config, params.providerLeaseId);
579
+ if (!vm) {
580
+ return { providerLeaseId: null, metadata: { expired: true } };
581
+ }
582
+ const requestedCwd = parseOptionalString(params.leaseMetadata?.remoteCwd);
583
+ return await buildLease(config, vm, requestedCwd ?? undefined, true);
584
+ },
585
+ async onEnvironmentReleaseLease(params) {
586
+ if (!params.providerLeaseId)
587
+ return;
588
+ const config = parseDriverConfig(params.config);
589
+ if (config.reuseLease)
590
+ return;
591
+ await deleteVm(config, params.providerLeaseId);
592
+ },
593
+ async onEnvironmentDestroyLease(params) {
594
+ if (!params.providerLeaseId)
595
+ return;
596
+ const config = parseDriverConfig(params.config);
597
+ await deleteVm(config, params.providerLeaseId);
598
+ },
599
+ async onEnvironmentRealizeWorkspace(params) {
600
+ const config = parseDriverConfig(params.config);
601
+ const remoteCwd = parseOptionalString(params.lease.metadata?.remoteCwd)
602
+ ?? params.workspace.remotePath
603
+ ?? params.workspace.localPath
604
+ ?? "/tmp/evermore-workspace";
605
+ const vm = metadataVmRecord({
606
+ providerLeaseId: params.lease.providerLeaseId,
607
+ leaseMetadata: params.lease.metadata,
608
+ });
609
+ if (vm) {
610
+ await ensureRemoteWorkspace(config, vm, remoteCwd);
611
+ }
612
+ return {
613
+ cwd: remoteCwd,
614
+ metadata: {
615
+ provider: "exe-dev",
616
+ remoteCwd,
617
+ },
618
+ };
619
+ },
620
+ async onEnvironmentExecute(params) {
621
+ if (!params.lease.providerLeaseId) {
622
+ return {
623
+ exitCode: 1,
624
+ signal: null,
625
+ timedOut: false,
626
+ stdout: "",
627
+ stderr: "No provider lease ID available for execution.",
628
+ };
629
+ }
630
+ const config = parseDriverConfig(params.config);
631
+ const vm = metadataVmRecord({
632
+ providerLeaseId: params.lease.providerLeaseId,
633
+ leaseMetadata: params.lease.metadata,
634
+ });
635
+ if (!vm) {
636
+ return {
637
+ exitCode: 1,
638
+ signal: null,
639
+ timedOut: false,
640
+ stdout: "",
641
+ stderr: "No exe.dev VM metadata available for execution.",
642
+ };
643
+ }
644
+ const command = buildLoginShellScript({
645
+ command: params.command,
646
+ args: params.args ?? [],
647
+ cwd: params.cwd ?? parseOptionalString(params.lease.metadata?.remoteCwd) ?? undefined,
648
+ env: params.env,
649
+ });
650
+ // `buildLoginShellScript` already explicitly sources `/etc/profile`,
651
+ // `~/.profile`, `~/.bash_profile`/`~/.bashrc`, and `~/.zprofile`. Wrapping
652
+ // the result in `sh -lc` (login shell) would source the same files a
653
+ // second time, which can cause `PATH` duplication or unexpected behavior
654
+ // on VMs whose profile init isn't idempotent. Use `sh -c` here so the
655
+ // explicit sourcing inside the script is the single source of truth.
656
+ const result = await runSshCommand(config, vm, `sh -c ${shellQuote(command)}`, { stdin: params.stdin, timeoutMs: params.timeoutMs ?? config.timeoutMs });
657
+ return {
658
+ exitCode: result.exitCode,
659
+ signal: result.signal,
660
+ timedOut: result.timedOut,
661
+ stdout: result.stdout,
662
+ stderr: !result.timedOut && result.exitCode !== 0
663
+ ? formatSshFailure("execute commands on", vm.name, result)
664
+ : result.stderr,
665
+ metadata: {
666
+ provider: "exe-dev",
667
+ vmName: vm.name,
668
+ sshDest: vm.sshDest,
669
+ },
670
+ };
671
+ },
672
+ });
673
+ export default plugin;
674
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AA0DzD,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAC/C,MAAM,kBAAkB,GAAG,OAAO,CAAC;AACnC,MAAM,0BAA0B,GAAG,MAAM,CAAC;AAC1C,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,6BAA6B,GAAG,sDAAsD,CAAC;AAC7F,MAAM,wBAAwB,GAAG,kCAAkC,CAAC;AAEpE,sFAAsF;AACtF,mFAAmF;AACnF,oFAAoF;AACpF,uFAAuF;AACvF,mEAA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QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;gBACvC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;gBAC1D,CAAC,CAAC,MAAM,CAAC,MAAM;YACnB,QAAQ,EAAE;gBACR,QAAQ,EAAE,SAAS;gBACnB,MAAM,EAAE,EAAE,CAAC,IAAI;gBACf,OAAO,EAAE,EAAE,CAAC,OAAO;aACpB;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ import plugin from "./plugin.js";
2
+ export default plugin;
3
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe,MAAM,CAAC"}
package/dist/worker.js ADDED
@@ -0,0 +1,5 @@
1
+ import { runWorker } from "@evermore.work/plugin-sdk";
2
+ import plugin from "./plugin.js";
3
+ export default plugin;
4
+ runWorker(plugin, import.meta.url);
5
+ //# sourceMappingURL=worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe,MAAM,CAAC;AACtB,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@evermore.work/plugin-exe-dev",
3
+ "version": "0.1.0",
4
+ "description": "exe.dev sandbox provider plugin for Evermore environments",
5
+ "homepage": "https://github.com/phuctm97/evermore",
6
+ "bugs": {
7
+ "url": "https://github.com/phuctm97/evermore/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/phuctm97/evermore",
12
+ "directory": "packages/plugins/sandbox-providers/exe-dev"
13
+ },
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js"
29
+ }
30
+ },
31
+ "main": "./dist/index.js",
32
+ "types": "./dist/index.d.ts"
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "evermorePlugin": {
38
+ "manifest": "./dist/manifest.js",
39
+ "worker": "./dist/worker.js"
40
+ },
41
+ "keywords": [
42
+ "evermore",
43
+ "plugin",
44
+ "sandbox",
45
+ "exe.dev"
46
+ ],
47
+ "dependencies": {
48
+ "@evermore.work/plugin-sdk": "1.0.0"
49
+ }
50
+ }