@moinulmoin/eden 0.7.0 → 0.7.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/README.md +3 -3
- package/dist/eve-control-plane.js +7 -3
- package/dist/eve-packaging.d.ts +11 -4
- package/dist/eve-packaging.js +26 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,15 +12,15 @@ If you already have an Eve project, start with `eden deploy`.
|
|
|
12
12
|
Use any one of these package managers:
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm install --global @moinulmoin/eden@0.7.
|
|
15
|
+
npm install --global @moinulmoin/eden@0.7.1
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
pnpm add --global @moinulmoin/eden@0.7.
|
|
19
|
+
pnpm add --global @moinulmoin/eden@0.7.1
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
bun add --global @moinulmoin/eden@0.7.
|
|
23
|
+
bun add --global @moinulmoin/eden@0.7.1
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Then confirm the CLI is available:
|
|
@@ -1010,7 +1010,11 @@ async function writeEveDeploymentArtifacts(candidate, hostConfig, workerSource)
|
|
|
1010
1010
|
});
|
|
1011
1011
|
return { workerSourcePath, wranglerConfigPath };
|
|
1012
1012
|
}
|
|
1013
|
-
|
|
1013
|
+
/** Deadline for bounded Wrangler reads, secret writes, pushes, and deletions. */
|
|
1014
|
+
const WRANGLER_OPERATION_TIMEOUT_MS = 120_000;
|
|
1015
|
+
/** Deadline for `wrangler deploy`, whose Container image preparation alone can approach two minutes. */
|
|
1016
|
+
const WRANGLER_PUBLICATION_TIMEOUT_MS = 600_000;
|
|
1017
|
+
function runWranglerWithInput(args, cwd, input, timeoutMs = WRANGLER_OPERATION_TIMEOUT_MS) {
|
|
1014
1018
|
return new Promise((resolveResult) => {
|
|
1015
1019
|
const child = spawn(process.execPath, [wranglerEntrypoint, ...args], {
|
|
1016
1020
|
cwd,
|
|
@@ -1037,7 +1041,7 @@ function runWranglerWithInput(args, cwd, input) {
|
|
|
1037
1041
|
stdout,
|
|
1038
1042
|
stderr: "The bounded Wrangler operation timed out.",
|
|
1039
1043
|
});
|
|
1040
|
-
},
|
|
1044
|
+
}, timeoutMs);
|
|
1041
1045
|
child.stdout.on("data", (chunk) => {
|
|
1042
1046
|
stdout += chunk.toString();
|
|
1043
1047
|
});
|
|
@@ -1156,7 +1160,7 @@ function defaultPublicationRunner() {
|
|
|
1156
1160
|
"--env",
|
|
1157
1161
|
request.identity.environment,
|
|
1158
1162
|
"--strict",
|
|
1159
|
-
], dirname(request.wranglerConfigPath));
|
|
1163
|
+
], dirname(request.wranglerConfigPath), undefined, WRANGLER_PUBLICATION_TIMEOUT_MS);
|
|
1160
1164
|
if (result.exitCode !== 0) {
|
|
1161
1165
|
return {
|
|
1162
1166
|
status: "indeterminate",
|
package/dist/eve-packaging.d.ts
CHANGED
|
@@ -277,13 +277,15 @@ export declare class EvePackagingError extends Error {
|
|
|
277
277
|
* rewrites one file in the installed Eve copy so an existing session reopens
|
|
278
278
|
* against the current template instead of throwing; user files under
|
|
279
279
|
* `/workspace` always win over the template. The patch applies only when the
|
|
280
|
-
* target file's sha256
|
|
281
|
-
* is removed entirely once upstream ships the fix.
|
|
280
|
+
* target file's sha256 matches a known binding and selects that binding's
|
|
281
|
+
* replacement; it is removed entirely once upstream ships the fix.
|
|
282
282
|
*/
|
|
283
283
|
export declare const EVE_SANDBOX_RESUME_PATCH_KNOWN_SHA256 = "0ba0ac3a237c99af2f67a6028f1675bf7c04b22454b4ebfb4cd9d19e5bf5aaf8";
|
|
284
|
+
/** Eve 0.79.1 stores a template key instead of an absolute template path. */
|
|
285
|
+
export declare const EVE_SANDBOX_RESUME_PATCH_LATEST_SHA256 = "ab8b1ad7398af8f6fd2a1e91eb0d1ff8d2b9b9afe1836234f36ce0e896791c45";
|
|
284
286
|
/** Marker the patched binding always contains; proves the patch shipped. */
|
|
285
287
|
export declare const EVE_SANDBOX_RESUME_PATCH_SIGNATURE = "edenRefreshJustBashSessionSkills";
|
|
286
|
-
/** The exact `resume()` implementation in
|
|
288
|
+
/** The exact `resume()` implementation in Eve 0.68.0, 0.71.2, 0.72.1, and 0.79.1. */
|
|
287
289
|
export declare const EVE_JUST_BASH_RESUME_ORIGINAL = "async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if(a.generation!==o||a.rootPath!==s)throw Error(`just-bash session state is incompatible with this environment.`);if(!await pathExists(a.rootPath))throw Error(`just-bash session root \"${a.rootPath}\" no longer exists.`);return await openHandle(e,a.rootPath,t)}";
|
|
288
290
|
/**
|
|
289
291
|
* The replacement `resume()`: a session whose template generation moved is
|
|
@@ -293,6 +295,11 @@ export declare const EVE_JUST_BASH_RESUME_ORIGINAL = "async resume(e,n,r){let i=
|
|
|
293
295
|
* current template instead of failing every later sandbox call.
|
|
294
296
|
*/
|
|
295
297
|
export declare const EVE_SANDBOX_RESUME_PATCHED = "async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if((a.generation!==o||a.rootPath!==s)&&dirname(a.rootPath)!==dirname(s))throw Error(`just-bash session state is incompatible with this environment.`);await ensureSessionRoot(i,a.rootPath);if(a.generation!==o)await edenRefreshJustBashSessionSkills(i.templateRootPath,a.rootPath);return await openHandle(e,a.rootPath,t)}";
|
|
298
|
+
/**
|
|
299
|
+
* Eve 0.79.1 resolves the current template key under the runtime cache.
|
|
300
|
+
* Its ensureSessionRoot accepts that path, not the prepared artifact.
|
|
301
|
+
*/
|
|
302
|
+
export declare const EVE_SANDBOX_RESUME_PATCHED_LATEST = "async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if((a.generation!==o||a.rootPath!==s)&&dirname(a.rootPath)!==dirname(s))throw Error(`just-bash session state is incompatible with this environment.`);let c=resolveTemplateRootPath(e.storagePath,i.templateKey);await ensureSessionRoot(c,a.rootPath);if(a.generation!==o)await edenRefreshJustBashSessionSkills(c,a.rootPath);return await openHandle(e,a.rootPath,t)}";
|
|
296
303
|
/**
|
|
297
304
|
* Helpers appended to the patched binding. They use only identifiers the
|
|
298
305
|
* module already imports (`readdir`, `rm`, `join`, `pathExists`,
|
|
@@ -305,7 +312,7 @@ export declare const EVE_SANDBOX_RESUME_PATCH_HELPERS = "async function edenRefr
|
|
|
305
312
|
/**
|
|
306
313
|
* The CommonJS patcher the isolated builder runs between the frozen install
|
|
307
314
|
* and `eve build` (and again for the production reinstall). It never touches
|
|
308
|
-
* project files, applies only against
|
|
315
|
+
* project files, applies only against known sha256 hashes, verifies the
|
|
309
316
|
* replacement matched exactly once, validates the result with `node --check`,
|
|
310
317
|
* and breaks hardlinks by writing a temp file and renaming it into place.
|
|
311
318
|
*/
|
package/dist/eve-packaging.js
CHANGED
|
@@ -40,15 +40,17 @@ const IGNORED_BUILDS_GUARD = `node -e 'const m=JSON.parse(require("fs").readFile
|
|
|
40
40
|
* rewrites one file in the installed Eve copy so an existing session reopens
|
|
41
41
|
* against the current template instead of throwing; user files under
|
|
42
42
|
* `/workspace` always win over the template. The patch applies only when the
|
|
43
|
-
* target file's sha256
|
|
44
|
-
* is removed entirely once upstream ships the fix.
|
|
43
|
+
* target file's sha256 matches a known binding and selects that binding's
|
|
44
|
+
* replacement; it is removed entirely once upstream ships the fix.
|
|
45
45
|
*/
|
|
46
46
|
export const EVE_SANDBOX_RESUME_PATCH_KNOWN_SHA256 = "0ba0ac3a237c99af2f67a6028f1675bf7c04b22454b4ebfb4cd9d19e5bf5aaf8";
|
|
47
|
+
/** Eve 0.79.1 stores a template key instead of an absolute template path. */
|
|
48
|
+
export const EVE_SANDBOX_RESUME_PATCH_LATEST_SHA256 = "ab8b1ad7398af8f6fd2a1e91eb0d1ff8d2b9b9afe1836234f36ce0e896791c45";
|
|
47
49
|
/** Marker the patched binding always contains; proves the patch shipped. */
|
|
48
50
|
export const EVE_SANDBOX_RESUME_PATCH_SIGNATURE = "edenRefreshJustBashSessionSkills";
|
|
49
51
|
/** Path of the just-bash binding inside the resolved Eve package root. */
|
|
50
52
|
const EVE_JUST_BASH_BINDING_PATH = "dist/src/execution/sandbox/bindings/just-bash.js";
|
|
51
|
-
/** The exact `resume()` implementation in
|
|
53
|
+
/** The exact `resume()` implementation in Eve 0.68.0, 0.71.2, 0.72.1, and 0.79.1. */
|
|
52
54
|
export const EVE_JUST_BASH_RESUME_ORIGINAL = `async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if(a.generation!==o||a.rootPath!==s)throw Error(\`just-bash session state is incompatible with this environment.\`);if(!await pathExists(a.rootPath))throw Error(\`just-bash session root "\${a.rootPath}" no longer exists.\`);return await openHandle(e,a.rootPath,t)}`;
|
|
53
55
|
/**
|
|
54
56
|
* The replacement `resume()`: a session whose template generation moved is
|
|
@@ -58,6 +60,11 @@ export const EVE_JUST_BASH_RESUME_ORIGINAL = `async resume(e,n,r){let i=requireP
|
|
|
58
60
|
* current template instead of failing every later sandbox call.
|
|
59
61
|
*/
|
|
60
62
|
export const EVE_SANDBOX_RESUME_PATCHED = `async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if((a.generation!==o||a.rootPath!==s)&&dirname(a.rootPath)!==dirname(s))throw Error(\`just-bash session state is incompatible with this environment.\`);await ensureSessionRoot(i,a.rootPath);if(a.generation!==o)await edenRefreshJustBashSessionSkills(i.templateRootPath,a.rootPath);return await openHandle(e,a.rootPath,t)}`;
|
|
63
|
+
/**
|
|
64
|
+
* Eve 0.79.1 resolves the current template key under the runtime cache.
|
|
65
|
+
* Its ensureSessionRoot accepts that path, not the prepared artifact.
|
|
66
|
+
*/
|
|
67
|
+
export const EVE_SANDBOX_RESUME_PATCHED_LATEST = `async resume(e,n,r){let i=requirePreparedJustBashArtifact(n),a=requireJustBashSessionState(r),o=createSandboxProviderIdentity({artifact:i,version:1}),s=sessionRootPath(e,i);if((a.generation!==o||a.rootPath!==s)&&dirname(a.rootPath)!==dirname(s))throw Error(\`just-bash session state is incompatible with this environment.\`);let c=resolveTemplateRootPath(e.storagePath,i.templateKey);await ensureSessionRoot(c,a.rootPath);if(a.generation!==o)await edenRefreshJustBashSessionSkills(c,a.rootPath);return await openHandle(e,a.rootPath,t)}`;
|
|
61
68
|
/**
|
|
62
69
|
* Helpers appended to the patched binding. They use only identifiers the
|
|
63
70
|
* module already imports (`readdir`, `rm`, `join`, `pathExists`,
|
|
@@ -72,7 +79,7 @@ async function edenFindTemplateSkillsRelativePath(e){let t=[["",0]];for(;t.lengt
|
|
|
72
79
|
/**
|
|
73
80
|
* The CommonJS patcher the isolated builder runs between the frozen install
|
|
74
81
|
* and `eve build` (and again for the production reinstall). It never touches
|
|
75
|
-
* project files, applies only against
|
|
82
|
+
* project files, applies only against known sha256 hashes, verifies the
|
|
76
83
|
* replacement matched exactly once, validates the result with `node --check`,
|
|
77
84
|
* and breaks hardlinks by writing a temp file and renaming it into place.
|
|
78
85
|
*/
|
|
@@ -81,17 +88,24 @@ export const EVE_SANDBOX_RESUME_PATCH_SCRIPT = `// Eden temporary fix for https:
|
|
|
81
88
|
// sandbox template changes (skills, agent/sandbox/workspace/, sandbox
|
|
82
89
|
// definition) and never falls back. This rewrites one file in the installed
|
|
83
90
|
// Eve copy so an existing session reopens against the current template. It
|
|
84
|
-
// runs only against
|
|
85
|
-
// ships the fix.
|
|
91
|
+
// runs only against sha256 hashes Eden knows, with a replacement specific to
|
|
92
|
+
// each binding, and is removed once upstream ships the fix.
|
|
86
93
|
const fs = require("node:fs");
|
|
87
94
|
const path = require("node:path");
|
|
88
95
|
const crypto = require("node:crypto");
|
|
89
96
|
const { spawnSync } = require("node:child_process");
|
|
90
|
-
const
|
|
97
|
+
const KNOWN_PATCHES = ${JSON.stringify({
|
|
98
|
+
[EVE_SANDBOX_RESUME_PATCH_KNOWN_SHA256]: {
|
|
99
|
+
original: EVE_JUST_BASH_RESUME_ORIGINAL,
|
|
100
|
+
replacement: EVE_SANDBOX_RESUME_PATCHED,
|
|
101
|
+
},
|
|
102
|
+
[EVE_SANDBOX_RESUME_PATCH_LATEST_SHA256]: {
|
|
103
|
+
original: EVE_JUST_BASH_RESUME_ORIGINAL,
|
|
104
|
+
replacement: EVE_SANDBOX_RESUME_PATCHED_LATEST,
|
|
105
|
+
},
|
|
106
|
+
})};
|
|
91
107
|
const SIGNATURE = ${JSON.stringify(EVE_SANDBOX_RESUME_PATCH_SIGNATURE)};
|
|
92
108
|
const BINDING_PATH = ${JSON.stringify(EVE_JUST_BASH_BINDING_PATH)};
|
|
93
|
-
const ORIGINAL = ${JSON.stringify(EVE_JUST_BASH_RESUME_ORIGINAL)};
|
|
94
|
-
const PATCHED_RESUME = ${JSON.stringify(EVE_SANDBOX_RESUME_PATCHED)};
|
|
95
109
|
const HELPERS = ${JSON.stringify(EVE_SANDBOX_RESUME_PATCH_HELPERS)};
|
|
96
110
|
function finish(outcome, detail) {
|
|
97
111
|
console.log("eden-eve-sandbox-resume-patch: " + outcome + " (" + detail + ")");
|
|
@@ -116,10 +130,12 @@ if (source.includes(SIGNATURE)) {
|
|
|
116
130
|
process.exit(0);
|
|
117
131
|
}
|
|
118
132
|
const digest = crypto.createHash("sha256").update(source).digest("hex");
|
|
119
|
-
|
|
133
|
+
const patch = KNOWN_PATCHES[digest];
|
|
134
|
+
if (patch === undefined) {
|
|
120
135
|
finish("skipped", "sha256 " + digest + " is not a version Eden knows (eve#4440)");
|
|
121
136
|
process.exit(0);
|
|
122
137
|
}
|
|
138
|
+
const { original: ORIGINAL, replacement: PATCHED_RESUME } = patch;
|
|
123
139
|
const first = source.indexOf(ORIGINAL);
|
|
124
140
|
if (first === -1 || source.indexOf(ORIGINAL, first + 1) !== -1) {
|
|
125
141
|
console.error("eden-eve-sandbox-resume-patch: the known resume implementation did not match exactly once; refusing to patch");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moinulmoin/eden",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Deploy existing Eve projects to your own Cloudflare account.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"NOTICE"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@moinulmoin/eden-runtime-cloudflare": "0.7.
|
|
34
|
+
"@moinulmoin/eden-runtime-cloudflare": "0.7.1",
|
|
35
35
|
"wrangler": "4.147.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|