nexus-prime 5.0.3 → 5.1.2

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.
Files changed (68) hide show
  1. package/README.md +31 -0
  2. package/dist/agents/adapters/mcp.d.ts.map +1 -1
  3. package/dist/agents/adapters/mcp.js +57 -5
  4. package/dist/agents/adapters/mcp.js.map +1 -1
  5. package/dist/cli.js +21 -9
  6. package/dist/cli.js.map +1 -1
  7. package/dist/dashboard/index.html +44 -6
  8. package/dist/engines/automation-runtime.d.ts +1 -0
  9. package/dist/engines/automation-runtime.d.ts.map +1 -1
  10. package/dist/engines/automation-runtime.js +59 -33
  11. package/dist/engines/automation-runtime.js.map +1 -1
  12. package/dist/engines/bootstrap/bootstrap-fast.js +1 -1
  13. package/dist/engines/bootstrap/bootstrap-fast.js.map +1 -1
  14. package/dist/engines/hook-runtime.d.ts +12 -0
  15. package/dist/engines/hook-runtime.d.ts.map +1 -1
  16. package/dist/engines/hook-runtime.js +82 -25
  17. package/dist/engines/hook-runtime.js.map +1 -1
  18. package/dist/engines/knowledge-fabric.d.ts +14 -0
  19. package/dist/engines/knowledge-fabric.d.ts.map +1 -1
  20. package/dist/engines/knowledge-fabric.js +85 -10
  21. package/dist/engines/knowledge-fabric.js.map +1 -1
  22. package/dist/engines/memory.d.ts +18 -0
  23. package/dist/engines/memory.d.ts.map +1 -1
  24. package/dist/engines/memory.js +62 -1
  25. package/dist/engines/memory.js.map +1 -1
  26. package/dist/engines/ngram-index.d.ts +11 -2
  27. package/dist/engines/ngram-index.d.ts.map +1 -1
  28. package/dist/engines/ngram-index.js +47 -6
  29. package/dist/engines/ngram-index.js.map +1 -1
  30. package/dist/engines/orchestrator.d.ts +54 -2
  31. package/dist/engines/orchestrator.d.ts.map +1 -1
  32. package/dist/engines/orchestrator.js +666 -73
  33. package/dist/engines/orchestrator.js.map +1 -1
  34. package/dist/engines/peer-connectors.d.ts +22 -0
  35. package/dist/engines/peer-connectors.d.ts.map +1 -1
  36. package/dist/engines/peer-connectors.js +70 -19
  37. package/dist/engines/peer-connectors.js.map +1 -1
  38. package/dist/engines/priors/file-priors.d.ts +3 -0
  39. package/dist/engines/priors/file-priors.d.ts.map +1 -1
  40. package/dist/engines/priors/file-priors.js +9 -2
  41. package/dist/engines/priors/file-priors.js.map +1 -1
  42. package/dist/engines/runtime-health.d.ts +3 -1
  43. package/dist/engines/runtime-health.d.ts.map +1 -1
  44. package/dist/engines/runtime-health.js +20 -10
  45. package/dist/engines/runtime-health.js.map +1 -1
  46. package/dist/engines/runtime-hygiene.d.ts +15 -0
  47. package/dist/engines/runtime-hygiene.d.ts.map +1 -0
  48. package/dist/engines/runtime-hygiene.js +116 -0
  49. package/dist/engines/runtime-hygiene.js.map +1 -0
  50. package/dist/engines/runtime-registry.d.ts +19 -0
  51. package/dist/engines/runtime-registry.d.ts.map +1 -1
  52. package/dist/engines/runtime-registry.js.map +1 -1
  53. package/dist/engines/skill-runtime.d.ts +4 -1
  54. package/dist/engines/skill-runtime.d.ts.map +1 -1
  55. package/dist/engines/skill-runtime.js +61 -38
  56. package/dist/engines/skill-runtime.js.map +1 -1
  57. package/dist/engines/workflow-runtime.d.ts +1 -0
  58. package/dist/engines/workflow-runtime.d.ts.map +1 -1
  59. package/dist/engines/workflow-runtime.js +20 -5
  60. package/dist/engines/workflow-runtime.js.map +1 -1
  61. package/dist/index.d.ts +5 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +97 -49
  64. package/dist/index.js.map +1 -1
  65. package/dist/phantom/runtime.d.ts.map +1 -1
  66. package/dist/phantom/runtime.js +68 -25
  67. package/dist/phantom/runtime.js.map +1 -1
  68. package/package.json +3 -3
package/README.md CHANGED
@@ -629,6 +629,37 @@ Inventory Snapshot: 109 skills · 64 workflows · 9 hooks · 5 automations · 7
629
629
 
