monomind 1.10.57 → 1.11.0

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 (232) hide show
  1. package/.claude/agents/core/coordinator.md +71 -0
  2. package/.claude/agents/generated/case-analyst.md +50 -0
  3. package/.claude/agents/generated/copy-editor.md +45 -0
  4. package/.claude/agents/generated/court-reporter.md +50 -0
  5. package/.claude/agents/generated/defender.md +51 -0
  6. package/.claude/agents/generated/editor-in-chief.md +45 -0
  7. package/.claude/agents/generated/fact-checker.md +45 -0
  8. package/.claude/agents/generated/judge.md +51 -0
  9. package/.claude/agents/generated/prosecutor.md +51 -0
  10. package/.claude/agents/generated/reporter.md +45 -0
  11. package/.claude/commands/hooks/README.md +1 -1
  12. package/.claude/commands/hooks/overview.md +1 -1
  13. package/.claude/commands/mastermind/_repeat.md +1 -1
  14. package/.claude/commands/mastermind/do.md +3 -1
  15. package/.claude/commands/mastermind/help.md +2 -2
  16. package/.claude/commands/mastermind/master.md +39 -6
  17. package/.claude/commands/mastermind/memory.md +1 -1
  18. package/.claude/commands/memory/memory-search.md +2 -2
  19. package/.claude/commands/monitoring/status.md +1 -1
  20. package/.claude/commands/{browse.md → monobrowse.md} +2 -2
  21. package/.claude/commands/sparc.md +1 -1
  22. package/.claude/helpers/handlers/graph-status-handler.cjs +1 -1
  23. package/.claude/helpers/loop-tracker.cjs +1 -1
  24. package/.claude/scheduled_tasks.lock +1 -1
  25. package/.claude/skills/agent-browser-testing/SKILL.md +1 -1
  26. package/.claude/skills/hooks-automation/SKILL.md +0 -3
  27. package/.claude/skills/mastermind/build.md +1 -1
  28. package/.claude/skills/mastermind/code-quality-reviewer-prompt.md +60 -0
  29. package/.claude/skills/mastermind/content.md +1 -1
  30. package/.claude/skills/mastermind/createorg.md +79 -2
  31. package/.claude/skills/mastermind/design.md +3 -1
  32. package/.claude/skills/mastermind/finance.md +1 -1
  33. package/.claude/skills/mastermind/implementer-prompt.md +109 -0
  34. package/.claude/skills/mastermind/marketing.md +1 -1
  35. package/.claude/skills/mastermind/ops.md +1 -1
  36. package/.claude/skills/mastermind/plan.md +20 -2
  37. package/.claude/skills/mastermind/release.md +1 -1
  38. package/.claude/skills/mastermind/research.md +1 -1
  39. package/.claude/skills/mastermind/review.md +1 -1
  40. package/.claude/skills/mastermind/sales.md +1 -1
  41. package/.claude/skills/mastermind/spec-reviewer-prompt.md +63 -0
  42. package/.claude/skills/sparc-methodology/SKILL.md +3 -3
  43. package/.claude/skills/swarm-advanced/SKILL.md +1 -4
  44. package/.claude-plugin/README.md +1 -2
  45. package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -1
  46. package/README.md +18 -32
  47. package/package.json +1 -1
  48. package/packages/@monomind/cli/README.md +18 -32
  49. package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +1 -7
  50. package/packages/@monomind/cli/dist/src/agents/registry-builder.js +10 -6
  51. package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +59 -12
  52. package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +67 -13
  53. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -13
  54. package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +2 -2
  55. package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +5 -5
  56. package/packages/@monomind/cli/dist/src/commands/agent.js +1 -6
  57. package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
  58. package/packages/@monomind/cli/dist/src/commands/analyze.js +8 -18
  59. package/packages/@monomind/cli/dist/src/commands/doctor.js +53 -3
  60. package/packages/@monomind/cli/dist/src/commands/embeddings.js +9 -33
  61. package/packages/@monomind/cli/dist/src/commands/hooks.js +24 -76
  62. package/packages/@monomind/cli/dist/src/commands/index.d.ts +4 -6
  63. package/packages/@monomind/cli/dist/src/commands/index.js +8 -15
  64. package/packages/@monomind/cli/dist/src/commands/init.js +2 -2
  65. package/packages/@monomind/cli/dist/src/commands/issues.js +16 -11
  66. package/packages/@monomind/cli/dist/src/commands/memory.js +6 -6
  67. package/packages/@monomind/cli/dist/src/commands/migrate.js +1 -2
  68. package/packages/@monomind/cli/dist/src/commands/monograph.js +18 -11
  69. package/packages/@monomind/cli/dist/src/commands/monovector/backup.d.ts +11 -0
  70. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/backup.js +25 -25
  71. package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.d.ts +11 -0
  72. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/benchmark.js +14 -14
  73. package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +18 -0
  74. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/import.js +21 -21
  75. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.d.ts +6 -6
  76. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.js +22 -22
  77. package/packages/@monomind/cli/dist/src/commands/monovector/init.d.ts +11 -0
  78. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/init.js +36 -36
  79. package/packages/@monomind/cli/dist/src/commands/monovector/migrate.d.ts +11 -0
  80. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/migrate.js +16 -16
  81. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.d.ts +2 -2
  82. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.js +10 -10
  83. package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +18 -0
  84. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/setup.js +77 -77
  85. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.d.ts +2 -2
  86. package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.js +34 -34
  87. package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
  88. package/packages/@monomind/cli/dist/src/commands/neural.js +31 -608
  89. package/packages/@monomind/cli/dist/src/commands/performance.js +7 -10
  90. package/packages/@monomind/cli/dist/src/commands/plugins.js +3 -4
  91. package/packages/@monomind/cli/dist/src/commands/process.js +5 -12
  92. package/packages/@monomind/cli/dist/src/commands/progress.js +16 -16
  93. package/packages/@monomind/cli/dist/src/commands/route.d.ts +2 -2
  94. package/packages/@monomind/cli/dist/src/commands/route.js +23 -23
  95. package/packages/@monomind/cli/dist/src/commands/status.js +0 -3
  96. package/packages/@monomind/cli/dist/src/commands/swarm.js +2 -3
  97. package/packages/@monomind/cli/dist/src/config-adapter.js +27 -0
  98. package/packages/@monomind/cli/dist/src/consensus/audit-writer.d.ts +44 -17
  99. package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +1 -1
  100. package/packages/@monomind/cli/dist/src/index.js +5 -5
  101. package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +10 -14
  102. package/packages/@monomind/cli/dist/src/init/executor.js +17 -27
  103. package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -2
  104. package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -1
  105. package/packages/@monomind/cli/dist/src/mcp-client.js +1 -7
  106. package/packages/@monomind/cli/dist/src/mcp-server.js +9 -1
  107. package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +1 -52
  108. package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +5 -5
  109. package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.d.ts +1 -1
  110. package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +6 -5
  111. package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.d.ts +1 -1
  112. package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.js +51 -54
  113. package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.d.ts +1 -1
  114. package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +10 -10
  115. package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +0 -24
  116. package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +189 -480
  117. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
  118. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -2
  119. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.d.ts +334 -0
  120. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1108 -0
  121. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +76 -34
  122. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +1 -1
  123. package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +2 -2
  124. package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.d.ts +2 -2
  125. package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.js +3 -3
  126. package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.d.ts +1 -1
  127. package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +29 -19
  128. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +1 -1
  129. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +2 -2
  130. package/packages/@monomind/cli/dist/src/memory/intelligence.js +14 -8
  131. package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +17 -2
  132. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +76 -23
  133. package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +2 -2
  134. package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +37 -39
  135. package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +34 -0
  136. package/packages/@monomind/cli/dist/src/monovector/capabilities.js +37 -0
  137. package/packages/@monomind/cli/dist/src/monovector/command-outcomes.d.ts +37 -0
  138. package/packages/@monomind/cli/dist/src/monovector/command-outcomes.js +87 -0
  139. package/packages/@monomind/cli/dist/src/monovector/coverage-router.d.ts +103 -0
  140. package/packages/@monomind/cli/dist/src/monovector/coverage-router.js +337 -0
  141. package/packages/@monomind/cli/dist/src/monovector/coverage-tools.d.ts +14 -0
  142. package/packages/@monomind/cli/dist/src/monovector/coverage-tools.js +112 -0
  143. package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.d.ts +2 -2
  144. package/packages/@monomind/cli/dist/src/monovector/index.d.ts +61 -0
  145. package/packages/@monomind/cli/dist/src/monovector/index.js +67 -0
  146. package/packages/@monomind/cli/dist/src/monovector/init-state.d.ts +35 -0
  147. package/packages/@monomind/cli/dist/src/monovector/init-state.js +36 -0
  148. package/packages/@monomind/cli/dist/src/monovector/route-outcomes.d.ts +55 -0
  149. package/packages/@monomind/cli/dist/src/monovector/route-outcomes.js +137 -0
  150. package/packages/@monomind/cli/dist/src/parser.js +3 -3
  151. package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -31
  152. package/packages/@monomind/cli/dist/src/production/circuit-breaker.d.ts +26 -6
  153. package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +55 -30
  154. package/packages/@monomind/cli/dist/src/production/index.d.ts +3 -20
  155. package/packages/@monomind/cli/dist/src/production/index.js +3 -15
  156. package/packages/@monomind/cli/dist/src/production/monitoring.d.ts +54 -34
  157. package/packages/@monomind/cli/dist/src/production/monitoring.js +12 -14
  158. package/packages/@monomind/cli/dist/src/production/rate-limiter.d.ts +64 -19
  159. package/packages/@monomind/cli/dist/src/production/rate-limiter.js +5 -5
  160. package/packages/@monomind/cli/dist/src/production/retry.js +4 -2
  161. package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +50 -59
  162. package/packages/@monomind/cli/dist/src/services/claim-service.js +83 -50
  163. package/packages/@monomind/cli/dist/src/services/config-file-manager.js +8 -1
  164. package/packages/@monomind/cli/dist/src/services/worker-daemon.js +4 -0
  165. package/packages/@monomind/cli/dist/src/types.d.ts +13 -0
  166. package/packages/@monomind/cli/package.json +13 -13
  167. package/packages/@monomind/guidance/dist/index.d.ts +1 -1
  168. package/packages/@monomind/guidance/dist/index.js +1 -1
  169. package/packages/@monomind/guidance/package.json +1 -2
  170. package/scripts/build-monovector.sh +10 -0
  171. package/scripts/publish-monovector.sh +20 -0
  172. package/.claude/commands/monomind/adr.md +0 -11
  173. package/.claude/commands/monomind/budget.md +0 -7
  174. package/.claude/commands/monomind/createtask.md +0 -277
  175. package/.claude/commands/monomind/do.md +0 -498
  176. package/.claude/commands/monomind/graph-status.md +0 -7
  177. package/.claude/commands/monomind/help.md +0 -118
  178. package/.claude/commands/monomind/idea.md +0 -273
  179. package/.claude/commands/monomind/improve.md +0 -352
  180. package/.claude/commands/monomind/loops.md +0 -7
  181. package/.claude/commands/monomind/memory.md +0 -230
  182. package/.claude/commands/monomind/repeat.md +0 -257
  183. package/.claude/commands/monomind/review.md +0 -317
  184. package/.claude/commands/monomind/specialagents.md +0 -125
  185. package/.claude/commands/monomind/swarm.md +0 -161
  186. package/.claude/commands/monomind/understand.md +0 -139
  187. package/.claude/commands/training/README.md +0 -39
  188. package/.claude/commands/training/neural-patterns.md +0 -73
  189. package/.claude/commands/training/neural-train.md +0 -79
  190. package/packages/@monomind/cli/dist/src/commands/appliance-advanced.d.ts +0 -9
  191. package/packages/@monomind/cli/dist/src/commands/appliance-advanced.js +0 -238
  192. package/packages/@monomind/cli/dist/src/commands/appliance.d.ts +0 -8
  193. package/packages/@monomind/cli/dist/src/commands/appliance.js +0 -406
  194. package/packages/@monomind/cli/dist/src/commands/ruvector/backup.d.ts +0 -11
  195. package/packages/@monomind/cli/dist/src/commands/ruvector/benchmark.d.ts +0 -11
  196. package/packages/@monomind/cli/dist/src/commands/ruvector/import.d.ts +0 -18
  197. package/packages/@monomind/cli/dist/src/commands/ruvector/init.d.ts +0 -11
  198. package/packages/@monomind/cli/dist/src/commands/ruvector/migrate.d.ts +0 -11
  199. package/packages/@monomind/cli/dist/src/commands/ruvector/setup.d.ts +0 -18
  200. package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.d.ts +0 -182
  201. package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.js +0 -316
  202. package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.d.ts +0 -67
  203. package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.js +0 -277
  204. package/packages/@monomind/cli/dist/src/ruvector/coverage-router.d.ts +0 -160
  205. package/packages/@monomind/cli/dist/src/ruvector/coverage-router.js +0 -539
  206. package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.d.ts +0 -33
  207. package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.js +0 -157
  208. package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
  209. package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.js +0 -551
  210. package/packages/@monomind/cli/dist/src/ruvector/flash-attention.d.ts +0 -195
  211. package/packages/@monomind/cli/dist/src/ruvector/flash-attention.js +0 -643
  212. package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.d.ts +0 -187
  213. package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.js +0 -929
  214. package/packages/@monomind/cli/dist/src/ruvector/index.d.ts +0 -67
  215. package/packages/@monomind/cli/dist/src/ruvector/index.js +0 -88
  216. package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.d.ts +0 -218
  217. package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.js +0 -455
  218. package/packages/@monomind/cli/dist/src/ruvector/model-router.d.ts +0 -222
  219. package/packages/@monomind/cli/dist/src/ruvector/model-router.js +0 -512
  220. package/packages/@monomind/cli/dist/src/ruvector/moe-router.d.ts +0 -213
  221. package/packages/@monomind/cli/dist/src/ruvector/moe-router.js +0 -649
  222. package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.d.ts +0 -217
  223. package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.js +0 -712
  224. package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.d.ts +0 -179
  225. package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.js +0 -363
  226. package/packages/@monomind/cli/dist/src/ruvector/semantic-router.d.ts +0 -77
  227. package/packages/@monomind/cli/dist/src/ruvector/semantic-router.js +0 -178
  228. package/packages/@monomind/cli/dist/src/ruvector/vector-db.d.ts +0 -69
  229. package/packages/@monomind/cli/dist/src/ruvector/vector-db.js +0 -243
  230. package/packages/@monomind/cli/dist/src/services/ruvector-training.d.ts +0 -222
  231. package/packages/@monomind/cli/dist/src/services/ruvector-training.js +0 -696
  232. /package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.js +0 -0
