stellavault 0.2.0 → 0.3.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 (400) hide show
  1. package/package.json +1 -1
  2. package/packages/core/dist/api/dashboard.d.ts +3 -0
  3. package/packages/core/{src/api/dashboard.ts → dist/api/dashboard.js} +8 -11
  4. package/packages/core/dist/api/graph-data.d.ts +11 -0
  5. package/packages/core/dist/api/graph-data.js +255 -0
  6. package/packages/core/dist/api/pwa.d.ts +3 -0
  7. package/packages/core/{src/api/pwa.ts → dist/api/pwa.js} +27 -32
  8. package/packages/core/dist/api/server.d.ts +16 -0
  9. package/packages/core/dist/api/server.js +718 -0
  10. package/packages/core/dist/capture/voice.d.ts +24 -0
  11. package/packages/core/dist/capture/voice.js +135 -0
  12. package/packages/core/{src/cloud/index.ts → dist/cloud/index.d.ts} +1 -0
  13. package/packages/core/dist/cloud/index.js +2 -0
  14. package/packages/core/dist/cloud/sync.d.ts +29 -0
  15. package/packages/core/dist/cloud/sync.js +137 -0
  16. package/packages/core/dist/config.d.ts +27 -0
  17. package/packages/core/dist/config.js +55 -0
  18. package/packages/core/dist/federation/credits.d.ts +26 -0
  19. package/packages/core/dist/federation/credits.js +56 -0
  20. package/packages/core/dist/federation/identity.d.ts +14 -0
  21. package/packages/core/dist/federation/identity.js +74 -0
  22. package/packages/core/{src/federation/index.ts → dist/federation/index.d.ts} +1 -2
  23. package/packages/core/dist/federation/index.js +5 -0
  24. package/packages/core/dist/federation/node.d.ts +31 -0
  25. package/packages/core/dist/federation/node.js +216 -0
  26. package/packages/core/dist/federation/privacy.d.ts +8 -0
  27. package/packages/core/dist/federation/privacy.js +40 -0
  28. package/packages/core/dist/federation/reputation.d.ts +37 -0
  29. package/packages/core/dist/federation/reputation.js +139 -0
  30. package/packages/core/dist/federation/search.d.ts +19 -0
  31. package/packages/core/dist/federation/search.js +101 -0
  32. package/packages/core/dist/federation/sharing.d.ts +72 -0
  33. package/packages/core/dist/federation/sharing.js +246 -0
  34. package/packages/core/dist/federation/trust.d.ts +15 -0
  35. package/packages/core/dist/federation/trust.js +60 -0
  36. package/packages/core/dist/federation/types.d.ts +40 -0
  37. package/packages/core/dist/federation/types.js +3 -0
  38. package/packages/core/dist/i18n/index.d.ts +6 -0
  39. package/packages/core/dist/i18n/index.js +81 -0
  40. package/packages/core/{src/index.ts → dist/index.d.ts} +46 -65
  41. package/packages/core/dist/index.js +69 -0
  42. package/packages/core/dist/indexer/chunker.d.ts +14 -0
  43. package/packages/core/dist/indexer/chunker.js +148 -0
  44. package/packages/core/dist/indexer/embedder.d.ts +8 -0
  45. package/packages/core/dist/indexer/embedder.js +3 -0
  46. package/packages/core/dist/indexer/index.d.ts +28 -0
  47. package/packages/core/dist/indexer/index.js +74 -0
  48. package/packages/core/dist/indexer/local-embedder.d.ts +3 -0
  49. package/packages/core/dist/indexer/local-embedder.js +29 -0
  50. package/packages/core/dist/indexer/scanner.d.ts +11 -0
  51. package/packages/core/dist/indexer/scanner.js +137 -0
  52. package/packages/core/dist/indexer/watcher.d.ts +19 -0
  53. package/packages/core/dist/indexer/watcher.js +49 -0
  54. package/packages/core/dist/intelligence/code-linker.d.ts +20 -0
  55. package/packages/core/dist/intelligence/code-linker.js +88 -0
  56. package/packages/core/dist/intelligence/contradiction-detector.d.ts +20 -0
  57. package/packages/core/dist/intelligence/contradiction-detector.js +115 -0
  58. package/packages/core/dist/intelligence/decay-engine.d.ts +27 -0
  59. package/packages/core/dist/intelligence/decay-engine.js +190 -0
  60. package/packages/core/dist/intelligence/duplicate-detector.d.ts +20 -0
  61. package/packages/core/dist/intelligence/duplicate-detector.js +55 -0
  62. package/packages/core/dist/intelligence/fsrs.d.ts +43 -0
  63. package/packages/core/dist/intelligence/fsrs.js +70 -0
  64. package/packages/core/dist/intelligence/gap-detector.d.ts +25 -0
  65. package/packages/core/dist/intelligence/gap-detector.js +78 -0
  66. package/packages/core/dist/intelligence/learning-path.d.ts +31 -0
  67. package/packages/core/dist/intelligence/learning-path.js +53 -0
  68. package/packages/core/dist/intelligence/notifications.d.ts +31 -0
  69. package/packages/core/dist/intelligence/notifications.js +65 -0
  70. package/packages/core/dist/intelligence/predictive-gaps.d.ts +14 -0
  71. package/packages/core/dist/intelligence/predictive-gaps.js +74 -0
  72. package/packages/core/dist/intelligence/semantic-versioning.d.ts +37 -0
  73. package/packages/core/dist/intelligence/semantic-versioning.js +68 -0
  74. package/packages/core/dist/intelligence/types.d.ts +28 -0
  75. package/packages/core/dist/intelligence/types.js +3 -0
  76. package/packages/core/dist/mcp/custom-tools.d.ts +29 -0
  77. package/packages/core/dist/mcp/custom-tools.js +70 -0
  78. package/packages/core/{src/mcp/index.ts → dist/mcp/index.d.ts} +1 -0
  79. package/packages/core/dist/mcp/index.js +2 -0
  80. package/packages/core/dist/mcp/server.d.ts +49 -0
  81. package/packages/core/dist/mcp/server.js +151 -0
  82. package/packages/core/dist/mcp/tools/agentic-graph.d.ts +87 -0
  83. package/packages/core/dist/mcp/tools/agentic-graph.js +88 -0
  84. package/packages/core/dist/mcp/tools/brief.d.ts +31 -0
  85. package/packages/core/dist/mcp/tools/brief.js +39 -0
  86. package/packages/core/dist/mcp/tools/decay.d.ts +33 -0
  87. package/packages/core/dist/mcp/tools/decay.js +32 -0
  88. package/packages/core/dist/mcp/tools/decision-journal.d.ts +78 -0
  89. package/packages/core/dist/mcp/tools/decision-journal.js +79 -0
  90. package/packages/core/dist/mcp/tools/detect-gaps.d.ts +24 -0
  91. package/packages/core/dist/mcp/tools/detect-gaps.js +47 -0
  92. package/packages/core/dist/mcp/tools/export.d.ts +29 -0
  93. package/packages/core/dist/mcp/tools/export.js +60 -0
  94. package/packages/core/dist/mcp/tools/federated-search.d.ts +29 -0
  95. package/packages/core/dist/mcp/tools/federated-search.js +36 -0
  96. package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +35 -0
  97. package/packages/core/dist/mcp/tools/generate-claude-md.js +107 -0
  98. package/packages/core/dist/mcp/tools/get-document.d.ts +35 -0
  99. package/packages/core/dist/mcp/tools/get-document.js +25 -0
  100. package/packages/core/dist/mcp/tools/get-evolution.d.ts +28 -0
  101. package/packages/core/dist/mcp/tools/get-evolution.js +70 -0
  102. package/packages/core/dist/mcp/tools/get-related.d.ts +32 -0
  103. package/packages/core/dist/mcp/tools/get-related.js +33 -0
  104. package/packages/core/dist/mcp/tools/learning-path.d.ts +23 -0
  105. package/packages/core/dist/mcp/tools/learning-path.js +45 -0
  106. package/packages/core/dist/mcp/tools/link-code.d.ts +34 -0
  107. package/packages/core/dist/mcp/tools/link-code.js +44 -0
  108. package/packages/core/dist/mcp/tools/list-topics.d.ts +15 -0
  109. package/packages/core/dist/mcp/tools/list-topics.js +18 -0
  110. package/packages/core/dist/mcp/tools/search.d.ts +39 -0
  111. package/packages/core/dist/mcp/tools/search.js +29 -0
  112. package/packages/core/dist/mcp/tools/snapshot.d.ts +47 -0
  113. package/packages/core/dist/mcp/tools/snapshot.js +84 -0
  114. package/packages/core/dist/multi-vault/index.d.ts +26 -0
  115. package/packages/core/dist/multi-vault/index.js +80 -0
  116. package/packages/core/dist/pack/creator.d.ts +21 -0
  117. package/packages/core/dist/pack/creator.js +105 -0
  118. package/packages/core/dist/pack/exporter.d.ts +4 -0
  119. package/packages/core/dist/pack/exporter.js +18 -0
  120. package/packages/core/dist/pack/importer.d.ts +10 -0
  121. package/packages/core/dist/pack/importer.js +55 -0
  122. package/packages/core/{src/pack/index.ts → dist/pack/index.d.ts} +1 -0
  123. package/packages/core/dist/pack/index.js +5 -0
  124. package/packages/core/dist/pack/marketplace.d.ts +14 -0
  125. package/packages/core/dist/pack/marketplace.js +90 -0
  126. package/packages/core/dist/pack/pii-masker.d.ts +7 -0
  127. package/packages/core/dist/pack/pii-masker.js +29 -0
  128. package/packages/core/dist/pack/types.d.ts +36 -0
  129. package/packages/core/dist/pack/types.js +3 -0
  130. package/packages/core/dist/plugins/index.d.ts +35 -0
  131. package/packages/core/dist/plugins/index.js +57 -0
  132. package/packages/core/dist/plugins/webhooks.d.ts +30 -0
  133. package/packages/core/dist/plugins/webhooks.js +79 -0
  134. package/packages/core/dist/search/adaptive.d.ts +16 -0
  135. package/packages/core/dist/search/adaptive.js +67 -0
  136. package/packages/core/dist/search/bm25.d.ts +4 -0
  137. package/packages/core/dist/search/bm25.js +10 -0
  138. package/packages/core/dist/search/index.d.ts +15 -0
  139. package/packages/core/dist/search/index.js +64 -0
  140. package/packages/core/dist/search/rrf.d.ts +7 -0
  141. package/packages/core/dist/search/rrf.js +21 -0
  142. package/packages/core/dist/search/semantic.d.ts +5 -0
  143. package/packages/core/dist/search/semantic.js +6 -0
  144. package/packages/core/{src/store/index.ts → dist/store/index.d.ts} +1 -0
  145. package/packages/core/dist/store/index.js +2 -0
  146. package/packages/core/dist/store/sqlite-vec.d.ts +6 -0
  147. package/packages/core/dist/store/sqlite-vec.js +251 -0
  148. package/packages/core/dist/store/types.d.ts +20 -0
  149. package/packages/core/dist/store/types.js +3 -0
  150. package/packages/core/dist/team/index.d.ts +25 -0
  151. package/packages/core/dist/team/index.js +97 -0
  152. package/packages/core/dist/types/chunk.d.ts +23 -0
  153. package/packages/core/dist/types/chunk.js +3 -0
  154. package/packages/core/dist/types/document.d.ts +23 -0
  155. package/packages/core/dist/types/document.js +3 -0
  156. package/packages/core/dist/types/graph.d.ts +39 -0
  157. package/packages/core/dist/types/graph.js +3 -0
  158. package/packages/core/dist/types/index.d.ts +5 -0
  159. package/packages/core/dist/types/index.js +2 -0
  160. package/packages/core/dist/types/search.d.ts +39 -0
  161. package/packages/core/dist/types/search.js +3 -0
  162. package/packages/core/dist/utils/retry.d.ts +25 -0
  163. package/packages/core/dist/utils/retry.js +59 -0
  164. package/.github/workflows/pages.yml +0 -37
  165. package/memory/MEMORY.md +0 -25
  166. package/packages/cli/dist/commands/brief-cmd.d.ts.map +0 -1
  167. package/packages/cli/dist/commands/brief-cmd.js.map +0 -1
  168. package/packages/cli/dist/commands/capture-cmd.d.ts.map +0 -1
  169. package/packages/cli/dist/commands/capture-cmd.js.map +0 -1
  170. package/packages/cli/dist/commands/card-cmd.d.ts.map +0 -1
  171. package/packages/cli/dist/commands/card-cmd.js.map +0 -1
  172. package/packages/cli/dist/commands/clip-cmd.d.ts.map +0 -1
  173. package/packages/cli/dist/commands/clip-cmd.js.map +0 -1
  174. package/packages/cli/dist/commands/cloud-cmd.d.ts.map +0 -1
  175. package/packages/cli/dist/commands/cloud-cmd.js.map +0 -1
  176. package/packages/cli/dist/commands/contradictions-cmd.d.ts.map +0 -1
  177. package/packages/cli/dist/commands/contradictions-cmd.js.map +0 -1
  178. package/packages/cli/dist/commands/decay-cmd.d.ts.map +0 -1
  179. package/packages/cli/dist/commands/decay-cmd.js.map +0 -1
  180. package/packages/cli/dist/commands/digest-cmd.d.ts.map +0 -1
  181. package/packages/cli/dist/commands/digest-cmd.js.map +0 -1
  182. package/packages/cli/dist/commands/duplicates-cmd.d.ts.map +0 -1
  183. package/packages/cli/dist/commands/duplicates-cmd.js.map +0 -1
  184. package/packages/cli/dist/commands/federate-cmd.d.ts.map +0 -1
  185. package/packages/cli/dist/commands/federate-cmd.js.map +0 -1
  186. package/packages/cli/dist/commands/gaps-cmd.d.ts.map +0 -1
  187. package/packages/cli/dist/commands/gaps-cmd.js.map +0 -1
  188. package/packages/cli/dist/commands/graph-cmd.d.ts.map +0 -1
  189. package/packages/cli/dist/commands/graph-cmd.js.map +0 -1
  190. package/packages/cli/dist/commands/index-cmd.d.ts.map +0 -1
  191. package/packages/cli/dist/commands/index-cmd.js.map +0 -1
  192. package/packages/cli/dist/commands/init-cmd.d.ts.map +0 -1
  193. package/packages/cli/dist/commands/init-cmd.js.map +0 -1
  194. package/packages/cli/dist/commands/learn-cmd.d.ts.map +0 -1
  195. package/packages/cli/dist/commands/learn-cmd.js.map +0 -1
  196. package/packages/cli/dist/commands/pack-cmd.d.ts.map +0 -1
  197. package/packages/cli/dist/commands/pack-cmd.js.map +0 -1
  198. package/packages/cli/dist/commands/review-cmd.d.ts.map +0 -1
  199. package/packages/cli/dist/commands/review-cmd.js.map +0 -1
  200. package/packages/cli/dist/commands/search-cmd.d.ts.map +0 -1
  201. package/packages/cli/dist/commands/search-cmd.js.map +0 -1
  202. package/packages/cli/dist/commands/serve-cmd.d.ts.map +0 -1
  203. package/packages/cli/dist/commands/serve-cmd.js.map +0 -1
  204. package/packages/cli/dist/commands/status-cmd.d.ts.map +0 -1
  205. package/packages/cli/dist/commands/status-cmd.js.map +0 -1
  206. package/packages/cli/dist/commands/sync-cmd.d.ts.map +0 -1
  207. package/packages/cli/dist/commands/sync-cmd.js.map +0 -1
  208. package/packages/cli/dist/commands/vault-cmd.d.ts.map +0 -1
  209. package/packages/cli/dist/commands/vault-cmd.js.map +0 -1
  210. package/packages/cli/dist/index.d.ts.map +0 -1
  211. package/packages/cli/dist/index.js.map +0 -1
  212. package/packages/cli/src/commands/brief-cmd.ts +0 -87
  213. package/packages/cli/src/commands/capture-cmd.ts +0 -34
  214. package/packages/cli/src/commands/card-cmd.ts +0 -29
  215. package/packages/cli/src/commands/clip-cmd.ts +0 -172
  216. package/packages/cli/src/commands/cloud-cmd.ts +0 -75
  217. package/packages/cli/src/commands/contradictions-cmd.ts +0 -41
  218. package/packages/cli/src/commands/decay-cmd.ts +0 -57
  219. package/packages/cli/src/commands/digest-cmd.ts +0 -89
  220. package/packages/cli/src/commands/duplicates-cmd.ts +0 -38
  221. package/packages/cli/src/commands/federate-cmd.ts +0 -256
  222. package/packages/cli/src/commands/gaps-cmd.ts +0 -40
  223. package/packages/cli/src/commands/graph-cmd.ts +0 -88
  224. package/packages/cli/src/commands/index-cmd.ts +0 -65
  225. package/packages/cli/src/commands/init-cmd.ts +0 -145
  226. package/packages/cli/src/commands/learn-cmd.ts +0 -56
  227. package/packages/cli/src/commands/pack-cmd.ts +0 -121
  228. package/packages/cli/src/commands/review-cmd.ts +0 -125
  229. package/packages/cli/src/commands/search-cmd.ts +0 -45
  230. package/packages/cli/src/commands/serve-cmd.ts +0 -17
  231. package/packages/cli/src/commands/status-cmd.ts +0 -37
  232. package/packages/cli/src/commands/sync-cmd.ts +0 -68
  233. package/packages/cli/src/commands/vault-cmd.ts +0 -64
  234. package/packages/cli/src/index.ts +0 -187
  235. package/packages/core/src/api/graph-data.ts +0 -286
  236. package/packages/core/src/api/server.ts +0 -660
  237. package/packages/core/src/capture/voice.ts +0 -168
  238. package/packages/core/src/cloud/sync.ts +0 -167
  239. package/packages/core/src/config.ts +0 -82
  240. package/packages/core/src/federation/credits.ts +0 -80
  241. package/packages/core/src/federation/hyperswarm.d.ts +0 -19
  242. package/packages/core/src/federation/identity.ts +0 -90
  243. package/packages/core/src/federation/node.ts +0 -235
  244. package/packages/core/src/federation/privacy.ts +0 -52
  245. package/packages/core/src/federation/reputation.ts +0 -202
  246. package/packages/core/src/federation/search.ts +0 -129
  247. package/packages/core/src/federation/sharing.ts +0 -315
  248. package/packages/core/src/federation/trust.ts +0 -76
  249. package/packages/core/src/federation/types.ts +0 -25
  250. package/packages/core/src/i18n/index.ts +0 -85
  251. package/packages/core/src/indexer/chunker.ts +0 -180
  252. package/packages/core/src/indexer/embedder.ts +0 -9
  253. package/packages/core/src/indexer/index.ts +0 -113
  254. package/packages/core/src/indexer/local-embedder.ts +0 -35
  255. package/packages/core/src/indexer/scanner.ts +0 -142
  256. package/packages/core/src/indexer/watcher.ts +0 -62
  257. package/packages/core/src/intelligence/contradiction-detector.ts +0 -134
  258. package/packages/core/src/intelligence/decay-engine.ts +0 -229
  259. package/packages/core/src/intelligence/duplicate-detector.ts +0 -71
  260. package/packages/core/src/intelligence/fsrs.ts +0 -79
  261. package/packages/core/src/intelligence/gap-detector.ts +0 -109
  262. package/packages/core/src/intelligence/learning-path.ts +0 -86
  263. package/packages/core/src/intelligence/notifications.ts +0 -106
  264. package/packages/core/src/intelligence/predictive-gaps.ts +0 -94
  265. package/packages/core/src/intelligence/semantic-versioning.ts +0 -97
  266. package/packages/core/src/intelligence/types.ts +0 -28
  267. package/packages/core/src/mcp/custom-tools.ts +0 -97
  268. package/packages/core/src/mcp/server.ts +0 -142
  269. package/packages/core/src/mcp/tools/agentic-graph.ts +0 -96
  270. package/packages/core/src/mcp/tools/brief.ts +0 -49
  271. package/packages/core/src/mcp/tools/decay.ts +0 -40
  272. package/packages/core/src/mcp/tools/decision-journal.ts +0 -95
  273. package/packages/core/src/mcp/tools/export.ts +0 -72
  274. package/packages/core/src/mcp/tools/federated-search.ts +0 -43
  275. package/packages/core/src/mcp/tools/generate-claude-md.ts +0 -130
  276. package/packages/core/src/mcp/tools/get-document.ts +0 -26
  277. package/packages/core/src/mcp/tools/get-related.ts +0 -41
  278. package/packages/core/src/mcp/tools/learning-path.ts +0 -52
  279. package/packages/core/src/mcp/tools/list-topics.ts +0 -20
  280. package/packages/core/src/mcp/tools/search.ts +0 -35
  281. package/packages/core/src/mcp/tools/snapshot.ts +0 -98
  282. package/packages/core/src/multi-vault/index.ts +0 -118
  283. package/packages/core/src/pack/creator.ts +0 -127
  284. package/packages/core/src/pack/exporter.ts +0 -21
  285. package/packages/core/src/pack/importer.ts +0 -82
  286. package/packages/core/src/pack/marketplace.ts +0 -103
  287. package/packages/core/src/pack/pii-masker.ts +0 -38
  288. package/packages/core/src/pack/types.ts +0 -39
  289. package/packages/core/src/plugins/index.ts +0 -100
  290. package/packages/core/src/plugins/webhooks.ts +0 -110
  291. package/packages/core/src/search/bm25.ts +0 -16
  292. package/packages/core/src/search/index.ts +0 -83
  293. package/packages/core/src/search/rrf.ts +0 -31
  294. package/packages/core/src/search/semantic.ts +0 -15
  295. package/packages/core/src/store/sqlite-vec.ts +0 -290
  296. package/packages/core/src/store/types.ts +0 -22
  297. package/packages/core/src/team/index.ts +0 -126
  298. package/packages/core/src/types/chunk.ts +0 -25
  299. package/packages/core/src/types/document.ts +0 -24
  300. package/packages/core/src/types/graph.ts +0 -44
  301. package/packages/core/src/types/index.ts +0 -15
  302. package/packages/core/src/types/search.ts +0 -38
  303. package/packages/core/src/utils/retry.ts +0 -85
  304. package/packages/core/tests/api-card.test.ts +0 -60
  305. package/packages/core/tests/api-routes.test.ts +0 -98
  306. package/packages/core/tests/bm25.test.ts +0 -87
  307. package/packages/core/tests/chunker.test.ts +0 -48
  308. package/packages/core/tests/cluster.test.ts +0 -75
  309. package/packages/core/tests/constellation.test.ts +0 -77
  310. package/packages/core/tests/export-utils.test.ts +0 -97
  311. package/packages/core/tests/fsrs.test.ts +0 -96
  312. package/packages/core/tests/gesture-detector.test.ts +0 -45
  313. package/packages/core/tests/graph-data.test.ts +0 -87
  314. package/packages/core/tests/layout.test.ts +0 -83
  315. package/packages/core/tests/mcp.test.ts +0 -148
  316. package/packages/core/tests/pack.test.ts +0 -127
  317. package/packages/core/tests/pii-masker.test.ts +0 -42
  318. package/packages/core/tests/profile-card.test.ts +0 -62
  319. package/packages/core/tests/rrf.test.ts +0 -29
  320. package/packages/core/tests/search-integration.test.ts +0 -139
  321. package/packages/core/tests/store.test.ts +0 -80
  322. package/packages/graph/click-result.png +0 -0
  323. package/packages/graph/dist/assets/camera_utils-BMxqtvoZ.js +0 -1
  324. package/packages/graph/dist/assets/hands-DXA01_mx.js +0 -18
  325. package/packages/graph/dist/assets/index-DMEe2diW.js +0 -4192
  326. package/packages/graph/dist/assets/layout.worker-DbKCEFTz.js +0 -1
  327. package/packages/graph/dist/index.html +0 -17
  328. package/packages/graph/index.html +0 -17
  329. package/packages/graph/package.json +0 -32
  330. package/packages/graph/src/App.tsx +0 -7
  331. package/packages/graph/src/api/client.ts +0 -39
  332. package/packages/graph/src/components/ClusterFilter.tsx +0 -73
  333. package/packages/graph/src/components/ConstellationView.tsx +0 -232
  334. package/packages/graph/src/components/ExportPanel.tsx +0 -177
  335. package/packages/graph/src/components/Graph3D.tsx +0 -230
  336. package/packages/graph/src/components/GraphEdges.tsx +0 -100
  337. package/packages/graph/src/components/GraphNodes.tsx +0 -386
  338. package/packages/graph/src/components/HealthDashboard.tsx +0 -173
  339. package/packages/graph/src/components/Layout.tsx +0 -214
  340. package/packages/graph/src/components/MotionOverlay.tsx +0 -81
  341. package/packages/graph/src/components/MotionToggle.tsx +0 -33
  342. package/packages/graph/src/components/MultiverseView.tsx +0 -286
  343. package/packages/graph/src/components/NodeDetail.tsx +0 -232
  344. package/packages/graph/src/components/PulseParticle.tsx +0 -232
  345. package/packages/graph/src/components/SearchBar.tsx +0 -107
  346. package/packages/graph/src/components/StarField.tsx +0 -197
  347. package/packages/graph/src/components/StatusBar.tsx +0 -53
  348. package/packages/graph/src/components/Timeline.tsx +0 -148
  349. package/packages/graph/src/components/ToolsPanel.tsx +0 -512
  350. package/packages/graph/src/components/Tooltip.tsx +0 -100
  351. package/packages/graph/src/components/TypeFilter.tsx +0 -131
  352. package/packages/graph/src/embed/EmbedGraph.tsx +0 -144
  353. package/packages/graph/src/hooks/useConstellationLOD.ts +0 -76
  354. package/packages/graph/src/hooks/useDecay.ts +0 -37
  355. package/packages/graph/src/hooks/useExport.ts +0 -165
  356. package/packages/graph/src/hooks/useGraph.ts +0 -69
  357. package/packages/graph/src/hooks/useKeyboardNav.ts +0 -122
  358. package/packages/graph/src/hooks/useLayout.ts +0 -45
  359. package/packages/graph/src/hooks/useMotion.ts +0 -120
  360. package/packages/graph/src/hooks/usePulse.ts +0 -58
  361. package/packages/graph/src/hooks/useSearch.ts +0 -71
  362. package/packages/graph/src/lib/constellation.ts +0 -107
  363. package/packages/graph/src/lib/export-utils.ts +0 -48
  364. package/packages/graph/src/lib/gesture-detector.ts +0 -123
  365. package/packages/graph/src/lib/layout.worker.ts +0 -153
  366. package/packages/graph/src/lib/motion-controller.ts +0 -83
  367. package/packages/graph/src/lib/profile-card.ts +0 -122
  368. package/packages/graph/src/main.tsx +0 -4
  369. package/packages/graph/src/stores/graph-store.ts +0 -155
  370. package/packages/graph/success.png +0 -0
  371. package/packages/graph/test-click.mjs +0 -49
  372. package/packages/graph/test-explore.mjs +0 -102
  373. package/packages/graph/test-final.mjs +0 -61
  374. package/packages/graph/test-graph.mjs +0 -139
  375. package/packages/graph/test-hover.mjs +0 -48
  376. package/packages/graph/test-pulse.mjs +0 -68
  377. package/packages/graph/test-screenshot.mjs +0 -56
  378. package/packages/graph/test-v2.mjs +0 -97
  379. package/packages/graph/tsconfig.tsbuildinfo +0 -1
  380. package/packages/graph/vite.config.ts +0 -15
  381. package/packages/sync/.env.example +0 -11
  382. package/packages/sync/.sync-state.json +0 -317
  383. package/packages/sync/.upload-state.json +0 -1009
  384. package/packages/sync/create-stella-network-notion.mjs +0 -151
  385. package/packages/sync/create-stellavault-project-notion.mjs +0 -322
  386. package/packages/sync/logs/sync-2026-03-28.log +0 -6
  387. package/packages/sync/logs/sync-2026-03-29.log +0 -12
  388. package/packages/sync/logs/sync-2026-03-30.log +0 -6
  389. package/packages/sync/logs/sync-2026-03-31.log +0 -6
  390. package/packages/sync/logs/sync-2026-04-01.log +0 -6
  391. package/packages/sync/logs/sync-2026-04-02.log +0 -6
  392. package/packages/sync/package-lock.json +0 -373
  393. package/packages/sync/package.json +0 -16
  394. package/packages/sync/run-sync.bat +0 -18
  395. package/packages/sync/run-sync.mjs +0 -46
  396. package/packages/sync/setup-scheduler.mjs +0 -119
  397. package/packages/sync/structured-sync.mjs +0 -187
  398. package/packages/sync/sync-to-obsidian.mjs +0 -264
  399. package/packages/sync/upload-pdca-to-notion.mjs +0 -495
  400. package/tsconfig.base.json +0 -18
