@paperclipai/plugin-e2b 2026.425.0-canary.5

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Paperclip AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # `@paperclipai/plugin-e2b`
2
+
3
+ Published E2B sandbox provider plugin for Paperclip.
4
+
5
+ This package lives in the Paperclip monorepo, but it is intentionally excluded from the root `pnpm` workspace and shaped to publish and install like a standalone npm package. That means operators can install it from the Plugins page by package name, and the host will fetch its transitive dependencies at install time without adding lockfile churn to the Paperclip repo.
6
+
7
+ ## Install
8
+
9
+ From a Paperclip instance, install:
10
+
11
+ ```text
12
+ @paperclipai/plugin-e2b
13
+ ```
14
+
15
+ The host plugin installer runs `npm install` into the managed plugin directory, so package dependencies such as `e2b` are pulled in during installation.
16
+
17
+ ## Local development
18
+
19
+ ```bash
20
+ cd packages/plugins/sandbox-providers/e2b
21
+ pnpm install --ignore-workspace --no-lockfile
22
+ pnpm build
23
+ pnpm test
24
+ pnpm typecheck
25
+ ```
26
+
27
+ These commands assume the repo root has already been installed once so the local `@paperclipai/plugin-sdk` workspace package is available to the compiler during development.
28
+
29
+ ## Package layout
30
+
31
+ - `src/manifest.ts` declares the sandbox-provider driver metadata
32
+ - `src/plugin.ts` implements the environment lifecycle hooks
33
+ - `paperclipPlugin.manifest` and `paperclipPlugin.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 { PaperclipPluginManifestV1 } from "@paperclipai/plugin-sdk";
2
+ declare const manifest: PaperclipPluginManifestV1;
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,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAKzE,QAAA,MAAM,QAAQ,EAAE,yBAiDf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,51 @@
1
+ const PLUGIN_ID = "paperclip.e2b-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: "E2B Sandbox Provider",
8
+ description: "First-party sandbox provider plugin that provisions E2B cloud sandboxes as Paperclip execution environments.",
9
+ author: "Paperclip",
10
+ categories: ["automation"],
11
+ capabilities: ["environment.drivers.register"],
12
+ entrypoints: {
13
+ worker: "./dist/worker.js",
14
+ },
15
+ environmentDrivers: [
16
+ {
17
+ driverKey: "e2b",
18
+ kind: "sandbox_provider",
19
+ displayName: "E2B Cloud Sandbox",
20
+ description: "Provisions E2B cloud sandboxes with configurable templates, timeouts, and lease reuse.",
21
+ configSchema: {
22
+ type: "object",
23
+ properties: {
24
+ template: {
25
+ type: "string",
26
+ description: "E2B sandbox template name.",
27
+ default: "base",
28
+ },
29
+ apiKey: {
30
+ type: "string",
31
+ format: "secret-ref",
32
+ description: "Paperclip secret reference for the E2B API key. Falls back to E2B_API_KEY if omitted.",
33
+ },
34
+ timeoutMs: {
35
+ type: "number",
36
+ description: "Sandbox timeout in milliseconds.",
37
+ default: 300000,
38
+ },
39
+ reuseLease: {
40
+ type: "boolean",
41
+ description: "Whether to pause and reuse sandboxes across runs.",
42
+ default: false,
43
+ },
44
+ },
45
+ required: ["template"],
46
+ },
47
+ },
48
+ ],
49
+ };
50
+ export default manifest;
51
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,gCAAgC,CAAC;AACnD,MAAM,cAAc,GAAG,OAAO,CAAC;AAE/B,MAAM,QAAQ,GAA8B;IAC1C,EAAE,EAAE,SAAS;IACb,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EACT,8GAA8G;IAChH,MAAM,EAAE,WAAW;IACnB,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,KAAK;YAChB,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,mBAAmB;YAChC,WAAW,EACT,wFAAwF;YAC1F,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,4BAA4B;wBACzC,OAAO,EAAE,MAAM;qBAChB;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,YAAY;wBACpB,WAAW,EACT,uFAAuF;qBAC1F;oBACD,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,kCAAkC;wBAC/C,OAAO,EAAE,MAAM;qBAChB;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,mDAAmD;wBAChE,OAAO,EAAE,KAAK;qBACf;iBACF;gBACD,QAAQ,EAAE,CAAC,UAAU,CAAC;aACvB;SACF;KACF;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const plugin: import("@paperclipai/plugin-sdk").PaperclipPlugin;
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":"AA6IA,QAAA,MAAM,MAAM,mDAmOV,CAAC;AAEH,eAAe,MAAM,CAAC"}
package/dist/plugin.js ADDED
@@ -0,0 +1,300 @@
1
+ import path from "node:path";
2
+ import { CommandExitError, Sandbox, SandboxNotFoundError, TimeoutError } from "e2b";
3
+ import { definePlugin } from "@paperclipai/plugin-sdk";
4
+ function parseDriverConfig(raw) {
5
+ const template = typeof raw.template === "string" && raw.template.trim().length > 0
6
+ ? raw.template.trim()
7
+ : "base";
8
+ const timeoutMs = Number(raw.timeoutMs ?? 300_000);
9
+ return {
10
+ template,
11
+ apiKey: typeof raw.apiKey === "string" && raw.apiKey.trim().length > 0 ? raw.apiKey.trim() : null,
12
+ timeoutMs: Number.isFinite(timeoutMs) ? Math.trunc(timeoutMs) : 300_000,
13
+ reuseLease: raw.reuseLease === true,
14
+ };
15
+ }
16
+ function resolveApiKey(config) {
17
+ if (config.apiKey) {
18
+ return config.apiKey;
19
+ }
20
+ const envApiKey = process.env.E2B_API_KEY?.trim() ?? "";
21
+ if (!envApiKey) {
22
+ throw new Error("E2B sandbox environments require an API key in config or E2B_API_KEY.");
23
+ }
24
+ return envApiKey;
25
+ }
26
+ async function createSandbox(config) {
27
+ const options = {
28
+ apiKey: resolveApiKey(config),
29
+ timeoutMs: config.timeoutMs,
30
+ metadata: {
31
+ paperclipProvider: "e2b",
32
+ },
33
+ };
34
+ return await Sandbox.create(config.template, options);
35
+ }
36
+ function formatErrorMessage(error) {
37
+ return error instanceof Error ? error.message : String(error);
38
+ }
39
+ async function ensureSandboxWorkspace(sandbox, remoteCwd) {
40
+ await sandbox.commands.run(`mkdir -p ${shellQuote(remoteCwd)}`);
41
+ }
42
+ async function resolveSandboxWorkingDirectory(sandbox) {
43
+ const result = await sandbox.commands.run("pwd");
44
+ const cwd = result.stdout.trim();
45
+ const remoteCwd = path.posix.join(cwd.length > 0 ? cwd : "/", "paperclip-workspace");
46
+ await ensureSandboxWorkspace(sandbox, remoteCwd);
47
+ return remoteCwd;
48
+ }
49
+ async function connectSandbox(config, providerLeaseId) {
50
+ return await Sandbox.connect(providerLeaseId, {
51
+ apiKey: resolveApiKey(config),
52
+ timeoutMs: config.timeoutMs,
53
+ });
54
+ }
55
+ async function connectForCleanup(config, providerLeaseId) {
56
+ try {
57
+ return await connectSandbox(config, providerLeaseId);
58
+ }
59
+ catch (error) {
60
+ if (error instanceof SandboxNotFoundError)
61
+ return null;
62
+ throw error;
63
+ }
64
+ }
65
+ function leaseMetadata(input) {
66
+ return {
67
+ provider: "e2b",
68
+ template: input.config.template,
69
+ timeoutMs: input.config.timeoutMs,
70
+ reuseLease: input.config.reuseLease,
71
+ sandboxId: input.sandbox.sandboxId,
72
+ sandboxDomain: input.sandbox.sandboxDomain,
73
+ remoteCwd: input.remoteCwd,
74
+ resumedLease: input.resumedLease,
75
+ };
76
+ }
77
+ function shellQuote(value) {
78
+ return `'${value.replace(/'/g, `'"'"'`)}'`;
79
+ }
80
+ function buildCommandLine(command, args = []) {
81
+ return `exec ${[command, ...args].map(shellQuote).join(" ")}`;
82
+ }
83
+ async function killSandboxBestEffort(sandbox, reason) {
84
+ await sandbox.kill().catch((error) => {
85
+ console.warn(`Failed to kill E2B sandbox during ${reason}: ${formatErrorMessage(error)}`);
86
+ });
87
+ }
88
+ async function releaseSandboxBestEffort(sandbox, reuseLease) {
89
+ if (!reuseLease) {
90
+ await killSandboxBestEffort(sandbox, "lease release");
91
+ return;
92
+ }
93
+ try {
94
+ await sandbox.pause();
95
+ }
96
+ catch (error) {
97
+ console.warn(`Failed to pause E2B sandbox during lease release: ${formatErrorMessage(error)}. Attempting kill instead.`);
98
+ await killSandboxBestEffort(sandbox, "lease release fallback cleanup");
99
+ }
100
+ }
101
+ const plugin = definePlugin({
102
+ async setup(ctx) {
103
+ ctx.logger.info("E2B sandbox provider plugin ready");
104
+ },
105
+ async onHealth() {
106
+ return { status: "ok", message: "E2B sandbox provider plugin healthy" };
107
+ },
108
+ async onEnvironmentValidateConfig(params) {
109
+ const config = parseDriverConfig(params.config);
110
+ const errors = [];
111
+ if (typeof params.config.template === "string" && params.config.template.trim().length === 0) {
112
+ errors.push("E2B sandbox environments require a template.");
113
+ }
114
+ if (config.timeoutMs < 1 || config.timeoutMs > 86_400_000) {
115
+ errors.push("timeoutMs must be between 1 and 86400000.");
116
+ }
117
+ if (errors.length > 0) {
118
+ return { ok: false, errors };
119
+ }
120
+ return {
121
+ ok: true,
122
+ normalizedConfig: { ...config },
123
+ };
124
+ },
125
+ async onEnvironmentProbe(params) {
126
+ const config = parseDriverConfig(params.config);
127
+ try {
128
+ const sandbox = await createSandbox(config);
129
+ try {
130
+ await sandbox.setTimeout(config.timeoutMs);
131
+ const remoteCwd = await resolveSandboxWorkingDirectory(sandbox);
132
+ return {
133
+ ok: true,
134
+ summary: `Connected to E2B sandbox template ${config.template}.`,
135
+ metadata: {
136
+ provider: "e2b",
137
+ template: config.template,
138
+ timeoutMs: config.timeoutMs,
139
+ reuseLease: config.reuseLease,
140
+ sandboxId: sandbox.sandboxId,
141
+ sandboxDomain: sandbox.sandboxDomain,
142
+ remoteCwd,
143
+ },
144
+ };
145
+ }
146
+ finally {
147
+ await sandbox.kill().catch(() => undefined);
148
+ }
149
+ }
150
+ catch (error) {
151
+ const message = error instanceof Error ? error.message : String(error);
152
+ return {
153
+ ok: false,
154
+ summary: `E2B sandbox probe failed for template ${config.template}.`,
155
+ metadata: {
156
+ provider: "e2b",
157
+ template: config.template,
158
+ timeoutMs: config.timeoutMs,
159
+ reuseLease: config.reuseLease,
160
+ error: message,
161
+ },
162
+ };
163
+ }
164
+ },
165
+ async onEnvironmentAcquireLease(params) {
166
+ const config = parseDriverConfig(params.config);
167
+ const sandbox = await createSandbox(config);
168
+ try {
169
+ await sandbox.setTimeout(config.timeoutMs);
170
+ const remoteCwd = await resolveSandboxWorkingDirectory(sandbox);
171
+ return {
172
+ providerLeaseId: sandbox.sandboxId,
173
+ metadata: leaseMetadata({ config, sandbox, remoteCwd, resumedLease: false }),
174
+ };
175
+ }
176
+ catch (error) {
177
+ await sandbox.kill().catch(() => undefined);
178
+ throw error;
179
+ }
180
+ },
181
+ async onEnvironmentResumeLease(params) {
182
+ const config = parseDriverConfig(params.config);
183
+ try {
184
+ const sandbox = await connectSandbox(config, params.providerLeaseId);
185
+ try {
186
+ await sandbox.setTimeout(config.timeoutMs);
187
+ const remoteCwd = await resolveSandboxWorkingDirectory(sandbox);
188
+ return {
189
+ providerLeaseId: sandbox.sandboxId,
190
+ metadata: leaseMetadata({ config, sandbox, remoteCwd, resumedLease: true }),
191
+ };
192
+ }
193
+ catch (error) {
194
+ await sandbox.kill().catch(() => undefined);
195
+ throw error;
196
+ }
197
+ }
198
+ catch (error) {
199
+ if (error instanceof SandboxNotFoundError) {
200
+ return { providerLeaseId: null, metadata: { expired: true } };
201
+ }
202
+ throw error;
203
+ }
204
+ },
205
+ async onEnvironmentReleaseLease(params) {
206
+ if (!params.providerLeaseId)
207
+ return;
208
+ const config = parseDriverConfig(params.config);
209
+ const sandbox = await connectForCleanup(config, params.providerLeaseId);
210
+ if (!sandbox)
211
+ return;
212
+ await releaseSandboxBestEffort(sandbox, config.reuseLease);
213
+ },
214
+ async onEnvironmentDestroyLease(params) {
215
+ if (!params.providerLeaseId)
216
+ return;
217
+ const config = parseDriverConfig(params.config);
218
+ const sandbox = await connectForCleanup(config, params.providerLeaseId);
219
+ if (!sandbox)
220
+ return;
221
+ await killSandboxBestEffort(sandbox, "lease destroy");
222
+ },
223
+ async onEnvironmentRealizeWorkspace(params) {
224
+ const config = parseDriverConfig(params.config);
225
+ const remoteCwd = typeof params.lease.metadata?.remoteCwd === "string" &&
226
+ params.lease.metadata.remoteCwd.trim().length > 0
227
+ ? params.lease.metadata.remoteCwd.trim()
228
+ : params.workspace.remotePath ?? params.workspace.localPath ?? "/paperclip-workspace";
229
+ if (params.lease.providerLeaseId) {
230
+ const sandbox = await connectSandbox(config, params.lease.providerLeaseId);
231
+ await ensureSandboxWorkspace(sandbox, remoteCwd);
232
+ }
233
+ return {
234
+ cwd: remoteCwd,
235
+ metadata: {
236
+ provider: "e2b",
237
+ remoteCwd,
238
+ },
239
+ };
240
+ },
241
+ async onEnvironmentExecute(params) {
242
+ if (!params.lease.providerLeaseId) {
243
+ return {
244
+ exitCode: 1,
245
+ timedOut: false,
246
+ stdout: "",
247
+ stderr: "No provider lease ID available for execution.",
248
+ };
249
+ }
250
+ const config = parseDriverConfig(params.config);
251
+ const sandbox = await connectSandbox(config, params.lease.providerLeaseId);
252
+ const started = await sandbox.commands.run(buildCommandLine(params.command, params.args), {
253
+ background: true,
254
+ stdin: params.stdin != null,
255
+ cwd: params.cwd,
256
+ envs: params.env,
257
+ timeoutMs: params.timeoutMs ?? config.timeoutMs,
258
+ });
259
+ try {
260
+ if (params.stdin != null) {
261
+ try {
262
+ await sandbox.commands.sendStdin(started.pid, params.stdin);
263
+ }
264
+ finally {
265
+ await sandbox.commands.closeStdin(started.pid);
266
+ }
267
+ }
268
+ const result = await started.wait();
269
+ return {
270
+ exitCode: result.exitCode,
271
+ timedOut: false,
272
+ stdout: result.stdout,
273
+ stderr: result.stderr,
274
+ };
275
+ }
276
+ catch (error) {
277
+ if (error instanceof CommandExitError) {
278
+ const commandError = error;
279
+ return {
280
+ exitCode: commandError.exitCode,
281
+ timedOut: false,
282
+ stdout: commandError.stdout,
283
+ stderr: commandError.stderr,
284
+ };
285
+ }
286
+ if (error instanceof TimeoutError) {
287
+ const timeoutError = error;
288
+ return {
289
+ exitCode: null,
290
+ timedOut: true,
291
+ stdout: started.stdout,
292
+ stderr: started.stderr || `${timeoutError.message}\n`,
293
+ };
294
+ }
295
+ throw error;
296
+ }
297
+ },
298
+ });
299
+ export default plugin;
300
+ //# 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,gBAAgB,EAAE,OAAO,EAAE,oBAAoB,EAAE,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oBACf,MAAM,EAAE,YAAY,CAAC,MAAM;oBAC3B,MAAM,EAAE,YAAY,CAAC,MAAM;iBAC5B,CAAC;YACJ,CAAC;YACD,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;gBAClC,MAAM,YAAY,GAAG,KAAqB,CAAC;gBAC3C,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,IAAI;oBACd,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,IAAI;iBACtD,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,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 "@paperclipai/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,yBAAyB,CAAC;AACpD,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,44 @@
1
+ {
2
+ "name": "@paperclipai/plugin-e2b",
3
+ "version": "2026.425.0-canary.5",
4
+ "description": "E2B sandbox provider plugin for Paperclip environments",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/paperclipai/paperclip",
7
+ "bugs": {
8
+ "url": "https://github.com/paperclipai/paperclip/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/paperclipai/paperclip",
13
+ "directory": "packages/plugins/sandbox-providers/e2b"
14
+ },
15
+ "type": "module",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ }
21
+ },
22
+ "main": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "paperclipPlugin": {
31
+ "manifest": "./dist/manifest.js",
32
+ "worker": "./dist/worker.js"
33
+ },
34
+ "keywords": [
35
+ "paperclip",
36
+ "plugin",
37
+ "sandbox",
38
+ "e2b"
39
+ ],
40
+ "dependencies": {
41
+ "e2b": "^2.19.0",
42
+ "@paperclipai/plugin-sdk": "2026.425.0-canary.5"
43
+ }
44
+ }