eve 0.8.6 → 0.9.1
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/CHANGELOG.md +18 -1
- package/bin/eve.d.ts +5 -0
- package/bin/eve.js +15 -13
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +5 -0
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.js +9 -6
- package/dist/src/compiled/.vendor-stamp.json +2 -1
- package/dist/src/compiled/semver/LICENSE +15 -0
- package/dist/src/compiled/semver/index.d.ts +23 -0
- package/dist/src/compiled/semver/index.js +1 -0
- package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +4 -4
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +1 -1
- package/dist/src/execution/sandbox/lazy-backend.d.ts +2 -2
- package/dist/src/execution/sandbox/logging-session.js +2 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/sandbox.d.ts +1 -1
- package/dist/src/internal/authored-definition/sandbox.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -1
- package/dist/src/internal/nitro/host/dev-watcher-log.d.ts +3 -0
- package/dist/src/internal/nitro/host/dev-watcher-log.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -1
- package/dist/src/public/sandbox/backends/default.d.ts +10 -10
- package/dist/src/public/sandbox/backends/default.js +1 -1
- package/dist/src/public/sandbox/backends/docker.d.ts +1 -1
- package/dist/src/public/sandbox/backends/docker.js +1 -1
- package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -1
- package/dist/src/public/sandbox/backends/just-bash.js +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.js +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +1 -1
- package/dist/src/public/sandbox/backends/vercel.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +2 -2
- package/dist/src/public/sandbox/docker.d.ts +2 -0
- package/dist/src/public/sandbox/docker.js +1 -0
- package/dist/src/public/sandbox/index.d.ts +1 -9
- package/dist/src/public/sandbox/index.js +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/just-bash.d.ts +2 -0
- package/dist/src/public/sandbox/just-bash.js +1 -0
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox.d.ts +2 -0
- package/dist/src/public/sandbox/microsandbox.js +1 -0
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/vercel.d.ts +2 -0
- package/dist/src/public/sandbox/vercel.js +1 -0
- package/dist/src/runtime/resolve-sandbox.d.ts +1 -1
- package/dist/src/runtime/resolve-sandbox.js +1 -1
- package/dist/src/runtime/sandbox/registry.d.ts +2 -2
- package/dist/src/runtime/sandbox/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +2 -2
- package/dist/src/setup/boxes/add-channels.d.ts +4 -6
- package/dist/src/setup/boxes/add-channels.js +1 -1
- package/dist/src/setup/boxes/scaffold.d.ts +2 -2
- package/dist/src/setup/boxes/scaffold.js +1 -1
- package/dist/src/setup/node-engine.d.ts +31 -0
- package/dist/src/setup/node-engine.js +1 -0
- package/dist/src/setup/onboarding.d.ts +3 -2
- package/dist/src/setup/onboarding.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +10 -5
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.d.ts +17 -4
- package/dist/src/setup/scaffold/create/project.js +9 -5
- package/dist/src/setup/scaffold/index.d.ts +1 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +4 -2
- package/dist/src/setup/scaffold/update/channels.js +2 -2
- package/dist/src/setup/scaffold/update/package-json.d.ts +12 -1
- package/dist/src/setup/scaffold/update/package-json.js +1 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/shared/sandbox-backend.d.ts +4 -4
- package/dist/src/shared/sandbox-definition.d.ts +4 -4
- package/docs/getting-started.mdx +2 -2
- package/docs/guides/deployment.md +4 -3
- package/docs/reference/cli.md +2 -0
- package/docs/sandbox.mdx +21 -19
- package/package.json +27 -5
|
@@ -29,10 +29,11 @@ Route-auth secrets never get serialized into the compiled discovery or module-ma
|
|
|
29
29
|
On Vercel, the [sandbox](../sandbox) runs on hosted [Vercel Sandbox](https://vercel.com/docs/sandbox) infrastructure. Attach the backend on the sandbox definition:
|
|
30
30
|
|
|
31
31
|
```ts title="agent/sandbox/sandbox.ts"
|
|
32
|
-
import { defineSandbox
|
|
32
|
+
import { defineSandbox } from "eve/sandbox";
|
|
33
|
+
import { vercel } from "eve/sandbox/vercel";
|
|
33
34
|
|
|
34
35
|
export default defineSandbox({
|
|
35
|
-
backend:
|
|
36
|
+
backend: vercel(),
|
|
36
37
|
});
|
|
37
38
|
```
|
|
38
39
|
|
|
@@ -110,7 +111,7 @@ Agent Runs is separate from the OpenTelemetry exporters configured in [`instrume
|
|
|
110
111
|
|
|
111
112
|
- [ ] `eve build` succeeds and writes `.vercel/output`.
|
|
112
113
|
- [ ] Provider keys and route-auth secrets are set in Vercel env vars.
|
|
113
|
-
- [ ] The sandbox backend matches the environment (`
|
|
114
|
+
- [ ] The sandbox backend matches the environment (`vercel()` or `defaultBackend()`).
|
|
114
115
|
- [ ] Build-time prewarm reused or built templates without failing.
|
|
115
116
|
- [ ] `placeholderAuth()` is replaced with your real policy.
|
|
116
117
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -90,6 +90,8 @@ Pass a bare URL as the only argument and the UI connects to that server instead
|
|
|
90
90
|
| `--context-size <tokens>` | Model context window size, shown as a usage percentage |
|
|
91
91
|
| `--logs <mode>` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
|
|
92
92
|
|
|
93
|
+
Local dev writes the active server process ID to `.eve/dev-process.pid`. If another `eve dev` starts for the same agent while that process is still running, Eve exits with a message that includes the command to stop the existing server.
|
|
94
|
+
|
|
93
95
|
Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight sessions keep a consistent code revision while new prompts pick up rebuilds. `eve dev` prunes stale runtime snapshots and old local sandbox templates in the background on startup; stopping `eve dev` and deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/` is safe when you want a manual cleanup.
|
|
94
96
|
|
|
95
97
|
## `eve link`
|
package/docs/sandbox.mdx
CHANGED
|
@@ -90,10 +90,11 @@ To add setup, seed files, or pick a backend, author `defineSandbox`. There are t
|
|
|
90
90
|
- `agent/sandbox/sandbox.ts`: folder layout. Use it when you also seed `agent/sandbox/workspace/**`. If both exist, the folder layout wins.
|
|
91
91
|
|
|
92
92
|
```ts title="agent/sandbox/sandbox.ts"
|
|
93
|
-
import { defineSandbox
|
|
93
|
+
import { defineSandbox } from "eve/sandbox";
|
|
94
|
+
import { vercel } from "eve/sandbox/vercel";
|
|
94
95
|
|
|
95
96
|
export default defineSandbox({
|
|
96
|
-
backend:
|
|
97
|
+
backend: vercel({ runtime: "node24", resources: { vcpus: 2 } }),
|
|
97
98
|
revalidationKey: () => "repo-bootstrap-v1",
|
|
98
99
|
async bootstrap({ use }) {
|
|
99
100
|
const sandbox = await use();
|
|
@@ -105,21 +106,21 @@ export default defineSandbox({
|
|
|
105
106
|
});
|
|
106
107
|
```
|
|
107
108
|
|
|
108
|
-
`defineSandbox`
|
|
109
|
+
`defineSandbox` and `defaultBackend` live on `eve/sandbox`. Omit `backend` and the runtime falls back to `defaultBackend()` (see [Backends](#backends)).
|
|
109
110
|
|
|
110
111
|
## Backends
|
|
111
112
|
|
|
112
|
-
The backend decides where the sandbox runs. Eve ships four pinned factories plus an availability-aware default from `eve/sandbox`:
|
|
113
|
+
The backend decides where the sandbox runs. Eve ships four pinned factories from nested `eve/sandbox/*` imports plus an availability-aware default from `eve/sandbox`:
|
|
113
114
|
|
|
114
|
-
| Backend
|
|
115
|
-
|
|
|
116
|
-
| `
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `defaultBackend()`
|
|
115
|
+
| Backend | Runs the sandbox |
|
|
116
|
+
| ------------------ | ---------------------------------------------------------------------------------------------- |
|
|
117
|
+
| `vercel()` | on [Vercel Sandbox](https://vercel.com/docs/sandbox). |
|
|
118
|
+
| `docker()` | locally in a Docker container, driven through the `docker` CLI. |
|
|
119
|
+
| `microsandbox()` | locally in a lightweight [microsandbox](https://www.npmjs.com/package/microsandbox) VM. |
|
|
120
|
+
| `justbash()` | locally in the pure-JS `just-bash` interpreter — no daemon or VM, but no real binaries either. |
|
|
121
|
+
| `defaultBackend()` | picks the best available: Vercel Sandbox on hosted Vercel → Docker → microsandbox → just-bash. |
|
|
121
122
|
|
|
122
|
-
Configuring a pinned factory uses that backend unconditionally — `
|
|
123
|
+
Configuring a pinned factory uses that backend unconditionally — `docker()` always requires a reachable Docker daemon, `vercel()` always creates hosted sandboxes (including from local dev, with Vercel credentials).
|
|
123
124
|
|
|
124
125
|
With `backend` omitted, Eve uses `defaultBackend()`, which resolves on first use in priority order:
|
|
125
126
|
|
|
@@ -144,15 +145,15 @@ export default defineSandbox({
|
|
|
144
145
|
|
|
145
146
|
### Docker
|
|
146
147
|
|
|
147
|
-
`
|
|
148
|
+
`docker()` drives the Docker CLI directly. The default base image is `ghcr.io/vercel/eve:latest`, Eve's published sandbox runtime image; Eve creates `/workspace` and verifies Bash during framework setup before authored bootstrap code runs. Configure it through `docker({ image, env, pullPolicy, networkPolicy })`; install authored runtime tools in sandbox bootstrap or provide them through a custom image. Templates are committed as local Docker images and reused across sessions when the sandbox source, seed files, `revalidationKey`, and Docker backend options still match; sessions run as long-lived containers whose filesystems persist `/workspace` changes across turns for the same durable session. `eve dev` prunes stale template images in the background.
|
|
148
149
|
|
|
149
150
|
### microsandbox
|
|
150
151
|
|
|
151
|
-
`
|
|
152
|
+
`microsandbox()` runs each sandbox in a lightweight local VM with snapshot-backed templates, a `vercel-sandbox` user, and a firewall capable of domain-level network policies and credential brokering — the closest local match to hosted Vercel Sandbox. The default base image is `ghcr.io/vercel/eve:latest`, Eve's published sandbox runtime image; Eve verifies Bash, creates `/workspace`, and creates the sandbox user during framework setup before authored bootstrap code runs. Install authored runtime tools in sandbox bootstrap or provide them through a custom image. Supported hosts: macOS on Apple Silicon, or Linux (glibc) with KVM. The `microsandbox` npm package and its VM runtime are not bundled with Eve: `eve dev` installs both automatically when missing (disable with `setup: { autoInstall: false }`); production processes fail with actionable install errors instead.
|
|
152
153
|
|
|
153
154
|
### just-bash
|
|
154
155
|
|
|
155
|
-
`
|
|
156
|
+
`justbash()` needs no daemon or VM, but commands run in a simulated bash with a virtual filesystem under `.eve/sandbox-cache/` — no real binaries (`git`, `node`, package managers) and no network isolation. The `just-bash` package is an optional peer dependency: `eve dev` installs it into your application automatically when missing (disable with `autoInstall: false`); production processes fail with an actionable install error instead.
|
|
156
157
|
|
|
157
158
|
You can write your own backend too: a `SandboxBackend` is just an object with a `name`, a `create`, and an optional `prewarm`. See the `SandboxBackend*` types on `eve/sandbox`.
|
|
158
159
|
|
|
@@ -164,10 +165,11 @@ There are two hooks, scoped differently:
|
|
|
164
165
|
- **`onSession({ use, ctx })`** is durable-session-scoped and runs once per session. This is where per-session setup goes: network policy, resources, timeout, per-user credentials, one-time markers. Because it runs inside the active runtime context, it can read `ctx.session` and derive the current principal without baking credentials into the template. Call `use(opts?)` to get a `SandboxSession`; `opts` flow to the backend's update path after create.
|
|
165
166
|
|
|
166
167
|
```ts
|
|
167
|
-
import { defineSandbox
|
|
168
|
+
import { defineSandbox } from "eve/sandbox";
|
|
169
|
+
import { vercel } from "eve/sandbox/vercel";
|
|
168
170
|
|
|
169
171
|
export default defineSandbox({
|
|
170
|
-
backend:
|
|
172
|
+
backend: vercel(),
|
|
171
173
|
async onSession({ use, ctx }) {
|
|
172
174
|
const sandbox = await use({ networkPolicy: "deny-all" });
|
|
173
175
|
const user = ctx.session.auth.current;
|
|
@@ -193,9 +195,9 @@ networkPolicy: {
|
|
|
193
195
|
};
|
|
194
196
|
```
|
|
195
197
|
|
|
196
|
-
Set it on the factory (`
|
|
198
|
+
Set it on the factory (`vercel({ networkPolicy: "deny-all" })`) and it applies before authored `bootstrap` code runs; framework-owned base setup may briefly keep egress open to install required packages. Set it in `onSession`'s `use()` to override per-session. The common pattern combines both: leave the factory open so `bootstrap` can `git clone`, then lock down in `onSession`. And to change the policy mid-turn, call `sandbox.setNetworkPolicy(...)` on the live handle.
|
|
197
199
|
|
|
198
|
-
Domain-level allow-lists and credential brokering are supported by `
|
|
200
|
+
Domain-level allow-lists and credential brokering are supported by `vercel()` and `microsandbox()`. The Docker backend honors only `"allow-all"` and `"deny-all"` (at creation and via `setNetworkPolicy`); the just-bash backend rejects `setNetworkPolicy` entirely.
|
|
199
201
|
|
|
200
202
|
## Credential brokering
|
|
201
203
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -131,6 +131,26 @@
|
|
|
131
131
|
"import": "./dist/src/public/sandbox/index.js",
|
|
132
132
|
"default": "./dist/src/public/sandbox/index.js"
|
|
133
133
|
},
|
|
134
|
+
"./sandbox/docker": {
|
|
135
|
+
"types": "./dist/src/public/sandbox/docker.d.ts",
|
|
136
|
+
"import": "./dist/src/public/sandbox/docker.js",
|
|
137
|
+
"default": "./dist/src/public/sandbox/docker.js"
|
|
138
|
+
},
|
|
139
|
+
"./sandbox/just-bash": {
|
|
140
|
+
"types": "./dist/src/public/sandbox/just-bash.d.ts",
|
|
141
|
+
"import": "./dist/src/public/sandbox/just-bash.js",
|
|
142
|
+
"default": "./dist/src/public/sandbox/just-bash.js"
|
|
143
|
+
},
|
|
144
|
+
"./sandbox/microsandbox": {
|
|
145
|
+
"types": "./dist/src/public/sandbox/microsandbox.d.ts",
|
|
146
|
+
"import": "./dist/src/public/sandbox/microsandbox.js",
|
|
147
|
+
"default": "./dist/src/public/sandbox/microsandbox.js"
|
|
148
|
+
},
|
|
149
|
+
"./sandbox/vercel": {
|
|
150
|
+
"types": "./dist/src/public/sandbox/vercel.d.ts",
|
|
151
|
+
"import": "./dist/src/public/sandbox/vercel.js",
|
|
152
|
+
"default": "./dist/src/public/sandbox/vercel.js"
|
|
153
|
+
},
|
|
134
154
|
"./evals": {
|
|
135
155
|
"types": "./dist/src/evals/index.d.ts",
|
|
136
156
|
"import": "./dist/src/evals/index.js",
|
|
@@ -245,7 +265,8 @@
|
|
|
245
265
|
},
|
|
246
266
|
"dependencies": {
|
|
247
267
|
"nitro": "3.0.260610-beta",
|
|
248
|
-
"oxc-parser": "0.134.0"
|
|
268
|
+
"oxc-parser": "0.134.0",
|
|
269
|
+
"semver": "7.8.4"
|
|
249
270
|
},
|
|
250
271
|
"devDependencies": {
|
|
251
272
|
"@ai-sdk/anthropic": "4.0.0-canary.65",
|
|
@@ -269,7 +290,7 @@
|
|
|
269
290
|
"@workflow/errors": "5.0.0-beta.7",
|
|
270
291
|
"@workflow/world": "5.0.0-beta.9",
|
|
271
292
|
"@workflow/world-local": "5.0.0-beta.16",
|
|
272
|
-
"ai": "7.0.0-
|
|
293
|
+
"ai": ">=7.0.0-beta.177",
|
|
273
294
|
"autoevals": "0.0.132",
|
|
274
295
|
"chat": "4.29.0",
|
|
275
296
|
"chokidar": "5.0.0",
|
|
@@ -297,7 +318,7 @@
|
|
|
297
318
|
"peerDependencies": {
|
|
298
319
|
"@opentelemetry/api": "^1.0.0",
|
|
299
320
|
"@sveltejs/kit": "^2.0.0",
|
|
300
|
-
"ai": "7.0.0-
|
|
321
|
+
"ai": ">=7.0.0-beta.177",
|
|
301
322
|
"braintrust": "^3.0.0",
|
|
302
323
|
"just-bash": "^3.0.0",
|
|
303
324
|
"microsandbox": "^0.5.0",
|
|
@@ -348,10 +369,11 @@
|
|
|
348
369
|
},
|
|
349
370
|
"scripts": {
|
|
350
371
|
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
351
|
-
"build": "pnpm run build:js && node ./scripts/copy-docs.mjs && node ./scripts/stamp-version-tokens.mjs",
|
|
372
|
+
"build": "pnpm run check:bin-runtime-dependencies && pnpm run build:js && node ./scripts/copy-docs.mjs && node ./scripts/stamp-version-tokens.mjs",
|
|
352
373
|
"build:compiled": "node ./scripts/vendor-compiled.mjs",
|
|
353
374
|
"build:js": "pnpm run build:compiled && pnpm run clean && pnpm run build:types && node ./scripts/copy-compiled-assets.mjs && node ./scripts/build-rolldown.mjs",
|
|
354
375
|
"build:types": "pnpm run build:compiled && tsgo -p tsconfig.build.json",
|
|
376
|
+
"check:bin-runtime-dependencies": "node ./scripts/check-bin-runtime-dependencies.mjs",
|
|
355
377
|
"dev": "pnpm run build:compiled && tsgo -p tsconfig.dev.json --watch --preserveWatchOutput",
|
|
356
378
|
"test": "pnpm run test:unit && pnpm run test:integration",
|
|
357
379
|
"test:integration": "pnpm run build:js && vitest run --config vitest.integration.config.ts",
|