@moinulmoin/eden 0.1.4 → 0.2.0
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/NOTICE +0 -31
- package/README.md +37 -109
- package/dist/eve-control-plane.d.ts +22 -1
- package/dist/eve-control-plane.js +379 -27
- package/dist/eve-packaging.d.ts +7 -0
- package/dist/eve-packaging.js +144 -14
- package/dist/eve-runtime-image.d.ts +7 -0
- package/dist/eve-runtime-image.js +55 -13
- package/dist/eve.d.ts +17 -2
- package/dist/eve.js +60 -26
- package/dist/index.d.ts +7 -169
- package/dist/index.js +49 -6701
- package/package.json +3 -5
package/NOTICE
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
eve
|
|
2
|
-
Copyright 2026 Vercel, Inc. and contributors
|
|
3
|
-
|
|
4
|
-
This product includes software developed at Vercel, Inc.
|
|
5
|
-
(https://vercel.com/).
|
|
6
|
-
|
|
7
1
|
Eden
|
|
8
2
|
Copyright 2026 Eden contributors
|
|
9
3
|
|
|
10
|
-
This repository contains Eden-owned modified derivative implementations
|
|
11
|
-
informed by portable concepts from the Eve framework:
|
|
12
|
-
|
|
13
|
-
Eve, version 0.31.3
|
|
14
|
-
https://github.com/vercel/eve
|
|
15
|
-
reference commit: 0b102bc90e7cf2c3e294f6ca3af86c307d449b1a
|
|
16
|
-
|
|
17
|
-
Eve is distributed under the Apache License, Version 2.0. The applicable
|
|
18
|
-
Apache-2.0 terms are included in LICENSE. This notice is retained for the
|
|
19
|
-
Eve attribution obligation; it does not grant ownership of Eden's original
|
|
20
|
-
implementation.
|
|
21
|
-
|
|
22
4
|
Cloudflare Containers
|
|
23
5
|
@cloudflare/containers, version 0.3.7
|
|
24
6
|
https://github.com/cloudflare/containers
|
|
@@ -27,16 +9,3 @@ Eden's generated Worker host bundle includes software from
|
|
|
27
9
|
`@cloudflare/containers`, distributed under MIT OR Apache-2.0. Eden
|
|
28
10
|
redistributes that bundled software under the Apache-2.0 option included in
|
|
29
11
|
LICENSE.
|
|
30
|
-
|
|
31
|
-
The following Eden source files are marked in-file as modified derivatives of
|
|
32
|
-
portable Eve concepts:
|
|
33
|
-
|
|
34
|
-
packages/definitions/src/index.ts
|
|
35
|
-
packages/compiler/src/index.ts
|
|
36
|
-
packages/client/src/protocol.ts
|
|
37
|
-
packages/runtime-cloudflare/src/session-journal.ts
|
|
38
|
-
packages/runtime-cloudflare/src/model-normalizers.ts
|
|
39
|
-
|
|
40
|
-
Eden does not include unmodified Eve source. The listed files are Eden-owned
|
|
41
|
-
modifications and must retain their in-file modified-derivative notices when
|
|
42
|
-
redistributed.
|
package/README.md
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
# Eden
|
|
2
2
|
|
|
3
|
-
Eden
|
|
3
|
+
Eden deploys an existing [Vercel Eve](https://github.com/vercel/eve) project to
|
|
4
|
+
your own Cloudflare account through one CLI.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+

|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
project on Cloudflare without rewriting the project or replacing Eve.
|
|
9
|
-
- **Eden Agent** creates and runs a smaller Cloudflare-native durable agent from
|
|
10
|
-
an `agent/` directory.
|
|
11
|
-
|
|
12
|
-
If you already have an Eve project, start with `eden deploy`. If you want to
|
|
13
|
-
create a new Eden-native agent, start with `eden agent init`.
|
|
8
|
+
If you already have an Eve project, start with `eden deploy`.
|
|
14
9
|
|
|
15
10
|
## Install
|
|
16
11
|
|
|
17
12
|
Use any one of these package managers:
|
|
18
13
|
|
|
19
14
|
```sh
|
|
20
|
-
npm install --global @moinulmoin/eden@0.
|
|
15
|
+
npm install --global @moinulmoin/eden@0.2.0
|
|
21
16
|
```
|
|
22
17
|
|
|
23
18
|
```sh
|
|
24
|
-
pnpm add --global @moinulmoin/eden@0.
|
|
19
|
+
pnpm add --global @moinulmoin/eden@0.2.0
|
|
25
20
|
```
|
|
26
21
|
|
|
27
22
|
```sh
|
|
28
|
-
bun add --global @moinulmoin/eden@0.
|
|
23
|
+
bun add --global @moinulmoin/eden@0.2.0
|
|
29
24
|
```
|
|
30
25
|
|
|
31
26
|
Then confirm the CLI is available:
|
|
@@ -38,19 +33,15 @@ Bun can install Eden, but Eden still runs on Node. Do not use `bunx --bun`.
|
|
|
38
33
|
|
|
39
34
|
## Requirements
|
|
40
35
|
|
|
41
|
-
For every workflow:
|
|
42
|
-
|
|
43
36
|
- macOS or Linux
|
|
44
37
|
- Node `>=24.17.0`
|
|
45
|
-
- a Cloudflare account
|
|
38
|
+
- a Cloudflare account on the Workers Paid plan (required for Containers)
|
|
46
39
|
- Wrangler authentication:
|
|
47
40
|
|
|
48
41
|
```sh
|
|
49
42
|
npx wrangler@4.120.0 login
|
|
50
43
|
```
|
|
51
44
|
|
|
52
|
-
For **Eden Deploy**, also provide:
|
|
53
|
-
|
|
54
45
|
- Docker or OrbStack with Linux/amd64 container support
|
|
55
46
|
- an existing Eve project with an exact `packageManager: "pnpm@..."` entry
|
|
56
47
|
- the matching root `pnpm-lock.yaml`
|
|
@@ -60,15 +51,23 @@ For **Eden Deploy**, also provide:
|
|
|
60
51
|
Eden Deploy supports pinned pnpm Eve projects in this release. Bun lockfiles and
|
|
61
52
|
native Windows are not currently supported.
|
|
62
53
|
|
|
63
|
-
For **Eden Agent**, Corepack must be available. The setup below enables the
|
|
64
|
-
generated project's pinned pnpm `11.21.0` version once.
|
|
65
|
-
|
|
66
54
|
## Deploy an existing Eve project
|
|
67
55
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
56
|
+
From inside the Eve project:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
npx @moinulmoin/eden deploy
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
With no flags, `deploy` uses the current directory, the `preview`
|
|
63
|
+
environment, and a target name derived deterministically from the project's
|
|
64
|
+
`package.json` name. Deploy performs its checks inline, installs the
|
|
65
|
+
project's pinned pnpm lockfile, runs its project-local Eve executable,
|
|
66
|
+
packages the real Eve server into one Cloudflare Container, and publishes one
|
|
67
|
+
Worker in front of it.
|
|
68
|
+
|
|
69
|
+
Explicit selectors still work, and `--name` is required for `--env
|
|
70
|
+
production` and `destroy`:
|
|
72
71
|
|
|
73
72
|
```sh
|
|
74
73
|
eden deploy \
|
|
@@ -77,8 +76,10 @@ eden deploy \
|
|
|
77
76
|
--name my-eve-preview
|
|
78
77
|
```
|
|
79
78
|
|
|
80
|
-
A successful command prints
|
|
81
|
-
|
|
79
|
+
A successful command prints progress lines followed by a summary with the
|
|
80
|
+
target, the Eve version, and its `workers.dev` URL on its own line. Eden does not
|
|
81
|
+
change the source directory. All three commands accept `--json` for the
|
|
82
|
+
machine-readable result object, for scripts and CI.
|
|
82
83
|
|
|
83
84
|
If the Eve project needs runtime values, put them in a regular owner-readable
|
|
84
85
|
environment file outside source control:
|
|
@@ -104,81 +105,12 @@ eden preflight \
|
|
|
104
105
|
Remove exactly that deployment when finished:
|
|
105
106
|
|
|
106
107
|
```sh
|
|
107
|
-
eden destroy
|
|
108
|
-
--project ./my-eve-app \
|
|
109
|
-
--env preview \
|
|
110
|
-
--name my-eve-preview
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Destroy verifies Eden's ownership record and the current remote identity before
|
|
114
|
-
removing anything. It never deletes by prefix or broad account search.
|
|
115
|
-
|
|
116
|
-
## Create an Eden Agent
|
|
117
|
-
|
|
118
|
-
Create a project in an empty directory:
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
mkdir my-agent
|
|
122
|
-
eden agent init --project ./my-agent
|
|
123
|
-
cd my-agent
|
|
124
|
-
corepack enable
|
|
125
|
-
pnpm install
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
The generated project contains:
|
|
129
|
-
|
|
130
|
-
```text
|
|
131
|
-
agent/
|
|
132
|
-
├── agent.ts
|
|
133
|
-
├── instructions.md
|
|
134
|
-
└── tools/
|
|
135
|
-
└── greet.ts
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Build the static Worker generation:
|
|
139
|
-
|
|
140
|
-
```sh
|
|
141
|
-
pnpm run build
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Start it locally with an explicit bearer secret:
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
export EDEN_BEARER_SECRET="$(node -e 'process.stdout.write(require("node:crypto").randomBytes(24).toString("hex"))')"
|
|
148
|
-
pnpm run dev
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
The local endpoints are:
|
|
152
|
-
|
|
153
|
-
- Worker: `http://127.0.0.1:8797`
|
|
154
|
-
- Wrangler inspector: `http://127.0.0.1:9297`
|
|
155
|
-
|
|
156
|
-
Leave this terminal running until Eden prints its ready message. Press `Ctrl-C`
|
|
157
|
-
to stop local development before continuing to deployment; the bearer value
|
|
158
|
-
remains in the current shell.
|
|
159
|
-
|
|
160
|
-
Deploy the Agent to an explicit preview target:
|
|
161
|
-
|
|
162
|
-
```sh
|
|
163
|
-
pnpm run deploy \
|
|
164
|
-
--env preview \
|
|
165
|
-
--name my-agent-preview
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
After testing, remove the exact preview Worker and its secret:
|
|
169
|
-
|
|
170
|
-
```sh
|
|
171
|
-
pnpm exec wrangler secret delete EDEN_BEARER_SECRET \
|
|
172
|
-
--name my-agent-preview \
|
|
173
|
-
--config "$PWD/wrangler.jsonc"
|
|
174
|
-
pnpm exec wrangler delete my-agent-preview \
|
|
175
|
-
--env preview \
|
|
176
|
-
--config "$PWD/wrangler.jsonc" \
|
|
177
|
-
--force
|
|
178
|
-
unset EDEN_BEARER_SECRET
|
|
108
|
+
eden destroy --name my-eve-preview
|
|
179
109
|
```
|
|
180
110
|
|
|
181
|
-
|
|
111
|
+
Destroy always requires an explicit `--name`. It verifies Eden's ownership
|
|
112
|
+
record and the current remote identity before removing anything. It never
|
|
113
|
+
deletes by prefix or broad account search.
|
|
182
114
|
|
|
183
115
|
## Command map
|
|
184
116
|
|
|
@@ -187,22 +119,19 @@ Run these commands only for the explicit preview name you just created.
|
|
|
187
119
|
| `eden preflight` | Build and inspect an Eve candidate without remote mutation |
|
|
188
120
|
| `eden deploy` | Deploy an existing Eve project to one exact target |
|
|
189
121
|
| `eden destroy` | Remove one exact Eden-owned Eve deployment |
|
|
190
|
-
| `eden agent init` | Create an Eden Agent project |
|
|
191
|
-
| `eden agent build` | Compile an Agent generation |
|
|
192
|
-
| `eden agent dev` | Run the Agent locally |
|
|
193
|
-
| `eden agent deploy` | Deploy the Agent runtime |
|
|
194
122
|
|
|
195
123
|
Run `eden <command> --help` for command-specific options.
|
|
196
124
|
|
|
197
125
|
## What Eden does not do
|
|
198
126
|
|
|
199
|
-
- Deploy does not translate Eve into an Eden Agent.
|
|
200
127
|
- Deploy does not replace the Eve project's providers, databases, Workflow
|
|
201
128
|
World, authentication, schedules, channels, or sandbox.
|
|
202
|
-
- Container
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
129
|
+
- Container disk and memory are wiped when the Container sleeps. Durable
|
|
130
|
+
state needs a project-configured, Cloudflare-reachable Workflow World such
|
|
131
|
+
as Postgres (for example `@workflow/world-postgres`).
|
|
132
|
+
- Schedules do not fire while the Container sleeps.
|
|
133
|
+
- This release uses one logical Container instance (`basic`, 1 GiB) and does
|
|
134
|
+
not promise horizontal scaling or custom domains.
|
|
206
135
|
- Bun is an installer only; Node remains the runtime.
|
|
207
136
|
|
|
208
137
|
## Documentation
|
|
@@ -210,7 +139,6 @@ Run `eden <command> --help` for command-specific options.
|
|
|
210
139
|
- [Documentation index](https://github.com/moinulmoin/eden/blob/main/docs/README.md)
|
|
211
140
|
- [Installation](https://github.com/moinulmoin/eden/blob/main/docs/install.md)
|
|
212
141
|
- [Deploying Eve projects](https://github.com/moinulmoin/eden/blob/main/docs/deploy.md)
|
|
213
|
-
- [Eden Agent CLI](https://github.com/moinulmoin/eden/blob/main/docs/agent-cli.md)
|
|
214
142
|
- [Validation and cleanup](https://github.com/moinulmoin/eden/blob/main/docs/validation.md)
|
|
215
143
|
|
|
216
144
|
## License
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EveCliEnvironment, type EveCliExecutionRequest } from "./eve.js";
|
|
2
2
|
import { type EveNodeImage, type EveProjectBuildCandidate, type EveProjectBuilder } from "./eve-packaging.js";
|
|
3
|
-
import { type EveHostRequirements, type EveRuntimeCleanup } from "./eve-runtime-image.js";
|
|
3
|
+
import { type EveHostRequirements, type EveRuntimeCleanup, type EveRuntimeImageDiscardRequest } from "./eve-runtime-image.js";
|
|
4
4
|
import { type EveRuntimeConfig, type EveRuntimeInjection, type EveRuntimeProtectedStore } from "./eve-runtime-config.js";
|
|
5
5
|
import type { EveHostConfig } from "@moinulmoin/eden-runtime-cloudflare";
|
|
6
6
|
export declare const DEFAULT_EVE_HOST_REQUIREMENTS: EveHostRequirements;
|
|
@@ -79,6 +79,7 @@ export interface EvePreflightRuntimeRunnerRequest {
|
|
|
79
79
|
readonly retainImage?: boolean;
|
|
80
80
|
}
|
|
81
81
|
export type EvePreflightRuntimeRunner = (request: EvePreflightRuntimeRunnerRequest) => EvePreflightRuntimeEvidence | Promise<EvePreflightRuntimeEvidence>;
|
|
82
|
+
export type EveRuntimeImageDiscardRunner = (request: EveRuntimeImageDiscardRequest) => boolean | Promise<boolean>;
|
|
82
83
|
export interface EveDeploymentIdentity {
|
|
83
84
|
readonly projectId: string;
|
|
84
85
|
readonly sourceDigest: string;
|
|
@@ -189,8 +190,15 @@ export interface EvePreflightOptions {
|
|
|
189
190
|
readonly compensate?: EveDeploymentCompensationRunner;
|
|
190
191
|
readonly health?: EveDeploymentHealthRunner;
|
|
191
192
|
readonly afterPromotion?: () => void | Promise<void>;
|
|
193
|
+
readonly discardRuntimeImage?: EveRuntimeImageDiscardRunner;
|
|
192
194
|
readonly retainRuntimeImage?: boolean;
|
|
193
195
|
readonly stdout?: (line: string) => void;
|
|
196
|
+
/**
|
|
197
|
+
* "human" prints short progress lines and a summary; "json" prints only the
|
|
198
|
+
* machine-readable result object. Programmatic callers default to "json";
|
|
199
|
+
* the CLI passes "human" unless --json was supplied.
|
|
200
|
+
*/
|
|
201
|
+
readonly outputFormat?: "human" | "json";
|
|
194
202
|
/**
|
|
195
203
|
* Destroy seams. Defaults use only Wrangler reads/deletes plus the
|
|
196
204
|
* immutable local deployment record; tests may inject exact fakes.
|
|
@@ -198,11 +206,19 @@ export interface EvePreflightOptions {
|
|
|
198
206
|
readonly destroyCloudflareRead?: EveDestroyCloudflareReadRunner;
|
|
199
207
|
readonly deleteWorker?: EveWorkerDeleteRunner;
|
|
200
208
|
readonly deleteContainer?: EveContainerDeleteRunner;
|
|
209
|
+
readonly deleteRegistryImage?: EveRegistryImageDeleteRunner;
|
|
201
210
|
}
|
|
202
211
|
export interface EveDestroyTargetRead {
|
|
203
212
|
readonly workerExists: boolean;
|
|
204
213
|
readonly containerApplicationId?: string;
|
|
205
214
|
readonly accountId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Subset of the request's owned registry image tags (`repository:tag`)
|
|
217
|
+
* still present in the managed registry. `undefined` means the reader
|
|
218
|
+
* could not enumerate the registry; destroy then relies on the exact
|
|
219
|
+
* delete outcomes only.
|
|
220
|
+
*/
|
|
221
|
+
readonly registryImagesPresent?: readonly string[];
|
|
206
222
|
}
|
|
207
223
|
export type EveDestroyCloudflareReadRunner = (request: EveDestroyCloudflareReadRequest) => EveDestroyTargetRead | Promise<EveDestroyTargetRead>;
|
|
208
224
|
export type EveWorkerDeleteRunner = (request: {
|
|
@@ -211,10 +227,15 @@ export type EveWorkerDeleteRunner = (request: {
|
|
|
211
227
|
export type EveContainerDeleteRunner = (request: {
|
|
212
228
|
readonly applicationId: string;
|
|
213
229
|
}) => "deleted" | "absent" | "indeterminate" | Promise<"deleted" | "absent" | "indeterminate">;
|
|
230
|
+
export type EveRegistryImageDeleteRunner = (request: {
|
|
231
|
+
readonly image: string;
|
|
232
|
+
}) => "deleted" | "absent" | "indeterminate" | Promise<"deleted" | "absent" | "indeterminate">;
|
|
214
233
|
export type EveRuntimeConfigLoader = (path: string, cwd: string) => EveRuntimeConfig | Promise<EveRuntimeConfig>;
|
|
215
234
|
export interface EveDestroyCloudflareReadRequest {
|
|
216
235
|
readonly workerName: string;
|
|
217
236
|
readonly containerApplicationName: string;
|
|
237
|
+
/** Exact `repository:tag` image refs recorded for this target. */
|
|
238
|
+
readonly registryImages?: readonly string[];
|
|
218
239
|
}
|
|
219
240
|
export declare function runEveControlPlane(request: EveCliExecutionRequest, options?: EvePreflightOptions): Promise<void>;
|
|
220
241
|
export interface EveDestroyOutcome {
|