630
630
  ## 📜 Release History
631
631
 
632
+ <details open>
633
+ <summary><b>v5.1.2</b> · 2026-04-09 · Memory Layers & Lifecycle Hooks</summary>
634
+
635
+ - **Explicit memory layer contract**: working, session, project, and pattern layers are now exposed in runtime summaries with auditable contract metadata.
636
+ - **Deterministic lifecycle touchpoints**: memory review, failure summary, and session close surfaces now dispatch in stable catalog-priority order while keeping repo-local `.agents` canonical.
637
+ - **Compatibility preserved**: legacy `.agent` hooks and automations remain loaded as fallback inputs while `.agents` continues to win on duplicate local names.
638
+
639
+ Full notes: [CHANGELOG.md](./CHANGELOG.md)
640
+ </details>
641
+
642
+ <details open>
643
+ <summary><b>v5.1.1</b> · 2026-04-08 · CI Finalization</summary>
644
+
645
+ - **Repo-local skill registration**: small repo-local skill catalogs now register into the graph catalog for deterministic discovery.
646
+ - **Docs release markers**: README + docs homepage now reflect the current package version.
647
+ - **Patched overrides**: dependency overrides updated with regenerated lockfile.
648
+
649
+ Full notes: [CHANGELOG.md](./CHANGELOG.md)
650
+ </details>
651
+
652
+ <details open>
653
+ <summary><b>v5.1.0</b> · 2026-04-08 · Recovery & Selector Performance</summary>
654
+
655
+ - **Startup recovery**: resolves bootstrap/orchestrate deadlocks that could stall sessions on launch.
656
+ - **Deferred governance init**: Synapse and Architects now initialize lazily to prevent premature automation ticks.
657
+ - **Search correctness**: fixes ngram search edge cases so content queries return results on fresh indexes.
658
+ - **Selection hot-path performance**: caches selector arrays and keyword sets inside `resolveSelections`.
659
+
660
+ Full notes: [CHANGELOG.md](./CHANGELOG.md)
661
+ </details>
662
+
632
663
  <details open>
633
664
  <summary><b>v5.0.0</b> · 2026-04-04 · Phantom Sovereignty — proof-carrying execution, governance boundaries, machine efficiency, and dashboard revamp</summary>
634
665
 
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/mcp.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAmG5C,KAAK,cAAc,GAAG,YAAY,GAAG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AAC,oBAAoB;IAk/B5B,OAAO,CAAC,iBAAiB;YAkHX,cAAc;IAslF5B,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAItC,OAAO,CAAC,IAAI;IAmBN,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAoB3B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAYlD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAOzC"}
@@ -419,6 +419,14 @@ function normalizeDetailLevel(value) {
419
419
  return normalized;
420
420
  return 'compact';
421
421
  }
