nexus-prime 7.9.10 → 7.9.12

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.js CHANGED
@@ -221,13 +221,16 @@ function renderCodexManagedBlock(content) {
221
221
  CODEX_MANAGED_START,
222
222
  '## Nexus Prime Bootstrap (managed)',
223
223
  '',
224
- '> This block is managed by `nexus-prime setup codex`.',
224
+ '> This block is managed by `nexus-prime setup codex` or automatic bootstrap.',
225
225
  '> Keep your project-specific Codex guidance above or below it.',
226
226
  '',
227
227
  content.trim(),
228
228
  CODEX_MANAGED_END,
229
229
  ].join('\n');
230
230
  }
231
+ function ensureFinalNewline(content) {
232
+ return content.endsWith('\n') ? content : `${content}\n`;
233
+ }
231
234
  function mergeCodexAgentsContent(existingContent, content) {
232
235
  const managedBlock = renderCodexManagedBlock(content);
233
236
  const existing = existingContent ?? '';
@@ -246,19 +249,19 @@ function mergeCodexAgentsContent(existingContent, content) {
246
249
  if (startIndex >= 0 && endIndex > startIndex) {
247
250
  const before = existing.slice(0, startIndex).trimEnd();
248
251
  const after = existing.slice(endIndex + CODEX_MANAGED_END.length).trim();
249
- return [
252
+ return ensureFinalNewline([
250
253
  before,
251
254
  before ? '' : undefined,
252
255
  managedBlock,
253
256
  after ? '' : undefined,
254
257
  after,
255
- ].filter((value) => value !== undefined).join('\n');
258
+ ].filter((value) => value !== undefined).join('\n'));
256
259
  }
257
- return [
260
+ return ensureFinalNewline([
258
261
  existing.trimEnd(),
259
262
  '',
260
263
  managedBlock,
261
- ].join('\n');
264
+ ].join('\n'));
262
265
  }
263
266
  function hasCurrentCodexManagedBlock(targetPath, content) {
264
267
  if (!existsSync(targetPath))
@@ -294,15 +297,15 @@ function mergeClaudeContent(existingContent, content) {
294
297
  if (startIndex >= 0 && endIndex > startIndex) {
295
298
  const before = existing.slice(0, startIndex).trimEnd();
296
299
  const after = existing.slice(endIndex + CLAUDE_MANAGED_END.length).trim();
297
- return [
300
+ return ensureFinalNewline([
298
301
  before,
299
302
  before ? '' : undefined,
300
303
  managedBlock,
301
304
  after ? '' : undefined,
302
305
  after,
303
- ].filter((value) => value !== undefined).join('\n');
306
+ ].filter((value) => value !== undefined).join('\n'));
304
307
  }
305
- return [existing.trimEnd(), '', managedBlock].join('\n');
308
+ return ensureFinalNewline([existing.trimEnd(), '', managedBlock].join('\n'));
306
309
  }
307
310
  function hasCurrentClaudeManagedBlock(targetPath, content) {
308
311
  if (!existsSync(targetPath))
@@ -338,15 +341,15 @@ function mergeClinerules(existingContent, content) {
338
341
  if (startIndex >= 0 && endIndex > startIndex) {
339
342
  const before = existing.slice(0, startIndex).trimEnd();
340
343
  const after = existing.slice(endIndex + CLINE_MANAGED_END.length).trim();
341
- return [
344
+ return ensureFinalNewline([
342
345
  before,
343
346
  before ? '' : undefined,
344
347
  managedBlock,
345
348
  after ? '' : undefined,
346
349
  after,
347
- ].filter((value) => value !== undefined).join('\n');
350
+ ].filter((value) => value !== undefined).join('\n'));
348
351
  }
349
- return [existing.trimEnd(), '', managedBlock].join('\n');
352
+ return ensureFinalNewline([existing.trimEnd(), '', managedBlock].join('\n'));
350
353
  }
351
354
  function hasCurrentClineManagedBlock(targetPath, content) {
352
355
  if (!existsSync(targetPath))
@@ -812,6 +815,11 @@ program
812
815
  // stdio transport requires strict JSON-RPC on stdout — no console.log here.
813
816
  const workspaceContext = resolveWorkspaceContext({ workspaceRoot: getWorkspaceRoot() });
814
817
  const caller = detectCallerIDE();
818
+ process.env.NEXUS_DAEMON_AUTOSPAWN ??= '0';
819
+ process.env.NEXUS_DASHBOARD_IN_MCP ??= '0';
820
+ process.env.NEXUS_ARCHITECTS_LAZY ??= '1';
821
+ process.env.NEXUS_SYNAPSE_LAZY ??= '1';
822
+ process.env.NEXUS_AUTOMATION_SCHEDULER_DISABLED ??= '1';
815
823
  const marker = readSetupMarker();
816
824
  const autoConfigEnabled = process.env.NEXUS_MCP_AUTO_CONFIG === '1';
817
825
  if (caller && autoConfigEnabled) {
@@ -863,7 +871,7 @@ program
863
871
  console.error(`[nexus-prime] ${caller} MCP config written. Future runs skip this step.`);
864
872
  }
865
873
  catch (err) {
866
- console.error(`[nexus-prime] Auto-config failed: ${err?.message ?? err}. Run \`npx nexus-prime setup\` manually.`);
874
+ console.error(`[nexus-prime] Auto-config failed: ${err?.message ?? err}. Run \`nexus-prime setup\` manually.`);
867
875
  }
868
876
  }
869
877
  }
@@ -381,6 +381,9 @@ function renderCodexManagedBlock(content) {
381
381
  CODEX_MANAGED_END,
382
382
  ].join('\n');
383
383
  }
384
+ function ensureFinalNewline(content) {
385
+ return content.endsWith('\n') ? content : `${content}\n`;
386
+ }
384
387
  function mergeCodexAgentsContent(existingContent, content) {
385
388
  const managedBlock = renderCodexManagedBlock(content);
386
389
  const existing = existingContent ?? '';
@@ -399,19 +402,19 @@ function mergeCodexAgentsContent(existingContent, content) {
399
402
  if (startIndex >= 0 && endIndex > startIndex) {
400
403
  const before = existing.slice(0, startIndex).trimEnd();
401
404
  const after = existing.slice(endIndex + CODEX_MANAGED_END.length).trim();
402
- return [
405
+ return ensureFinalNewline([
403
406
  before,
404
407
  before ? '' : undefined,
405
408
  managedBlock,
406
409
  after ? '' : undefined,
407
410
  after,
408
- ].filter((value) => value !== undefined).join('\n');
411
+ ].filter((value) => value !== undefined).join('\n'));
409
412
  }
410
- return [
413
+ return ensureFinalNewline([
411
414
  existing.trimEnd(),
412
415
  '',
413
416
  managedBlock,
414
- ].join('\n');
417
+ ].join('\n'));
415
418
  }
416
419
  function hasCurrentCodexManagedBlock(targetPath, content) {
417
420
  if (!existsSync(targetPath))
@@ -9,6 +9,11 @@ export function buildNexusMcpEnv(workspaceRoot) {
9
9
  NEXUS_MCP_TOOL_PROFILE: 'autonomous',
10
10
  NEXUS_MCP_AUTO_CONFIG: '0',
11
11
  NEXUS_MCP_DAEMON_TIMEOUT_MS: '5000',
12
+ NEXUS_DAEMON_AUTOSPAWN: '0',
13
+ NEXUS_DASHBOARD_IN_MCP: '0',
14
+ NEXUS_ARCHITECTS_LAZY: '1',
15
+ NEXUS_SYNAPSE_LAZY: '1',
16
+ NEXUS_AUTOMATION_SCHEDULER_DISABLED: '1',
12
17
  ...(workspaceRoot ? { NEXUS_WORKSPACE_ROOT: workspaceRoot } : {}),
13
18
  };
14
19
  }
@@ -29,5 +34,6 @@ export function isStableNexusMcpServerConfig(server, envKey = 'env') {
29
34
  && args.includes('mcp')
30
35
  && !args.includes('-y')
31
36
  && env?.NEXUS_MCP_TOOL_PROFILE === 'autonomous'
32
- && env?.NEXUS_MCP_AUTO_CONFIG === '0');
37
+ && env?.NEXUS_MCP_AUTO_CONFIG === '0'
38
+ && env?.NEXUS_DAEMON_AUTOSPAWN === '0');
33
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexus-prime",
3
- "version": "7.9.10",
3
+ "version": "7.9.12",
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",