nexus-prime 7.9.10 → 7.9.11
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 +13 -10
- package/dist/engines/client-bootstrap.js +7 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -228,6 +228,9 @@ function renderCodexManagedBlock(content) {
|
|
|
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))
|
|
@@ -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))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nexus-prime",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.11",
|
|
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",
|