lemma-mcp 0.7.0 → 0.7.2
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/README.md +40 -26
- package/README.tr.md +488 -384
- package/dist/memory/core.d.ts +1 -0
- package/dist/memory/core.d.ts.map +1 -1
- package/dist/memory/core.js +26 -4
- package/dist/memory/core.js.map +1 -1
- package/dist/memory/index.d.ts +1 -1
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +1 -1
- package/dist/memory/index.js.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +4 -0
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,20 +70,24 @@ Unlike static memory, Lemma uses a biological model where knowledge evolves thro
|
|
|
70
70
|
|
|
71
71
|
**Boost (on access):**
|
|
72
72
|
```
|
|
73
|
-
confidence = min(1.0, confidence + 0.
|
|
73
|
+
confidence = min(1.0, confidence + 0.015)
|
|
74
74
|
tags += context_tag (e.g., "debugging")
|
|
75
75
|
associatedWith += co_accessed_fragment_ids
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
**Decay (per session):**
|
|
78
|
+
**Decay (per session, only unused fragments):**
|
|
79
79
|
```
|
|
80
|
-
|
|
81
|
-
confidence = confidence -
|
|
80
|
+
if accessed == 0:
|
|
81
|
+
confidence = confidence - 0.002
|
|
82
|
+
if accessed > 0:
|
|
83
|
+
no decay (shield — used knowledge is protected)
|
|
82
84
|
```
|
|
83
85
|
|
|
84
|
-
- **
|
|
85
|
-
- **Unused items** decay
|
|
86
|
+
- **Shield**: Frequently accessed items are protected from decay entirely
|
|
87
|
+
- **Unused items** decay very slowly at 0.002 per session
|
|
88
|
+
- **Negative feedback** reduces confidence by -0.02 (was -0.1)
|
|
86
89
|
- **Associations**: Fragments used together build cross-references for future recall
|
|
90
|
+
- **No time-based decay**: Confidence only changes when the system is actively used
|
|
87
91
|
|
|
88
92
|
### Deduplication
|
|
89
93
|
|
|
@@ -158,7 +162,7 @@ Add Lemma to your MCP client configuration:
|
|
|
158
162
|
"mcpServers": {
|
|
159
163
|
"lemma": {
|
|
160
164
|
"command": "npx",
|
|
161
|
-
"args": ["-y", "
|
|
165
|
+
"args": ["-y", "lemma-mcp"]
|
|
162
166
|
}
|
|
163
167
|
}
|
|
164
168
|
}
|
|
@@ -189,7 +193,7 @@ registerHook(HookTypes.ON_PROJECT_CHANGE, async (context) => {
|
|
|
189
193
|
Extend the system prompt generation with custom transformations:
|
|
190
194
|
|
|
191
195
|
```javascript
|
|
192
|
-
import { registerPromptModifier } from "
|
|
196
|
+
import { registerPromptModifier } from "lemma-mcp/server";
|
|
193
197
|
|
|
194
198
|
registerPromptModifier(async (prompt, context) => {
|
|
195
199
|
if (context.project === "my-app") {
|
|
@@ -265,7 +269,7 @@ Update an existing fragment by ID.
|
|
|
265
269
|
|
|
266
270
|
#### `memory_feedback`
|
|
267
271
|
|
|
268
|
-
Provide feedback on a memory fragment after use. Positive boosts confidence; negative reduces by -0.
|
|
272
|
+
Provide feedback on a memory fragment after use. Positive boosts confidence; negative reduces by -0.02.
|
|
269
273
|
|
|
270
274
|
**Parameters:**
|
|
271
275
|
- `id` (string, required): Fragment ID
|
|
@@ -431,36 +435,46 @@ Get virtual session statistics: recent tool usage patterns and technologies.
|
|
|
431
435
|
npm test
|
|
432
436
|
```
|
|
433
437
|
|
|
434
|
-
|
|
438
|
+
360 tests covering memory core, guides core, handlers, learning lifecycle, hook system, dynamic prompt generation, and virtual sessions. All I/O is isolated to temp directories.
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
npm run typecheck # TypeScript type checking
|
|
442
|
+
npm run build # Compile TypeScript to dist/
|
|
443
|
+
```
|
|
435
444
|
|
|
436
445
|
### Project Structure
|
|
437
446
|
|
|
438
447
|
```
|
|
439
448
|
Lemma/
|
|
440
449
|
├── src/
|
|
441
|
-
│ ├── index.
|
|
450
|
+
│ ├── index.ts # MCP server entry point
|
|
451
|
+
│ ├── types.ts # Shared TypeScript interfaces
|
|
442
452
|
│ ├── memory/
|
|
443
|
-
│ │ ├── index.
|
|
444
|
-
│ │ ├── core.
|
|
445
|
-
│ │ └── config.
|
|
453
|
+
│ │ ├── index.ts # Memory module re-exports
|
|
454
|
+
│ │ ├── core.ts # Core memory logic, decay, search, dedup
|
|
455
|
+
│ │ └── config.ts # User configuration loader
|
|
446
456
|
│ ├── guides/
|
|
447
|
-
│ │ ├── index.
|
|
448
|
-
│ │ ├── core.
|
|
449
|
-
│ │ └── task-map.
|
|
457
|
+
│ │ ├── index.ts # Guides module re-exports
|
|
458
|
+
│ │ ├── core.ts # Core guides logic, fuzzy dedup
|
|
459
|
+
│ │ └── task-map.ts # Task-to-guide mapping
|
|
450
460
|
│ ├── server/
|
|
451
|
-
│ │ ├── index.
|
|
452
|
-
│ │ ├── handlers.
|
|
453
|
-
│ │ ├── tools.
|
|
454
|
-
│ │ ├── hooks.
|
|
455
|
-
│ │ └── system-prompt.
|
|
461
|
+
│ │ ├── index.ts # Server setup, injection, notifications
|
|
462
|
+
│ │ ├── handlers.ts # Tool handlers (20 tools)
|
|
463
|
+
│ │ ├── tools.ts # Tool definitions
|
|
464
|
+
│ │ ├── hooks.ts # Hook system & prompt modifiers
|
|
465
|
+
│ │ └── system-prompt.ts # Dynamic system prompt
|
|
456
466
|
│ └── sessions/
|
|
457
|
-
│ ├── index.
|
|
458
|
-
│ ├── core.
|
|
459
|
-
│ └── virtual.
|
|
467
|
+
│ ├── index.ts # Sessions module re-exports
|
|
468
|
+
│ ├── core.ts # Session lifecycle
|
|
469
|
+
│ └── virtual.ts # Virtual session tracking
|
|
460
470
|
├── tests/
|
|
461
|
-
│
|
|
471
|
+
│ ├── memory/ # 7 test files
|
|
472
|
+
│ ├── guides/ # 6 test files
|
|
473
|
+
│ ├── sessions/ # 2 test files
|
|
474
|
+
│ └── server/ # 10 test files
|
|
462
475
|
├── docs/ # Research papers and references
|
|
463
476
|
├── package.json
|
|
477
|
+
├── tsconfig.json
|
|
464
478
|
├── CHANGELOG.md
|
|
465
479
|
└── README.md
|
|
466
480
|
```
|