stellavault 0.2.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 (390) 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 +647 -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/contradiction-detector.d.ts +20 -0
  55. package/packages/core/dist/intelligence/contradiction-detector.js +115 -0
  56. package/packages/core/dist/intelligence/decay-engine.d.ts +27 -0
  57. package/packages/core/dist/intelligence/decay-engine.js +190 -0
  58. package/packages/core/dist/intelligence/duplicate-detector.d.ts +20 -0
  59. package/packages/core/dist/intelligence/duplicate-detector.js +55 -0
  60. package/packages/core/dist/intelligence/fsrs.d.ts +43 -0
  61. package/packages/core/dist/intelligence/fsrs.js +70 -0
  62. package/packages/core/dist/intelligence/gap-detector.d.ts +25 -0
  63. package/packages/core/dist/intelligence/gap-detector.js +78 -0
  64. package/packages/core/dist/intelligence/learning-path.d.ts +31 -0
  65. package/packages/core/dist/intelligence/learning-path.js +53 -0
  66. package/packages/core/dist/intelligence/notifications.d.ts +31 -0
  67. package/packages/core/dist/intelligence/notifications.js +65 -0
  68. package/packages/core/dist/intelligence/predictive-gaps.d.ts +14 -0
  69. package/packages/core/dist/intelligence/predictive-gaps.js +74 -0
  70. package/packages/core/dist/intelligence/semantic-versioning.d.ts +37 -0
  71. package/packages/core/dist/intelligence/semantic-versioning.js +68 -0
  72. package/packages/core/dist/intelligence/types.d.ts +28 -0
  73. package/packages/core/dist/intelligence/types.js +3 -0
  74. package/packages/core/dist/mcp/custom-tools.d.ts +29 -0
  75. package/packages/core/dist/mcp/custom-tools.js +70 -0
  76. package/packages/core/{src/mcp/index.ts → dist/mcp/index.d.ts} +1 -0
  77. package/packages/core/dist/mcp/index.js +2 -0
  78. package/packages/core/dist/mcp/server.d.ts +49 -0
  79. package/packages/core/dist/mcp/server.js +133 -0
  80. package/packages/core/dist/mcp/tools/agentic-graph.d.ts +87 -0
  81. package/packages/core/dist/mcp/tools/agentic-graph.js +88 -0
  82. package/packages/core/dist/mcp/tools/brief.d.ts +31 -0
  83. package/packages/core/dist/mcp/tools/brief.js +39 -0
  84. package/packages/core/dist/mcp/tools/decay.d.ts +33 -0
  85. package/packages/core/dist/mcp/tools/decay.js +32 -0
  86. package/packages/core/dist/mcp/tools/decision-journal.d.ts +78 -0
  87. package/packages/core/dist/mcp/tools/decision-journal.js +79 -0
  88. package/packages/core/dist/mcp/tools/export.d.ts +29 -0
  89. package/packages/core/dist/mcp/tools/export.js +60 -0
  90. package/packages/core/dist/mcp/tools/federated-search.d.ts +29 -0
  91. package/packages/core/dist/mcp/tools/federated-search.js +36 -0
  92. package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +35 -0
  93. package/packages/core/dist/mcp/tools/generate-claude-md.js +107 -0
  94. package/packages/core/dist/mcp/tools/get-document.d.ts +35 -0
  95. package/packages/core/dist/mcp/tools/get-document.js +25 -0
  96. package/packages/core/dist/mcp/tools/get-related.d.ts +32 -0
  97. package/packages/core/dist/mcp/tools/get-related.js +33 -0
  98. package/packages/core/dist/mcp/tools/learning-path.d.ts +23 -0
  99. package/packages/core/dist/mcp/tools/learning-path.js +45 -0
  100. package/packages/core/dist/mcp/tools/list-topics.d.ts +15 -0
  101. package/packages/core/dist/mcp/tools/list-topics.js +18 -0
  102. package/packages/core/dist/mcp/tools/search.d.ts +39 -0
  103. package/packages/core/dist/mcp/tools/search.js +29 -0
  104. package/packages/core/dist/mcp/tools/snapshot.d.ts +47 -0
  105. package/packages/core/dist/mcp/tools/snapshot.js +84 -0
  106. package/packages/core/dist/multi-vault/index.d.ts +26 -0
  107. package/packages/core/dist/multi-vault/index.js +80 -0
  108. package/packages/core/dist/pack/creator.d.ts +21 -0
  109. package/packages/core/dist/pack/creator.js +105 -0
  110. package/packages/core/dist/pack/exporter.d.ts +4 -0
  111. package/packages/core/dist/pack/exporter.js +18 -0
  112. package/packages/core/dist/pack/importer.d.ts +10 -0
  113. package/packages/core/dist/pack/importer.js +55 -0
  114. package/packages/core/{src/pack/index.ts → dist/pack/index.d.ts} +1 -0
  115. package/packages/core/dist/pack/index.js +5 -0
  116. package/packages/core/dist/pack/marketplace.d.ts +14 -0
  117. package/packages/core/dist/pack/marketplace.js +90 -0
  118. package/packages/core/dist/pack/pii-masker.d.ts +7 -0
  119. package/packages/core/dist/pack/pii-masker.js +29 -0
  120. package/packages/core/dist/pack/types.d.ts +36 -0
  121. package/packages/core/dist/pack/types.js +3 -0
  122. package/packages/core/dist/plugins/index.d.ts +35 -0
  123. package/packages/core/dist/plugins/index.js +57 -0
  124. package/packages/core/dist/plugins/webhooks.d.ts +30 -0
  125. package/packages/core/dist/plugins/webhooks.js +79 -0
  126. package/packages/core/dist/search/bm25.d.ts +4 -0
  127. package/packages/core/dist/search/bm25.js +10 -0
  128. package/packages/core/dist/search/index.d.ts +13 -0
  129. package/packages/core/dist/search/index.js +63 -0
  130. package/packages/core/dist/search/rrf.d.ts +7 -0
  131. package/packages/core/dist/search/rrf.js +21 -0
  132. package/packages/core/dist/search/semantic.d.ts +5 -0
  133. package/packages/core/dist/search/semantic.js +6 -0
  134. package/packages/core/{src/store/index.ts → dist/store/index.d.ts} +1 -0
  135. package/packages/core/dist/store/index.js +2 -0
  136. package/packages/core/dist/store/sqlite-vec.d.ts +6 -0
  137. package/packages/core/dist/store/sqlite-vec.js +251 -0
  138. package/packages/core/dist/store/types.d.ts +20 -0
  139. package/packages/core/dist/store/types.js +3 -0
  140. package/packages/core/dist/team/index.d.ts +25 -0
  141. package/packages/core/dist/team/index.js +97 -0
  142. package/packages/core/dist/types/chunk.d.ts +23 -0
  143. package/packages/core/dist/types/chunk.js +3 -0
  144. package/packages/core/dist/types/document.d.ts +23 -0
  145. package/packages/core/dist/types/document.js +3 -0
  146. package/packages/core/dist/types/graph.d.ts +39 -0
  147. package/packages/core/dist/types/graph.js +3 -0
  148. package/packages/core/dist/types/index.d.ts +5 -0
  149. package/packages/core/dist/types/index.js +2 -0
  150. package/packages/core/dist/types/search.d.ts +39 -0
  151. package/packages/core/dist/types/search.js +3 -0
  152. package/packages/core/dist/utils/retry.d.ts +25 -0
  153. package/packages/core/dist/utils/retry.js +59 -0
  154. package/.github/workflows/pages.yml +0 -37
  155. package/memory/MEMORY.md +0 -25
  156. package/packages/cli/dist/commands/brief-cmd.d.ts.map +0 -1
  157. package/packages/cli/dist/commands/brief-cmd.js.map +0 -1
  158. package/packages/cli/dist/commands/capture-cmd.d.ts.map +0 -1
  159. package/packages/cli/dist/commands/capture-cmd.js.map +0 -1
  160. package/packages/cli/dist/commands/card-cmd.d.ts.map +0 -1
  161. package/packages/cli/dist/commands/card-cmd.js.map +0 -1
  162. package/packages/cli/dist/commands/clip-cmd.d.ts.map +0 -1
  163. package/packages/cli/dist/commands/clip-cmd.js.map +0 -1
  164. package/packages/cli/dist/commands/cloud-cmd.d.ts.map +0 -1
  165. package/packages/cli/dist/commands/cloud-cmd.js.map +0 -1
  166. package/packages/cli/dist/commands/contradictions-cmd.d.ts.map +0 -1
  167. package/packages/cli/dist/commands/contradictions-cmd.js.map +0 -1
  168. package/packages/cli/dist/commands/decay-cmd.d.ts.map +0 -1
  169. package/packages/cli/dist/commands/decay-cmd.js.map +0 -1
  170. package/packages/cli/dist/commands/digest-cmd.d.ts.map +0 -1
  171. package/packages/cli/dist/commands/digest-cmd.js.map +0 -1
  172. package/packages/cli/dist/commands/duplicates-cmd.d.ts.map +0 -1
  173. package/packages/cli/dist/commands/duplicates-cmd.js.map +0 -1
  174. package/packages/cli/dist/commands/federate-cmd.d.ts.map +0 -1
  175. package/packages/cli/dist/commands/federate-cmd.js.map +0 -1
  176. package/packages/cli/dist/commands/gaps-cmd.d.ts.map +0 -1
  177. package/packages/cli/dist/commands/gaps-cmd.js.map +0 -1
  178. package/packages/cli/dist/commands/graph-cmd.d.ts.map +0 -1
  179. package/packages/cli/dist/commands/graph-cmd.js.map +0 -1
  180. package/packages/cli/dist/commands/index-cmd.d.ts.map +0 -1
  181. package/packages/cli/dist/commands/index-cmd.js.map +0 -1
  182. package/packages/cli/dist/commands/init-cmd.d.ts.map +0 -1
  183. package/packages/cli/dist/commands/init-cmd.js.map +0 -1
  184. package/packages/cli/dist/commands/learn-cmd.d.ts.map +0 -1
  185. package/packages/cli/dist/commands/learn-cmd.js.map +0 -1
  186. package/packages/cli/dist/commands/pack-cmd.d.ts.map +0 -1
  187. package/packages/cli/dist/commands/pack-cmd.js.map +0 -1
  188. package/packages/cli/dist/commands/review-cmd.d.ts.map +0 -1
  189. package/packages/cli/dist/commands/review-cmd.js.map +0 -1
  190. package/packages/cli/dist/commands/search-cmd.d.ts.map +0 -1
  191. package/packages/cli/dist/commands/search-cmd.js.map +0 -1
  192. package/packages/cli/dist/commands/serve-cmd.d.ts.map +0 -1
  193. package/packages/cli/dist/commands/serve-cmd.js.map +0 -1
  194. package/packages/cli/dist/commands/status-cmd.d.ts.map +0 -1
  195. package/packages/cli/dist/commands/status-cmd.js.map +0 -1
  196. package/packages/cli/dist/commands/sync-cmd.d.ts.map +0 -1
  197. package/packages/cli/dist/commands/sync-cmd.js.map +0 -1
  198. package/packages/cli/dist/commands/vault-cmd.d.ts.map +0 -1
  199. package/packages/cli/dist/commands/vault-cmd.js.map +0 -1
  200. package/packages/cli/dist/index.d.ts.map +0 -1
  201. package/packages/cli/dist/index.js.map +0 -1
  202. package/packages/cli/src/commands/brief-cmd.ts +0 -87
  203. package/packages/cli/src/commands/capture-cmd.ts +0 -34
  204. package/packages/cli/src/commands/card-cmd.ts +0 -29
  205. package/packages/cli/src/commands/clip-cmd.ts +0 -172
  206. package/packages/cli/src/commands/cloud-cmd.ts +0 -75
  207. package/packages/cli/src/commands/contradictions-cmd.ts +0 -41
  208. package/packages/cli/src/commands/decay-cmd.ts +0 -57
  209. package/packages/cli/src/commands/digest-cmd.ts +0 -89
  210. package/packages/cli/src/commands/duplicates-cmd.ts +0 -38
  211. package/packages/cli/src/commands/federate-cmd.ts +0 -256
  212. package/packages/cli/src/commands/gaps-cmd.ts +0 -40
  213. package/packages/cli/src/commands/graph-cmd.ts +0 -88
  214. package/packages/cli/src/commands/index-cmd.ts +0 -65
  215. package/packages/cli/src/commands/init-cmd.ts +0 -145
  216. package/packages/cli/src/commands/learn-cmd.ts +0 -56
  217. package/packages/cli/src/commands/pack-cmd.ts +0 -121
  218. package/packages/cli/src/commands/review-cmd.ts +0 -125
  219. package/packages/cli/src/commands/search-cmd.ts +0 -45
  220. package/packages/cli/src/commands/serve-cmd.ts +0 -17
  221. package/packages/cli/src/commands/status-cmd.ts +0 -37
  222. package/packages/cli/src/commands/sync-cmd.ts +0 -68
  223. package/packages/cli/src/commands/vault-cmd.ts +0 -64
  224. package/packages/cli/src/index.ts +0 -187
  225. package/packages/core/src/api/graph-data.ts +0 -286
  226. package/packages/core/src/api/server.ts +0 -660
  227. package/packages/core/src/capture/voice.ts +0 -168
  228. package/packages/core/src/cloud/sync.ts +0 -167
  229. package/packages/core/src/config.ts +0 -82
  230. package/packages/core/src/federation/credits.ts +0 -80
  231. package/packages/core/src/federation/hyperswarm.d.ts +0 -19
  232. package/packages/core/src/federation/identity.ts +0 -90
  233. package/packages/core/src/federation/node.ts +0 -235
  234. package/packages/core/src/federation/privacy.ts +0 -52
  235. package/packages/core/src/federation/reputation.ts +0 -202
  236. package/packages/core/src/federation/search.ts +0 -129
  237. package/packages/core/src/federation/sharing.ts +0 -315
  238. package/packages/core/src/federation/trust.ts +0 -76
  239. package/packages/core/src/federation/types.ts +0 -25
  240. package/packages/core/src/i18n/index.ts +0 -85
  241. package/packages/core/src/indexer/chunker.ts +0 -180
  242. package/packages/core/src/indexer/embedder.ts +0 -9
  243. package/packages/core/src/indexer/index.ts +0 -113
  244. package/packages/core/src/indexer/local-embedder.ts +0 -35
  245. package/packages/core/src/indexer/scanner.ts +0 -142
  246. package/packages/core/src/indexer/watcher.ts +0 -62
  247. package/packages/core/src/intelligence/contradiction-detector.ts +0 -134
  248. package/packages/core/src/intelligence/decay-engine.ts +0 -229
  249. package/packages/core/src/intelligence/duplicate-detector.ts +0 -71
  250. package/packages/core/src/intelligence/fsrs.ts +0 -79
  251. package/packages/core/src/intelligence/gap-detector.ts +0 -109
  252. package/packages/core/src/intelligence/learning-path.ts +0 -86
  253. package/packages/core/src/intelligence/notifications.ts +0 -106
  254. package/packages/core/src/intelligence/predictive-gaps.ts +0 -94
  255. package/packages/core/src/intelligence/semantic-versioning.ts +0 -97
  256. package/packages/core/src/intelligence/types.ts +0 -28
  257. package/packages/core/src/mcp/custom-tools.ts +0 -97
  258. package/packages/core/src/mcp/server.ts +0 -142
  259. package/packages/core/src/mcp/tools/agentic-graph.ts +0 -96
  260. package/packages/core/src/mcp/tools/brief.ts +0 -49
  261. package/packages/core/src/mcp/tools/decay.ts +0 -40
  262. package/packages/core/src/mcp/tools/decision-journal.ts +0 -95
  263. package/packages/core/src/mcp/tools/export.ts +0 -72
  264. package/packages/core/src/mcp/tools/federated-search.ts +0 -43
  265. package/packages/core/src/mcp/tools/generate-claude-md.ts +0 -130
  266. package/packages/core/src/mcp/tools/get-document.ts +0 -26
  267. package/packages/core/src/mcp/tools/get-related.ts +0 -41
  268. package/packages/core/src/mcp/tools/learning-path.ts +0 -52
  269. package/packages/core/src/mcp/tools/list-topics.ts +0 -20
  270. package/packages/core/src/mcp/tools/search.ts +0 -35
  271. package/packages/core/src/mcp/tools/snapshot.ts +0 -98
  272. package/packages/core/src/multi-vault/index.ts +0 -118
  273. package/packages/core/src/pack/creator.ts +0 -127
  274. package/packages/core/src/pack/exporter.ts +0 -21
  275. package/packages/core/src/pack/importer.ts +0 -82
  276. package/packages/core/src/pack/marketplace.ts +0 -103
  277. package/packages/core/src/pack/pii-masker.ts +0 -38
  278. package/packages/core/src/pack/types.ts +0 -39
  279. package/packages/core/src/plugins/index.ts +0 -100
  280. package/packages/core/src/plugins/webhooks.ts +0 -110
  281. package/packages/core/src/search/bm25.ts +0 -16
  282. package/packages/core/src/search/index.ts +0 -83
  283. package/packages/core/src/search/rrf.ts +0 -31
  284. package/packages/core/src/search/semantic.ts +0 -15
  285. package/packages/core/src/store/sqlite-vec.ts +0 -290
  286. package/packages/core/src/store/types.ts +0 -22
  287. package/packages/core/src/team/index.ts +0 -126
  288. package/packages/core/src/types/chunk.ts +0 -25
  289. package/packages/core/src/types/document.ts +0 -24
  290. package/packages/core/src/types/graph.ts +0 -44
  291. package/packages/core/src/types/index.ts +0 -15
  292. package/packages/core/src/types/search.ts +0 -38
  293. package/packages/core/src/utils/retry.ts +0 -85
  294. package/packages/core/tests/api-card.test.ts +0 -60
  295. package/packages/core/tests/api-routes.test.ts +0 -98
  296. package/packages/core/tests/bm25.test.ts +0 -87
  297. package/packages/core/tests/chunker.test.ts +0 -48
  298. package/packages/core/tests/cluster.test.ts +0 -75
  299. package/packages/core/tests/constellation.test.ts +0 -77
  300. package/packages/core/tests/export-utils.test.ts +0 -97
  301. package/packages/core/tests/fsrs.test.ts +0 -96
  302. package/packages/core/tests/gesture-detector.test.ts +0 -45
  303. package/packages/core/tests/graph-data.test.ts +0 -87
  304. package/packages/core/tests/layout.test.ts +0 -83
  305. package/packages/core/tests/mcp.test.ts +0 -148
  306. package/packages/core/tests/pack.test.ts +0 -127
  307. package/packages/core/tests/pii-masker.test.ts +0 -42
  308. package/packages/core/tests/profile-card.test.ts +0 -62
  309. package/packages/core/tests/rrf.test.ts +0 -29
  310. package/packages/core/tests/search-integration.test.ts +0 -139
  311. package/packages/core/tests/store.test.ts +0 -80
  312. package/packages/graph/click-result.png +0 -0
  313. package/packages/graph/dist/assets/camera_utils-BMxqtvoZ.js +0 -1
  314. package/packages/graph/dist/assets/hands-DXA01_mx.js +0 -18
  315. package/packages/graph/dist/assets/index-DMEe2diW.js +0 -4192
  316. package/packages/graph/dist/assets/layout.worker-DbKCEFTz.js +0 -1
  317. package/packages/graph/dist/index.html +0 -17
  318. package/packages/graph/index.html +0 -17
  319. package/packages/graph/package.json +0 -32
  320. package/packages/graph/src/App.tsx +0 -7
  321. package/packages/graph/src/api/client.ts +0 -39
  322. package/packages/graph/src/components/ClusterFilter.tsx +0 -73
  323. package/packages/graph/src/components/ConstellationView.tsx +0 -232
  324. package/packages/graph/src/components/ExportPanel.tsx +0 -177
  325. package/packages/graph/src/components/Graph3D.tsx +0 -230
  326. package/packages/graph/src/components/GraphEdges.tsx +0 -100
  327. package/packages/graph/src/components/GraphNodes.tsx +0 -386
  328. package/packages/graph/src/components/HealthDashboard.tsx +0 -173
  329. package/packages/graph/src/components/Layout.tsx +0 -214
  330. package/packages/graph/src/components/MotionOverlay.tsx +0 -81
  331. package/packages/graph/src/components/MotionToggle.tsx +0 -33
  332. package/packages/graph/src/components/MultiverseView.tsx +0 -286
  333. package/packages/graph/src/components/NodeDetail.tsx +0 -232
  334. package/packages/graph/src/components/PulseParticle.tsx +0 -232
  335. package/packages/graph/src/components/SearchBar.tsx +0 -107
  336. package/packages/graph/src/components/StarField.tsx +0 -197
  337. package/packages/graph/src/components/StatusBar.tsx +0 -53
  338. package/packages/graph/src/components/Timeline.tsx +0 -148
  339. package/packages/graph/src/components/ToolsPanel.tsx +0 -512
  340. package/packages/graph/src/components/Tooltip.tsx +0 -100
  341. package/packages/graph/src/components/TypeFilter.tsx +0 -131
  342. package/packages/graph/src/embed/EmbedGraph.tsx +0 -144
  343. package/packages/graph/src/hooks/useConstellationLOD.ts +0 -76
  344. package/packages/graph/src/hooks/useDecay.ts +0 -37
  345. package/packages/graph/src/hooks/useExport.ts +0 -165
  346. package/packages/graph/src/hooks/useGraph.ts +0 -69
  347. package/packages/graph/src/hooks/useKeyboardNav.ts +0 -122
  348. package/packages/graph/src/hooks/useLayout.ts +0 -45
  349. package/packages/graph/src/hooks/useMotion.ts +0 -120
  350. package/packages/graph/src/hooks/usePulse.ts +0 -58
  351. package/packages/graph/src/hooks/useSearch.ts +0 -71
  352. package/packages/graph/src/lib/constellation.ts +0 -107
  353. package/packages/graph/src/lib/export-utils.ts +0 -48
  354. package/packages/graph/src/lib/gesture-detector.ts +0 -123
  355. package/packages/graph/src/lib/layout.worker.ts +0 -153
  356. package/packages/graph/src/lib/motion-controller.ts +0 -83
  357. package/packages/graph/src/lib/profile-card.ts +0 -122
  358. package/packages/graph/src/main.tsx +0 -4
  359. package/packages/graph/src/stores/graph-store.ts +0 -155
  360. package/packages/graph/success.png +0 -0
  361. package/packages/graph/test-click.mjs +0 -49
  362. package/packages/graph/test-explore.mjs +0 -102
  363. package/packages/graph/test-final.mjs +0 -61
  364. package/packages/graph/test-graph.mjs +0 -139
  365. package/packages/graph/test-hover.mjs +0 -48
  366. package/packages/graph/test-pulse.mjs +0 -68
  367. package/packages/graph/test-screenshot.mjs +0 -56
  368. package/packages/graph/test-v2.mjs +0 -97
  369. package/packages/graph/tsconfig.tsbuildinfo +0 -1
  370. package/packages/graph/vite.config.ts +0 -15
  371. package/packages/sync/.env.example +0 -11
  372. package/packages/sync/.sync-state.json +0 -317
  373. package/packages/sync/.upload-state.json +0 -1009
  374. package/packages/sync/create-stella-network-notion.mjs +0 -151
  375. package/packages/sync/create-stellavault-project-notion.mjs +0 -322
  376. package/packages/sync/logs/sync-2026-03-28.log +0 -6
  377. package/packages/sync/logs/sync-2026-03-29.log +0 -12
  378. package/packages/sync/logs/sync-2026-03-30.log +0 -6
  379. package/packages/sync/logs/sync-2026-03-31.log +0 -6
  380. package/packages/sync/logs/sync-2026-04-01.log +0 -6
  381. package/packages/sync/logs/sync-2026-04-02.log +0 -6
  382. package/packages/sync/package-lock.json +0 -373
  383. package/packages/sync/package.json +0 -16
  384. package/packages/sync/run-sync.bat +0 -18
  385. package/packages/sync/run-sync.mjs +0 -46
  386. package/packages/sync/setup-scheduler.mjs +0 -119
  387. package/packages/sync/structured-sync.mjs +0 -187
  388. package/packages/sync/sync-to-obsidian.mjs +0 -264
  389. package/packages/sync/upload-pdca-to-notion.mjs +0 -495
  390. package/tsconfig.base.json +0 -18
