@muxtsou/memory-cell 0.1.4 β 0.1.5
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 +236 -15
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,28 +1,249 @@
|
|
|
1
|
-
#
|
|
1
|
+
# π§ Memory Cell
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Reinvent Cognition.</strong><br>
|
|
5
|
+
<em>To give autonomous agents mind, alignment, and continuity.</em>
|
|
6
|
+
</p>
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="https://www.npmjs.com/package/@muxtsou/memory-cell"><img src="https://img.shields.io/npm/v/@muxtsou/memory-cell?color=blue&style=flat-square" alt="npm version" /></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/@muxtsou/memory-cell"><img src="https://img.shields.io/npm/dm/@muxtsou/memory-cell?style=flat-square" alt="npm downloads" /></a>
|
|
11
|
+
<img src="https://img.shields.io/badge/Platforms-macOS%20%7C%20Linux%20%7C%20Windows-brightgreen?style=flat-square" alt="Platforms" />
|
|
12
|
+
<img src="https://img.shields.io/badge/Interface-CLI%20%2B%20MCP-orange?style=flat-square" alt="Interface: CLI + MCP" />
|
|
13
|
+
<img src="https://img.shields.io/badge/License-Apache--2.0-blue?style=flat-square" alt="License" />
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
> **Mission**: We build the cognitive operating system for governed collective intelligence. By fusing stateful memory, code topological intelligence, and autonomous execution into a unified architecture, we enable developers and networked agents to collectively reason, self-align, and act indefinitely.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## π€― Problems & Dilemmas of Agents
|
|
21
|
+
|
|
22
|
+
Despite using frontier models, developers and engineering teams face painful realities every single day:
|
|
23
|
+
|
|
24
|
+
1. πΈ **The Amnesia Tax (Paying to Re-explain Everything)**
|
|
25
|
+
Every new session erases working context. You are forced to repeatedly paste code snippets, re-explain architecture, and burn thousands of tokens just to bring the AI back up to speed, destroying unit economics.
|
|
26
|
+
|
|
27
|
+
2. π **The "Smart but Blind" Dilemma (Local Fixes, Global Breakages)**
|
|
28
|
+
Agents write great code in isolation, but are completely blind to overall codebase topology. They confidently fix function A while silently breaking service B, turning code generation into an endless debugging loop.
|
|
29
|
+
|
|
30
|
+
3. π° **The Knowledge Silo & Sovereignty Lock-in (Zero Cross-Tool Neutrality)**
|
|
31
|
+
Hard-won fixes and proprietary architectural insights are trapped inside vendor silos. Moving between Cursor, Claude Code, Windsurf, or Terminal means resetting experience to zero. Teams lack a sovereign, platform-neutral memory layer that they truly own.
|
|
32
|
+
|
|
33
|
+
4. βοΈ **The Knowledge Governance Void (Unversioned, Stale & Ungoverned Context)**
|
|
34
|
+
Technical specs and ADRs evolve continuously, but vector black boxes cannot surgically prune stale rules. Deprecated patterns poison future runs, with zero line-level audit trails back to authoritative sources.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## π‘ The Solution: Memory Cell
|
|
39
|
+
|
|
40
|
+
**Memory Cell solves the memory trilemma through first-principles cognitive governance.** By decoupling **Knowledge** (Git-native Living Docs), **Meaning** (Semantic Engrams), and **Location** (Code Topology Pointers), Memory Cell delivers a 100% private, < 15ms P75 intelligence layer with zero graph database maintenance overhead. It is designed for seamless dual-mode usage:
|
|
41
|
+
|
|
42
|
+
1. π₯οΈ **When You Work in the Terminal (Native CLI)**: Your lightning-fast, zero-dependency engineering companion to explore codebase architecture, trace bidirectional call flows, query documentation with semantic reasoning, and maintain persistent engineering playbooks (ADRs, anti-patterns, workflows) directly from your shell.
|
|
43
|
+
2. π€ **When You Pair with AI Agents (MCP Mode)**: Your persistent intelligence hub that bridges all your AI assistants (**Claude Code, Cursor, Google Antigravity, Hermes, Codex, Copilot**). It eliminates repetitive context-setting, enables frictionless session handover (`/takeover`), and cuts 50%~90% token waste by replacing brute-force file scans with precision lookups.
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
ββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββ
|
|
47
|
+
β π₯οΈ Interactive Terminal β β π€ Agentic Pair Programming β
|
|
48
|
+
β (You in Shell / CI/CD) β β (You with Claude, Cursor...)β
|
|
49
|
+
ββββββββββββββββ¬ββββββββββββββββ ββββββββββββββββ¬ββββββββββββββββ
|
|
50
|
+
β β
|
|
51
|
+
β Native CLI Commands β Model Context Protocol (MCP)
|
|
52
|
+
βββββββββββββββββββββ¬ββββββββββββββββββββ
|
|
53
|
+
βΌ
|
|
54
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
55
|
+
β π§ MEMORY CELL (Cognitive Core) β
|
|
56
|
+
β ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ β
|
|
57
|
+
β β β‘ Code Intelligence Core β β ποΈ 6-Dimension Knowledge β β
|
|
58
|
+
β β β’ Multi-Language Topology β β β’ Living SOPs & Playbooks β β
|
|
59
|
+
β β β’ Bidirectional Callsites β <ββ> β β’ Anti-patterns & Rules β β
|
|
60
|
+
β β β’ Refactoring Blast Radiusβ β β’ Architectural Decisions β β
|
|
61
|
+
β ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ β
|
|
62
|
+
ββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
|
|
63
|
+
βΌ
|
|
64
|
+
Embedded Engine + Local Embeddings (100% Offline & Private)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## π Key Benefits
|
|
70
|
+
|
|
71
|
+
- β‘ **< 15ms P75 In-Conversation Retrieval**: Instant precision grounding across code, living documentation, and shared team playbooks without context lag.
|
|
72
|
+
- ποΈ **50%β90% Token Reduction**: Decoupled reasoning retrieves only the necessary context window without stuffing entire files or brute-forcing vector chunks.
|
|
73
|
+
- π‘οΈ **Zero GraphDB Overhead**: Pure embedded SQLite architecture. Zero Neo4j, Redis, or external vector service dependencies.
|
|
74
|
+
- π **True Cross-Tool Continuity**: Works seamlessly across Claude Code, Cursor, Windsurf, Codex, Gemini, Terminal, and CI/CD pipelines via universal MCP protocols.
|
|
75
|
+
- π **Zero-Friction Living Knowledge**: Edit any markdown file or code in your repo as usual. Memory Cell automatically hot-syncs changes and prunes deleted files in real-time.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## π¦ Installation Options
|
|
81
|
+
|
|
82
|
+
### Option 1: One-Line Installer (Recommended, Zero-Dependency)
|
|
83
|
+
No Node.js or build tools required. Directly installs the pre-compiled native binary for your OS and architecture:
|
|
6
84
|
|
|
7
|
-
### Run directly with npx (No install needed)
|
|
8
85
|
```bash
|
|
9
|
-
|
|
86
|
+
curl -fsSL https://raw.githubusercontent.com/muxtsou/memory-cell-distribution/main/install.sh | bash
|
|
10
87
|
```
|
|
11
88
|
|
|
12
|
-
###
|
|
89
|
+
### Option 2: npm Package
|
|
90
|
+
Install globally or run on demand with `npx`:
|
|
91
|
+
|
|
13
92
|
```bash
|
|
93
|
+
# Global installation
|
|
14
94
|
npm install -g @muxtsou/memory-cell
|
|
15
|
-
|
|
95
|
+
|
|
96
|
+
# Or instant zero-install
|
|
97
|
+
npx @muxtsou/memory-cell init
|
|
16
98
|
```
|
|
17
99
|
|
|
18
|
-
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## β‘ 10-Second Quickstart (Zero-Config)
|
|
103
|
+
|
|
104
|
+
Run directly inside any project repository root:
|
|
105
|
+
|
|
19
106
|
```bash
|
|
20
|
-
|
|
107
|
+
memory-cell init
|
|
21
108
|
```
|
|
22
109
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
110
|
+
β¨ **Automatically detects and configures all supported environments on your machine:**
|
|
111
|
+
- [x] **Google Antigravity** (`.agents/mcp_config.json` + `hooks.json` + `skills/` + `plugin.json`)
|
|
112
|
+
- [x] **Cursor IDE** (`.cursor/mcp.json`)
|
|
113
|
+
- [x] **Claude Code CLI** (`.mcp.json` + `.claude/hooks.json` + `.claude/commands/`)
|
|
114
|
+
- [x] **OpenCode Interpreter** (`.opencode/mcp.json`)
|
|
115
|
+
- [x] **Hermes Agent** (`.hermes/config.yaml`)
|
|
116
|
+
- [x] **OpenAI Codex CLI** (`.codex/config.toml`)
|
|
117
|
+
- [x] **GitHub Copilot / VS Code** (`.vscode/mcp.json`)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## π οΈ MCP Cognitive Tools (For AI Agents)
|
|
122
|
+
|
|
123
|
+
Memory Cell equips coding agents with a structured cognitive layer composed of specialized tools that replace noisy brute-force file scanning with surgical, token-efficient intelligence:
|
|
124
|
+
|
|
125
|
+
### 1. π§ Grounded Reasoning & Unified Search (Cognitive Retrieval)
|
|
126
|
+
- `reason("<query>", workspace_path: ".")`: **Grounding Engine.** Retrieves AST-indexed document sections, active domain concepts, verified workflows, and architectural rules without reading raw files or blowing context tokens.
|
|
127
|
+
- `search("<query>")`: **Holographic Search.** Concurrently queries code symbols (`find_symbol`) and long-term memory (`reason`), synthesizing verified code locations and living docs into a single high-density context.
|
|
128
|
+
- `ingest(file_path: "...")`: Ingests documents (Markdown, Code, PDF) through the zero-leakage cognitive pipeline into memory.
|
|
129
|
+
- `forget(id: "...")`: Removes obsolete engrams and their associated living doc from disk.
|
|
130
|
+
|
|
131
|
+
### 2. β‘ Deep Code Intelligence & Topological Navigation (22 Languages)
|
|
132
|
+
Instant AST-level code navigation across 22 major languages in < 15ms P75 lookup:
|
|
133
|
+
- `find_symbol("<name>")`: Pinpoints functions, structs, classes, interfaces, traits, and exact line definitions.
|
|
134
|
+
- `trace_callers("<symbol>", direction: "callers" | "callees")`: Bidirectional call hierarchy tracing across files without manual searching.
|
|
135
|
+
- `find_references("<identifier>")`: Locates exact declarations, reads, and writes for variables and fields.
|
|
136
|
+
- `analyze_impact("<symbol>")`: Evaluates blast radius and affected call sites before refactoring critical interfaces.
|
|
137
|
+
|
|
138
|
+
### 3. π Autonomous Learning Across 6 Universal Knowledge Dimensions
|
|
139
|
+
Agents and developers autonomously distill experience and preserve knowledge into long-term memory:
|
|
140
|
+
1. π οΈ `learn_workflow`: Verified step-by-step procedures (SOPs) for automated replay.
|
|
141
|
+
2. β οΈ `learn_antipattern`: Inhibitory rules that prevent recurring mistakes and hallucinations.
|
|
142
|
+
3. π€ `learn_preference`: User/team coding style, architectural constraints, and guidelines.
|
|
143
|
+
4. ποΈ `learn_decision`: Architectural Decision Records (ADRs) and trade-offs.
|
|
144
|
+
5. π‘ `learn_concept`: Domain models, entities, and project terminology.
|
|
145
|
+
6. β‘ `learn_heuristic`: Fast-and-frugal rules of thumb and optimization shortcuts.
|
|
146
|
+
|
|
147
|
+
### 4. π€ Cross-Agent Working Memory Handover & Episodic Recall
|
|
148
|
+
- `takeover()`: Switching between different agents, models, or IDEs? Run `/takeover` (or `memory-cell takeover`). The next agent instantly resumes the active goal, obstacle trails, and execution context (<180 tokens) without losing state.
|
|
149
|
+
- `recall("<query>")`: Recalls chronological episodic timeline logs and debugging history from Hippocampus across past sessions.
|
|
150
|
+
|
|
151
|
+
### 5. π Consolidation & Cognitive Governance
|
|
152
|
+
- `dream(dry_run: false)`: Triggers two-phase consolidation (Hippocampus episodic events β Neocortex structured Engrams + contradiction detection).
|
|
153
|
+
- `list_governance_tickets()`: Lists knowledge contradictions flagged during consolidation.
|
|
154
|
+
- `resolve_governance_ticket(ticket_id, action)`: Human-in-the-loop conflict resolution (supersede, inhibit, or ignore).
|
|
155
|
+
- `stats()`: Real-time token savings, cognitive health scorecards, and managed engram distribution.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## π§ Distillation Engine Configuration (Zero-API-Key with Claude Max)
|
|
160
|
+
|
|
161
|
+
Memory Cell uses an intelligent distillation engine to synthesize session events into long-term structured knowledge. You don't need a separate paid API key if you have a Claude subscription (Claude Pro / Max) or local tools:
|
|
162
|
+
|
|
163
|
+
### Recommended: Use Your Existing Claude CLI (No API Key Required)
|
|
164
|
+
If you already use Claude Code CLI with your Claude Max / Pro plan, Memory Cell can reuse your authenticated CLI directly:
|
|
165
|
+
```bash
|
|
166
|
+
memory-cell config distill cli/claude
|
|
167
|
+
```
|
|
168
|
+
This lets you run distillation without incurring extra API costs or exposing API keys!
|
|
169
|
+
|
|
170
|
+
### Alternative Distillation Engines:
|
|
171
|
+
Switch engines anytime with a single command:
|
|
172
|
+
```bash
|
|
173
|
+
# Auto-detect any logged-in local CLI agent (claude, codex, gemini)
|
|
174
|
+
memory-cell config distill cli
|
|
175
|
+
|
|
176
|
+
# Local Ollama (Auto-detects installed models, 100% private)
|
|
177
|
+
memory-cell config distill ollama
|
|
178
|
+
|
|
179
|
+
# Cloud APIs (Requires API key in .env)
|
|
180
|
+
memory-cell config distill anthropic # Claude 3.5 Haiku
|
|
181
|
+
memory-cell config distill openai # GPT-4o-mini
|
|
182
|
+
memory-cell config distill gemini # Gemini 2.5/3.7 Flash
|
|
183
|
+
memory-cell config distill groq # Groq LPU (Ultra-fast)
|
|
184
|
+
|
|
185
|
+
# β‘ Fast Offline Fallback (Zero-LLM, rule-based; instant but basic quality)
|
|
186
|
+
memory-cell config distill heuristic
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## π οΈ CLI Quick Reference
|
|
192
|
+
|
|
193
|
+
| Command | Description |
|
|
194
|
+
| :--- | :--- |
|
|
195
|
+
| `memory-cell init` | Zero-config initialization: configure MCP across all IDEs and index codebase |
|
|
196
|
+
| `memory-cell config distill <engine>` | Switch distillation engine (`cli/claude`, `cli`, `heuristic`, `ollama`, `openai`) |
|
|
197
|
+
| `memory-cell sync` | Incrementally re-index workspace code changes into the intelligence layer |
|
|
198
|
+
| `memory-cell search <query>` | Unified hybrid search across code symbols, docs, and semantic memory |
|
|
199
|
+
| `memory-cell takeover` | Seamlessly resume working state and goals from previous agent sessions |
|
|
200
|
+
| `memory-cell stats` | Inspect token ROI economics, cognitive health scorecard, and memory engrams |
|
|
201
|
+
| `memory-cell doctor` | Validate local embedding models, storage integrity, and IDE MCP links |
|
|
202
|
+
| `memory-cell dream` | Consolidate session events into long-term structured knowledge |
|
|
203
|
+
| `memory-cell uninstall` | Cleanly remove binary, IDE configurations, and injected rules |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## π» Supported Programming Languages (22 Languages)
|
|
208
|
+
|
|
209
|
+
Memory Cell provides native, instant symbol and call hierarchy intelligence across 22 major programming languages with zero additional dependencies:
|
|
210
|
+
|
|
211
|
+
| Language | Recognized File Extensions | Primary Capabilities |
|
|
212
|
+
| :--- | :--- | :--- |
|
|
213
|
+
| **Rust** | `.rs` | Functions, structs, enums, traits, `impl` blocks, call hierarchies |
|
|
214
|
+
| **TypeScript** | `.ts`, `.tsx`, `.ets` | Functions, classes, interfaces, type aliases, methods, call sites |
|
|
215
|
+
| **JavaScript** | `.js`, `.jsx`, `.mjs`, `.cjs` | Functions, classes, methods, object calls, property access |
|
|
216
|
+
| **Python** | `.py`, `.pyw` | Functions, classes, methods, module-level invocations |
|
|
217
|
+
| **Go** | `.go` | Functions, methods, structs, interfaces, package calls |
|
|
218
|
+
| **C** | `.c`, `.h` | Function definitions, struct specifiers, type definitions, calls |
|
|
219
|
+
| **C++** | `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hh`, `.hxx`, `.cu`, `.metal` | Classes, structs, methods, alias declarations, function calls |
|
|
220
|
+
| **Java** | `.java` | Classes, interfaces, methods, constructors, invocations |
|
|
221
|
+
| **C#** | `.cs` | Classes, interfaces, structs, methods, invocations |
|
|
222
|
+
| **PHP** | `.php` | Functions, classes, interfaces, traits, methods, function calls |
|
|
223
|
+
| **Ruby** | `.rb` | Methods, singleton methods, classes, modules, call sites |
|
|
224
|
+
| **Swift** | `.swift` | Functions, classes, structs, protocols, typealiases, calls |
|
|
225
|
+
| **Kotlin** | `.kt`, `.kts` | Functions, classes, object declarations, calls |
|
|
226
|
+
| **Dart** | `.dart` | Classes, enums, extensions, functions, type aliases, calls |
|
|
227
|
+
| **Scala** | `.scala`, `.sc` | Functions, classes, objects, traits, type definitions, calls |
|
|
228
|
+
| **Lua** | `.lua`, `.luau` | Function declarations, function calls |
|
|
229
|
+
| **Solidity** | `.sol` | Contracts, interfaces, structs, functions, modifiers, events |
|
|
230
|
+
| **HCL / Terraform** | `.tf`, `.hcl` | Blocks, resource declarations, module references |
|
|
231
|
+
| **Svelte** | `.svelte` | Component script logic, functions, declarations |
|
|
232
|
+
| **Nix** | `.nix` | Attribute bindings, let expressions, variable expressions |
|
|
233
|
+
| **R** | `.r`, `.R` | Function definitions, variable assignments, calls |
|
|
234
|
+
| **Erlang** | `.erl`, `.hrl` | Function clauses, exported functions, atoms, calls |
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## π₯οΈ Supported Platforms
|
|
239
|
+
|
|
240
|
+
Pre-compiled native binaries are bundled automatically for your architecture (no compilation or runtime setup required):
|
|
241
|
+
- **macOS**: Apple Silicon (`darwin-arm64`) & Intel (`darwin-x64`)
|
|
242
|
+
- **Linux**: x86_64 (`linux-x64`) & ARM64 (`linux-arm64`)
|
|
243
|
+
- **Windows**: x86_64 (`win32-x64`)
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## π License
|
|
248
|
+
Apache-2.0 Β© Memory Cell Team & Mux Tsou
|
|
249
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muxtsou/memory-cell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Cross-platform CLI and MCP cognitive runtime for AI coding assistants",
|
|
5
5
|
"bin": {
|
|
6
6
|
"memory-cell": "bin/run.js"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@muxtsou/memory-cell-darwin-arm64": "0.1.
|
|
31
|
-
"@muxtsou/memory-cell-darwin-x64": "0.1.
|
|
32
|
-
"@muxtsou/memory-cell-linux-x64": "0.1.
|
|
33
|
-
"@muxtsou/memory-cell-linux-arm64": "0.1.
|
|
34
|
-
"@muxtsou/memory-cell-win32-x64": "0.1.
|
|
30
|
+
"@muxtsou/memory-cell-darwin-arm64": "0.1.5",
|
|
31
|
+
"@muxtsou/memory-cell-darwin-x64": "0.1.5",
|
|
32
|
+
"@muxtsou/memory-cell-linux-x64": "0.1.5",
|
|
33
|
+
"@muxtsou/memory-cell-linux-arm64": "0.1.5",
|
|
34
|
+
"@muxtsou/memory-cell-win32-x64": "0.1.5"
|
|
35
35
|
}
|
|
36
36
|
}
|