@@ -0,0 +1,151 @@
1
+ // Design Ref: §4.1 — MCP Server (stdio + SSE)
2
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
5
+ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
6
+ import { searchToolDef, handleSearch } from './tools/search.js';
7
+ import { getDocumentToolDef, handleGetDocument } from './tools/get-document.js';
8
+ import { listTopicsToolDef, handleListTopics } from './tools/list-topics.js';
9
+ import { getRelatedToolDef, handleGetRelated } from './tools/get-related.js';
10
+ import { generateClaudeMdToolDef, handleGenerateClaudeMd } from './tools/generate-claude-md.js';
11
+ import { createSnapshotToolDef, loadSnapshotToolDef, handleCreateSnapshot, handleLoadSnapshot } from './tools/snapshot.js';
12
+ import { logDecisionToolDef, findDecisionsToolDef, handleLogDecision, handleFindDecisions } from './tools/decision-journal.js';
13
+ import { exportToolDef, handleExport } from './tools/export.js';
14
+ import { getDecayStatusToolDef, handleGetDecayStatus } from './tools/decay.js';
15
+ import { getMorningBriefToolDef, handleGetMorningBrief } from './tools/brief.js';
16
+ import { createLearningPathTool } from './tools/learning-path.js';
17
+ import { createDetectGapsTool } from './tools/detect-gaps.js';
18
+ import { createGetEvolutionTool } from './tools/get-evolution.js';
19
+ import { createLinkCodeTool } from './tools/link-code.js';
20
+ export function createMcpServer(options) {
21
+ const { store, searchEngine, vaultPath = '', decayEngine } = options;
22
+ const learningPathTool = createLearningPathTool(store);
23
+ const detectGapsTool = createDetectGapsTool(store);
24
+ const getEvolutionTool = createGetEvolutionTool(store);
25
+ const linkCodeTool = createLinkCodeTool(searchEngine);
26
+ const server = new Server({ name: 'stellavault', version: '0.2.0' }, { capabilities: { tools: {} } });
27
+ // List tools
28
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
29
+ tools: [
30
+ searchToolDef, getDocumentToolDef, listTopicsToolDef, getRelatedToolDef,
31
+ generateClaudeMdToolDef, createSnapshotToolDef, loadSnapshotToolDef,
32
+ logDecisionToolDef, findDecisionsToolDef, exportToolDef,
33
+ ...(decayEngine ? [getDecayStatusToolDef, getMorningBriefToolDef] : []),
34
+ { name: learningPathTool.name, description: learningPathTool.description, inputSchema: learningPathTool.inputSchema },
35
+ { name: detectGapsTool.name, description: detectGapsTool.description, inputSchema: detectGapsTool.inputSchema },
36
+ { name: getEvolutionTool.name, description: getEvolutionTool.description, inputSchema: getEvolutionTool.inputSchema },
37
+ { name: linkCodeTool.name, description: linkCodeTool.description, inputSchema: linkCodeTool.inputSchema },
38
+ ],
39
+ }));
40
+ // Call tool
41
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
42
+ const { name, arguments: args } = request.params;
43
+ try {
44
+ let result;
45
+ switch (name) {
46
+ case 'search':
47
+ result = await handleSearch(searchEngine, args);
48
+ // MCP 검색 이벤트 기록
49
+ if (decayEngine && result && typeof result === 'object' && 'results' in result) {
50
+ const now = new Date().toISOString();
51
+ for (const r of result.results ?? []) {
52
+ if (r.documentId)
53
+ decayEngine.recordAccess({ documentId: r.documentId, type: 'mcp_query', timestamp: now }).catch(() => { });
54
+ }
55
+ }
56
+ break;
57
+ case 'get-document':
58
+ result = await handleGetDocument(store, args);
59
+ // MCP 문서 조회 이벤트 기록
60
+ if (decayEngine && result && typeof result === 'object' && 'id' in result) {
61
+ decayEngine.recordAccess({ documentId: result.id, type: 'mcp_query', timestamp: new Date().toISOString() }).catch(() => { });
62
+ }
63
+ break;
64
+ case 'list-topics':
65
+ result = await handleListTopics(store);
66
+ break;
67
+ case 'get-related':
68
+ result = await handleGetRelated(store, searchEngine, args);
69
+ break;
70
+ case 'generate-claude-md':
71
+ result = await handleGenerateClaudeMd(searchEngine, store, args);
72
+ break;
73
+ case 'create-snapshot':
74
+ result = await handleCreateSnapshot(searchEngine, args);
75
+ break;
76
+ case 'load-snapshot':
77
+ result = await handleLoadSnapshot(args);
78
+ break;
79
+ case 'log-decision':
80
+ result = await handleLogDecision(vaultPath, args);
81
+ break;
82
+ case 'find-decisions':
83
+ result = await handleFindDecisions(vaultPath, args);
84
+ break;
85
+ case 'export':
86
+ result = await handleExport(store, args);
87
+ break;
88
+ case 'get-decay-status':
89
+ if (!decayEngine) {
90
+ result = { error: 'Decay engine not available' };
91
+ break;
92
+ }
93
+ result = await handleGetDecayStatus(decayEngine, args);
94
+ break;
95
+ case 'get-morning-brief':
96
+ if (!decayEngine) {
97
+ result = { error: 'Decay engine not available' };
98
+ break;
99
+ }
100
+ result = await handleGetMorningBrief(decayEngine, store);
101
+ break;
102
+ case 'get-learning-path':
103
+ result = await learningPathTool.handler(args);
104
+ return result;
105
+ case 'detect-gaps':
106
+ result = await detectGapsTool.handler(args);
107
+ return result;
108
+ case 'get-evolution':
109
+ result = await getEvolutionTool.handler(args);
110
+ return result;
111
+ case 'link-code':
112
+ result = await linkCodeTool.handler(args);
113
+ return result;
114
+ default:
115
+ return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
116
+ }
117
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
118
+ }
119
+ catch (err) {
120
+ const msg = err instanceof Error ? err.message : String(err);
121
+ return { content: [{ type: 'text', text: `Error: ${msg}` }], isError: true };
122
+ }
123
+ });
124
+ return {
125
+ async startStdio() {
126
+ const transport = new StdioServerTransport();
127
+ await server.connect(transport);
128
+ },
129
+ async startHttp(port = 3334) {
130
+ const { createServer } = await import('node:http');
131
+ const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => `sv-${Date.now()}` });
132
+ await server.connect(transport);
133
+ const httpServer = createServer(async (req, res) => {
134
+ res.setHeader('Access-Control-Allow-Origin', '*');
135
+ res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
136
+ res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
137
+ if (req.method === 'OPTIONS') {
138
+ res.writeHead(204);
139
+ res.end();
140
+ return;
141
+ }
142
+ await transport.handleRequest(req, res);
143
+ });
144
+ httpServer.listen(port, '127.0.0.1', () => {
145
+ console.error(`🔌 MCP HTTP server running at http://127.0.0.1:${port}/mcp`);
146
+ });
147
+ },
148
+ server,
149
+ };
150
+ }
151
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1,87 @@
1
+ import type { VectorStore } from '../../store/types.js';
2
+ import type { Embedder } from '../../indexer/embedder.js';
3
+ export declare function createAgenticGraphTools(store: VectorStore, embedder: Embedder, vaultPath: string): ({
4
+ name: string;
5
+ description: string;
6
+ inputSchema: {
7
+ type: "object";
8
+ properties: {
9
+ title: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ content: {
14
+ type: string;
15
+ description: string;
16
+ };
17
+ tags: {
18
+ type: string;
19
+ items: {
20
+ type: string;
21
+ };
22
+ description: string;
23
+ };
24
+ type: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ folder: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ sourceTitle?: undefined;
33
+ targetTitle?: undefined;
34
+ context?: undefined;
35
+ };
36
+ required: string[];
37
+ };
38
+ handler(args: {
39
+ title: string;
40
+ content: string;
41
+ tags?: string[];
42
+ type?: string;
43
+ folder?: string;
44
+ }): Promise<{
45
+ content: {
46
+ type: "text";
47
+ text: string;
48
+ }[];
49
+ }>;
50
+ } | {
51
+ name: string;
52
+ description: string;
53
+ inputSchema: {
54
+ type: "object";
55
+ properties: {
56
+ sourceTitle: {
57
+ type: string;
58
+ description: string;
59
+ };
60
+ targetTitle: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ context: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ title?: undefined;
69
+ content?: undefined;
70
+ tags?: undefined;
71
+ type?: undefined;
72
+ folder?: undefined;
73
+ };
74
+ required: string[];
75
+ };
76
+ handler(args: {
77
+ sourceTitle: string;
78
+ targetTitle: string;
79
+ context?: string;
80
+ }): Promise<{
81
+ content: {
82
+ type: "text";
83
+ text: string;
84
+ }[];
85
+ }>;
86
+ })[];
87
+ //# sourceMappingURL=agentic-graph.d.ts.map
@@ -0,0 +1,88 @@
1
+ // Agentic Graph Construction (P3-F23)
2
+ // AI가 MCP 세션 중 실시간으로 그래프 노드/엣지 생성
3
+ import { writeFileSync, mkdirSync } from 'node:fs';
4
+ import { join } from 'node:path';
5
+ export function createAgenticGraphTools(store, embedder, vaultPath) {
6
+ return [
7
+ {
8
+ name: 'create-knowledge-node',
9
+ description: 'Create a new knowledge note in the vault. AI agents use this to capture decisions, insights, or summaries during a conversation. The note is automatically indexed and appears in the knowledge graph.',
10
+ inputSchema: {
11
+ type: 'object',
12
+ properties: {
13
+ title: { type: 'string', description: 'Note title' },
14
+ content: { type: 'string', description: 'Note content (markdown)' },
15
+ tags: { type: 'array', items: { type: 'string' }, description: 'Tags for categorization' },
16
+ type: { type: 'string', description: 'Note type: note, decision, insight, summary' },
17
+ folder: { type: 'string', description: 'Vault subfolder (default: 01_Knowledge)' },
18
+ },
19
+ required: ['title', 'content'],
20
+ },
21
+ async handler(args) {
22
+ const { title, content, tags = [], type = 'note', folder = '01_Knowledge' } = args;
23
+ // frontmatter 생성
24
+ const date = new Date().toISOString().slice(0, 10);
25
+ const fm = [
26
+ '---',
27
+ `title: "${title}"`,
28
+ `type: ${type}`,
29
+ `source: agent`,
30
+ `tags: [${tags.map(t => `"${t}"`).join(', ')}]`,
31
+ `created: ${date}`,
32
+ `auto_generated: true`,
33
+ '---',
34
+ ].join('\n');
35
+ const fullContent = `${fm}\n\n# ${title}\n\n${content}`;
36
+ // vault에 파일 저장
37
+ const safeTitle = title.replace(/[<>:"/\\|?*]/g, '').replace(/\s+/g, ' ').trim().slice(0, 80);
38
+ const dir = join(vaultPath, folder);
39
+ mkdirSync(dir, { recursive: true });
40
+ const filePath = join(dir, `${safeTitle}.md`);
41
+ writeFileSync(filePath, fullContent, 'utf-8');
42
+ return {
43
+ content: [{
44
+ type: 'text',
45
+ text: `Created knowledge node: "${title}" at ${folder}/${safeTitle}.md\nTags: ${tags.join(', ') || 'none'}\nType: ${type}\n\nRun 'stellavault index' to add to the graph.`,
46
+ }],
47
+ };
48
+ },
49
+ },
50
+ {
51
+ name: 'create-knowledge-link',
52
+ description: 'Create a link between two existing notes by adding a wiki-link reference. Strengthens connections in the knowledge graph.',
53
+ inputSchema: {
54
+ type: 'object',
55
+ properties: {
56
+ sourceTitle: { type: 'string', description: 'Title of the source note' },
57
+ targetTitle: { type: 'string', description: 'Title of the target note to link to' },
58
+ context: { type: 'string', description: 'Why these notes are related (added as a comment)' },
59
+ },
60
+ required: ['sourceTitle', 'targetTitle'],
61
+ },
62
+ async handler(args) {
63
+ const docs = await store.getAllDocuments();
64
+ const source = docs.find(d => d.title.toLowerCase().includes(args.sourceTitle.toLowerCase()));
65
+ if (!source) {
66
+ return { content: [{ type: 'text', text: `Source note "${args.sourceTitle}" not found.` }] };
67
+ }
68
+ // 소스 노트에 링크 추가
69
+ const { readFileSync } = await import('node:fs');
70
+ const fullPath = join(vaultPath, source.filePath);
71
+ let existing = '';
72
+ try {
73
+ existing = readFileSync(fullPath, 'utf-8');
74
+ }
75
+ catch { /* new file */ }
76
+ const linkSection = `\n\n## Related\n\n- [[${args.targetTitle}]]${args.context ? ` — ${args.context}` : ''}\n`;
77
+ writeFileSync(fullPath, existing + linkSection, 'utf-8');
78
+ return {
79
+ content: [{
80
+ type: 'text',
81
+ text: `Linked "${source.title}" → "${args.targetTitle}"${args.context ? ` (${args.context})` : ''}`,
82
+ }],
83
+ };
84
+ },
85
+ },
86
+ ];
87
+ }
88
+ //# sourceMappingURL=agentic-graph.js.map
@@ -0,0 +1,31 @@
1
+ import type { DecayEngine } from '../../intelligence/decay-engine.js';
2
+ import type { VectorStore } from '../../store/types.js';
3
+ export declare const getMorningBriefToolDef: {
4
+ name: string;
5
+ description: string;
6
+ inputSchema: {
7
+ type: "object";
8
+ properties: {};
9
+ };
10
+ };
11
+ export declare function handleGetMorningBrief(decayEngine: DecayEngine, store: VectorStore): Promise<{
12
+ greeting: string;
13
+ summary: {
14
+ totalDocs: number;
15
+ averageR: number;
16
+ decaying: number;
17
+ critical: number;
18
+ };
19
+ reviewSuggestions: {
20
+ title: string;
21
+ retrievability: number;
22
+ daysSinceAccess: number;
23
+ }[];
24
+ unhealthyClusters: {
25
+ label: string;
26
+ avgR: number;
27
+ count: number;
28
+ }[];
29
+ tip: string;
30
+ }>;
31
+ //# sourceMappingURL=brief.d.ts.map
@@ -0,0 +1,39 @@
1
+ // MCP tool: get-morning-brief — Claude 세션 시작 시 자동 브리핑
2
+ export const getMorningBriefToolDef = {
3
+ name: 'get-morning-brief',
4
+ description: '오늘의 지식 브리핑을 제공합니다. 감쇠 상태, 리뷰 대상, 최근 활동을 요약합니다. 세션 시작 시 호출하면 유용합니다.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {},
8
+ },
9
+ };
10
+ export async function handleGetMorningBrief(decayEngine, store) {
11
+ const stats = await store.getStats();
12
+ const report = await decayEngine.computeAll();
13
+ const reviewList = report.topDecaying.slice(0, 5).map(d => ({
14
+ title: d.title,
15
+ retrievability: Math.round(d.retrievability * 100) / 100,
16
+ daysSinceAccess: d.daysSinceAccess,
17
+ }));
18
+ const unhealthyClusters = report.clusterHealth
19
+ .filter(c => c.avgR < 0.6)
20
+ .slice(0, 3)
21
+ .map(c => ({ label: c.label, avgR: c.avgR, count: c.count }));
22
+ return {
23
+ greeting: `📚 ${stats.documentCount}개 노트, 전체 건강도 R=${report.averageR}`,
24
+ summary: {
25
+ totalDocs: stats.documentCount,
26
+ averageR: report.averageR,
27
+ decaying: report.decayingCount,
28
+ critical: report.criticalCount,
29
+ },
30
+ reviewSuggestions: reviewList,
31
+ unhealthyClusters,
32
+ tip: report.criticalCount > 0
33
+ ? `⚠️ ${report.criticalCount}개 노트가 위험 수준입니다. 'stellavault review'로 리뷰하세요.`
34
+ : report.decayingCount > 0
35
+ ? `📋 ${report.decayingCount}개 노트가 감쇠 중입니다.`
36
+ : '✨ 모든 지식이 건강합니다!',
37
+ };
38
+ }
39
+ //# sourceMappingURL=brief.js.map
@@ -0,0 +1,33 @@
1
+ import type { DecayEngine } from '../../intelligence/decay-engine.js';
2
+ export declare const getDecayStatusToolDef: {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ threshold: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ limit: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ };
17
+ };
18
+ };
19
+ export declare function handleGetDecayStatus(decayEngine: DecayEngine, args: {
20
+ threshold?: number;
21
+ limit?: number;
22
+ }): Promise<{
23
+ count: number;
24
+ threshold: number;
25
+ notes: {
26
+ title: string;
27
+ retrievability: number;
28
+ stability: number;
29
+ lastAccess: string;
30
+ }[];
31
+ tip: string;
32
+ }>;
33
+ //# sourceMappingURL=decay.d.ts.map
@@ -0,0 +1,32 @@
1
+ // Design Ref: §4.2 — MCP tool: get-decay-status
2
+ // Plan SC: SC-04
3
+ export const getDecayStatusToolDef = {
4
+ name: 'get-decay-status',
5
+ description: '잊어가는 지식 노트를 조회합니다. 기억 강도(retrievability)가 낮은 노트 목록을 반환하여 리마인드합니다.',
6
+ inputSchema: {
7
+ type: 'object',
8
+ properties: {
9
+ threshold: { type: 'number', description: '감쇠 임계값 (0~1, default: 0.5). 이 값 이하인 노트를 반환' },
10
+ limit: { type: 'number', description: '반환할 최대 노트 수 (default: 20)' },
11
+ },
12
+ },
13
+ };
14
+ export async function handleGetDecayStatus(decayEngine, args) {
15
+ const threshold = args.threshold ?? 0.5;
16
+ const limit = args.limit ?? 20;
17
+ const decaying = await decayEngine.getDecaying(threshold, limit);
18
+ return {
19
+ count: decaying.length,
20
+ threshold,
21
+ notes: decaying.map(d => ({
22
+ title: d.title,
23
+ retrievability: Math.round(d.retrievability * 100) / 100,
24
+ stability: Math.round(d.stability * 10) / 10,
25
+ lastAccess: d.lastAccess,
26
+ })),
27
+ tip: decaying.length > 0
28
+ ? `${decaying.length}개의 노트를 잊어가고 있습니다. 리뷰를 권장합니다.`
29
+ : '모든 지식이 건강한 상태입니다!',
30
+ };
31
+ }
32
+ //# sourceMappingURL=decay.js.map
@@ -0,0 +1,78 @@
1
+ export declare const logDecisionToolDef: {
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ title: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ context: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ decision: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ alternatives: {
20
+ type: string;
21
+ items: {
22
+ type: string;
23
+ };
24
+ description: string;
25
+ };
26
+ reasoning: {
27
+ type: string;
28
+ description: string;
29
+ };
30
+ project: {
31
+ type: string;
32
+ description: string;
33
+ };
34
+ };
35
+ required: string[];
36
+ };
37
+ };
38
+ export declare const findDecisionsToolDef: {
39
+ name: string;
40
+ description: string;
41
+ inputSchema: {
42
+ type: "object";
43
+ properties: {
44
+ query: {
45
+ type: string;
46
+ description: string;
47
+ };
48
+ };
49
+ required: string[];
50
+ };
51
+ };
52
+ export declare function handleLogDecision(vaultPath: string, args: {
53
+ title: string;
54
+ context?: string;
55
+ decision: string;
56
+ alternatives?: string[];
57
+ reasoning: string;
58
+ project?: string;
59
+ }): Promise<{
60
+ saved: string;
61
+ fileName: string;
62
+ }>;
63
+ export declare function handleFindDecisions(vaultPath: string, args: {
64
+ query: string;
65
+ }): Promise<{
66
+ decisions: never[];
67
+ message: string;
68
+ total?: undefined;
69
+ } | {
70
+ decisions: {
71
+ file: string;
72
+ content: string;
73
+ score: number;
74
+ }[];
75
+ total: number;
76
+ message?: undefined;
77
+ }>;
78
+ //# sourceMappingURL=decision-journal.d.ts.map
@@ -0,0 +1,79 @@
1
+ // Design Ref: §12.1 F14 — 결정 저널 (기술 결정 자동 기록)
2
+ import { writeFileSync, existsSync, mkdirSync, readdirSync, readFileSync } from 'node:fs';
3
+ import { join, resolve } from 'node:path';
4
+ export const logDecisionToolDef = {
5
+ name: 'log-decision',
6
+ description: '기술적 결정을 구조화하여 기록합니다. 나중에 "왜 이 선택을 했지?"에 답변할 수 있습니다.',
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ title: { type: 'string', description: '결정 제목 (예: Zustand 대신 Jotai 선택)' },
11
+ context: { type: 'string', description: '결정 배경/상황' },
12
+ decision: { type: 'string', description: '선택한 내용' },
13
+ alternatives: { type: 'array', items: { type: 'string' }, description: '고려한 대안들' },
14
+ reasoning: { type: 'string', description: '선택 이유' },
15
+ project: { type: 'string', description: '관련 프로젝트명' },
16
+ },
17
+ required: ['title', 'decision', 'reasoning'],
18
+ },
19
+ };
20
+ export const findDecisionsToolDef = {
21
+ name: 'find-decisions',
22
+ description: '과거 기술 결정을 검색합니다.',
23
+ inputSchema: {
24
+ type: 'object',
25
+ properties: {
26
+ query: { type: 'string', description: '검색 쿼리' },
27
+ },
28
+ required: ['query'],
29
+ },
30
+ };
31
+ export async function handleLogDecision(vaultPath, args) {
32
+ const decisionsDir = join(vaultPath, 'decisions');
33
+ mkdirSync(decisionsDir, { recursive: true });
34
+ const date = new Date().toISOString().slice(0, 10);
35
+ const slug = args.title.replace(/[^a-zA-Z가-힣0-9\s-]/g, '').replace(/\s+/g, '-').slice(0, 50);
36
+ if (!slug)
37
+ throw new Error('Invalid decision title');
38
+ const fileName = `${date}-${slug}.md`;
39
+ const content = [
40
+ '---',
41
+ `title: "${args.title}"`,
42
+ `date: ${date}`,
43
+ `project: "${args.project ?? ''}"`,
44
+ 'type: decision',
45
+ '---',
46
+ '',
47
+ `# ${args.title}`,
48
+ '',
49
+ args.context ? `## 배경\n\n${args.context}\n` : '',
50
+ `## 결정\n\n${args.decision}\n`,
51
+ args.alternatives?.length
52
+ ? `## 고려한 대안\n\n${args.alternatives.map(a => `- ${a}`).join('\n')}\n`
53
+ : '',
54
+ `## 이유\n\n${args.reasoning}\n`,
55
+ ].filter(Boolean).join('\n');
56
+ const filePath = resolve(decisionsDir, fileName);
57
+ if (!filePath.startsWith(resolve(decisionsDir))) {
58
+ throw new Error('Path traversal detected');
59
+ }
60
+ writeFileSync(filePath, content, 'utf-8');
61
+ return { saved: filePath, fileName };
62
+ }
63
+ export async function handleFindDecisions(vaultPath, args) {
64
+ const decisionsDir = join(vaultPath, 'decisions');
65
+ if (!existsSync(decisionsDir))
66
+ return { decisions: [], message: 'No decisions directory' };
67
+ const files = readdirSync(decisionsDir).filter(f => f.endsWith('.md'));
68
+ const query = args.query.toLowerCase();
69
+ const matches = files
70
+ .map(f => {
71
+ const content = readFileSync(join(decisionsDir, f), 'utf-8');
72
+ const score = content.toLowerCase().includes(query) ? 1 : 0;
73
+ return { file: f, content: content.slice(0, 300), score };
74
+ })
75
+ .filter(m => m.score > 0)
76
+ .slice(0, 10);
77
+ return { decisions: matches, total: files.length };
78
+ }
79
+ //# sourceMappingURL=decision-journal.js.map
@@ -0,0 +1,24 @@
1
+ import type { VectorStore } from '../../store/types.js';
2
+ export declare function createDetectGapsTool(store: VectorStore): {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ minSeverity: {
9
+ type: "string";
10
+ description: string;
11
+ enum: string[];
12
+ };
13
+ };
14
+ };
15
+ handler: (args: {
16
+ minSeverity?: string;
17
+ }) => Promise<{
18
+ content: {
19
+ type: "text";
20
+ text: string;
21
+ }[];
22
+ }>;
23
+ };
24
+ //# sourceMappingURL=detect-gaps.d.ts.map