@@ -12,10 +12,10 @@
12
12
  *
13
13
  * @see /packages/implementation/adrs/ADR-016-collaborative-issue-claims.md
14
14
  */
15
- import { EventEmitter } from 'events';
16
- import * as fs from 'fs';
17
- import * as path from 'path';
18
- import { execFileSync } from 'child_process';
15
+ import { EventEmitter } from 'node:events';
16
+ import * as fs from 'node:fs';
17
+ import * as path from 'node:path';
18
+ import { execFileSync } from 'node:child_process';
19
19
  // ============================================================================
20
20
  // Default Configuration
21
21
  // ============================================================================
@@ -102,7 +102,7 @@ export class ClaimService extends EventEmitter {
102
102
  };
103
103
  // Unique tmp filename so a previous in-flight write cannot be clobbered
104
104
  // by a concurrent fs.writeFileSync truncating the same .tmp path.
105
- const { randomBytes } = await import('crypto');
105
+ const { randomBytes } = await import('node:crypto');
106
106
  const tmp = `${claimsFile}.${process.pid}.${Date.now()}.${randomBytes(4).toString('hex')}.tmp`;
107
107
  fs.writeFileSync(tmp, JSON.stringify(data, null, 2));
108
108
  fs.renameSync(tmp, claimsFile);
