stellavault 0.3.0 → 0.4.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/Autonomous_Knowledge_Foundry.pdf +0 -0
- package/CHANGELOG.md +60 -0
- package/README.md +140 -95
- package/package.json +1 -1
- package/packages/cli/dist/commands/ask-cmd.d.ts +4 -0
- package/packages/cli/dist/commands/ask-cmd.js +35 -0
- package/packages/cli/dist/commands/autopilot-cmd.d.ts +4 -0
- package/packages/cli/dist/commands/autopilot-cmd.js +76 -0
- package/packages/cli/dist/commands/compile-cmd.d.ts +6 -0
- package/packages/cli/dist/commands/compile-cmd.js +30 -0
- package/packages/cli/dist/commands/digest-cmd.d.ts +1 -0
- package/packages/cli/dist/commands/digest-cmd.js +57 -0
- package/packages/cli/dist/commands/fleeting-cmd.d.ts +4 -0
- package/packages/cli/dist/commands/fleeting-cmd.js +45 -0
- package/packages/cli/dist/commands/graph-cmd.js +13 -1
- package/packages/cli/dist/commands/ingest-cmd.d.ts +9 -0
- package/packages/cli/dist/commands/ingest-cmd.js +131 -0
- package/packages/cli/dist/commands/init-cmd.js +39 -1
- package/packages/cli/dist/commands/lint-cmd.d.ts +2 -0
- package/packages/cli/dist/commands/lint-cmd.js +61 -0
- package/packages/cli/dist/index.js +46 -1
- package/packages/cli/package.json +1 -1
- package/packages/core/dist/api/server.js +284 -0
- package/packages/core/dist/i18n/note-strings.d.ts +5 -0
- package/packages/core/dist/i18n/note-strings.js +94 -0
- package/packages/core/dist/index.d.ts +9 -0
- package/packages/core/dist/index.js +5 -0
- package/packages/core/dist/intelligence/ask-engine.d.ts +23 -0
- package/packages/core/dist/intelligence/ask-engine.js +108 -0
- package/packages/core/dist/intelligence/ingest-pipeline.d.ts +31 -0
- package/packages/core/dist/intelligence/ingest-pipeline.js +192 -0
- package/packages/core/dist/intelligence/knowledge-lint.d.ts +27 -0
- package/packages/core/dist/intelligence/knowledge-lint.js +132 -0
- package/packages/core/dist/intelligence/wiki-compiler.d.ts +30 -0
- package/packages/core/dist/intelligence/wiki-compiler.js +222 -0
- package/packages/core/dist/intelligence/youtube-extractor.d.ts +29 -0
- package/packages/core/dist/intelligence/youtube-extractor.js +311 -0
- package/packages/core/dist/intelligence/zettelkasten.d.ts +59 -0
- package/packages/core/dist/intelligence/zettelkasten.js +234 -0
- package/packages/core/dist/mcp/server.d.ts +2 -0
- package/packages/core/dist/mcp/server.js +18 -1
- package/packages/core/dist/mcp/tools/agentic-graph.d.ts +6 -0
- package/packages/core/dist/mcp/tools/agentic-graph.js +35 -7
- package/packages/core/dist/mcp/tools/ask.d.ts +29 -0
- package/packages/core/dist/mcp/tools/ask.js +40 -0
- package/packages/core/package.json +5 -1
|
Binary file
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.4.0] - 2026-04-06
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- **i18n Global Service** — Full EN/KO/JA/ZH language switcher for web UI; saved notes follow user's language setting
|
|
7
|
+
- **Web UI Ingest Panel** — Add knowledge from browser (+) button, no terminal needed
|
|
8
|
+
- **YouTube Deep Extraction** — Full description, transcript with clickable timestamps, auto-summary, metadata (channel, views, duration)
|
|
9
|
+
- **YouTube Transcript via yt-dlp** — Fallback to yt-dlp when YouTube bot protection blocks direct caption fetch
|
|
10
|
+
- **Edit/Delete Notes from Web** — Edit and delete notes directly from web UI, syncs to Obsidian vault
|
|
11
|
+
- **Ask Q&A Web UI** — Intelligence > Ask tab for querying your knowledge base from the browser
|
|
12
|
+
- **Reindex from Web** — One-click reindex button, no terminal needed
|
|
13
|
+
- **Recent Saves Navigation** — Click recent saves to navigate to node in 3D graph
|
|
14
|
+
- **Auto-index after Ingest** — New notes are automatically indexed and graph refreshes
|
|
15
|
+
- **Onboarding Guide** — 4-step walkthrough for new users
|
|
16
|
+
- **LLM Knowledge Base** — `stellavault ask` (Q&A + auto-filing), `compile` (raw→wiki), `lint` (health check), `digest --visual` (Mermaid charts)
|
|
17
|
+
- **Zettelkasten System** — Luhmann-style index codes, frontmatter scan, inbox zero, atomicity verification, orphan/broken link detection
|
|
18
|
+
- **Unified Ingest Pipeline** — URL/file/text auto-classification, `stellavault ingest`, `promote`, `autopilot` flywheel
|
|
19
|
+
- **Fleeting Capture** — `stellavault fleeting` for quick thoughts
|
|
20
|
+
|
|
21
|
+
### Fixes
|
|
22
|
+
- YouTube extractor v2 — HTML entities, tags cleanup, summary quality, duplicate frontmatter removal
|
|
23
|
+
- YouTube full description extraction (shortDescription JSON parsing)
|
|
24
|
+
- CLI YouTube ingest now properly calls extractYouTubeContent instead of basic HTML scrape
|
|
25
|
+
- Strict node matching — exact title/path only, no partial match
|
|
26
|
+
- React hooks order in Layout, ConstellationView, MultiverseView
|
|
27
|
+
- Natural Korean translations (감쇠→잊고 있는 것, 갭→빠진 지식)
|
|
28
|
+
- Reindex API — pass vaultPath, use all-MiniLM-L6-v2, error details
|
|
29
|
+
|
|
30
|
+
### Security
|
|
31
|
+
- Path traversal protection (archiveFile, ingest)
|
|
32
|
+
- YAML injection prevention (sanitizeYaml)
|
|
33
|
+
- SSRF protection (private IP blocking)
|
|
34
|
+
- Empty catch blocks → proper error logging
|
|
35
|
+
|
|
36
|
+
### Infrastructure
|
|
37
|
+
- MCP: 19 tools | CLI: 36+ commands | Tests: 127 ALL PASS
|
|
38
|
+
- Hardcoded Korean removed — core modules default to English
|
|
39
|
+
- Subpath exports for youtube-extractor module
|
|
40
|
+
|
|
41
|
+
## [0.3.0] - 2026-04-04
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
- 3D Knowledge Graph with Three.js / React Three Fiber
|
|
45
|
+
- Hybrid search (vector + keyword + RRF)
|
|
46
|
+
- Memory decay tracking (FSRS algorithm)
|
|
47
|
+
- MCP server with 16 tools
|
|
48
|
+
- Notion ↔ Obsidian sync (packages/sync)
|
|
49
|
+
- Web UI with constellation/multiverse views
|
|
50
|
+
|
|
51
|
+
## [0.2.0] - 2026-04-03
|
|
52
|
+
|
|
53
|
+
- Initial Obsidian vault indexer
|
|
54
|
+
- Vector store with all-MiniLM-L6-v2
|
|
55
|
+
- Basic CLI commands
|
|
56
|
+
|
|
57
|
+
## [0.1.0] - 2026-04-02
|
|
58
|
+
|
|
59
|
+
- Project inception
|
|
60
|
+
- Notion-Obsidian sync tool
|
package/README.md
CHANGED
|
@@ -2,23 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
> **Notes die in folders. Stellavault keeps your knowledge alive.**
|
|
4
4
|
|
|
5
|
-
Your Obsidian vault is more than files
|
|
5
|
+
Your Obsidian vault is more than files — it's a living network. Stellavault turns it into a self-compiling knowledge system that **discovers hidden connections**, **tracks fading memories**, **finds blind spots**, and **gives AI agents direct access to everything you know**.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="images/screenshots/graph-dark-full.png" alt="3D Knowledge Graph" width="800" />
|
|
9
|
+
<br><em>Your vault as a neural network. Clusters form constellations.</em>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
## Why Stellavault?
|
|
13
|
+
|
|
14
|
+
| Problem | Stellavault Solution |
|
|
15
|
+
|---------|---------------------|
|
|
16
|
+
| Notes pile up but never become knowledge | **Self-compiling wiki** — raw notes auto-organized into linked concepts |
|
|
17
|
+
| You forget what you wrote | **FSRS decay tracking** — see what's fading, get review suggestions |
|
|
18
|
+
| Search finds words, not meaning | **Hybrid AI search** — BM25 + vector + RRF fusion, locally |
|
|
19
|
+
| AI agents can't access your knowledge | **17 MCP tools** — Claude remembers everything you know |
|
|
20
|
+
| No way to see the big picture | **3D neural graph** — constellations, heatmaps, timeline |
|
|
21
|
+
|
|
22
|
+
## 5-Minute Setup
|
|
8
23
|
|
|
9
24
|
```bash
|
|
10
|
-
# Install
|
|
25
|
+
# Install
|
|
11
26
|
npm install -g stellavault
|
|
12
27
|
|
|
13
|
-
# Interactive setup
|
|
28
|
+
# Interactive setup (indexes your vault + verifies search)
|
|
14
29
|
stellavault init
|
|
15
30
|
|
|
16
|
-
#
|
|
17
|
-
stellavault index /path/to/obsidian/vault
|
|
31
|
+
# Launch 3D graph + API server
|
|
18
32
|
stellavault graph
|
|
19
33
|
```
|
|
20
34
|
|
|
21
|
-
|
|
35
|
+
> **Prerequisites**: Node.js 20+ (`node --version`)
|
|
22
36
|
|
|
23
37
|
## Give Your AI Agent Memory
|
|
24
38
|
|
|
@@ -26,77 +40,81 @@ That's it. Open `http://localhost:5173` to see your knowledge come alive in 3D.
|
|
|
26
40
|
claude mcp add stellavault -- stellavault serve
|
|
27
41
|
```
|
|
28
42
|
|
|
29
|
-
Now Claude Code can search your notes, track
|
|
43
|
+
Now Claude Code can search your notes, track decisions, detect knowledge gaps, and generate daily briefings — using 17 MCP tools.
|
|
44
|
+
|
|
45
|
+
## Screenshots
|
|
30
46
|
|
|
31
|
-
|
|
47
|
+
<p align="center">
|
|
48
|
+
<img src="images/screenshots/graph-search-highlight.png" alt="Semantic Search" width="800" />
|
|
49
|
+
<br><em>Search by meaning. Matching nodes pulse and glow.</em>
|
|
50
|
+
</p>
|
|
32
51
|
|
|
33
|
-
|
|
52
|
+
<details>
|
|
53
|
+
<summary>More screenshots</summary>
|
|
34
54
|
|
|
35
|
-
|
|
55
|
+
| Light Mode | Timeline Slider | Heatmap |
|
|
56
|
+
|:---:|:---:|:---:|
|
|
57
|
+
| <img src="images/screenshots/graph-light-mode.png" width="260" /> | <img src="images/screenshots/graph-timeline.png" width="260" /> | <img src="images/screenshots/graph-heatmap.png" width="260" /> |
|
|
36
58
|
|
|
37
|
-
|
|
59
|
+
</details>
|
|
38
60
|
|
|
39
|
-
|
|
61
|
+
## Core Workflow
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
```
|
|
64
|
+
Capture → Compile → Connect → Review
|
|
65
|
+
|
|
66
|
+
stellavault fleeting "idea" # Instant capture
|
|
67
|
+
stellavault ingest <url> # Clip any URL/file
|
|
68
|
+
stellavault compile # Raw → structured wiki
|
|
69
|
+
stellavault autopilot # Full flywheel: inbox → compile → lint
|
|
70
|
+
stellavault ask "question" # Q&A with auto-filing (--save)
|
|
71
|
+
stellavault lint # Knowledge health check (score 0-100)
|
|
72
|
+
```
|
|
42
73
|
|
|
43
|
-
##
|
|
74
|
+
## Daily Commands
|
|
44
75
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
| **Platform** | Web dashboard, PWA, voice capture (Whisper), Notion sync, multi-vault, i18n (en/ko/ja/zh) |
|
|
54
|
-
| **Extensibility** | Plugin SDK, webhook system, Knowledge Pack marketplace |
|
|
76
|
+
```bash
|
|
77
|
+
stellavault brief # Morning knowledge briefing
|
|
78
|
+
stellavault decay # What's fading from memory?
|
|
79
|
+
stellavault learn # AI-generated learning path
|
|
80
|
+
stellavault digest --visual # Weekly report with Mermaid charts
|
|
81
|
+
stellavault review # FSRS spaced repetition session
|
|
82
|
+
stellavault gaps # Knowledge gap detection
|
|
83
|
+
```
|
|
55
84
|
|
|
56
|
-
##
|
|
85
|
+
## Intelligence Features
|
|
86
|
+
|
|
87
|
+
| Feature | Command | What it does |
|
|
88
|
+
|---------|---------|-------------|
|
|
89
|
+
| **FSRS Decay** | `sv decay` | Track memory strength with spaced repetition |
|
|
90
|
+
| **Gap Detection** | `sv gaps` | Find missing connections between topics |
|
|
91
|
+
| **Contradiction Detection** | `sv contradictions` | Spot conflicting statements |
|
|
92
|
+
| **Duplicate Detection** | `sv duplicates` | Find redundant notes |
|
|
93
|
+
| **Knowledge Lint** | `sv lint` | Health score + issues + suggestions |
|
|
94
|
+
| **Learning Path** | `sv learn` | AI-recommended review order |
|
|
95
|
+
| **Semantic Evolution** | MCP `get-evolution` | Track how ideas change over time |
|
|
96
|
+
| **Code Linker** | MCP `link-code` | Connect code files to knowledge notes |
|
|
97
|
+
| **Adaptive Search** | MCP `search` | Context-aware result reranking |
|
|
98
|
+
|
|
99
|
+
## Zettelkasten Automation
|
|
100
|
+
|
|
101
|
+
Inspired by Luhmann + Karpathy's "Self-Compiling Zettelkasten":
|
|
57
102
|
|
|
58
103
|
```bash
|
|
59
|
-
#
|
|
60
|
-
stellavault
|
|
61
|
-
stellavault
|
|
62
|
-
stellavault
|
|
63
|
-
stellavault
|
|
64
|
-
stellavault serve # MCP server for AI agents
|
|
65
|
-
stellavault status # Index stats
|
|
66
|
-
|
|
67
|
-
# Intelligence
|
|
68
|
-
stellavault decay # What's fading?
|
|
69
|
-
stellavault learn # AI learning path
|
|
70
|
-
stellavault brief # Daily knowledge briefing
|
|
71
|
-
stellavault digest # Weekly report
|
|
72
|
-
stellavault review # FSRS review session
|
|
73
|
-
stellavault gaps # Knowledge gap detection
|
|
74
|
-
stellavault duplicates # Duplicate detection
|
|
75
|
-
stellavault contradictions # Contradiction detection
|
|
76
|
-
|
|
77
|
-
# Federation
|
|
78
|
-
stellavault federate join # Join P2P network
|
|
79
|
-
stellavault federate status # Node identity
|
|
80
|
-
|
|
81
|
-
# Multi-Vault
|
|
82
|
-
stellavault vault add <id> <path> # Register a vault
|
|
83
|
-
stellavault vault search-all <q> # Search across all vaults
|
|
84
|
-
|
|
85
|
-
# Cloud
|
|
86
|
-
stellavault cloud sync # E2E encrypted backup
|
|
87
|
-
stellavault cloud restore # Restore from cloud
|
|
88
|
-
|
|
89
|
-
# More
|
|
90
|
-
stellavault clip <url> # Web/YouTube clipper
|
|
91
|
-
stellavault sync # Notion → Obsidian
|
|
92
|
-
stellavault capture <audio> # Voice → knowledge (Whisper)
|
|
93
|
-
stellavault card # SVG profile card
|
|
94
|
-
stellavault pack <cmd> # Knowledge Pack management
|
|
104
|
+
stellavault fleeting "raw idea" # Capture → raw/
|
|
105
|
+
stellavault ingest https://article.com # Any URL → auto-classified
|
|
106
|
+
stellavault compile # Raw → wiki with concepts + backlinks
|
|
107
|
+
stellavault promote file.md --to permanent # Upgrade note stage
|
|
108
|
+
stellavault autopilot # Full cycle: inbox → compile → lint → archive
|
|
95
109
|
```
|
|
96
110
|
|
|
97
|
-
|
|
111
|
+
- **Frontmatter-first scanning** — 10x token reduction
|
|
112
|
+
- **Luhmann index codes** — auto-assigned hierarchical numbering (1A → 1A1)
|
|
113
|
+
- **Inbox Zero** — processed notes auto-archived
|
|
114
|
+
- **Atomicity check** — detects notes with too many topics
|
|
115
|
+
- **3-stage classification** — fleeting → literature → permanent
|
|
98
116
|
|
|
99
|
-
## MCP Tools (17
|
|
117
|
+
## MCP Tools (17)
|
|
100
118
|
|
|
101
119
|
| Tool | What it does |
|
|
102
120
|
|------|-------------|
|
|
@@ -107,32 +125,38 @@ Use short alias `sv` for all commands: `sv graph`, `sv decay`, `sv learn`
|
|
|
107
125
|
| `get-decay-status` | Memory decay report |
|
|
108
126
|
| `get-morning-brief` | Daily knowledge briefing |
|
|
109
127
|
| `get-learning-path` | AI learning recommendations |
|
|
110
|
-
| `
|
|
111
|
-
| `
|
|
112
|
-
| `
|
|
113
|
-
| `
|
|
128
|
+
| `detect-gaps` | Knowledge gap analysis |
|
|
129
|
+
| `get-evolution` | Semantic drift tracking |
|
|
130
|
+
| `link-code` | Code-knowledge connections |
|
|
131
|
+
| `ask` | Q&A with optional vault filing |
|
|
132
|
+
| `create-knowledge-node` | AI creates wiki-quality notes |
|
|
133
|
+
| `create-knowledge-link` | AI connects existing notes |
|
|
134
|
+
| `log-decision` / `find-decisions` | Decision journal |
|
|
114
135
|
| `create-snapshot` / `load-snapshot` | Context snapshots |
|
|
115
136
|
| `generate-claude-md` | Auto-generate CLAUDE.md |
|
|
116
137
|
| `export` | JSON/CSV export |
|
|
117
138
|
|
|
118
|
-
##
|
|
139
|
+
## 3D Visualization
|
|
119
140
|
|
|
120
|
-
|
|
141
|
+
- **Neural graph** — force-directed layout with cluster coloring
|
|
142
|
+
- **Constellation view** — MST-based star patterns with LOD zoom
|
|
143
|
+
- **Heatmap overlay** — activity score (cold → fire gradient)
|
|
144
|
+
- **Timeline slider** — filter by creation/modification date
|
|
145
|
+
- **Multiverse view** — see connected Federation peers
|
|
146
|
+
- **Decay overlay** — visualize fading knowledge
|
|
147
|
+
- **Dark/Light theme** — monochrome light mode with color-on-interaction
|
|
148
|
+
- **Export** — PNG screenshots + WebM recording
|
|
121
149
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
federation> search kubernetes deployment
|
|
126
|
-
# 87% "K8s Rolling Update Guide" [peer-alice]
|
|
127
|
-
# Kubernetes에서 무중단 배포를 위해...
|
|
128
|
-
federation> peers
|
|
129
|
-
# alice (1,209 docs) [trust: 88]
|
|
130
|
-
# bob (47 docs) [trust: 72]
|
|
131
|
-
```
|
|
150
|
+
## Obsidian Plugin
|
|
151
|
+
|
|
152
|
+
Manual install (community plugin review pending):
|
|
132
153
|
|
|
133
|
-
|
|
154
|
+
1. Download `main.js`, `manifest.json`, `styles.css` from [GitHub Releases](https://github.com/Evanciel/stellavault-obsidian/releases/tag/0.1.0)
|
|
155
|
+
2. Copy to `.obsidian/plugins/stellavault/`
|
|
156
|
+
3. Enable in Settings > Community plugins
|
|
157
|
+
4. **Run `stellavault graph` first** — the plugin connects to the API server
|
|
134
158
|
|
|
135
|
-
|
|
159
|
+
Features: semantic search modal, memory decay sidebar, learning path suggestions.
|
|
136
160
|
|
|
137
161
|
## Architecture
|
|
138
162
|
|
|
@@ -140,8 +164,8 @@ federation> peers
|
|
|
140
164
|
stellavault/
|
|
141
165
|
├── packages/
|
|
142
166
|
│ ├── core/ Search, MCP, API, Intelligence, Federation, Cloud, Team, i18n
|
|
143
|
-
│ ├── cli/
|
|
144
|
-
│ ├── graph/ 3D visualization
|
|
167
|
+
│ ├── cli/ 36+ commands
|
|
168
|
+
│ ├── graph/ 3D visualization (React Three Fiber)
|
|
145
169
|
│ └── sync/ Notion ↔ Obsidian sync
|
|
146
170
|
```
|
|
147
171
|
|
|
@@ -153,23 +177,44 @@ stellavault/
|
|
|
153
177
|
| Vector Store | SQLite-vec (local, no server) |
|
|
154
178
|
| Embedding | all-MiniLM-L6-v2 (local, no API key) |
|
|
155
179
|
| Search | BM25 + Cosine + RRF Fusion |
|
|
156
|
-
| 3D | React Three Fiber + Three.js + Zustand |
|
|
157
180
|
| Memory | FSRS (Free Spaced Repetition Scheduler) |
|
|
181
|
+
| 3D | React Three Fiber + Three.js + Zustand |
|
|
158
182
|
| P2P | Hyperswarm (NAT traversal + DHT) |
|
|
159
183
|
| AI | MCP (Model Context Protocol) |
|
|
160
184
|
| Security | AES-256-GCM, HMAC-SHA256, Differential Privacy |
|
|
161
185
|
|
|
162
|
-
##
|
|
186
|
+
## Troubleshooting
|
|
187
|
+
|
|
188
|
+
<details>
|
|
189
|
+
<summary>"Stellavault API server not found"</summary>
|
|
190
|
+
|
|
191
|
+
The Obsidian plugin and 3D graph require the API server. Open a terminal in your vault:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
stellavault graph
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Default port: 3333. Change in `.stellavault.json`: `{ "mcp": { "port": 3334 } }`
|
|
198
|
+
</details>
|
|
163
199
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
200
|
+
<details>
|
|
201
|
+
<summary>"No documents indexed"</summary>
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
stellavault index /path/to/your/vault
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
First indexing takes 2-5 minutes for large vaults (1000+ notes).
|
|
208
|
+
</details>
|
|
209
|
+
|
|
210
|
+
<details>
|
|
211
|
+
<summary>Port conflict</summary>
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Use a different port
|
|
215
|
+
stellavault graph --port 3334
|
|
172
216
|
```
|
|
217
|
+
</details>
|
|
173
218
|
|
|
174
219
|
## License
|
|
175
220
|
|
|
@@ -177,6 +222,6 @@ MIT
|
|
|
177
222
|
|
|
178
223
|
## Links
|
|
179
224
|
|
|
225
|
+
- [Obsidian Plugin](https://github.com/Evanciel/stellavault-obsidian)
|
|
180
226
|
- [Wiki: Vault Structure Guide](docs/wiki/vault-structure.md)
|
|
181
|
-
- [Wiki: Notion Setup](docs/wiki/notion-setup.md)
|
|
182
227
|
- [Wiki: Federation Guide](docs/wiki/federation-guide.md)
|
package/package.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// stellavault ask — Q&A + auto-filing CLI command
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { loadConfig, createKnowledgeHub, askVault } from '@stellavault/core';
|
|
4
|
+
export async function askCommand(question, options) {
|
|
5
|
+
if (!question || question.trim().length < 2) {
|
|
6
|
+
console.error(chalk.yellow('Usage: stellavault ask "your question here" [--save]'));
|
|
7
|
+
console.error(chalk.dim('\nSearch Mode: finds relevant notes from your vault.'));
|
|
8
|
+
console.error(chalk.dim('For AI-powered answers, use MCP: claude mcp add stellavault -- stellavault serve'));
|
|
9
|
+
process.exit(1);
|
|
10
|
+
}
|
|
11
|
+
const config = loadConfig();
|
|
12
|
+
const hub = createKnowledgeHub(config);
|
|
13
|
+
console.error(chalk.dim('Searching your knowledge (local search mode)...'));
|
|
14
|
+
await hub.store.initialize();
|
|
15
|
+
await hub.embedder.initialize();
|
|
16
|
+
const result = await askVault(hub.searchEngine, question, {
|
|
17
|
+
limit: 10,
|
|
18
|
+
save: options.save ?? false,
|
|
19
|
+
vaultPath: config.vaultPath,
|
|
20
|
+
});
|
|
21
|
+
// 출력
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log(result.answer);
|
|
24
|
+
if (result.savedTo) {
|
|
25
|
+
console.log('');
|
|
26
|
+
console.log(chalk.green(`Saved to: ${result.savedTo}`));
|
|
27
|
+
}
|
|
28
|
+
if (result.sources.length > 0 && !options.save) {
|
|
29
|
+
console.log('');
|
|
30
|
+
console.log(chalk.dim('Tip: Add --save to file this answer into your vault.'));
|
|
31
|
+
console.log(chalk.dim('For AI-generated answers: use Claude Code with MCP integration.'));
|
|
32
|
+
}
|
|
33
|
+
await hub.store.close?.();
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=ask-cmd.js.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// stellavault autopilot — 자율형 지식 플라이휠
|
|
2
|
+
// ingest(inbox) → compile → lint → index → 반복
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { loadConfig, createKnowledgeHub, compileWiki, lintKnowledge, getInboxItems, archiveFile } from '@stellavault/core';
|
|
5
|
+
import { resolve } from 'node:path';
|
|
6
|
+
export async function autopilotCommand(options) {
|
|
7
|
+
const config = loadConfig();
|
|
8
|
+
const vaultPath = config.vaultPath;
|
|
9
|
+
console.log(chalk.bold('\n ✦ Stellavault Autopilot'));
|
|
10
|
+
console.log(chalk.dim(' Knowledge flywheel: inbox → compile → lint → repeat\n'));
|
|
11
|
+
// Step 1: Inbox 확인
|
|
12
|
+
console.log(chalk.cyan('Step 1/4: Checking inbox...'));
|
|
13
|
+
const inbox = getInboxItems(vaultPath);
|
|
14
|
+
if (inbox.length === 0) {
|
|
15
|
+
console.log(chalk.dim(' No new items in raw/ folder.'));
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
console.log(chalk.green(` ${inbox.length} new items found.`));
|
|
19
|
+
for (const item of inbox.slice(0, 5)) {
|
|
20
|
+
console.log(chalk.dim(` - ${item.title} (${item.wordCount} words)`));
|
|
21
|
+
}
|
|
22
|
+
if (inbox.length > 5)
|
|
23
|
+
console.log(chalk.dim(` ... and ${inbox.length - 5} more`));
|
|
24
|
+
}
|
|
25
|
+
// Step 2: Compile
|
|
26
|
+
console.log(chalk.cyan('\nStep 2/4: Compiling wiki...'));
|
|
27
|
+
const rawPath = resolve(vaultPath, 'raw');
|
|
28
|
+
const wikiPath = resolve(vaultPath, '_wiki');
|
|
29
|
+
const compileResult = compileWiki(rawPath, wikiPath);
|
|
30
|
+
if (compileResult.rawDocCount > 0) {
|
|
31
|
+
console.log(chalk.green(` Compiled ${compileResult.rawDocCount} raw → ${compileResult.wikiArticles.length} wiki articles`));
|
|
32
|
+
console.log(chalk.dim(` Concepts: ${compileResult.concepts.length}`));
|
|
33
|
+
// Archive processed raw files
|
|
34
|
+
for (const item of inbox) {
|
|
35
|
+
try {
|
|
36
|
+
archiveFile(resolve(vaultPath, 'raw', item.filePath));
|
|
37
|
+
}
|
|
38
|
+
catch { /* skip */ }
|
|
39
|
+
}
|
|
40
|
+
console.log(chalk.dim(` Archived ${inbox.length} processed items.`));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
console.log(chalk.dim(' No raw documents to compile.'));
|
|
44
|
+
}
|
|
45
|
+
// Step 3: Lint
|
|
46
|
+
console.log(chalk.cyan('\nStep 3/4: Running health check...'));
|
|
47
|
+
const hub = createKnowledgeHub(config);
|
|
48
|
+
await hub.store.initialize();
|
|
49
|
+
const lintResult = await lintKnowledge(hub.store);
|
|
50
|
+
const scoreColor = lintResult.score >= 80 ? chalk.green : lintResult.score >= 50 ? chalk.yellow : chalk.red;
|
|
51
|
+
console.log(` Health: ${scoreColor(lintResult.score + '/100')}`);
|
|
52
|
+
const critical = lintResult.issues.filter(i => i.severity === 'critical').length;
|
|
53
|
+
const warnings = lintResult.issues.filter(i => i.severity === 'warning').length;
|
|
54
|
+
if (critical > 0)
|
|
55
|
+
console.log(chalk.red(` Critical: ${critical}`));
|
|
56
|
+
if (warnings > 0)
|
|
57
|
+
console.log(chalk.yellow(` Warnings: ${warnings}`));
|
|
58
|
+
// Step 4: Summary
|
|
59
|
+
console.log(chalk.cyan('\nStep 4/4: Summary'));
|
|
60
|
+
console.log(chalk.dim('─'.repeat(40)));
|
|
61
|
+
console.log(` Inbox processed: ${inbox.length}`);
|
|
62
|
+
console.log(` Wiki articles: ${compileResult.wikiArticles.length}`);
|
|
63
|
+
console.log(` Health score: ${lintResult.score}/100`);
|
|
64
|
+
console.log(` Issues: ${lintResult.issues.length}`);
|
|
65
|
+
if (lintResult.suggestions.length > 0) {
|
|
66
|
+
console.log(chalk.cyan('\n Suggestions:'));
|
|
67
|
+
for (const s of lintResult.suggestions.slice(0, 3)) {
|
|
68
|
+
console.log(chalk.dim(` → ${s}`));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
console.log(chalk.dim('\n─'.repeat(40)));
|
|
72
|
+
console.log(chalk.dim('\n Next: run `stellavault index` to update search vectors.'));
|
|
73
|
+
console.log(chalk.green(' Autopilot complete.\n'));
|
|
74
|
+
await hub.store.close?.();
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=autopilot-cmd.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// stellavault compile — raw → wiki 컴파일 CLI
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { loadConfig, compileWiki } from '@stellavault/core';
|
|
4
|
+
import { resolve } from 'node:path';
|
|
5
|
+
export async function compileCommand(options) {
|
|
6
|
+
const config = loadConfig();
|
|
7
|
+
const vaultPath = config.vaultPath;
|
|
8
|
+
const rawPath = resolve(vaultPath, options.raw ?? 'raw');
|
|
9
|
+
const wikiPath = resolve(vaultPath, options.wiki ?? '_wiki');
|
|
10
|
+
console.error(chalk.dim(`Raw: ${rawPath}`));
|
|
11
|
+
console.error(chalk.dim(`Wiki: ${wikiPath}`));
|
|
12
|
+
console.error('');
|
|
13
|
+
const result = compileWiki(rawPath, wikiPath, { force: options.force });
|
|
14
|
+
if (result.rawDocCount === 0) {
|
|
15
|
+
console.error(chalk.yellow(`No documents found in ${rawPath}`));
|
|
16
|
+
console.error(chalk.dim('Create a raw/ folder in your vault and add .md/.txt files.'));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
console.log(chalk.green(`Compiled ${result.rawDocCount} raw docs → ${result.wikiArticles.length} wiki articles`));
|
|
20
|
+
console.log(chalk.dim(`Concepts: ${result.concepts.length}`));
|
|
21
|
+
console.log(chalk.dim(`Index: ${result.indexFile}`));
|
|
22
|
+
if (result.concepts.length > 0) {
|
|
23
|
+
console.log('');
|
|
24
|
+
console.log(chalk.cyan('Top concepts:'));
|
|
25
|
+
for (const c of result.concepts.slice(0, 10)) {
|
|
26
|
+
console.log(` ${c}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=compile-cmd.js.map
|
|
@@ -75,5 +75,62 @@ export async function digestCommand(options) {
|
|
|
75
75
|
const report = await decayEngine.computeAll();
|
|
76
76
|
console.log(`\n🧠 건강도: R=${report.averageR} | 감쇠 ${report.decayingCount}개 | 위험 ${report.criticalCount}개`);
|
|
77
77
|
console.log(chalk.dim('\n═'.repeat(50)));
|
|
78
|
+
// --visual: Mermaid 다이어그램 + 요약을 .md로 저장
|
|
79
|
+
if (options.visual) {
|
|
80
|
+
const { writeFileSync, mkdirSync, existsSync } = await import('node:fs');
|
|
81
|
+
const { join, resolve } = await import('node:path');
|
|
82
|
+
const outputDir = resolve(config.vaultPath, '_stellavault/digests');
|
|
83
|
+
if (!existsSync(outputDir))
|
|
84
|
+
mkdirSync(outputDir, { recursive: true });
|
|
85
|
+
const date = new Date().toISOString().split('T')[0];
|
|
86
|
+
const filename = `digest-${date}.md`;
|
|
87
|
+
const outputPath = join(outputDir, filename);
|
|
88
|
+
// Mermaid 파이 차트
|
|
89
|
+
const pieData = (typeStats.length > 0 ? typeStats : [{ type: 'note', cnt: 1 }])
|
|
90
|
+
.map((t) => ` "${t.type}" : ${t.cnt}`)
|
|
91
|
+
.join('\n');
|
|
92
|
+
// Mermaid 타임라인
|
|
93
|
+
const timelineData = dailyActivity
|
|
94
|
+
.map((d) => ` ${d.day.slice(5)} : ${d.cnt}`)
|
|
95
|
+
.join('\n');
|
|
96
|
+
const md = [
|
|
97
|
+
'---',
|
|
98
|
+
`title: "Weekly Digest — ${date}"`,
|
|
99
|
+
'type: digest',
|
|
100
|
+
`date: ${new Date().toISOString()}`,
|
|
101
|
+
'source: stellavault-digest',
|
|
102
|
+
'---',
|
|
103
|
+
'',
|
|
104
|
+
`# Weekly Knowledge Digest — ${date}`,
|
|
105
|
+
'',
|
|
106
|
+
`## Summary`,
|
|
107
|
+
`- Total access: **${totalAccess}** in ${days} days`,
|
|
108
|
+
`- Average R: **${report.averageR.toFixed(2)}**`,
|
|
109
|
+
`- Decaying: ${report.decayingCount} | Critical: ${report.criticalCount}`,
|
|
110
|
+
'',
|
|
111
|
+
'## Activity by Type',
|
|
112
|
+
'```mermaid',
|
|
113
|
+
'pie title Note Types Accessed',
|
|
114
|
+
pieData,
|
|
115
|
+
'```',
|
|
116
|
+
'',
|
|
117
|
+
'## Daily Activity',
|
|
118
|
+
'```mermaid',
|
|
119
|
+
'xychart-beta',
|
|
120
|
+
` title "Daily Activity (${days} days)"`,
|
|
121
|
+
' x-axis [' + dailyActivity.map((d) => `"${d.day.slice(5)}"`).join(', ') + ']',
|
|
122
|
+
' y-axis "Access Count"',
|
|
123
|
+
' bar [' + dailyActivity.map((d) => d.cnt).join(', ') + ']',
|
|
124
|
+
'```',
|
|
125
|
+
'',
|
|
126
|
+
topDocs.length > 0 ? '## Most Accessed Notes\n' + topDocs.map((d) => `1. **${d.title}** — ${d.cnt} times`).join('\n') : '',
|
|
127
|
+
'',
|
|
128
|
+
'---',
|
|
129
|
+
`*Generated by \`stellavault digest --visual\` on ${new Date().toISOString()}*`,
|
|
130
|
+
].filter(Boolean).join('\n');
|
|
131
|
+
writeFileSync(outputPath, md, 'utf-8');
|
|
132
|
+
console.log(chalk.green(`\nVisual digest saved: ${filename}`));
|
|
133
|
+
console.log(chalk.dim(`Open in Obsidian to see Mermaid charts.`));
|
|
134
|
+
}
|
|
78
135
|
}
|
|
79
136
|
//# sourceMappingURL=digest-cmd.js.map
|