@vellumai/cli 0.10.7-dev.202607082034.5ac40b3 → 0.10.7-dev.202607082203.bf32263

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/cli",
3
- "version": "0.10.7-dev.202607082034.5ac40b3",
3
+ "version": "0.10.7-dev.202607082203.bf32263",
4
4
  "description": "CLI tools for vellum-assistant",
5
5
  "type": "module",
6
6
  "exports": {
@@ -172,8 +172,7 @@ describe("sleep command", () => {
172
172
  undefined,
173
173
  7000,
174
174
  );
175
- // The CES sibling (CES_STANDALONE opt-in) is stopped by its PID file; a
176
- // no-op when absent on the default topology.
175
+ // The CES sibling is stopped by its PID file; a no-op when absent.
177
176
  expect(stopProcessByPidFileMock).toHaveBeenNthCalledWith(
178
177
  3,
179
178
  join(assistantRootDir, "ces.pid"),
@@ -118,9 +118,9 @@ export async function recover(): Promise<void> {
118
118
  entry.guardianBootstrapSecret = bootstrapSecret;
119
119
  saveAssistantEntry(entry);
120
120
 
121
- // 8. Start CES sibling (opt-in) + daemon + gateway in parallel, the way the
122
- // Docker topology brings its sibling processes up together. startCes is a
123
- // no-op unless CES_STANDALONE is set.
121
+ // 8. Start CES sibling + daemon + gateway in parallel, the way the
122
+ // Docker topology brings its sibling processes up together. startCes
123
+ // always launches the CES sibling.
124
124
  await Promise.all([
125
125
  startCes(false, entry.resources),
126
126
  startLocalDaemon(false, entry.resources, { signingKey }),
@@ -168,9 +168,8 @@ export async function sleep(): Promise<void> {
168
168
  console.log("Gateway stopped.");
169
169
  }
170
170
 
171
- // Stop the CES sibling if one was launched (CES_STANDALONE). No-op when the
172
- // PID file is absent — on the default topology the assistant owns CES as an
173
- // stdio child and it exits with the daemon.
171
+ // Stop the CES sibling — it is stopped by its PID file, a no-op when the
172
+ // PID file is absent (e.g. the sibling was never started or already exited).
174
173
  const cesPidFile = join(vellumDir, "ces.pid");
175
174
  const cesStopped = await stopProcessByPidFile(
176
175
  cesPidFile,
@@ -1018,8 +1018,8 @@ async function upgradeLocal(
1018
1018
  process.env.APP_VERSION = stripVersionPrefix(targetVersion);
1019
1019
  try {
1020
1020
  // Bring CES, daemon, and gateway up in parallel, the way the Docker
1021
- // topology starts its sibling processes together. startCes is a no-op
1022
- // unless CES_STANDALONE is set.
1021
+ // topology starts its sibling processes together. startCes always
1022
+ // launches the CES sibling.
1023
1023
  await Promise.all([
1024
1024
  startCes(false, entry.resources),
1025
1025
  startLocalDaemon(false, entry.resources, { signingKey }),
@@ -210,9 +210,8 @@ export async function wake(): Promise<void> {
210
210
  // CES socket during startup (discoverCesWithRetry), so it tolerates CES
211
211
  // still binding. CES's lifecycle tracks the daemon (its only consumer):
212
212
  // restarting it under a live daemon would sever the daemon's open
213
- // connection, so it is only (re)started alongside the daemon. startCes is a
214
- // no-op unless CES_STANDALONE is set, in which case the assistant spawns
215
- // CES itself as today.
213
+ // connection, so it is only (re)started alongside the daemon. startCes
214
+ // always launches the CES sibling unconditionally.
216
215
  await Promise.all([
217
216
  startCes(watch, resources),
218
217
  startLocalDaemon(watch, resources, { foreground, signingKey }),
@@ -229,7 +228,7 @@ export async function wake(): Promise<void> {
229
228
  // died independently (crash, OOM kill). A dead ces.pid under a live daemon
230
229
  // means credential operations will fail until the next wake. Relaunch the
231
230
  // sibling so the daemon's lazy reconnect (secure-keys.ts) picks it up on
232
- // the next credential read. startCes is a no-op unless CES_STANDALONE.
231
+ // the next credential read. startCes always launches the sibling.
233
232
  const vellumDir = join(resources.instanceDir, ".vellum");
234
233
  const cesPidFile = join(vellumDir, "ces.pid");
235
234
  const cesAlive = isProcessAlive(cesPidFile).alive;
@@ -92,7 +92,6 @@ describe("startCes", () => {
92
92
 
93
93
  // Verify env vars
94
94
  const env = lastSpawnCall!.options.env!;
95
- expect(env["CES_STANDALONE"]).toBe("1");
96
95
  expect(env["CES_LOCAL_SOCKET"]).toBeDefined();
97
96
  expect(env["CREDENTIAL_SECURITY_DIR"]).toBeDefined();
98
97
  expect(env["VELLUM_WORKSPACE_DIR"]).toBeDefined();
@@ -227,9 +227,9 @@ export async function hatchLocal(
227
227
  const signingKey = generateLocalSigningKey();
228
228
  const bootstrapSecret = generateLocalSigningKey();
229
229
  // Launch the CES sibling alongside the daemon, in parallel — matching the
230
- // Docker topology. Under the opt-in the assistant does not spawn its own CES,
231
- // so a freshly hatched instance would otherwise come up with CES unavailable.
232
- // startCes is a no-op unless CES_STANDALONE is set.
230
+ // Docker topology. The assistant does not spawn its own CES, so a freshly
231
+ // hatched instance would otherwise come up with CES unavailable.
232
+ // startCes always launches the CES sibling.
233
233
  await Promise.all([
234
234
  startCes(watch, resources),
235
235
  startLocalDaemon(watch, resources, {
package/src/lib/local.ts CHANGED
@@ -577,7 +577,6 @@ function applyDaemonEnvOverrides(
577
577
  // regardless of any stale CES_LOCAL_SOCKET inherited from the parent
578
578
  // environment. The assistant connects to the sibling instead of spawning
579
579
  // its own CES.
580
- env.CES_STANDALONE = "1";
581
580
  env.CES_LOCAL_SOCKET = resolveCesSocketPath(resources);
582
581
  applyIpcSocketDirOverride(env);
583
582
  }
@@ -852,10 +851,9 @@ function resolveCesSocketPath(resources?: LocalInstanceResources): string {
852
851
  * the default topology for local (non-containerized) instances, matching how
853
852
  * containerized homes already run CES.
854
853
  *
855
- * The sibling runs with `CES_STANDALONE=1` so its lifecycle is anchored to
856
- * SIGTERM rather than stdin EOF, mirroring the gateway: a CLI-owned process
857
- * with a PID file under `.vellum/ces.pid`, started by `wake` and stopped by
858
- * `sleep`.
854
+ * The sibling runs as an independent process with its lifecycle anchored to
855
+ * SIGTERM, mirroring the gateway: a CLI-owned process with a PID file under
856
+ * `.vellum/ces.pid`, started by `wake` and stopped by `sleep`.
859
857
  */
860
858
  export async function startCes(
861
859
  watch: boolean = false,
@@ -891,7 +889,6 @@ export async function startCes(
891
889
 
892
890
  const cesEnv: Record<string, string | undefined> = {
893
891
  ...process.env,
894
- CES_STANDALONE: "1",
895
892
  CES_LOCAL_SOCKET: socketPath,
896
893
  CREDENTIAL_SECURITY_DIR: securityDir,
897
894
  VELLUM_WORKSPACE_DIR: workspaceDir,
@@ -1701,9 +1698,8 @@ export async function stopLocalProcesses(
1701
1698
  const gatewayPidFile = join(vellumDir, "gateway.pid");
1702
1699
  await stopProcessByPidFile(gatewayPidFile, "gateway", undefined, 7000);
1703
1700
 
1704
- // Stop the CES sibling if one was launched (CES_STANDALONE). No-op when the
1705
- // PID file is absent, so this is safe on the default topology where the
1706
- // assistant owns CES as an stdio child.
1701
+ // Stop the CES sibling if one was launched. No-op when the
1702
+ // PID file is absent.
1707
1703
  const cesPidFile = join(vellumDir, "ces.pid");
1708
1704
  await stopProcessByPidFile(cesPidFile, "credential-executor");
1709
1705
 
@@ -66,9 +66,8 @@ export async function retireLocal(
66
66
  const gatewayPidFile = join(vellumDir, "gateway.pid");
67
67
  await stopProcessByPidFile(gatewayPidFile, "gateway", undefined, 7000);
68
68
 
69
- // Stop the CES sibling if one was launched (CES_STANDALONE). No-op when the
70
- // PID file is absent — on the default topology the assistant owns CES as an
71
- // stdio child and it exits with the daemon.
69
+ // Stop the CES sibling — it is stopped by its PID file, a no-op when the
70
+ // PID file is absent (e.g. the sibling was never started or already exited).
72
71
  const cesPidFile = join(vellumDir, "ces.pid");
73
72
  const cesStopped = await stopProcessByPidFile(
74
73
  cesPidFile,