@@ -314,9 +314,12 @@ export class ClaimService extends EventEmitter {
314
314
  const info = this.stealableInfo.get(issueId);
315
315
  const previousOwner = claim.claimant;
316
316
  // Check if steal is allowed
317
- if (this.config.requireSameType && stealer.type === 'agent' && previousOwner.type === 'agent') {
317
+ if (this.config.requireSameType &&
318
+ stealer.type === 'agent' &&
319
+ previousOwner.type === 'agent') {
318
320
  if (stealer.agentType !== previousOwner.agentType) {
319
- const allowed = this.config.allowCrossTypeSteal.some(pair => pair.includes(stealer.agentType) && pair.includes(previousOwner.agentType));
321
+ const allowed = this.config.allowCrossTypeSteal.some((pair) => pair.includes(stealer.agentType) &&
322
+ pair.includes(previousOwner.agentType));
320
323
  if (!allowed) {
321
324
  return { success: false, error: `Cross-type steal not allowed` };
322
325
  }
@@ -380,7 +383,8 @@ export class ClaimService extends EventEmitter {
380
383
  blockedCount++;
381
384
  }
382
385
  }
383
- const agentType = claims[0]?.claimant.type === 'agent' ? claims[0].claimant.agentType : 'unknown';
386
+ const first = claims[0]?.claimant;
387
+ const agentType = first?.type === 'agent' ? first.agentType : 'unknown';
384
388
  return {
385
389
  agentId,
386
390
  agentType,
@@ -392,7 +396,7 @@ export class ClaimService extends EventEmitter {
392
396
  currentBlockedCount: blockedCount,
393
397
  };
394
398
  }
395
- async rebalance(swarmId) {
399
+ async rebalance(_swarmId) {
396
400
  const result = { moved: [], suggested: [] };
397
401
  // Get all agent loads
398
402
  const agentLoads = new Map();
@@ -409,17 +413,17 @@ export class ClaimService extends EventEmitter {
409
413
  }
410
414
  // For each agent type, calculate average load
411
415
  for (const agentType of agentTypes) {
412
- const typeLoads = Array.from(agentLoads.values()).filter(l => l.agentType === agentType);
416
+ const typeLoads = Array.from(agentLoads.values()).filter((l) => l.agentType === agentType);
413
417
  const avgLoad = typeLoads.reduce((sum, l) => sum + l.utilization, 0) / typeLoads.length;
414
- const overloaded = typeLoads.filter(l => l.utilization > avgLoad * 1.5);
415
- const underloaded = typeLoads.filter(l => l.utilization < avgLoad * 0.5);
418
+ const overloaded = typeLoads.filter((l) => l.utilization > avgLoad * 1.5);
419
+ const underloaded = typeLoads.filter((l) => l.utilization < avgLoad * 0.5);
416
420
  // Generate suggestions
417
421
  for (const over of overloaded) {
418
422
  const lowProgressClaims = over.claims
419
- .filter(c => c.progress < 25)
423
+ .filter((c) => c.progress < 25)
420
424
  .sort((a, b) => a.progress - b.progress);
421
425
  for (const claim of lowProgressClaims) {
422
- const target = underloaded.find(u => u.claimCount < u.maxClaims);
426
+ const target = underloaded.find((u) => u.claimCount < u.maxClaims);
423
427
  if (target) {
424
428
  result.suggested.push({
425
429
  issueId: claim.issueId,
@@ -441,7 +445,7 @@ export class ClaimService extends EventEmitter {
441
445
  // Queries
442
446
  // ==========================================================================
443
447
  async getClaimedBy(claimant) {
444
- return Array.from(this.claims.values()).filter(c => this.isSameClaimant(c.claimant, claimant));
448
+ return Array.from(this.claims.values()).filter((c) => this.isSameClaimant(c.claimant, claimant));
445
449
  }
446
450
  async getAvailableIssues(_filters) {
447
451
  // This would integrate with GitHub API
@@ -455,7 +459,7 @@ export class ClaimService extends EventEmitter {
455
459
  return Array.from(this.claims.values());
456
460
  }
457
461
  async getByStatus(status) {
458
- return Array.from(this.claims.values()).filter(c => c.status === status);
462
+ return Array.from(this.claims.values()).filter((c) => c.status === status);
459
463
  }
460
464
  // ==========================================================================
461
465
  // Auto-Management
@@ -590,7 +594,9 @@ export class GitHubSync {
590
594
  return isValidRepo(this.config.repo) ? this.config.repo : null;
591
595
  }
592
596
  try {
593
- const remote = execFileSync('git', ['remote', 'get-url', 'origin'], { encoding: 'utf-8' }).trim();
597
+ const remote = execFileSync('git', ['remote', 'get-url', 'origin'], {
598
+ encoding: 'utf-8',
599
+ }).trim();
594
600
  const match = remote.match(/github\.com[/:]([\w.-]+\/[\w.-]+)/);
595
601
  const repo = match ? match[1].replace('.git', '') : null;
596
602
  return repo && isValidRepo(repo) ? repo : null;
@@ -610,7 +616,11 @@ export class GitHubSync {
610
616
  }
611
617
  const repo = this.getRepo();
612
618
  if (!repo) {
613
- return { success: false, synced: 0, errors: ['Could not determine GitHub repository'] };
619
+ return {
620
+ success: false,
621
+ synced: 0,
622
+ errors: ['Could not determine GitHub repository'],
623
+ };
614
624
  }
615
625
  // Validate state parameter (whitelist)
616
626
  const validStates = ['open', 'closed', 'all'];
@@ -619,11 +629,16 @@ export class GitHubSync {
619
629
  }
620
630
  try {
621
631
  const issuesJson = execFileSync('gh', [
622
- 'issue', 'list',
623
- '--repo', repo,
624
- '--state', state,
625
- '--json', 'number,title,body,state,labels,assignees,url,createdAt,updatedAt',
626
- '--limit', '100'
632
+ 'issue',
633
+ 'list',
634
+ '--repo',
635
+ repo,
636
+ '--state',
637
+ state,
638
+ '--json',
639
+ 'number,title,body,state,labels,assignees,url,createdAt,updatedAt',
640
+ '--limit',
641
+ '100',
627
642
  ], { encoding: 'utf-8' });
628
643
  const rawIssues = JSON.parse(issuesJson);
629
644
  for (const raw of rawIssues) {
@@ -667,16 +682,24 @@ export class GitHubSync {
667
682
  }
668
683
  // Validate claim label
669
684
  if (!isValidLabel(this.config.claimLabel)) {
670
- return { success: false, synced: 0, errors: ['Invalid claim label configuration'] };
685
+ return {
686
+ success: false,
687
+ synced: 0,
688
+ errors: ['Invalid claim label configuration'],
689
+ };
671
690
  }
672
691
  try {
673
692
  // Add claim label
674
693
  if (this.config.syncLabels) {
675
694
  try {
676
695
  execFileSync('gh', [
677
- 'issue', 'edit', String(issueNumber),
678
- '--repo', repo,
679
- '--add-label', this.config.claimLabel
696
+ 'issue',
697
+ 'edit',
698
+ String(issueNumber),
699
+ '--repo',
700
+ repo,
701
+ '--add-label',
702
+ this.config.claimLabel,
680
703
  ], { stdio: 'ignore' });
681
704
  }
682
705
  catch {
@@ -691,9 +714,13 @@ export class GitHubSync {
691
714
  else {
692
715
  try {
693
716
  execFileSync('gh', [
694
- 'issue', 'edit', String(issueNumber),
695
- '--repo', repo,
696
- '--add-assignee', claimant.name
717
+ 'issue',
718
+ 'edit',
719
+ String(issueNumber),
720
+ '--repo',
721
+ repo,
722
+ '--add-assignee',
723
+ claimant.name,
697
724
  ], { stdio: 'ignore' });
698
725
  }
699
726
  catch {
@@ -708,11 +735,7 @@ export class GitHubSync {
708
735
  : `Agent: ${(claimant.agentType || 'unknown').replace(/[^a-zA-Z0-9_-]/g, '')}`;
709
736
  const comment = `🤖 **Issue claimed** by ${claimantStr}\n\n_Coordinated by Monomind_`;
710
737
  try {
711
- execFileSync('gh', [
712
- 'issue', 'comment', String(issueNumber),
713
- '--repo', repo,
714
- '--body', comment
715
- ], { stdio: 'ignore' });
738
+ execFileSync('gh', ['issue', 'comment', String(issueNumber), '--repo', repo, '--body', comment], { stdio: 'ignore' });
716
739
  }
717
740
  catch {
718
741
  errors.push('Failed to add comment');
@@ -746,16 +769,24 @@ export class GitHubSync {
746
769
  }
747
770
  // Validate claim label
748
771
  if (!isValidLabel(this.config.claimLabel)) {
749
- return { success: false, synced: 0, errors: ['Invalid claim label configuration'] };
772
+ return {
773
+ success: false,
774
+ synced: 0,
775
+ errors: ['Invalid claim label configuration'],
776
+ };
750
777
  }
751
778
  try {
752
779
  // Remove claim label
753
780
  if (this.config.syncLabels) {
754
781
  try {
755
782
  execFileSync('gh', [
756
- 'issue', 'edit', String(issueNumber),
757
- '--repo', repo,
758
- '--remove-label', this.config.claimLabel
783
+ 'issue',
784
+ 'edit',
785
+ String(issueNumber),
786
+ '--repo',
787
+ repo,
788
+ '--remove-label',
789
+ this.config.claimLabel,
759
790
  ], { stdio: 'ignore' });
760
791
  }
761
792
  catch {
@@ -767,9 +798,13 @@ export class GitHubSync {
767
798
  if (isValidClaimantName(claimant.name)) {
768
799
  try {
769
800
  execFileSync('gh', [
770
- 'issue', 'edit', String(issueNumber),
771
- '--repo', repo,
772
- '--remove-assignee', claimant.name
801
+ 'issue',
802
+ 'edit',
803
+ String(issueNumber),
804
+ '--repo',
805
+ repo,
806
+ '--remove-assignee',
807
+ claimant.name,
773
808
  ], { stdio: 'ignore' });
774
809
  }
775
810
  catch {
@@ -784,11 +819,7 @@ export class GitHubSync {
784
819
  : `Agent: ${(claimant.agentType || 'unknown').replace(/[^a-zA-Z0-9_-]/g, '')}`;
785
820
  const comment = `🔓 **Issue released** by ${claimantStr}\n\n_This issue is now available for others to claim._`;
786
821
  try {
787
- execFileSync('gh', [
788
- 'issue', 'comment', String(issueNumber),
789
- '--repo', repo,
790
- '--body', comment
791
- ], { stdio: 'ignore' });
822
+ execFileSync('gh', ['issue', 'comment', String(issueNumber), '--repo', repo, '--body', comment], { stdio: 'ignore' });
792
823
  }
793
824
  catch {
794
825
  errors.push('Failed to add release comment');
@@ -829,11 +860,13 @@ export class GitHubSync {
829
860
  if (!syncResult.success || !syncResult.issues)
830
861
  return [];
831
862
  const localClaims = await this.claimService.getAllClaims();
832
- const claimedIds = new Set(localClaims.map(c => {
863
+ const claimedIds = new Set(localClaims
864
+ .map((c) => {
833
865
  const match = c.issueId.match(/(\d+)/);
834
866
  return match ? parseInt(match[1], 10) : null;
835
- }).filter(Boolean));
836
- return syncResult.issues.filter(issue => claimedIds.has(issue.number));
867
+ })
868
+ .filter((n) => n !== null));
869
+ return syncResult.issues.filter((issue) => claimedIds.has(issue.number));
837
870
  }
838
871
  }
839
872
  // ============================================================================
@@ -52,6 +52,13 @@ const DEFAULT_CONFIG = {
52
52
  autoExecute: true,
53
53
  hooks: [],
54
54
  },
55
+ neural: {
56
+ enabled: true,
57
+ disableNative: false,
58
+ sona: {
59
+ mode: 'balanced',
60
+ },
61
+ },
55
62
  };
56
63
  export class ConfigFileManager {
57
64
  configPath = null;
@@ -116,7 +123,7 @@ export class ConfigFileManager {
116
123
  * drop the first writer's API key.
117
124
  */
118
125
  set(cwd, key, value) {
119
- const KNOWN_SET_SECTIONS = new Set(['version', 'agents', 'swarm', 'memory', 'mcp', 'cli', 'hooks']);
126
+ const KNOWN_SET_SECTIONS = new Set(['version', 'agents', 'swarm', 'memory', 'mcp', 'cli', 'hooks', 'neural']);
120
127
  const topSection = String(key).split('.')[0];
121
128
  if (!KNOWN_SET_SECTIONS.has(topSection)) {
122
129
  throw new Error(`Unknown config section: "${topSection}". Allowed: ${[...KNOWN_SET_SECTIONS].join(', ')}`);
@@ -1067,6 +1067,10 @@ export function getDaemon(projectRoot, config) {
1067
1067
  * Start daemon (for use in session-start hook)
1068
1068
  */
1069
1069
  export async function startDaemon(projectRoot, config) {
1070
+ // A2: the daemon is a long-lived host — keep the SONA write-path enabled so
1071
+ // trajectories accumulate across worker runs and reach the consolidation
1072
+ // threshold (see startMCPServer for the one-shot-CLI rationale).
1073
+ process.env.MONOMIND_PERSISTENT_HOST = '1';
1070
1074
  const daemon = getDaemon(projectRoot, config);
1071
1075
  await daemon.start();
1072
1076
  return daemon;
@@ -53,6 +53,19 @@ export interface MonomindConfig {
53
53
  mcp: MCPConfig;
54
54
  cli: CLIPreferences;
55
55
  hooks: HooksConfig;
56
+ neural?: NeuralConfig;
57
+ }
58
+ export interface NeuralConfig {
59
+ /** Enable neural/SONA learning (default: true) */
60
+ enabled?: boolean;
61
+ /** Force pure-JS fallback, skip all native @monoes packages (default: false) */
62
+ disableNative?: boolean;
63
+ sona?: {
64
+ mode?: 'real-time' | 'balanced' | 'research' | 'edge' | 'batch';
65
+ learningRate?: number;
66
+ ewcLambda?: number;
67
+ embeddingDim?: number;
68
+ };
56
69
  }
57
70
  export interface AgentConfig {
58
71
  defaultType: string;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoes/monomindcli",
3
- "version": "1.10.57",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -51,13 +51,13 @@
51
51
  "types": "./dist/src/index.d.ts",
52
52
  "import": "./dist/src/index.js"
53
53
  },
54
- "./ruvector": {
55
- "types": "./dist/src/ruvector/index.d.ts",
56
- "import": "./dist/src/ruvector/index.js"
54
+ "./monovector": {
55
+ "types": "./dist/src/monovector/index.d.ts",
56
+ "import": "./dist/src/monovector/index.js"
57
57
  },
58
- "./ruvector/*": {
59
- "types": "./dist/src/ruvector/*.d.ts",
60
- "import": "./dist/src/ruvector/*.js"
58
+ "./monovector/*": {
59
+ "types": "./dist/src/monovector/*.d.ts",
60
+ "import": "./dist/src/monovector/*.js"
61
61
  },
62
62
  "./mcp-tools": {
63
63
  "types": "./dist/src/mcp-tools/index.d.ts",
@@ -89,6 +89,10 @@
89
89
  "ws": "^8.18.0",
90
90
  "@noble/ed25519": "^2.1.0",
91
91
  "@monoes/monograph": "^1.1.0",
92
+ "@monomind/aidefence": "workspace:*",
93
+ "@monomind/embeddings": "workspace:*",
94
+ "@monomind/guidance": "workspace:*",
95
+ "@monomind/mcp": "workspace:*",
92
96
  "graphology": "^0.25.4",
93
97
  "graphology-communities-louvain": "^2.0.1",
94
98
  "graphology-metrics": "^2.4.0",
@@ -99,14 +103,10 @@
99
103
  "semver": "^7.6.0"
100
104
  },
101
105
  "optionalDependencies": {
106
+ "sql.js": "^1.14.1",
107
+ "@monoes/memory": "workspace:*",
102
108
  "@monomind/plugin-gastown-bridge": "^0.1.3",
103
109
  "agentic-flow": "^3.0.0-alpha.1",
104
- "@ruvector/attention": "^0.1.4",
105
- "@ruvector/learning-wasm": "^0.1.29",
106
- "@ruvector/router": "^0.1.27",
107
- "@ruvector/rvagent-wasm": "^0.1.0",
108
- "@ruvector/ruvllm-wasm": "^2.0.2",
109
- "@ruvector/sona": "^0.1.5",
110
110
  "@anthropic-ai/sdk": "*"
111
111
  },
112
112
  "publishConfig": {
@@ -16,7 +16,7 @@
16
16
  * Integration with Claude Code:
17
17
  * - Headless mode (claude -p --output-format json) for automated testing
18
18
  * - Hook system for enforcement gates
19
- * - RuVector/HNSW for semantic shard retrieval
19
+ * - MonoVector/HNSW for semantic shard retrieval
20
20
  *
21
21
  * @module @monomind/guidance
22
22
  */
@@ -16,7 +16,7 @@
16
16
  * Integration with Claude Code:
17
17
  * - Headless mode (claude -p --output-format json) for automated testing
18
18
  * - Hook system for enforcement gates
19
- * - RuVector/HNSW for semantic shard retrieval
19
+ * - MonoVector/HNSW for semantic shard retrieval
20
20
  *
21
21
  * @module @monomind/guidance
22
22
  */
@@ -141,8 +141,7 @@
141
141
  },
142
142
  "dependencies": {
143
143
  "@monomind/hooks": "workspace:*",
144
- "@monomind/memory": "workspace:*",
145
- "@monomind/shared": "workspace:*"
144
+ "@monoes/memory": "workspace:*"
146
145
  },
147
146
  "devDependencies": {
148
147
  "@types/node": "^20.10.0",
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+ set -e
3
+ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
4
+ PACKAGES=(learning-wasm exotic-wasm attention-wasm gnn-wasm ruvllm-wasm rvagent-wasm)
5
+ for pkg in "${PACKAGES[@]}"; do
6
+ echo "Building @monovector/$pkg..."
7
+ (cd "$REPO_ROOT/packages/@monoes/$pkg" && npm run build)
8
+ echo " Done: $pkg"
9
+ done
10
+ echo "All WASM packages built."
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+ # Publish all @monovector/* WASM packages to npm
3
+ # Usage: bash scripts/publish-monovector.sh
4
+ # Requires: npm login + @monovector org created at https://www.npmjs.com/org/create
5
+
6
+ set -e
7
+ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
8
+
9
+ PACKAGES=(learning-wasm exotic-wasm attention-wasm gnn-wasm ruvllm-wasm rvagent-wasm)
10
+
11
+ for pkg in "${PACKAGES[@]}"; do
12
+ PKG_DIR="$REPO_ROOT/packages/@monoes/$pkg/pkg"
13
+ echo "Publishing @monovector/$pkg from $PKG_DIR..."
14
+ (cd "$PKG_DIR" && npm publish --access public)
15
+ echo " ✓ @monovector/$pkg published"
16
+ done
17
+
18
+ echo ""
19
+ echo "All WASM packages published."
20
+ echo "Verify: npm view @monovector/learning-wasm dist-tags --json"
@@ -1,11 +0,0 @@
1
- ---
2
- description: Draft an Architecture Decision Record from accumulated decision markers in this session's prompts
3
- ---
4
-
5
- Run the hook handler's adr-draft action to scan `.monomind/decisions.jsonl` for the last 7 days of decision markers (e.g. "let's go with X", "we chose Y", "decision: Z") and produce an ADR template in `docs/adrs/`.
6
-
7
- ```bash
8
- node "$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs" adr-draft
9
- ```
10
-
11
- After running, open the generated `docs/adrs/ADR-NNNN-YYYY-MM-DD-session-decisions.md`, fill in the Context and Consequences sections, and change Status to Accepted/Rejected.
@@ -1,7 +0,0 @@
1
- ---
2
- description: Show current budget status — today, month, limits, autotuned flag
3
- ---
4
-
5
- ```bash
6
- node "$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs" budget-status
7
- ```