stellavault 0.1.0 → 0.2.1

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 (385) hide show
  1. package/package.json +1 -1
  2. package/packages/cli/bin/ekh.js +2 -2
  3. package/packages/cli/dist/commands/federate-cmd.js +61 -31
  4. package/packages/core/dist/api/dashboard.d.ts +3 -0
  5. package/packages/core/{src/api/dashboard.ts → dist/api/dashboard.js} +8 -11
  6. package/packages/core/dist/api/graph-data.d.ts +11 -0
  7. package/packages/core/dist/api/graph-data.js +255 -0
  8. package/packages/core/dist/api/pwa.d.ts +3 -0
  9. package/packages/core/{src/api/pwa.ts → dist/api/pwa.js} +27 -32
  10. package/packages/core/dist/api/server.d.ts +16 -0
  11. package/packages/core/dist/api/server.js +647 -0
  12. package/packages/core/dist/capture/voice.d.ts +24 -0
  13. package/packages/core/dist/capture/voice.js +135 -0
  14. package/packages/core/{src/cloud/index.ts → dist/cloud/index.d.ts} +1 -0
  15. package/packages/core/dist/cloud/index.js +2 -0
  16. package/packages/core/dist/cloud/sync.d.ts +29 -0
  17. package/packages/core/dist/cloud/sync.js +137 -0
  18. package/packages/core/dist/config.d.ts +27 -0
  19. package/packages/core/dist/config.js +55 -0
  20. package/packages/core/dist/federation/credits.d.ts +26 -0
  21. package/packages/core/dist/federation/credits.js +56 -0
  22. package/packages/core/dist/federation/identity.d.ts +14 -0
  23. package/packages/core/dist/federation/identity.js +74 -0
  24. package/packages/core/{src/federation/index.ts → dist/federation/index.d.ts} +1 -2
  25. package/packages/core/dist/federation/index.js +5 -0
  26. package/packages/core/dist/federation/node.d.ts +31 -0
  27. package/packages/core/dist/federation/node.js +216 -0
  28. package/packages/core/dist/federation/privacy.d.ts +8 -0
  29. package/packages/core/dist/federation/privacy.js +40 -0
  30. package/packages/core/dist/federation/reputation.d.ts +37 -0
  31. package/packages/core/dist/federation/reputation.js +139 -0
  32. package/packages/core/dist/federation/search.d.ts +19 -0
  33. package/packages/core/dist/federation/search.js +101 -0
  34. package/packages/core/dist/federation/sharing.d.ts +72 -0
  35. package/packages/core/dist/federation/sharing.js +246 -0
  36. package/packages/core/dist/federation/trust.d.ts +15 -0
  37. package/packages/core/dist/federation/trust.js +60 -0
  38. package/packages/core/dist/federation/types.d.ts +40 -0
  39. package/packages/core/dist/federation/types.js +3 -0
  40. package/packages/core/dist/i18n/index.d.ts +6 -0
  41. package/packages/core/dist/i18n/index.js +81 -0
  42. package/packages/core/{src/index.ts → dist/index.d.ts} +48 -67
  43. package/packages/core/dist/index.js +69 -0
  44. package/packages/core/dist/indexer/chunker.d.ts +14 -0
  45. package/packages/core/dist/indexer/chunker.js +148 -0
  46. package/packages/core/dist/indexer/embedder.d.ts +8 -0
  47. package/packages/core/dist/indexer/embedder.js +3 -0
  48. package/packages/core/dist/indexer/index.d.ts +28 -0
  49. package/packages/core/dist/indexer/index.js +74 -0
  50. package/packages/core/dist/indexer/local-embedder.d.ts +3 -0
  51. package/packages/core/dist/indexer/local-embedder.js +29 -0
  52. package/packages/core/dist/indexer/scanner.d.ts +11 -0
  53. package/packages/core/dist/indexer/scanner.js +137 -0
  54. package/packages/core/dist/indexer/watcher.d.ts +19 -0
  55. package/packages/core/dist/indexer/watcher.js +49 -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 +133 -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/export.d.ts +29 -0
  91. package/packages/core/dist/mcp/tools/export.js +60 -0
  92. package/packages/core/dist/mcp/tools/federated-search.d.ts +29 -0
  93. package/packages/core/dist/mcp/tools/federated-search.js +36 -0
  94. package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +35 -0
  95. package/packages/core/dist/mcp/tools/generate-claude-md.js +107 -0
  96. package/packages/core/dist/mcp/tools/get-document.d.ts +35 -0
  97. package/packages/core/dist/mcp/tools/get-document.js +25 -0
  98. package/packages/core/dist/mcp/tools/get-related.d.ts +32 -0
  99. package/packages/core/dist/mcp/tools/get-related.js +33 -0
  100. package/packages/core/dist/mcp/tools/learning-path.d.ts +23 -0
  101. package/packages/core/dist/mcp/tools/learning-path.js +45 -0
  102. package/packages/core/dist/mcp/tools/list-topics.d.ts +15 -0
  103. package/packages/core/dist/mcp/tools/list-topics.js +18 -0
  104. package/packages/core/dist/mcp/tools/search.d.ts +39 -0
  105. package/packages/core/dist/mcp/tools/search.js +29 -0
  106. package/packages/core/dist/mcp/tools/snapshot.d.ts +47 -0
  107. package/packages/core/dist/mcp/tools/snapshot.js +84 -0
  108. package/packages/core/dist/multi-vault/index.d.ts +26 -0
  109. package/packages/core/dist/multi-vault/index.js +80 -0
  110. package/packages/core/dist/pack/creator.d.ts +21 -0
  111. package/packages/core/dist/pack/creator.js +105 -0
  112. package/packages/core/dist/pack/exporter.d.ts +4 -0
  113. package/packages/core/dist/pack/exporter.js +18 -0
  114. package/packages/core/dist/pack/importer.d.ts +10 -0
  115. package/packages/core/dist/pack/importer.js +55 -0
  116. package/packages/core/{src/pack/index.ts → dist/pack/index.d.ts} +1 -0
  117. package/packages/core/dist/pack/index.js +5 -0
  118. package/packages/core/dist/pack/marketplace.d.ts +14 -0
  119. package/packages/core/dist/pack/marketplace.js +90 -0
  120. package/packages/core/dist/pack/pii-masker.d.ts +7 -0
  121. package/packages/core/dist/pack/pii-masker.js +29 -0
  122. package/packages/core/dist/pack/types.d.ts +36 -0
  123. package/packages/core/dist/pack/types.js +3 -0
  124. package/packages/core/dist/plugins/index.d.ts +35 -0
  125. package/packages/core/dist/plugins/index.js +57 -0
  126. package/packages/core/dist/plugins/webhooks.d.ts +30 -0
  127. package/packages/core/dist/plugins/webhooks.js +79 -0
  128. package/packages/core/dist/search/bm25.d.ts +4 -0
  129. package/packages/core/dist/search/bm25.js +10 -0
  130. package/packages/core/dist/search/index.d.ts +13 -0
  131. package/packages/core/dist/search/index.js +63 -0
  132. package/packages/core/dist/search/rrf.d.ts +7 -0
  133. package/packages/core/dist/search/rrf.js +21 -0
  134. package/packages/core/dist/search/semantic.d.ts +5 -0
  135. package/packages/core/dist/search/semantic.js +6 -0
  136. package/packages/core/{src/store/index.ts → dist/store/index.d.ts} +1 -0
  137. package/packages/core/dist/store/index.js +2 -0
  138. package/packages/core/dist/store/sqlite-vec.d.ts +6 -0
  139. package/packages/core/dist/store/sqlite-vec.js +251 -0
  140. package/packages/core/dist/store/types.d.ts +20 -0
  141. package/packages/core/dist/store/types.js +3 -0
  142. package/packages/core/dist/team/index.d.ts +25 -0
  143. package/packages/core/dist/team/index.js +97 -0
  144. package/packages/core/dist/types/chunk.d.ts +23 -0
  145. package/packages/core/dist/types/chunk.js +3 -0
  146. package/packages/core/dist/types/document.d.ts +23 -0
  147. package/packages/core/dist/types/document.js +3 -0
  148. package/packages/core/dist/types/graph.d.ts +39 -0
  149. package/packages/core/dist/types/graph.js +3 -0
  150. package/packages/core/dist/types/index.d.ts +5 -0
  151. package/packages/core/dist/types/index.js +2 -0
  152. package/packages/core/dist/types/search.d.ts +39 -0
  153. package/packages/core/dist/types/search.js +3 -0
  154. package/packages/core/dist/utils/retry.d.ts +25 -0
  155. package/packages/core/dist/utils/retry.js +59 -0
  156. package/memory/MEMORY.md +0 -25
  157. package/packages/cli/dist/commands/brief-cmd.d.ts.map +0 -1
  158. package/packages/cli/dist/commands/brief-cmd.js.map +0 -1
  159. package/packages/cli/dist/commands/capture-cmd.d.ts.map +0 -1
  160. package/packages/cli/dist/commands/capture-cmd.js.map +0 -1
  161. package/packages/cli/dist/commands/card-cmd.d.ts.map +0 -1
  162. package/packages/cli/dist/commands/card-cmd.js.map +0 -1
  163. package/packages/cli/dist/commands/clip-cmd.d.ts.map +0 -1
  164. package/packages/cli/dist/commands/clip-cmd.js.map +0 -1
  165. package/packages/cli/dist/commands/cloud-cmd.d.ts.map +0 -1
  166. package/packages/cli/dist/commands/cloud-cmd.js.map +0 -1
  167. package/packages/cli/dist/commands/contradictions-cmd.d.ts.map +0 -1
  168. package/packages/cli/dist/commands/contradictions-cmd.js.map +0 -1
  169. package/packages/cli/dist/commands/decay-cmd.d.ts.map +0 -1
  170. package/packages/cli/dist/commands/decay-cmd.js.map +0 -1
  171. package/packages/cli/dist/commands/digest-cmd.d.ts.map +0 -1
  172. package/packages/cli/dist/commands/digest-cmd.js.map +0 -1
  173. package/packages/cli/dist/commands/duplicates-cmd.d.ts.map +0 -1
  174. package/packages/cli/dist/commands/duplicates-cmd.js.map +0 -1
  175. package/packages/cli/dist/commands/federate-cmd.d.ts.map +0 -1
  176. package/packages/cli/dist/commands/federate-cmd.js.map +0 -1
  177. package/packages/cli/dist/commands/gaps-cmd.d.ts.map +0 -1
  178. package/packages/cli/dist/commands/gaps-cmd.js.map +0 -1
  179. package/packages/cli/dist/commands/graph-cmd.d.ts.map +0 -1
  180. package/packages/cli/dist/commands/graph-cmd.js.map +0 -1
  181. package/packages/cli/dist/commands/index-cmd.d.ts.map +0 -1
  182. package/packages/cli/dist/commands/index-cmd.js.map +0 -1
  183. package/packages/cli/dist/commands/init-cmd.d.ts.map +0 -1
  184. package/packages/cli/dist/commands/init-cmd.js.map +0 -1
  185. package/packages/cli/dist/commands/learn-cmd.d.ts.map +0 -1
  186. package/packages/cli/dist/commands/learn-cmd.js.map +0 -1
  187. package/packages/cli/dist/commands/pack-cmd.d.ts.map +0 -1
  188. package/packages/cli/dist/commands/pack-cmd.js.map +0 -1
  189. package/packages/cli/dist/commands/review-cmd.d.ts.map +0 -1
  190. package/packages/cli/dist/commands/review-cmd.js.map +0 -1
  191. package/packages/cli/dist/commands/search-cmd.d.ts.map +0 -1
  192. package/packages/cli/dist/commands/search-cmd.js.map +0 -1
  193. package/packages/cli/dist/commands/serve-cmd.d.ts.map +0 -1
  194. package/packages/cli/dist/commands/serve-cmd.js.map +0 -1
  195. package/packages/cli/dist/commands/status-cmd.d.ts.map +0 -1
  196. package/packages/cli/dist/commands/status-cmd.js.map +0 -1
  197. package/packages/cli/dist/commands/sync-cmd.d.ts.map +0 -1
  198. package/packages/cli/dist/commands/sync-cmd.js.map +0 -1
  199. package/packages/cli/dist/commands/vault-cmd.d.ts.map +0 -1
  200. package/packages/cli/dist/commands/vault-cmd.js.map +0 -1
  201. package/packages/cli/dist/index.d.ts.map +0 -1
  202. package/packages/cli/dist/index.js.map +0 -1
  203. package/packages/cli/src/commands/brief-cmd.ts +0 -87
  204. package/packages/cli/src/commands/capture-cmd.ts +0 -34
  205. package/packages/cli/src/commands/card-cmd.ts +0 -29
  206. package/packages/cli/src/commands/clip-cmd.ts +0 -172
  207. package/packages/cli/src/commands/cloud-cmd.ts +0 -75
  208. package/packages/cli/src/commands/contradictions-cmd.ts +0 -41
  209. package/packages/cli/src/commands/decay-cmd.ts +0 -57
  210. package/packages/cli/src/commands/digest-cmd.ts +0 -89
  211. package/packages/cli/src/commands/duplicates-cmd.ts +0 -38
  212. package/packages/cli/src/commands/federate-cmd.ts +0 -236
  213. package/packages/cli/src/commands/gaps-cmd.ts +0 -40
  214. package/packages/cli/src/commands/graph-cmd.ts +0 -88
  215. package/packages/cli/src/commands/index-cmd.ts +0 -65
  216. package/packages/cli/src/commands/init-cmd.ts +0 -145
  217. package/packages/cli/src/commands/learn-cmd.ts +0 -56
  218. package/packages/cli/src/commands/pack-cmd.ts +0 -121
  219. package/packages/cli/src/commands/review-cmd.ts +0 -125
  220. package/packages/cli/src/commands/search-cmd.ts +0 -45
  221. package/packages/cli/src/commands/serve-cmd.ts +0 -17
  222. package/packages/cli/src/commands/status-cmd.ts +0 -37
  223. package/packages/cli/src/commands/sync-cmd.ts +0 -68
  224. package/packages/cli/src/commands/vault-cmd.ts +0 -64
  225. package/packages/cli/src/index.ts +0 -187
  226. package/packages/core/src/api/graph-data.ts +0 -286
  227. package/packages/core/src/api/server.ts +0 -660
  228. package/packages/core/src/capture/voice.ts +0 -168
  229. package/packages/core/src/cloud/sync.ts +0 -167
  230. package/packages/core/src/config.ts +0 -82
  231. package/packages/core/src/federation/credits.ts +0 -80
  232. package/packages/core/src/federation/hyperswarm.d.ts +0 -19
  233. package/packages/core/src/federation/identity.ts +0 -90
  234. package/packages/core/src/federation/node.ts +0 -235
  235. package/packages/core/src/federation/privacy.ts +0 -52
  236. package/packages/core/src/federation/reputation.ts +0 -202
  237. package/packages/core/src/federation/search.ts +0 -129
  238. package/packages/core/src/federation/sharing.ts +0 -165
  239. package/packages/core/src/federation/trust.ts +0 -76
  240. package/packages/core/src/federation/types.ts +0 -25
  241. package/packages/core/src/i18n/index.ts +0 -85
  242. package/packages/core/src/indexer/chunker.ts +0 -180
  243. package/packages/core/src/indexer/embedder.ts +0 -9
  244. package/packages/core/src/indexer/index.ts +0 -113
  245. package/packages/core/src/indexer/local-embedder.ts +0 -35
  246. package/packages/core/src/indexer/scanner.ts +0 -142
  247. package/packages/core/src/indexer/watcher.ts +0 -62
  248. package/packages/core/src/intelligence/contradiction-detector.ts +0 -134
  249. package/packages/core/src/intelligence/decay-engine.ts +0 -229
  250. package/packages/core/src/intelligence/duplicate-detector.ts +0 -71
  251. package/packages/core/src/intelligence/fsrs.ts +0 -79
  252. package/packages/core/src/intelligence/gap-detector.ts +0 -109
  253. package/packages/core/src/intelligence/learning-path.ts +0 -86
  254. package/packages/core/src/intelligence/notifications.ts +0 -106
  255. package/packages/core/src/intelligence/predictive-gaps.ts +0 -94
  256. package/packages/core/src/intelligence/semantic-versioning.ts +0 -97
  257. package/packages/core/src/intelligence/types.ts +0 -28
  258. package/packages/core/src/mcp/custom-tools.ts +0 -97
  259. package/packages/core/src/mcp/server.ts +0 -142
  260. package/packages/core/src/mcp/tools/agentic-graph.ts +0 -96
  261. package/packages/core/src/mcp/tools/brief.ts +0 -49
  262. package/packages/core/src/mcp/tools/decay.ts +0 -40
  263. package/packages/core/src/mcp/tools/decision-journal.ts +0 -95
  264. package/packages/core/src/mcp/tools/export.ts +0 -72
  265. package/packages/core/src/mcp/tools/federated-search.ts +0 -43
  266. package/packages/core/src/mcp/tools/generate-claude-md.ts +0 -130
  267. package/packages/core/src/mcp/tools/get-document.ts +0 -26
  268. package/packages/core/src/mcp/tools/get-related.ts +0 -41
  269. package/packages/core/src/mcp/tools/learning-path.ts +0 -52
  270. package/packages/core/src/mcp/tools/list-topics.ts +0 -20
  271. package/packages/core/src/mcp/tools/search.ts +0 -35
  272. package/packages/core/src/mcp/tools/snapshot.ts +0 -98
  273. package/packages/core/src/multi-vault/index.ts +0 -118
  274. package/packages/core/src/pack/creator.ts +0 -127
  275. package/packages/core/src/pack/exporter.ts +0 -21
  276. package/packages/core/src/pack/importer.ts +0 -82
  277. package/packages/core/src/pack/marketplace.ts +0 -103
  278. package/packages/core/src/pack/pii-masker.ts +0 -38
  279. package/packages/core/src/pack/types.ts +0 -39
  280. package/packages/core/src/plugins/index.ts +0 -100
  281. package/packages/core/src/plugins/webhooks.ts +0 -110
  282. package/packages/core/src/search/bm25.ts +0 -16
  283. package/packages/core/src/search/index.ts +0 -83
  284. package/packages/core/src/search/rrf.ts +0 -31
  285. package/packages/core/src/search/semantic.ts +0 -15
  286. package/packages/core/src/store/sqlite-vec.ts +0 -290
  287. package/packages/core/src/store/types.ts +0 -22
  288. package/packages/core/src/team/index.ts +0 -126
  289. package/packages/core/src/types/chunk.ts +0 -25
  290. package/packages/core/src/types/document.ts +0 -24
  291. package/packages/core/src/types/graph.ts +0 -44
  292. package/packages/core/src/types/index.ts +0 -15
  293. package/packages/core/src/types/search.ts +0 -38
  294. package/packages/core/src/utils/retry.ts +0 -85
  295. package/packages/core/tests/api-card.test.ts +0 -60
  296. package/packages/core/tests/api-routes.test.ts +0 -98
  297. package/packages/core/tests/bm25.test.ts +0 -87
  298. package/packages/core/tests/chunker.test.ts +0 -48
  299. package/packages/core/tests/cluster.test.ts +0 -75
  300. package/packages/core/tests/constellation.test.ts +0 -77
  301. package/packages/core/tests/export-utils.test.ts +0 -97
  302. package/packages/core/tests/fsrs.test.ts +0 -96
  303. package/packages/core/tests/gesture-detector.test.ts +0 -45
  304. package/packages/core/tests/graph-data.test.ts +0 -87
  305. package/packages/core/tests/layout.test.ts +0 -83
  306. package/packages/core/tests/mcp.test.ts +0 -148
  307. package/packages/core/tests/pack.test.ts +0 -127
  308. package/packages/core/tests/pii-masker.test.ts +0 -42
  309. package/packages/core/tests/profile-card.test.ts +0 -62
  310. package/packages/core/tests/rrf.test.ts +0 -29
  311. package/packages/core/tests/search-integration.test.ts +0 -139
  312. package/packages/core/tests/store.test.ts +0 -80
  313. package/packages/graph/click-result.png +0 -0
  314. package/packages/graph/index.html +0 -17
  315. package/packages/graph/package.json +0 -32
  316. package/packages/graph/src/App.tsx +0 -7
  317. package/packages/graph/src/api/client.ts +0 -39
  318. package/packages/graph/src/components/ClusterFilter.tsx +0 -73
  319. package/packages/graph/src/components/ConstellationView.tsx +0 -232
  320. package/packages/graph/src/components/ExportPanel.tsx +0 -177
  321. package/packages/graph/src/components/Graph3D.tsx +0 -230
  322. package/packages/graph/src/components/GraphEdges.tsx +0 -100
  323. package/packages/graph/src/components/GraphNodes.tsx +0 -386
  324. package/packages/graph/src/components/HealthDashboard.tsx +0 -173
  325. package/packages/graph/src/components/Layout.tsx +0 -214
  326. package/packages/graph/src/components/MotionOverlay.tsx +0 -81
  327. package/packages/graph/src/components/MotionToggle.tsx +0 -33
  328. package/packages/graph/src/components/MultiverseView.tsx +0 -286
  329. package/packages/graph/src/components/NodeDetail.tsx +0 -232
  330. package/packages/graph/src/components/PulseParticle.tsx +0 -232
  331. package/packages/graph/src/components/SearchBar.tsx +0 -107
  332. package/packages/graph/src/components/StarField.tsx +0 -197
  333. package/packages/graph/src/components/StatusBar.tsx +0 -53
  334. package/packages/graph/src/components/Timeline.tsx +0 -148
  335. package/packages/graph/src/components/ToolsPanel.tsx +0 -512
  336. package/packages/graph/src/components/Tooltip.tsx +0 -100
  337. package/packages/graph/src/components/TypeFilter.tsx +0 -131
  338. package/packages/graph/src/embed/EmbedGraph.tsx +0 -144
  339. package/packages/graph/src/hooks/useConstellationLOD.ts +0 -76
  340. package/packages/graph/src/hooks/useDecay.ts +0 -37
  341. package/packages/graph/src/hooks/useExport.ts +0 -165
  342. package/packages/graph/src/hooks/useGraph.ts +0 -69
  343. package/packages/graph/src/hooks/useKeyboardNav.ts +0 -122
  344. package/packages/graph/src/hooks/useLayout.ts +0 -45
  345. package/packages/graph/src/hooks/useMotion.ts +0 -120
  346. package/packages/graph/src/hooks/usePulse.ts +0 -58
  347. package/packages/graph/src/hooks/useSearch.ts +0 -71
  348. package/packages/graph/src/lib/constellation.ts +0 -107
  349. package/packages/graph/src/lib/export-utils.ts +0 -48
  350. package/packages/graph/src/lib/gesture-detector.ts +0 -123
  351. package/packages/graph/src/lib/layout.worker.ts +0 -153
  352. package/packages/graph/src/lib/motion-controller.ts +0 -83
  353. package/packages/graph/src/lib/profile-card.ts +0 -122
  354. package/packages/graph/src/main.tsx +0 -4
  355. package/packages/graph/src/stores/graph-store.ts +0 -155
  356. package/packages/graph/success.png +0 -0
  357. package/packages/graph/test-click.mjs +0 -49
  358. package/packages/graph/test-explore.mjs +0 -102
  359. package/packages/graph/test-final.mjs +0 -61
  360. package/packages/graph/test-graph.mjs +0 -139
  361. package/packages/graph/test-hover.mjs +0 -48
  362. package/packages/graph/test-pulse.mjs +0 -68
  363. package/packages/graph/test-screenshot.mjs +0 -56
  364. package/packages/graph/test-v2.mjs +0 -97
  365. package/packages/graph/vite.config.ts +0 -15
  366. package/packages/sync/.env.example +0 -11
  367. package/packages/sync/.sync-state.json +0 -317
  368. package/packages/sync/.upload-state.json +0 -1009
  369. package/packages/sync/create-stella-network-notion.mjs +0 -151
  370. package/packages/sync/create-stellavault-project-notion.mjs +0 -322
  371. package/packages/sync/logs/sync-2026-03-28.log +0 -6
  372. package/packages/sync/logs/sync-2026-03-29.log +0 -12
  373. package/packages/sync/logs/sync-2026-03-30.log +0 -6
  374. package/packages/sync/logs/sync-2026-03-31.log +0 -6
  375. package/packages/sync/logs/sync-2026-04-01.log +0 -6
  376. package/packages/sync/logs/sync-2026-04-02.log +0 -6
  377. package/packages/sync/package-lock.json +0 -373
  378. package/packages/sync/package.json +0 -16
  379. package/packages/sync/run-sync.bat +0 -18
  380. package/packages/sync/run-sync.mjs +0 -46
  381. package/packages/sync/setup-scheduler.mjs +0 -119
  382. package/packages/sync/structured-sync.mjs +0 -187
  383. package/packages/sync/sync-to-obsidian.mjs +0 -264
  384. package/packages/sync/upload-pdca-to-notion.mjs +0 -495
  385. package/tsconfig.base.json +0 -18
