@kybernesis/create 0.12.0 → 0.12.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/dist/doctor.js CHANGED
@@ -367,9 +367,23 @@ export async function doctor() {
367
367
  }
368
368
  }
369
369
  // ── eve discovery + local port ─────────────────────────────────────────
370
- const info = capture("npx", ["eve", "info"], cwd);
371
- if (info === null)
372
- add("fail", "eve info failed", "run npx eve info for details");
370
+ /**
371
+ * Discovery, run with the environment the SERVER runs with.
372
+ *
373
+ * `eve info` compiles the agent, and an agent that reads a variable at module
374
+ * scope — a model id, a required credential — throws without it. eve does not
375
+ * load .env.local itself, so running this with a bare environment reported a
376
+ * healthy agent as a failed discovery, on a host where the service starts it
377
+ * correctly every time. That red is the one thing a person is told must be
378
+ * green before going further, so it stopped a deployment that was fine.
379
+ *
380
+ * `env` here is the same merged view every other check reads: .env.local
381
+ * underneath, the real environment on top.
382
+ */
383
+ const info = capture("npx", ["eve", "info"], cwd, env);
384
+ if (info === null) {
385
+ add("fail", "eve info failed", "run: set -a && . ./.env.local && set +a && npx eve info — the agent's own error is in that output");
386
+ }
373
387
  else {
374
388
  const diag = /Diagnostics\s+(\d+) errors?, (\d+) warnings?/.exec(info);
375
389
  if (diag && diag[1] === "0")
package/dist/util.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare function run(command: string, args: string[], options?: {
11
11
  allowFail?: boolean;
12
12
  quiet?: boolean;
13
13
  }): boolean;
14
- export declare function capture(command: string, args: string[], cwd?: string): string | null;
14
+ export declare function capture(command: string, args: string[], cwd?: string, extraEnv?: Record<string, string>): string | null;
15
15
  export declare function ask(question: string, fallback: string): Promise<string>;
16
16
  export declare function closePrompts(): void;
17
17
  /** Parse KEY="value" / KEY=value lines from an env file's contents. */
package/dist/util.js CHANGED
@@ -24,8 +24,12 @@ export function run(command, args, options) {
24
24
  }
25
25
  return ok;
26
26
  }
27
- export function capture(command, args, cwd) {
28
- const result = spawnSync(command, args, { cwd, encoding: "utf8", env: process.env });
27
+ export function capture(command, args, cwd, extraEnv) {
28
+ const result = spawnSync(command, args, {
29
+ cwd,
30
+ encoding: "utf8",
31
+ env: extraEnv ? { ...process.env, ...extraEnv } : process.env,
32
+ });
29
33
  return result.status === 0 ? result.stdout : null;
30
34
  }
31
35
  let rl = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kybernesis/create",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "The Kybernesis agent scaffolder and FDE toolkit: one command to a governed, remembering, multiplayer, self-testing eve agent — plus doctor and upgrade.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",