stellavault 0.2.0 → 0.3.0
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 +718 -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/code-linker.d.ts +20 -0
- package/packages/core/dist/intelligence/code-linker.js +88 -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 +151 -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/detect-gaps.d.ts +24 -0
- package/packages/core/dist/mcp/tools/detect-gaps.js +47 -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-evolution.d.ts +28 -0
- package/packages/core/dist/mcp/tools/get-evolution.js +70 -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/link-code.d.ts +34 -0
- package/packages/core/dist/mcp/tools/link-code.js +44 -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/adaptive.d.ts +16 -0
- package/packages/core/dist/search/adaptive.js +67 -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 +15 -0
- package/packages/core/dist/search/index.js +64 -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,172 +0,0 @@
|
|
|
1
|
-
// Design Ref: stellavault clip — 웹 페이지/YouTube를 Obsidian에 클리핑
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { writeFileSync, mkdirSync } from 'node:fs';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
import { loadConfig } from '@stellavault/core';
|
|
7
|
-
|
|
8
|
-
export async function clipCommand(url: string, options: { folder?: string }) {
|
|
9
|
-
if (!url) {
|
|
10
|
-
console.error(chalk.red('❌ URL을 입력하세요: stellavault clip <url>'));
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const config = loadConfig();
|
|
15
|
-
const vaultPath = config.vaultPath;
|
|
16
|
-
if (!vaultPath) {
|
|
17
|
-
console.error(chalk.red('❌ vaultPath not configured'));
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const folder = options.folder ?? '06_Research/clips';
|
|
22
|
-
const targetDir = join(vaultPath, folder);
|
|
23
|
-
mkdirSync(targetDir, { recursive: true });
|
|
24
|
-
|
|
25
|
-
console.error(chalk.dim(`📎 Clipping: ${url}`));
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
// URL 유형 감지
|
|
29
|
-
const isYouTube = /youtube\.com\/watch|youtu\.be\//.test(url);
|
|
30
|
-
|
|
31
|
-
let title: string;
|
|
32
|
-
let content: string;
|
|
33
|
-
|
|
34
|
-
if (isYouTube) {
|
|
35
|
-
// YouTube — 메타데이터 + 설명 추출
|
|
36
|
-
const result = await clipYouTube(url);
|
|
37
|
-
title = result.title;
|
|
38
|
-
content = result.content;
|
|
39
|
-
} else {
|
|
40
|
-
// 일반 웹페이지 — HTML → Markdown
|
|
41
|
-
const result = await clipWebPage(url);
|
|
42
|
-
title = result.title;
|
|
43
|
-
content = result.content;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// 파일명 생성 (안전한 문자만)
|
|
47
|
-
const safeTitle = title
|
|
48
|
-
.replace(/[<>:"/\\|?*]/g, '')
|
|
49
|
-
.replace(/\s+/g, ' ')
|
|
50
|
-
.trim()
|
|
51
|
-
.slice(0, 80);
|
|
52
|
-
|
|
53
|
-
const date = new Date().toISOString().slice(0, 10);
|
|
54
|
-
const fileName = `${date} ${safeTitle}.md`;
|
|
55
|
-
const filePath = join(targetDir, fileName);
|
|
56
|
-
|
|
57
|
-
// Frontmatter + 내용 조합
|
|
58
|
-
const md = [
|
|
59
|
-
'---',
|
|
60
|
-
`title: "${safeTitle}"`,
|
|
61
|
-
`source: "${url}"`,
|
|
62
|
-
`clipped: ${date}`,
|
|
63
|
-
`tags: [clip${isYouTube ? ', youtube' : ''}]`,
|
|
64
|
-
'---',
|
|
65
|
-
'',
|
|
66
|
-
`# ${safeTitle}`,
|
|
67
|
-
'',
|
|
68
|
-
`> Source: ${url}`,
|
|
69
|
-
`> Clipped: ${date}`,
|
|
70
|
-
'',
|
|
71
|
-
content,
|
|
72
|
-
].join('\n');
|
|
73
|
-
|
|
74
|
-
writeFileSync(filePath, md, 'utf-8');
|
|
75
|
-
|
|
76
|
-
console.log(chalk.green(`✅ Saved: ${fileName}`));
|
|
77
|
-
console.log(chalk.dim(` → ${filePath}`));
|
|
78
|
-
console.log(chalk.dim(' 💡 stellavault index로 재인덱싱하면 검색 가능'));
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.error(chalk.red(`❌ Clip failed: ${(err as Error).message}`));
|
|
81
|
-
process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async function clipWebPage(url: string): Promise<{ title: string; content: string }> {
|
|
86
|
-
const res = await fetch(url, {
|
|
87
|
-
headers: { 'User-Agent': 'Mozilla/5.0 stellavault-clipper/1.0' },
|
|
88
|
-
});
|
|
89
|
-
const html = await res.text();
|
|
90
|
-
|
|
91
|
-
// 제목 추출
|
|
92
|
-
const titleMatch = html.match(/<title[^>]*>([^<]+)<\/title>/i);
|
|
93
|
-
const title = titleMatch ? titleMatch[1].trim() : new URL(url).hostname;
|
|
94
|
-
|
|
95
|
-
// HTML → 간단한 마크다운 변환
|
|
96
|
-
let content = html
|
|
97
|
-
// 스크립트/스타일 제거
|
|
98
|
-
.replace(/<script[\s\S]*?<\/script>/gi, '')
|
|
99
|
-
.replace(/<style[\s\S]*?<\/style>/gi, '')
|
|
100
|
-
// 헤딩
|
|
101
|
-
.replace(/<h1[^>]*>([\s\S]*?)<\/h1>/gi, '\n# $1\n')
|
|
102
|
-
.replace(/<h2[^>]*>([\s\S]*?)<\/h2>/gi, '\n## $1\n')
|
|
103
|
-
.replace(/<h3[^>]*>([\s\S]*?)<\/h3>/gi, '\n### $1\n')
|
|
104
|
-
// 단락/줄바꿈
|
|
105
|
-
.replace(/<p[^>]*>([\s\S]*?)<\/p>/gi, '\n$1\n')
|
|
106
|
-
.replace(/<br\s*\/?>/gi, '\n')
|
|
107
|
-
// 링크
|
|
108
|
-
.replace(/<a[^>]*href="([^"]*)"[^>]*>([\s\S]*?)<\/a>/gi, '[$2]($1)')
|
|
109
|
-
// 리스트
|
|
110
|
-
.replace(/<li[^>]*>([\s\S]*?)<\/li>/gi, '- $1\n')
|
|
111
|
-
// 강조
|
|
112
|
-
.replace(/<(strong|b)[^>]*>([\s\S]*?)<\/\1>/gi, '**$2**')
|
|
113
|
-
.replace(/<(em|i)[^>]*>([\s\S]*?)<\/\1>/gi, '*$2*')
|
|
114
|
-
// 코드
|
|
115
|
-
.replace(/<code[^>]*>([\s\S]*?)<\/code>/gi, '`$1`')
|
|
116
|
-
.replace(/<pre[^>]*>([\s\S]*?)<\/pre>/gi, '\n```\n$1\n```\n')
|
|
117
|
-
// 나머지 태그 제거
|
|
118
|
-
.replace(/<[^>]+>/g, '')
|
|
119
|
-
// HTML 엔티티
|
|
120
|
-
.replace(/&/g, '&')
|
|
121
|
-
.replace(/</g, '<')
|
|
122
|
-
.replace(/>/g, '>')
|
|
123
|
-
.replace(/"/g, '"')
|
|
124
|
-
.replace(/'/g, "'")
|
|
125
|
-
.replace(/ /g, ' ')
|
|
126
|
-
// 다중 줄바꿈 정리
|
|
127
|
-
.replace(/\n{3,}/g, '\n\n')
|
|
128
|
-
.trim();
|
|
129
|
-
|
|
130
|
-
// 너무 길면 자르기
|
|
131
|
-
if (content.length > 10000) {
|
|
132
|
-
content = content.slice(0, 10000) + '\n\n...(truncated)';
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return { title, content };
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
async function clipYouTube(url: string): Promise<{ title: string; content: string }> {
|
|
139
|
-
// YouTube 페이지에서 메타데이터 추출
|
|
140
|
-
const res = await fetch(url, {
|
|
141
|
-
headers: { 'User-Agent': 'Mozilla/5.0 stellavault-clipper/1.0' },
|
|
142
|
-
});
|
|
143
|
-
const html = await res.text();
|
|
144
|
-
|
|
145
|
-
const titleMatch = html.match(/<title[^>]*>([^<]+)<\/title>/i);
|
|
146
|
-
const title = (titleMatch ? titleMatch[1] : 'YouTube Video')
|
|
147
|
-
.replace(/ - YouTube$/, '')
|
|
148
|
-
.trim();
|
|
149
|
-
|
|
150
|
-
// 비디오 설명 추출 시도
|
|
151
|
-
const descMatch = html.match(/"shortDescription":"([\s\S]*?)"/);
|
|
152
|
-
const description = descMatch
|
|
153
|
-
? descMatch[1].replace(/\\n/g, '\n').replace(/\\"/g, '"').slice(0, 3000)
|
|
154
|
-
: '(설명 없음)';
|
|
155
|
-
|
|
156
|
-
const videoId = url.match(/(?:v=|youtu\.be\/)([a-zA-Z0-9_-]+)/)?.[1] ?? '';
|
|
157
|
-
|
|
158
|
-
const content = [
|
|
159
|
-
``,
|
|
160
|
-
'',
|
|
161
|
-
'## 설명',
|
|
162
|
-
'',
|
|
163
|
-
description,
|
|
164
|
-
'',
|
|
165
|
-
`## 링크`,
|
|
166
|
-
'',
|
|
167
|
-
`- [YouTube](${url})`,
|
|
168
|
-
videoId ? `- [Embed](https://www.youtube.com/embed/${videoId})` : '',
|
|
169
|
-
].filter(Boolean).join('\n');
|
|
170
|
-
|
|
171
|
-
return { title, content };
|
|
172
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// sv cloud sync/restore/status — E2E encrypted cloud backup (F-A04)
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig } from '@stellavault/core';
|
|
5
|
-
import { syncToCloud, restoreFromCloud, getSyncState } from '@stellavault/core';
|
|
6
|
-
import type { CloudConfig } from '@stellavault/core';
|
|
7
|
-
|
|
8
|
-
function getCloudConfig(): CloudConfig | null {
|
|
9
|
-
const endpoint = process.env.SV_CLOUD_ENDPOINT;
|
|
10
|
-
const bucket = process.env.SV_CLOUD_BUCKET ?? 'stellavault';
|
|
11
|
-
const accessKeyId = process.env.SV_CLOUD_ACCESS_KEY ?? '';
|
|
12
|
-
const secretAccessKey = process.env.SV_CLOUD_SECRET_KEY ?? '';
|
|
13
|
-
const encryptionKey = process.env.SV_CLOUD_ENCRYPTION_KEY;
|
|
14
|
-
|
|
15
|
-
if (!endpoint || !secretAccessKey) return null;
|
|
16
|
-
|
|
17
|
-
return { endpoint, bucket, accessKeyId, secretAccessKey, encryptionKey };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export async function cloudSyncCommand() {
|
|
21
|
-
const cloudConfig = getCloudConfig();
|
|
22
|
-
if (!cloudConfig) {
|
|
23
|
-
console.log(chalk.red('\n Cloud not configured. Set environment variables:'));
|
|
24
|
-
console.log(chalk.dim(' SV_CLOUD_ENDPOINT=https://xxx.r2.cloudflarestorage.com'));
|
|
25
|
-
console.log(chalk.dim(' SV_CLOUD_SECRET_KEY=your_api_token'));
|
|
26
|
-
console.log(chalk.dim(' SV_CLOUD_ENCRYPTION_KEY=your_passphrase (optional)\n'));
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const config = loadConfig();
|
|
31
|
-
console.log(chalk.dim('\n Encrypting and uploading...'));
|
|
32
|
-
|
|
33
|
-
const result = await syncToCloud(config.dbPath, cloudConfig);
|
|
34
|
-
|
|
35
|
-
if (result.success) {
|
|
36
|
-
console.log(chalk.green('\n ✅ Cloud sync complete'));
|
|
37
|
-
console.log(` DB: ${(result.dbSize / 1024).toFixed(0)}KB → Encrypted: ${(result.encryptedSize / 1024).toFixed(0)}KB`);
|
|
38
|
-
console.log(chalk.dim(` ${result.timestamp}\n`));
|
|
39
|
-
} else {
|
|
40
|
-
console.log(chalk.red(`\n ❌ Sync failed: ${result.error}\n`));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export async function cloudRestoreCommand() {
|
|
45
|
-
const cloudConfig = getCloudConfig();
|
|
46
|
-
if (!cloudConfig) {
|
|
47
|
-
console.log(chalk.red('\n Cloud not configured. See: sv cloud sync --help\n'));
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const config = loadConfig();
|
|
52
|
-
console.log(chalk.dim('\n Downloading and decrypting...'));
|
|
53
|
-
|
|
54
|
-
const result = await restoreFromCloud(config.dbPath, cloudConfig);
|
|
55
|
-
|
|
56
|
-
if (result.success) {
|
|
57
|
-
console.log(chalk.green('\n ✅ Restore complete'));
|
|
58
|
-
console.log(` Encrypted: ${(result.encryptedSize / 1024).toFixed(0)}KB → DB: ${(result.dbSize / 1024).toFixed(0)}KB`);
|
|
59
|
-
console.log(chalk.dim(' Previous DB backed up as .backup\n'));
|
|
60
|
-
} else {
|
|
61
|
-
console.log(chalk.red(`\n ❌ Restore failed: ${result.error}\n`));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export async function cloudStatusCommand() {
|
|
66
|
-
const state = getSyncState();
|
|
67
|
-
if (!state) {
|
|
68
|
-
console.log(chalk.yellow('\n No cloud sync history. Run: sv cloud sync\n'));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
console.log(chalk.bold('\n ☁️ Cloud Sync Status'));
|
|
73
|
-
console.log(` Last sync: ${state.lastSync}`);
|
|
74
|
-
console.log(` DB size: ${(state.dbSize / 1024).toFixed(0)}KB\n`);
|
|
75
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// stellavault contradictions — detect contradicting statements (F-A12)
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig, createKnowledgeHub } from '@stellavault/core';
|
|
5
|
-
import { detectContradictions } from '@stellavault/core';
|
|
6
|
-
|
|
7
|
-
export async function contradictionsCommand(_opts: any, cmd: any) {
|
|
8
|
-
const globalOpts = cmd?.parent?.opts?.() ?? {};
|
|
9
|
-
const jsonMode = globalOpts.json;
|
|
10
|
-
const config = loadConfig();
|
|
11
|
-
const hub = createKnowledgeHub(config);
|
|
12
|
-
|
|
13
|
-
console.error(chalk.dim('Scanning for contradictions...'));
|
|
14
|
-
await hub.store.initialize();
|
|
15
|
-
await hub.embedder.initialize();
|
|
16
|
-
|
|
17
|
-
const pairs = await detectContradictions(hub.store, 20);
|
|
18
|
-
await hub.store.close();
|
|
19
|
-
|
|
20
|
-
if (jsonMode) {
|
|
21
|
-
console.log(JSON.stringify({ count: pairs.length, contradictions: pairs }, null, 2));
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
console.log('');
|
|
26
|
-
console.log(chalk.bold(` ⚡ ${pairs.length} potential contradictions found`));
|
|
27
|
-
console.log('');
|
|
28
|
-
|
|
29
|
-
for (const p of pairs) {
|
|
30
|
-
const confColor = p.confidence >= 0.8 ? chalk.red : p.confidence >= 0.6 ? chalk.yellow : chalk.dim;
|
|
31
|
-
console.log(` ${confColor(`${Math.round(p.confidence * 100)}%`)} ${chalk.dim(`[${p.type}]`)} ${chalk.bold(p.docA.title)} vs ${chalk.bold(p.docB.title)}`);
|
|
32
|
-
console.log(` A: ${chalk.dim(p.docA.statement.slice(0, 80))}`);
|
|
33
|
-
console.log(` B: ${chalk.dim(p.docB.statement.slice(0, 80))}`);
|
|
34
|
-
console.log('');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (pairs.length === 0) {
|
|
38
|
-
console.log(chalk.green(' No contradictions detected. Your knowledge is consistent!'));
|
|
39
|
-
console.log('');
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// Design Ref: §4.2 — CLI stellavault decay 명령
|
|
2
|
-
// Plan SC: SC-03
|
|
3
|
-
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { loadConfig, createKnowledgeHub, DecayEngine } from '@stellavault/core';
|
|
6
|
-
|
|
7
|
-
export async function decayCommand(_opts: any, cmd: any) {
|
|
8
|
-
const globalOpts = cmd?.parent?.opts?.() ?? {};
|
|
9
|
-
const jsonMode = globalOpts.json;
|
|
10
|
-
const config = loadConfig();
|
|
11
|
-
const hub = createKnowledgeHub(config);
|
|
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 report = await decayEngine.computeAll();
|
|
24
|
-
|
|
25
|
-
if (jsonMode) {
|
|
26
|
-
console.log(JSON.stringify(report, null, 2));
|
|
27
|
-
await hub.store.close();
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
console.log(chalk.green('\n🧠 Knowledge Decay Report'));
|
|
32
|
-
console.log(chalk.dim('─'.repeat(50)));
|
|
33
|
-
console.log(` 📄 Total documents: ${report.totalDocuments}`);
|
|
34
|
-
console.log(` ⚠️ Decaying (R<0.5): ${chalk.yellow(String(report.decayingCount))}`);
|
|
35
|
-
console.log(` 🔴 Critical (R<0.3): ${chalk.red(String(report.criticalCount))}`);
|
|
36
|
-
console.log(` 📊 Average R: ${report.averageR}`);
|
|
37
|
-
console.log(chalk.dim('─'.repeat(50)));
|
|
38
|
-
|
|
39
|
-
if (report.topDecaying.length > 0) {
|
|
40
|
-
console.log(chalk.yellow('\n📋 Top Decaying Notes (리마인드 필요):'));
|
|
41
|
-
for (const d of report.topDecaying.slice(0, 20)) {
|
|
42
|
-
const rBar = '█'.repeat(Math.round(d.retrievability * 10)) + '░'.repeat(10 - Math.round(d.retrievability * 10));
|
|
43
|
-
const color = d.retrievability < 0.3 ? chalk.red : chalk.yellow;
|
|
44
|
-
console.log(` ${color(rBar)} R=${d.retrievability.toFixed(2)} | ${d.daysSinceAccess}d ago | ${d.title}`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (report.clusterHealth.length > 0) {
|
|
49
|
-
console.log(chalk.dim('\n📊 Cluster Health:'));
|
|
50
|
-
for (const c of report.clusterHealth.slice(0, 10)) {
|
|
51
|
-
const color = c.avgR < 0.3 ? chalk.red : c.avgR < 0.5 ? chalk.yellow : chalk.green;
|
|
52
|
-
console.log(` ${color(`R=${c.avgR.toFixed(2)}`)} | ${c.count} docs | ${c.label}`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
console.log(chalk.dim('\n💡 Tip: stellavault search <topic> to refresh decaying knowledge'));
|
|
57
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// stellavault digest — 주간 지식 활동 리포트
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig, createKnowledgeHub, DecayEngine } from '@stellavault/core';
|
|
5
|
-
|
|
6
|
-
export async function digestCommand(options: { days?: string }) {
|
|
7
|
-
const config = loadConfig();
|
|
8
|
-
const hub = createKnowledgeHub(config);
|
|
9
|
-
const days = parseInt(options.days ?? '7', 10);
|
|
10
|
-
|
|
11
|
-
await hub.store.initialize();
|
|
12
|
-
const db = hub.store.getDb() as any;
|
|
13
|
-
if (!db) { console.error(chalk.red('❌ DB 접근 불가')); process.exit(1); }
|
|
14
|
-
|
|
15
|
-
console.log(chalk.green(`\n📊 지식 활동 리포트 (최근 ${days}일)`));
|
|
16
|
-
console.log(chalk.dim('─'.repeat(50)));
|
|
17
|
-
|
|
18
|
-
// 1. 접근 통계
|
|
19
|
-
const accessStats = db.prepare(`
|
|
20
|
-
SELECT access_type, COUNT(*) as cnt
|
|
21
|
-
FROM access_log WHERE accessed_at > datetime('now', '-${days} days')
|
|
22
|
-
GROUP BY access_type
|
|
23
|
-
`).all() as any[];
|
|
24
|
-
|
|
25
|
-
const totalAccess = accessStats.reduce((s: number, r: any) => s + r.cnt, 0);
|
|
26
|
-
console.log(`\n🔍 총 접근: ${chalk.bold(String(totalAccess))}회`);
|
|
27
|
-
for (const r of accessStats) {
|
|
28
|
-
const icon = r.access_type === 'view' ? '👁️' : r.access_type === 'search' ? '🔍' : '🤖';
|
|
29
|
-
console.log(` ${icon} ${r.access_type}: ${r.cnt}회`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 2. 가장 많이 본 노트
|
|
33
|
-
const topDocs = db.prepare(`
|
|
34
|
-
SELECT al.document_id, d.title, COUNT(*) as cnt
|
|
35
|
-
FROM access_log al
|
|
36
|
-
JOIN documents d ON d.id = al.document_id
|
|
37
|
-
WHERE al.accessed_at > datetime('now', '-${days} days')
|
|
38
|
-
GROUP BY al.document_id
|
|
39
|
-
ORDER BY cnt DESC LIMIT 10
|
|
40
|
-
`).all() as any[];
|
|
41
|
-
|
|
42
|
-
if (topDocs.length > 0) {
|
|
43
|
-
console.log(chalk.dim(`\n📄 가장 많이 접근한 노트:`));
|
|
44
|
-
for (const d of topDocs) {
|
|
45
|
-
const bar = '█'.repeat(Math.min(d.cnt, 20));
|
|
46
|
-
console.log(` ${chalk.cyan(bar)} ${d.cnt}회 ${d.title}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// 3. 일별 활동량
|
|
51
|
-
const dailyActivity = db.prepare(`
|
|
52
|
-
SELECT date(accessed_at) as day, COUNT(*) as cnt
|
|
53
|
-
FROM access_log WHERE accessed_at > datetime('now', '-${days} days')
|
|
54
|
-
GROUP BY day ORDER BY day
|
|
55
|
-
`).all() as any[];
|
|
56
|
-
|
|
57
|
-
if (dailyActivity.length > 0) {
|
|
58
|
-
console.log(chalk.dim('\n📅 일별 활동:'));
|
|
59
|
-
const maxCnt = Math.max(...dailyActivity.map((d: any) => d.cnt));
|
|
60
|
-
for (const d of dailyActivity) {
|
|
61
|
-
const barLen = Math.round((d.cnt / maxCnt) * 20);
|
|
62
|
-
const bar = '█'.repeat(barLen) + '░'.repeat(20 - barLen);
|
|
63
|
-
console.log(` ${d.day.slice(5)} ${chalk.green(bar)} ${d.cnt}`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// 4. type별 분포
|
|
68
|
-
const typeStats = db.prepare(`
|
|
69
|
-
SELECT d.type, COUNT(DISTINCT al.document_id) as cnt
|
|
70
|
-
FROM access_log al
|
|
71
|
-
JOIN documents d ON d.id = al.document_id
|
|
72
|
-
WHERE al.accessed_at > datetime('now', '-${days} days')
|
|
73
|
-
GROUP BY d.type ORDER BY cnt DESC
|
|
74
|
-
`).all() as any[];
|
|
75
|
-
|
|
76
|
-
if (typeStats.length > 0) {
|
|
77
|
-
console.log(chalk.dim('\n📊 접근한 노트 유형:'));
|
|
78
|
-
for (const t of typeStats) {
|
|
79
|
-
console.log(` ${t.type}: ${t.cnt}개`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// 5. 감쇠 변화
|
|
84
|
-
const decayEngine = new DecayEngine(db);
|
|
85
|
-
const report = await decayEngine.computeAll();
|
|
86
|
-
console.log(`\n🧠 건강도: R=${report.averageR} | 감쇠 ${report.decayingCount}개 | 위험 ${report.criticalCount}개`);
|
|
87
|
-
|
|
88
|
-
console.log(chalk.dim('\n═'.repeat(50)));
|
|
89
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// Design Ref: stellavault duplicates — 중복/유사 노트 탐지 CLI
|
|
2
|
-
|
|
3
|
-
import chalk from 'chalk';
|
|
4
|
-
import { loadConfig, createKnowledgeHub, detectDuplicates } from '@stellavault/core';
|
|
5
|
-
|
|
6
|
-
export async function duplicatesCommand(options: { threshold?: string }) {
|
|
7
|
-
const config = loadConfig();
|
|
8
|
-
const hub = createKnowledgeHub(config);
|
|
9
|
-
const threshold = parseFloat(options.threshold ?? '0.88');
|
|
10
|
-
|
|
11
|
-
console.error(chalk.dim('⏳ Scanning for duplicates...'));
|
|
12
|
-
await hub.store.initialize();
|
|
13
|
-
await hub.embedder.initialize();
|
|
14
|
-
|
|
15
|
-
const pairs = await detectDuplicates(hub.store, threshold, 20);
|
|
16
|
-
|
|
17
|
-
if (pairs.length === 0) {
|
|
18
|
-
console.log(chalk.green('\n✨ 중복 노트가 없습니다!'));
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
console.log(chalk.yellow(`\n🔍 유사 노트 ${pairs.length}쌍 발견 (threshold: ${threshold})`));
|
|
23
|
-
console.log(chalk.dim('─'.repeat(60)));
|
|
24
|
-
|
|
25
|
-
for (let i = 0; i < pairs.length; i++) {
|
|
26
|
-
const p = pairs[i];
|
|
27
|
-
const pct = Math.round(p.similarity * 100);
|
|
28
|
-
const color = pct >= 95 ? chalk.red : chalk.yellow;
|
|
29
|
-
|
|
30
|
-
console.log(`\n${chalk.bold(`[${i + 1}]`)} ${color(`${pct}% 유사`)}`);
|
|
31
|
-
console.log(` A: ${chalk.cyan(p.docA.title)}`);
|
|
32
|
-
console.log(` ${chalk.dim(p.docA.filePath)}`);
|
|
33
|
-
console.log(` B: ${chalk.cyan(p.docB.title)}`);
|
|
34
|
-
console.log(` ${chalk.dim(p.docB.filePath)}`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
console.log(chalk.dim('\n💡 Obsidian에서 직접 병합하거나 삭제하세요'));
|
|
38
|
-
}
|