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.
- package/package.json +1 -1
- package/packages/core/dist/api/dashboard.d.ts +3 -0
- package/packages/core/{src/api/dashboard.ts → dist/api/dashboard.js} +8 -11
- package/packages/core/dist/api/graph-data.d.ts +11 -0
- package/packages/core/dist/api/graph-data.js +255 -0
- package/packages/core/dist/api/pwa.d.ts +3 -0
- package/packages/core/{src/api/pwa.ts → dist/api/pwa.js} +27 -32
- package/packages/core/dist/api/server.d.ts +16 -0
- package/packages/core/dist/api/server.js +647 -0
- package/packages/core/dist/capture/voice.d.ts +24 -0
- package/packages/core/dist/capture/voice.js +135 -0
- package/packages/core/{src/cloud/index.ts → dist/cloud/index.d.ts} +1 -0
- package/packages/core/dist/cloud/index.js +2 -0
- package/packages/core/dist/cloud/sync.d.ts +29 -0
- package/packages/core/dist/cloud/sync.js +137 -0
- package/packages/core/dist/config.d.ts +27 -0
- package/packages/core/dist/config.js +55 -0
- package/packages/core/dist/federation/credits.d.ts +26 -0
- package/packages/core/dist/federation/credits.js +56 -0
- package/packages/core/dist/federation/identity.d.ts +14 -0
- package/packages/core/dist/federation/identity.js +74 -0
- package/packages/core/{src/federation/index.ts → dist/federation/index.d.ts} +1 -2
- package/packages/core/dist/federation/index.js +5 -0
- package/packages/core/dist/federation/node.d.ts +31 -0
- package/packages/core/dist/federation/node.js +216 -0
- package/packages/core/dist/federation/privacy.d.ts +8 -0
- package/packages/core/dist/federation/privacy.js +40 -0
- package/packages/core/dist/federation/reputation.d.ts +37 -0
- package/packages/core/dist/federation/reputation.js +139 -0
- package/packages/core/dist/federation/search.d.ts +19 -0
- package/packages/core/dist/federation/search.js +101 -0
- package/packages/core/dist/federation/sharing.d.ts +72 -0
- package/packages/core/dist/federation/sharing.js +246 -0
- package/packages/core/dist/federation/trust.d.ts +15 -0
- package/packages/core/dist/federation/trust.js +60 -0
- package/packages/core/dist/federation/types.d.ts +40 -0
- package/packages/core/dist/federation/types.js +3 -0
- package/packages/core/dist/i18n/index.d.ts +6 -0
- package/packages/core/dist/i18n/index.js +81 -0
- package/packages/core/{src/index.ts → dist/index.d.ts} +46 -65
- package/packages/core/dist/index.js +69 -0
- package/packages/core/dist/indexer/chunker.d.ts +14 -0
- package/packages/core/dist/indexer/chunker.js +148 -0
- package/packages/core/dist/indexer/embedder.d.ts +8 -0
- package/packages/core/dist/indexer/embedder.js +3 -0
- package/packages/core/dist/indexer/index.d.ts +28 -0
- package/packages/core/dist/indexer/index.js +74 -0
- package/packages/core/dist/indexer/local-embedder.d.ts +3 -0
- package/packages/core/dist/indexer/local-embedder.js +29 -0
- package/packages/core/dist/indexer/scanner.d.ts +11 -0
- package/packages/core/dist/indexer/scanner.js +137 -0
- package/packages/core/dist/indexer/watcher.d.ts +19 -0
- package/packages/core/dist/indexer/watcher.js +49 -0
- package/packages/core/dist/intelligence/contradiction-detector.d.ts +20 -0
- package/packages/core/dist/intelligence/contradiction-detector.js +115 -0
- package/packages/core/dist/intelligence/decay-engine.d.ts +27 -0
- package/packages/core/dist/intelligence/decay-engine.js +190 -0
- package/packages/core/dist/intelligence/duplicate-detector.d.ts +20 -0
- package/packages/core/dist/intelligence/duplicate-detector.js +55 -0
- package/packages/core/dist/intelligence/fsrs.d.ts +43 -0
- package/packages/core/dist/intelligence/fsrs.js +70 -0
- package/packages/core/dist/intelligence/gap-detector.d.ts +25 -0
- package/packages/core/dist/intelligence/gap-detector.js +78 -0
- package/packages/core/dist/intelligence/learning-path.d.ts +31 -0
- package/packages/core/dist/intelligence/learning-path.js +53 -0
- package/packages/core/dist/intelligence/notifications.d.ts +31 -0
- package/packages/core/dist/intelligence/notifications.js +65 -0
- package/packages/core/dist/intelligence/predictive-gaps.d.ts +14 -0
- package/packages/core/dist/intelligence/predictive-gaps.js +74 -0
- package/packages/core/dist/intelligence/semantic-versioning.d.ts +37 -0
- package/packages/core/dist/intelligence/semantic-versioning.js +68 -0
- package/packages/core/dist/intelligence/types.d.ts +28 -0
- package/packages/core/dist/intelligence/types.js +3 -0
- package/packages/core/dist/mcp/custom-tools.d.ts +29 -0
- package/packages/core/dist/mcp/custom-tools.js +70 -0
- package/packages/core/{src/mcp/index.ts → dist/mcp/index.d.ts} +1 -0
- package/packages/core/dist/mcp/index.js +2 -0
- package/packages/core/dist/mcp/server.d.ts +49 -0
- package/packages/core/dist/mcp/server.js +133 -0
- package/packages/core/dist/mcp/tools/agentic-graph.d.ts +87 -0
- package/packages/core/dist/mcp/tools/agentic-graph.js +88 -0
- package/packages/core/dist/mcp/tools/brief.d.ts +31 -0
- package/packages/core/dist/mcp/tools/brief.js +39 -0
- package/packages/core/dist/mcp/tools/decay.d.ts +33 -0
- package/packages/core/dist/mcp/tools/decay.js +32 -0
- package/packages/core/dist/mcp/tools/decision-journal.d.ts +78 -0
- package/packages/core/dist/mcp/tools/decision-journal.js +79 -0
- package/packages/core/dist/mcp/tools/export.d.ts +29 -0
- package/packages/core/dist/mcp/tools/export.js +60 -0
- package/packages/core/dist/mcp/tools/federated-search.d.ts +29 -0
- package/packages/core/dist/mcp/tools/federated-search.js +36 -0
- package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +35 -0
- package/packages/core/dist/mcp/tools/generate-claude-md.js +107 -0
- package/packages/core/dist/mcp/tools/get-document.d.ts +35 -0
- package/packages/core/dist/mcp/tools/get-document.js +25 -0
- package/packages/core/dist/mcp/tools/get-related.d.ts +32 -0
- package/packages/core/dist/mcp/tools/get-related.js +33 -0
- package/packages/core/dist/mcp/tools/learning-path.d.ts +23 -0
- package/packages/core/dist/mcp/tools/learning-path.js +45 -0
- package/packages/core/dist/mcp/tools/list-topics.d.ts +15 -0
- package/packages/core/dist/mcp/tools/list-topics.js +18 -0
- package/packages/core/dist/mcp/tools/search.d.ts +39 -0
- package/packages/core/dist/mcp/tools/search.js +29 -0
- package/packages/core/dist/mcp/tools/snapshot.d.ts +47 -0
- package/packages/core/dist/mcp/tools/snapshot.js +84 -0
- package/packages/core/dist/multi-vault/index.d.ts +26 -0
- package/packages/core/dist/multi-vault/index.js +80 -0
- package/packages/core/dist/pack/creator.d.ts +21 -0
- package/packages/core/dist/pack/creator.js +105 -0
- package/packages/core/dist/pack/exporter.d.ts +4 -0
- package/packages/core/dist/pack/exporter.js +18 -0
- package/packages/core/dist/pack/importer.d.ts +10 -0
- package/packages/core/dist/pack/importer.js +55 -0
- package/packages/core/{src/pack/index.ts → dist/pack/index.d.ts} +1 -0
- package/packages/core/dist/pack/index.js +5 -0
- package/packages/core/dist/pack/marketplace.d.ts +14 -0
- package/packages/core/dist/pack/marketplace.js +90 -0
- package/packages/core/dist/pack/pii-masker.d.ts +7 -0
- package/packages/core/dist/pack/pii-masker.js +29 -0
- package/packages/core/dist/pack/types.d.ts +36 -0
- package/packages/core/dist/pack/types.js +3 -0
- package/packages/core/dist/plugins/index.d.ts +35 -0
- package/packages/core/dist/plugins/index.js +57 -0
- package/packages/core/dist/plugins/webhooks.d.ts +30 -0
- package/packages/core/dist/plugins/webhooks.js +79 -0
- package/packages/core/dist/search/bm25.d.ts +4 -0
- package/packages/core/dist/search/bm25.js +10 -0
- package/packages/core/dist/search/index.d.ts +13 -0
- package/packages/core/dist/search/index.js +63 -0
- package/packages/core/dist/search/rrf.d.ts +7 -0
- package/packages/core/dist/search/rrf.js +21 -0
- package/packages/core/dist/search/semantic.d.ts +5 -0
- package/packages/core/dist/search/semantic.js +6 -0
- package/packages/core/{src/store/index.ts → dist/store/index.d.ts} +1 -0
- package/packages/core/dist/store/index.js +2 -0
- package/packages/core/dist/store/sqlite-vec.d.ts +6 -0
- package/packages/core/dist/store/sqlite-vec.js +251 -0
- package/packages/core/dist/store/types.d.ts +20 -0
- package/packages/core/dist/store/types.js +3 -0
- package/packages/core/dist/team/index.d.ts +25 -0
- package/packages/core/dist/team/index.js +97 -0
- package/packages/core/dist/types/chunk.d.ts +23 -0
- package/packages/core/dist/types/chunk.js +3 -0
- package/packages/core/dist/types/document.d.ts +23 -0
- package/packages/core/dist/types/document.js +3 -0
- package/packages/core/dist/types/graph.d.ts +39 -0
- package/packages/core/dist/types/graph.js +3 -0
- package/packages/core/dist/types/index.d.ts +5 -0
- package/packages/core/dist/types/index.js +2 -0
- package/packages/core/dist/types/search.d.ts +39 -0
- package/packages/core/dist/types/search.js +3 -0
- package/packages/core/dist/utils/retry.d.ts +25 -0
- package/packages/core/dist/utils/retry.js +59 -0
- package/.github/workflows/pages.yml +0 -37
- package/memory/MEMORY.md +0 -25
- package/packages/cli/dist/commands/brief-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/brief-cmd.js.map +0 -1
- package/packages/cli/dist/commands/capture-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/capture-cmd.js.map +0 -1
- package/packages/cli/dist/commands/card-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/card-cmd.js.map +0 -1
- package/packages/cli/dist/commands/clip-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/clip-cmd.js.map +0 -1
- package/packages/cli/dist/commands/cloud-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/cloud-cmd.js.map +0 -1
- package/packages/cli/dist/commands/contradictions-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/contradictions-cmd.js.map +0 -1
- package/packages/cli/dist/commands/decay-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/decay-cmd.js.map +0 -1
- package/packages/cli/dist/commands/digest-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/digest-cmd.js.map +0 -1
- package/packages/cli/dist/commands/duplicates-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/duplicates-cmd.js.map +0 -1
- package/packages/cli/dist/commands/federate-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/federate-cmd.js.map +0 -1
- package/packages/cli/dist/commands/gaps-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/gaps-cmd.js.map +0 -1
- package/packages/cli/dist/commands/graph-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/graph-cmd.js.map +0 -1
- package/packages/cli/dist/commands/index-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/index-cmd.js.map +0 -1
- package/packages/cli/dist/commands/init-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/init-cmd.js.map +0 -1
- package/packages/cli/dist/commands/learn-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/learn-cmd.js.map +0 -1
- package/packages/cli/dist/commands/pack-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/pack-cmd.js.map +0 -1
- package/packages/cli/dist/commands/review-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/review-cmd.js.map +0 -1
- package/packages/cli/dist/commands/search-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/search-cmd.js.map +0 -1
- package/packages/cli/dist/commands/serve-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/serve-cmd.js.map +0 -1
- package/packages/cli/dist/commands/status-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/status-cmd.js.map +0 -1
- package/packages/cli/dist/commands/sync-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/sync-cmd.js.map +0 -1
- package/packages/cli/dist/commands/vault-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/vault-cmd.js.map +0 -1
- package/packages/cli/dist/index.d.ts.map +0 -1
- package/packages/cli/dist/index.js.map +0 -1
- package/packages/cli/src/commands/brief-cmd.ts +0 -87
- package/packages/cli/src/commands/capture-cmd.ts +0 -34
- package/packages/cli/src/commands/card-cmd.ts +0 -29
- package/packages/cli/src/commands/clip-cmd.ts +0 -172
- package/packages/cli/src/commands/cloud-cmd.ts +0 -75
- package/packages/cli/src/commands/contradictions-cmd.ts +0 -41
- package/packages/cli/src/commands/decay-cmd.ts +0 -57
- package/packages/cli/src/commands/digest-cmd.ts +0 -89
- package/packages/cli/src/commands/duplicates-cmd.ts +0 -38
- package/packages/cli/src/commands/federate-cmd.ts +0 -256
- package/packages/cli/src/commands/gaps-cmd.ts +0 -40
- package/packages/cli/src/commands/graph-cmd.ts +0 -88
- package/packages/cli/src/commands/index-cmd.ts +0 -65
- package/packages/cli/src/commands/init-cmd.ts +0 -145
- package/packages/cli/src/commands/learn-cmd.ts +0 -56
- package/packages/cli/src/commands/pack-cmd.ts +0 -121
- package/packages/cli/src/commands/review-cmd.ts +0 -125
- package/packages/cli/src/commands/search-cmd.ts +0 -45
- package/packages/cli/src/commands/serve-cmd.ts +0 -17
- package/packages/cli/src/commands/status-cmd.ts +0 -37
- package/packages/cli/src/commands/sync-cmd.ts +0 -68
- package/packages/cli/src/commands/vault-cmd.ts +0 -64
- package/packages/cli/src/index.ts +0 -187
- package/packages/core/src/api/graph-data.ts +0 -286
- package/packages/core/src/api/server.ts +0 -660
- package/packages/core/src/capture/voice.ts +0 -168
- package/packages/core/src/cloud/sync.ts +0 -167
- package/packages/core/src/config.ts +0 -82
- package/packages/core/src/federation/credits.ts +0 -80
- package/packages/core/src/federation/hyperswarm.d.ts +0 -19
- package/packages/core/src/federation/identity.ts +0 -90
- package/packages/core/src/federation/node.ts +0 -235
- package/packages/core/src/federation/privacy.ts +0 -52
- package/packages/core/src/federation/reputation.ts +0 -202
- package/packages/core/src/federation/search.ts +0 -129
- package/packages/core/src/federation/sharing.ts +0 -315
- package/packages/core/src/federation/trust.ts +0 -76
- package/packages/core/src/federation/types.ts +0 -25
- package/packages/core/src/i18n/index.ts +0 -85
- package/packages/core/src/indexer/chunker.ts +0 -180
- package/packages/core/src/indexer/embedder.ts +0 -9
- package/packages/core/src/indexer/index.ts +0 -113
- package/packages/core/src/indexer/local-embedder.ts +0 -35
- package/packages/core/src/indexer/scanner.ts +0 -142
- package/packages/core/src/indexer/watcher.ts +0 -62
- package/packages/core/src/intelligence/contradiction-detector.ts +0 -134
- package/packages/core/src/intelligence/decay-engine.ts +0 -229
- package/packages/core/src/intelligence/duplicate-detector.ts +0 -71
- package/packages/core/src/intelligence/fsrs.ts +0 -79
- package/packages/core/src/intelligence/gap-detector.ts +0 -109
- package/packages/core/src/intelligence/learning-path.ts +0 -86
- package/packages/core/src/intelligence/notifications.ts +0 -106
- package/packages/core/src/intelligence/predictive-gaps.ts +0 -94
- package/packages/core/src/intelligence/semantic-versioning.ts +0 -97
- package/packages/core/src/intelligence/types.ts +0 -28
- package/packages/core/src/mcp/custom-tools.ts +0 -97
- package/packages/core/src/mcp/server.ts +0 -142
- package/packages/core/src/mcp/tools/agentic-graph.ts +0 -96
- package/packages/core/src/mcp/tools/brief.ts +0 -49
- package/packages/core/src/mcp/tools/decay.ts +0 -40
- package/packages/core/src/mcp/tools/decision-journal.ts +0 -95
- package/packages/core/src/mcp/tools/export.ts +0 -72
- package/packages/core/src/mcp/tools/federated-search.ts +0 -43
- package/packages/core/src/mcp/tools/generate-claude-md.ts +0 -130
- package/packages/core/src/mcp/tools/get-document.ts +0 -26
- package/packages/core/src/mcp/tools/get-related.ts +0 -41
- package/packages/core/src/mcp/tools/learning-path.ts +0 -52
- package/packages/core/src/mcp/tools/list-topics.ts +0 -20
- package/packages/core/src/mcp/tools/search.ts +0 -35
- package/packages/core/src/mcp/tools/snapshot.ts +0 -98
- package/packages/core/src/multi-vault/index.ts +0 -118
- package/packages/core/src/pack/creator.ts +0 -127
- package/packages/core/src/pack/exporter.ts +0 -21
- package/packages/core/src/pack/importer.ts +0 -82
- package/packages/core/src/pack/marketplace.ts +0 -103
- package/packages/core/src/pack/pii-masker.ts +0 -38
- package/packages/core/src/pack/types.ts +0 -39
- package/packages/core/src/plugins/index.ts +0 -100
- package/packages/core/src/plugins/webhooks.ts +0 -110
- package/packages/core/src/search/bm25.ts +0 -16
- package/packages/core/src/search/index.ts +0 -83
- package/packages/core/src/search/rrf.ts +0 -31
- package/packages/core/src/search/semantic.ts +0 -15
- package/packages/core/src/store/sqlite-vec.ts +0 -290
- package/packages/core/src/store/types.ts +0 -22
- package/packages/core/src/team/index.ts +0 -126
- package/packages/core/src/types/chunk.ts +0 -25
- package/packages/core/src/types/document.ts +0 -24
- package/packages/core/src/types/graph.ts +0 -44
- package/packages/core/src/types/index.ts +0 -15
- package/packages/core/src/types/search.ts +0 -38
- package/packages/core/src/utils/retry.ts +0 -85
- package/packages/core/tests/api-card.test.ts +0 -60
- package/packages/core/tests/api-routes.test.ts +0 -98
- package/packages/core/tests/bm25.test.ts +0 -87
- package/packages/core/tests/chunker.test.ts +0 -48
- package/packages/core/tests/cluster.test.ts +0 -75
- package/packages/core/tests/constellation.test.ts +0 -77
- package/packages/core/tests/export-utils.test.ts +0 -97
- package/packages/core/tests/fsrs.test.ts +0 -96
- package/packages/core/tests/gesture-detector.test.ts +0 -45
- package/packages/core/tests/graph-data.test.ts +0 -87
- package/packages/core/tests/layout.test.ts +0 -83
- package/packages/core/tests/mcp.test.ts +0 -148
- package/packages/core/tests/pack.test.ts +0 -127
- package/packages/core/tests/pii-masker.test.ts +0 -42
- package/packages/core/tests/profile-card.test.ts +0 -62
- package/packages/core/tests/rrf.test.ts +0 -29
- package/packages/core/tests/search-integration.test.ts +0 -139
- package/packages/core/tests/store.test.ts +0 -80
- package/packages/graph/click-result.png +0 -0
- package/packages/graph/dist/assets/camera_utils-BMxqtvoZ.js +0 -1
- package/packages/graph/dist/assets/hands-DXA01_mx.js +0 -18
- package/packages/graph/dist/assets/index-DMEe2diW.js +0 -4192
- package/packages/graph/dist/assets/layout.worker-DbKCEFTz.js +0 -1
- package/packages/graph/dist/index.html +0 -17
- package/packages/graph/index.html +0 -17
- package/packages/graph/package.json +0 -32
- package/packages/graph/src/App.tsx +0 -7
- package/packages/graph/src/api/client.ts +0 -39
- package/packages/graph/src/components/ClusterFilter.tsx +0 -73
- package/packages/graph/src/components/ConstellationView.tsx +0 -232
- package/packages/graph/src/components/ExportPanel.tsx +0 -177
- package/packages/graph/src/components/Graph3D.tsx +0 -230
- package/packages/graph/src/components/GraphEdges.tsx +0 -100
- package/packages/graph/src/components/GraphNodes.tsx +0 -386
- package/packages/graph/src/components/HealthDashboard.tsx +0 -173
- package/packages/graph/src/components/Layout.tsx +0 -214
- package/packages/graph/src/components/MotionOverlay.tsx +0 -81
- package/packages/graph/src/components/MotionToggle.tsx +0 -33
- package/packages/graph/src/components/MultiverseView.tsx +0 -286
- package/packages/graph/src/components/NodeDetail.tsx +0 -232
- package/packages/graph/src/components/PulseParticle.tsx +0 -232
- package/packages/graph/src/components/SearchBar.tsx +0 -107
- package/packages/graph/src/components/StarField.tsx +0 -197
- package/packages/graph/src/components/StatusBar.tsx +0 -53
- package/packages/graph/src/components/Timeline.tsx +0 -148
- package/packages/graph/src/components/ToolsPanel.tsx +0 -512
- package/packages/graph/src/components/Tooltip.tsx +0 -100
- package/packages/graph/src/components/TypeFilter.tsx +0 -131
- package/packages/graph/src/embed/EmbedGraph.tsx +0 -144
- package/packages/graph/src/hooks/useConstellationLOD.ts +0 -76
- package/packages/graph/src/hooks/useDecay.ts +0 -37
- package/packages/graph/src/hooks/useExport.ts +0 -165
- package/packages/graph/src/hooks/useGraph.ts +0 -69
- package/packages/graph/src/hooks/useKeyboardNav.ts +0 -122
- package/packages/graph/src/hooks/useLayout.ts +0 -45
- package/packages/graph/src/hooks/useMotion.ts +0 -120
- package/packages/graph/src/hooks/usePulse.ts +0 -58
- package/packages/graph/src/hooks/useSearch.ts +0 -71
- package/packages/graph/src/lib/constellation.ts +0 -107
- package/packages/graph/src/lib/export-utils.ts +0 -48
- package/packages/graph/src/lib/gesture-detector.ts +0 -123
- package/packages/graph/src/lib/layout.worker.ts +0 -153
- package/packages/graph/src/lib/motion-controller.ts +0 -83
- package/packages/graph/src/lib/profile-card.ts +0 -122
- package/packages/graph/src/main.tsx +0 -4
- package/packages/graph/src/stores/graph-store.ts +0 -155
- package/packages/graph/success.png +0 -0
- package/packages/graph/test-click.mjs +0 -49
- package/packages/graph/test-explore.mjs +0 -102
- package/packages/graph/test-final.mjs +0 -61
- package/packages/graph/test-graph.mjs +0 -139
- package/packages/graph/test-hover.mjs +0 -48
- package/packages/graph/test-pulse.mjs +0 -68
- package/packages/graph/test-screenshot.mjs +0 -56
- package/packages/graph/test-v2.mjs +0 -97
- package/packages/graph/tsconfig.tsbuildinfo +0 -1
- package/packages/graph/vite.config.ts +0 -15
- package/packages/sync/.env.example +0 -11
- package/packages/sync/.sync-state.json +0 -317
- package/packages/sync/.upload-state.json +0 -1009
- package/packages/sync/create-stella-network-notion.mjs +0 -151
- package/packages/sync/create-stellavault-project-notion.mjs +0 -322
- package/packages/sync/logs/sync-2026-03-28.log +0 -6
- package/packages/sync/logs/sync-2026-03-29.log +0 -12
- package/packages/sync/logs/sync-2026-03-30.log +0 -6
- package/packages/sync/logs/sync-2026-03-31.log +0 -6
- package/packages/sync/logs/sync-2026-04-01.log +0 -6
- package/packages/sync/logs/sync-2026-04-02.log +0 -6
- package/packages/sync/package-lock.json +0 -373
- package/packages/sync/package.json +0 -16
- package/packages/sync/run-sync.bat +0 -18
- package/packages/sync/run-sync.mjs +0 -46
- package/packages/sync/setup-scheduler.mjs +0 -119
- package/packages/sync/structured-sync.mjs +0 -187
- package/packages/sync/sync-to-obsidian.mjs +0 -264
- package/packages/sync/upload-pdca-to-notion.mjs +0 -495
- package/tsconfig.base.json +0 -18
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
// stellavault pack — Knowledge Pack 관리
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { resolve, join } from 'node:path';
|
|
5
|
-
import { readdirSync, existsSync, readFileSync, mkdirSync } from 'node:fs';
|
|
6
|
-
import { homedir } from 'node:os';
|
|
7
|
-
import {
|
|
8
|
-
loadConfig, createKnowledgeHub,
|
|
9
|
-
createPack, exportPack, importPack, packToSummary,
|
|
10
|
-
} from '@stellavault/core';
|
|
11
|
-
|
|
12
|
-
const PACKS_DIR = join(homedir(), '.stellavault', 'packs');
|
|
13
|
-
|
|
14
|
-
export async function packCreateCommand(name: string, options: {
|
|
15
|
-
fromSearch?: string;
|
|
16
|
-
fromCluster?: string;
|
|
17
|
-
author?: string;
|
|
18
|
-
license?: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
limit?: string;
|
|
21
|
-
}) {
|
|
22
|
-
const config = loadConfig();
|
|
23
|
-
const hub = createKnowledgeHub(config);
|
|
24
|
-
await hub.store.initialize();
|
|
25
|
-
await hub.embedder.initialize();
|
|
26
|
-
|
|
27
|
-
console.error(chalk.dim('⏳ Creating pack...'));
|
|
28
|
-
|
|
29
|
-
const { pack, piiReport } = await createPack(hub.store, hub.searchEngine, hub.embedder, {
|
|
30
|
-
name,
|
|
31
|
-
fromSearch: options.fromSearch,
|
|
32
|
-
fromCluster: options.fromCluster ? parseInt(options.fromCluster) : undefined,
|
|
33
|
-
author: options.author ?? 'anonymous',
|
|
34
|
-
license: options.license ?? 'CC-BY-4.0',
|
|
35
|
-
description: options.description,
|
|
36
|
-
limit: options.limit ? parseInt(options.limit) : 100,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
mkdirSync(PACKS_DIR, { recursive: true });
|
|
40
|
-
const outPath = join(PACKS_DIR, `${name}.sv-pack`);
|
|
41
|
-
exportPack(pack, outPath);
|
|
42
|
-
|
|
43
|
-
console.error(chalk.green(`✅ Pack created: ${name}`));
|
|
44
|
-
console.error(` 📦 ${pack.chunks.length} chunks`);
|
|
45
|
-
console.error(` 💾 ${outPath}`);
|
|
46
|
-
if (piiReport.redactedCount > 0) {
|
|
47
|
-
console.error(chalk.yellow(` 🔒 PII masked: ${piiReport.redactedCount} items (${piiReport.types.join(', ')})`));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
await hub.store.close();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export async function packExportCommand(name: string, options: { output?: string }) {
|
|
54
|
-
const srcPath = join(PACKS_DIR, `${name}.sv-pack`);
|
|
55
|
-
if (!existsSync(srcPath)) {
|
|
56
|
-
console.error(chalk.red(`❌ Pack not found: ${name}`));
|
|
57
|
-
process.exit(1);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const outPath = resolve(process.cwd(), options.output ?? `${name}.sv-pack`);
|
|
61
|
-
const content = readFileSync(srcPath, 'utf-8');
|
|
62
|
-
const { writeFileSync } = await import('node:fs');
|
|
63
|
-
writeFileSync(outPath, content);
|
|
64
|
-
|
|
65
|
-
console.error(chalk.green(`✅ Exported: ${outPath}`));
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export async function packImportCommand(filePath: string) {
|
|
69
|
-
const absPath = resolve(process.cwd(), filePath);
|
|
70
|
-
if (!existsSync(absPath)) {
|
|
71
|
-
console.error(chalk.red(`❌ File not found: ${absPath}`));
|
|
72
|
-
process.exit(1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
const config = loadConfig();
|
|
76
|
-
const hub = createKnowledgeHub(config);
|
|
77
|
-
await hub.store.initialize();
|
|
78
|
-
await hub.embedder.initialize();
|
|
79
|
-
|
|
80
|
-
console.error(chalk.dim('⏳ Importing pack...'));
|
|
81
|
-
const result = await importPack(hub.store, hub.embedder, absPath);
|
|
82
|
-
|
|
83
|
-
console.error(chalk.green(`✅ Imported: ${result.imported} chunks`));
|
|
84
|
-
if (result.skipped > 0) console.error(chalk.yellow(` ⏭️ Skipped: ${result.skipped}`));
|
|
85
|
-
if (result.modelMismatch) {
|
|
86
|
-
console.error(chalk.yellow(` ⚠️ Model mismatch — ${result.reEmbedded} chunks re-embedded`));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
await hub.store.close();
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export async function packListCommand() {
|
|
93
|
-
mkdirSync(PACKS_DIR, { recursive: true });
|
|
94
|
-
const files = readdirSync(PACKS_DIR).filter(f => f.endsWith('.sv-pack'));
|
|
95
|
-
|
|
96
|
-
if (files.length === 0) {
|
|
97
|
-
console.error(chalk.dim('No packs found. Create one: stellavault pack create <name> --from-search <query>'));
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
console.error(chalk.green(`📦 ${files.length} packs in ${PACKS_DIR}\n`));
|
|
102
|
-
for (const file of files) {
|
|
103
|
-
try {
|
|
104
|
-
const pack = JSON.parse(readFileSync(join(PACKS_DIR, file), 'utf-8'));
|
|
105
|
-
console.error(` ${chalk.bold(pack.name)} v${pack.version} — ${pack.chunks.length} chunks (${pack.license})`);
|
|
106
|
-
} catch {
|
|
107
|
-
console.error(` ${file} (invalid)`);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export async function packInfoCommand(name: string) {
|
|
113
|
-
const filePath = join(PACKS_DIR, `${name}.sv-pack`);
|
|
114
|
-
if (!existsSync(filePath)) {
|
|
115
|
-
console.error(chalk.red(`❌ Pack not found: ${name}`));
|
|
116
|
-
process.exit(1);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const pack = JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
120
|
-
console.error(packToSummary(pack));
|
|
121
|
-
}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
// Design Ref: stellavault review — 일일 지식 리뷰 (FSRS 기반)
|
|
2
|
-
// Plan SC: "잊어가는 지식 리마인드 → 실제 액션"
|
|
3
|
-
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { createInterface } from 'node:readline';
|
|
6
|
-
import { loadConfig, createKnowledgeHub, DecayEngine } from '@stellavault/core';
|
|
7
|
-
|
|
8
|
-
export async function reviewCommand(options: { count?: string }) {
|
|
9
|
-
const config = loadConfig();
|
|
10
|
-
const hub = createKnowledgeHub(config);
|
|
11
|
-
const count = parseInt(options.count ?? '5', 10);
|
|
12
|
-
|
|
13
|
-
console.error(chalk.dim('⏳ Initializing...'));
|
|
14
|
-
await hub.store.initialize();
|
|
15
|
-
|
|
16
|
-
const db = hub.store.getDb() as any;
|
|
17
|
-
if (!db) {
|
|
18
|
-
console.error(chalk.red('❌ Cannot access database'));
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const decayEngine = new DecayEngine(db);
|
|
23
|
-
const decaying = await decayEngine.getDecaying(0.6, count);
|
|
24
|
-
|
|
25
|
-
if (decaying.length === 0) {
|
|
26
|
-
console.log(chalk.green('\n✨ 모든 지식이 건강합니다! 리뷰할 노트가 없습니다.'));
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
console.log(chalk.green(`\n🧠 오늘의 리뷰 (${decaying.length}개)`));
|
|
31
|
-
console.log(chalk.dim('─'.repeat(50)));
|
|
32
|
-
|
|
33
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
34
|
-
const ask = (q: string): Promise<string> => new Promise(r => rl.question(q, r));
|
|
35
|
-
|
|
36
|
-
let reviewed = 0;
|
|
37
|
-
|
|
38
|
-
for (let i = 0; i < decaying.length; i++) {
|
|
39
|
-
const d = decaying[i];
|
|
40
|
-
const elapsed = Math.round(
|
|
41
|
-
(Date.now() - new Date(d.lastAccess).getTime()) / 86400000
|
|
42
|
-
);
|
|
43
|
-
const rBar = '█'.repeat(Math.round(d.retrievability * 10))
|
|
44
|
-
+ '░'.repeat(10 - Math.round(d.retrievability * 10));
|
|
45
|
-
const color = d.retrievability < 0.3 ? chalk.red : chalk.yellow;
|
|
46
|
-
|
|
47
|
-
console.log(`\n${chalk.bold(`[${i + 1}/${decaying.length}]`)} ${chalk.cyan(d.title)}`);
|
|
48
|
-
console.log(` ${color(rBar)} R=${d.retrievability.toFixed(2)} | ${elapsed}일 전`);
|
|
49
|
-
|
|
50
|
-
const answer = await ask(chalk.dim(' → [y]열기 [n]스킵 [s]내일 다시 [q]종료: '));
|
|
51
|
-
|
|
52
|
-
if (answer.toLowerCase() === 'q') {
|
|
53
|
-
console.log(chalk.dim('\n리뷰 중단.'));
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (answer.toLowerCase() === 's') {
|
|
58
|
-
// Snooze: stability를 1일만 살짝 올려서 내일 다시 나오게
|
|
59
|
-
await decayEngine.recordAccess({
|
|
60
|
-
documentId: d.documentId,
|
|
61
|
-
type: 'view',
|
|
62
|
-
timestamp: new Date(Date.now() - 23 * 3600000).toISOString(), // 23시간 전으로 기록
|
|
63
|
-
});
|
|
64
|
-
console.log(chalk.dim(' ⏰ 내일 다시 리마인드'));
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (answer.toLowerCase() === 'y') {
|
|
69
|
-
// Obsidian에서 열기
|
|
70
|
-
const relFile = (d as any).filePath
|
|
71
|
-
? (d as any).filePath.replace(/\\/g, '/').replace(/\.md$/, '')
|
|
72
|
-
: d.title;
|
|
73
|
-
|
|
74
|
-
let vault = 'Evan';
|
|
75
|
-
try {
|
|
76
|
-
const doc = db.prepare('SELECT file_path FROM documents WHERE id = ?').get(d.documentId) as any;
|
|
77
|
-
if (doc?.file_path) {
|
|
78
|
-
const fp = doc.file_path.replace(/\\/g, '/').replace(/\.md$/, '');
|
|
79
|
-
// vault 이름 = config.vaultPath의 마지막 디렉토리명
|
|
80
|
-
vault = config.vaultPath?.replace(/\\/g, '/').replace(/\/$/, '').split('/').pop() ?? 'Evan';
|
|
81
|
-
|
|
82
|
-
const uri = `obsidian://open?vault=${encodeURIComponent(vault)}&file=${encodeURIComponent(fp)}`;
|
|
83
|
-
const open = await import('open');
|
|
84
|
-
await open.default(uri);
|
|
85
|
-
}
|
|
86
|
-
} catch { /* fallback: no open */ }
|
|
87
|
-
|
|
88
|
-
// 접근 기록 → stability 업데이트
|
|
89
|
-
await decayEngine.recordAccess({
|
|
90
|
-
documentId: d.documentId,
|
|
91
|
-
type: 'view',
|
|
92
|
-
timestamp: new Date().toISOString(),
|
|
93
|
-
});
|
|
94
|
-
reviewed++;
|
|
95
|
-
console.log(chalk.green(' ✅ 열기 + 기억 강도 업데이트'));
|
|
96
|
-
} else {
|
|
97
|
-
console.log(chalk.dim(' ⏭️ 스킵'));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
rl.close();
|
|
102
|
-
|
|
103
|
-
console.log(chalk.dim('\n─'.repeat(50)));
|
|
104
|
-
console.log(chalk.green(`리뷰 완료! ${reviewed}/${decaying.length}개 열람`));
|
|
105
|
-
|
|
106
|
-
// streak 계산 (access_log에서 연속 일수)
|
|
107
|
-
try {
|
|
108
|
-
const days = db.prepare(`
|
|
109
|
-
SELECT DISTINCT date(accessed_at) as d FROM access_log
|
|
110
|
-
WHERE access_type = 'view'
|
|
111
|
-
ORDER BY d DESC LIMIT 30
|
|
112
|
-
`).all() as any[];
|
|
113
|
-
|
|
114
|
-
let streak = 0;
|
|
115
|
-
const today = new Date().toISOString().slice(0, 10);
|
|
116
|
-
for (let i = 0; i < days.length; i++) {
|
|
117
|
-
const expected = new Date(Date.now() - i * 86400000).toISOString().slice(0, 10);
|
|
118
|
-
if (days[i]?.d === expected) streak++;
|
|
119
|
-
else break;
|
|
120
|
-
}
|
|
121
|
-
if (streak > 1) {
|
|
122
|
-
console.log(chalk.yellow(`🔥 ${streak}일 연속 리뷰!`));
|
|
123
|
-
}
|
|
124
|
-
} catch { /* streak 실패해도 무시 */ }
|
|
125
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { loadConfig, createSqliteVecStore, createLocalEmbedder, createSearchEngine } from '@stellavault/core';
|
|
3
|
-
|
|
4
|
-
export async function searchCommand(query: string, options: { limit?: string }, cmd: any) {
|
|
5
|
-
const globalOpts = cmd?.parent?.opts?.() ?? {};
|
|
6
|
-
const jsonMode = globalOpts.json;
|
|
7
|
-
const config = loadConfig();
|
|
8
|
-
const limit = parseInt(options.limit ?? '5', 10);
|
|
9
|
-
|
|
10
|
-
const store = createSqliteVecStore(config.dbPath);
|
|
11
|
-
await store.initialize();
|
|
12
|
-
|
|
13
|
-
const embedder = createLocalEmbedder(config.embedding.localModel);
|
|
14
|
-
await embedder.initialize();
|
|
15
|
-
|
|
16
|
-
const engine = createSearchEngine({ store, embedder, rrfK: config.search.rrfK });
|
|
17
|
-
const results = await engine.search({ query, limit });
|
|
18
|
-
|
|
19
|
-
await store.close();
|
|
20
|
-
|
|
21
|
-
if (jsonMode) {
|
|
22
|
-
console.log(JSON.stringify({
|
|
23
|
-
query, count: results.length,
|
|
24
|
-
results: results.map(r => ({
|
|
25
|
-
title: r.document.title, path: r.document.filePath,
|
|
26
|
-
score: r.score, heading: r.chunk.heading,
|
|
27
|
-
snippet: r.chunk.content.slice(0, 200),
|
|
28
|
-
})),
|
|
29
|
-
}, null, 2));
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (results.length === 0) {
|
|
34
|
-
console.log(chalk.yellow('검색 결과가 없습니다.'));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
console.log('');
|
|
39
|
-
for (let i = 0; i < results.length; i++) {
|
|
40
|
-
const r = results[i];
|
|
41
|
-
console.log(` ${chalk.bold(`${i + 1}.`)} ${chalk.cyan(`[${r.score.toFixed(3)}]`)} ${chalk.white(r.document.filePath)} ${chalk.dim(`§${r.chunk.heading}`)}`);
|
|
42
|
-
console.log(` ${chalk.dim(r.chunk.content.slice(0, 120).replace(/\n/g, ' '))}...`);
|
|
43
|
-
}
|
|
44
|
-
console.log('');
|
|
45
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { loadConfig, createKnowledgeHub } from '@stellavault/core';
|
|
3
|
-
|
|
4
|
-
export async function serveCommand() {
|
|
5
|
-
const config = loadConfig();
|
|
6
|
-
const hub = createKnowledgeHub(config);
|
|
7
|
-
|
|
8
|
-
await hub.store.initialize();
|
|
9
|
-
await hub.embedder.initialize();
|
|
10
|
-
|
|
11
|
-
const stats = await hub.store.getStats();
|
|
12
|
-
console.error(chalk.green('🚀 MCP Server running (stdio mode)'));
|
|
13
|
-
console.error(`📚 ${stats.documentCount} documents | ${stats.chunkCount} chunks`);
|
|
14
|
-
console.error(chalk.dim('💡 Claude Code: claude mcp add stellavault -- stellavault serve'));
|
|
15
|
-
|
|
16
|
-
await hub.mcpServer.startStdio();
|
|
17
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { loadConfig, createSqliteVecStore } from '@stellavault/core';
|
|
3
|
-
|
|
4
|
-
export async function statusCommand(_opts: any, cmd: any) {
|
|
5
|
-
const globalOpts = cmd?.parent?.opts?.() ?? {};
|
|
6
|
-
const jsonMode = globalOpts.json;
|
|
7
|
-
const config = loadConfig();
|
|
8
|
-
|
|
9
|
-
const store = createSqliteVecStore(config.dbPath);
|
|
10
|
-
await store.initialize();
|
|
11
|
-
const stats = await store.getStats();
|
|
12
|
-
const topics = await store.getTopics();
|
|
13
|
-
await store.close();
|
|
14
|
-
|
|
15
|
-
if (jsonMode) {
|
|
16
|
-
console.log(JSON.stringify({ ...stats, vaultPath: config.vaultPath, dbPath: config.dbPath, topics: topics.slice(0, 20) }, null, 2));
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log('');
|
|
21
|
-
console.log(chalk.bold('📊 Stellavault Status'));
|
|
22
|
-
console.log('─'.repeat(40));
|
|
23
|
-
console.log(` 📄 Documents: ${stats.documentCount}`);
|
|
24
|
-
console.log(` 🧩 Chunks: ${stats.chunkCount}`);
|
|
25
|
-
console.log(` 🕐 Last indexed: ${stats.lastIndexed ?? 'never'}`);
|
|
26
|
-
console.log(` 💾 DB: ${config.dbPath}`);
|
|
27
|
-
console.log(` 📁 Vault: ${config.vaultPath || '(not set)'}`);
|
|
28
|
-
|
|
29
|
-
if (topics.length > 0) {
|
|
30
|
-
console.log('');
|
|
31
|
-
console.log(chalk.bold('🏷️ Top topics:'));
|
|
32
|
-
topics.slice(0, 10).forEach((t: any) => {
|
|
33
|
-
console.log(` #${t.topic} (${t.count})`);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
console.log('');
|
|
37
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// Design Ref: stellavault sync — Notion↔Obsidian 동기화 CLI 통합
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { spawn } from 'node:child_process';
|
|
5
|
-
import { resolve } from 'node:path';
|
|
6
|
-
import { existsSync } from 'node:fs';
|
|
7
|
-
|
|
8
|
-
export async function syncCommand(options: { upload?: boolean; watch?: boolean }) {
|
|
9
|
-
const syncDir = resolve(process.cwd(), 'packages/sync');
|
|
10
|
-
const syncScript = resolve(syncDir, 'sync-to-obsidian.mjs');
|
|
11
|
-
|
|
12
|
-
if (!existsSync(syncScript)) {
|
|
13
|
-
console.error(chalk.red('❌ packages/sync/sync-to-obsidian.mjs not found'));
|
|
14
|
-
console.error(chalk.dim(' Run from project root: cd notion-obsidian-sync'));
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// .env 확인
|
|
19
|
-
const envFile = resolve(syncDir, '.env');
|
|
20
|
-
if (!existsSync(envFile)) {
|
|
21
|
-
console.error(chalk.red('❌ packages/sync/.env not found'));
|
|
22
|
-
console.error(chalk.dim(' Copy .env.example → .env and set NOTION_TOKEN'));
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (options.upload) {
|
|
27
|
-
// PDCA 문서 → Notion 업로드
|
|
28
|
-
const uploadScript = resolve(syncDir, 'upload-pdca-to-notion.mjs');
|
|
29
|
-
if (!existsSync(uploadScript)) {
|
|
30
|
-
console.error(chalk.red('❌ upload-pdca-to-notion.mjs not found'));
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
console.error(chalk.dim('📤 Uploading PDCA documents to Notion...'));
|
|
34
|
-
await runScript(uploadScript, syncDir);
|
|
35
|
-
} else {
|
|
36
|
-
// Notion → Obsidian 동기화
|
|
37
|
-
console.error(chalk.dim('🔄 Syncing Notion → Obsidian...'));
|
|
38
|
-
await runScript(syncScript, syncDir);
|
|
39
|
-
|
|
40
|
-
if (options.watch) {
|
|
41
|
-
console.error(chalk.green('👀 Watch mode — syncing every 5 minutes'));
|
|
42
|
-
setInterval(async () => {
|
|
43
|
-
console.error(chalk.dim(`🔄 [${new Date().toLocaleTimeString()}] Re-syncing...`));
|
|
44
|
-
await runScript(syncScript, syncDir);
|
|
45
|
-
}, 5 * 60 * 1000);
|
|
46
|
-
|
|
47
|
-
// Keep alive
|
|
48
|
-
process.stdin.resume();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function runScript(scriptPath: string, cwd: string): Promise<void> {
|
|
54
|
-
return new Promise((resolve, reject) => {
|
|
55
|
-
const child = spawn('node', [scriptPath], {
|
|
56
|
-
cwd,
|
|
57
|
-
stdio: 'inherit',
|
|
58
|
-
shell: true,
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
child.on('close', (code) => {
|
|
62
|
-
if (code === 0) resolve();
|
|
63
|
-
else reject(new Error(`Script exited with code ${code}`));
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
child.on('error', reject);
|
|
67
|
-
});
|
|
68
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// sv vault add/list/remove/search-all — Cross-Vault (P3)
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { addVault, removeVault, listVaults, searchAllVaults, loadConfig, createSqliteVecStore, createLocalEmbedder } from '@stellavault/core';
|
|
5
|
-
|
|
6
|
-
export async function vaultAddCommand(id: string, vaultPath: string, options: { name?: string; shared?: boolean }) {
|
|
7
|
-
const config = loadConfig();
|
|
8
|
-
const dbPath = vaultPath.replace(/\/$/, '') + '/.stellavault/index.db';
|
|
9
|
-
try {
|
|
10
|
-
const entry = addVault(id, options.name ?? id, vaultPath, dbPath, !!options.shared);
|
|
11
|
-
console.log(chalk.green(`\n ✅ Vault "${entry.name}" added (${entry.id})`));
|
|
12
|
-
console.log(chalk.dim(` Path: ${entry.path}\n DB: ${entry.dbPath}\n`));
|
|
13
|
-
} catch (err) {
|
|
14
|
-
console.log(chalk.red(`\n ❌ ${err instanceof Error ? err.message : err}\n`));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function vaultListCommand() {
|
|
19
|
-
const vaults = listVaults();
|
|
20
|
-
if (vaults.length === 0) {
|
|
21
|
-
console.log(chalk.yellow('\n No vaults registered. Use: sv vault add <id> <path>\n'));
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
console.log(chalk.bold('\n Registered Vaults'));
|
|
25
|
-
for (const v of vaults) {
|
|
26
|
-
console.log(` ${chalk.cyan(v.id)} ${v.name} ${chalk.dim(`(${v.path})`)}`);
|
|
27
|
-
}
|
|
28
|
-
console.log('');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export async function vaultRemoveCommand(id: string) {
|
|
32
|
-
if (removeVault(id)) {
|
|
33
|
-
console.log(chalk.green(`\n ✅ Vault "${id}" removed\n`));
|
|
34
|
-
} else {
|
|
35
|
-
console.log(chalk.red(`\n ❌ Vault "${id}" not found\n`));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export async function vaultSearchAllCommand(query: string, options: { limit?: string }) {
|
|
40
|
-
const config = loadConfig();
|
|
41
|
-
const embedder = createLocalEmbedder(config.embedding.localModel);
|
|
42
|
-
await embedder.initialize();
|
|
43
|
-
|
|
44
|
-
console.log(chalk.dim(`\n Searching all vaults for "${query}"...`));
|
|
45
|
-
|
|
46
|
-
const results = await searchAllVaults(
|
|
47
|
-
query, embedder,
|
|
48
|
-
(dbPath) => createSqliteVecStore(dbPath),
|
|
49
|
-
{ limit: parseInt(options.limit ?? '10', 10) },
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
if (results.length === 0) {
|
|
53
|
-
console.log(chalk.yellow(' No results across vaults.\n'));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
for (const r of results) {
|
|
58
|
-
const pct = Math.round(r.score * 100);
|
|
59
|
-
const color = pct >= 70 ? chalk.green : pct >= 40 ? chalk.yellow : chalk.dim;
|
|
60
|
-
console.log(` ${color(`${pct}%`)} ${chalk.bold(r.title)} ${chalk.dim(`[${r.vaultName}]`)}`);
|
|
61
|
-
console.log(` ${chalk.dim(r.snippet)}...`);
|
|
62
|
-
}
|
|
63
|
-
console.log('');
|
|
64
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import { indexCommand } from './commands/index-cmd.js';
|
|
3
|
-
import { searchCommand } from './commands/search-cmd.js';
|
|
4
|
-
import { serveCommand } from './commands/serve-cmd.js';
|
|
5
|
-
import { statusCommand } from './commands/status-cmd.js';
|
|
6
|
-
import { graphCommand } from './commands/graph-cmd.js';
|
|
7
|
-
import { cardCommand } from './commands/card-cmd.js';
|
|
8
|
-
import { packCreateCommand, packExportCommand, packImportCommand, packListCommand, packInfoCommand } from './commands/pack-cmd.js';
|
|
9
|
-
import { decayCommand } from './commands/decay-cmd.js';
|
|
10
|
-
import { syncCommand } from './commands/sync-cmd.js';
|
|
11
|
-
import { reviewCommand } from './commands/review-cmd.js';
|
|
12
|
-
import { duplicatesCommand } from './commands/duplicates-cmd.js';
|
|
13
|
-
import { gapsCommand } from './commands/gaps-cmd.js';
|
|
14
|
-
import { clipCommand } from './commands/clip-cmd.js';
|
|
15
|
-
import { briefCommand } from './commands/brief-cmd.js';
|
|
16
|
-
import { digestCommand } from './commands/digest-cmd.js';
|
|
17
|
-
import { initCommand } from './commands/init-cmd.js';
|
|
18
|
-
import { learnCommand } from './commands/learn-cmd.js';
|
|
19
|
-
import { contradictionsCommand } from './commands/contradictions-cmd.js';
|
|
20
|
-
import { federateJoinCommand, federateStatusCommand } from './commands/federate-cmd.js';
|
|
21
|
-
import { cloudSyncCommand, cloudRestoreCommand, cloudStatusCommand } from './commands/cloud-cmd.js';
|
|
22
|
-
import { vaultAddCommand, vaultListCommand, vaultRemoveCommand, vaultSearchAllCommand } from './commands/vault-cmd.js';
|
|
23
|
-
import { captureCommand } from './commands/capture-cmd.js';
|
|
24
|
-
|
|
25
|
-
const program = new Command();
|
|
26
|
-
|
|
27
|
-
program
|
|
28
|
-
.name('stellavault')
|
|
29
|
-
.description('Stellavault — Turn your Obsidian vault into a 3D neural knowledge graph')
|
|
30
|
-
.version('0.1.0')
|
|
31
|
-
.option('--json', 'Output in JSON format (for scripting)')
|
|
32
|
-
.option('--quiet', 'Suppress non-essential output');
|
|
33
|
-
|
|
34
|
-
program
|
|
35
|
-
.command('init')
|
|
36
|
-
.description('Interactive setup wizard — get started in 3 minutes')
|
|
37
|
-
.action(initCommand);
|
|
38
|
-
|
|
39
|
-
program
|
|
40
|
-
.command('index [vault-path]')
|
|
41
|
-
.description('Obsidian vault를 벡터화하여 인덱싱합니다')
|
|
42
|
-
.action(indexCommand);
|
|
43
|
-
|
|
44
|
-
program
|
|
45
|
-
.command('search <query>')
|
|
46
|
-
.description('지식 베이스에서 검색합니다')
|
|
47
|
-
.option('-l, --limit <n>', '결과 수', '5')
|
|
48
|
-
.action(searchCommand);
|
|
49
|
-
|
|
50
|
-
program
|
|
51
|
-
.command('serve')
|
|
52
|
-
.description('MCP 서버를 시작합니다 (Claude Code 연동)')
|
|
53
|
-
.action(serveCommand);
|
|
54
|
-
|
|
55
|
-
program
|
|
56
|
-
.command('status')
|
|
57
|
-
.description('인덱스 상태를 확인합니다')
|
|
58
|
-
.action(statusCommand);
|
|
59
|
-
|
|
60
|
-
program
|
|
61
|
-
.command('graph')
|
|
62
|
-
.description('3D Knowledge Graph API 서버를 시작합니다')
|
|
63
|
-
.action(graphCommand);
|
|
64
|
-
|
|
65
|
-
program
|
|
66
|
-
.command('card')
|
|
67
|
-
.description('SVG 프로필 카드를 생성합니다')
|
|
68
|
-
.option('-o, --output <path>', '출력 파일 경로', 'knowledge-card.svg')
|
|
69
|
-
.action(cardCommand);
|
|
70
|
-
|
|
71
|
-
program
|
|
72
|
-
.command('learn')
|
|
73
|
-
.description('AI learning path — personalized recommendations based on decay + gaps')
|
|
74
|
-
.action(learnCommand);
|
|
75
|
-
|
|
76
|
-
program
|
|
77
|
-
.command('contradictions')
|
|
78
|
-
.description('Detect contradicting statements across your notes')
|
|
79
|
-
.action(contradictionsCommand);
|
|
80
|
-
|
|
81
|
-
program
|
|
82
|
-
.command('decay')
|
|
83
|
-
.description('지식 감쇠 리포트를 출력합니다 (잊어가는 노트 확인)')
|
|
84
|
-
.action(decayCommand);
|
|
85
|
-
|
|
86
|
-
program
|
|
87
|
-
.command('brief')
|
|
88
|
-
.description('오늘의 지식 브리핑 (감쇠 + 갭 + 활동 요약)')
|
|
89
|
-
.action(briefCommand);
|
|
90
|
-
|
|
91
|
-
program
|
|
92
|
-
.command('digest')
|
|
93
|
-
.description('주간 지식 활동 리포트')
|
|
94
|
-
.option('-d, --days <n>', '기간 (일)', '7')
|
|
95
|
-
.action(digestCommand);
|
|
96
|
-
|
|
97
|
-
program
|
|
98
|
-
.command('clip <url>')
|
|
99
|
-
.description('웹 페이지/YouTube를 Obsidian에 클리핑')
|
|
100
|
-
.option('-f, --folder <path>', 'vault 내 저장 폴더', '06_Research/clips')
|
|
101
|
-
.action(clipCommand);
|
|
102
|
-
|
|
103
|
-
program
|
|
104
|
-
.command('gaps')
|
|
105
|
-
.description('지식 갭을 탐지합니다 (클러스터 간 연결 부족 영역)')
|
|
106
|
-
.action(gapsCommand);
|
|
107
|
-
|
|
108
|
-
program
|
|
109
|
-
.command('duplicates')
|
|
110
|
-
.description('중복/유사 노트를 탐지합니다')
|
|
111
|
-
.option('-t, --threshold <n>', '유사도 임계값 (0~1)', '0.88')
|
|
112
|
-
.action(duplicatesCommand);
|
|
113
|
-
|
|
114
|
-
program
|
|
115
|
-
.command('review')
|
|
116
|
-
.description('일일 지식 리뷰 — 잊어가는 노트를 Obsidian에서 열어 리뷰')
|
|
117
|
-
.option('-n, --count <n>', '리뷰할 노트 수', '5')
|
|
118
|
-
.action(reviewCommand);
|
|
119
|
-
|
|
120
|
-
program
|
|
121
|
-
.command('sync')
|
|
122
|
-
.description('Notion → Obsidian 동기화')
|
|
123
|
-
.option('--upload', 'PDCA 문서를 Notion에 업로드')
|
|
124
|
-
.option('--watch', '5분 간격 자동 동기화')
|
|
125
|
-
.action(syncCommand);
|
|
126
|
-
|
|
127
|
-
const federate = program.command('federate').description('Federation — P2P knowledge network');
|
|
128
|
-
|
|
129
|
-
federate.command('join')
|
|
130
|
-
.description('Join the federation network (interactive mode)')
|
|
131
|
-
.option('-n, --name <name>', 'Display name for this node')
|
|
132
|
-
.action(federateJoinCommand);
|
|
133
|
-
|
|
134
|
-
federate.command('status')
|
|
135
|
-
.description('Show federation identity and status')
|
|
136
|
-
.action(federateStatusCommand);
|
|
137
|
-
|
|
138
|
-
program
|
|
139
|
-
.command('capture <audio-file>')
|
|
140
|
-
.description('Voice capture — transcribe audio to knowledge note (requires Whisper)')
|
|
141
|
-
.option('-m, --model <model>', 'Whisper model (tiny/base/small/medium/large)', 'base')
|
|
142
|
-
.option('-l, --language <lang>', 'Language (auto-detect if omitted)')
|
|
143
|
-
.option('-t, --tags <tags>', 'Comma-separated tags')
|
|
144
|
-
.option('-f, --folder <folder>', 'Vault subfolder', '01_Knowledge/voice')
|
|
145
|
-
.action(captureCommand);
|
|
146
|
-
|
|
147
|
-
const vault = program.command('vault').description('Multi-Vault — manage and search across vaults');
|
|
148
|
-
vault.command('add <id> <path>').description('Register a vault').option('-n, --name <name>', 'Display name').option('-s, --shared', 'Allow federation sharing').action(vaultAddCommand);
|
|
149
|
-
vault.command('list').description('List registered vaults').action(vaultListCommand);
|
|
150
|
-
vault.command('remove <id>').description('Unregister a vault').action(vaultRemoveCommand);
|
|
151
|
-
vault.command('search-all <query>').description('Search across all registered vaults').option('-l, --limit <n>', 'Max results', '10').action(vaultSearchAllCommand);
|
|
152
|
-
|
|
153
|
-
const cloud = program.command('cloud').description('Cloud — E2E encrypted backup');
|
|
154
|
-
cloud.command('sync').description('Upload encrypted DB to cloud').action(cloudSyncCommand);
|
|
155
|
-
cloud.command('restore').description('Download and decrypt DB from cloud').action(cloudRestoreCommand);
|
|
156
|
-
cloud.command('status').description('Show last sync status').action(cloudStatusCommand);
|
|
157
|
-
|
|
158
|
-
const pack = program.command('pack').description('Knowledge Pack 관리');
|
|
159
|
-
|
|
160
|
-
pack.command('create <name>')
|
|
161
|
-
.description('검색/클러스터 기반 Knowledge Pack 생성')
|
|
162
|
-
.option('--from-search <query>', '검색 쿼리에서 생성')
|
|
163
|
-
.option('--from-cluster <id>', '클러스터 ID에서 생성')
|
|
164
|
-
.option('--author <name>', '작성자', 'anonymous')
|
|
165
|
-
.option('--license <license>', '라이선스', 'CC-BY-4.0')
|
|
166
|
-
.option('--description <desc>', '설명')
|
|
167
|
-
.option('--limit <n>', '최대 청크 수', '100')
|
|
168
|
-
.action(packCreateCommand);
|
|
169
|
-
|
|
170
|
-
pack.command('export <name>')
|
|
171
|
-
.description('.sv-pack 파일로 내보내기')
|
|
172
|
-
.option('-o, --output <path>', '출력 경로')
|
|
173
|
-
.action(packExportCommand);
|
|
174
|
-
|
|
175
|
-
pack.command('import <file>')
|
|
176
|
-
.description('.sv-pack 파일 가져오기 → 벡터 DB 병합')
|
|
177
|
-
.action(packImportCommand);
|
|
178
|
-
|
|
179
|
-
pack.command('list')
|
|
180
|
-
.description('설치된 팩 목록')
|
|
181
|
-
.action(packListCommand);
|
|
182
|
-
|
|
183
|
-
pack.command('info <name>')
|
|
184
|
-
.description('팩 상세 정보')
|
|
185
|
-
.action(packInfoCommand);
|
|
186
|
-
|
|
187
|
-
program.parse();
|