@vendoai/vendo 0.4.4 → 0.4.5
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/dist/cli/doctor-codes.d.ts +1 -0
- package/dist/cli/doctor-codes.js +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +34 -1
- package/dist/cli/playground/bundle.gen.d.ts +1 -1
- package/dist/cli/playground/bundle.gen.js +1 -1
- package/dist/cli/playground/embed-bundle.gen.d.ts +1 -1
- package/dist/cli/playground/embed-bundle.gen.js +1 -1
- package/dist/cli/shared.d.ts +1 -1
- package/dist/cli/shared.js +1 -1
- package/dist/wire/shared.d.ts +1 -1
- package/dist/wire/shared.js +1 -1
- package/package.json +11 -11
|
@@ -32,6 +32,7 @@ export declare const DOCTOR_ERROR_CODES: {
|
|
|
32
32
|
readonly "E-LIVE-004": "no execution venue is configured";
|
|
33
33
|
readonly "E-LIVE-005": "the host /status does not report an execution venue (version skew)";
|
|
34
34
|
readonly "E-LIVE-006": "the app's root page returns a server error while the wire answers";
|
|
35
|
+
readonly "E-LIVE-007": "the selected e2b execution venue is unusable (E2B_API_KEY or the e2b package is missing)";
|
|
35
36
|
readonly "E-AUTH-001": "present credentials did not reach the host API";
|
|
36
37
|
readonly "E-AUTH-002": "the present credential probe is unreachable";
|
|
37
38
|
readonly "E-AUTH-003": "the present credential probe cannot run while the dev server is down";
|
package/dist/cli/doctor-codes.js
CHANGED
|
@@ -33,6 +33,7 @@ export const DOCTOR_ERROR_CODES = {
|
|
|
33
33
|
"E-LIVE-004": "no execution venue is configured",
|
|
34
34
|
"E-LIVE-005": "the host /status does not report an execution venue (version skew)",
|
|
35
35
|
"E-LIVE-006": "the app's root page returns a server error while the wire answers",
|
|
36
|
+
"E-LIVE-007": "the selected e2b execution venue is unusable (E2B_API_KEY or the e2b package is missing)",
|
|
36
37
|
"E-AUTH-001": "present credentials did not reach the host API",
|
|
37
38
|
"E-AUTH-002": "the present credential probe is unreachable",
|
|
38
39
|
"E-AUTH-003": "the present credential probe cannot run while the dev server is down",
|
package/dist/cli/doctor.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export interface DoctorOptions {
|
|
|
34
34
|
ok: boolean;
|
|
35
35
|
stop: () => void;
|
|
36
36
|
}>;
|
|
37
|
+
e2bResolvable?: (root: string) => boolean;
|
|
37
38
|
}
|
|
38
39
|
/** Doctor runs standalone, so unlike the dev server it gets no framework
|
|
39
40
|
* dotenv loading — without this, `VENDO_API_KEY` sitting in `.env.local`
|
package/dist/cli/doctor.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
2
3
|
import { join, resolve } from "node:path";
|
|
3
4
|
import { stdin, stdout } from "node:process";
|
|
4
5
|
import { cloudDoctor, liveModelTurn, startDevServerForProbe, } from "./doctor-live.js";
|
|
@@ -10,6 +11,20 @@ import { detectFramework, detectVendoWiring } from "./framework.js";
|
|
|
10
11
|
import { walk } from "./theme/walk.js";
|
|
11
12
|
import { remoteUrls, sameUrl, validateRegistryServer } from "./mcp/registry.js";
|
|
12
13
|
import { askYesNo, CLI_VERSION, consoleOutput, exists, normalizeDotEnvValue, readOptional, toolingTelemetry } from "./shared.js";
|
|
14
|
+
/** Whether the optional `e2b` SDK resolves from the target project — the same
|
|
15
|
+
* node_modules walk the running wire's dynamic `import("e2b")` performs, so
|
|
16
|
+
* doctor certifies the venue against the resolution that will actually be
|
|
17
|
+
* asked to load it (0.4.4 defect C: /status said e2b on a host without the
|
|
18
|
+
* SDK, and the first build died in an unusable venue). */
|
|
19
|
+
function e2bResolvableFrom(root) {
|
|
20
|
+
try {
|
|
21
|
+
createRequire(join(root, "__vendo-doctor-probe__.js")).resolve("e2b");
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
13
28
|
async function hasDependency(root) {
|
|
14
29
|
try {
|
|
15
30
|
const manifest = JSON.parse(await readFile(join(root, "package.json"), "utf8"));
|
|
@@ -330,7 +345,25 @@ export async function runDoctor(options) {
|
|
|
330
345
|
// 10-mcp §1 — the door flag lives under blocks.mcp.
|
|
331
346
|
mcpEnabled = body.blocks.mcp === true;
|
|
332
347
|
sandboxVenue = body.blocks.sandbox;
|
|
333
|
-
if (sandboxVenue === "e2b"
|
|
348
|
+
if (sandboxVenue === "e2b") {
|
|
349
|
+
// 0.4.4 defect C — "ok: execution venue: e2b" on a host that cannot
|
|
350
|
+
// actually run e2b is a false blessing: the venue must be USABLE
|
|
351
|
+
// (key set and SDK resolvable from this project), or every server-app
|
|
352
|
+
// build dies in it instead of riding the Cloud sandbox.
|
|
353
|
+
const keyPresent = typeof env.E2B_API_KEY === "string" && env.E2B_API_KEY.trim() !== "";
|
|
354
|
+
const installed = (options.e2bResolvable ?? e2bResolvableFrom)(root);
|
|
355
|
+
if (keyPresent && installed) {
|
|
356
|
+
pass("live/venue", "execution venue: e2b");
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
const missing = [
|
|
360
|
+
...(keyPresent ? [] : ["E2B_API_KEY is not set"]),
|
|
361
|
+
...(installed ? [] : ["the e2b package does not resolve from this project"]),
|
|
362
|
+
].join(" and ");
|
|
363
|
+
fail("live/venue", "E-LIVE-007", `the running wire selected the e2b execution venue but ${missing}; server-app builds will fail in an unusable sandbox. Fix: install the e2b package and set E2B_API_KEY, or remove E2B_API_KEY from the server env (with VENDO_API_KEY set, the managed Cloud sandbox takes over), then restart the dev server and re-run doctor`);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
else if (sandboxVenue === "cloud" || sandboxVenue === "custom") {
|
|
334
367
|
pass("live/venue", `execution venue: ${sandboxVenue}`);
|
|
335
368
|
}
|
|
336
369
|
else if (sandboxVenue === false) {
|