nexus-prime 7.9.2 → 7.9.3

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.
@@ -9,7 +9,7 @@ import { homedir } from 'os';
9
9
  import { fileURLToPath } from 'url';
10
10
  import { dirname, join, resolve } from 'path';
11
11
  import { detectInstalledIDEs, getMcpConfigForIDE } from '../agents/adapters/ide-compat.js';
12
- import { ensureDaemonReady } from '../daemon/client.js';
12
+ import { DEFAULT_DAEMON_READY_TIMEOUT_MS, ensureDaemonReady } from '../daemon/client.js';
13
13
  import { getSetupDefinition, installSetup } from '../engines/client-bootstrap.js';
14
14
  import { resolveNexusStateDir } from '../engines/runtime-registry.js';
15
15
  import { resolveWorkspaceContext } from '../engines/workspace-resolver.js';
@@ -490,7 +490,7 @@ export async function cliSetup(opts = []) {
490
490
  if (!dryRun) {
491
491
  try {
492
492
  const workspace = resolveWorkspaceContext({ workspaceRoot: process.cwd() });
493
- await withSpinner('Connecting to daemon', ensureDaemonReady(workspace, { timeoutMs: 15_000, entrypoint: process.argv[1] }));
493
+ await withSpinner('Connecting to daemon', ensureDaemonReady(workspace, { timeoutMs: DEFAULT_DAEMON_READY_TIMEOUT_MS, entrypoint: process.argv[1] }));
494
494
  daemonReady = true;
495
495
  log(` ${c('✓', 'green')} Dashboard: ${c(dashUrl, 'cyan')}`);
496
496
  }
@@ -1,5 +1,6 @@
1
1
  import type { WorkspaceContext } from '../engines/workspace-resolver.js';
2
2
  import { type DaemonLockRecord } from './lock.js';
3
+ export declare const DEFAULT_DAEMON_READY_TIMEOUT_MS = 60000;
3
4
  export interface DaemonHealthResponse {
4
5
  ok: boolean;
5
6
  ready?: boolean;
@@ -16,7 +16,8 @@ function readCliPkgVersion() {
16
16
  return 'unknown';
17
17
  }
18
18
  import { acquireDaemonLock, getDaemonLockPath, isProcessAlive, readDaemonLock, removeDaemonLock, } from './lock.js';
19
- const DEFAULT_DAEMON_READY_TIMEOUT_MS = 45_000;
19
+ export const DEFAULT_DAEMON_READY_TIMEOUT_MS = 60_000;
20
+ const DAEMON_HEALTH_PROBE_TIMEOUT_MS = 5_000;
20
21
  function sleep(ms) {
21
22
  return new Promise((resolve) => setTimeout(resolve, ms));
22
23
  }
@@ -33,6 +34,12 @@ async function fetchJson(url, init, timeoutMs) {
33
34
  }
34
35
  return await response.json();
35
36
  }
37
+ catch (error) {
38
+ if (error?.name === 'AbortError') {
39
+ throw new Error(`daemon health probe timed out after ${timeoutMs}ms`);
40
+ }
41
+ throw error;
42
+ }
36
43
  finally {
37
44
  clearTimeout(timer);
38
45
  }
@@ -88,11 +95,14 @@ async function waitForDaemonReady(workspace, timeoutMs) {
88
95
  continue;
89
96
  }
90
97
  try {
91
- await pingDaemonHealth(record, Math.min(timeoutMs, 1_500));
98
+ await pingDaemonHealth(record, Math.min(timeoutMs, DAEMON_HEALTH_PROBE_TIMEOUT_MS));
92
99
  return record;
93
100
  }
94
101
  catch (error) {
95
- lastError = error?.message || String(error);
102
+ const message = error?.message || String(error);
103
+ lastError = message.includes('HTTP 503')
104
+ ? 'daemon runtime is still initializing'
105
+ : message;
96
106
  await sleep(100);
97
107
  }
98
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-prime",
3
- "version": "7.9.2",
3
+ "version": "7.9.3",
4
4
  "description": "Local-first MCP control plane for coding agents with bootstrap-orchestrate execution, memory fabric, token budgeting, and worktree-backed swarms",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",