Skip to content

The open-source app everyone uses to manage agents at work

plugins: make e2b template default explicit (#4901)

Devin Foleyd2dd759caa75
diff --git a/packages/plugins/sandbox-providers/e2b/src/manifest.ts b/packages/plugins/sandbox-providers/e2b/src/manifest.ts
index 0a8af014f1..11b235909b 100644
--- a/packages/plugins/sandbox-providers/e2b/src/manifest.ts
+++ b/packages/plugins/sandbox-providers/e2b/src/manifest.ts
@@ -28,7 +28,7 @@ const manifest: PaperclipPluginManifestV1 = {
properties: {
template: {
type: "string",
- description: "E2B sandbox template name.",
+ description: "E2B sandbox template name. Defaults to base when omitted.",
default: "base",
},
apiKey: {
@@ -48,7 +48,6 @@ const manifest: PaperclipPluginManifestV1 = {
default: false,
},
},
- required: ["template"],
},
},
],
diff --git a/packages/plugins/sandbox-providers/e2b/src/plugin.test.ts b/packages/plugins/sandbox-providers/e2b/src/plugin.test.ts
index 3cb1764ba2..71e36b91bb 100644
--- a/packages/plugins/sandbox-providers/e2b/src/plugin.test.ts
+++ b/packages/plugins/sandbox-providers/e2b/src/plugin.test.ts
@@ -131,6 +131,26 @@ describe("E2B sandbox provider plugin", () => {
});
});
+ it("defaults a missing template to base", async () => {
+ const result = await plugin.definition.onEnvironmentValidateConfig?.({
+ driverKey: "e2b",
+ config: {
+ timeoutMs: "450000.9",
+ reuseLease: true,
+ },
+ });
+
+ expect(result).toEqual({
+ ok: true,
+ normalizedConfig: {
+ template: "base",
+ apiKey: null,
+ timeoutMs: 450000,
+ reuseLease: true,
+ },
+ });
+ });
+
it("rejects empty template strings instead of silently normalizing them", async () => {
await expect(plugin.definition.onEnvironmentValidateConfig?.({
driverKey: "e2b",