monomind 1.11.8 → 1.11.10

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 (379) hide show
  1. package/.claude/agents/github/issue-tracker.md +5 -5
  2. package/.claude/agents/github/pr-manager.md +5 -5
  3. package/.claude/agents/github/release-manager.md +3 -3
  4. package/.claude/agents/github/repo-architect.md +3 -3
  5. package/.claude/agents/github/swarm-issue.md +1 -1
  6. package/.claude/agents/github/sync-coordinator.md +1 -1
  7. package/.claude/agents/github/workflow-automation.md +1 -1
  8. package/.claude/commands/github/repo-architect.md +1 -1
  9. package/.claude/commands/github/sync-coordinator.md +1 -1
  10. package/.claude/commands/mastermind/createorg.md +4 -1
  11. package/.claude/commands/mastermind/help.md +2 -2
  12. package/.claude/commands/mastermind/orgs.md +21 -0
  13. package/.claude/commands/mastermind/orgstatus.md +59 -0
  14. package/.claude/commands/mastermind/runorg.md +4 -2
  15. package/.claude/commands/mastermind/stoporg.md +78 -0
  16. package/.claude/commands/mastermind/swarm.md +1 -1
  17. package/.claude/helpers/handlers/gates-handler.cjs +135 -0
  18. package/.claude/helpers/handlers/task-handler.cjs +7 -3
  19. package/.claude/helpers/hook-handler.cjs +11 -2
  20. package/.claude/helpers/intelligence.cjs +87 -0
  21. package/.claude/helpers/learning-service.mjs +60 -0
  22. package/.claude/helpers/memory.cjs +69 -0
  23. package/.claude/helpers/router.cjs +68 -0
  24. package/.claude/helpers/session.cjs +63 -0
  25. package/.claude/helpers/utils/monograph.cjs +4 -2
  26. package/.claude/helpers/utils/telemetry.cjs +3 -2
  27. package/.claude/scheduled_tasks.lock +1 -1
  28. package/.claude/settings.json +12 -2
  29. package/.claude/skills/agentic-jujutsu/SKILL.md +1 -1
  30. package/.claude/skills/hive-mind-advanced/SKILL.md +4 -4
  31. package/.claude/skills/mastermind/_agent-select.md +2 -2
  32. package/.claude/skills/mastermind/access.md +11 -11
  33. package/.claude/skills/mastermind/adapter-manager.md +13 -13
  34. package/.claude/skills/mastermind/adapters.md +7 -7
  35. package/.claude/skills/mastermind/agent-detail.md +1 -1
  36. package/.claude/skills/mastermind/agents.md +5 -5
  37. package/.claude/skills/mastermind/approval-detail.md +6 -6
  38. package/.claude/skills/mastermind/approve.md +9 -10
  39. package/.claude/skills/mastermind/backup.md +2 -2
  40. package/.claude/skills/mastermind/bootstrap.md +2 -2
  41. package/.claude/skills/mastermind/companies.md +7 -7
  42. package/.claude/skills/mastermind/createorg.md +213 -8
  43. package/.claude/skills/mastermind/diagnose.md +4 -4
  44. package/.claude/skills/mastermind/env.md +1 -1
  45. package/.claude/skills/mastermind/environments.md +8 -8
  46. package/.claude/skills/mastermind/export.md +12 -3
  47. package/.claude/skills/mastermind/goal-detail.md +9 -9
  48. package/.claude/skills/mastermind/goals.md +4 -4
  49. package/.claude/skills/mastermind/heartbeat.md +1 -1
  50. package/.claude/skills/mastermind/idea.md +4 -4
  51. package/.claude/skills/mastermind/import.md +8 -8
  52. package/.claude/skills/mastermind/inbox.md +4 -4
  53. package/.claude/skills/mastermind/instance-settings.md +9 -9
  54. package/.claude/skills/mastermind/instance.md +9 -7
  55. package/.claude/skills/mastermind/invite-landing.md +5 -5
  56. package/.claude/skills/mastermind/invites.md +12 -12
  57. package/.claude/skills/mastermind/issue-detail.md +8 -8
  58. package/.claude/skills/mastermind/monitor.md +11 -11
  59. package/.claude/skills/mastermind/my-issues.md +6 -6
  60. package/.claude/skills/mastermind/new-agent.md +4 -4
  61. package/.claude/skills/mastermind/org-chart.md +8 -6
  62. package/.claude/skills/mastermind/org-settings.md +58 -21
  63. package/.claude/skills/mastermind/orgs.md +98 -0
  64. package/.claude/skills/mastermind/orgstatus.md +194 -0
  65. package/.claude/skills/mastermind/plan-to-tasks.md +1 -1
  66. package/.claude/skills/mastermind/plugin-manager.md +12 -12
  67. package/.claude/skills/mastermind/plugin-settings.md +5 -5
  68. package/.claude/skills/mastermind/plugins.md +5 -5
  69. package/.claude/skills/mastermind/profile.md +2 -2
  70. package/.claude/skills/mastermind/project-detail.md +12 -12
  71. package/.claude/skills/mastermind/project-workspace.md +4 -4
  72. package/.claude/skills/mastermind/projects.md +4 -4
  73. package/.claude/skills/mastermind/review.md +50 -0
  74. package/.claude/skills/mastermind/routine-detail.md +3 -3
  75. package/.claude/skills/mastermind/routines.md +7 -6
  76. package/.claude/skills/mastermind/runorg.md +178 -8
  77. package/.claude/skills/mastermind/search.md +6 -6
  78. package/.claude/skills/mastermind/secrets.md +6 -6
  79. package/.claude/skills/mastermind/skills.md +4 -4
  80. package/.claude/skills/mastermind/stoporg.md +138 -0
  81. package/.claude/skills/mastermind/workspace-detail.md +5 -5
  82. package/.claude/skills/mastermind/workspaces.md +9 -9
  83. package/.claude/skills/performance-analysis/SKILL.md +3 -3
  84. package/.claude/skills/sparc-methodology/SKILL.md +2 -2
  85. package/.claude/skills/swarm-advanced/SKILL.md +4 -4
  86. package/.claude-plugin/README.md +10 -10
  87. package/.claude-plugin/docs/INSTALLATION.md +6 -6
  88. package/.claude-plugin/docs/PLUGIN_SUMMARY.md +9 -9
  89. package/.claude-plugin/docs/QUICKSTART.md +2 -2
  90. package/.claude-plugin/docs/STRUCTURE.md +1 -1
  91. package/.claude-plugin/marketplace.json +5 -5
  92. package/.claude-plugin/plugin.json +3 -3
  93. package/README.md +129 -376
  94. package/package.json +4 -8
  95. package/packages/@monomind/cli/README.md +129 -376
  96. package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +27 -1
  97. package/packages/@monomind/cli/dist/src/agents/registry-builder.js +2 -2
  98. package/packages/@monomind/cli/dist/src/commands/agent.js +4 -9
  99. package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
  100. package/packages/@monomind/cli/dist/src/commands/analyze.js +1 -1
  101. package/packages/@monomind/cli/dist/src/commands/claims.d.ts +1 -1
  102. package/packages/@monomind/cli/dist/src/commands/claims.js +2 -2
  103. package/packages/@monomind/cli/dist/src/commands/cleanup.d.ts +1 -1
  104. package/packages/@monomind/cli/dist/src/commands/cleanup.js +1 -1
  105. package/packages/@monomind/cli/dist/src/commands/completions.d.ts +1 -1
  106. package/packages/@monomind/cli/dist/src/commands/completions.js +1 -1
  107. package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +1 -1
  108. package/packages/@monomind/cli/dist/src/commands/deployment.js +2 -2
  109. package/packages/@monomind/cli/dist/src/commands/doctor.d.ts +1 -1
  110. package/packages/@monomind/cli/dist/src/commands/doctor.js +69 -4
  111. package/packages/@monomind/cli/dist/src/commands/guidance.js +129 -0
  112. package/packages/@monomind/cli/dist/src/commands/index.js +4 -0
  113. package/packages/@monomind/cli/dist/src/commands/init.js +18 -0
  114. package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +1 -1
  115. package/packages/@monomind/cli/dist/src/commands/monovector/import.js +1 -1
  116. package/packages/@monomind/cli/dist/src/commands/monovector/index.d.ts +1 -1
  117. package/packages/@monomind/cli/dist/src/commands/monovector/index.js +1 -1
  118. package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +1 -1
  119. package/packages/@monomind/cli/dist/src/commands/monovector/setup.js +2 -2
  120. package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
  121. package/packages/@monomind/cli/dist/src/commands/neural.js +2 -2
  122. package/packages/@monomind/cli/dist/src/commands/performance.d.ts +1 -1
  123. package/packages/@monomind/cli/dist/src/commands/performance.js +2 -2
  124. package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +1 -1
  125. package/packages/@monomind/cli/dist/src/commands/platforms.js +1 -1
  126. package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +1 -1
  127. package/packages/@monomind/cli/dist/src/commands/plugins.js +2 -4
  128. package/packages/@monomind/cli/dist/src/commands/providers.d.ts +1 -1
  129. package/packages/@monomind/cli/dist/src/commands/providers.js +2 -2
  130. package/packages/@monomind/cli/dist/src/commands/route.d.ts +1 -1
  131. package/packages/@monomind/cli/dist/src/commands/route.js +5 -11
  132. package/packages/@monomind/cli/dist/src/commands/security.d.ts +1 -1
  133. package/packages/@monomind/cli/dist/src/commands/security.js +140 -91
  134. package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +7 -1
  135. package/packages/@monomind/cli/dist/src/index.d.ts +1 -1
  136. package/packages/@monomind/cli/dist/src/index.js +10 -26
  137. package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +2 -2
  138. package/packages/@monomind/cli/dist/src/init/executor.js +3 -3
  139. package/packages/@monomind/cli/dist/src/init/settings-generator.js +2 -2
  140. package/packages/@monomind/cli/dist/src/mcp-client.d.ts +5 -0
  141. package/packages/@monomind/cli/dist/src/mcp-client.js +7 -0
  142. package/packages/@monomind/cli/dist/src/mcp-server.js +17 -1
  143. package/packages/@monomind/cli/dist/src/mcp-tools/a2a-tools.js +6 -6
  144. package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +2 -2
  145. package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +1 -1
  146. package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +1 -52
  147. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +4 -0
  148. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +4 -0
  149. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1 -2
  150. package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +107 -5
  151. package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.d.ts +6 -6
  152. package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +48 -61
  153. package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +0 -1
  154. package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +232 -57
  155. package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +3 -32
  156. package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -69
  157. package/packages/@monomind/cli/dist/src/routing/embed-worker.d.ts +2 -0
  158. package/packages/@monomind/cli/dist/src/routing/embed-worker.js +55 -0
  159. package/packages/@monomind/cli/dist/src/routing/embedder.d.ts +31 -0
  160. package/packages/@monomind/cli/dist/src/routing/embedder.js +0 -0
  161. package/packages/@monomind/cli/dist/src/routing/llm-caller.d.ts +1 -1
  162. package/packages/@monomind/cli/dist/src/routing/llm-caller.js +18 -3
  163. package/packages/@monomind/cli/dist/src/routing/route-layer-factory.d.ts +9 -0
  164. package/packages/@monomind/cli/dist/src/routing/route-layer-factory.js +151 -0
  165. package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -1
  166. package/packages/@monomind/cli/dist/src/suggest.d.ts +1 -1
  167. package/packages/@monomind/cli/dist/src/suggest.js +1 -1
  168. package/packages/@monomind/cli/package.json +9 -10
  169. package/packages/@monomind/cli/scripts/understand-analyze.mjs +1 -1
  170. package/packages/@monomind/guidance/README.md +6 -6
  171. package/packages/@monomind/guidance/package.json +9 -1
  172. package/scripts/install.sh +7 -7
  173. package/scripts/ua-enrich.mjs +3 -2
  174. package/packages/@monomind/shared/dist/agent-contract.d.ts +0 -28
  175. package/packages/@monomind/shared/dist/agent-contract.js +0 -57
  176. package/packages/@monomind/shared/dist/agent-error-result.d.ts +0 -17
  177. package/packages/@monomind/shared/dist/agent-error-result.js +0 -23
  178. package/packages/@monomind/shared/dist/core/config/defaults.d.ts +0 -41
  179. package/packages/@monomind/shared/dist/core/config/defaults.js +0 -186
  180. package/packages/@monomind/shared/dist/core/config/index.d.ts +0 -8
  181. package/packages/@monomind/shared/dist/core/config/index.js +0 -12
  182. package/packages/@monomind/shared/dist/core/config/loader.d.ts +0 -45
  183. package/packages/@monomind/shared/dist/core/config/loader.js +0 -238
  184. package/packages/@monomind/shared/dist/core/config/schema.d.ts +0 -324
  185. package/packages/@monomind/shared/dist/core/config/schema.js +0 -160
  186. package/packages/@monomind/shared/dist/core/config/validator.d.ts +0 -92
  187. package/packages/@monomind/shared/dist/core/config/validator.js +0 -147
  188. package/packages/@monomind/shared/dist/core/event-bus.d.ts +0 -31
  189. package/packages/@monomind/shared/dist/core/event-bus.js +0 -197
  190. package/packages/@monomind/shared/dist/core/index.d.ts +0 -15
  191. package/packages/@monomind/shared/dist/core/index.js +0 -19
  192. package/packages/@monomind/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
  193. package/packages/@monomind/shared/dist/core/interfaces/agent.interface.js +0 -6
  194. package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
  195. package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.js +0 -7
  196. package/packages/@monomind/shared/dist/core/interfaces/event.interface.d.ts +0 -224
  197. package/packages/@monomind/shared/dist/core/interfaces/event.interface.js +0 -46
  198. package/packages/@monomind/shared/dist/core/interfaces/index.d.ts +0 -10
  199. package/packages/@monomind/shared/dist/core/interfaces/index.js +0 -15
  200. package/packages/@monomind/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
  201. package/packages/@monomind/shared/dist/core/interfaces/memory.interface.js +0 -7
  202. package/packages/@monomind/shared/dist/core/interfaces/task.interface.d.ts +0 -185
  203. package/packages/@monomind/shared/dist/core/interfaces/task.interface.js +0 -6
  204. package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
  205. package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.js +0 -101
  206. package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
  207. package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.js +0 -166
  208. package/packages/@monomind/shared/dist/core/orchestrator/index.d.ts +0 -46
  209. package/packages/@monomind/shared/dist/core/orchestrator/index.js +0 -64
  210. package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
  211. package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
  212. package/packages/@monomind/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
  213. package/packages/@monomind/shared/dist/core/orchestrator/session-manager.js +0 -193
  214. package/packages/@monomind/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
  215. package/packages/@monomind/shared/dist/core/orchestrator/task-manager.js +0 -253
  216. package/packages/@monomind/shared/dist/events/domain-events.d.ts +0 -282
  217. package/packages/@monomind/shared/dist/events/domain-events.js +0 -165
  218. package/packages/@monomind/shared/dist/events/event-store.d.ts +0 -126
  219. package/packages/@monomind/shared/dist/events/event-store.js +0 -416
  220. package/packages/@monomind/shared/dist/events/event-store.test.d.ts +0 -8
  221. package/packages/@monomind/shared/dist/events/event-store.test.js +0 -293
  222. package/packages/@monomind/shared/dist/events/example-usage.d.ts +0 -10
  223. package/packages/@monomind/shared/dist/events/example-usage.js +0 -193
  224. package/packages/@monomind/shared/dist/events/index.d.ts +0 -21
  225. package/packages/@monomind/shared/dist/events/index.js +0 -22
  226. package/packages/@monomind/shared/dist/events/projections.d.ts +0 -177
  227. package/packages/@monomind/shared/dist/events/projections.js +0 -421
  228. package/packages/@monomind/shared/dist/events/rvf-event-log.d.ts +0 -82
  229. package/packages/@monomind/shared/dist/events/rvf-event-log.js +0 -340
  230. package/packages/@monomind/shared/dist/events/state-reconstructor.d.ts +0 -101
  231. package/packages/@monomind/shared/dist/events/state-reconstructor.js +0 -263
  232. package/packages/@monomind/shared/dist/events.d.ts +0 -80
  233. package/packages/@monomind/shared/dist/events.js +0 -249
  234. package/packages/@monomind/shared/dist/hooks/example-usage.d.ts +0 -42
  235. package/packages/@monomind/shared/dist/hooks/example-usage.js +0 -351
  236. package/packages/@monomind/shared/dist/hooks/executor.d.ts +0 -100
  237. package/packages/@monomind/shared/dist/hooks/executor.js +0 -264
  238. package/packages/@monomind/shared/dist/hooks/hooks.test.d.ts +0 -9
  239. package/packages/@monomind/shared/dist/hooks/hooks.test.js +0 -322
  240. package/packages/@monomind/shared/dist/hooks/index.d.ts +0 -52
  241. package/packages/@monomind/shared/dist/hooks/index.js +0 -51
  242. package/packages/@monomind/shared/dist/hooks/registry.d.ts +0 -133
  243. package/packages/@monomind/shared/dist/hooks/registry.js +0 -277
  244. package/packages/@monomind/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
  245. package/packages/@monomind/shared/dist/hooks/safety/bash-safety.js +0 -481
  246. package/packages/@monomind/shared/dist/hooks/safety/file-organization.d.ts +0 -144
  247. package/packages/@monomind/shared/dist/hooks/safety/file-organization.js +0 -328
  248. package/packages/@monomind/shared/dist/hooks/safety/git-commit.d.ts +0 -158
  249. package/packages/@monomind/shared/dist/hooks/safety/git-commit.js +0 -450
  250. package/packages/@monomind/shared/dist/hooks/safety/index.d.ts +0 -17
  251. package/packages/@monomind/shared/dist/hooks/safety/index.js +0 -17
  252. package/packages/@monomind/shared/dist/hooks/session-hooks.d.ts +0 -234
  253. package/packages/@monomind/shared/dist/hooks/session-hooks.js +0 -334
  254. package/packages/@monomind/shared/dist/hooks/task-hooks.d.ts +0 -163
  255. package/packages/@monomind/shared/dist/hooks/task-hooks.js +0 -326
  256. package/packages/@monomind/shared/dist/hooks/types.d.ts +0 -267
  257. package/packages/@monomind/shared/dist/hooks/types.js +0 -62
  258. package/packages/@monomind/shared/dist/hooks/verify-exports.test.d.ts +0 -9
  259. package/packages/@monomind/shared/dist/hooks/verify-exports.test.js +0 -93
  260. package/packages/@monomind/shared/dist/index.d.ts +0 -46
  261. package/packages/@monomind/shared/dist/index.js +0 -77
  262. package/packages/@monomind/shared/dist/mcp/connection-pool.d.ts +0 -98
  263. package/packages/@monomind/shared/dist/mcp/connection-pool.js +0 -364
  264. package/packages/@monomind/shared/dist/mcp/index.d.ts +0 -69
  265. package/packages/@monomind/shared/dist/mcp/index.js +0 -84
  266. package/packages/@monomind/shared/dist/mcp/server.d.ts +0 -166
  267. package/packages/@monomind/shared/dist/mcp/server.js +0 -593
  268. package/packages/@monomind/shared/dist/mcp/session-manager.d.ts +0 -136
  269. package/packages/@monomind/shared/dist/mcp/session-manager.js +0 -335
  270. package/packages/@monomind/shared/dist/mcp/tool-registry.d.ts +0 -178
  271. package/packages/@monomind/shared/dist/mcp/tool-registry.js +0 -439
  272. package/packages/@monomind/shared/dist/mcp/transport/http.d.ts +0 -104
  273. package/packages/@monomind/shared/dist/mcp/transport/http.js +0 -476
  274. package/packages/@monomind/shared/dist/mcp/transport/index.d.ts +0 -102
  275. package/packages/@monomind/shared/dist/mcp/transport/index.js +0 -238
  276. package/packages/@monomind/shared/dist/mcp/transport/stdio.d.ts +0 -104
  277. package/packages/@monomind/shared/dist/mcp/transport/stdio.js +0 -263
  278. package/packages/@monomind/shared/dist/mcp/transport/websocket.d.ts +0 -133
  279. package/packages/@monomind/shared/dist/mcp/transport/websocket.js +0 -396
  280. package/packages/@monomind/shared/dist/mcp/types.d.ts +0 -438
  281. package/packages/@monomind/shared/dist/mcp/types.js +0 -54
  282. package/packages/@monomind/shared/dist/plugin-interface.d.ts +0 -544
  283. package/packages/@monomind/shared/dist/plugin-interface.js +0 -23
  284. package/packages/@monomind/shared/dist/plugin-loader.d.ts +0 -139
  285. package/packages/@monomind/shared/dist/plugin-loader.js +0 -434
  286. package/packages/@monomind/shared/dist/plugin-registry.d.ts +0 -183
  287. package/packages/@monomind/shared/dist/plugin-registry.js +0 -457
  288. package/packages/@monomind/shared/dist/plugins/index.d.ts +0 -10
  289. package/packages/@monomind/shared/dist/plugins/index.js +0 -10
  290. package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
  291. package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
  292. package/packages/@monomind/shared/dist/plugins/official/index.d.ts +0 -10
  293. package/packages/@monomind/shared/dist/plugins/official/index.js +0 -10
  294. package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
  295. package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.js +0 -355
  296. package/packages/@monomind/shared/dist/plugins/types.d.ts +0 -93
  297. package/packages/@monomind/shared/dist/plugins/types.js +0 -9
  298. package/packages/@monomind/shared/dist/reducers.d.ts +0 -33
  299. package/packages/@monomind/shared/dist/reducers.js +0 -89
  300. package/packages/@monomind/shared/dist/resilience/bulkhead.d.ts +0 -105
  301. package/packages/@monomind/shared/dist/resilience/bulkhead.js +0 -206
  302. package/packages/@monomind/shared/dist/resilience/circuit-breaker.d.ts +0 -132
  303. package/packages/@monomind/shared/dist/resilience/circuit-breaker.js +0 -233
  304. package/packages/@monomind/shared/dist/resilience/index.d.ts +0 -19
  305. package/packages/@monomind/shared/dist/resilience/index.js +0 -19
  306. package/packages/@monomind/shared/dist/resilience/rate-limiter.d.ts +0 -168
  307. package/packages/@monomind/shared/dist/resilience/rate-limiter.js +0 -314
  308. package/packages/@monomind/shared/dist/resilience/retry.d.ts +0 -91
  309. package/packages/@monomind/shared/dist/resilience/retry.js +0 -159
  310. package/packages/@monomind/shared/dist/retry-policy.d.ts +0 -14
  311. package/packages/@monomind/shared/dist/retry-policy.js +0 -23
  312. package/packages/@monomind/shared/dist/retry-runner.d.ts +0 -21
  313. package/packages/@monomind/shared/dist/retry-runner.js +0 -57
  314. package/packages/@monomind/shared/dist/schema-validator.d.ts +0 -46
  315. package/packages/@monomind/shared/dist/schema-validator.js +0 -133
  316. package/packages/@monomind/shared/dist/scratchpad.d.ts +0 -23
  317. package/packages/@monomind/shared/dist/scratchpad.js +0 -32
  318. package/packages/@monomind/shared/dist/security/index.d.ts +0 -10
  319. package/packages/@monomind/shared/dist/security/index.js +0 -12
  320. package/packages/@monomind/shared/dist/security/input-validation.d.ts +0 -73
  321. package/packages/@monomind/shared/dist/security/input-validation.js +0 -201
  322. package/packages/@monomind/shared/dist/security/secure-random.d.ts +0 -92
  323. package/packages/@monomind/shared/dist/security/secure-random.js +0 -142
  324. package/packages/@monomind/shared/dist/services/index.d.ts +0 -7
  325. package/packages/@monomind/shared/dist/services/index.js +0 -7
  326. package/packages/@monomind/shared/dist/services/progress.service.d.ts +0 -124
  327. package/packages/@monomind/shared/dist/services/progress.service.js +0 -402
  328. package/packages/@monomind/shared/dist/state-manager.d.ts +0 -34
  329. package/packages/@monomind/shared/dist/state-manager.js +0 -73
  330. package/packages/@monomind/shared/dist/state-validator.d.ts +0 -20
  331. package/packages/@monomind/shared/dist/state-validator.js +0 -49
  332. package/packages/@monomind/shared/dist/swarm-state.d.ts +0 -52
  333. package/packages/@monomind/shared/dist/swarm-state.js +0 -18
  334. package/packages/@monomind/shared/dist/testing/fixture-builder.d.ts +0 -14
  335. package/packages/@monomind/shared/dist/testing/fixture-builder.js +0 -32
  336. package/packages/@monomind/shared/dist/testing/index.d.ts +0 -2
  337. package/packages/@monomind/shared/dist/testing/index.js +0 -2
  338. package/packages/@monomind/shared/dist/testing/test-model.d.ts +0 -29
  339. package/packages/@monomind/shared/dist/testing/test-model.js +0 -53
  340. package/packages/@monomind/shared/dist/types/agent-registry.d.ts +0 -62
  341. package/packages/@monomind/shared/dist/types/agent-registry.js +0 -8
  342. package/packages/@monomind/shared/dist/types/agent-version.d.ts +0 -49
  343. package/packages/@monomind/shared/dist/types/agent-version.js +0 -7
  344. package/packages/@monomind/shared/dist/types/agent.types.d.ts +0 -137
  345. package/packages/@monomind/shared/dist/types/agent.types.js +0 -6
  346. package/packages/@monomind/shared/dist/types/benchmark.d.ts +0 -39
  347. package/packages/@monomind/shared/dist/types/benchmark.js +0 -6
  348. package/packages/@monomind/shared/dist/types/communication-flow.d.ts +0 -25
  349. package/packages/@monomind/shared/dist/types/communication-flow.js +0 -7
  350. package/packages/@monomind/shared/dist/types/consensus-audit.d.ts +0 -40
  351. package/packages/@monomind/shared/dist/types/consensus-audit.js +0 -7
  352. package/packages/@monomind/shared/dist/types/dlq.d.ts +0 -40
  353. package/packages/@monomind/shared/dist/types/dlq.js +0 -7
  354. package/packages/@monomind/shared/dist/types/eval.d.ts +0 -59
  355. package/packages/@monomind/shared/dist/types/eval.js +0 -6
  356. package/packages/@monomind/shared/dist/types/index.d.ts +0 -19
  357. package/packages/@monomind/shared/dist/types/index.js +0 -33
  358. package/packages/@monomind/shared/dist/types/mcp.types.d.ts +0 -266
  359. package/packages/@monomind/shared/dist/types/mcp.types.js +0 -7
  360. package/packages/@monomind/shared/dist/types/memory.types.d.ts +0 -236
  361. package/packages/@monomind/shared/dist/types/memory.types.js +0 -7
  362. package/packages/@monomind/shared/dist/types/retry.d.ts +0 -72
  363. package/packages/@monomind/shared/dist/types/retry.js +0 -40
  364. package/packages/@monomind/shared/dist/types/specialization.d.ts +0 -27
  365. package/packages/@monomind/shared/dist/types/specialization.js +0 -8
  366. package/packages/@monomind/shared/dist/types/swarm.types.d.ts +0 -186
  367. package/packages/@monomind/shared/dist/types/swarm.types.js +0 -65
  368. package/packages/@monomind/shared/dist/types/task.types.d.ts +0 -178
  369. package/packages/@monomind/shared/dist/types/task.types.js +0 -32
  370. package/packages/@monomind/shared/dist/types/termination.d.ts +0 -29
  371. package/packages/@monomind/shared/dist/types/termination.js +0 -14
  372. package/packages/@monomind/shared/dist/types/tool-version.d.ts +0 -41
  373. package/packages/@monomind/shared/dist/types/tool-version.js +0 -8
  374. package/packages/@monomind/shared/dist/types/trigger.d.ts +0 -40
  375. package/packages/@monomind/shared/dist/types/trigger.js +0 -8
  376. package/packages/@monomind/shared/dist/types.d.ts +0 -197
  377. package/packages/@monomind/shared/dist/types.js +0 -21
  378. package/packages/@monomind/shared/dist/utils/secure-logger.d.ts +0 -69
  379. package/packages/@monomind/shared/dist/utils/secure-logger.js +0 -208
