@mc1global/opencode-jarvis 0.1.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 (415) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +171 -0
  3. package/dist/application/context-memory/dtos.d.ts +100 -0
  4. package/dist/application/context-memory/dtos.d.ts.map +1 -0
  5. package/dist/application/context-memory/dtos.js +11 -0
  6. package/dist/application/context-memory/dtos.js.map +1 -0
  7. package/dist/application/context-memory/note-use-cases.d.ts +22 -0
  8. package/dist/application/context-memory/note-use-cases.d.ts.map +1 -0
  9. package/dist/application/context-memory/note-use-cases.js +76 -0
  10. package/dist/application/context-memory/note-use-cases.js.map +1 -0
  11. package/dist/application/context-memory/session-use-cases.d.ts +23 -0
  12. package/dist/application/context-memory/session-use-cases.d.ts.map +1 -0
  13. package/dist/application/context-memory/session-use-cases.js +63 -0
  14. package/dist/application/context-memory/session-use-cases.js.map +1 -0
  15. package/dist/application/context-memory/todo-use-cases.d.ts +25 -0
  16. package/dist/application/context-memory/todo-use-cases.d.ts.map +1 -0
  17. package/dist/application/context-memory/todo-use-cases.js +100 -0
  18. package/dist/application/context-memory/todo-use-cases.js.map +1 -0
  19. package/dist/application/domain-map/dtos.d.ts +58 -0
  20. package/dist/application/domain-map/dtos.d.ts.map +1 -0
  21. package/dist/application/domain-map/dtos.js +11 -0
  22. package/dist/application/domain-map/dtos.js.map +1 -0
  23. package/dist/application/domain-map/use-cases.d.ts +64 -0
  24. package/dist/application/domain-map/use-cases.d.ts.map +1 -0
  25. package/dist/application/domain-map/use-cases.js +217 -0
  26. package/dist/application/domain-map/use-cases.js.map +1 -0
  27. package/dist/application/environment/dtos.d.ts +74 -0
  28. package/dist/application/environment/dtos.d.ts.map +1 -0
  29. package/dist/application/environment/dtos.js +10 -0
  30. package/dist/application/environment/dtos.js.map +1 -0
  31. package/dist/application/environment/use-cases.d.ts +29 -0
  32. package/dist/application/environment/use-cases.d.ts.map +1 -0
  33. package/dist/application/environment/use-cases.js +232 -0
  34. package/dist/application/environment/use-cases.js.map +1 -0
  35. package/dist/application/governance/validation-use-cases.d.ts +45 -0
  36. package/dist/application/governance/validation-use-cases.d.ts.map +1 -0
  37. package/dist/application/governance/validation-use-cases.js +51 -0
  38. package/dist/application/governance/validation-use-cases.js.map +1 -0
  39. package/dist/application/kanban/board-use-cases.d.ts +45 -0
  40. package/dist/application/kanban/board-use-cases.d.ts.map +1 -0
  41. package/dist/application/kanban/board-use-cases.js +124 -0
  42. package/dist/application/kanban/board-use-cases.js.map +1 -0
  43. package/dist/application/kanban/card-use-cases.d.ts +32 -0
  44. package/dist/application/kanban/card-use-cases.d.ts.map +1 -0
  45. package/dist/application/kanban/card-use-cases.js +204 -0
  46. package/dist/application/kanban/card-use-cases.js.map +1 -0
  47. package/dist/application/kanban/dtos.d.ts +165 -0
  48. package/dist/application/kanban/dtos.d.ts.map +1 -0
  49. package/dist/application/kanban/dtos.js +11 -0
  50. package/dist/application/kanban/dtos.js.map +1 -0
  51. package/dist/application/kanban/sprint-use-cases.d.ts +34 -0
  52. package/dist/application/kanban/sprint-use-cases.d.ts.map +1 -0
  53. package/dist/application/kanban/sprint-use-cases.js +243 -0
  54. package/dist/application/kanban/sprint-use-cases.js.map +1 -0
  55. package/dist/application/rag/dtos.d.ts +113 -0
  56. package/dist/application/rag/dtos.d.ts.map +1 -0
  57. package/dist/application/rag/dtos.js +11 -0
  58. package/dist/application/rag/dtos.js.map +1 -0
  59. package/dist/application/rag/oracle-use-cases.d.ts +30 -0
  60. package/dist/application/rag/oracle-use-cases.d.ts.map +1 -0
  61. package/dist/application/rag/oracle-use-cases.js +91 -0
  62. package/dist/application/rag/oracle-use-cases.js.map +1 -0
  63. package/dist/application/rag/use-cases.d.ts +34 -0
  64. package/dist/application/rag/use-cases.d.ts.map +1 -0
  65. package/dist/application/rag/use-cases.js +234 -0
  66. package/dist/application/rag/use-cases.js.map +1 -0
  67. package/dist/application/token-metrics/dtos.d.ts +126 -0
  68. package/dist/application/token-metrics/dtos.d.ts.map +1 -0
  69. package/dist/application/token-metrics/dtos.js +11 -0
  70. package/dist/application/token-metrics/dtos.js.map +1 -0
  71. package/dist/application/token-metrics/tracking-use-cases.d.ts +33 -0
  72. package/dist/application/token-metrics/tracking-use-cases.d.ts.map +1 -0
  73. package/dist/application/token-metrics/tracking-use-cases.js +220 -0
  74. package/dist/application/token-metrics/tracking-use-cases.js.map +1 -0
  75. package/dist/application/vault/dtos.d.ts +91 -0
  76. package/dist/application/vault/dtos.d.ts.map +1 -0
  77. package/dist/application/vault/dtos.js +11 -0
  78. package/dist/application/vault/dtos.js.map +1 -0
  79. package/dist/application/vault/use-cases.d.ts +30 -0
  80. package/dist/application/vault/use-cases.d.ts.map +1 -0
  81. package/dist/application/vault/use-cases.js +307 -0
  82. package/dist/application/vault/use-cases.js.map +1 -0
  83. package/dist/application/vault/vault-manager.d.ts +47 -0
  84. package/dist/application/vault/vault-manager.d.ts.map +1 -0
  85. package/dist/application/vault/vault-manager.js +272 -0
  86. package/dist/application/vault/vault-manager.js.map +1 -0
  87. package/dist/application/workspace-registry/dtos.d.ts +91 -0
  88. package/dist/application/workspace-registry/dtos.d.ts.map +1 -0
  89. package/dist/application/workspace-registry/dtos.js +11 -0
  90. package/dist/application/workspace-registry/dtos.js.map +1 -0
  91. package/dist/application/workspace-registry/use-cases.d.ts +29 -0
  92. package/dist/application/workspace-registry/use-cases.d.ts.map +1 -0
  93. package/dist/application/workspace-registry/use-cases.js +249 -0
  94. package/dist/application/workspace-registry/use-cases.js.map +1 -0
  95. package/dist/domain/context-memory/entities.d.ts +123 -0
  96. package/dist/domain/context-memory/entities.d.ts.map +1 -0
  97. package/dist/domain/context-memory/entities.js +229 -0
  98. package/dist/domain/context-memory/entities.js.map +1 -0
  99. package/dist/domain/context-memory/repositories.d.ts +46 -0
  100. package/dist/domain/context-memory/repositories.d.ts.map +1 -0
  101. package/dist/domain/context-memory/repositories.js +2 -0
  102. package/dist/domain/context-memory/repositories.js.map +1 -0
  103. package/dist/domain/context-memory/services.d.ts +62 -0
  104. package/dist/domain/context-memory/services.d.ts.map +1 -0
  105. package/dist/domain/context-memory/services.js +162 -0
  106. package/dist/domain/context-memory/services.js.map +1 -0
  107. package/dist/domain/context-memory/value-objects.d.ts +65 -0
  108. package/dist/domain/context-memory/value-objects.d.ts.map +1 -0
  109. package/dist/domain/context-memory/value-objects.js +105 -0
  110. package/dist/domain/context-memory/value-objects.js.map +1 -0
  111. package/dist/domain/domain-map/repositories.d.ts +126 -0
  112. package/dist/domain/domain-map/repositories.d.ts.map +1 -0
  113. package/dist/domain/domain-map/repositories.js +2 -0
  114. package/dist/domain/domain-map/repositories.js.map +1 -0
  115. package/dist/domain/domain-map/services.d.ts +108 -0
  116. package/dist/domain/domain-map/services.d.ts.map +1 -0
  117. package/dist/domain/domain-map/services.js +335 -0
  118. package/dist/domain/domain-map/services.js.map +1 -0
  119. package/dist/domain/domain-map/value-objects.d.ts +186 -0
  120. package/dist/domain/domain-map/value-objects.d.ts.map +1 -0
  121. package/dist/domain/domain-map/value-objects.js +215 -0
  122. package/dist/domain/domain-map/value-objects.js.map +1 -0
  123. package/dist/domain/environment/entities.d.ts +93 -0
  124. package/dist/domain/environment/entities.d.ts.map +1 -0
  125. package/dist/domain/environment/entities.js +207 -0
  126. package/dist/domain/environment/entities.js.map +1 -0
  127. package/dist/domain/environment/renderers.d.ts +30 -0
  128. package/dist/domain/environment/renderers.d.ts.map +1 -0
  129. package/dist/domain/environment/renderers.js +139 -0
  130. package/dist/domain/environment/renderers.js.map +1 -0
  131. package/dist/domain/environment/repositories.d.ts +73 -0
  132. package/dist/domain/environment/repositories.d.ts.map +1 -0
  133. package/dist/domain/environment/repositories.js +16 -0
  134. package/dist/domain/environment/repositories.js.map +1 -0
  135. package/dist/domain/environment/services.d.ts +62 -0
  136. package/dist/domain/environment/services.d.ts.map +1 -0
  137. package/dist/domain/environment/services.js +282 -0
  138. package/dist/domain/environment/services.js.map +1 -0
  139. package/dist/domain/environment/value-objects.d.ts +127 -0
  140. package/dist/domain/environment/value-objects.d.ts.map +1 -0
  141. package/dist/domain/environment/value-objects.js +179 -0
  142. package/dist/domain/environment/value-objects.js.map +1 -0
  143. package/dist/domain/governance/policies.d.ts +42 -0
  144. package/dist/domain/governance/policies.d.ts.map +1 -0
  145. package/dist/domain/governance/policies.js +304 -0
  146. package/dist/domain/governance/policies.js.map +1 -0
  147. package/dist/domain/governance/services.d.ts +38 -0
  148. package/dist/domain/governance/services.d.ts.map +1 -0
  149. package/dist/domain/governance/services.js +42 -0
  150. package/dist/domain/governance/services.js.map +1 -0
  151. package/dist/domain/kanban/entities.d.ts +105 -0
  152. package/dist/domain/kanban/entities.d.ts.map +1 -0
  153. package/dist/domain/kanban/entities.js +211 -0
  154. package/dist/domain/kanban/entities.js.map +1 -0
  155. package/dist/domain/kanban/grooming.d.ts +40 -0
  156. package/dist/domain/kanban/grooming.d.ts.map +1 -0
  157. package/dist/domain/kanban/grooming.js +50 -0
  158. package/dist/domain/kanban/grooming.js.map +1 -0
  159. package/dist/domain/kanban/repositories.d.ts +41 -0
  160. package/dist/domain/kanban/repositories.d.ts.map +1 -0
  161. package/dist/domain/kanban/repositories.js +2 -0
  162. package/dist/domain/kanban/repositories.js.map +1 -0
  163. package/dist/domain/kanban/services.d.ts +49 -0
  164. package/dist/domain/kanban/services.d.ts.map +1 -0
  165. package/dist/domain/kanban/services.js +154 -0
  166. package/dist/domain/kanban/services.js.map +1 -0
  167. package/dist/domain/kanban/sprint.d.ts +103 -0
  168. package/dist/domain/kanban/sprint.d.ts.map +1 -0
  169. package/dist/domain/kanban/sprint.js +192 -0
  170. package/dist/domain/kanban/sprint.js.map +1 -0
  171. package/dist/domain/kanban/value-objects.d.ts +91 -0
  172. package/dist/domain/kanban/value-objects.d.ts.map +1 -0
  173. package/dist/domain/kanban/value-objects.js +167 -0
  174. package/dist/domain/kanban/value-objects.js.map +1 -0
  175. package/dist/domain/rag/repositories.d.ts +152 -0
  176. package/dist/domain/rag/repositories.d.ts.map +1 -0
  177. package/dist/domain/rag/repositories.js +2 -0
  178. package/dist/domain/rag/repositories.js.map +1 -0
  179. package/dist/domain/rag/services.d.ts +57 -0
  180. package/dist/domain/rag/services.d.ts.map +1 -0
  181. package/dist/domain/rag/services.js +224 -0
  182. package/dist/domain/rag/services.js.map +1 -0
  183. package/dist/domain/rag/value-objects.d.ts +118 -0
  184. package/dist/domain/rag/value-objects.d.ts.map +1 -0
  185. package/dist/domain/rag/value-objects.js +114 -0
  186. package/dist/domain/rag/value-objects.js.map +1 -0
  187. package/dist/domain/shared/value-objects.d.ts +56 -0
  188. package/dist/domain/shared/value-objects.d.ts.map +1 -0
  189. package/dist/domain/shared/value-objects.js +89 -0
  190. package/dist/domain/shared/value-objects.js.map +1 -0
  191. package/dist/domain/token-metrics/entities.d.ts +90 -0
  192. package/dist/domain/token-metrics/entities.d.ts.map +1 -0
  193. package/dist/domain/token-metrics/entities.js +115 -0
  194. package/dist/domain/token-metrics/entities.js.map +1 -0
  195. package/dist/domain/token-metrics/repositories.d.ts +93 -0
  196. package/dist/domain/token-metrics/repositories.d.ts.map +1 -0
  197. package/dist/domain/token-metrics/repositories.js +2 -0
  198. package/dist/domain/token-metrics/repositories.js.map +1 -0
  199. package/dist/domain/token-metrics/value-objects.d.ts +81 -0
  200. package/dist/domain/token-metrics/value-objects.d.ts.map +1 -0
  201. package/dist/domain/token-metrics/value-objects.js +144 -0
  202. package/dist/domain/token-metrics/value-objects.js.map +1 -0
  203. package/dist/domain/vault/canvas.d.ts +70 -0
  204. package/dist/domain/vault/canvas.d.ts.map +1 -0
  205. package/dist/domain/vault/canvas.js +70 -0
  206. package/dist/domain/vault/canvas.js.map +1 -0
  207. package/dist/domain/vault/document.d.ts +71 -0
  208. package/dist/domain/vault/document.d.ts.map +1 -0
  209. package/dist/domain/vault/document.js +244 -0
  210. package/dist/domain/vault/document.js.map +1 -0
  211. package/dist/domain/vault/repositories.d.ts +35 -0
  212. package/dist/domain/vault/repositories.d.ts.map +1 -0
  213. package/dist/domain/vault/repositories.js +2 -0
  214. package/dist/domain/vault/repositories.js.map +1 -0
  215. package/dist/domain/vault/section.d.ts +33 -0
  216. package/dist/domain/vault/section.d.ts.map +1 -0
  217. package/dist/domain/vault/section.js +39 -0
  218. package/dist/domain/vault/section.js.map +1 -0
  219. package/dist/domain/vault/services.d.ts +48 -0
  220. package/dist/domain/vault/services.d.ts.map +1 -0
  221. package/dist/domain/vault/services.js +249 -0
  222. package/dist/domain/vault/services.js.map +1 -0
  223. package/dist/domain/vault/table.d.ts +58 -0
  224. package/dist/domain/vault/table.d.ts.map +1 -0
  225. package/dist/domain/vault/table.js +204 -0
  226. package/dist/domain/vault/table.js.map +1 -0
  227. package/dist/domain/vault/timeline.d.ts +53 -0
  228. package/dist/domain/vault/timeline.d.ts.map +1 -0
  229. package/dist/domain/vault/timeline.js +214 -0
  230. package/dist/domain/vault/timeline.js.map +1 -0
  231. package/dist/domain/vault/value-objects.d.ts +45 -0
  232. package/dist/domain/vault/value-objects.d.ts.map +1 -0
  233. package/dist/domain/vault/value-objects.js +89 -0
  234. package/dist/domain/vault/value-objects.js.map +1 -0
  235. package/dist/domain/workspace-registry/entities.d.ts +57 -0
  236. package/dist/domain/workspace-registry/entities.d.ts.map +1 -0
  237. package/dist/domain/workspace-registry/entities.js +148 -0
  238. package/dist/domain/workspace-registry/entities.js.map +1 -0
  239. package/dist/domain/workspace-registry/repositories.d.ts +57 -0
  240. package/dist/domain/workspace-registry/repositories.d.ts.map +1 -0
  241. package/dist/domain/workspace-registry/repositories.js +12 -0
  242. package/dist/domain/workspace-registry/repositories.js.map +1 -0
  243. package/dist/domain/workspace-registry/services.d.ts +56 -0
  244. package/dist/domain/workspace-registry/services.d.ts.map +1 -0
  245. package/dist/domain/workspace-registry/services.js +283 -0
  246. package/dist/domain/workspace-registry/services.js.map +1 -0
  247. package/dist/domain/workspace-registry/value-objects.d.ts +113 -0
  248. package/dist/domain/workspace-registry/value-objects.d.ts.map +1 -0
  249. package/dist/domain/workspace-registry/value-objects.js +235 -0
  250. package/dist/domain/workspace-registry/value-objects.js.map +1 -0
  251. package/dist/hooks/context-compacting.d.ts +35 -0
  252. package/dist/hooks/context-compacting.d.ts.map +1 -0
  253. package/dist/hooks/context-compacting.js +48 -0
  254. package/dist/hooks/context-compacting.js.map +1 -0
  255. package/dist/hooks/event-handlers.d.ts +39 -0
  256. package/dist/hooks/event-handlers.d.ts.map +1 -0
  257. package/dist/hooks/event-handlers.js +75 -0
  258. package/dist/hooks/event-handlers.js.map +1 -0
  259. package/dist/hooks/guardrails.d.ts +33 -0
  260. package/dist/hooks/guardrails.d.ts.map +1 -0
  261. package/dist/hooks/guardrails.js +22 -0
  262. package/dist/hooks/guardrails.js.map +1 -0
  263. package/dist/hooks/shell-env.d.ts +28 -0
  264. package/dist/hooks/shell-env.d.ts.map +1 -0
  265. package/dist/hooks/shell-env.js +17 -0
  266. package/dist/hooks/shell-env.js.map +1 -0
  267. package/dist/index.d.ts +16 -0
  268. package/dist/index.d.ts.map +1 -0
  269. package/dist/index.js +349 -0
  270. package/dist/index.js.map +1 -0
  271. package/dist/infrastructure/context-memory/note-repository.d.ts +26 -0
  272. package/dist/infrastructure/context-memory/note-repository.d.ts.map +1 -0
  273. package/dist/infrastructure/context-memory/note-repository.js +87 -0
  274. package/dist/infrastructure/context-memory/note-repository.js.map +1 -0
  275. package/dist/infrastructure/context-memory/search-repository.d.ts +20 -0
  276. package/dist/infrastructure/context-memory/search-repository.d.ts.map +1 -0
  277. package/dist/infrastructure/context-memory/search-repository.js +44 -0
  278. package/dist/infrastructure/context-memory/search-repository.js.map +1 -0
  279. package/dist/infrastructure/context-memory/session-repository.d.ts +26 -0
  280. package/dist/infrastructure/context-memory/session-repository.d.ts.map +1 -0
  281. package/dist/infrastructure/context-memory/session-repository.js +79 -0
  282. package/dist/infrastructure/context-memory/session-repository.js.map +1 -0
  283. package/dist/infrastructure/context-memory/todo-repository.d.ts +26 -0
  284. package/dist/infrastructure/context-memory/todo-repository.d.ts.map +1 -0
  285. package/dist/infrastructure/context-memory/todo-repository.js +105 -0
  286. package/dist/infrastructure/context-memory/todo-repository.js.map +1 -0
  287. package/dist/infrastructure/database/sqlite-adapter.d.ts +60 -0
  288. package/dist/infrastructure/database/sqlite-adapter.d.ts.map +1 -0
  289. package/dist/infrastructure/database/sqlite-adapter.js +93 -0
  290. package/dist/infrastructure/database/sqlite-adapter.js.map +1 -0
  291. package/dist/infrastructure/domain-map/llm-analyzer.d.ts +60 -0
  292. package/dist/infrastructure/domain-map/llm-analyzer.d.ts.map +1 -0
  293. package/dist/infrastructure/domain-map/llm-analyzer.js +249 -0
  294. package/dist/infrastructure/domain-map/llm-analyzer.js.map +1 -0
  295. package/dist/infrastructure/domain-map/lsp-adapter.d.ts +61 -0
  296. package/dist/infrastructure/domain-map/lsp-adapter.d.ts.map +1 -0
  297. package/dist/infrastructure/domain-map/lsp-adapter.js +210 -0
  298. package/dist/infrastructure/domain-map/lsp-adapter.js.map +1 -0
  299. package/dist/infrastructure/domain-map/lsp-configs.d.ts +53 -0
  300. package/dist/infrastructure/domain-map/lsp-configs.d.ts.map +1 -0
  301. package/dist/infrastructure/domain-map/lsp-configs.js +274 -0
  302. package/dist/infrastructure/domain-map/lsp-configs.js.map +1 -0
  303. package/dist/infrastructure/domain-map/lsp-json-rpc.d.ts +132 -0
  304. package/dist/infrastructure/domain-map/lsp-json-rpc.d.ts.map +1 -0
  305. package/dist/infrastructure/domain-map/lsp-json-rpc.js +320 -0
  306. package/dist/infrastructure/domain-map/lsp-json-rpc.js.map +1 -0
  307. package/dist/infrastructure/domain-map/project-scanner.d.ts +43 -0
  308. package/dist/infrastructure/domain-map/project-scanner.d.ts.map +1 -0
  309. package/dist/infrastructure/domain-map/project-scanner.js +193 -0
  310. package/dist/infrastructure/domain-map/project-scanner.js.map +1 -0
  311. package/dist/infrastructure/environment/environment-repository.d.ts +33 -0
  312. package/dist/infrastructure/environment/environment-repository.d.ts.map +1 -0
  313. package/dist/infrastructure/environment/environment-repository.js +161 -0
  314. package/dist/infrastructure/environment/environment-repository.js.map +1 -0
  315. package/dist/infrastructure/environment/scanner-adapter.d.ts +23 -0
  316. package/dist/infrastructure/environment/scanner-adapter.d.ts.map +1 -0
  317. package/dist/infrastructure/environment/scanner-adapter.js +102 -0
  318. package/dist/infrastructure/environment/scanner-adapter.js.map +1 -0
  319. package/dist/infrastructure/kanban/card-repository.d.ts +41 -0
  320. package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -0
  321. package/dist/infrastructure/kanban/card-repository.js +185 -0
  322. package/dist/infrastructure/kanban/card-repository.js.map +1 -0
  323. package/dist/infrastructure/kanban/sprint-repository.d.ts +40 -0
  324. package/dist/infrastructure/kanban/sprint-repository.d.ts.map +1 -0
  325. package/dist/infrastructure/kanban/sprint-repository.js +186 -0
  326. package/dist/infrastructure/kanban/sprint-repository.js.map +1 -0
  327. package/dist/infrastructure/rag/file-discovery.d.ts +19 -0
  328. package/dist/infrastructure/rag/file-discovery.d.ts.map +1 -0
  329. package/dist/infrastructure/rag/file-discovery.js +201 -0
  330. package/dist/infrastructure/rag/file-discovery.js.map +1 -0
  331. package/dist/infrastructure/rag/ollama-embeddings.d.ts +18 -0
  332. package/dist/infrastructure/rag/ollama-embeddings.d.ts.map +1 -0
  333. package/dist/infrastructure/rag/ollama-embeddings.js +54 -0
  334. package/dist/infrastructure/rag/ollama-embeddings.js.map +1 -0
  335. package/dist/infrastructure/rag/text-splitter.d.ts +19 -0
  336. package/dist/infrastructure/rag/text-splitter.d.ts.map +1 -0
  337. package/dist/infrastructure/rag/text-splitter.js +38 -0
  338. package/dist/infrastructure/rag/text-splitter.js.map +1 -0
  339. package/dist/infrastructure/rag/vectra-adapter.d.ts +38 -0
  340. package/dist/infrastructure/rag/vectra-adapter.d.ts.map +1 -0
  341. package/dist/infrastructure/rag/vectra-adapter.js +275 -0
  342. package/dist/infrastructure/rag/vectra-adapter.js.map +1 -0
  343. package/dist/infrastructure/token-metrics/token-metrics-repository.d.ts +29 -0
  344. package/dist/infrastructure/token-metrics/token-metrics-repository.d.ts.map +1 -0
  345. package/dist/infrastructure/token-metrics/token-metrics-repository.js +254 -0
  346. package/dist/infrastructure/token-metrics/token-metrics-repository.js.map +1 -0
  347. package/dist/infrastructure/vault/markdown-parser.d.ts +35 -0
  348. package/dist/infrastructure/vault/markdown-parser.d.ts.map +1 -0
  349. package/dist/infrastructure/vault/markdown-parser.js +145 -0
  350. package/dist/infrastructure/vault/markdown-parser.js.map +1 -0
  351. package/dist/infrastructure/vault/vault-fs-adapter.d.ts +17 -0
  352. package/dist/infrastructure/vault/vault-fs-adapter.d.ts.map +1 -0
  353. package/dist/infrastructure/vault/vault-fs-adapter.js +105 -0
  354. package/dist/infrastructure/vault/vault-fs-adapter.js.map +1 -0
  355. package/dist/infrastructure/workspace-registry/dependency-repository.d.ts +27 -0
  356. package/dist/infrastructure/workspace-registry/dependency-repository.d.ts.map +1 -0
  357. package/dist/infrastructure/workspace-registry/dependency-repository.js +89 -0
  358. package/dist/infrastructure/workspace-registry/dependency-repository.js.map +1 -0
  359. package/dist/infrastructure/workspace-registry/workspace-repository.d.ts +28 -0
  360. package/dist/infrastructure/workspace-registry/workspace-repository.d.ts.map +1 -0
  361. package/dist/infrastructure/workspace-registry/workspace-repository.js +108 -0
  362. package/dist/infrastructure/workspace-registry/workspace-repository.js.map +1 -0
  363. package/dist/tools/agent-tools.d.ts +14 -0
  364. package/dist/tools/agent-tools.d.ts.map +1 -0
  365. package/dist/tools/agent-tools.js +238 -0
  366. package/dist/tools/agent-tools.js.map +1 -0
  367. package/dist/tools/context-memory-tools.d.ts +16 -0
  368. package/dist/tools/context-memory-tools.d.ts.map +1 -0
  369. package/dist/tools/context-memory-tools.js +242 -0
  370. package/dist/tools/context-memory-tools.js.map +1 -0
  371. package/dist/tools/data-tools.d.ts +3 -0
  372. package/dist/tools/data-tools.d.ts.map +1 -0
  373. package/dist/tools/data-tools.js +383 -0
  374. package/dist/tools/data-tools.js.map +1 -0
  375. package/dist/tools/domain-map-tools.d.ts +41 -0
  376. package/dist/tools/domain-map-tools.d.ts.map +1 -0
  377. package/dist/tools/domain-map-tools.js +134 -0
  378. package/dist/tools/domain-map-tools.js.map +1 -0
  379. package/dist/tools/environment-tools.d.ts +85 -0
  380. package/dist/tools/environment-tools.d.ts.map +1 -0
  381. package/dist/tools/environment-tools.js +223 -0
  382. package/dist/tools/environment-tools.js.map +1 -0
  383. package/dist/tools/governance-tools.d.ts +7 -0
  384. package/dist/tools/governance-tools.d.ts.map +1 -0
  385. package/dist/tools/governance-tools.js +73 -0
  386. package/dist/tools/governance-tools.js.map +1 -0
  387. package/dist/tools/kanban-board-tools.d.ts +11 -0
  388. package/dist/tools/kanban-board-tools.d.ts.map +1 -0
  389. package/dist/tools/kanban-board-tools.js +354 -0
  390. package/dist/tools/kanban-board-tools.js.map +1 -0
  391. package/dist/tools/kanban-card-tools.d.ts +11 -0
  392. package/dist/tools/kanban-card-tools.d.ts.map +1 -0
  393. package/dist/tools/kanban-card-tools.js +407 -0
  394. package/dist/tools/kanban-card-tools.js.map +1 -0
  395. package/dist/tools/rag-tools.d.ts +10 -0
  396. package/dist/tools/rag-tools.d.ts.map +1 -0
  397. package/dist/tools/rag-tools.js +279 -0
  398. package/dist/tools/rag-tools.js.map +1 -0
  399. package/dist/tools/token-metrics-tools.d.ts +98 -0
  400. package/dist/tools/token-metrics-tools.d.ts.map +1 -0
  401. package/dist/tools/token-metrics-tools.js +287 -0
  402. package/dist/tools/token-metrics-tools.js.map +1 -0
  403. package/dist/tools/vault-manage-tool.d.ts +7 -0
  404. package/dist/tools/vault-manage-tool.d.ts.map +1 -0
  405. package/dist/tools/vault-manage-tool.js +193 -0
  406. package/dist/tools/vault-manage-tool.js.map +1 -0
  407. package/dist/tools/vault-tools.d.ts +7 -0
  408. package/dist/tools/vault-tools.d.ts.map +1 -0
  409. package/dist/tools/vault-tools.js +348 -0
  410. package/dist/tools/vault-tools.js.map +1 -0
  411. package/dist/tools/workspace-registry-tools.d.ts +93 -0
  412. package/dist/tools/workspace-registry-tools.d.ts.map +1 -0
  413. package/dist/tools/workspace-registry-tools.js +217 -0
  414. package/dist/tools/workspace-registry-tools.js.map +1 -0
  415. package/package.json +59 -0
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Domain Map — Domain Services
3
+ *
4
+ * Stateless domain services for the Domain Map bounded context.
5
+ * Zero external dependencies (pure domain logic).
6
+ *
7
+ * Responsibilities:
8
+ * - Detect analysis mode (greenfield vs legacy) from scan results
9
+ * - Build greenfield domain map from directory structure (Path A)
10
+ * - Build structural graph from LSP data (shared utility for Path B)
11
+ * - Generate the final DomainMapDocument from analysis results
12
+ *
13
+ * SOLID: SRP — each function has a single responsibility
14
+ * DDD: Domain Services — stateless operations on domain concepts
15
+ */
16
+ import type { AnalysisConfig, AnalysisMode, BoundedContext, CodeSymbol, DomainMapDocument, LanguageId, ProjectScanResult, ScannedFile, SrpViolation, StructuralGraph, SymbolReference } from "./value-objects.js";
17
+ /**
18
+ * Directory names that indicate DDD structure in a greenfield codebase.
19
+ * If a project root contains several of these, it's likely DDD-structured.
20
+ */
21
+ export declare const GREENFIELD_INDICATORS: readonly string[];
22
+ /**
23
+ * Patterns that indicate a legacy codebase with structural problems.
24
+ * Files matching these patterns suggest monolithic architecture.
25
+ */
26
+ export declare const LEGACY_INDICATORS: readonly string[];
27
+ /**
28
+ * Detect whether a project should use greenfield (Path A) or legacy (Path B)
29
+ * analysis based on scan results and configuration thresholds.
30
+ *
31
+ * Greenfield criteria (ALL must be true):
32
+ * 1. DDD directory structure detected (domain/, application/, etc.)
33
+ * 2. SOLID patterns present (small files, clear separation)
34
+ * 3. Low ratio of large files (below legacyRatio threshold)
35
+ *
36
+ * If any criterion fails → legacy mode.
37
+ *
38
+ * @param scan - Project scan result with file stats and structure indicators
39
+ * @param config - Analysis configuration with thresholds
40
+ * @returns The detected analysis mode
41
+ */
42
+ export declare function detectAnalysisMode(scan: ProjectScanResult, config: AnalysisConfig): AnalysisMode;
43
+ /**
44
+ * Build a domain map for a greenfield (DDD-structured) codebase.
45
+ * Infers bounded contexts from directory structure without LSP or LLM.
46
+ *
47
+ * Strategy: Look for directories under DDD layer folders.
48
+ * e.g., src/domain/kanban/ → bounded context "kanban"
49
+ * src/domain/rag/ → bounded context "rag"
50
+ *
51
+ * @param scan - Project scan result
52
+ * @param config - Analysis configuration
53
+ * @returns Array of bounded contexts inferred from paths
54
+ */
55
+ export declare function buildGreenfieldMap(scan: ProjectScanResult, config: AnalysisConfig): readonly BoundedContext[];
56
+ /**
57
+ * Infer bounded context name from a file's relative path.
58
+ * Looks for directories immediately under DDD layer folders.
59
+ *
60
+ * Examples:
61
+ * - "src/domain/kanban/entities.ts" → "kanban"
62
+ * - "src/application/rag/use-cases.ts" → "rag"
63
+ * - "src/tools/governance-tools.ts" → "governance" (from filename)
64
+ * - "src/index.ts" → "unknown"
65
+ */
66
+ export declare function inferBoundedContext(relativePath: string): string;
67
+ /**
68
+ * Build a StructuralGraph from LSP-extracted symbols and references.
69
+ * Used by Path B after LSP extraction to create the input for LLM analysis.
70
+ *
71
+ * @param fileSymbols - Map of file paths to their extracted symbols
72
+ * @param references - Cross-file references
73
+ * @returns Complete structural graph
74
+ */
75
+ export declare function buildStructuralGraph(fileSymbols: ReadonlyMap<string, readonly CodeSymbol[]>, references: readonly SymbolReference[]): StructuralGraph;
76
+ /**
77
+ * Detect SRP violations from scanned files based on line count thresholds.
78
+ * Files exceeding maxFileLines are flagged.
79
+ *
80
+ * @param files - Scanned files with line counts
81
+ * @param config - Configuration with maxFileLines threshold
82
+ * @returns Array of detected violations
83
+ */
84
+ export declare function detectSrpViolations(files: readonly ScannedFile[], config: AnalysisConfig): readonly SrpViolation[];
85
+ /**
86
+ * Generate the final DomainMapDocument from analysis results.
87
+ * Combines structural and semantic analysis into a unified report.
88
+ *
89
+ * @param projectName - Name of the project
90
+ * @param mode - Analysis mode used
91
+ * @param language - Primary language of the project
92
+ * @param scan - Project scan result
93
+ * @param contexts - Identified bounded contexts
94
+ * @param graph - Structural graph (may be empty for greenfield)
95
+ * @param violations - SRP violations detected
96
+ * @param recommendedStructure - Recommended DDD structure
97
+ * @returns Complete domain map document
98
+ */
99
+ export declare function generateMapDocument(projectName: string, mode: AnalysisMode, language: LanguageId, scan: ProjectScanResult, contexts: readonly BoundedContext[], graph: StructuralGraph, violations: readonly SrpViolation[], recommendedStructure: string): DomainMapDocument;
100
+ /**
101
+ * Render a DomainMapDocument as a markdown string.
102
+ * Produces a human-readable report suitable for display or saving.
103
+ *
104
+ * @param doc - The domain map document to render
105
+ * @returns Formatted markdown string
106
+ */
107
+ export declare function renderDocumentAsMarkdown(doc: DomainMapDocument): string;
108
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/domain/domain-map/services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAI5B;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAclD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAO9C,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,cAAc,GACrB,YAAY,CAcd;AAeD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,cAAc,GACrB,SAAS,cAAc,EAAE,CA+B3B;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAkBhE;AAsCD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC,EACvD,UAAU,EAAE,SAAS,eAAe,EAAE,GACrC,eAAe,CAYjB;AAcD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,MAAM,EAAE,cAAc,GACrB,SAAS,YAAY,EAAE,CAgBzB;AAyBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,UAAU,EACpB,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,KAAK,EAAE,eAAe,EACtB,UAAU,EAAE,SAAS,YAAY,EAAE,EACnC,oBAAoB,EAAE,MAAM,GAC3B,iBAAiB,CAYnB;AAID;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAoEvE"}
@@ -0,0 +1,335 @@
1
+ // ── Greenfield Detection Indicators ───────────────────────────────────
2
+ /**
3
+ * Directory names that indicate DDD structure in a greenfield codebase.
4
+ * If a project root contains several of these, it's likely DDD-structured.
5
+ */
6
+ export const GREENFIELD_INDICATORS = [
7
+ "domain",
8
+ "application",
9
+ "infrastructure",
10
+ "presentation",
11
+ "interfaces",
12
+ "use-cases",
13
+ "usecases",
14
+ "use_cases",
15
+ "entities",
16
+ "value-objects",
17
+ "repositories",
18
+ "services",
19
+ "aggregates",
20
+ ];
21
+ /**
22
+ * Patterns that indicate a legacy codebase with structural problems.
23
+ * Files matching these patterns suggest monolithic architecture.
24
+ */
25
+ export const LEGACY_INDICATORS = [
26
+ "utils",
27
+ "helpers",
28
+ "common",
29
+ "misc",
30
+ "lib",
31
+ "shared",
32
+ ];
33
+ // ── Analysis Mode Detection ───────────────────────────────────────────
34
+ /**
35
+ * Detect whether a project should use greenfield (Path A) or legacy (Path B)
36
+ * analysis based on scan results and configuration thresholds.
37
+ *
38
+ * Greenfield criteria (ALL must be true):
39
+ * 1. DDD directory structure detected (domain/, application/, etc.)
40
+ * 2. SOLID patterns present (small files, clear separation)
41
+ * 3. Low ratio of large files (below legacyRatio threshold)
42
+ *
43
+ * If any criterion fails → legacy mode.
44
+ *
45
+ * @param scan - Project scan result with file stats and structure indicators
46
+ * @param config - Analysis configuration with thresholds
47
+ * @returns The detected analysis mode
48
+ */
49
+ export function detectAnalysisMode(scan, config) {
50
+ if (!scan.hasDddStructure) {
51
+ return "legacy";
52
+ }
53
+ if (!scan.hasSolidPatterns) {
54
+ return "legacy";
55
+ }
56
+ if (scan.largeFileRatio >= config.legacyRatio) {
57
+ return "legacy";
58
+ }
59
+ return "greenfield";
60
+ }
61
+ // ── Greenfield Map Building (Path A) ──────────────────────────────────
62
+ /** DDD layer names for directory-based domain inference. */
63
+ const DDD_LAYERS = [
64
+ "domain",
65
+ "application",
66
+ "infrastructure",
67
+ "tools",
68
+ "hooks",
69
+ "presentation",
70
+ "interfaces",
71
+ ];
72
+ /**
73
+ * Build a domain map for a greenfield (DDD-structured) codebase.
74
+ * Infers bounded contexts from directory structure without LSP or LLM.
75
+ *
76
+ * Strategy: Look for directories under DDD layer folders.
77
+ * e.g., src/domain/kanban/ → bounded context "kanban"
78
+ * src/domain/rag/ → bounded context "rag"
79
+ *
80
+ * @param scan - Project scan result
81
+ * @param config - Analysis configuration
82
+ * @returns Array of bounded contexts inferred from paths
83
+ */
84
+ export function buildGreenfieldMap(scan, config) {
85
+ // Respect maxFiles limit from configuration
86
+ const filesToAnalyze = scan.files.slice(0, config.maxFiles);
87
+ // Group files by inferred bounded context
88
+ const contextMap = new Map();
89
+ for (const file of filesToAnalyze) {
90
+ const contextName = inferBoundedContext(file.relativePath);
91
+ if (contextName !== "unknown") {
92
+ const files = contextMap.get(contextName) ?? [];
93
+ files.push(file.relativePath);
94
+ contextMap.set(contextName, files);
95
+ }
96
+ }
97
+ // Build BoundedContext objects
98
+ const contexts = [];
99
+ for (const [name, files] of contextMap) {
100
+ const entities = extractEntitiesFromPaths(files);
101
+ contexts.push({
102
+ name,
103
+ responsibility: `Bounded context "${name}" inferred from directory structure`,
104
+ files,
105
+ entities,
106
+ aggregates: [],
107
+ dependencies: [],
108
+ });
109
+ }
110
+ return contexts;
111
+ }
112
+ /**
113
+ * Infer bounded context name from a file's relative path.
114
+ * Looks for directories immediately under DDD layer folders.
115
+ *
116
+ * Examples:
117
+ * - "src/domain/kanban/entities.ts" → "kanban"
118
+ * - "src/application/rag/use-cases.ts" → "rag"
119
+ * - "src/tools/governance-tools.ts" → "governance" (from filename)
120
+ * - "src/index.ts" → "unknown"
121
+ */
122
+ export function inferBoundedContext(relativePath) {
123
+ const normalized = relativePath.replace(/\\/g, "/").toLowerCase();
124
+ const parts = normalized.split("/");
125
+ // Look for DDD layer → next directory is the bounded context
126
+ for (const layer of DDD_LAYERS) {
127
+ const idx = parts.indexOf(layer);
128
+ if (idx !== -1 && idx + 1 < parts.length) {
129
+ const candidate = parts[idx + 1];
130
+ // If the next part is a file (has extension), extract context from filename
131
+ if (candidate.includes(".")) {
132
+ return extractContextFromFilename(candidate);
133
+ }
134
+ return candidate;
135
+ }
136
+ }
137
+ return "unknown";
138
+ }
139
+ /**
140
+ * Extract a bounded context name from a tool/hook filename.
141
+ * e.g., "kanban-tools.ts" → "kanban", "rag-tools.ts" → "rag"
142
+ */
143
+ function extractContextFromFilename(filename) {
144
+ const withoutExt = filename.replace(/\.[^.]+$/, "");
145
+ const withoutSuffix = withoutExt.replace(/[-_](tools|hooks|tool|hook)$/, "");
146
+ return withoutSuffix || "unknown";
147
+ }
148
+ /**
149
+ * Extract entity names from file paths within a bounded context.
150
+ * Looks for common DDD file naming patterns.
151
+ */
152
+ function extractEntitiesFromPaths(files) {
153
+ const entities = [];
154
+ for (const file of files) {
155
+ const filename = file.split("/").pop() ?? "";
156
+ const withoutExt = filename.replace(/\.[^.]+$/, "");
157
+ if (withoutExt === "entities" ||
158
+ withoutExt === "entity" ||
159
+ withoutExt.endsWith("-entity") ||
160
+ withoutExt.endsWith("_entity")) {
161
+ entities.push(withoutExt);
162
+ }
163
+ }
164
+ return entities;
165
+ }
166
+ // ── Structural Graph Building ─────────────────────────────────────────
167
+ /**
168
+ * Build a StructuralGraph from LSP-extracted symbols and references.
169
+ * Used by Path B after LSP extraction to create the input for LLM analysis.
170
+ *
171
+ * @param fileSymbols - Map of file paths to their extracted symbols
172
+ * @param references - Cross-file references
173
+ * @returns Complete structural graph
174
+ */
175
+ export function buildStructuralGraph(fileSymbols, references) {
176
+ let totalSymbols = 0;
177
+ for (const symbols of fileSymbols.values()) {
178
+ totalSymbols += countSymbols(symbols);
179
+ }
180
+ return {
181
+ fileSymbolMap: fileSymbols,
182
+ references,
183
+ totalSymbols,
184
+ totalFiles: fileSymbols.size,
185
+ };
186
+ }
187
+ /** Recursively count symbols including children. */
188
+ function countSymbols(symbols) {
189
+ let count = 0;
190
+ for (const symbol of symbols) {
191
+ count += 1;
192
+ count += countSymbols(symbol.children);
193
+ }
194
+ return count;
195
+ }
196
+ // ── SRP Violation Detection ───────────────────────────────────────────
197
+ /**
198
+ * Detect SRP violations from scanned files based on line count thresholds.
199
+ * Files exceeding maxFileLines are flagged.
200
+ *
201
+ * @param files - Scanned files with line counts
202
+ * @param config - Configuration with maxFileLines threshold
203
+ * @returns Array of detected violations
204
+ */
205
+ export function detectSrpViolations(files, config) {
206
+ const violations = [];
207
+ for (const file of files) {
208
+ if (file.lineCount > config.maxFileLines) {
209
+ const suggestedSplit = suggestFileSplit(file);
210
+ violations.push({
211
+ file: file.relativePath,
212
+ lines: file.lineCount,
213
+ issue: `File exceeds ${config.maxFileLines} line limit (${file.lineCount} lines)`,
214
+ suggestedSplit,
215
+ });
216
+ }
217
+ }
218
+ return violations;
219
+ }
220
+ /**
221
+ * Suggest how a large file might be split.
222
+ * Simple heuristic: propose splitting by DDD layer patterns.
223
+ */
224
+ function suggestFileSplit(file) {
225
+ const filename = file.relativePath.split("/").pop() ?? "";
226
+ const withoutExt = filename.replace(/\.[^.]+$/, "");
227
+ const ext = file.extension;
228
+ // If file is very large, suggest common split patterns
229
+ if (file.lineCount > 2000) {
230
+ return [
231
+ `${withoutExt}-types${ext}`,
232
+ `${withoutExt}-helpers${ext}`,
233
+ `${withoutExt}-core${ext}`,
234
+ ];
235
+ }
236
+ return [`${withoutExt}-a${ext}`, `${withoutExt}-b${ext}`];
237
+ }
238
+ // ── Document Generation ───────────────────────────────────────────────
239
+ /**
240
+ * Generate the final DomainMapDocument from analysis results.
241
+ * Combines structural and semantic analysis into a unified report.
242
+ *
243
+ * @param projectName - Name of the project
244
+ * @param mode - Analysis mode used
245
+ * @param language - Primary language of the project
246
+ * @param scan - Project scan result
247
+ * @param contexts - Identified bounded contexts
248
+ * @param graph - Structural graph (may be empty for greenfield)
249
+ * @param violations - SRP violations detected
250
+ * @param recommendedStructure - Recommended DDD structure
251
+ * @returns Complete domain map document
252
+ */
253
+ export function generateMapDocument(projectName, mode, language, scan, contexts, graph, violations, recommendedStructure) {
254
+ return {
255
+ projectName,
256
+ mode,
257
+ language,
258
+ filesAnalyzed: scan.files.length,
259
+ boundedContexts: contexts,
260
+ structuralGraph: graph,
261
+ violations,
262
+ recommendedStructure,
263
+ generatedAt: new Date().toISOString(),
264
+ };
265
+ }
266
+ // ── Document Rendering ────────────────────────────────────────────────
267
+ /**
268
+ * Render a DomainMapDocument as a markdown string.
269
+ * Produces a human-readable report suitable for display or saving.
270
+ *
271
+ * @param doc - The domain map document to render
272
+ * @returns Formatted markdown string
273
+ */
274
+ export function renderDocumentAsMarkdown(doc) {
275
+ const lines = [];
276
+ lines.push(`# Domain Map: ${doc.projectName}`);
277
+ lines.push("");
278
+ lines.push(`**Mode:** ${doc.mode}`);
279
+ lines.push(`**Language:** ${doc.language}`);
280
+ lines.push(`**Files Analyzed:** ${doc.filesAnalyzed}`);
281
+ lines.push(`**Generated:** ${doc.generatedAt}`);
282
+ lines.push("");
283
+ // Bounded Contexts
284
+ lines.push("## Bounded Contexts");
285
+ lines.push("");
286
+ if (doc.boundedContexts.length === 0) {
287
+ lines.push("_No bounded contexts identified._");
288
+ }
289
+ else {
290
+ for (const ctx of doc.boundedContexts) {
291
+ lines.push(`### ${ctx.name}`);
292
+ lines.push("");
293
+ lines.push(`**Responsibility:** ${ctx.responsibility}`);
294
+ lines.push(`**Files:** ${ctx.files.length}`);
295
+ if (ctx.entities.length > 0) {
296
+ lines.push(`**Entities:** ${ctx.entities.join(", ")}`);
297
+ }
298
+ if (ctx.aggregates.length > 0) {
299
+ lines.push(`**Aggregates:** ${ctx.aggregates.join(", ")}`);
300
+ }
301
+ if (ctx.dependencies.length > 0) {
302
+ lines.push(`**Dependencies:** ${ctx.dependencies.join(", ")}`);
303
+ }
304
+ lines.push("");
305
+ }
306
+ }
307
+ // SRP Violations
308
+ if (doc.violations.length > 0) {
309
+ lines.push("## SRP Violations");
310
+ lines.push("");
311
+ for (const v of doc.violations) {
312
+ lines.push(`- **${v.file}** (${v.lines} lines): ${v.issue}`);
313
+ if (v.suggestedSplit.length > 0) {
314
+ lines.push(` - Suggested split: ${v.suggestedSplit.join(", ")}`);
315
+ }
316
+ }
317
+ lines.push("");
318
+ }
319
+ // Structural Graph Summary
320
+ lines.push("## Structural Summary");
321
+ lines.push("");
322
+ lines.push(`- Total symbols: ${doc.structuralGraph.totalSymbols}`);
323
+ lines.push(`- Total files: ${doc.structuralGraph.totalFiles}`);
324
+ lines.push(`- Cross-file references: ${doc.structuralGraph.references.length}`);
325
+ lines.push("");
326
+ // Recommended Structure
327
+ if (doc.recommendedStructure.length > 0) {
328
+ lines.push("## Recommended Structure");
329
+ lines.push("");
330
+ lines.push(doc.recommendedStructure);
331
+ lines.push("");
332
+ }
333
+ return lines.join("\n");
334
+ }
335
+ //# sourceMappingURL=services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/domain/domain-map/services.ts"],"names":[],"mappings":"AA6BA,yEAAyE;AAEzE;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB;IACtD,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,YAAY;IACZ,WAAW;IACX,UAAU;IACV,WAAW;IACX,UAAU;IACV,eAAe;IACf,cAAc;IACd,UAAU;IACV,YAAY;CACb,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsB;IAClD,OAAO;IACP,SAAS;IACT,QAAQ;IACR,MAAM;IACN,KAAK;IACL,QAAQ;CACT,CAAC;AAEF,yEAAyE;AAEzE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAuB,EACvB,MAAsB;IAEtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;QAC1B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAC9C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,yEAAyE;AAEzE,4DAA4D;AAC5D,MAAM,UAAU,GAAG;IACjB,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,OAAO;IACP,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAChC,IAAuB,EACvB,MAAsB;IAEtB,4CAA4C;IAC5C,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE5D,0CAA0C;IAC1C,MAA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AC,MAAM,EAAE,CACpE,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,wBAAwB;IACxB,IAAI,GAAG,CAAC,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QACvC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Domain Map — Value Objects
3
+ *
4
+ * Immutable value objects for the Domain Map bounded context.
5
+ * Zero external dependencies (pure domain).
6
+ *
7
+ * Supports two analysis paths:
8
+ * - Path A (Greenfield): DDD+SOLID codebases, <500 line files, path-based inference
9
+ * - Path B (Legacy): Monolithic codebases, 2000+ line files, LSP + LLM analysis
10
+ *
11
+ * SOLID: SRP — value object definitions only
12
+ * DDD: Value Objects compared by value, no identity
13
+ */
14
+ /** Analysis mode determined by codebase structure heuristics. */
15
+ export type AnalysisMode = "greenfield" | "legacy";
16
+ /**
17
+ * Supported programming/config languages for LSP analysis.
18
+ * 18 languages, 16 distinct LSP server configurations.
19
+ */
20
+ export type LanguageId = "typescript" | "javascript" | "python" | "swift" | "java" | "kotlin" | "csharp" | "go" | "c" | "cpp" | "objectivec" | "dart" | "html" | "json" | "yaml" | "shell" | "xml" | "rust";
21
+ /** All valid language IDs as a readonly array for runtime validation. */
22
+ export declare const ALL_LANGUAGE_IDS: readonly LanguageId[];
23
+ /**
24
+ * Map from file extension to LanguageId.
25
+ * Used to determine which LSP server to spawn for a given file.
26
+ */
27
+ export declare const LANGUAGE_EXTENSIONS: ReadonlyMap<string, LanguageId>;
28
+ /** Check if a string is a valid LanguageId. */
29
+ export declare function isValidLanguageId(value: string): value is LanguageId;
30
+ /**
31
+ * Symbol kinds from the LSP specification (subset used for domain mapping).
32
+ * Maps to LSP SymbolKind enum values.
33
+ */
34
+ export type SymbolKind = "file" | "module" | "namespace" | "package" | "class" | "method" | "property" | "field" | "constructor" | "enum" | "interface" | "function" | "variable" | "constant" | "string" | "number" | "boolean" | "array" | "object" | "key" | "null" | "enumMember" | "struct" | "event" | "operator" | "typeParameter";
35
+ /**
36
+ * Mapping from LSP SymbolKind numeric values to our domain SymbolKind strings.
37
+ * LSP spec: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#symbolKind
38
+ */
39
+ export declare const LSP_SYMBOL_KIND_MAP: ReadonlyMap<number, SymbolKind>;
40
+ /**
41
+ * A range in a source file (0-based line/character positions).
42
+ * Matches LSP Range type for seamless integration.
43
+ */
44
+ export interface SourceRange {
45
+ readonly startLine: number;
46
+ readonly startCharacter: number;
47
+ readonly endLine: number;
48
+ readonly endCharacter: number;
49
+ }
50
+ /**
51
+ * A code symbol extracted from LSP document symbols.
52
+ * Represents a class, function, method, interface, etc.
53
+ * Children form a hierarchy (e.g., class → methods).
54
+ */
55
+ export interface CodeSymbol {
56
+ readonly name: string;
57
+ readonly kind: SymbolKind;
58
+ readonly range: SourceRange;
59
+ readonly children: readonly CodeSymbol[];
60
+ readonly containerName?: string;
61
+ }
62
+ /** Type of reference relationship between symbols. */
63
+ export type ReferenceType = "uses" | "implements" | "extends" | "calls";
64
+ /**
65
+ * A directional reference between two symbols.
66
+ * Used to build the dependency graph.
67
+ */
68
+ export interface SymbolReference {
69
+ readonly fromFile: string;
70
+ readonly fromSymbol: string;
71
+ readonly toFile: string;
72
+ readonly toSymbol: string;
73
+ readonly type: ReferenceType;
74
+ }
75
+ /**
76
+ * The structural graph extracted from LSP analysis.
77
+ * Contains symbols per file and cross-file references.
78
+ * This is the input to the LLM semantic analysis stage.
79
+ */
80
+ export interface StructuralGraph {
81
+ /** Map from file path to its symbols (hierarchy). */
82
+ readonly fileSymbolMap: ReadonlyMap<string, readonly CodeSymbol[]>;
83
+ /** Cross-file references extracted from LSP. */
84
+ readonly references: readonly SymbolReference[];
85
+ /** Total number of symbols across all files. */
86
+ readonly totalSymbols: number;
87
+ /** Total number of files analyzed. */
88
+ readonly totalFiles: number;
89
+ }
90
+ /**
91
+ * A bounded context identified in the domain map.
92
+ * In greenfield codebases, these map directly to directory structure.
93
+ * In legacy codebases, the LLM proposes these from structural analysis.
94
+ */
95
+ export interface BoundedContext {
96
+ readonly name: string;
97
+ readonly responsibility: string;
98
+ readonly files: readonly string[];
99
+ readonly entities: readonly string[];
100
+ readonly aggregates: readonly string[];
101
+ readonly dependencies: readonly string[];
102
+ }
103
+ /**
104
+ * A Single Responsibility Principle violation detected in the codebase.
105
+ * Files exceeding line thresholds or containing multiple unrelated concerns.
106
+ */
107
+ export interface SrpViolation {
108
+ readonly file: string;
109
+ readonly lines: number;
110
+ readonly issue: string;
111
+ readonly suggestedSplit: readonly string[];
112
+ }
113
+ /**
114
+ * Result of the LLM semantic analysis stage.
115
+ * The LLM examines the structural graph and proposes a DDD decomposition.
116
+ */
117
+ export interface SemanticAnalysis {
118
+ readonly boundedContexts: readonly BoundedContext[];
119
+ readonly violations: readonly SrpViolation[];
120
+ readonly recommendedStructure: string;
121
+ }
122
+ /**
123
+ * The final output of the domain map analysis.
124
+ * Contains everything needed to render the domain map report.
125
+ */
126
+ export interface DomainMapDocument {
127
+ readonly projectName: string;
128
+ readonly mode: AnalysisMode;
129
+ readonly language: LanguageId;
130
+ readonly filesAnalyzed: number;
131
+ readonly boundedContexts: readonly BoundedContext[];
132
+ readonly structuralGraph: StructuralGraph;
133
+ readonly violations: readonly SrpViolation[];
134
+ readonly recommendedStructure: string;
135
+ readonly generatedAt: string;
136
+ }
137
+ /**
138
+ * Configuration for the domain map analysis process.
139
+ * Controls thresholds, limits, and behavior.
140
+ */
141
+ export interface AnalysisConfig {
142
+ /** Max lines before a file is flagged for SRP violation (default: 500). */
143
+ readonly maxFileLines: number;
144
+ /** Max files to analyze in a single run (default: 200). */
145
+ readonly maxFiles: number;
146
+ /** Threshold line count for legacy detection (default: 2000). */
147
+ readonly legacyThresholdLines: number;
148
+ /** Minimum ratio of large files to trigger legacy mode (default: 0.1). */
149
+ readonly legacyRatio: number;
150
+ }
151
+ /** Default analysis configuration. */
152
+ export declare const DEFAULT_ANALYSIS_CONFIG: AnalysisConfig;
153
+ /**
154
+ * Result of scanning a project directory.
155
+ * Used by the AnalysisRouter to detect the analysis mode.
156
+ */
157
+ export interface ProjectScanResult {
158
+ /** Root directory of the project. */
159
+ readonly rootDir: string;
160
+ /** All source files discovered. */
161
+ readonly files: readonly ScannedFile[];
162
+ /** Detected primary language. */
163
+ readonly primaryLanguage: LanguageId;
164
+ /** Detected languages with file counts. */
165
+ readonly languageDistribution: ReadonlyMap<string, number>;
166
+ /** Whether DDD directory structure indicators are present. */
167
+ readonly hasDddStructure: boolean;
168
+ /** Whether SOLID patterns are detected (small files, clear separation). */
169
+ readonly hasSolidPatterns: boolean;
170
+ /** Ratio of files exceeding legacyThresholdLines. */
171
+ readonly largeFileRatio: number;
172
+ }
173
+ /** A single file discovered during project scanning. */
174
+ export interface ScannedFile {
175
+ readonly absolutePath: string;
176
+ readonly relativePath: string;
177
+ readonly extension: string;
178
+ readonly language: LanguageId;
179
+ readonly lineCount: number;
180
+ readonly sizeBytes: number;
181
+ }
182
+ /** Directories that should be skipped during project scanning. */
183
+ export declare const SCAN_SKIP_DIRECTORIES: ReadonlySet<string>;
184
+ /** Binary/non-source extensions to skip during scanning. */
185
+ export declare const SCAN_SKIP_EXTENSIONS: ReadonlySet<string>;
186
+ //# sourceMappingURL=value-objects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-objects.d.ts","sourceRoot":"","sources":["../../../src/domain/domain-map/value-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,iEAAiE;AACjE,MAAM,MAAM,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