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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellavault",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Turn your Obsidian vault into a 3D neural knowledge graph with AI-powered search, memory decay tracking, and MCP integration.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env node
2
- import '../dist/index.js';
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js';
@@ -2,7 +2,7 @@
2
2
  // Plan SC: SC1-SC5
3
3
  import { createInterface } from 'node:readline';
4
4
  import chalk from 'chalk';
5
- import { loadConfig, createSqliteVecStore, createLocalEmbedder, FederationNode, FederatedSearch, getOrCreateIdentity, getSharingSummary, addBlockedTag, removeBlockedTag, addBlockedFolder, loadSharingConfig, saveSharingConfig, } from '@stellavault/core';
5
+ import { loadConfig, createSqliteVecStore, createLocalEmbedder, FederationNode, FederatedSearch, getOrCreateIdentity, getSharingSummary, setTagLevel, setFolderLevel, setNodeLevel, getPendingRequests, approveRequest, denyRequest, } from '@stellavault/core';
6
6
  export async function federateJoinCommand(options) {
7
7
  const config = loadConfig();
8
8
  const identity = getOrCreateIdentity(options.name);
@@ -118,46 +118,74 @@ export async function federateJoinCommand(options) {
118
118
  console.log('');
119
119
  break;
120
120
  }
121
- case 'block-tag': {
121
+ case 'set-tag': {
122
122
  const tag = parts[1];
123
- if (!tag) {
124
- console.log(chalk.yellow(' Usage: block-tag <tag>'));
123
+ const lvl = parseInt(parts[2], 10);
124
+ if (!tag || isNaN(lvl) || lvl < 0 || lvl > 4) {
125
+ console.log(chalk.yellow(' Usage: set-tag <tag> <0-4>'));
125
126
  break;
126
127
  }
127
- addBlockedTag(tag);
128
- console.log(chalk.green(` Blocked tag: #${tag}`));
128
+ setTagLevel(tag, lvl);
129
+ console.log(chalk.green(` #${tag} → Level ${lvl}`));
129
130
  break;
130
131
  }
131
- case 'unblock-tag': {
132
- const tag = parts[1];
133
- if (!tag) {
134
- console.log(chalk.yellow(' Usage: unblock-tag <tag>'));
132
+ case 'set-folder': {
133
+ const folder = parts[1];
134
+ const lvl = parseInt(parts[2], 10);
135
+ if (!folder || isNaN(lvl) || lvl < 0 || lvl > 4) {
136
+ console.log(chalk.yellow(' Usage: set-folder <folder> <0-4>'));
135
137
  break;
136
138
  }
137
- removeBlockedTag(tag);
138
- console.log(chalk.green(` Unblocked tag: #${tag}`));
139
+ setFolderLevel(folder, lvl);
140
+ console.log(chalk.green(` ${folder} Level ${lvl}`));
139
141
  break;
140
142
  }
141
- case 'block-folder': {
142
- const folder = parts[1];
143
- if (!folder) {
144
- console.log(chalk.yellow(' Usage: block-folder <folder>'));
143
+ case 'set-level': {
144
+ const lvl = parseInt(parts[1], 10);
145
+ if (isNaN(lvl) || lvl < 0 || lvl > 4) {
146
+ console.log(chalk.yellow(' Usage: set-level <0-4> (your node sharing level)'));
147
+ break;
148
+ }
149
+ setNodeLevel(lvl);
150
+ console.log(chalk.green(` My node level → ${lvl}`));
151
+ break;
152
+ }
153
+ case 'requests': {
154
+ const pending = getPendingRequests();
155
+ if (pending.length === 0) {
156
+ console.log(chalk.dim(' No pending requests'));
157
+ break;
158
+ }
159
+ console.log(`\n ${pending.length} pending full-text requests:`);
160
+ for (const r of pending) {
161
+ console.log(` ${r.requestId.slice(0, 8)} — "${r.documentTitle}" from ${r.fromName} (${r.requestedAt.slice(0, 10)})`);
162
+ }
163
+ break;
164
+ }
165
+ case 'approve': {
166
+ const reqId = parts[1];
167
+ if (!reqId) {
168
+ console.log(chalk.yellow(' Usage: approve <request-id>'));
145
169
  break;
146
170
  }
147
- addBlockedFolder(folder);
148
- console.log(chalk.green(` Blocked folder: ${folder}`));
171
+ const match = getPendingRequests().find(r => r.requestId.startsWith(reqId));
172
+ if (match && approveRequest(match.requestId))
173
+ console.log(chalk.green(` Approved: ${match.documentTitle}`));
174
+ else
175
+ console.log(chalk.red(' Request not found'));
149
176
  break;
150
177
  }
151
- case 'mode': {
152
- const mode = parts[1];
153
- if (mode !== 'whitelist' && mode !== 'blacklist') {
154
- console.log(chalk.yellow(' Usage: mode whitelist|blacklist'));
178
+ case 'deny': {
179
+ const reqId = parts[1];
180
+ if (!reqId) {
181
+ console.log(chalk.yellow(' Usage: deny <request-id>'));
155
182
  break;
156
183
  }
157
- const cfg = loadSharingConfig();
158
- cfg.mode = mode;
159
- saveSharingConfig(cfg);
160
- console.log(chalk.green(` Sharing mode: ${mode}`));
184
+ const match = getPendingRequests().find(r => r.requestId.startsWith(reqId));
185
+ if (match && denyRequest(match.requestId))
186
+ console.log(chalk.green(` Denied: ${match.documentTitle}`));
187
+ else
188
+ console.log(chalk.red(' Request not found'));
161
189
  break;
162
190
  }
163
191
  case 'leave':
@@ -177,11 +205,13 @@ export async function federateJoinCommand(options) {
177
205
  console.log(` ${chalk.cyan('peers')} List connected peers`);
178
206
  console.log(` ${chalk.cyan('status')} Show node info`);
179
207
  console.log(` ${chalk.cyan('connect <ip:port>')} Connect to peer directly`);
180
- console.log(` ${chalk.cyan('sharing')} Show sharing settings`);
181
- console.log(` ${chalk.cyan('block-tag <tag>')} Block a tag from sharing`);
182
- console.log(` ${chalk.cyan('unblock-tag <tag>')} Unblock a tag`);
183
- console.log(` ${chalk.cyan('block-folder <f>')} Block a folder from sharing`);
184
- console.log(` ${chalk.cyan('mode <wl|bl>')} Set whitelist or blacklist mode`);
208
+ console.log(` ${chalk.cyan('sharing')} Show sharing settings`);
209
+ console.log(` ${chalk.cyan('set-tag <t> <0-4>')} Set tag sharing level`);
210
+ console.log(` ${chalk.cyan('set-folder <f> <0-4>')} Set folder sharing level`);
211
+ console.log(` ${chalk.cyan('set-level <0-4>')} Set your node level`);
212
+ console.log(` ${chalk.cyan('requests')} Show pending full-text requests`);
213
+ console.log(` ${chalk.cyan('approve <id>')} Approve a request`);
214
+ console.log(` ${chalk.cyan('deny <id>')} Deny a request`);
185
215
  console.log(` ${chalk.cyan('leave')} Disconnect and exit`);
186
216
  break;
187
217
  }
@@ -0,0 +1,3 @@
1
+ import type { Express } from 'express';
2
+ export declare function mountDashboard(app: Express): void;
3
+ //# sourceMappingURL=dashboard.d.ts.map
@@ -1,17 +1,13 @@
1
1
  // Web Dashboard (P3-F26) — Express에 HTML 대시보드 추가
2
2
  // http://localhost:3333/dashboard
3
-
4
- import type { Express } from 'express';
5
-
6
- export function mountDashboard(app: Express) {
7
- app.get('/dashboard', (_req, res) => {
8
- res.setHeader('Content-Type', 'text/html');
9
- res.send(getDashboardHTML());
10
- });
3
+ export function mountDashboard(app) {
4
+ app.get('/dashboard', (_req, res) => {
5
+ res.setHeader('Content-Type', 'text/html');
6
+ res.send(getDashboardHTML());
7
+ });
11
8
  }
12
-
13
- function getDashboardHTML(): string {
14
- return `<!DOCTYPE html>
9
+ function getDashboardHTML() {
10
+ return `<!DOCTYPE html>
15
11
  <html lang="en">
16
12
  <head>
17
13
  <meta charset="UTF-8">
@@ -136,3 +132,4 @@ function getDashboardHTML(): string {
136
132
  </body>
137
133
  </html>`;
138
134
  }
135
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1,11 @@
1
+ import type { VectorStore } from '../store/types.js';
2
+ import type { GraphData } from '../types/graph.js';
3
+ export type GraphMode = 'semantic' | 'folder';
4
+ export interface BuildGraphOptions {
5
+ mode?: GraphMode;
6
+ edgeThreshold?: number;
7
+ maxEdgesPerNode?: number;
8
+ clusterCount?: number;
9
+ }
10
+ export declare function buildGraphData(store: VectorStore, options?: BuildGraphOptions): Promise<GraphData>;
11
+ //# sourceMappingURL=graph-data.d.ts.map
@@ -0,0 +1,255 @@
1
+ // Design Ref: §4.2 — Graph Data 생성 알고리즘
2
+ // Design Ref: §6.2 — K-Means 클러스터링
3
+ import { createHash } from 'node:crypto';
4
+ const CLUSTER_COLORS = [
5
+ '#6366f1', '#ec4899', '#f59e0b', '#10b981', '#3b82f6',
6
+ '#8b5cf6', '#ef4444', '#14b8a6', '#f97316', '#06b6d4',
7
+ '#84cc16', '#e879f9', '#22d3ee', '#a3e635', '#fb923c',
8
+ ];
9
+ export async function buildGraphData(store, options = {}) {
10
+ const { edgeThreshold = 0.15, maxEdgesPerNode = 5, } = options;
11
+ // 1. 모든 문서 + 임베딩 로드
12
+ const [docs, embeddings] = await Promise.all([
13
+ store.getAllDocuments(),
14
+ store.getDocumentEmbeddings(),
15
+ ]);
16
+ // 2. k-NN으로 엣지 생성
17
+ const edges = [];
18
+ const edgeCounts = new Map();
19
+ for (const doc of docs) {
20
+ const vec = embeddings.get(doc.id);
21
+ if (!vec)
22
+ continue;
23
+ // 모든 다른 문서와 코사인 유사도 계산
24
+ const similarities = [];
25
+ for (const other of docs) {
26
+ if (other.id === doc.id)
27
+ continue;
28
+ const otherVec = embeddings.get(other.id);
29
+ if (!otherVec)
30
+ continue;
31
+ const sim = cosineSimilarity(vec, otherVec);
32
+ if (sim >= edgeThreshold) {
33
+ similarities.push({ id: other.id, sim });
34
+ }
35
+ }
36
+ // 상위 k개만
37
+ similarities.sort((a, b) => b.sim - a.sim);
38
+ const topK = similarities.slice(0, maxEdgesPerNode);
39
+ for (const { id: targetId, sim } of topK) {
40
+ // 중복 엣지 방지 (A→B, B→A)
41
+ const edgeKey = [doc.id, targetId].sort().join(':');
42
+ if (!edgeCounts.has(edgeKey)) {
43
+ edges.push({ source: doc.id, target: targetId, weight: sim });
44
+ edgeCounts.set(edgeKey, 1);
45
+ }
46
+ }
47
+ }
48
+ // 3. 클러스터링 — 모드에 따라 분기
49
+ const mode = options.mode ?? 'semantic';
50
+ let assignmentMap;
51
+ let clusters;
52
+ if (mode === 'folder') {
53
+ // 폴더 기반: 최상위 폴더를 클러스터로 사용
54
+ const folderMap = new Map();
55
+ const folderNames = [];
56
+ for (const doc of docs) {
57
+ const topFolder = doc.filePath.split('/')[0] ?? 'root';
58
+ if (!folderMap.has(topFolder)) {
59
+ folderMap.set(topFolder, folderNames.length);
60
+ folderNames.push(topFolder);
61
+ }
62
+ }
63
+ assignmentMap = new Map();
64
+ for (const doc of docs) {
65
+ const topFolder = doc.filePath.split('/')[0] ?? 'root';
66
+ assignmentMap.set(doc.id, folderMap.get(topFolder));
67
+ }
68
+ // 폴더별 클러스터
69
+ const folderCounts = new Map();
70
+ for (const [, cId] of assignmentMap) {
71
+ folderCounts.set(cId, (folderCounts.get(cId) ?? 0) + 1);
72
+ }
73
+ clusters = folderNames.map((name, i) => ({
74
+ id: i,
75
+ label: name.replace(/^\d+_/, ''), // "04_Projects" → "Projects"
76
+ color: CLUSTER_COLORS[i % CLUSTER_COLORS.length],
77
+ nodeCount: folderCounts.get(i) ?? 0,
78
+ }));
79
+ }
80
+ else {
81
+ // 시맨틱 기반: K-means
82
+ const docIds = docs.filter(d => embeddings.has(d.id)).map(d => d.id);
83
+ const vectors = docIds.map(id => embeddings.get(id));
84
+ const k = Math.min(Math.max(5, Math.round(Math.sqrt(docIds.length / 5))), 10);
85
+ const assignments = kMeans(vectors, k);
86
+ // 클러스터별 문서 수집 (id + title)
87
+ const clusterDocInfos = new Map();
88
+ for (let i = 0; i < docIds.length; i++) {
89
+ const cId = assignments[i];
90
+ if (!clusterDocInfos.has(cId))
91
+ clusterDocInfos.set(cId, []);
92
+ const doc = docs.find(d => d.id === docIds[i]);
93
+ if (doc)
94
+ clusterDocInfos.get(cId).push({ id: doc.id, title: doc.title });
95
+ }
96
+ // 엣지 기반 연결 수 계산 (대표 노드 선정용)
97
+ const connCounts = new Map();
98
+ for (const e of edges) {
99
+ connCounts.set(e.source, (connCounts.get(e.source) ?? 0) + 1);
100
+ connCounts.set(e.target, (connCounts.get(e.target) ?? 0) + 1);
101
+ }
102
+ clusters = [];
103
+ for (const [cId, docInfos] of clusterDocInfos) {
104
+ // 가장 연결이 많은 노드 = 대표 노드
105
+ const sorted = [...docInfos].sort((a, b) => (connCounts.get(b.id) ?? 0) - (connCounts.get(a.id) ?? 0));
106
+ const representative = sorted[0]?.title ?? 'Cluster';
107
+ clusters.push({
108
+ id: cId,
109
+ label: `${representative} (${docInfos.length})`,
110
+ color: CLUSTER_COLORS[cId % CLUSTER_COLORS.length],
111
+ nodeCount: docInfos.length,
112
+ });
113
+ }
114
+ assignmentMap = new Map();
115
+ for (let i = 0; i < docIds.length; i++) {
116
+ assignmentMap.set(docIds[i], assignments[i]);
117
+ }
118
+ }
119
+ // 4. 노드 생성
120
+ const connectionCounts = new Map();
121
+ for (const edge of edges) {
122
+ connectionCounts.set(edge.source, (connectionCounts.get(edge.source) ?? 0) + 1);
123
+ connectionCounts.set(edge.target, (connectionCounts.get(edge.target) ?? 0) + 1);
124
+ }
125
+ const maxConnections = Math.max(1, ...connectionCounts.values());
126
+ const nodes = docs.map(doc => {
127
+ const conns = connectionCounts.get(doc.id) ?? 0;
128
+ const ratio = conns / maxConnections; // 0~1
129
+ // 지수 스케일: 상위 노드만 극적으로 커짐 (ratio^0.5 → 중심부 강조)
130
+ const size = 1 + 6 * Math.pow(ratio, 0.5);
131
+ return {
132
+ id: doc.id,
133
+ label: doc.title.slice(0, 40),
134
+ filePath: doc.filePath,
135
+ tags: doc.tags,
136
+ clusterId: assignmentMap.get(doc.id) ?? 0,
137
+ size,
138
+ source: doc.source ?? 'local',
139
+ type: doc.type ?? 'note',
140
+ lastModified: doc.lastModified,
141
+ };
142
+ });
143
+ // 5. cache key
144
+ const cacheKey = createHash('md5')
145
+ .update(JSON.stringify({ nodeCount: nodes.length, edgeCount: edges.length }))
146
+ .digest('hex')
147
+ .slice(0, 8);
148
+ return {
149
+ nodes,
150
+ edges,
151
+ clusters,
152
+ stats: {
153
+ nodeCount: nodes.length,
154
+ edgeCount: edges.length,
155
+ clusterCount: clusters.length,
156
+ },
157
+ };
158
+ }
159
+ // --- 유틸리티 ---
160
+ function cosineSimilarity(a, b) {
161
+ let dot = 0, normA = 0, normB = 0;
162
+ for (let i = 0; i < a.length; i++) {
163
+ dot += a[i] * b[i];
164
+ normA += a[i] * a[i];
165
+ normB += b[i] * b[i];
166
+ }
167
+ const denom = Math.sqrt(normA) * Math.sqrt(normB);
168
+ return denom === 0 ? 0 : dot / denom;
169
+ }
170
+ function kMeans(vectors, k, maxIter = 50) {
171
+ if (vectors.length === 0)
172
+ return [];
173
+ const dims = vectors[0].length;
174
+ // K-means++ 초기화
175
+ const centroids = [vectors[Math.floor(Math.random() * vectors.length)].slice()];
176
+ for (let c = 1; c < k; c++) {
177
+ const dists = vectors.map(v => {
178
+ let minD = Infinity;
179
+ for (const cent of centroids) {
180
+ const d = euclideanDist(v, cent);
181
+ if (d < minD)
182
+ minD = d;
183
+ }
184
+ return minD;
185
+ });
186
+ const totalDist = dists.reduce((a, b) => a + b, 0);
187
+ let r = Math.random() * totalDist;
188
+ for (let i = 0; i < dists.length; i++) {
189
+ r -= dists[i];
190
+ if (r <= 0) {
191
+ centroids.push(vectors[i].slice());
192
+ break;
193
+ }
194
+ }
195
+ if (centroids.length <= c)
196
+ centroids.push(vectors[Math.floor(Math.random() * vectors.length)].slice());
197
+ }
198
+ const assignments = new Array(vectors.length).fill(0);
199
+ for (let iter = 0; iter < maxIter; iter++) {
200
+ let changed = false;
201
+ // Assign
202
+ for (let i = 0; i < vectors.length; i++) {
203
+ let bestC = 0, bestD = Infinity;
204
+ for (let c = 0; c < k; c++) {
205
+ const d = euclideanDist(vectors[i], centroids[c]);
206
+ if (d < bestD) {
207
+ bestD = d;
208
+ bestC = c;
209
+ }
210
+ }
211
+ if (assignments[i] !== bestC) {
212
+ assignments[i] = bestC;
213
+ changed = true;
214
+ }
215
+ }
216
+ if (!changed)
217
+ break;
218
+ // Update centroids
219
+ for (let c = 0; c < k; c++) {
220
+ const members = vectors.filter((_, i) => assignments[i] === c);
221
+ if (members.length === 0)
222
+ continue;
223
+ for (let d = 0; d < dims; d++) {
224
+ centroids[c][d] = members.reduce((sum, v) => sum + v[d], 0) / members.length;
225
+ }
226
+ }
227
+ }
228
+ return assignments;
229
+ }
230
+ function euclideanDist(a, b) {
231
+ let sum = 0;
232
+ for (let i = 0; i < a.length; i++) {
233
+ const diff = a[i] - b[i];
234
+ sum += diff * diff;
235
+ }
236
+ return Math.sqrt(sum);
237
+ }
238
+ function extractClusterLabel(titles) {
239
+ // 제목에서 빈출 단어 추출 (2글자 이상)
240
+ const wordCounts = new Map();
241
+ const stopWords = new Set(['the', 'a', 'an', 'in', 'on', 'at', 'to', 'for', 'of', 'and', 'or', 'is', 'are', 'was', 'be']);
242
+ for (const title of titles) {
243
+ const words = title.replace(/[^\w가-힣\s]/g, '').split(/\s+/).filter(w => w.length >= 2 && !stopWords.has(w.toLowerCase()));
244
+ const seen = new Set();
245
+ for (const w of words) {
246
+ if (!seen.has(w)) {
247
+ wordCounts.set(w, (wordCounts.get(w) ?? 0) + 1);
248
+ seen.add(w);
249
+ }
250
+ }
251
+ }
252
+ const sorted = [...wordCounts.entries()].sort((a, b) => b[1] - a[1]);
253
+ return sorted.slice(0, 3).map(([w]) => w).join(', ') || `Cluster`;
254
+ }
255
+ //# sourceMappingURL=graph-data.js.map
@@ -0,0 +1,3 @@
1
+ import type { Express } from 'express';
2
+ export declare function mountPWA(app: Express): void;
3
+ //# sourceMappingURL=pwa.d.ts.map
@@ -1,39 +1,33 @@
1
1
  // Mobile PWA (P3-F27) — 서비스 워커 + PWA manifest 제공
2
2
  // Express에 PWA 지원 추가
3
-
4
- import type { Express } from 'express';
5
-
6
- export function mountPWA(app: Express) {
7
- // PWA Manifest
8
- app.get('/manifest.json', (_req, res) => {
9
- res.json({
10
- name: 'Stellavault',
11
- short_name: 'SV',
12
- description: 'Your knowledge, alive.',
13
- start_url: '/dashboard',
14
- display: 'standalone',
15
- background_color: '#050510',
16
- theme_color: '#6366f1',
17
- icons: [
18
- { src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
19
- { src: '/icon-512.png', sizes: '512x512', type: 'image/png' },
20
- ],
3
+ export function mountPWA(app) {
4
+ // PWA Manifest
5
+ app.get('/manifest.json', (_req, res) => {
6
+ res.json({
7
+ name: 'Stellavault',
8
+ short_name: 'SV',
9
+ description: 'Your knowledge, alive.',
10
+ start_url: '/dashboard',
11
+ display: 'standalone',
12
+ background_color: '#050510',
13
+ theme_color: '#6366f1',
14
+ icons: [
15
+ { src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
16
+ { src: '/icon-512.png', sizes: '512x512', type: 'image/png' },
17
+ ],
18
+ });
21
19
  });
22
- });
23
-
24
- // Service Worker
25
- app.get('/sw.js', (_req, res) => {
26
- res.setHeader('Content-Type', 'application/javascript');
27
- res.send(getServiceWorkerJS());
28
- });
29
-
30
- // SVG icon fallback (no PNG needed for MVP)
31
- app.get('/icon-192.png', (_req, res) => { res.redirect('/api/profile-card'); });
32
- app.get('/icon-512.png', (_req, res) => { res.redirect('/api/profile-card'); });
20
+ // Service Worker
21
+ app.get('/sw.js', (_req, res) => {
22
+ res.setHeader('Content-Type', 'application/javascript');
23
+ res.send(getServiceWorkerJS());
24
+ });
25
+ // SVG icon fallback (no PNG needed for MVP)
26
+ app.get('/icon-192.png', (_req, res) => { res.redirect('/api/profile-card'); });
27
+ app.get('/icon-512.png', (_req, res) => { res.redirect('/api/profile-card'); });
33
28
  }
34
-
35
- function getServiceWorkerJS(): string {
36
- return `
29
+ function getServiceWorkerJS() {
30
+ return `
37
31
  const CACHE_NAME = 'stellavault-v1';
38
32
  const STATIC_ASSETS = ['/dashboard', '/manifest.json'];
39
33
 
@@ -80,3 +74,4 @@ self.addEventListener('fetch', (event) => {
80
74
  });
81
75
  `.trim();
82
76
  }
77
+ //# sourceMappingURL=pwa.js.map
@@ -0,0 +1,16 @@
1
+ import type { VectorStore } from '../store/types.js';
2
+ import type { SearchEngine } from '../search/index.js';
3
+ import type { DecayEngine } from '../intelligence/decay-engine.js';
4
+ export interface ApiServerOptions {
5
+ store: VectorStore;
6
+ searchEngine: SearchEngine;
7
+ port?: number;
8
+ vaultName?: string;
9
+ vaultPath?: string;
10
+ decayEngine?: DecayEngine;
11
+ }
12
+ export declare function createApiServer(options: ApiServerOptions): {
13
+ start(): Promise<void>;
14
+ app: import("express-serve-static-core").Express;
15
+ };
16
+ //# sourceMappingURL=server.d.ts.map