@@ -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,29 @@
1
+ import type { VectorStore } from '../../store/types.js';
2
+ export declare const exportToolDef: {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ outputPath: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ format: {
13
+ type: string;
14
+ enum: string[];
15
+ description: string;
16
+ };
17
+ };
18
+ required: string[];
19
+ };
20
+ };
21
+ export declare function handleExport(store: VectorStore, args: {
22
+ outputPath: string;
23
+ format?: string;
24
+ }): Promise<{
25
+ exported: number;
26
+ path: string;
27
+ format: string;
28
+ }>;
29
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1,60 @@
1
+ // Design Ref: §12.1 F20 — 지식 내보내기 포맷 (락인 방지)
2
+ import { writeFileSync, mkdirSync } from 'node:fs';
3
+ import { dirname, resolve } from 'node:path';
4
+ import { homedir } from 'node:os';
5
+ const ALLOWED_EXPORT_DIRS = [
6
+ resolve(homedir(), '.stellavault'),
7
+ resolve('.'),
8
+ ];
9
+ function validateExportPath(outputPath) {
10
+ const resolved = resolve(outputPath);
11
+ const isAllowed = ALLOWED_EXPORT_DIRS.some(dir => resolved.startsWith(resolve(dir)));
12
+ if (!isAllowed) {
13
+ throw new Error(`Export path must be within current directory or ~/.stellavault/. Got: ${resolved}`);
14
+ }
15
+ return resolved;
16
+ }
17
+ export const exportToolDef = {
18
+ name: 'export',
19
+ description: '벡터 DB의 문서와 메타데이터를 JSON 파일로 내보냅니다. 다른 도구로 이전 가능.',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ outputPath: { type: 'string', description: '출력 파일 경로 (예: ./export.json)' },
24
+ format: { type: 'string', enum: ['json', 'csv'], description: '출력 포맷 (기본: json)' },
25
+ },
26
+ required: ['outputPath'],
27
+ },
28
+ };
29
+ export async function handleExport(store, args) {
30
+ const docs = await store.getAllDocuments();
31
+ const stats = await store.getStats();
32
+ const topics = await store.getTopics();
33
+ const safePath = validateExportPath(args.outputPath);
34
+ mkdirSync(dirname(safePath), { recursive: true });
35
+ if (args.format === 'csv') {
36
+ const header = 'id,filePath,title,tags,lastModified,contentHash';
37
+ const rows = docs.map(d => `"${d.id}","${d.filePath}","${d.title.replace(/"/g, '""')}","${d.tags.join(';')}","${d.lastModified}","${d.contentHash}"`);
38
+ writeFileSync(safePath, [header, ...rows].join('\n'), 'utf-8');
39
+ }
40
+ else {
41
+ const exported = {
42
+ exportedAt: new Date().toISOString(),
43
+ version: '1.0',
44
+ stats,
45
+ topics,
46
+ documents: docs.map(d => ({
47
+ id: d.id,
48
+ filePath: d.filePath,
49
+ title: d.title,
50
+ tags: d.tags,
51
+ frontmatter: d.frontmatter,
52
+ lastModified: d.lastModified,
53
+ contentLength: d.content.length,
54
+ })),
55
+ };
56
+ writeFileSync(safePath, JSON.stringify(exported, null, 2), 'utf-8');
57
+ }
58
+ return { exported: docs.length, path: safePath, format: args.format ?? 'json' };
59
+ }
60
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1,29 @@
1
+ import type { FederatedSearch } from '../../federation/search.js';
2
+ export declare function createFederatedSearchTool(federatedSearch: FederatedSearch | null): {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ query: {
9
+ type: string;
10
+ description: string;
11
+ };
12
+ limit: {
13
+ type: string;
14
+ description: string;
15
+ };
16
+ };
17
+ required: string[];
18
+ };
19
+ handler(args: {
20
+ query: string;
21
+ limit?: number;
22
+ }): Promise<{
23
+ content: {
24
+ type: "text";
25
+ text: string;
26
+ }[];
27
+ }>;
28
+ };
29
+ //# sourceMappingURL=federated-search.d.ts.map
@@ -0,0 +1,36 @@
1
+ // MCP Tool: federated-search (Federation Phase 1b)
2
+ // AI 에이전트가 연합 네트워크를 검색
3
+ export function createFederatedSearchTool(federatedSearch) {
4
+ return {
5
+ name: 'federated-search',
6
+ description: 'Search across all connected Federation peers. Returns results from other Stellavault nodes in the P2P network. Only titles, similarity scores, and 50-char snippets are shared — no raw text leaves any node.',
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ query: { type: 'string', description: 'Search query' },
11
+ limit: { type: 'number', description: 'Max results per peer (default: 5)' },
12
+ },
13
+ required: ['query'],
14
+ },
15
+ async handler(args) {
16
+ if (!federatedSearch) {
17
+ return { content: [{ type: 'text', text: 'Federation not active. Run `sv federate join` first.' }] };
18
+ }
19
+ const results = await federatedSearch.search(args.query, { limit: args.limit ?? 5 });
20
+ if (results.length === 0) {
21
+ return { content: [{ type: 'text', text: 'No results from federation peers. Either no peers connected or no matching documents.' }] };
22
+ }
23
+ const lines = [
24
+ `🌐 Federation Search: "${args.query}" — ${results.length} results from ${new Set(results.map(r => r.peerId)).size} peers`,
25
+ '',
26
+ ];
27
+ for (const r of results) {
28
+ lines.push(`**${r.title}** (${Math.round(r.similarity * 100)}%) [${r.peerName}]`);
29
+ lines.push(` ${r.snippet}...`);
30
+ lines.push('');
31
+ }
32
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
33
+ },
34
+ };
35
+ }
36
+ //# sourceMappingURL=federated-search.js.map
@@ -0,0 +1,35 @@
1
+ import type { SearchEngine } from '../../search/index.js';
2
+ import type { VectorStore } from '../../store/types.js';
3
+ export declare const generateClaudeMdToolDef: {
4
+ name: string;
5
+ description: string;
6
+ inputSchema: {
7
+ type: "object";
8
+ properties: {
9
+ projectName: {
10
+ type: string;
11
+ description: string;
12
+ };
13
+ topics: {
14
+ type: string;
15
+ items: {
16
+ type: string;
17
+ };
18
+ description: string;
19
+ };
20
+ };
21
+ required: string[];
22
+ };
23
+ };
24
+ export declare function handleGenerateClaudeMd(searchEngine: SearchEngine, store: VectorStore, args: {
25
+ projectName: string;
26
+ topics?: string[];
27
+ }): Promise<{
28
+ content: string;
29
+ stats: {
30
+ queriesRun: number;
31
+ uniqueResults: number;
32
+ sections: string[];
33
+ };
34
+ }>;
35
+ //# sourceMappingURL=generate-claude-md.d.ts.map