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
@@ -1,495 +0,0 @@
1
- /**
2
- * 로컬 PDCA 문서 → 노션 자동 업로드 스크립트
3
- *
4
- * 기능:
5
- * - 각 프로젝트의 docs/ 폴더를 스캔
6
- * - .md 파일을 Notion API로 업로드
7
- * - 프로젝트별 "📄 PDCA 원본" 하위 페이지에 정리
8
- * - 이미 업로드된 문서는 파일 수정일 비교 후 변경 시 업데이트
9
- * - 업로드 상태를 .upload-state.json에 저장 (증분 업로드)
10
- *
11
- * 사용법: node upload-pdca-to-notion.mjs
12
- * 환경변수: .env 파일 참조
13
- */
14
-
15
- import { Client } from '@notionhq/client';
16
- import fs from 'fs';
17
- import path from 'path';
18
- import { fileURLToPath } from 'url';
19
-
20
- const __filename = fileURLToPath(import.meta.url);
21
- const __dirname = path.dirname(__filename);
22
-
23
- // ─── 환경변수 로드 ───
24
- function loadEnv() {
25
- const envPath = path.join(__dirname, '.env');
26
- if (!fs.existsSync(envPath)) {
27
- console.error('❌ .env 파일이 없습니다. .env.example을 복사하여 .env를 만들어주세요.');
28
- process.exit(1);
29
- }
30
- const lines = fs.readFileSync(envPath, 'utf-8').split('\n');
31
- for (const line of lines) {
32
- const trimmed = line.trim();
33
- if (!trimmed || trimmed.startsWith('#')) continue;
34
- const eqIdx = trimmed.indexOf('=');
35
- if (eqIdx === -1) continue;
36
- const key = trimmed.slice(0, eqIdx).trim();
37
- const value = trimmed.slice(eqIdx + 1).trim();
38
- if (!process.env[key]) process.env[key] = value;
39
- }
40
- }
41
- loadEnv();
42
-
43
- // ─── 설정 ───
44
- const NOTION_API_KEY = process.env.NOTION_API_KEY;
45
- const ROOT_PAGE_ID = process.env.NOTION_ROOT_PAGE_ID;
46
- const PROJECT_PATHS = (process.env.PROJECT_PATHS || '').split(',').map(p => p.trim()).filter(Boolean);
47
- const STATE_FILE = path.join(__dirname, '.upload-state.json');
48
-
49
- if (!NOTION_API_KEY || !ROOT_PAGE_ID) {
50
- console.error('❌ NOTION_API_KEY와 NOTION_ROOT_PAGE_ID가 필요합니다.');
51
- process.exit(1);
52
- }
53
- if (PROJECT_PATHS.length === 0) {
54
- console.error('❌ PROJECT_PATHS가 설정되지 않았습니다.');
55
- process.exit(1);
56
- }
57
-
58
- const notion = new Client({ auth: NOTION_API_KEY });
59
-
60
- // ─── 업로드 상태 관리 (증분 업로드용) ───
61
- function loadUploadState() {
62
- if (fs.existsSync(STATE_FILE)) {
63
- return JSON.parse(fs.readFileSync(STATE_FILE, 'utf-8'));
64
- }
65
- return { lastUpload: null, files: {} };
66
- }
67
-
68
- function saveUploadState(state) {
69
- state.lastUpload = new Date().toISOString();
70
- fs.writeFileSync(STATE_FILE, JSON.stringify(state, null, 2), 'utf-8');
71
- }
72
-
73
- // ─── 프로젝트 이름 → 노션 페이지 매핑 ───
74
- const PROJECT_NAME_MAP = {
75
- 'ai_destiny': 'AI Destiny',
76
- 'project-manager': 'Project Manager',
77
- 'stock_analist_beta': 'Stokova',
78
- 'stock-autotrade': 'Quantrism',
79
- 'vibevonweb': 'Vibevonweb',
80
- 'TEST': '클로드 코드 마스터 가이드',
81
- };
82
-
83
- // PDCA 폴더 구조 → 노션 카테고리 매핑
84
- const PHASE_MAP = {
85
- '00-pm': '📋 PM 분석',
86
- '01-plan': '📝 Plan (계획)',
87
- '02-design': '📐 Design (설계)',
88
- '03-analysis': '🔍 Analysis (검증)',
89
- '04-report': '📊 Report (보고)',
90
- };
91
-
92
- // ─── 노션에서 프로젝트 하위 페이지 ID 찾기 ───
93
- async function findProjectPages(rootPageId) {
94
- const pageMap = {};
95
- let cursor = undefined;
96
-
97
- while (true) {
98
- const response = await notion.blocks.children.list({
99
- block_id: rootPageId,
100
- start_cursor: cursor,
101
- page_size: 100,
102
- });
103
-
104
- for (const block of response.results) {
105
- if (block.type === 'child_page') {
106
- pageMap[block.child_page.title] = block.id;
107
- }
108
- }
109
-
110
- if (!response.has_more) break;
111
- cursor = response.next_cursor;
112
- }
113
-
114
- return pageMap;
115
- }
116
-
117
- // ─── "PDCA 원본" 컨테이너 페이지 찾기 또는 생성 ───
118
- async function findOrCreateContainer(parentPageId, title) {
119
- let cursor = undefined;
120
- while (true) {
121
- const response = await notion.blocks.children.list({
122
- block_id: parentPageId,
123
- start_cursor: cursor,
124
- page_size: 100,
125
- });
126
-
127
- for (const block of response.results) {
128
- if (block.type === 'child_page' && block.child_page.title === title) {
129
- return block.id;
130
- }
131
- }
132
-
133
- if (!response.has_more) break;
134
- cursor = response.next_cursor;
135
- }
136
-
137
- // 없으면 생성
138
- const page = await notion.pages.create({
139
- parent: { page_id: parentPageId },
140
- icon: { emoji: '📂' },
141
- properties: {
142
- title: [{ text: { content: title } }],
143
- },
144
- children: [
145
- {
146
- object: 'block',
147
- type: 'callout',
148
- callout: {
149
- icon: { emoji: '📄' },
150
- color: 'blue_background',
151
- rich_text: [{ text: { content: `${title} — 로컬 PDCA 문서 원본이 자동 업로드됩니다.` } }],
152
- },
153
- },
154
- ],
155
- });
156
-
157
- return page.id;
158
- }
159
-
160
- // ─── Phase 컨테이너 찾기 또는 생성 ───
161
- async function findOrCreatePhaseContainer(parentPageId, phaseDir) {
162
- const phaseName = PHASE_MAP[phaseDir] || phaseDir;
163
- return findOrCreateContainer(parentPageId, phaseName);
164
- }
165
-
166
- // ─── 마크다운을 Notion 블록으로 변환 ───
167
- function markdownToNotionBlocks(markdown, fileName) {
168
- const blocks = [];
169
-
170
- // 파일 정보 callout
171
- blocks.push({
172
- object: 'block',
173
- type: 'callout',
174
- callout: {
175
- icon: { emoji: '📄' },
176
- color: 'gray_background',
177
- rich_text: [{ text: { content: `원본 파일: ${fileName}\n마지막 업로드: ${new Date().toISOString().slice(0, 10)}` } }],
178
- },
179
- });
180
-
181
- // 구분선
182
- blocks.push({ object: 'block', type: 'divider', divider: {} });
183
-
184
- // 마크다운 내용을 2000자 단위로 분할 (Notion API rich_text 제한)
185
- const MAX_LEN = 2000;
186
- const chunks = [];
187
- let remaining = markdown;
188
-
189
- while (remaining.length > 0) {
190
- if (remaining.length <= MAX_LEN) {
191
- chunks.push(remaining);
192
- break;
193
- }
194
- let splitIdx = remaining.lastIndexOf('\n', MAX_LEN);
195
- if (splitIdx === -1 || splitIdx < MAX_LEN * 0.5) splitIdx = MAX_LEN;
196
- chunks.push(remaining.slice(0, splitIdx));
197
- remaining = remaining.slice(splitIdx);
198
- }
199
-
200
- for (const chunk of chunks) {
201
- blocks.push({
202
- object: 'block',
203
- type: 'code',
204
- code: {
205
- language: 'markdown',
206
- rich_text: [{ text: { content: chunk } }],
207
- },
208
- });
209
- }
210
-
211
- return blocks;
212
- }
213
-
214
- // ─── 기존 페이지 찾기 (ID 반환, 없으면 null) ───
215
- async function findExistingPage(parentPageId, title) {
216
- let cursor = undefined;
217
- while (true) {
218
- const response = await notion.blocks.children.list({
219
- block_id: parentPageId,
220
- start_cursor: cursor,
221
- page_size: 100,
222
- });
223
-
224
- for (const block of response.results) {
225
- if (block.type === 'child_page' && block.child_page.title === title) {
226
- return block.id;
227
- }
228
- }
229
-
230
- if (!response.has_more) break;
231
- cursor = response.next_cursor;
232
- }
233
- return null;
234
- }
235
-
236
- // ─── 기존 페이지의 모든 블록 삭제 ───
237
- async function clearPageContent(pageId) {
238
- let cursor = undefined;
239
- const blockIds = [];
240
-
241
- while (true) {
242
- const response = await notion.blocks.children.list({
243
- block_id: pageId,
244
- start_cursor: cursor,
245
- page_size: 100,
246
- });
247
-
248
- for (const block of response.results) {
249
- blockIds.push(block.id);
250
- }
251
-
252
- if (!response.has_more) break;
253
- cursor = response.next_cursor;
254
- }
255
-
256
- // 각 블록 삭제
257
- for (const blockId of blockIds) {
258
- try {
259
- await notion.blocks.delete({ block_id: blockId });
260
- await new Promise(r => setTimeout(r, 400));
261
- } catch {
262
- // 이미 삭제된 블록은 무시
263
- }
264
- }
265
- }
266
-
267
- // ─── API 호출 재시도 래퍼 (rate limit 대응) ───
268
- async function withRetry(fn, maxRetries = 3) {
269
- for (let attempt = 1; attempt <= maxRetries; attempt++) {
270
- try {
271
- return await fn();
272
- } catch (err) {
273
- if (err.status === 429 && attempt < maxRetries) {
274
- const waitSec = Math.pow(2, attempt) * 2;
275
- console.log(` ⏳ Rate limit — ${waitSec}초 대기 후 재시도 (${attempt}/${maxRetries})`);
276
- await new Promise(r => setTimeout(r, waitSec * 1000));
277
- } else if (attempt < maxRetries && err.status >= 500) {
278
- await new Promise(r => setTimeout(r, 3000));
279
- } else {
280
- throw err;
281
- }
282
- }
283
- }
284
- }
285
-
286
- // ─── 단일 문서 업로드 또는 업데이트 ───
287
- async function uploadDocument(parentPageId, filePath, fileName, state) {
288
- const title = fileName.replace(/\.md$/, '');
289
- const fileStat = fs.statSync(filePath);
290
- const fileModified = fileStat.mtimeMs;
291
- const stateKey = filePath.replace(/\\/g, '/');
292
-
293
- // 파일 수정일 비교 — 변경 없으면 스킵
294
- if (state.files[stateKey] && state.files[stateKey].modified >= fileModified) {
295
- return 'skip';
296
- }
297
-
298
- const markdown = fs.readFileSync(filePath, 'utf-8');
299
- const blocks = markdownToNotionBlocks(markdown, fileName);
300
-
301
- const existingPageId = await findExistingPage(parentPageId, title);
302
-
303
- if (existingPageId) {
304
- // 기존 페이지 업데이트: 내용 삭제 후 다시 추가
305
- await clearPageContent(existingPageId);
306
- await new Promise(r => setTimeout(r, 500));
307
-
308
- // 블록 추가 (100개 단위, 재시도 포함)
309
- for (let i = 0; i < blocks.length; i += 100) {
310
- const batch = blocks.slice(i, i + 100);
311
- await withRetry(() => notion.blocks.children.append({
312
- block_id: existingPageId,
313
- children: batch,
314
- }));
315
- await new Promise(r => setTimeout(r, 500));
316
- }
317
-
318
- // 상태 저장
319
- state.files[stateKey] = { modified: fileModified, pageId: existingPageId };
320
- return 'updated';
321
- }
322
-
323
- // 새 페이지 생성
324
- const firstBatch = blocks.slice(0, 100);
325
- const page = await withRetry(() => notion.pages.create({
326
- parent: { page_id: parentPageId },
327
- icon: { emoji: '📄' },
328
- properties: {
329
- title: [{ text: { content: title } }],
330
- },
331
- children: firstBatch,
332
- }));
333
-
334
- // 나머지 블록 추가
335
- for (let i = 100; i < blocks.length; i += 100) {
336
- const batch = blocks.slice(i, i + 100);
337
- await withRetry(() => notion.blocks.children.append({
338
- block_id: page.id,
339
- children: batch,
340
- }));
341
- await new Promise(r => setTimeout(r, 500));
342
- }
343
-
344
- // 상태 저장
345
- state.files[stateKey] = { modified: fileModified, pageId: page.id };
346
- return 'uploaded';
347
- }
348
-
349
- // ─── 프로젝트 하나 처리 ───
350
- async function processProject(projectPath, projectPageId, state) {
351
- const docsDir = path.join(projectPath, 'docs');
352
-
353
- if (!fs.existsSync(docsDir)) {
354
- console.log(` ⚠️ docs/ 폴더 없음 — 스킵`);
355
- return { uploaded: 0, updated: 0, skipped: 0 };
356
- }
357
-
358
- // "PDCA 원본" 컨테이너 찾기/생성
359
- const containerPageId = await findOrCreateContainer(projectPageId, '📄 PDCA 원본');
360
- await new Promise(r => setTimeout(r, 500));
361
-
362
- let uploaded = 0;
363
- let updated = 0;
364
- let skipped = 0;
365
-
366
- // docs/ 하위 디렉토리 순회
367
- const entries = fs.readdirSync(docsDir, { withFileTypes: true });
368
-
369
- for (const entry of entries) {
370
- if (!entry.isDirectory()) {
371
- // docs/ 루트의 .md 파일
372
- if (entry.name.endsWith('.md')) {
373
- const filePath = path.join(docsDir, entry.name);
374
- const result = await uploadDocument(containerPageId, filePath, entry.name, state);
375
- if (result === 'uploaded') { console.log(` ✅ ${entry.name}`); uploaded++; }
376
- else if (result === 'updated') { console.log(` 🔄 ${entry.name}`); updated++; }
377
- else { skipped++; }
378
- await new Promise(r => setTimeout(r, 500));
379
- }
380
- continue;
381
- }
382
-
383
- // Phase 디렉토리 (01-plan, 02-design, etc.)
384
- const phaseDir = entry.name;
385
- if (!PHASE_MAP[phaseDir] && phaseDir === 'archive') continue;
386
-
387
- const phaseDirPath = path.join(docsDir, phaseDir);
388
- const phasePageId = await findOrCreatePhaseContainer(containerPageId, phaseDir);
389
- await new Promise(r => setTimeout(r, 500));
390
-
391
- // Phase 디렉토리 내 파일/폴더 순회
392
- const phaseEntries = fs.readdirSync(phaseDirPath, { withFileTypes: true });
393
-
394
- for (const phaseEntry of phaseEntries) {
395
- if (phaseEntry.isFile() && phaseEntry.name.endsWith('.md')) {
396
- const filePath = path.join(phaseDirPath, phaseEntry.name);
397
- const result = await uploadDocument(phasePageId, filePath, phaseEntry.name, state);
398
- if (result === 'uploaded') { console.log(` ✅ ${phaseDir}/${phaseEntry.name}`); uploaded++; }
399
- else if (result === 'updated') { console.log(` 🔄 ${phaseDir}/${phaseEntry.name}`); updated++; }
400
- else { skipped++; }
401
- await new Promise(r => setTimeout(r, 500));
402
- }
403
-
404
- // features/ 하위 디렉토리
405
- if (phaseEntry.isDirectory() && phaseEntry.name === 'features') {
406
- const featuresDir = path.join(phaseDirPath, 'features');
407
- const featureFiles = fs.readdirSync(featuresDir).filter(f => f.endsWith('.md'));
408
-
409
- for (const featureFile of featureFiles) {
410
- const filePath = path.join(featuresDir, featureFile);
411
- const result = await uploadDocument(phasePageId, filePath, featureFile, state);
412
- if (result === 'uploaded') { console.log(` ✅ ${phaseDir}/features/${featureFile}`); uploaded++; }
413
- else if (result === 'updated') { console.log(` 🔄 ${phaseDir}/features/${featureFile}`); updated++; }
414
- else { skipped++; }
415
- await new Promise(r => setTimeout(r, 500));
416
- }
417
- }
418
- }
419
- }
420
-
421
- return { uploaded, updated, skipped };
422
- }
423
-
424
- // ─── 메인 실행 ───
425
- async function main() {
426
- console.log('');
427
- console.log('╔══════════════════════════════════════════════╗');
428
- console.log('║ 📤 로컬 PDCA → 노션 업로드 시작 ║');
429
- console.log('╚══════════════════════════════════════════════╝');
430
- console.log('');
431
-
432
- // 상태 로드
433
- const state = loadUploadState();
434
- if (state.lastUpload) {
435
- console.log(`🕐 마지막 업로드: ${state.lastUpload}`);
436
- } else {
437
- console.log('🆕 첫 업로드 실행');
438
- }
439
-
440
- // 프로젝트 페이지 매핑
441
- console.log('🔍 노션 프로젝트 페이지 검색 중...');
442
- const projectPages = await findProjectPages(ROOT_PAGE_ID);
443
- console.log(` ${Object.keys(projectPages).length}개 프로젝트 발견\n`);
444
-
445
- let totalUploaded = 0;
446
- let totalUpdated = 0;
447
- let totalSkipped = 0;
448
-
449
- for (const projectPath of PROJECT_PATHS) {
450
- const dirName = path.basename(projectPath);
451
- const searchName = PROJECT_NAME_MAP[dirName];
452
-
453
- if (!searchName) {
454
- console.log(`⚠️ ${dirName} — 매핑 없음, 스킵`);
455
- continue;
456
- }
457
-
458
- const matchedTitle = Object.keys(projectPages).find(title =>
459
- title.includes(searchName)
460
- );
461
-
462
- if (!matchedTitle) {
463
- console.log(`⚠️ ${searchName} — 노션 페이지 못 찾음, 스킵`);
464
- continue;
465
- }
466
-
467
- const pageId = projectPages[matchedTitle];
468
- console.log(`📁 ${matchedTitle}`);
469
- console.log(` 경로: ${projectPath}`);
470
-
471
- const result = await processProject(projectPath, pageId, state);
472
- totalUploaded += result.uploaded;
473
- totalUpdated += result.updated;
474
- totalSkipped += result.skipped;
475
-
476
- console.log(` 📊 신규: ${result.uploaded}건, 업데이트: ${result.updated}건, 스킵: ${result.skipped}건\n`);
477
-
478
- // 프로젝트별 중간 상태 저장 (중단 시에도 진행분 보존)
479
- saveUploadState(state);
480
- }
481
-
482
- // 최종 상태 저장
483
- saveUploadState(state);
484
-
485
- console.log('╔══════════════════════════════════════════════╗');
486
- console.log(`║ ✅ 업로드 완료 ║`);
487
- console.log(`║ 📤 신규: ${totalUploaded} | 🔄 업데이트: ${totalUpdated} | ⏭️ 스킵: ${totalSkipped} ║`);
488
- console.log('╚══════════════════════════════════════════════╝');
489
- }
490
-
491
- main().catch(err => {
492
- console.error('❌ 업로드 실패:', err.message);
493
- if (err.body) console.error(' 상세:', err.body);
494
- process.exit(1);
495
- });
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "Node16",
5
- "moduleResolution": "Node16",
6
- "lib": ["ES2022"],
7
- "strict": true,
8
- "esModuleInterop": true,
9
- "skipLibCheck": true,
10
- "forceConsistentCasingInFileNames": true,
11
- "resolveJsonModule": true,
12
- "declaration": true,
13
- "declarationMap": true,
14
- "sourceMap": true,
15
- "outDir": "./dist",
16
- "rootDir": "./src"
17
- }
18
- }