@@ -1,168 +0,0 @@
1
- /**
2
- * Rate Limiter
3
- *
4
- * Production-ready rate limiting implementations.
5
- *
6
- * @module v1/shared/resilience/rate-limiter
7
- */
8
- /**
9
- * Rate limiter options
10
- */
11
- export interface RateLimiterOptions {
12
- /** Maximum requests allowed in the window */
13
- maxRequests: number;
14
- /** Time window in milliseconds */
15
- windowMs: number;
16
- /** Enable sliding window (vs fixed window) */
17
- slidingWindow?: boolean;
18
- /** Key generator for per-key limiting */
19
- keyGenerator?: (context: unknown) => string;
20
- /** Skip limiter for certain requests */
21
- skip?: (context: unknown) => boolean;
22
- /** Handler when rate limit is exceeded */
23
- onRateLimited?: (key: string, remaining: number, resetAt: Date) => void;
24
- }
25
- /**
26
- * Rate limit result
27
- */
28
- export interface RateLimitResult {
29
- allowed: boolean;
30
- remaining: number;
31
- resetAt: Date;
32
- retryAfter: number;
33
- total: number;
34
- used: number;
35
- }
36
- /**
37
- * Base Rate Limiter interface
38
- */
39
- export interface RateLimiter {
40
- /** Check if request is allowed */
41
- check(key?: string): RateLimitResult;
42
- /** Consume a request token */
43
- consume(key?: string): RateLimitResult;
44
- /** Reset a specific key or all keys */
45
- reset(key?: string): void;
46
- /** Get current status */
47
- status(key?: string): RateLimitResult;
48
- }
49
- /**
50
- * Sliding Window Rate Limiter
51
- *
52
- * Uses sliding window algorithm for smooth rate limiting.
53
- *
54
- * @example
55
- * const limiter = new SlidingWindowRateLimiter({
56
- * maxRequests: 100,
57
- * windowMs: 60000, // 100 requests per minute
58
- * });
59
- *
60
- * const result = limiter.consume('user-123');
61
- * if (!result.allowed) {
62
- * throw new Error(`Rate limited. Retry in ${result.retryAfter}ms`);
63
- * }
64
- */
65
- export declare class SlidingWindowRateLimiter implements RateLimiter {
66
- private readonly options;
67
- private readonly requests;
68
- private cleanupInterval?;
69
- constructor(options: RateLimiterOptions);
70
- /**
71
- * Check if a request would be allowed without consuming
72
- */
73
- check(key?: string): RateLimitResult;
74
- /**
75
- * Consume a request token
76
- */
77
- consume(key?: string): RateLimitResult;
78
- /**
79
- * Reset rate limit for a key
80
- */
81
- reset(key?: string): void;
82
- /**
83
- * Get current status
84
- */
85
- status(key?: string): RateLimitResult;
86
- /**
87
- * Cleanup resources
88
- */
89
- destroy(): void;
90
- /**
91
- * Clean old entries for a specific key
92
- */
93
- private cleanupKey;
94
- /**
95
- * Clean all old entries
96
- */
97
- private cleanup;
98
- /**
99
- * Get reset time based on oldest entry
100
- */
101
- private getResetTime;
102
- /**
103
- * Get retry after time in ms
104
- */
105
- private getRetryAfter;
106
- }
107
- /**
108
- * Token Bucket Rate Limiter
109
- *
110
- * Uses token bucket algorithm for burst-friendly rate limiting.
111
- *
112
- * @example
113
- * const limiter = new TokenBucketRateLimiter({
114
- * maxRequests: 10, // bucket size
115
- * windowMs: 1000, // refill interval
116
- * });
117
- */
118
- export declare class TokenBucketRateLimiter implements RateLimiter {
119
- private readonly options;
120
- private readonly buckets;
121
- private cleanupInterval?;
122
- constructor(options: RateLimiterOptions);
123
- /**
124
- * Check if a request would be allowed
125
- */
126
- check(key?: string): RateLimitResult;
127
- /**
128
- * Consume a token
129
- */
130
- consume(key?: string): RateLimitResult;
131
- /**
132
- * Reset bucket for a key
133
- */
134
- reset(key?: string): void;
135
- /**
136
- * Get current status
137
- */
138
- status(key?: string): RateLimitResult;
139
- /**
140
- * Cleanup resources
141
- */
142
- destroy(): void;
143
- /**
144
- * Get or create bucket for key
145
- */
146
- private getBucket;
147
- /**
148
- * Refill tokens based on elapsed time
149
- */
150
- private refill;
151
- /**
152
- * Clean inactive buckets
153
- */
154
- private cleanup;
155
- }
156
- /**
157
- * Rate limiter middleware for Express-like frameworks
158
- */
159
- export declare function createRateLimiterMiddleware(limiter: RateLimiter): (req: {
160
- ip?: string;
161
- headers?: Record<string, string>;
162
- }, res: {
163
- status: (code: number) => {
164
- json: (body: unknown) => void;
165
- };
166
- setHeader: (name: string, value: string) => void;
167
- }, next: () => void) => void;
168
- //# sourceMappingURL=rate-limiter.d.ts.map
@@ -1,314 +0,0 @@
1
- /**
2
- * Rate Limiter
3
- *
4
- * Production-ready rate limiting implementations.
5
- *
6
- * @module v1/shared/resilience/rate-limiter
7
- */
8
- /**
9
- * Sliding Window Rate Limiter
10
- *
11
- * Uses sliding window algorithm for smooth rate limiting.
12
- *
13
- * @example
14
- * const limiter = new SlidingWindowRateLimiter({
15
- * maxRequests: 100,
16
- * windowMs: 60000, // 100 requests per minute
17
- * });
18
- *
19
- * const result = limiter.consume('user-123');
20
- * if (!result.allowed) {
21
- * throw new Error(`Rate limited. Retry in ${result.retryAfter}ms`);
22
- * }
23
- */
24
- export class SlidingWindowRateLimiter {
25
- options;
26
- requests = new Map();
27
- cleanupInterval;
28
- constructor(options) {
29
- this.options = {
30
- slidingWindow: true,
31
- ...options,
32
- };
33
- // Periodic cleanup of old entries
34
- this.cleanupInterval = setInterval(() => {
35
- this.cleanup();
36
- }, this.options.windowMs);
37
- }
38
- /**
39
- * Check if a request would be allowed without consuming
40
- */
41
- check(key = 'default') {
42
- this.cleanupKey(key);
43
- const entries = this.requests.get(key) || [];
44
- return {
45
- allowed: entries.length < this.options.maxRequests,
46
- remaining: Math.max(0, this.options.maxRequests - entries.length),
47
- resetAt: this.getResetTime(entries),
48
- retryAfter: this.getRetryAfter(entries),
49
- total: this.options.maxRequests,
50
- used: entries.length,
51
- };
52
- }
53
- /**
54
- * Consume a request token
55
- */
56
- consume(key = 'default') {
57
- // Clean old entries first
58
- this.cleanupKey(key);
59
- let entries = this.requests.get(key);
60
- if (!entries) {
61
- entries = [];
62
- this.requests.set(key, entries);
63
- }
64
- // Check if allowed
65
- if (entries.length >= this.options.maxRequests) {
66
- const result = {
67
- allowed: false,
68
- remaining: 0,
69
- resetAt: this.getResetTime(entries),
70
- retryAfter: this.getRetryAfter(entries),
71
- total: this.options.maxRequests,
72
- used: entries.length,
73
- };
74
- this.options.onRateLimited?.(key, 0, result.resetAt);
75
- return result;
76
- }
77
- // Add new entry
78
- entries.push({ timestamp: Date.now(), key });
79
- return {
80
- allowed: true,
81
- remaining: this.options.maxRequests - entries.length,
82
- resetAt: this.getResetTime(entries),
83
- retryAfter: 0,
84
- total: this.options.maxRequests,
85
- used: entries.length,
86
- };
87
- }
88
- /**
89
- * Reset rate limit for a key
90
- */
91
- reset(key) {
92
- if (key) {
93
- this.requests.delete(key);
94
- }
95
- else {
96
- this.requests.clear();
97
- }
98
- }
99
- /**
100
- * Get current status
101
- */
102
- status(key = 'default') {
103
- return this.check(key);
104
- }
105
- /**
106
- * Cleanup resources
107
- */
108
- destroy() {
109
- if (this.cleanupInterval) {
110
- clearInterval(this.cleanupInterval);
111
- this.cleanupInterval = undefined;
112
- }
113
- this.requests.clear();
114
- }
115
- /**
116
- * Clean old entries for a specific key
117
- */
118
- cleanupKey(key) {
119
- const entries = this.requests.get(key);
120
- if (!entries)
121
- return;
122
- const cutoff = Date.now() - this.options.windowMs;
123
- const filtered = entries.filter((e) => e.timestamp >= cutoff);
124
- if (filtered.length === 0) {
125
- this.requests.delete(key);
126
- }
127
- else if (filtered.length !== entries.length) {
128
- this.requests.set(key, filtered);
129
- }
130
- }
131
- /**
132
- * Clean all old entries
133
- */
134
- cleanup() {
135
- for (const key of this.requests.keys()) {
136
- this.cleanupKey(key);
137
- }
138
- }
139
- /**
140
- * Get reset time based on oldest entry
141
- */
142
- getResetTime(entries) {
143
- if (entries.length === 0) {
144
- return new Date(Date.now() + this.options.windowMs);
145
- }
146
- const oldest = entries[0];
147
- return new Date(oldest.timestamp + this.options.windowMs);
148
- }
149
- /**
150
- * Get retry after time in ms
151
- */
152
- getRetryAfter(entries) {
153
- if (entries.length < this.options.maxRequests) {
154
- return 0;
155
- }
156
- const oldest = entries[0];
157
- const resetAt = oldest.timestamp + this.options.windowMs;
158
- return Math.max(0, resetAt - Date.now());
159
- }
160
- }
161
- /**
162
- * Token Bucket Rate Limiter
163
- *
164
- * Uses token bucket algorithm for burst-friendly rate limiting.
165
- *
166
- * @example
167
- * const limiter = new TokenBucketRateLimiter({
168
- * maxRequests: 10, // bucket size
169
- * windowMs: 1000, // refill interval
170
- * });
171
- */
172
- export class TokenBucketRateLimiter {
173
- options;
174
- buckets = new Map();
175
- cleanupInterval;
176
- constructor(options) {
177
- this.options = options;
178
- // Periodic cleanup
179
- this.cleanupInterval = setInterval(() => {
180
- this.cleanup();
181
- }, this.options.windowMs * 10);
182
- }
183
- /**
184
- * Check if a request would be allowed
185
- */
186
- check(key = 'default') {
187
- this.refill(key);
188
- const bucket = this.getBucket(key);
189
- return {
190
- allowed: bucket.tokens >= 1,
191
- remaining: Math.floor(bucket.tokens),
192
- resetAt: new Date(bucket.lastRefill + this.options.windowMs),
193
- retryAfter: bucket.tokens >= 1 ? 0 : this.options.windowMs,
194
- total: this.options.maxRequests,
195
- used: this.options.maxRequests - Math.floor(bucket.tokens),
196
- };
197
- }
198
- /**
199
- * Consume a token
200
- */
201
- consume(key = 'default') {
202
- this.refill(key);
203
- const bucket = this.getBucket(key);
204
- if (bucket.tokens < 1) {
205
- const result = {
206
- allowed: false,
207
- remaining: 0,
208
- resetAt: new Date(bucket.lastRefill + this.options.windowMs),
209
- retryAfter: this.options.windowMs,
210
- total: this.options.maxRequests,
211
- used: this.options.maxRequests,
212
- };
213
- this.options.onRateLimited?.(key, 0, result.resetAt);
214
- return result;
215
- }
216
- bucket.tokens -= 1;
217
- return {
218
- allowed: true,
219
- remaining: Math.floor(bucket.tokens),
220
- resetAt: new Date(bucket.lastRefill + this.options.windowMs),
221
- retryAfter: 0,
222
- total: this.options.maxRequests,
223
- used: this.options.maxRequests - Math.floor(bucket.tokens),
224
- };
225
- }
226
- /**
227
- * Reset bucket for a key
228
- */
229
- reset(key) {
230
- if (key) {
231
- this.buckets.delete(key);
232
- }
233
- else {
234
- this.buckets.clear();
235
- }
236
- }
237
- /**
238
- * Get current status
239
- */
240
- status(key = 'default') {
241
- return this.check(key);
242
- }
243
- /**
244
- * Cleanup resources
245
- */
246
- destroy() {
247
- if (this.cleanupInterval) {
248
- clearInterval(this.cleanupInterval);
249
- this.cleanupInterval = undefined;
250
- }
251
- this.buckets.clear();
252
- }
253
- /**
254
- * Get or create bucket for key
255
- */
256
- getBucket(key) {
257
- let bucket = this.buckets.get(key);
258
- if (!bucket) {
259
- bucket = { tokens: this.options.maxRequests, lastRefill: Date.now() };
260
- this.buckets.set(key, bucket);
261
- }
262
- return bucket;
263
- }
264
- /**
265
- * Refill tokens based on elapsed time
266
- */
267
- refill(key) {
268
- const bucket = this.getBucket(key);
269
- const now = Date.now();
270
- const elapsed = now - bucket.lastRefill;
271
- if (elapsed >= this.options.windowMs) {
272
- // Full refill after window
273
- const intervals = Math.floor(elapsed / this.options.windowMs);
274
- bucket.tokens = Math.min(this.options.maxRequests, bucket.tokens + intervals * this.options.maxRequests);
275
- bucket.lastRefill = now;
276
- }
277
- }
278
- /**
279
- * Clean inactive buckets
280
- */
281
- cleanup() {
282
- const cutoff = Date.now() - this.options.windowMs * 10;
283
- for (const [key, bucket] of this.buckets) {
284
- if (bucket.lastRefill < cutoff && bucket.tokens >= this.options.maxRequests) {
285
- this.buckets.delete(key);
286
- }
287
- }
288
- }
289
- }
290
- /**
291
- * Rate limiter middleware for Express-like frameworks
292
- */
293
- export function createRateLimiterMiddleware(limiter) {
294
- return (req, res, next) => {
295
- // Get key from IP or header
296
- const key = req.ip || req.headers?.['x-forwarded-for'] || 'anonymous';
297
- const result = limiter.consume(key);
298
- // Set rate limit headers
299
- res.setHeader('X-RateLimit-Limit', String(result.total));
300
- res.setHeader('X-RateLimit-Remaining', String(result.remaining));
301
- res.setHeader('X-RateLimit-Reset', String(Math.ceil(result.resetAt.getTime() / 1000)));
302
- if (!result.allowed) {
303
- res.setHeader('Retry-After', String(Math.ceil(result.retryAfter / 1000)));
304
- res.status(429).json({
305
- error: 'Too Many Requests',
306
- retryAfter: result.retryAfter,
307
- resetAt: result.resetAt.toISOString(),
308
- });
309
- return;
310
- }
311
- next();
312
- };
313
- }
314
- //# sourceMappingURL=rate-limiter.js.map
@@ -1,91 +0,0 @@
1
- /**
2
- * Retry with Exponential Backoff
3
- *
4
- * Production-ready retry logic with jitter, max retries, and error filtering.
5
- *
6
- * @module v1/shared/resilience/retry
7
- */
8
- /**
9
- * Retry options
10
- */
11
- export interface RetryOptions {
12
- /** Maximum number of retry attempts (default: 3) */
13
- maxAttempts: number;
14
- /** Initial delay in milliseconds (default: 100) */
15
- initialDelay: number;
16
- /** Maximum delay in milliseconds (default: 10000) */
17
- maxDelay: number;
18
- /** Backoff multiplier (default: 2) */
19
- backoffMultiplier: number;
20
- /** Jitter factor 0-1 to randomize delays (default: 0.1) */
21
- jitter: number;
22
- /** Timeout for each attempt in milliseconds (default: 30000) */
23
- timeout: number;
24
- /** Errors that should trigger a retry (default: all errors) */
25
- retryableErrors?: (error: Error) => boolean;
26
- /** Callback for each retry attempt */
27
- onRetry?: (error: Error, attempt: number, delay: number) => void;
28
- }
29
- /**
30
- * Retry result
31
- */
32
- export interface RetryResult<T> {
33
- success: boolean;
34
- result?: T;
35
- attempts: number;
36
- totalTime: number;
37
- errors: Error[];
38
- }
39
- /**
40
- * Retry error with attempt history
41
- */
42
- export declare class RetryError extends Error {
43
- readonly attempts: number;
44
- readonly errors: Error[];
45
- readonly totalTime: number;
46
- constructor(message: string, attempts: number, errors: Error[], totalTime: number);
47
- }
48
- /**
49
- * Retry a function with exponential backoff
50
- *
51
- * @param fn Function to retry
52
- * @param options Retry configuration
53
- * @returns Result with success/failure and metadata
54
- *
55
- * @example
56
- * const result = await retry(
57
- * () => fetchData(),
58
- * { maxAttempts: 5, initialDelay: 200 }
59
- * );
60
- *
61
- * if (result.success) {
62
- * console.log('Data:', result.result);
63
- * } else {
64
- * console.log('Failed after', result.attempts, 'attempts');
65
- * }
66
- */
67
- export declare function retry<T>(fn: () => Promise<T>, options?: Partial<RetryOptions>): Promise<RetryResult<T>>;
68
- /**
69
- * Wrap a function with retry behavior
70
- *
71
- * @param fn Function to wrap
72
- * @param options Retry configuration
73
- * @returns Wrapped function that retries on failure
74
- */
75
- export declare function withRetry<T extends (...args: unknown[]) => Promise<unknown>>(fn: T, options?: Partial<RetryOptions>): (...args: Parameters<T>) => Promise<RetryResult<Awaited<ReturnType<T>>>>;
76
- /**
77
- * Common retryable error predicates
78
- */
79
- export declare const RetryableErrors: {
80
- /** Network errors (ECONNRESET, ETIMEDOUT, etc.) */
81
- network: (error: Error) => boolean;
82
- /** Rate limit errors (429) */
83
- rateLimit: (error: Error) => boolean;
84
- /** Server errors (5xx) */
85
- serverError: (error: Error) => boolean;
86
- /** Transient errors (network + rate limit + 5xx) */
87
- transient: (error: Error) => boolean;
88
- /** All errors are retryable */
89
- all: () => boolean;
90
- };
91
- //# sourceMappingURL=retry.d.ts.map