diff --git a/packages/plugins/sandbox-providers/e2b/src/manifest.ts b/packages/plugins/sandbox-providers/e2b/src/manifest.ts index 0a8af014..11b23590 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 3cb1764b..71e36b91 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",