@@ -1,512 +0,0 @@
1
- // Intelligence Tools 패널 — Gaps, Duplicates, Clip, Review 통합 UI
2
-
3
- import { useState } from 'react';
4
- import { useGraphStore } from '../stores/graph-store.js';
5
- import { HealthDashboard } from './HealthDashboard.js';
6
-
7
- interface GapData {
8
- clusterA: string; clusterB: string; bridgeCount: number;
9
- suggestedTopic: string; severity: string;
10
- }
11
-
12
- interface DuplicatePair {
13
- docA: { id: string; title: string; filePath: string };
14
- docB: { id: string; title: string; filePath: string };
15
- similarity: number;
16
- }
17
-
18
- interface DecayNote {
19
- documentId: string; title: string; retrievability: number;
20
- stability: number; daysSinceAccess: number;
21
- }
22
-
23
- type Tab = 'gaps' | 'duplicates' | 'decay' | 'clip' | 'sync' | 'health';
24
-
25
- export function ToolsPanel() {
26
- const [isOpen, setIsOpen] = useState(false);
27
- const [tab, setTab] = useState<Tab>('gaps');
28
- const [loading, setLoading] = useState(false);
29
-
30
- // Data states
31
- const [gaps, setGaps] = useState<GapData[]>([]);
32
- const [isolatedCount, setIsolatedCount] = useState(0);
33
- const [duplicates, setDuplicates] = useState<DuplicatePair[]>([]);
34
- const [decayNotes, setDecayNotes] = useState<DecayNote[]>([]);
35
- const [clipUrl, setClipUrl] = useState('');
36
- const [clipStatus, setClipStatus] = useState('');
37
- const [syncStatus, setSyncStatus] = useState('');
38
-
39
- const theme = useGraphStore((s) => s.theme);
40
- const isDark = theme === 'dark';
41
-
42
- const bg = isDark ? 'rgba(10, 12, 28, 0.95)' : 'rgba(255, 255, 255, 0.97)';
43
- const border = isDark ? 'rgba(100, 120, 255, 0.2)' : 'rgba(0, 0, 0, 0.1)';
44
- const textPrimary = isDark ? '#c0c0f0' : '#2a2a4a';
45
- const textSecondary = isDark ? '#667' : '#888';
46
- const btnBg = isDark ? 'rgba(100,120,255,0.1)' : 'rgba(0,0,0,0.04)';
47
- const btnBorder = isDark ? 'rgba(100,120,255,0.2)' : 'rgba(0,0,0,0.1)';
48
-
49
- async function loadGaps() {
50
- setLoading(true);
51
- try {
52
- const res = await fetch('http://127.0.0.1:3333/api/gaps');
53
- const data = await res.json();
54
- setGaps(data.gaps ?? []);
55
- setIsolatedCount(data.isolatedNodes?.length ?? 0);
56
- } catch { setGaps([]); }
57
- setLoading(false);
58
- }
59
-
60
- async function loadDuplicates() {
61
- setLoading(true);
62
- try {
63
- const res = await fetch('http://127.0.0.1:3333/api/duplicates');
64
- const data = await res.json();
65
- setDuplicates(data.pairs ?? []);
66
- } catch { setDuplicates([]); }
67
- setLoading(false);
68
- }
69
-
70
- async function loadDecay() {
71
- setLoading(true);
72
- try {
73
- const res = await fetch('http://127.0.0.1:3333/api/decay');
74
- const data = await res.json();
75
- setDecayNotes(data.topDecaying ?? []);
76
- } catch { setDecayNotes([]); }
77
- setLoading(false);
78
- }
79
-
80
- function handleTabClick(t: Tab) {
81
- setTab(t);
82
- if (t === 'gaps' && gaps.length === 0) loadGaps();
83
- if (t === 'duplicates' && duplicates.length === 0) loadDuplicates();
84
- if (t === 'decay' && decayNotes.length === 0) loadDecay();
85
- }
86
-
87
- if (!isOpen) {
88
- return (
89
- <button
90
- onClick={() => { setIsOpen(true); handleTabClick('gaps'); }}
91
- style={{
92
- position: 'fixed', left: '16px', bottom: '40px',
93
- background: btnBg, border: `1px solid ${btnBorder}`,
94
- borderRadius: '8px', padding: '8px 14px',
95
- color: textPrimary, fontSize: '11px', cursor: 'pointer',
96
- zIndex: 100, backdropFilter: 'blur(8px)',
97
- boxShadow: isDark ? 'none' : '0 2px 8px rgba(0,0,0,0.06)',
98
- }}
99
- >
100
- Intelligence
101
- </button>
102
- );
103
- }
104
-
105
- const tabStyle = (t: Tab) => ({
106
- padding: '4px 10px', fontSize: '10px', border: 'none', borderRadius: '4px',
107
- cursor: 'pointer' as const,
108
- background: tab === t ? (isDark ? 'rgba(100,120,255,0.2)' : 'rgba(0,0,0,0.08)') : 'transparent',
109
- color: tab === t ? textPrimary : textSecondary,
110
- fontWeight: tab === t ? 600 : 400 as any,
111
- });
112
-
113
- const severityIcon = (s: string) => s === 'high' ? '🔴' : s === 'medium' ? '🟡' : '🟢';
114
-
115
- return (
116
- <div style={{
117
- position: 'fixed', left: '16px', bottom: '40px',
118
- width: '340px', maxHeight: '70vh',
119
- background: bg, border: `1px solid ${border}`,
120
- borderRadius: '10px', zIndex: 100,
121
- backdropFilter: 'blur(12px)',
122
- boxShadow: isDark ? 'none' : '0 4px 20px rgba(0,0,0,0.08)',
123
- display: 'flex', flexDirection: 'column',
124
- }}>
125
- {/* Header */}
126
- <div style={{
127
- padding: '10px 14px', display: 'flex', justifyContent: 'space-between',
128
- alignItems: 'center', borderBottom: `1px solid ${border}`,
129
- }}>
130
- <span style={{ fontSize: '12px', fontWeight: 600, color: textPrimary }}>
131
- Intelligence
132
- </span>
133
- <button onClick={() => setIsOpen(false)} style={{
134
- background: 'none', border: 'none', color: textSecondary,
135
- cursor: 'pointer', fontSize: '14px',
136
- }}>x</button>
137
- </div>
138
-
139
- {/* Tabs */}
140
- <div style={{
141
- display: 'flex', gap: '2px', padding: '6px 10px',
142
- borderBottom: `1px solid ${border}`,
143
- }}>
144
- <button onClick={() => handleTabClick('gaps')} style={tabStyle('gaps')}>Gaps</button>
145
- <button onClick={() => handleTabClick('duplicates')} style={tabStyle('duplicates')}>Duplicates</button>
146
- <button onClick={() => handleTabClick('decay')} style={tabStyle('decay')}>Decay</button>
147
- <button onClick={() => handleTabClick('clip')} style={tabStyle('clip')}>Clip</button>
148
- <button onClick={() => setTab('sync')} style={tabStyle('sync')}>Sync</button>
149
- <button onClick={() => setTab('health')} style={tabStyle('health')}>Health</button>
150
- </div>
151
-
152
- {/* Content */}
153
- <div style={{ flex: 1, overflowY: 'auto', padding: '10px 14px' }}>
154
- {loading && <div style={{ color: textSecondary, fontSize: '11px' }}>Loading...</div>}
155
-
156
- {/* Gaps Tab */}
157
- {tab === 'gaps' && !loading && (
158
- <div>
159
- <div style={{ fontSize: '10px', color: textSecondary, marginBottom: '8px', display: 'flex', justifyContent: 'space-between' }}>
160
- <span>{gaps.length}개 갭 | {isolatedCount}개 고립 노드</span>
161
- <span>
162
- <button onClick={() => autoCreateBridges()} style={{
163
- background: 'none', border: 'none',
164
- color: isDark ? '#10b981' : '#047857', cursor: 'pointer', fontSize: '10px',
165
- }}>전체 자동 생성</button>
166
- <button onClick={loadGaps} style={{
167
- marginLeft: '6px', background: 'none', border: 'none',
168
- color: isDark ? '#88aaff' : '#4466aa', cursor: 'pointer', fontSize: '10px',
169
- }}>새로고침</button>
170
- </span>
171
- </div>
172
- {gaps.map((g, i) => (
173
- <div key={i} style={{
174
- padding: '6px 8px', marginBottom: '4px', borderRadius: '4px',
175
- background: isDark ? 'rgba(255,255,255,0.02)' : 'rgba(0,0,0,0.02)',
176
- fontSize: '11px',
177
- }}>
178
- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
179
- <span style={{ color: textPrimary }}>
180
- {severityIcon(g.severity)} {g.clusterA.replace(/\s*\(\d+\)$/, '')} ↔ {g.clusterB.replace(/\s*\(\d+\)$/, '')}
181
- </span>
182
- <button onClick={() => createGapNote(g)} style={{
183
- background: 'none', border: 'none', color: isDark ? '#88aaff' : '#4466aa',
184
- cursor: 'pointer', fontSize: '9px',
185
- }}>노트 생성</button>
186
- </div>
187
- <div style={{ color: textSecondary, fontSize: '10px', marginTop: '2px' }}>
188
- 연결 {g.bridgeCount}개 · {g.suggestedTopic}
189
- </div>
190
- </div>
191
- ))}
192
- {gaps.length === 0 && <div style={{ color: textSecondary, fontSize: '11px' }}>갭이 없습니다!</div>}
193
- </div>
194
- )}
195
-
196
- {/* Duplicates Tab */}
197
- {tab === 'duplicates' && !loading && (
198
- <div>
199
- <div style={{ fontSize: '10px', color: textSecondary, marginBottom: '8px', display: 'flex', justifyContent: 'space-between' }}>
200
- <span>{duplicates.length}쌍 발견</span>
201
- <span>
202
- <button onClick={loadDuplicates} style={{
203
- background: 'none', border: 'none',
204
- color: isDark ? '#88aaff' : '#4466aa', cursor: 'pointer', fontSize: '10px',
205
- }}>새로고침</button>
206
- </span>
207
- </div>
208
- {duplicates.map((d, i) => (
209
- <div key={i} style={{
210
- padding: '6px 8px', marginBottom: '4px', borderRadius: '4px',
211
- background: isDark ? 'rgba(255,255,255,0.02)' : 'rgba(0,0,0,0.02)',
212
- fontSize: '11px',
213
- }}>
214
- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
215
- <span style={{ color: Math.round(d.similarity * 100) >= 95 ? '#ef4444' : (isDark ? '#ffaa44' : '#aa6600') }}>
216
- {Math.round(d.similarity * 100)}% 유사
217
- </span>
218
- <span>
219
- <button onClick={() => mergeDuplicate(d)} style={{
220
- background: 'none', border: 'none', color: isDark ? '#10b981' : '#047857',
221
- cursor: 'pointer', fontSize: '9px', marginRight: '4px',
222
- }}>병합</button>
223
- <button onClick={() => openInObsidian(d.docA.filePath)} style={{
224
- background: 'none', border: 'none', color: isDark ? '#88aaff' : '#4466aa',
225
- cursor: 'pointer', fontSize: '9px',
226
- }}>열기</button>
227
- </span>
228
- </div>
229
- <div style={{ color: textPrimary, fontSize: '10px', cursor: 'pointer' }}
230
- onClick={() => openInObsidian(d.docA.filePath)}>
231
- {d.docA.title}
232
- </div>
233
- <div style={{ color: textSecondary, fontSize: '10px', cursor: 'pointer' }}
234
- onClick={() => openInObsidian(d.docB.filePath)}>
235
- ↔ {d.docB.title}
236
- </div>
237
- </div>
238
- ))}
239
- {duplicates.length === 0 && <div style={{ color: textSecondary, fontSize: '11px' }}>중복 없음!</div>}
240
- </div>
241
- )}
242
-
243
- {/* Decay Tab */}
244
- {tab === 'decay' && !loading && (
245
- <div>
246
- <div style={{ fontSize: '10px', color: textSecondary, marginBottom: '8px' }}>
247
- 잊어가는 노트 {decayNotes.length}개
248
- <button onClick={loadDecay} style={{
249
- marginLeft: '8px', background: 'none', border: 'none',
250
- color: isDark ? '#88aaff' : '#4466aa', cursor: 'pointer', fontSize: '10px',
251
- }}>새로고침</button>
252
- </div>
253
- {decayNotes.map((d, i) => {
254
- const rPct = Math.round(d.retrievability * 100);
255
- const barW = rPct;
256
- const barColor = rPct < 30 ? '#ef4444' : rPct < 50 ? '#f59e0b' : '#10b981';
257
- return (
258
- <div key={i} style={{
259
- padding: '6px 8px', marginBottom: '4px', borderRadius: '4px',
260
- background: isDark ? 'rgba(255,255,255,0.02)' : 'rgba(0,0,0,0.02)',
261
- fontSize: '11px',
262
- }}>
263
- <div style={{ display: 'flex', justifyContent: 'space-between' }}>
264
- <span style={{ color: textPrimary }}>{d.title}</span>
265
- <span style={{ color: textSecondary, fontSize: '10px' }}>{d.daysSinceAccess}d</span>
266
- </div>
267
- <div style={{
268
- marginTop: '3px', height: '3px', borderRadius: '2px',
269
- background: isDark ? 'rgba(255,255,255,0.05)' : 'rgba(0,0,0,0.05)',
270
- }}>
271
- <div style={{
272
- width: `${barW}%`, height: '100%', borderRadius: '2px',
273
- background: barColor,
274
- }} />
275
- </div>
276
- </div>
277
- );
278
- })}
279
- {decayNotes.length === 0 && <div style={{ color: textSecondary, fontSize: '11px' }}>모든 지식이 건강!</div>}
280
- </div>
281
- )}
282
-
283
- {/* Clip Tab */}
284
- {tab === 'clip' && (
285
- <div>
286
- <div style={{ fontSize: '10px', color: textSecondary, marginBottom: '8px' }}>
287
- URL을 입력하면 Obsidian vault에 저장됩니다
288
- </div>
289
- <div style={{ display: 'flex', gap: '4px' }}>
290
- <input
291
- value={clipUrl}
292
- onChange={(e) => setClipUrl(e.target.value)}
293
- placeholder="https://..."
294
- style={{
295
- flex: 1, padding: '5px 8px', fontSize: '11px',
296
- background: isDark ? 'rgba(255,255,255,0.05)' : 'rgba(0,0,0,0.03)',
297
- border: `1px solid ${border}`, borderRadius: '4px',
298
- color: textPrimary, outline: 'none',
299
- }}
300
- onKeyDown={(e) => {
301
- if (e.key === 'Enter' && clipUrl) handleClip();
302
- }}
303
- />
304
- <button
305
- onClick={handleClip}
306
- disabled={!clipUrl || loading}
307
- style={{
308
- padding: '5px 10px', fontSize: '10px',
309
- background: isDark ? 'rgba(100,120,255,0.15)' : 'rgba(80,100,200,0.08)',
310
- border: `1px solid ${btnBorder}`, borderRadius: '4px',
311
- color: isDark ? '#88aaff' : '#4466aa', cursor: 'pointer',
312
- }}
313
- >Clip</button>
314
- </div>
315
- {clipStatus && (
316
- <div style={{
317
- marginTop: '6px', fontSize: '10px', padding: '6px 8px',
318
- borderRadius: '4px',
319
- background: clipStatus.startsWith('✅')
320
- ? (isDark ? 'rgba(16,185,129,0.1)' : 'rgba(16,185,129,0.06)')
321
- : (isDark ? 'rgba(239,68,68,0.1)' : 'rgba(239,68,68,0.06)'),
322
- color: clipStatus.startsWith('✅')
323
- ? (isDark ? '#10b981' : '#047857')
324
- : (isDark ? '#ef4444' : '#dc2626'),
325
- }}>
326
- {clipStatus}
327
- </div>
328
- )}
329
- </div>
330
- )}
331
- {/* Health Tab */}
332
- {tab === 'health' && <HealthDashboard />}
333
-
334
- {/* Sync Tab */}
335
- {tab === 'sync' && (
336
- <div>
337
- <div style={{ fontSize: '10px', color: textSecondary, marginBottom: '10px' }}>
338
- Notion 프로젝트 페이지를 Obsidian vault로 동기화합니다.
339
- 증분 동기화 — 변경된 페이지만 업데이트.
340
- </div>
341
- <button
342
- onClick={handleSync}
343
- disabled={loading}
344
- style={{
345
- width: '100%', padding: '8px', fontSize: '11px',
346
- background: isDark ? 'rgba(100,120,255,0.12)' : 'rgba(80,100,200,0.08)',
347
- border: `1px solid ${btnBorder}`, borderRadius: '5px',
348
- color: isDark ? '#88aaff' : '#4466aa',
349
- cursor: loading ? 'wait' : 'pointer',
350
- }}
351
- >
352
- {loading ? 'Syncing...' : 'Notion → Obsidian 동기화'}
353
- </button>
354
- {syncStatus && (
355
- <div style={{
356
- marginTop: '8px', fontSize: '10px', padding: '6px 8px',
357
- borderRadius: '4px',
358
- background: syncStatus.startsWith('✅')
359
- ? (isDark ? 'rgba(16,185,129,0.1)' : 'rgba(16,185,129,0.06)')
360
- : (isDark ? 'rgba(239,68,68,0.1)' : 'rgba(239,68,68,0.06)'),
361
- color: syncStatus.startsWith('✅')
362
- ? (isDark ? '#10b981' : '#047857')
363
- : (isDark ? '#ef4444' : '#dc2626'),
364
- }}>
365
- {syncStatus}
366
- </div>
367
- )}
368
- <div style={{ marginTop: '10px', fontSize: '10px', color: textSecondary }}>
369
- 동기화 후 `stellavault index`로 재인덱싱하면 검색에 반영됩니다.
370
- </div>
371
- </div>
372
- )}
373
- </div>
374
- </div>
375
- );
376
-
377
- async function mergeDuplicate(pair: DuplicatePair) {
378
- if (!confirm(`"${pair.docB.title}"을 "${pair.docA.title}"에 병합하고 삭제합니다. 계속?`)) return;
379
- setLoading(true);
380
- try {
381
- const res = await fetch('http://127.0.0.1:3333/api/duplicates/merge', {
382
- method: 'POST',
383
- headers: { 'Content-Type': 'application/json' },
384
- body: JSON.stringify({ docAId: pair.docA.id, docBId: pair.docB.id }),
385
- });
386
- const data = await res.json();
387
- if (data.success) {
388
- setDuplicates(prev => prev.filter(d => d.docA.id !== pair.docA.id || d.docB.id !== pair.docB.id));
389
- }
390
- } catch {}
391
- setLoading(false);
392
- }
393
-
394
- async function autoCreateBridges() {
395
- const highGaps = gaps.filter(g => g.severity === 'high');
396
- if (highGaps.length === 0) { alert('High 심각도 갭이 없습니다'); return; }
397
- if (!confirm(`${highGaps.length}개 High 갭에 대해 브릿지 노트를 자동 생성합니다. 계속?`)) return;
398
-
399
- setLoading(true);
400
- let created = 0;
401
- for (const gap of highGaps) {
402
- try {
403
- const res = await fetch('http://127.0.0.1:3333/api/gaps/create-bridge', {
404
- method: 'POST',
405
- headers: { 'Content-Type': 'application/json' },
406
- body: JSON.stringify({ clusterA: gap.clusterA, clusterB: gap.clusterB }),
407
- });
408
- const data = await res.json();
409
- if (data.success) created++;
410
- } catch {}
411
- }
412
- alert(`${created}/${highGaps.length}개 브릿지 노트 생성 완료`);
413
- setLoading(false);
414
- loadGaps(); // 새로고침
415
- }
416
-
417
- async function openInObsidian(filePath: string) {
418
- let vault = 'Evan';
419
- try {
420
- const res = await fetch('http://127.0.0.1:3333/api/stats');
421
- const stats = await res.json();
422
- if (stats.vaultName) vault = stats.vaultName;
423
- } catch {}
424
- const relFile = filePath.replace(/\\/g, '/').replace(/\.md$/, '');
425
- window.location.href = `obsidian://open?vault=${encodeURIComponent(vault)}&file=${encodeURIComponent(relFile)}`;
426
- }
427
-
428
- async function createGapNote(gap: GapData) {
429
- const nameA = gap.clusterA.replace(/\s*\(\d+\)$/, '');
430
- const nameB = gap.clusterB.replace(/\s*\(\d+\)$/, '');
431
- const title = `${nameA} × ${nameB}`;
432
- const content = `# ${title}\n\n> 이 노트는 지식 갭 탐지기에 의해 생성되었습니다.\n> ${nameA}와 ${nameB} 사이의 연결 지식을 정리하세요.\n\n## 관련 주제\n\n- ${nameA}\n- ${nameB}\n\n## 내용\n\n`;
433
-
434
- try {
435
- const res = await fetch('http://127.0.0.1:3333/api/clip', {
436
- method: 'POST',
437
- headers: { 'Content-Type': 'application/json' },
438
- body: JSON.stringify({ url: `gap://${title}` }),
439
- });
440
- // clip API는 URL용이라 직접 파일 생성
441
- } catch {}
442
-
443
- // Obsidian URI로 새 노트 생성
444
- let vault = 'Evan';
445
- try {
446
- const r = await fetch('http://127.0.0.1:3333/api/stats');
447
- const s = await r.json();
448
- if (s.vaultName) vault = s.vaultName;
449
- } catch {}
450
-
451
- const uri = `obsidian://new?vault=${encodeURIComponent(vault)}&name=${encodeURIComponent(`01_Knowledge/${title}`)}&content=${encodeURIComponent(content)}`;
452
- window.location.href = uri;
453
- }
454
-
455
- async function handleSync() {
456
- setLoading(true);
457
- setSyncStatus('⏳ 동기화 시작 중...');
458
- try {
459
- const res = await fetch('http://127.0.0.1:3333/api/sync', { method: 'POST' });
460
- const data = await res.json();
461
- if (!data.success) {
462
- setSyncStatus(`❌ ${data.error || 'Failed'}`);
463
- setLoading(false);
464
- return;
465
- }
466
-
467
- setSyncStatus('🔄 동기화 진행 중...');
468
- // 완료될 때까지 2초마다 상태 확인
469
- const poll = setInterval(async () => {
470
- try {
471
- const sr = await fetch('http://127.0.0.1:3333/api/sync/status');
472
- const state = await sr.json();
473
- if (!state.running) {
474
- clearInterval(poll);
475
- setLoading(false);
476
- if (state.result === 'success') {
477
- setSyncStatus(`✅ 동기화 완료! ${state.output.match(/\d+개 페이지/)?.[0] || ''}`);
478
- } else {
479
- setSyncStatus(`❌ 동기화 실패: ${state.output.slice(-100)}`);
480
- }
481
- }
482
- } catch { clearInterval(poll); setLoading(false); }
483
- }, 2000);
484
- } catch {
485
- setSyncStatus('❌ 서버 연결 실패');
486
- setLoading(false);
487
- }
488
- }
489
-
490
- async function handleClip() {
491
- if (!clipUrl) return;
492
- setLoading(true);
493
- setClipStatus('');
494
- try {
495
- const res = await fetch('http://127.0.0.1:3333/api/clip', {
496
- method: 'POST',
497
- headers: { 'Content-Type': 'application/json' },
498
- body: JSON.stringify({ url: clipUrl }),
499
- });
500
- const data = await res.json();
501
- if (data.success) {
502
- setClipStatus(`✅ ${data.fileName} 저장됨`);
503
- setClipUrl('');
504
- } else {
505
- setClipStatus(`❌ ${data.error || 'Failed'}`);
506
- }
507
- } catch {
508
- setClipStatus('❌ 서버 연결 실패');
509
- }
510
- setLoading(false);
511
- }
512
- }
@@ -1,100 +0,0 @@
1
- // 호버 툴팁 + 선택 시 연결 노드 라벨 표시
2
-
3
- import { useMemo } from 'react';
4
- import { Html } from '@react-three/drei';
5
- import { useGraphStore } from '../stores/graph-store.js';
6
-
7
- const PALETTE = [
8
- '#818cf8', '#f472b6', '#fbbf24', '#34d399', '#60a5fa',
9
- '#fb7185', '#2dd4bf', '#a3e635', '#fb923c', '#a78bfa',
10
- '#14b8a6', '#e879f9', '#38bdf8', '#facc15', '#f87171',
11
- ];
12
-
13
- export function Tooltip() {
14
- const nodes = useGraphStore((s) => s.nodes);
15
- const edges = useGraphStore((s) => s.edges);
16
- const hoveredNodeId = useGraphStore((s) => s.hoveredNodeId);
17
- const selectedNodeId = useGraphStore((s) => s.selectedNodeId);
18
-
19
- // 선택된 노드의 이웃 ID
20
- const connectedNodes = useMemo(() => {
21
- if (!selectedNodeId) return [];
22
- const ids = new Set<string>();
23
- for (const e of edges) {
24
- if (e.source === selectedNodeId) ids.add(e.target);
25
- if (e.target === selectedNodeId) ids.add(e.source);
26
- }
27
- return nodes.filter(n => ids.has(n.id) && n.position);
28
- }, [selectedNodeId, edges, nodes]);
29
-
30
- const hoveredNode = hoveredNodeId ? nodes.find(n => n.id === hoveredNodeId) : null;
31
-
32
- return (
33
- <>
34
- {/* 호버 툴팁 (기존) */}
35
- {hoveredNode && hoveredNode.position && (
36
- <Html
37
- position={hoveredNode.position}
38
- center
39
- style={{ pointerEvents: 'none' }}
40
- zIndexRange={[100, 0]}
41
- >
42
- <div style={{
43
- background: 'rgba(10, 10, 20, 0.9)',
44
- border: '1px solid rgba(100, 120, 255, 0.3)',
45
- borderRadius: '8px',
46
- padding: '8px 12px',
47
- maxWidth: '250px',
48
- backdropFilter: 'blur(8px)',
49
- transform: 'translateY(-40px)',
50
- }}>
51
- <div style={{ fontSize: '13px', fontWeight: 600, color: '#e0e0f0', marginBottom: '4px', lineHeight: 1.3 }}>
52
- {hoveredNode.label}
53
- </div>
54
- {hoveredNode.tags.length > 0 && (
55
- <div style={{ display: 'flex', gap: '4px', flexWrap: 'wrap', marginBottom: '4px' }}>
56
- {hoveredNode.tags.slice(0, 3).map((tag) => (
57
- <span key={tag} style={{ fontSize: '10px', color: '#88aaff', background: 'rgba(100, 120, 255, 0.15)', padding: '1px 6px', borderRadius: '4px' }}>
58
- #{tag}
59
- </span>
60
- ))}
61
- </div>
62
- )}
63
- <div style={{ fontSize: '10px', color: '#666' }}>{hoveredNode.filePath}</div>
64
- </div>
65
- </Html>
66
- )}
67
-
68
- {/* 선택 시 연결 노드 라벨 */}
69
- {connectedNodes.map((node) => (
70
- <Html
71
- key={node.id}
72
- position={node.position!}
73
- center
74
- style={{ pointerEvents: 'none' }}
75
- zIndexRange={[90, 0]}
76
- >
77
- <div style={{
78
- background: 'rgba(10, 10, 20, 0.75)',
79
- border: `1px solid ${PALETTE[node.clusterId % PALETTE.length]}40`,
80
- borderRadius: '5px',
81
- padding: '3px 8px',
82
- transform: 'translateY(-25px)',
83
- whiteSpace: 'nowrap',
84
- maxWidth: '180px',
85
- overflow: 'hidden',
86
- textOverflow: 'ellipsis',
87
- }}>
88
- <span style={{
89
- fontSize: '10px',
90
- color: PALETTE[node.clusterId % PALETTE.length],
91
- fontWeight: 500,
92
- }}>
93
- {node.label}
94
- </span>
95
- </div>
96
- </Html>
97
- ))}
98
- </>
99
- );
100
- }