lemma-mcp 0.9.1 → 0.10.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/LICENSE +21 -21
- package/README.md +183 -155
- package/dist/db/database.d.ts +12 -0
- package/dist/db/database.d.ts.map +1 -0
- package/dist/db/database.js +77 -0
- package/dist/db/database.js.map +1 -0
- package/dist/db/index.d.ts +6 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +17 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/library-store.d.ts +117 -0
- package/dist/db/library-store.d.ts.map +1 -0
- package/dist/db/library-store.js +635 -0
- package/dist/db/library-store.js.map +1 -0
- package/dist/db/memory-store.d.ts +44 -0
- package/dist/db/memory-store.d.ts.map +1 -0
- package/dist/db/memory-store.js +414 -0
- package/dist/db/memory-store.js.map +1 -0
- package/dist/db/migration.d.ts +8 -0
- package/dist/db/migration.d.ts.map +1 -0
- package/dist/db/migration.js +243 -0
- package/dist/db/migration.js.map +1 -0
- package/dist/db/schema.d.ts +3 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +231 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/guides/core.d.ts +15 -0
- package/dist/guides/core.d.ts.map +1 -1
- package/dist/guides/core.js +430 -115
- package/dist/guides/core.js.map +1 -1
- package/dist/guides/index.d.ts +1 -1
- package/dist/guides/index.d.ts.map +1 -1
- package/dist/guides/index.js +1 -1
- package/dist/guides/index.js.map +1 -1
- package/dist/guides/seed.js +67 -67
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/intelligence/conflict.d.ts +6 -0
- package/dist/intelligence/conflict.d.ts.map +1 -0
- package/dist/intelligence/conflict.js +149 -0
- package/dist/intelligence/conflict.js.map +1 -0
- package/dist/intelligence/index.d.ts +6 -0
- package/dist/intelligence/index.d.ts.map +1 -0
- package/dist/intelligence/index.js +5 -0
- package/dist/intelligence/index.js.map +1 -0
- package/dist/intelligence/proactive.d.ts +9 -0
- package/dist/intelligence/proactive.d.ts.map +1 -0
- package/dist/intelligence/proactive.js +265 -0
- package/dist/intelligence/proactive.js.map +1 -0
- package/dist/intelligence/semantic.d.ts +23 -0
- package/dist/intelligence/semantic.d.ts.map +1 -0
- package/dist/intelligence/semantic.js +152 -0
- package/dist/intelligence/semantic.js.map +1 -0
- package/dist/intelligence/session-analytics.d.ts +6 -0
- package/dist/intelligence/session-analytics.d.ts.map +1 -0
- package/dist/intelligence/session-analytics.js +162 -0
- package/dist/intelligence/session-analytics.js.map +1 -0
- package/dist/intelligence/types.d.ts +43 -0
- package/dist/intelligence/types.d.ts.map +1 -0
- package/dist/intelligence/types.js +2 -0
- package/dist/intelligence/types.js.map +1 -0
- package/dist/memory/config.d.ts.map +1 -1
- package/dist/memory/config.js +3 -4
- package/dist/memory/config.js.map +1 -1
- package/dist/memory/core.d.ts +28 -0
- package/dist/memory/core.d.ts.map +1 -1
- package/dist/memory/core.js +598 -145
- package/dist/memory/core.js.map +1 -1
- package/dist/memory/index.d.ts +1 -2
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +1 -2
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/seed.js +87 -87
- package/dist/server/agents-md.d.ts.map +1 -1
- package/dist/server/agents-md.js +121 -43
- package/dist/server/agents-md.js.map +1 -1
- package/dist/server/handlers.d.ts +19 -0
- package/dist/server/handlers.d.ts.map +1 -1
- package/dist/server/handlers.js +568 -248
- package/dist/server/handlers.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +19 -22
- package/dist/server/index.js.map +1 -1
- package/dist/server/system-prompt.d.ts +2 -2
- package/dist/server/system-prompt.d.ts.map +1 -1
- package/dist/server/system-prompt.js +28 -119
- package/dist/server/system-prompt.js.map +1 -1
- package/dist/server/tools.d.ts.map +1 -1
- package/dist/server/tools.js +80 -1
- package/dist/server/tools.js.map +1 -1
- package/dist/sessions/core.d.ts.map +1 -1
- package/dist/sessions/core.js +140 -49
- package/dist/sessions/core.js.map +1 -1
- package/dist/types.d.ts +1 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +65 -66
- package/dist/memory/embeddings.d.ts +0 -20
- package/dist/memory/embeddings.d.ts.map +0 -1
- package/dist/memory/embeddings.js +0 -187
- package/dist/memory/embeddings.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Lemma Project Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lemma Project Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,155 +1,183 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="assets/logo.png" width="200" alt="Lemma Logo">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
# Lemma — Persistent Memory for LLMs via MCP
|
|
6
|
-
|
|
7
|
-
[English](README.md) | [Türkçe](docs/README.tr.md)
|
|
8
|
-
|
|
9
|
-
Lemma is an MCP server that gives LLMs persistent, cross-session memory. Memories are injected automatically into every session — no explicit tool call needed. Knowledge evolves through use: frequently accessed memories strengthen, unused ones fade, and patterns are promoted into reusable skills.
|
|
10
|
-
|
|
11
|
-
## Quick Start
|
|
12
|
-
|
|
13
|
-
Add Lemma to your MCP client configuration:
|
|
14
|
-
|
|
15
|
-
**Claude Desktop (Windows):** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
16
|
-
**Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
17
|
-
**
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
|
108
|
-
|
|
109
|
-
|
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
##
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.png" width="200" alt="Lemma Logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Lemma — Persistent Memory for LLMs via MCP
|
|
6
|
+
|
|
7
|
+
[English](README.md) | [Türkçe](docs/README.tr.md)
|
|
8
|
+
|
|
9
|
+
Lemma is an MCP server that gives LLMs persistent, cross-session memory. Memories are injected automatically into every session — no explicit tool call needed. Knowledge evolves through use: frequently accessed memories strengthen, unused ones fade, and patterns are promoted into reusable skills. An autonomous intelligence layer runs in the background — detecting conflicts, suggesting actions, and auto-linking related knowledge.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
Add Lemma to your MCP client configuration:
|
|
14
|
+
|
|
15
|
+
**Claude Desktop (Windows):** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
16
|
+
**Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
17
|
+
**Claude Code (Linux):** `~/.claude.json` or `~/.claude/settings.json`
|
|
18
|
+
**opencode:** `~/.config/opencode/opencode.json` (Linux/macOS) or `%APPDATA%\opencode\opencode.json` (Windows)
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"lemma": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "lemma-mcp@latest"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> Using `@latest` ensures npx always fetches the newest version.
|
|
32
|
+
|
|
33
|
+
**Requirements:** Node.js 20.0.0 or higher
|
|
34
|
+
|
|
35
|
+
### CLI Usage
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
lemma -lib # Library Mode: snapshot of your entire knowledge base
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Outputs a full analysis of all memories, guides, relations, stale fragments, distill candidates, and suggested actions. Useful for periodic maintenance and review.
|
|
42
|
+
|
|
43
|
+
## How It Works
|
|
44
|
+
|
|
45
|
+
Memories are injected into tool descriptions via `tools/list`. The LLM starts every session already knowing its most important memories — works on every MCP client.
|
|
46
|
+
|
|
47
|
+
**3-layer injection:**
|
|
48
|
+
- Full content for top memories (token-budgeted)
|
|
49
|
+
- Summary index for remaining memories
|
|
50
|
+
- Active guides with learnings
|
|
51
|
+
|
|
52
|
+
**Memory types:** `fact`, `pattern`, `lesson`, `warning`, `context`
|
|
53
|
+
|
|
54
|
+
**Knowledge pipeline:** Memory (what you know, `memory_add`) → Pattern (`type: "pattern"`) → Guide (how you work, `guide_distill` → `guide_practice`)
|
|
55
|
+
|
|
56
|
+
**AGENTS.md injection:** Lemma automatically injects a system prompt into your project's `AGENTS.md`, teaching the LLM how to use the memory system effectively. This ensures consistent behavior across all MCP clients.
|
|
57
|
+
|
|
58
|
+
## Autonomous Intelligence
|
|
59
|
+
|
|
60
|
+
Lemma runs intelligence in the background — no manual triggering needed:
|
|
61
|
+
|
|
62
|
+
- **Conflict Detection:** Automatically checks new memories against existing knowledge for contradictions. Reports conflicts with suggestions to resolve.
|
|
63
|
+
- **Proactive Suggestions:** After adding memories or practicing guides, suggests actions like distilling patterns, merging duplicates, or refining low-performing guides.
|
|
64
|
+
- **Auto-linking:** Frequently co-read memories and topic-overlapping fragments are automatically connected with relations.
|
|
65
|
+
|
|
66
|
+
Manual deep analysis is also available via dedicated tools.
|
|
67
|
+
|
|
68
|
+
## Tools (24)
|
|
69
|
+
|
|
70
|
+
### Memory (11)
|
|
71
|
+
|
|
72
|
+
| Tool | Purpose |
|
|
73
|
+
|------|---------|
|
|
74
|
+
| `memory_read` | Read/search fragments. Summary mode or full detail by ID |
|
|
75
|
+
| `memory_add` | Save findings. Auto-redacts secrets, detects duplicates and conflicts |
|
|
76
|
+
| `memory_update` | Update fragment by ID |
|
|
77
|
+
| `memory_feedback` | Positive/negative feedback, adjusts confidence |
|
|
78
|
+
| `memory_forget` | Delete fragment |
|
|
79
|
+
| `memory_merge` | Merge fragments, inherit relations & guide links |
|
|
80
|
+
| `memory_relate` | Create typed links (`contradicts`, `supersedes`, `supports`, `related_to`) |
|
|
81
|
+
| `memory_stats` | Fragment counts, confidence, project breakdown |
|
|
82
|
+
| `memory_audit` | Integrity check for orphans, duplicates, anomalies |
|
|
83
|
+
| `memory_library` | Full knowledge base snapshot with analysis signals and suggestions |
|
|
84
|
+
|
|
85
|
+
### Guides (8)
|
|
86
|
+
|
|
87
|
+
| Tool | Purpose |
|
|
88
|
+
|------|---------|
|
|
89
|
+
| `guide_get` | Get guides sorted by usage, filter by category or task |
|
|
90
|
+
| `guide_practice` | Record guide usage. Auto-creates guide if missing |
|
|
91
|
+
| `guide_create` | Create guide with detailed manual |
|
|
92
|
+
| `guide_distill` | Transform memory → guide learning (bidirectional link) |
|
|
93
|
+
| `guide_update` | Update guide properties, anti-patterns, pitfalls |
|
|
94
|
+
| `guide_forget` | Remove guide |
|
|
95
|
+
| `guide_merge` | Merge guides, inherit source memories |
|
|
96
|
+
|
|
97
|
+
### Sessions (3)
|
|
98
|
+
|
|
99
|
+
| Tool | Purpose |
|
|
100
|
+
|------|---------|
|
|
101
|
+
| `session_start` | Start traced session, pre-loads relevant context |
|
|
102
|
+
| `session_end` | End session with review, auto-linking, and suggestions |
|
|
103
|
+
| `session_stats` | Virtual session statistics |
|
|
104
|
+
|
|
105
|
+
### Intelligence (4)
|
|
106
|
+
|
|
107
|
+
| Tool | Purpose |
|
|
108
|
+
|------|---------|
|
|
109
|
+
| `conflict_scan` | Scan all memories for contradictions |
|
|
110
|
+
| `proactive_analysis` | Full knowledge base analysis: stale, orphan, distill, deprecated |
|
|
111
|
+
| `project_analytics` | Cross-session project health, growth rate, skill coverage |
|
|
112
|
+
| `semantic_search` | TF-IDF similarity search across memories |
|
|
113
|
+
|
|
114
|
+
## Configuration
|
|
115
|
+
|
|
116
|
+
Optional config at `~/.lemma/config.json`:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"token_budget": {
|
|
121
|
+
"full_content": 5000,
|
|
122
|
+
"summary_index": 1000,
|
|
123
|
+
"guides_detail": 1000
|
|
124
|
+
},
|
|
125
|
+
"injection": {
|
|
126
|
+
"max_full_content_fragments": 15,
|
|
127
|
+
"max_summary_fragments": 30,
|
|
128
|
+
"max_guides": 20
|
|
129
|
+
},
|
|
130
|
+
"virtual_session": {
|
|
131
|
+
"timeout_minutes": 30
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## File Locations
|
|
137
|
+
|
|
138
|
+
| OS | Path |
|
|
139
|
+
|---|---|
|
|
140
|
+
| **Windows** | `C:\Users\{username}\.lemma\` |
|
|
141
|
+
| **macOS/Linux** | `~/.lemma/` |
|
|
142
|
+
|
|
143
|
+
Files: `lemma.db` (SQLite), `config.json`, `sessions/`, `logs/`
|
|
144
|
+
|
|
145
|
+
## Search
|
|
146
|
+
|
|
147
|
+
Lemma uses **SQLite FTS5** full-text search for memory lookup, dedup, and topic overlap detection.
|
|
148
|
+
|
|
149
|
+
**Architecture:**
|
|
150
|
+
- `searchAndSortFragments()` — FTS5 full-text search, fallback to in-memory ranking
|
|
151
|
+
- `findSimilarFragment()` — FTS5 BM25-based dedup with keyword overlap fallback
|
|
152
|
+
- `findTopicOverlaps()` — FTS5 search + word overlap scoring for related fragment detection
|
|
153
|
+
|
|
154
|
+
## Data Storage
|
|
155
|
+
|
|
156
|
+
All data is stored in a single SQLite database (`~/.lemma/lemma.db`):
|
|
157
|
+
|
|
158
|
+
| Table | Purpose |
|
|
159
|
+
|-------|---------|
|
|
160
|
+
| `memories` | Memory fragments (FTS5 + metadata) |
|
|
161
|
+
| `guides` | Procedural knowledge with learnings |
|
|
162
|
+
| `sessions` | Session tracking and outcomes |
|
|
163
|
+
| `relations` | Typed links between memories |
|
|
164
|
+
| `guide_learnings` | Per-guide accumulated learnings |
|
|
165
|
+
| `guide_memory_links` | Bidirectional guide ↔ memory links |
|
|
166
|
+
|
|
167
|
+
Legacy JSONL files are automatically migrated on first run.
|
|
168
|
+
|
|
169
|
+
## Security
|
|
170
|
+
|
|
171
|
+
All data is stored locally in `~/.lemma/`. Nothing is sent to external servers. Secrets are automatically redacted from memory fragments (17 regex patterns for API keys, tokens, connection strings).
|
|
172
|
+
|
|
173
|
+
## Documentation
|
|
174
|
+
|
|
175
|
+
- [Development Guide](docs/development/DEVELOPMENT.md) — Architecture, project structure, testing
|
|
176
|
+
- [Handlers Refactor](docs/development/HANDLERS-REFACTOR.md) — Targeted SQL migration plan
|
|
177
|
+
- [Roadmap](docs/development/ROADMAP.md) — v0.9, v0.10, v1.0 plans
|
|
178
|
+
- [Research](docs/research/README.md) — Academic papers that influenced Lemma's design
|
|
179
|
+
- [Changelog](CHANGELOG.md) — Version history
|
|
180
|
+
|
|
181
|
+
## License
|
|
182
|
+
|
|
183
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Database from "better-sqlite3";
|
|
2
|
+
export declare class LemmaDB {
|
|
3
|
+
readonly db: Database.Database;
|
|
4
|
+
private stmtCache;
|
|
5
|
+
constructor(dbPath?: string);
|
|
6
|
+
prepareCached(sql: string): Database.Statement;
|
|
7
|
+
close(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function setDataDir(dir: string): void;
|
|
10
|
+
export declare function getDb(dbPath?: string): LemmaDB;
|
|
11
|
+
export declare function closeDb(): void;
|
|
12
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAOtC,qBAAa,OAAO;IAClB,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC/B,OAAO,CAAC,SAAS,CAA8C;gBAEnD,MAAM,GAAE,MAAwB;IAoB5C,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS;IAS9C,KAAK,IAAI,IAAI;CAKd;AAMD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAO5C;AAED,wBAAgB,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAW9C;AAED,wBAAgB,OAAO,IAAI,IAAI,CAM9B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import os from "os";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import Database from "better-sqlite3";
|
|
5
|
+
import * as sqliteVec from "sqlite-vec";
|
|
6
|
+
import { logger } from "../logger.js";
|
|
7
|
+
import { runMigrations } from "./migration.js";
|
|
8
|
+
const DEFAULT_DB_PATH = path.join(os.homedir(), ".lemma", "lemma.db");
|
|
9
|
+
export class LemmaDB {
|
|
10
|
+
db;
|
|
11
|
+
stmtCache = new Map();
|
|
12
|
+
constructor(dbPath = DEFAULT_DB_PATH) {
|
|
13
|
+
const dir = path.dirname(dbPath);
|
|
14
|
+
if (!fs.existsSync(dir)) {
|
|
15
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
16
|
+
}
|
|
17
|
+
this.db = new Database(dbPath);
|
|
18
|
+
sqliteVec.load(this.db);
|
|
19
|
+
this.db.pragma("journal_mode = WAL");
|
|
20
|
+
this.db.pragma("synchronous = NORMAL");
|
|
21
|
+
this.db.pragma("foreign_keys = ON");
|
|
22
|
+
this.db.pragma("busy_timeout = 5000");
|
|
23
|
+
this.db.pragma("cache_size = -64000");
|
|
24
|
+
this.db.pragma("temp_store = MEMORY");
|
|
25
|
+
logger.info("Database opened", { path: dbPath });
|
|
26
|
+
}
|
|
27
|
+
prepareCached(sql) {
|
|
28
|
+
let stmt = this.stmtCache.get(sql);
|
|
29
|
+
if (!stmt) {
|
|
30
|
+
stmt = this.db.prepare(sql);
|
|
31
|
+
this.stmtCache.set(sql, stmt);
|
|
32
|
+
}
|
|
33
|
+
return stmt;
|
|
34
|
+
}
|
|
35
|
+
close() {
|
|
36
|
+
this.stmtCache.clear();
|
|
37
|
+
this.db.close();
|
|
38
|
+
logger.info("Database closed");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
let _instance = null;
|
|
42
|
+
let _currentPath = null;
|
|
43
|
+
let _dataDir = null;
|
|
44
|
+
export function setDataDir(dir) {
|
|
45
|
+
_dataDir = dir;
|
|
46
|
+
if (_instance) {
|
|
47
|
+
try {
|
|
48
|
+
_instance.close();
|
|
49
|
+
}
|
|
50
|
+
catch { }
|
|
51
|
+
_instance = null;
|
|
52
|
+
_currentPath = null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export function getDb(dbPath) {
|
|
56
|
+
const resolvedPath = dbPath ?? (_dataDir ? path.join(_dataDir, "lemma.db") : DEFAULT_DB_PATH);
|
|
57
|
+
if (!_instance || _currentPath !== resolvedPath) {
|
|
58
|
+
if (_instance) {
|
|
59
|
+
try {
|
|
60
|
+
_instance.close();
|
|
61
|
+
}
|
|
62
|
+
catch { }
|
|
63
|
+
}
|
|
64
|
+
_instance = new LemmaDB(resolvedPath);
|
|
65
|
+
_currentPath = resolvedPath;
|
|
66
|
+
runMigrations(_instance);
|
|
67
|
+
}
|
|
68
|
+
return _instance;
|
|
69
|
+
}
|
|
70
|
+
export function closeDb() {
|
|
71
|
+
if (_instance) {
|
|
72
|
+
_instance.close();
|
|
73
|
+
_instance = null;
|
|
74
|
+
_currentPath = null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=database.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;AAEtE,MAAM,OAAO,OAAO;IACT,EAAE,CAAoB;IACvB,SAAS,GAAoC,IAAI,GAAG,EAAE,CAAC;IAE/D,YAAY,SAAiB,eAAe;QAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,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AC,GAAW;IACpC,QAAQ,GAAG,GAAG,CAAC;IACf,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,CAAC;YAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAA,CAAC;QACnC,SAAS,GAAG,IAAI,CAAC;QACjB,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,MAAe;IACnC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAC9F,IAAI,CAAC,SAAS,IAAI,YAAY,KAAK,YAAY,EAAE,CAAC;QAChD,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC;gBAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACrC,CAAC;QACD,SAAS,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;QACtC,YAAY,GAAG,YAAY,CAAC;QAC5B,aAAa,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,IAAI,SAAS,EAAE,CAAC;QACd,SAAS,CAAC,KAAK,EAAE,CAAC;QAClB,SAAS,GAAG,IAAI,CAAC;QACjB,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { getDb, closeDb, setDataDir, LemmaDB } from "./database.js";
|
|
2
|
+
export { SCHEMA_V1, MIGRATIONS } from "./schema.js";
|
|
3
|
+
export { runMigrations, migrateFromJsonl } from "./migration.js";
|
|
4
|
+
export { addMemory, getMemoryById, updateMemory, deleteMemory, searchMemories, addRelation, getRelations, boostConfidence, decayMemories, getMemoryStats, mergeMemories } from "./memory-store.js";
|
|
5
|
+
export declare function initDatabase(dbPath?: string): void;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMnM,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAUlD"}
|
package/dist/db/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { getDb, closeDb, setDataDir, LemmaDB } from "./database.js";
|
|
2
|
+
export { SCHEMA_V1, MIGRATIONS } from "./schema.js";
|
|
3
|
+
export { runMigrations, migrateFromJsonl } from "./migration.js";
|
|
4
|
+
export { addMemory, getMemoryById, updateMemory, deleteMemory, searchMemories, addRelation, getRelations, boostConfidence, decayMemories, getMemoryStats, mergeMemories } from "./memory-store.js";
|
|
5
|
+
import { getDb } from "./database.js";
|
|
6
|
+
import { runMigrations, migrateFromJsonl } from "./migration.js";
|
|
7
|
+
import { logger } from "../logger.js";
|
|
8
|
+
export function initDatabase(dbPath) {
|
|
9
|
+
const db = getDb(dbPath);
|
|
10
|
+
runMigrations(db);
|
|
11
|
+
const migration = migrateFromJsonl(db);
|
|
12
|
+
if (migration.memories > 0 || migration.guides > 0 || migration.sessions > 0) {
|
|
13
|
+
logger.info("JSONL migration completed", migration);
|
|
14
|
+
}
|
|
15
|
+
logger.info("Database initialized");
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnM,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,UAAU,YAAY,CAAC,MAAe;IAC1C,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,CAAC;IAElB,MAAM,SAAS,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACvC,IAAI,SAAS,CAAC,QAAQ,GAAG,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;QAC7E,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { LemmaDB } from "./database.js";
|
|
2
|
+
export interface FragmentSummary {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
type: string;
|
|
6
|
+
project: string | null;
|
|
7
|
+
confidence: number;
|
|
8
|
+
age_days: number;
|
|
9
|
+
access_count: number;
|
|
10
|
+
positive_feedback: number;
|
|
11
|
+
negative_feedback: number;
|
|
12
|
+
distill_candidate: boolean;
|
|
13
|
+
relation_count: number;
|
|
14
|
+
fragment_preview: string;
|
|
15
|
+
}
|
|
16
|
+
export interface GuideSummary {
|
|
17
|
+
name: string;
|
|
18
|
+
category: string;
|
|
19
|
+
usage_count: number;
|
|
20
|
+
success_count: number;
|
|
21
|
+
failure_count: number;
|
|
22
|
+
success_rate: number | null;
|
|
23
|
+
learning_count: number;
|
|
24
|
+
deprecated: boolean;
|
|
25
|
+
source_memory_count: number;
|
|
26
|
+
}
|
|
27
|
+
export interface RelationSummary {
|
|
28
|
+
total: number;
|
|
29
|
+
by_type: Record<string, number>;
|
|
30
|
+
isolated_fragment_ids: string[];
|
|
31
|
+
hub_fragments: Array<{
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
count: number;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
export interface AnalysisSignals {
|
|
38
|
+
confidence_distribution: Record<string, number>;
|
|
39
|
+
age_distribution: Record<string, number>;
|
|
40
|
+
stale_fragments: Array<{
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
age_days: number;
|
|
44
|
+
confidence: number;
|
|
45
|
+
}>;
|
|
46
|
+
similarity_candidates: Array<{
|
|
47
|
+
id_a: string;
|
|
48
|
+
id_b: string;
|
|
49
|
+
title_a: string;
|
|
50
|
+
title_b: string;
|
|
51
|
+
overlap: number;
|
|
52
|
+
}>;
|
|
53
|
+
distill_candidates: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
type: string;
|
|
57
|
+
}>;
|
|
58
|
+
low_performing_guides: Array<{
|
|
59
|
+
name: string;
|
|
60
|
+
success_rate: number;
|
|
61
|
+
usage: number;
|
|
62
|
+
}>;
|
|
63
|
+
type_distribution: Record<string, number>;
|
|
64
|
+
project_distribution: Record<string, number>;
|
|
65
|
+
never_accessed_count: number;
|
|
66
|
+
deprecated_guides: string[];
|
|
67
|
+
superseded_fragments: Array<{
|
|
68
|
+
id: string;
|
|
69
|
+
title: string;
|
|
70
|
+
}>;
|
|
71
|
+
dangling_guide_links: Array<{
|
|
72
|
+
guide: string;
|
|
73
|
+
memory_id: string;
|
|
74
|
+
}>;
|
|
75
|
+
}
|
|
76
|
+
export interface SessionActivity {
|
|
77
|
+
recent_count: number;
|
|
78
|
+
outcomes: Record<string, number>;
|
|
79
|
+
most_accessed: Array<{
|
|
80
|
+
id: string;
|
|
81
|
+
title: string;
|
|
82
|
+
count: number;
|
|
83
|
+
}>;
|
|
84
|
+
never_accessed_count: number;
|
|
85
|
+
}
|
|
86
|
+
export interface LibrarySnapshot {
|
|
87
|
+
generated_at: string;
|
|
88
|
+
total_memories: number;
|
|
89
|
+
total_guides: number;
|
|
90
|
+
total_sessions: number;
|
|
91
|
+
health_status: string;
|
|
92
|
+
fragments: FragmentSummary[];
|
|
93
|
+
guides: GuideSummary[];
|
|
94
|
+
relations: RelationSummary;
|
|
95
|
+
signals: AnalysisSignals;
|
|
96
|
+
session_activity: SessionActivity;
|
|
97
|
+
suggestions: string[];
|
|
98
|
+
}
|
|
99
|
+
export declare function collectFragmentSummaries(db: LemmaDB, projectFilter?: string | null): FragmentSummary[];
|
|
100
|
+
export declare function collectGuideSummaries(db: LemmaDB): GuideSummary[];
|
|
101
|
+
export declare function collectRelationSummary(db: LemmaDB, fragmentIds: string[]): RelationSummary;
|
|
102
|
+
export declare function findSimilarPairs(fragments: FragmentSummary[], threshold?: number): Array<{
|
|
103
|
+
id_a: string;
|
|
104
|
+
id_b: string;
|
|
105
|
+
title_a: string;
|
|
106
|
+
title_b: string;
|
|
107
|
+
overlap: number;
|
|
108
|
+
}>;
|
|
109
|
+
export declare function collectAnalysisSignals(db: LemmaDB, fragments: FragmentSummary[]): AnalysisSignals;
|
|
110
|
+
export declare function collectSessionActivity(db: LemmaDB): SessionActivity;
|
|
111
|
+
export declare function generateSuggestions(snapshot: LibrarySnapshot): string[];
|
|
112
|
+
export declare function collectLibrarySnapshot(db: LemmaDB, options?: {
|
|
113
|
+
project?: string | null;
|
|
114
|
+
focus?: string;
|
|
115
|
+
}): LibrarySnapshot;
|
|
116
|
+
export declare function formatLibrarySnapshot(snapshot: LibrarySnapshot, focus: string): string;
|
|
117
|
+
//# sourceMappingURL=library-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-store.d.ts","sourceRoot":"","sources":["../../src/db/library-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE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