@nxuss/lemma 0.9.2 → 0.9.3
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 +62 -10
- package/dist/cjs/mcp/tools.d.ts.map +1 -1
- package/dist/cjs/mcp/tools.js +619 -0
- package/dist/cjs/mcp/tools.js.map +1 -1
- package/dist/esm/mcp/tools.d.ts.map +1 -1
- package/dist/esm/mcp/tools.js +619 -0
- package/dist/esm/mcp/tools.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# 🧠 Lemma v0.9.
|
|
1
|
+
# 🧠 Lemma v0.9.3
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@nxuss/lemma)
|
|
4
4
|
[](https://github.com/Nxusbets/lemma/blob/main/LICENSE)
|
|
5
|
-
[](https://github.com/Nxusbets/lemma)
|
|
6
6
|
[](https://github.com/Nxusbets/lemma)
|
|
7
7
|
[](https://github.com/Nxusbets/lemma)
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
> **The Intelligent local-first AI Gateway — Privacy, Performance, and Static Code Intelligence for the Agentic Era.**
|
|
18
18
|
|
|
19
|
-
Lemma is a high-performance orchestration layer that sits between your development environment and LLM providers. It transforms the way you build with AI by providing **Shared Semantic Memory**, **Autonomous Cost Optimization**, **Privacy Guardrails**, and a suite of **
|
|
19
|
+
Lemma is a high-performance orchestration layer that sits between your development environment and LLM providers. It transforms the way you build with AI by providing **Shared Semantic Memory**, **Autonomous Cost Optimization**, **Privacy Guardrails**, and a suite of **38 MCP tools** — including zero-token static code intelligence that runs entirely on your machine with no LLM calls required.
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -31,19 +31,20 @@ Lemma is a high-performance orchestration layer that sits between your developme
|
|
|
31
31
|
| **Complexity Router** | ✅ | ✅ |
|
|
32
32
|
| **Dashboard** | Basic stats | ✅ Full time-travel |
|
|
33
33
|
| **Proxy requests/month** | 300 | ✅ Unlimited |
|
|
34
|
-
| **MCP Server (all
|
|
34
|
+
| **MCP Server (all 38 tools)** | ❌ | ✅ |
|
|
35
35
|
| **The Brain — Semantic Memory** | ❌ | ✅ |
|
|
36
36
|
| **Zero-Token Static Analysis** | ❌ | ✅ |
|
|
37
37
|
| **Cross-Project Telepathy** | ❌ | ✅ |
|
|
38
38
|
| **AutoPilot & Auto-Heal** | ❌ | ✅ |
|
|
39
|
+
| **`depgraph` — Dependency Graph** | ❌ | ✅ |
|
|
40
|
+
| **`refactor` — Codemod Engine** | ❌ | ✅ |
|
|
39
41
|
|
|
40
|
-
> **The MCP is Pro.** All
|
|
42
|
+
> **The MCP is Pro.** All 38 tools — The Brain, PreCrime predictor, AST Hologram, Entropy Score, Coupling Radar, `depgraph`, `refactor`, and every optimization tool — require a Pro license. Activate with `lemma activate <key>` → [Get Pro](https://lemma.nxus.studio/upgrade)
|
|
41
43
|
|
|
42
44
|
---
|
|
43
45
|
|
|
44
46
|
## ⚡ What's in the Pro MCP
|
|
45
47
|
|
|
46
|
-
|
|
47
48
|
### 🧠 Shared Semantic Memory — The Brain
|
|
48
49
|
Lemma maintains a persistent vector database (ChromaDB) that accumulates knowledge across all your projects. Every solution, bug fix, and architecture decision you work through gets stored and semantically indexed. Future sessions can retrieve this knowledge in milliseconds — no cloud, no tokens, no re-explaining.
|
|
49
50
|
|
|
@@ -62,6 +63,48 @@ Mathematical chaos score (0-100) per file using the TS Compiler API. Measures cy
|
|
|
62
63
|
### 🗺️ AST Hologram — Zero Tokens
|
|
63
64
|
Scans the entire workspace and returns a dense JSON index of all exported symbols (classes, functions, interfaces, types, consts) with file paths and line numbers. Use this instead of reading individual files — saves up to 90% tokens when navigating large codebases.
|
|
64
65
|
|
|
66
|
+
### 📡 `depgraph` — Real-Time Dependency Graph *(NEW in v0.9.3)*
|
|
67
|
+
**Architecture-aware blast radius analysis.** Builds a real-time, bidirectional dependency graph for any file in the workspace using the TypeScript Compiler API — zero LLM calls, zero tokens. Shows exactly what a file imports, what imports it (reverse dependencies), and what symbols it exports.
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
📦 src/services/pantry.ts
|
|
71
|
+
├── importa:
|
|
72
|
+
│ ├── src/lib/utils/ingredient-parser.ts → parseIngredientString, normalizeUnit
|
|
73
|
+
│ └── src/db/prisma.ts → PrismaClient
|
|
74
|
+
├── es importado por:
|
|
75
|
+
│ ├── src/app/actions/generate-recipe.ts
|
|
76
|
+
│ └── src/components/PantryWidget.tsx
|
|
77
|
+
└── exporta:
|
|
78
|
+
├── applyRecipeDeductions
|
|
79
|
+
└── getPantryBalance
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Supports `--depth` (1-5), `--format text|mermaid|json`, `--reverse`, `--circular` (cycle detection), and `--external` (include node_modules).
|
|
83
|
+
|
|
84
|
+
### 🔧 `refactor` — Declarative Codemod Engine *(NEW in v0.9.3)*
|
|
85
|
+
**Multi-file refactoring with surgical precision.** Rename any symbol across the entire workspace or move files updating all importers — using the TypeScript Compiler API for accurate AST-based reference detection. Zero LLM calls.
|
|
86
|
+
|
|
87
|
+
**`rename`** — Finds every reference to a symbol (via AST, not text search) and renames it everywhere:
|
|
88
|
+
```bash
|
|
89
|
+
# Preview first
|
|
90
|
+
lemma refactor --operation rename --from "applyRecipeDeductions" --to "deductPantryIngredients" \
|
|
91
|
+
--file src/services/pantry.ts --dryRun
|
|
92
|
+
|
|
93
|
+
# Apply with TypeScript verification
|
|
94
|
+
lemma refactor --operation rename --from "applyRecipeDeductions" --to "deductPantryIngredients" \
|
|
95
|
+
--file src/services/pantry.ts --tscCheck
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**`move`** — Moves a file physically and rewires every import path in the workspace:
|
|
99
|
+
```bash
|
|
100
|
+
lemma refactor --operation move \
|
|
101
|
+
--from src/lib/validation/recipe.schema.ts \
|
|
102
|
+
--to src/lib/schemas/recipe.ts \
|
|
103
|
+
--tscCheck
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Supports `--dryRun` (unified diff preview), `--tscCheck` (post-refactor type verification), and `--backup` (`.bak` files).
|
|
107
|
+
|
|
65
108
|
### 🚦 Complexity Router
|
|
66
109
|
Intelligently evaluates each prompt and routes it to the most cost-effective model. Reserves premium models for complex reasoning, uses smaller models for simple tasks. Slashes your AI bill without sacrificing quality.
|
|
67
110
|
|
|
@@ -142,11 +185,11 @@ Just run `lemma init`. Lemma automatically registers its MCP server in your `~/.
|
|
|
142
185
|
}
|
|
143
186
|
```
|
|
144
187
|
|
|
145
|
-
Once connected, your IDE gains access to all **
|
|
188
|
+
Once connected, your IDE gains access to all **38 MCP tools** and Lemma auto-injects the TurboMode system prompt on handshake.
|
|
146
189
|
|
|
147
190
|
---
|
|
148
191
|
|
|
149
|
-
## 🛠️ MCP Tools Reference (v0.9.
|
|
192
|
+
## 🛠️ MCP Tools Reference (v0.9.3 — 38 Tools)
|
|
150
193
|
|
|
151
194
|
### 🗂️ Workspace Tools
|
|
152
195
|
|
|
@@ -193,7 +236,7 @@ Once connected, your IDE gains access to all **32 MCP tools** and Lemma auto-inj
|
|
|
193
236
|
| `auto_heal` | Diagnose and auto-heal the latest crash from Lemma's live context logs. |
|
|
194
237
|
| `batch_tool_calls` | Execute multiple tool calls in parallel via `Promise.all`. High-throughput operations in a single MCP round-trip. |
|
|
195
238
|
|
|
196
|
-
### 🔮 Zero-Token Static Intelligence Tools
|
|
239
|
+
### 🔮 Zero-Token Static Intelligence Tools
|
|
197
240
|
|
|
198
241
|
> All tools in this section use **zero LLM tokens, zero Ollama, zero cloud**. Pure local computation via TypeScript Compiler API, git, and math.
|
|
199
242
|
|
|
@@ -207,7 +250,16 @@ Once connected, your IDE gains access to all **32 MCP tools** and Lemma auto-inj
|
|
|
207
250
|
| `semantic_dedup_guard` | **Brain dedup firewall.** Before calling `store_memory`, pass content through here. If similarity ≥ 92% → rejects as duplicate. If 75–91% → warns and shows the similar entry. Keeps The Brain lean and dense. |
|
|
208
251
|
| `dead_export_necromancer` | **Dead code auditor.** Maps every `export` in the workspace against every `import`. Symbols exported but never imported anywhere = zombie code inflating your context. Reports dead exports by file with estimated token waste. |
|
|
209
252
|
|
|
210
|
-
###
|
|
253
|
+
### 🏗️ Architecture & Refactoring Tools *(NEW in v0.9.3)*
|
|
254
|
+
|
|
255
|
+
> Architecture-aware tools that combine dependency analysis with surgical code transformation. **Zero LLM calls.**
|
|
256
|
+
|
|
257
|
+
| Tool | Description |
|
|
258
|
+
| :--- | :--- |
|
|
259
|
+
| `depgraph` | **Real-time dependency graph.** Builds a bidirectional import/export map for any file. Shows what a file imports, what imports it (reverse deps with `--reverse`), and what symbols it exports. Supports `--depth` 1-5, `--format text\|mermaid\|json`, `--circular` (cycle detection), and `--external` (include node_modules). Use before any refactor to measure blast radius. |
|
|
260
|
+
| `refactor` | **Declarative codemod engine.** `rename` renames a symbol across all files using AST-based reference detection (no false positives from string search). `move` relocates a file and rewires every import path in the workspace. Both support `--dryRun` (unified diff preview), `--tscCheck` (post-apply type verification), and `--backup` (`.bak` files). |
|
|
261
|
+
|
|
262
|
+
### 🔍 PR Review Agent Tools
|
|
211
263
|
|
|
212
264
|
| Tool | Description |
|
|
213
265
|
| :--- | :--- |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AA6kBnE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,GAC1C,IAAI,CA2DN"}
|