422
+ function normalizeBootstrapDepth(value, detailLevel) {
423
+ const normalized = String(value ?? '').toLowerCase();
424
+ if (normalized === 'deep')
425
+ return 'deep';
426
+ if (normalized === 'fast')
427
+ return 'fast';
428
+ return detailLevel === 'debug' ? 'deep' : 'fast';
429
+ }
422
430
  function normalizeResponseIntent(value) {
423
431
  const normalized = String(value ?? 'inspect').toLowerCase();
424
432
  if (normalized === 'plan' || normalized === 'mutate')
@@ -1266,13 +1274,15 @@ export class MCPAdapter {
1266
1274
  },
1267
1275
  {
1268
1276
  name: 'nexus_session_bootstrap',
1269
- description: 'Read-only session-start summary. Returns current client identity, memory recall summary, memory stats, recommended next step, recommended execution mode, shortlist recommendations, and whether token optimization will be required.',
1277
+ description: 'Read-only session-start summary. Defaults to fast readiness mode and returns current client identity, memory recall summary, memory stats, recommended next step, recommended execution mode, shortlist recommendations, and whether deeper preparation is still needed.',
1270
1278
  inputSchema: {
1271
1279
  type: 'object',
1272
1280
  properties: {
1273
1281
  goal: { type: 'string', description: 'Raw goal or task description for this session' },
1274
1282
  files: { type: 'array', items: { type: 'string' }, description: 'Optional candidate file constraints' },
1275
1283
  detailLevel: { type: 'string', enum: ['compact', 'standard', 'debug'], description: 'Response verbosity; defaults to compact for MCP callers' },
1284
+ depth: { type: 'string', enum: ['fast', 'deep'], description: 'Optional bootstrap depth override; defaults to fast unless debug mode is requested' },
1285
+ include: { type: 'array', items: { type: 'string' }, description: 'Optional rich payload sections to include for advanced clients' },
1276
1286
  intent: { type: 'string', enum: ['inspect', 'plan', 'mutate'], description: 'Requested orchestration stance for the bootstrap summary' },
1277
1287
  topology: { type: 'string', enum: ['auto', 'manager-tools', 'handoff', 'dag-pool', 'worktree-swarm'], description: 'Requested orchestration topology hint' },
1278
1288
  },
@@ -2234,12 +2244,35 @@ export class MCPAdapter {
2234
2244
  }
2235
2245
  switch (request.params.name) {
2236
2246
  case 'nexus_session_bootstrap': {
2247
+ // Wait for deferred engine startup before attempting bootstrap.
2248
+ // If MCP receives this call during the setImmediate window before
2249
+ // finishEngineStartup completes, we wait here rather than crashing
2250
+ // into a stub runtime (which lacks planExecution and would loop).
2251
+ if (this.nexusRef) {
2252
+ try {
2253
+ await Promise.race([
2254
+ this.nexusRef.awaitReady(),
2255
+ new Promise((_, reject) => setTimeout(() => reject(new Error('nexus_startup_timeout')), 8000)),
2256
+ ]);
2257
+ }
2258
+ catch {
2259
+ return {
2260
+ content: [{
2261
+ type: 'text',
2262
+ text: 'Nexus Prime is still initializing. Please retry nexus_session_bootstrap in a moment.',
2263
+ }],
2264
+ };
2265
+ }
2266
+ }
2237
2267
  const callStartedAt = Date.now();
2238
2268
  const bootstrapGoal = String(request.params.arguments?.goal ?? request.params.arguments?.prompt ?? '');
2269
+ const detailLevel = normalizeDetailLevel(request.params.arguments?.detailLevel);
2270
+ const bootstrapDepth = normalizeBootstrapDepth(request.params.arguments?.depth, detailLevel);
2239
2271
  // Fast-path: if already bootstrapped in this MCP session and receipt is still fresh,
2240
2272
  // return a lightweight ack instead of re-running the full expensive bootstrap.
2241
2273
  // This makes bootstrap idempotent for loop-based callers (e.g. /loop skill, Antigravity).
2242
- if (this.telemetry.bootstrapCallCount > 0) {
2274
+ // Debug calls always bypass the fast-path so callers get the full structured payload.
2275
+ if (this.telemetry.bootstrapCallCount > 0 && bootstrapDepth !== 'deep') {
2243
2276
  const hasFreshReceipt = (() => {
2244
2277
  try {
2245
2278
  const ws = resolveWorkspaceContext();
@@ -2271,10 +2304,16 @@ export class MCPAdapter {
2271
2304
  const files = Array.isArray(request.params.arguments?.files)
2272
2305
  ? request.params.arguments.files.map(String)
2273
2306
  : undefined;
2274
- const detailLevel = normalizeDetailLevel(request.params.arguments?.detailLevel);
2307
+ const include = Array.isArray(request.params.arguments?.include)
2308
+ ? request.params.arguments.include.map(String)
2309
+ : undefined;
2275
2310
  const requestedIntent = normalizeResponseIntent(request.params.arguments?.intent);
2276
2311
  const requestedTopology = normalizeResponseTopology(request.params.arguments?.topology);
2277
- const bootstrap = await this.getOrchestrator().bootstrapSession(bootstrapGoal, { files });
2312
+ const bootstrap = await this.getOrchestrator().bootstrapSession(bootstrapGoal, {
2313
+ files,
2314
+ depth: bootstrapDepth,
2315
+ include,
2316
+ });
2278
2317
  const autoTokenApplied = Boolean(bootstrap.tokenOptimization?.autoApplied);
2279
2318
  if (autoTokenApplied) {
2280
2319
  this.telemetry.markTokenAutoApplied();
@@ -2284,7 +2323,7 @@ export class MCPAdapter {
2284
2323
  }
2285
2324
  this.getRuntime().recordClientToolCall('nexus_session_bootstrap', {
2286
2325
  bootstrapCalled: true,
2287
- plannerCalled: true,
2326
+ plannerCalled: bootstrap.depth === 'deep',
2288
2327
  tokenOptimizationApplied: autoTokenApplied,
2289
2328
  tokenAutoApplied: autoTokenApplied,
2290
2329
  toolProfile: this.getToolProfile(),
@@ -2318,10 +2357,14 @@ export class MCPAdapter {
2318
2357
  };
2319
2358
  const payload = detailLevel === 'debug'
2320
2359
  ? {
2360
+ depth: bootstrap.depth,
2321
2361
  workspace,
2322
2362
  client: bootstrap.client,
2323
2363
  memoryRecall: bootstrap.memoryRecall,
2324
2364
  memoryStats: bootstrap.memoryStats,
2365
+ memoryHealth: bootstrap.memoryHealth,
2366
+ needsDeepBootstrap: bootstrap.needsDeepBootstrap,
2367
+ changedSinceLastSession: bootstrap.changedSinceLastSession,
2325
2368
  recommendedNextStep: bootstrap.recommendedNextStep,
2326
2369
  recommendedExecutionMode: bootstrap.recommendedExecutionMode,
2327
2370
  shortlist: bootstrap.shortlist,
@@ -2342,16 +2385,21 @@ export class MCPAdapter {
2342
2385
  payloadRef: {
2343
2386
  workspaceStateKey: workspace.stateKey,
2344
2387
  detailLevel,
2388
+ depth: bootstrapDepth,
2345
2389
  intent: requestedIntent,
2346
2390
  topology: requestedTopology,
2347
2391
  },
2348
2392
  mcpToolProfile: this.getToolProfile(),
2349
2393
  }
2350
2394
  : {
2395
+ depth: bootstrap.depth,
2351
2396
  workspace,
2352
2397
  client: bootstrap.client,
2353
2398
  memoryRecall: bootstrap.memoryRecall,
2354
2399
  memoryStats: bootstrap.memoryStats,
2400
+ memoryHealth: bootstrap.memoryHealth,
2401
+ needsDeepBootstrap: bootstrap.needsDeepBootstrap,
2402
+ changedSinceLastSession: bootstrap.changedSinceLastSession,
2355
2403
  recommendedNextStep: bootstrap.recommendedNextStep,
2356
2404
  recommendedExecutionMode: bootstrap.recommendedExecutionMode,
2357
2405
  shortlist: bootstrap.shortlist,
@@ -2371,10 +2419,12 @@ export class MCPAdapter {
2371
2419
  payloadRef: {
2372
2420
  workspaceStateKey: workspace.stateKey,
2373
2421
  detailLevel,
2422
+ depth: bootstrapDepth,
2374
2423
  intent: requestedIntent,
2375
2424
  topology: requestedTopology,
2376
2425
  },
2377
2426
  summary: {
2427
+ bootstrapDepth: bootstrap.depth ?? bootstrapDepth,
2378
2428
  clientBootstrapClients: bootstrap.clientBootstrapStatus?.clients?.length ?? 0,
2379
2429
  taskGraphPhases: bootstrap.taskGraphPreview?.phases?.length ?? 0,
2380
2430
  totalWorkers: bootstrap.workerPlanPreview?.totalWorkers ?? 0,
@@ -2389,6 +2439,7 @@ export class MCPAdapter {
2389
2439
  formatBullets([
2390
2440
  `Workspace: ${workspace.repoName} (${workspace.workspaceSource})`,
2391
2441
  `Client: ${bootstrap.client?.displayName || bootstrap.client?.clientId || 'unknown'} (${bootstrap.client?.state || 'unknown'})`,
2442
+ `Bootstrap depth: ${bootstrap.depth || bootstrapDepth}`,
2392
2443
  `Memory recall: ${bootstrap.memoryRecall?.count ?? 0} result(s)`,
2393
2444
  `Memory stats: prefrontal ${bootstrap.memoryStats?.prefrontal ?? 0} · hippocampus ${bootstrap.memoryStats?.hippocampus ?? 0} · cortex ${bootstrap.memoryStats?.cortex ?? 0}`,
2394
2445
  `Recommended next step: ${bootstrap.recommendedNextStep || 'nexus_orchestrate'}`,
@@ -2400,6 +2451,7 @@ export class MCPAdapter {
2400
2451
  `RAG: ${bootstrap.ragCandidateStatus?.attachedCollections || 0} attached · ${bootstrap.ragCandidateStatus?.retrievedChunks || 0} retrieved`,
2401
2452
  `Task graph: ${bootstrap.taskGraphPreview?.phases?.length || 0} phases · ${bootstrap.taskGraphPreview?.independentBranches || 0} branches`,
2402
2453
  `Worker plan: ${bootstrap.workerPlanPreview?.totalWorkers || 0} workers planned`,
2454
+ bootstrap.needsDeepBootstrap ? 'Deep preparation: still recommended before risky or cross-file work' : 'Deep preparation: not currently required',
2403
2455
  `Payload ref: ${workspace.stateKey} · ${detailLevel}`,
2404
2456
  `Session summary: ${bootstrap.sessionSummaryBootstrap?.savedTokens ? `reused ${Number(bootstrap.sessionSummaryBootstrap.savedTokens || 0).toLocaleString()} tokens from the previous visit` : 'none available yet'}`,
2405
2457
  bootstrap.projectMemoryBootstrap?.count