@vellumai/cli 0.5.13 → 0.5.15

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.
@@ -42,6 +42,7 @@ import { hatchGcp } from "../lib/gcp";
42
42
  import type { PollResult, WatchHatchingResult } from "../lib/gcp";
43
43
  import { buildNestedConfig, writeInitialConfig } from "../lib/config-utils";
44
44
  import {
45
+ generateLocalSigningKey,
45
46
  startLocalDaemon,
46
47
  startGateway,
47
48
  stopLocalProcesses,
@@ -776,12 +777,16 @@ async function hatchLocal(
776
777
  const defaultWorkspaceConfigPath = writeInitialConfig(configValues);
777
778
 
778
779
  emitProgress(4, 7, "Starting assistant...");
779
- await startLocalDaemon(watch, resources, { defaultWorkspaceConfigPath });
780
+ const signingKey = generateLocalSigningKey();
781
+ await startLocalDaemon(watch, resources, {
782
+ defaultWorkspaceConfigPath,
783
+ signingKey,
784
+ });
780
785
 
781
786
  emitProgress(5, 7, "Starting gateway...");
782
787
  let runtimeUrl = `http://127.0.0.1:${resources.gatewayPort}`;
783
788
  try {
784
- runtimeUrl = await startGateway(watch, resources);
789
+ runtimeUrl = await startGateway(watch, resources, { signingKey });
785
790
  } catch (error) {
786
791
  // Gateway failed — stop the daemon we just started so we don't leave
787
792
  // orphaned processes with no lock file entry.
@@ -824,7 +829,7 @@ async function hatchLocal(
824
829
  species,
825
830
  hatchedAt: new Date().toISOString(),
826
831
  serviceGroupVersion: cliPkg.version ? `v${cliPkg.version}` : undefined,
827
- resources,
832
+ resources: { ...resources, signingKey },
828
833
  };
829
834
  emitProgress(7, 7, "Saving configuration...");
830
835
  if (!restart) {
@@ -238,7 +238,7 @@ async function getLocalProcesses(entry: AssistantEntry): Promise<TableRow[]> {
238
238
  name: "embed-worker",
239
239
  pgrepName: "embed-worker",
240
240
  port: 0,
241
- pidFile: join(vellumDir, "embed-worker.pid"),
241
+ pidFile: join(vellumDir, "workspace", "embed-worker.pid"),
242
242
  },
243
243
  ];
244
244
 
@@ -4,7 +4,11 @@ import { join } from "path";
4
4
 
5
5
  import { saveAssistantEntry } from "../lib/assistant-config";
6
6
  import type { AssistantEntry } from "../lib/assistant-config";
7
- import { startLocalDaemon, startGateway } from "../lib/local";
7
+ import {
8
+ generateLocalSigningKey,
9
+ startLocalDaemon,
10
+ startGateway,
11
+ } from "../lib/local";
8
12
  import { getArchivePath, getMetadataPath } from "../lib/retire-archive";
9
13
  import { exec } from "../lib/step-runner";
10
14
 
@@ -66,9 +70,14 @@ export async function recover(): Promise<void> {
66
70
  unlinkSync(archivePath);
67
71
  unlinkSync(metadataPath);
68
72
 
69
- // 7. Start daemon + gateway (same as wake)
70
- await startLocalDaemon(false, entry.resources);
71
- await startGateway(false, entry.resources);
73
+ // 7. Persist signing key so it survives daemon/gateway restarts (same as wake)
74
+ const signingKey = generateLocalSigningKey();
75
+ entry.resources = { ...entry.resources, signingKey };
76
+ saveAssistantEntry(entry);
77
+
78
+ // 8. Start daemon + gateway
79
+ await startLocalDaemon(false, entry.resources, { signingKey });
80
+ await startGateway(false, entry.resources, { signingKey });
72
81
 
73
82
  console.log(`✅ Recovered assistant '${name}'.`);
74
83
  }
@@ -11,8 +11,6 @@ import {
11
11
  captureImageRefs,
12
12
  GATEWAY_INTERNAL_PORT,
13
13
  dockerResourceNames,
14
- migrateCesSecurityFiles,
15
- migrateGatewaySecurityFiles,
16
14
  startContainers,
17
15
  stopContainers,
18
16
  } from "../lib/docker";
@@ -428,13 +426,6 @@ export async function rollback(): Promise<void> {
428
426
  await stopContainers(res);
429
427
  console.log("✅ Containers stopped\n");
430
428
 
431
- // Run security file migrations and signing key cleanup
432
- console.log("🔄 Migrating security files to gateway volume...");
433
- await migrateGatewaySecurityFiles(res, (msg) => console.log(msg));
434
-
435
- console.log("🔄 Migrating credential files to CES security volume...");
436
- await migrateCesSecurityFiles(res, (msg) => console.log(msg));
437
-
438
429
  console.log("🚀 Starting containers with previous version...");
439
430
  await startContainers(
440
431
  {