linksee-memory 0.4.1 → 0.4.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.
Files changed (2) hide show
  1. package/README.md +115 -28
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # linksee-memory
2
2
 
3
- > Local-first agent memory MCP. A cross-agent brain for **Claude Code, Cursor, OpenAI Codex, and Gemini CLI** — with a token-saving file diff cache that nobody else does. One SQLite file, all your LLMs read the same memory.
3
+ > **Your agent forgets everything when a session ends. Linksee Memory is the fix.**
4
4
  >
5
- > **v0.3.0** ships the **Five Blocks**: Tools + Resources + Prompts + Sampling + Roots, plus the newer **Elicitation** primitive. Most public MCP servers expose only Tools; v0.3.0 moves linksee-memory into the differentiated tier. Backward compatible all 8 v0.2.x tools keep their signatures. See [CHANGELOG.md](./CHANGELOG.md).
5
+ > Local-first cross-LLM memory MCP one SQLite file that **Claude Code, Cursor, Windsurf, OpenAI Codex, and Gemini CLI** all read from. Not just "what happened" but **WHY** it happened: 6-layer structured memory with precision recall that surfaces the right context at the right moment.
6
+ >
7
+ > `npx linksee-memory-setup` — one command, done.
6
8
 
7
9
  [![npm](https://img.shields.io/npm/v/linksee-memory.svg)](https://www.npmjs.com/package/linksee-memory)
8
10
  [![license](https://img.shields.io/npm/l/linksee-memory.svg)](./LICENSE)
@@ -98,7 +100,7 @@ It is a Model Context Protocol (MCP) server that gives any AI agent four superpo
98
100
  ## Three pillars
99
101
 
100
102
  1. **Token savings** via `read_smart` — sha256 + AST/heading/indent chunking. Re-reads return only diffs. **Measured 86% saved on a typical TS file edit, 99% saved on unchanged re-reads.**
101
- 2. **Cross-agent portability** — single SQLite file at `~/.linksee-memory/memory.db`. Same brain for Claude Code, Cursor, OpenAI Codex, Gemini CLI. (ChatGPT app needs Remote MCP — on roadmap for v0.4.)
103
+ 2. **Cross-agent portability** — single SQLite file at `~/.linksee-memory/memory.db`. Same brain for Claude Code, Cursor, Windsurf, OpenAI Codex, Gemini CLI.
102
104
  3. **WHY-first structured memory** — six explicit layers (`goal` / `context` / `emotion` / `implementation` / `caveat` / `learning`). Solves "flat fact memory is useless without goals".
103
105
 
104
106
  ## Quick Start — One Command
@@ -158,20 +160,103 @@ Each turn end takes ~100 ms. Failures are silent. Logs at `~/.linksee-memory/hoo
158
160
 
159
161
  </details>
160
162
 
163
+ ### Other editors / CLIs
164
+
165
+ Linksee Memory is a standard MCP server (stdio). Any tool that speaks MCP can connect:
166
+
167
+ <details>
168
+ <summary><strong>Cursor</strong></summary>
169
+
170
+ Add to `~/.cursor/mcp.json`:
171
+
172
+ ```json
173
+ {
174
+ "mcpServers": {
175
+ "linksee": {
176
+ "command": "npx",
177
+ "args": ["-y", "linksee-memory"]
178
+ }
179
+ }
180
+ }
181
+ ```
182
+
183
+ Restart Cursor. Memory tools appear in the agent panel.
184
+
185
+ </details>
186
+
187
+ <details>
188
+ <summary><strong>Windsurf</strong></summary>
189
+
190
+ Add to `~/.codeium/windsurf/mcp_config.json`:
191
+
192
+ ```json
193
+ {
194
+ "mcpServers": {
195
+ "linksee": {
196
+ "command": "npx",
197
+ "args": ["-y", "linksee-memory"]
198
+ }
199
+ }
200
+ }
201
+ ```
202
+
203
+ </details>
204
+
205
+ <details>
206
+ <summary><strong>OpenAI Codex CLI</strong></summary>
207
+
208
+ ```bash
209
+ codex --mcp-server "npx -y linksee-memory"
210
+ ```
211
+
212
+ Or add to `~/.codex/config.json`:
213
+
214
+ ```json
215
+ {
216
+ "mcpServers": {
217
+ "linksee": {
218
+ "command": "npx",
219
+ "args": ["-y", "linksee-memory"]
220
+ }
221
+ }
222
+ }
223
+ ```
224
+
225
+ </details>
226
+
227
+ <details>
228
+ <summary><strong>Gemini CLI</strong></summary>
229
+
230
+ Add to `~/.gemini/settings.json`:
231
+
232
+ ```json
233
+ {
234
+ "mcpServers": {
235
+ "linksee": {
236
+ "command": "npx",
237
+ "args": ["-y", "linksee-memory"]
238
+ }
239
+ }
240
+ }
241
+ ```
242
+
243
+ </details>
244
+
245
+ All editors share the same `~/.linksee-memory/memory.db`. A decision made in Claude Code is recalled in Cursor. A caveat recorded in Windsurf prevents the same mistake in Codex.
246
+
161
247
  ### Database location
162
248
 
163
249
  Default: `~/.linksee-memory/memory.db`. Override with `LINKSEE_MEMORY_DIR` env var.
164
250
 
165
- ## v0.3.0 Five Blocks at a glance
251
+ ## What's new in v0.4
166
252
 
167
- | MCP Block | Surface |
253
+ | Feature | Detail |
168
254
  |---|---|
169
- | **Tools** | 8 tools (unchanged signatures since v0.2). |
170
- | **Resources** | 4 static URIs (`memory://stats`, `memory://hot`, `memory://recent`, `memory://caveats`) + 3 templates (`memory://entity/{name}`, `memory://layer/{layer}`, `memory://memory/{id}`). Browseable via `@-mention` in clients that support it. |
171
- | **Prompts** | 5 reusable templates: `summarize-session`, `extract-caveats`, `weekly-consolidation`, `recall-and-write`, `entity-handoff`. |
172
- | **Sampling** *(client opt-in)* | `consolidate{use_llm:true}` asks the client LLM to rewrite consolidated cluster summaries into prose. Falls back to the heuristic when the client declines. |
173
- | **Roots** *(client opt-in)* | `recall_file{scope_to_roots:true}` filters path matches to files inside any client-provided working root. |
174
- | **Elicitation** *(client opt-in, newer primitive)* | `forget{interactive:true, memory_id:N}` asks the user to confirm via the client UI before deleting. |
255
+ | **One-command setup** | `npx linksee-memory-setup` registers MCP server, installs skill, configures auto-capture hook. One command instead of three. |
256
+ | **Structured memory v2** | 3-axis classification (altitude × type × state) for every memory. Auto-extraction from sessions produces machine-scannable JSON, not raw chat dumps. |
257
+ | **Precision recall guide** | SKILL.md now teaches agents HOW to write effective queries, WHEN to recall vs skip, and WHEN to proactively surface caveats before risky actions. |
258
+ | **"Use Linksee" trigger** | Add "Use Linksee" to any prompt to force memory recall same adoption pattern as Context7. |
259
+ | **Five MCP Blocks** | Tools + Resources + Prompts + Sampling + Roots + Elicitation. Most MCP servers expose only Tools; linksee-memory implements all six primitives. |
175
260
 
176
261
  ## Tools
177
262
 
@@ -190,32 +275,33 @@ Default: `~/.linksee-memory/memory.db`. Override with `LINKSEE_MEMORY_DIR` env v
190
275
 
191
276
  | Command | Purpose |
192
277
  |---|---|
278
+ | `npx linksee-memory-setup` | **v0.4.1** One-command setup: MCP server + skill + Stop hook. Idempotent — skips what's already done. |
193
279
  | `npx linksee-memory` | MCP server (stdio) |
194
280
  | `npx linksee-memory-sync` | Claude Code Stop-hook entry point |
195
281
  | `npx linksee-memory-import` | Batch-import Claude Code session JSONL history |
196
282
  | `npx linksee-memory-install-skill` | Install the Claude Code Skill that teaches the agent when to call recall/remember/read_smart |
197
- | `npx linksee-memory-stats` | **v0.1.0** Summary of the local DB (entity count / layer breakdown / top entities / top edited files). Add `--json` for machine-readable output. |
283
+ | `npx linksee-memory-stats` | Summary of the local DB (entity count / layer breakdown / top entities / top edited files). Add `--json` for machine-readable output. |
198
284
 
199
285
  ## The 6 memory layers
200
286
 
201
- Each entity (person / company / project / file / concept) can have memories across six layers. The layer encodes meaning, not category:
287
+ Each entity (person / company / project / file / concept) can have memories across six layers. Since v0.4, each memory uses the **3-axis structured format** (altitude × type × state):
202
288
 
203
289
  ```json
204
290
  {
205
- "goal": { "primary": "...", "sub_tasks": [], "deadline": "..." },
206
- "context": { "why_now": "...", "triggering_event": "...", "when": "..." },
207
- "emotion": { "temperature": "hot|warm|cold", "user_tone": "..." },
208
- "implementation": {
209
- "success": [{ "what": "...", "evidence": "..." }],
210
- "failure": [{ "what": "...", "why_failed": "..." }]
211
- },
212
- "caveat": [{ "rule": "...", "reason": "...", "from_incident": "..." }],
213
- "learning":[{ "at": "...", "learned": "...", "prior_belief": "..." }]
291
+ "title": "freee OAuth token expires in 24h",
292
+ "altitude": "implementation",
293
+ "type": "outcome",
294
+ "state": "done",
295
+ "what": "freee OAuth token expires in 24 hours. Must refresh proactively.",
296
+ "why": "freee uses short-lived tokens unlike most SaaS (usually 30-90 day expiry)",
297
+ "affects": ["src/integrations/freee/auth.ts"],
298
+ "next_action": null
214
299
  }
215
300
  ```
216
301
 
217
302
  - `caveat` memories are auto-protected from forgetting (pain lessons, never lost).
218
303
  - `goal` memories bypass decay while the goal is active.
304
+ - `state` tracks lifecycle: `open` → `decided` → `in_progress` → `done` / `stalled` / `superseded`.
219
305
 
220
306
  ## Architecture
221
307
 
@@ -238,15 +324,16 @@ The conversation↔file linkage is the key. Every file edit captured by the Stop
238
324
 
239
325
  ## Roadmap
240
326
 
241
- - ✅ Core 6 MCP tools (`remember` / `recall` / `recall_file` / `forget` / `consolidate` / `read_smart`)
327
+ - ✅ Core 8 MCP tools + Five Blocks (Tools + Resources + Prompts + Sampling + Roots + Elicitation)
242
328
  - ✅ Stop-hook auto-capture for Claude Code
243
329
  - ✅ JP/EN trigram FTS5
244
- - ✅ Five Blocks (v0.3.0): Tools + Resources + Prompts + Sampling + Roots + Elicitation
245
- - ✅ Cursor + OpenAI Codex + Gemini CLI adapters (stdio MCP, same `npx -y linksee-memory`)
246
- - 🚧 `PreToolUse` hook to auto-intercept `Read` (zero-config token savings)
247
- - 🔮 ChatGPT app (web/mobile) support via `linksee-memory-remote` (Remote MCP over HTTPS, v0.4)
330
+ - ✅ One-command setup (`npx linksee-memory-setup`)
331
+ - ✅ Structured memory v2 (3-axis classification: altitude × type × state)
332
+ - Precision recall guide + proactive caveat surfacing
333
+ - Cross-LLM: Claude Code, Cursor, Windsurf, OpenAI Codex, Gemini CLI
334
+ - 🚧 Landing page + SEO
248
335
  - 🔮 Vector search via `sqlite-vec` (already in deps, embedding backend pending)
249
- - 🔮 Cross-device cloud sync (Pro tier, summer 2026)
336
+ - 🔮 Cross-device cloud sync (Pro tier)
250
337
  - 🔮 Optional anonymized telemetry → MCP-quality intelligence layer
251
338
 
252
339
  ## Comparison with Claude Code auto-memory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linksee-memory",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "mcpName": "io.github.michielinksee/linksee-memory",
5
5
  "description": "Local-first agent memory MCP — cross-agent brain with 6-layer structured memory + token-saving file diff cache",
6
6
  "type": "module",