Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

chore: clean release-age exclusions and use stable sandbox (#3463)

Andrew Barba9bff372d6fb4
diff --git a/.changeset/stable-sandbox-drives.md b/.changeset/stable-sandbox-drives.md
new file mode 100644
index 000000000..5fdffb910
--- /dev/null
+++ b/.changeset/stable-sandbox-drives.md
@@ -0,0 +1,5 @@
+---
+"eve": minor
+---
+
+Use stable `@vercel/sandbox` v3.3 for Drive support instead of the obsolete beta alias. Vercel sandbox mount types now follow the stable SDK, including `snapshot` mounts.
diff --git a/packages/eve/extension-contracts/compatibility/channel/v23.ts b/packages/eve/extension-contracts/compatibility/channel/v23.ts
new file mode 100644
index 000000000..9657836a3
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/channel/v23.ts
@@ -0,0 +1,10 @@
+import { defineChannel, POST } from "#public/channels/index.js";
+
+export default defineChannel({
+ routes: [
+ POST("/continue/:sessionId", async (_request, { attachSession, params }) => {
+ const result = await attachSession(params.sessionId!).send("Continue.", { auth: null });
+ return Response.json({ accepted: result.status === "accepted" });
+ }),
+ ],
+});
diff --git a/packages/eve/extension-contracts/compatibility/connection/v20.ts b/packages/eve/extension-contracts/compatibility/connection/v20.ts
new file mode 100644
index 000000000..33b0b55a5
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/connection/v20.ts
@@ -0,0 +1,13 @@
+import { defineDynamic, defineMcpClientConnection } from "#public/connections/index.js";
+
+export default defineDynamic({
+ events: {
+ "turn.started": (_event, ctx) =>
+ ctx.session.auth.current === null
+ ? null
+ : defineMcpClientConnection({
+ description: "Read the authenticated support queue.",
+ url: "https://support.example.com/mcp",
+ }),
+ },
+});
diff --git a/packages/eve/extension-contracts/compatibility/dynamicTool/v43.ts b/packages/eve/extension-contracts/compatibility/dynamicTool/v43.ts
new file mode 100644
index 000000000..578502415
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/dynamicTool/v43.ts
@@ -0,0 +1,9 @@
+import { autoModel } from "#public/experimental/evaluate/index.js";
+
+export default autoModel({
+ model: "typesafe-ai/jev-latest",
+ options: {
+ "openai/gpt-5.6-sol": "Difficult reasoning and engineering tasks",
+ "openai/gpt-5.6-luna": "Routine tasks where fast completion matters",
+ },
+});
diff --git a/packages/eve/extension-contracts/compatibility/hook/v22.ts b/packages/eve/extension-contracts/compatibility/hook/v22.ts
new file mode 100644
index 000000000..0c142b202
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/hook/v22.ts
@@ -0,0 +1,9 @@
+import { defineHook } from "#public/hooks/index.js";
+
+export default defineHook({
+ events: {
+ "turn.started"(event, ctx) {
+ console.info(event.meta.id, event.data.turnId, ctx.session.id);
+ },
+ },
+});
diff --git a/packages/eve/extension-contracts/compatibility/state/v5.ts b/packages/eve/extension-contracts/compatibility/state/v5.ts
new file mode 100644
index 000000000..ce8917780
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/state/v5.ts
@@ -0,0 +1,10 @@
+import { defineState } from "#public/context/index.js";
+
+export const budget = defineState("compatibility.budget", () => ({
+ count: 0,
+ limit: 10,
+}));
+
+export function recordUsage(): void {
+ budget.update((current) => ({ ...current, count: current.count + 1 }));
+}
diff --git a/packages/eve/extension-contracts/compatibility/tool/v45.ts b/packages/eve/extension-contracts/compatibility/tool/v45.ts
new file mode 100644
index 000000000..1db59d3f9
--- /dev/null
+++ b/packages/eve/extension-contracts/compatibility/tool/v45.ts
@@ -0,0 +1,10 @@
+import { defineTool } from "#public/tools/index.js";
+
+export default defineTool({
+ description: "Inspect the current sandbox.",
+ inputSchema: { type: "object", properties: {}, additionalProperties: false },
+ async execute(_input, ctx) {
+ const sandbox = await ctx.getSandbox();
+ return { sandboxAvailable: sandbox !== undefined };
+ },
+});
diff --git a/packages/eve/extension-contracts/reports/channel/v24.json b/packages/eve/extension-contracts/reports/channel/v24.json
new file mode 100644
index 000000000..ed9dd31be
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/channel/v24.json
@@ -0,0 +1,21 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "channel",
+ "epoch": 24,
+ "sha256": "13bae41358cc171e99f26ef4fafa987b2f8d4554ef0a36f4267d4b4e28a40887",
+ "exports": [
+ "DELETE",
+ "GET",
+ "HEAD",
+ "OPTIONS",
+ "PATCH",
+ "POST",
+ "PUT",
+ "WS",
+ "createWebSocketUpgradeServer",
+ "defineChannel",
+ "disableRoute",
+ "isChannel",
+ "isDisabledRouteSentinel"
+ ]
+}
diff --git a/packages/eve/extension-contracts/reports/connection/v21.json b/packages/eve/extension-contracts/reports/connection/v21.json
new file mode 100644
index 000000000..8c9df4e75
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/connection/v21.json
@@ -0,0 +1,16 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "connection",
+ "epoch": 21,
+ "sha256": "af1d3b062c60084fce1621dfc68b73696ed1d039d18a1d68fdb27c016395b7e1",
+ "exports": [
+ "ConnectionAuthorizationFailedError",
+ "ConnectionAuthorizationRequiredError",
+ "defineDynamic",
+ "defineInteractiveAuthorization",
+ "defineMcpClientConnection",
+ "defineOpenAPIConnection",
+ "isConnectionAuthorizationFailedError",
+ "isConnectionAuthorizationRequiredError"
+ ]
+}
diff --git a/packages/eve/extension-contracts/reports/dynamicTool/v44.json b/packages/eve/extension-contracts/reports/dynamicTool/v44.json
new file mode 100644
index 000000000..a29e9f0ca
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/dynamicTool/v44.json
@@ -0,0 +1,15 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "dynamicTool",
+ "epoch": 44,
+ "sha256": "869a6b74be29e584378eb43b3b62a43ea5d8d6064a1babc69d37c44c343ea7a7",
+ "exports": [
+ "DynamicToolEntry",
+ "DynamicToolEvents",
+ "DynamicToolResult",
+ "DynamicToolSet",
+ "autoModel",
+ "defineDurableCallback",
+ "defineDynamic"
+ ]
+}
diff --git a/packages/eve/extension-contracts/reports/hook/v23.json b/packages/eve/extension-contracts/reports/hook/v23.json
new file mode 100644
index 000000000..c8debd4a1
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/hook/v23.json
@@ -0,0 +1,7 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "hook",
+ "epoch": 23,
+ "sha256": "8942f51d8b68a50bccb8aef4ed8c5292b9111a7663a6a1c10626c85b6e813fd3",
+ "exports": ["defineHook"]
+}
diff --git a/packages/eve/extension-contracts/reports/state/v6.json b/packages/eve/extension-contracts/reports/state/v6.json
new file mode 100644
index 000000000..b0b7836d7
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/state/v6.json
@@ -0,0 +1,15 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "state",
+ "epoch": 6,
+ "sha256": "ce086c189e37f233bfd55118a4d0d2feda31683096bd295d1e1f60c9775bd4b7",
+ "exports": [
+ "Session",
+ "SessionAuth",
+ "SessionAuthContext",
+ "SessionContext",
+ "SessionParent",
+ "SessionTurn",
+ "defineState"
+ ]
+}
diff --git a/packages/eve/extension-contracts/reports/tool/v46.json b/packages/eve/extension-contracts/reports/tool/v46.json
new file mode 100644
index 000000000..b047c7d9b
--- /dev/null
+++ b/packages/eve/extension-contracts/reports/tool/v46.json
@@ -0,0 +1,22 @@
+{
+ "kind": "eve-extension-capability-contract",
+ "capability": "tool",
+ "epoch": 46,
+ "sha256": "3a7f65cc63e2f109427e98731e052e6a7477790598fa32675b8610153592619e",
+ "exports": [
+ "WorkflowTool",
+ "WorkflowToolInput",
+ "WorkflowToolOptions",
+ "defaultWebSearch",
+ "defineTool",
+ "defineWorkflowTool",
+ "disableTool",
+ "isDisabledToolSentinel",
+ "isWebSearchToolDefinition",
+ "toolOutput",
+ "toolOutputPart",
+ "toolResultFrom",
+ "webSearch",
+ "workflow"
+ ]
+}
diff --git a/packages/eve/package.json b/packages/eve/package.json
index a0fa4864f..3fd0cbd60 100644
--- a/packages/eve/package.json
+++ b/packages/eve/package.json
@@ -505,7 +505,6 @@
"@vercel/oidc": "3.8.0",
"@vercel/otel": "catalog:",
"@vercel/sandbox": "catalog:",
- "@vercel/sandbox-drives": "catalog:",
"@vercel/sdk": "1.28.8",
"@workflow/builders": "5.0.0-beta.51",
"@workflow/core": "5.0.0-beta.51",
diff --git a/packages/eve/scripts/vendor-compiled/@vercel/sandbox-drives.mjs b/packages/eve/scripts/vendor-compiled/@vercel/sandbox-drives.mjs
deleted file mode 100644
index 19cde5d4e..000000000
--- a/packages/eve/scripts/vendor-compiled/@vercel/sandbox-drives.mjs
+++ /dev/null
@@ -1,48 +0,0 @@
-import { relative } from "node:path";
-
-import {
- buildOpaqueTypesStub,
- buildUniqueSymbolStub,
- collectFilesRecursively,
- createDeclarationCopier,
- createOptionalNativeStubPlugin,
-} from "../_shared.mjs";
-
-async function discoverDeclarationFiles({ distDir }) {
- const files = await collectFilesRecursively(distDir, [".d.ts"]);
- return files
- .map((file) => relative(distDir, file).replaceAll("\\", "/"))
- .sort()
- .map((file) => ({ source: file, output: file }));
-}
-
-/**
- * Copy the complete declaration tree from the installed SDK so every Vercel
- * Sandbox version bump updates eve's public option types automatically.
- * Bare type dependencies are redirected to existing vendored declarations
- * or local stubs, while Node built-ins remain external.
- */
-export default {
- packageName: "@vercel/sandbox-drives",
- packageJsonName: "@vercel/sandbox",
- compiledPath: "@vercel/sandbox-drives",
- plugins: [createOptionalNativeStubPlugin(["fsevents"])],
- copyDeclarations: createDeclarationCopier({
- files: discoverDeclarationFiles,
- rewrites: {
- "@workflow/serde": {
- kind: "stub",
- stubBaseName: "_workflow-serde",
- build: buildUniqueSymbolStub,
- },
- "async-retry": {
- kind: "stub",
- stubBaseName: "_async-retry",
- build: buildOpaqueTypesStub,
- },
- fs: { kind: "external" },
- stream: { kind: "external" },
- zod: { kind: "vendored", compiledPath: "zod" },
- },
- }),
-};
diff --git a/packages/eve/scripts/vendor-compiled/@vercel/sandbox.mjs b/packages/eve/scripts/vendor-compiled/@vercel/sandbox.mjs
index 9c68dc1ff..87ed7b544 100644
--- a/packages/eve/scripts/vendor-compiled/@vercel/sandbox.mjs
+++ b/packages/eve/scripts/vendor-compiled/@vercel/sandbox.mjs
@@ -1,8 +1,43 @@
-import vercelSandboxDrives from "./sandbox-drives.mjs";
+import { relative } from "node:path";
-/** Vendor stable Sandbox for public types and orphan-snapshot deletion. */
+import {
+ buildOpaqueTypesStub,
+ buildUniqueSymbolStub,
+ collectFilesRecursively,
+ createDeclarationCopier,
+ createOptionalNativeStubPlugin,
+} from "../_shared.mjs";
+
+async function discoverDeclarationFiles({ distDir }) {
+ const files = await collectFilesRecursively(distDir, [".d.ts"]);
+ return files
+ .map((file) => relative(distDir, file).replaceAll("\\", "/"))
+ .sort()
+ .map((file) => ({ source: file, output: file }));
+}
+
+/** Copy the complete stable Sandbox declaration tree for public types and runtime loading. */
export default {
- ...vercelSandboxDrives,
packageName: "@vercel/sandbox",
+ packageJsonName: "@vercel/sandbox",
compiledPath: "@vercel/sandbox",
+ plugins: [createOptionalNativeStubPlugin(["fsevents"])],
+ copyDeclarations: createDeclarationCopier({
+ files: discoverDeclarationFiles,
+ rewrites: {
+ "@workflow/serde": {
+ kind: "stub",
+ stubBaseName: "_workflow-serde",
+ build: buildUniqueSymbolStub,
+ },
+ "async-retry": {
+ kind: "stub",
+ stubBaseName: "_async-retry",
+ build: buildOpaqueTypesStub,
+ },
+ fs: { kind: "external" },
+ stream: { kind: "external" },
+ zod: { kind: "vendored", compiledPath: "zod" },
+ },
+ }),
};
diff --git a/packages/eve/scripts/vendor-compiled/index.mjs b/packages/eve/scripts/vendor-compiled/index.mjs
index f36dd8a32..ecc0362cc 100644
--- a/packages/eve/scripts/vendor-compiled/index.mjs
+++ b/packages/eve/scripts/vendor-compiled/index.mjs
@@ -29,7 +29,6 @@ import vercelDetectAgent from "./@vercel/detect-agent.mjs";
import vercelOidc from "./@vercel/oidc.mjs";
import vercelOtel from "./@vercel/otel.mjs";
import vercelSandbox from "./@vercel/sandbox.mjs";
-import vercelSandboxDrives from "./@vercel/sandbox-drives.mjs";
import workflowBuilders from "./@workflow/builders.mjs";
import workflowCore from "./@workflow/core.mjs";
import workflowErrors from "./@workflow/errors.mjs";
@@ -98,7 +97,6 @@ export const MODULES = [
vercelOidc,
vercelOtel,
vercelSandbox,
- vercelSandboxDrives,
workflowBuilders,
workflowCore,
workflowErrors,
diff --git a/packages/eve/src/compiler/extension-compatibility.ts b/packages/eve/src/compiler/extension-compatibility.ts
index 5869f8a6d..17184f9cb 100644
--- a/packages/eve/src/compiler/extension-compatibility.ts
+++ b/packages/eve/src/compiler/extension-compatibility.ts
@@ -22,8 +22,8 @@ interface ExtensionCapabilityContract {
const EXTENSION_CAPABILITY_CONTRACTS = {
extension: { current: 1, supported: [1], dropped: {} },
tool: {
- current: 45,
- supported: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 28, 29, 30, 31, 32, 34, 35, 44, 45],
+ current: 46,
+ supported: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 28, 29, 30, 31, 32, 34, 35, 44, 45, 46],
dropped: {
14: "TaskExec.delegated was removed; migrate to workflow-backed background tools",
15: "TaskExec replaces stageEffect with send",
@@ -51,10 +51,10 @@ const EXTENSION_CAPABILITY_CONTRACTS = {
},
},
dynamicTool: {
- current: 43,
+ current: 44,
supported: [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 28, 29, 30, 31, 32,
- 33, 41, 42, 43,
+ 33, 41, 42, 43, 44,
],
dropped: {
21: "Message and reasoning append events now expose deltas instead of cumulative snapshots.",
@@ -73,8 +73,8 @@ const EXTENSION_CAPABILITY_CONTRACTS = {
},
},
channel: {
- current: 23,
- supported: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 23],
+ current: 24,
+ supported: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 23, 24],
dropped: {
12: "Message and reasoning append events now expose deltas instead of cumulative snapshots.",
19: "Continuation rekey was removed; channel extensions must use additive continuation.alias instead.",
@@ -100,16 +100,16 @@ const EXTENSION_CAPABILITY_CONTRACTS = {
},
},
connection: {
- current: 20,
- supported: [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
+ current: 21,
+ supported: [1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21],
dropped: {
9: "Dynamic connection resolvers no longer receive conversation or channel continuation data",
10: "Message and reasoning append events now expose deltas instead of cumulative snapshots.",
},
},
hook: {
- current: 22,
- supported: [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22],
+ current: 23,
+ supported: [10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23],
dropped: {
1: "Model identity moved from session.started runtime metadata to step.started call attribution.",
2: "Model identity moved from session.started runtime metadata to step.started call attribution.",
@@ -140,7 +140,7 @@ const EXTENSION_CAPABILITY_CONTRACTS = {
},
},
config: { current: 1, supported: [1], dropped: {} },
- state: { current: 5, supported: [1, 2, 3, 4, 5], dropped: {} },
+ state: { current: 6, supported: [1, 2, 3, 4, 5, 6], dropped: {} },
} as const satisfies Record<string, ExtensionCapabilityContract>;
/** One independently versioned extension-facing contract. */
diff --git a/packages/eve/src/execution/sandbox/bindings/vercel-lifecycle.ts b/packages/eve/src/execution/sandbox/bindings/vercel-lifecycle.ts
index 48455e87b..a3a7d90b2 100644
--- a/packages/eve/src/execution/sandbox/bindings/vercel-lifecycle.ts
+++ b/packages/eve/src/execution/sandbox/bindings/vercel-lifecycle.ts
@@ -5,15 +5,15 @@ import {
} from "#execution/sandbox/bindings/vercel-credentials.js";
import type {
VercelCreateOptions,
- VercelDeleteGetOptions,
- VercelDeleteModule,
+ VercelGetOptions,
+ VercelModule,
VercelSandbox,
} from "#execution/sandbox/bindings/vercel-sdk-types.js";
export async function deleteVercelSandbox(input: {
readonly createOptions: VercelCreateOptions;
- readonly loadDeleteSandboxModule: () => Promise<VercelDeleteModule>;
readonly sandbox: VercelSandbox;
+ readonly sandboxModule: VercelModule;
readonly signal?: AbortSignal;
}): Promise<void> {
await stopVercelSandbox(input.sandbox);
@@ -22,27 +22,26 @@ export async function deleteVercelSandbox(input: {
export async function deleteUnusableVercelSandbox(input: {
readonly createOptions: VercelCreateOptions;
- readonly loadDeleteSandboxModule: () => Promise<VercelDeleteModule>;
readonly sandbox: VercelSandbox;
+ readonly sandboxModule: VercelModule;
}): Promise<void> {
await deleteVercelSandboxRecord(input);
}
async function deleteVercelSandboxRecord(input: {
readonly createOptions: VercelCreateOptions;
- readonly loadDeleteSandboxModule: () => Promise<VercelDeleteModule>;
readonly sandbox: VercelSandbox;
+ readonly sandboxModule: VercelModule;
readonly signal?: AbortSignal;
}): Promise<void> {
const credentials = await resolveVercelSandboxCredentials(input.createOptions);
- const sandboxModule = await input.loadDeleteSandboxModule();
- const sandbox = await sandboxModule.Sandbox.get({
+ const sandbox = await input.sandboxModule.Sandbox.get({
...credentials,
fetch: getVercelSandboxFetch(input.createOptions),
name: input.sandbox.name,
resume: false,
signal: input.signal,
- } as VercelDeleteGetOptions);
+ } as VercelGetOptions);
await sandbox.delete({
deleteOrphanSnapshots: true,
signal: input.signal,
diff --git a/packages/eve/src/execution/sandbox/bindings/vercel-sdk-types.ts b/packages/eve/src/execution/sandbox/bindings/vercel-sdk-types.ts
index a8d7e812f..b5f67d252 100644
--- a/packages/eve/src/execution/sandbox/bindings/vercel-sdk-types.ts
+++ b/packages/eve/src/execution/sandbox/bindings/vercel-sdk-types.ts
@@ -1,5 +1,4 @@
-import type * as Vercel from "#compiled/@vercel/sandbox-drives/index.js";
-import type * as VercelStable from "#compiled/@vercel/sandbox/index.js";
+import type * as Vercel from "#compiled/@vercel/sandbox/index.js";
export type VercelCreateOptions = NonNullable<Parameters<typeof Vercel.Sandbox.create>[0]>;
@@ -8,7 +7,3 @@ export type VercelGetOptions = Parameters<typeof Vercel.Sandbox.get>[0];
export type VercelModule = typeof Vercel;
export type VercelSandbox = Vercel.Sandbox;
-
-export type VercelDeleteGetOptions = Parameters<typeof VercelStable.Sandbox.get>[0];
-
-export type VercelDeleteModule = typeof VercelStable;
diff --git a/packages/eve/src/execution/sandbox/bindings/vercel.test.ts b/packages/eve/src/execution/sandbox/bindings/vercel.test.ts
index 08507ffe6..c08a0f88d 100644
--- a/packages/eve/src/execution/sandbox/bindings/vercel.test.ts
+++ b/packages/eve/src/execution/sandbox/bindings/vercel.test.ts
@@ -819,7 +819,9 @@ describe("createVercelSandbox", () => {
.mockResolvedValueOnce(templateSandbox)
.mockResolvedValueOnce(sessionSandbox);
const resolveSessionCreateOptions = vi.fn(({ session }) => ({
- mounts: { "/workspace/repos": { drive: `e0-${session.id}` } },
+ mounts: {
+ "/workspace/repos": { drive: `e0-${session.id}`, mode: "read-write" as const },
+ },
}));
const backend = createTestVercelSandbox({
loadSandboxModule: async () =>
@@ -844,7 +846,7 @@ describe("createVercelSandbox", () => {
});
expect(create.mock.calls[0]?.[0]).not.toHaveProperty("mounts");
expect(create.mock.calls[1]?.[0]).toMatchObject({
- mounts: { "/workspace/repos": { drive: "e0-parent-session" } },
+ mounts: { "/workspace/repos": { drive: "e0-parent-session", mode: "read-write" } },
});
});
@@ -1232,10 +1234,7 @@ describe("createVercelSandbox", () => {
}),
},
};
- const stableDelete = vi.fn().mockResolvedValue(undefined);
- const stableGet = vi.fn().mockResolvedValue({ delete: stableDelete });
const backend = createTestVercelSandbox({
- loadDeleteSandboxModule: async () => ({ Sandbox: { get: stableGet } }) as never,
loadSandboxModule: async () => sandboxModule as never,
});
@@ -1246,14 +1245,13 @@ describe("createVercelSandbox", () => {
templateKey: "template-key",
});
- expect(staleSession.delete).not.toHaveBeenCalled();
- expect(stableGet).toHaveBeenCalledWith({
+ expect(sandboxModule.Sandbox.get).toHaveBeenCalledWith({
fetch: expect.any(Function),
name: "persisted-sandbox-name",
resume: false,
signal: undefined,
});
- expect(stableDelete).toHaveBeenCalledWith({
+ expect(staleSession.delete).toHaveBeenCalledWith({
deleteOrphanSnapshots: true,
signal: undefined,
});
@@ -1300,9 +1298,12 @@ describe("createVercelSandbox", () => {
const stableDelete = vi.fn(async () => {
order.push("sandbox-delete");
});
- const stableGet = vi.fn(async () => {
- order.push("sandbox-get");
- return { delete: stableDelete };
+ const get = vi.fn(async ({ name, resume }: { name: string; resume?: boolean }) => {
+ if (name === "session" && resume === false) {
+ order.push("sandbox-get");
+ return { delete: stableDelete };
+ }
+ return null;
});
const sandboxModule = {
Sandbox: {
@@ -1310,11 +1311,10 @@ describe("createVercelSandbox", () => {
.fn()
.mockResolvedValueOnce(templateSandbox)
.mockResolvedValueOnce(sessionSandbox),
- get: vi.fn().mockResolvedValue(null),
+ get,
},
};
const backend = createTestVercelSandbox({
- loadDeleteSandboxModule: async () => ({ Sandbox: { get: stableGet } }) as never,
loadSandboxModule: async () => sandboxModule as never,
});
await backend.prewarm({
@@ -1332,7 +1332,7 @@ describe("createVercelSandbox", () => {
await expect(handle.delete({ abortSignal })).resolves.toBeUndefined();
expect(order).toEqual(["stop", "sandbox-get", "sandbox-delete"]);
- expect(stableGet).toHaveBeenCalledWith({
+ expect(get).toHaveBeenCalledWith({
fetch: expect.any(Function),
name: "session",
resume: false,
diff --git a/packages/eve/src/execution/sandbox/bindings/vercel.ts b/packages/eve/src/execution/sandbox/bindings/vercel.ts
index 0f6af3830..19d7c0fa3 100644
--- a/packages/eve/src/execution/sandbox/bindings/vercel.ts
+++ b/packages/eve/src/execution/sandbox/bindings/vercel.ts
@@ -59,7 +59,6 @@ import { normalizeVercelReadStream } from "#execution/sandbox/bindings/vercel-re
import { resolveSandboxModelPath } from "#shared/skill-paths.js";
import type {
VercelCreateOptions,
- VercelDeleteModule,
VercelModule,
VercelSandbox,
} from "#execution/sandbox/bindings/vercel-sdk-types.js";
@@ -67,7 +66,6 @@ import type {
export interface CreateVercelSandboxInput {
readonly createSandbox?: CreateVercelSandbox;
readonly createOptions?: VercelCreateOptions;
- readonly loadDeleteSandboxModule?: () => Promise<VercelDeleteModule>;
readonly loadSandboxModule?: () => Promise<VercelModule>;
readonly resolveSessionCreateOptions?: (
context: VercelSandboxSessionCreateContext,
@@ -85,11 +83,7 @@ export function createVercelSandbox(
input: CreateVercelSandboxInput = {},
): SandboxBackend<VercelSandboxBootstrapUseOptions, VercelSandboxSessionUseOptions> {
const loadSandboxModule =
- input.loadSandboxModule ??
- (async () => await import("#compiled/@vercel/sandbox-drives/index.js"));
- const loadDeleteSandboxModule =
- input.loadDeleteSandboxModule ??
- (async () => await import("#compiled/@vercel/sandbox/index.js"));
+ input.loadSandboxModule ?? (async () => await import("#compiled/@vercel/sandbox/index.js"));
const createOptions: VercelCreateOptions = {
timeout: DEFAULT_SANDBOX_TIMEOUT_MS,
...input.createOptions,
@@ -154,7 +148,6 @@ export function createVercelSandbox(
try {
session = await ensureUsableSession({
input: ensureSessionInput,
- loadDeleteSandboxModule,
session,
});
if (template === null && session.created) {
@@ -169,8 +162,8 @@ export function createVercelSandbox(
return createHandle({
createOptions,
- loadDeleteSandboxModule,
sandbox: session.sandbox,
+ sandboxModule,
sessionKey: createInput.sessionKey,
});
},
@@ -410,7 +403,6 @@ interface VercelSandboxSessionCreateResult {
async function ensureUsableSession(input: {
readonly input: EnsureSessionInput;
- readonly loadDeleteSandboxModule: () => Promise<VercelDeleteModule>;
readonly session: VercelSandboxSessionCreateResult;
}): Promise<VercelSandboxSessionCreateResult> {
try {
@@ -424,8 +416,8 @@ async function ensureUsableSession(input: {
await deleteUnusableVercelSandbox({
createOptions: input.input.createOptions,
- loadDeleteSandboxModule: input.loadDeleteSandboxModule,
sandbox: input.session.sandbox,
+ sandboxModule: input.input.sandboxModule,
});
const replacement = await ensureSession({ ...input.input, existingMetadata: undefined });
await ensureVercelSandboxBaseRuntime(replacement.sandbox);
@@ -500,8 +492,8 @@ function createSessionCreateParams(
function createHandle(input: {
readonly createOptions: VercelCreateOptions;
- readonly loadDeleteSandboxModule: () => Promise<VercelDeleteModule>;
readonly sandbox: VercelSandbox;
+ readonly sandboxModule: VercelModule;
readonly sessionKey: string;
}): SandboxBackendHandle<VercelSandboxSessionUseOptions> {
const { sandbox, sessionKey } = input;
@@ -529,8 +521,8 @@ function createHandle(input: {
async delete(options) {
await deleteVercelSandbox({
createOptions: input.createOptions,
- loadDeleteSandboxModule: input.loadDeleteSandboxModule,
sandbox,
+ sandboxModule: input.sandboxModule,
signal: options?.abortSignal,
});
},
diff --git a/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts b/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts
index 1bcec6fad..d4c3c87e0 100644
--- a/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts
+++ b/packages/eve/src/internal/nitro/host/build-extension.scenario.test.ts
@@ -279,7 +279,7 @@ describe("extension build output", () => {
join(outDir, "extension", "tools", "crm_search.d.ts"),
"utf8",
);
- expect(dynamicToolDeclaration).toContain('import("eve/tools").DynamicSentinel');
+ expect(dynamicToolDeclaration).toMatch(/import\("eve(?:\/tools)?"\)\.DynamicSentinel/u);
expect(dynamicToolDeclaration).not.toContain("node_modules");
expect(
await readFile(
diff --git a/packages/eve/src/public/sandbox/vercel-sandbox.ts b/packages/eve/src/public/sandbox/vercel-sandbox.ts
index 66cca21be..0a8ee2398 100644
--- a/packages/eve/src/public/sandbox/vercel-sandbox.ts
+++ b/packages/eve/src/public/sandbox/vercel-sandbox.ts
@@ -1,4 +1,4 @@
-import type * as Vercel from "#compiled/@vercel/sandbox-drives/index.js";
+import type * as Vercel from "#compiled/@vercel/sandbox/index.js";
type VercelCreateOptions = NonNullable<Parameters<typeof Vercel.Sandbox.create>[0]>;
diff --git a/packages/eve/src/public/sandbox/vercel.ts b/packages/eve/src/public/sandbox/vercel.ts
index fece968e9..47e36252d 100644
--- a/packages/eve/src/public/sandbox/vercel.ts
+++ b/packages/eve/src/public/sandbox/vercel.ts
@@ -1,5 +1,5 @@
export { vercel } from "#public/sandbox/backends/vercel.js";
-export { Drive } from "#compiled/@vercel/sandbox-drives/index.js";
+export { Drive } from "#compiled/@vercel/sandbox/index.js";
export type {
VercelSandboxBootstrapUseOptions,
VercelSandboxCreateOptions,
diff --git a/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts b/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts
index f92e1a0b8..9708b11fa 100644
--- a/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts
+++ b/packages/eve/test/scenarios/compiled-vendor-assets.scenario.test.ts
@@ -22,11 +22,7 @@ const VENDOR_WARNING_LOG_PATH = join(EVE_PACKAGE_ROOT, "scripts", "vendor-warnin
const execFileAsync = promisify(execFile);
const require = createRequire(import.meta.url);
const VERCEL_BLOB_DIST_ROOT = dirname(require.resolve("@vercel/blob"));
-const VERCEL_SANDBOX_DRIVES_DIST_ROOT = join(
- dirname(require.resolve("@vercel/sandbox-drives/package.json")),
- "dist",
-);
-const VERCEL_SANDBOX_STABLE_DIST_ROOT = join(
+const VERCEL_SANDBOX_DIST_ROOT = join(
dirname(require.resolve("@vercel/sandbox/package.json")),
"dist",
);
@@ -361,10 +357,10 @@ describe("compiled vendor assets", () => {
expect(vercelWorld).toContain("createWorld");
});
- it("copies the complete Drives-capable @vercel/sandbox declaration tree", async () => {
+ it("copies the complete stable @vercel/sandbox declaration tree", async () => {
const [upstreamEntries, vendoredEntries] = await Promise.all([
- readdir(VERCEL_SANDBOX_DRIVES_DIST_ROOT, { recursive: true }),
- readdir(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox-drives"), { recursive: true }),
+ readdir(VERCEL_SANDBOX_DIST_ROOT, { recursive: true }),
+ readdir(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox"), { recursive: true }),
]);
const upstreamDeclarations = upstreamEntries.filter((entry) => entry.endsWith(".d.ts")).sort();
const generatedStubNames = new Set(["_async-retry.d.ts", "_workflow-serde.d.ts"]);
@@ -375,33 +371,16 @@ describe("compiled vendor assets", () => {
expect(vendoredDeclarations).toEqual(upstreamDeclarations);
const [upstreamIndex, vendoredIndex, vendoredSandbox, vendoredBaseClient] = await Promise.all([
- readFile(join(VERCEL_SANDBOX_DRIVES_DIST_ROOT, "index.d.ts"), "utf8"),
- readFile(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox-drives/index.d.ts"), "utf8"),
- readFile(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox-drives/sandbox.d.ts"), "utf8"),
- readFile(
- join(COMPILED_VENDOR_ROOT, "@vercel/sandbox-drives/api-client/base-client.d.ts"),
- "utf8",
- ),
+ readFile(join(VERCEL_SANDBOX_DIST_ROOT, "index.d.ts"), "utf8"),
+ readFile(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox/index.d.ts"), "utf8"),
+ readFile(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox/sandbox.d.ts"), "utf8"),
+ readFile(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox/api-client/base-client.d.ts"), "utf8"),
]);
expect(vendoredIndex).toBe(upstreamIndex);
expect(vendoredSandbox).toContain('from "./_workflow-serde.js"');
expect(vendoredBaseClient).toContain('from "../_async-retry.js"');
expect(vendoredBaseClient).toContain('import "#compiled/zod/index.js"');
- });
-
- it("vendors stable @vercel/sandbox for lifecycle operations", async () => {
- const [upstreamEntries, vendoredEntries] = await Promise.all([
- readdir(VERCEL_SANDBOX_STABLE_DIST_ROOT, { recursive: true }),
- readdir(join(COMPILED_VENDOR_ROOT, "@vercel/sandbox"), { recursive: true }),
- ]);
- const generatedStubNames = new Set(["_async-retry.d.ts", "_workflow-serde.d.ts"]);
- const upstreamDeclarations = upstreamEntries.filter((entry) => entry.endsWith(".d.ts")).sort();
- const vendoredDeclarations = vendoredEntries
- .filter((entry) => entry.endsWith(".d.ts") && !generatedStubNames.has(entry))
- .sort();
-
- expect(vendoredDeclarations).toEqual(upstreamDeclarations);
expect(vendoredEntries.filter((entry) => entry.endsWith(".js"))).toEqual(["index.js"]);
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 258051aa5..aecb4c6fb 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -52,11 +52,8 @@ catalogs:
specifier: 2.1.3
version: 2.1.3
'@vercel/sandbox':
- specifier: 3.2.1
- version: 3.2.1
- '@vercel/sandbox-drives':
- specifier: npm:@vercel/[email protected]
- version: 3.1.0-beta.1
+ specifier: 3.3.0
+ version: 3.3.0
'@workflow/world-postgres':
specifier: 5.0.0-beta.42
version: 5.0.0-beta.42
@@ -231,7 +228,7 @@ importers:
devDependencies:
'@agent-browser/eve':
specifier: ^0.33.0
- version: 0.33.0(@vercel/[email protected])(eve@packages+eve)
+ version: 0.33.0(@vercel/[email protected])(eve@packages+eve)
'@agentphone/chat-sdk-adapter':
specifier: 0.1.0
@@ -1480,10 +1477,7 @@ importers:
version: 2.1.3(@opentelemetry/[email protected])(@opentelemetry/[email protected])(@opentelemetry/[email protected](@opentelemetry/[email protected])([email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))(@opentelemetry/[email protected](@opentelemetry/[email protected]))
'@vercel/sandbox':
specifier: 'catalog:'
- version: 3.2.1
- '@vercel/sandbox-drives':
- specifier: 'catalog:'
- version: '@vercel/[email protected]'
+ version: 3.3.0
'@vercel/sdk':
specifier: 1.28.8
version: 1.28.8
@@ -8399,11 +8393,8 @@ packages:
'@vercel/[email protected]':
resolution: {integrity: sha512-1pF3id7LIG2GfjkEAZW+ZngMDdywJw7aFLOyIlry/lj8v3b4GMn3WCuBbvG4N4wTmYUfFzHaVHfdwVpqALEFkw==}
- '@vercel/[email protected]':
- resolution: {integrity: sha512-rkota0zmKS0nkD9EeuRP4bdztsYpZc7A6wpBeAnpDWlZNsjUYOlJqS2ICmsBfEpW5a6aU7VGoBSYwCJ2nUKzdA==}
-
- '@vercel/[email protected]':
- resolution: {integrity: sha512-Yw/UJl5T5OwO+TmnMAVgHTWlu2vYmMUAA9x7RhTHCge9y3cx90kvrjvNDDiqtt3euoFnLeoP2kvZFDbNwgWaww==}
+ '@vercel/[email protected]':
+ resolution: {integrity: sha512-TclqRD2joExyECTrrHsioi3Onw20X2YfpOYEzs3JpJUtAjOKYw2bMeXldKrUg+TB/TT7tPdDu8uKNxj9NE7QUg==}
'@vercel/[email protected]':
resolution: {integrity: sha512-uAl+pEZZnFYRFzE/43ihP3aYTJ+4v0+coiMYobYMqtaERWknYKuRZWEj9Dk9r87yWXfxclsQugXkN42kaOcySw==}
@@ -16181,17 +16172,17 @@ ignoredOptionalDependencies:
snapshots:
- '@agent-browser/[email protected](@vercel/[email protected])(eve@packages+eve)':
+ '@agent-browser/[email protected](@vercel/[email protected])(eve@packages+eve)':
dependencies:
- '@agent-browser/sandbox': 0.33.0(@vercel/[email protected])
+ '@agent-browser/sandbox': 0.33.0(@vercel/[email protected])
eve: link:packages/eve
zod: 4.4.3
transitivePeerDependencies:
- '@vercel/sandbox'
- '@agent-browser/[email protected](@vercel/[email protected])':
+ '@agent-browser/[email protected](@vercel/[email protected])':
optionalDependencies:
- '@vercel/sandbox': 3.2.1
+ '@vercel/sandbox': 3.3.0
'@agentclientprotocol/[email protected]([email protected])':
dependencies:
@@ -23158,25 +23149,7 @@ snapshots:
- bare-abort-controller
- react-native-b4a
- '@vercel/[email protected]':
- dependencies:
- '@vercel/oidc': 3.2.0
- '@workflow/serde': 4.1.0-beta.2
- async-retry: 1.3.3
- jose: 6.2.3
- jsonlines: 0.1.1
- lru-cache: 10.4.3
- ms: 2.1.3
- picocolors: 1.1.1
- tar-stream: 3.1.7
- undici: 7.29.0
- xdg-app-paths: 5.1.0
- zod: 4.5.4
- transitivePeerDependencies:
- - bare-abort-controller
- - react-native-b4a
-
- '@vercel/[email protected]':
+ '@vercel/[email protected]':
dependencies:
'@vercel/oidc': 3.2.0
'@workflow/serde': 4.1.0-beta.2
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 91402c8b9..1642036cc 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -42,8 +42,7 @@ catalog:
"@types/react": "19.2.15"
"@types/react-dom": "19.2.3"
"@vercel/otel": "2.1.3"
- "@vercel/sandbox": "3.2.1"
- "@vercel/sandbox-drives": "npm:@vercel/[email protected]"
+ "@vercel/sandbox": "3.3.0"
"@workflow/world-postgres": "5.0.0-beta.42"
ai: "^7.0.105"
better-auth: "1.6.26"
@@ -64,16 +63,6 @@ minimumReleaseAgeExclude:
- "@ai-sdk/*"
- ai
- eve
- - "@kybernesis/arcana"
- - "@upstash/*"
- "@vercel/*"
- "@workflow/*"
- - nitro
- # Required by [email protected], published September 3.
- - run
- workflow