@pcircle/memesh 4.2.10 → 4.3.0
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.de.md +14 -13
- package/README.es.md +14 -13
- package/README.fr.md +14 -13
- package/README.ja.md +14 -13
- package/README.ko.md +14 -13
- package/README.md +15 -14
- package/README.pt.md +14 -13
- package/README.th.md +15 -14
- package/README.vi.md +14 -13
- package/README.zh-CN.md +12 -11
- package/README.zh-TW.md +12 -11
- package/dashboard/dist/index.html +8 -8
- package/dist/cli/view.d.ts.map +1 -1
- package/dist/cli/view.js +6 -0
- package/dist/cli/view.js.map +1 -1
- package/dist/core/config.d.ts +14 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +25 -5
- package/dist/core/config.js.map +1 -1
- package/dist/core/doctor.d.ts +3 -0
- package/dist/core/doctor.d.ts.map +1 -1
- package/dist/core/doctor.js +84 -5
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/dreamer.d.ts.map +1 -1
- package/dist/core/dreamer.js +26 -15
- package/dist/core/dreamer.js.map +1 -1
- package/dist/core/embedder.d.ts +6 -1
- package/dist/core/embedder.d.ts.map +1 -1
- package/dist/core/embedder.js +33 -9
- package/dist/core/embedder.js.map +1 -1
- package/dist/core/llm-validator.d.ts.map +1 -1
- package/dist/core/llm-validator.js +6 -0
- package/dist/core/llm-validator.js.map +1 -1
- package/dist/core/memory-tool.d.ts +37 -0
- package/dist/core/memory-tool.d.ts.map +1 -0
- package/dist/core/memory-tool.js +371 -0
- package/dist/core/memory-tool.js.map +1 -0
- package/dist/core/operations.d.ts +11 -5
- package/dist/core/operations.d.ts.map +1 -1
- package/dist/core/operations.js +91 -34
- package/dist/core/operations.js.map +1 -1
- package/dist/core/prompt-safety.d.ts.map +1 -1
- package/dist/core/prompt-safety.js.map +1 -1
- package/dist/core/schema-export.d.ts.map +1 -1
- package/dist/core/schema-export.js +19 -34
- package/dist/core/schema-export.js.map +1 -1
- package/dist/core/types.d.ts +5 -12
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +4 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/verifier.d.ts +3 -0
- package/dist/core/verifier.d.ts.map +1 -1
- package/dist/core/verifier.js +27 -11
- package/dist/core/verifier.js.map +1 -1
- package/dist/db.d.ts +11 -0
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +174 -35
- package/dist/db.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/knowledge-graph.d.ts +1 -2
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +94 -44
- package/dist/knowledge-graph.js.map +1 -1
- package/dist/skills-manifest.json +14 -15
- package/dist/storage/conflicts.d.ts +1 -4
- package/dist/storage/conflicts.d.ts.map +1 -1
- package/dist/storage/conflicts.js +2 -5
- package/dist/storage/conflicts.js.map +1 -1
- package/dist/storage/fts-index.d.ts +11 -0
- package/dist/storage/fts-index.d.ts.map +1 -1
- package/dist/storage/fts-index.js +58 -2
- package/dist/storage/fts-index.js.map +1 -1
- package/dist/transports/cli/cli.d.ts.map +1 -1
- package/dist/transports/cli/cli.js +96 -50
- package/dist/transports/cli/cli.js.map +1 -1
- package/dist/transports/http/retired-routes.d.ts +2 -0
- package/dist/transports/http/retired-routes.d.ts.map +1 -0
- package/dist/transports/http/retired-routes.js +4 -0
- package/dist/transports/http/retired-routes.js.map +1 -0
- package/dist/transports/http/server.d.ts.map +1 -1
- package/dist/transports/http/server.js +6 -3
- package/dist/transports/http/server.js.map +1 -1
- package/dist/transports/mcp/handlers.d.ts +4 -25
- package/dist/transports/mcp/handlers.d.ts.map +1 -1
- package/dist/transports/mcp/handlers.js +8 -28
- package/dist/transports/mcp/handlers.js.map +1 -1
- package/dist/transports/schemas.d.ts +0 -5
- package/dist/transports/schemas.d.ts.map +1 -1
- package/dist/transports/schemas.js +0 -5
- package/dist/transports/schemas.js.map +1 -1
- package/package.json +35 -6
- package/scripts/hooks/_generated/fts-index.js +58 -2
- package/scripts/hooks/_shared.js +238 -4
- package/scripts/hooks/pre-compact.js +14 -3
- package/scripts/hooks/pre-edit-recall.js +76 -9
- package/skills/memesh/SKILL.md +11 -4
- package/skills/memesh-review/SKILL.md +7 -5
- package/dist/core/consolidator.d.ts +0 -3
- package/dist/core/consolidator.d.ts.map +0 -1
- package/dist/core/consolidator.js +0 -108
- package/dist/core/consolidator.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
**MeMesh** — the open-source **memory layer** for Claude Code & MCP agents. One SQLite file. No cloud. Plugs into any LLM.
|
|
20
20
|
|
|
21
|
-
## 95.
|
|
21
|
+
## 95.60% R@5 on LongMemEval-S — beats Mem0 by 46 points
|
|
22
22
|
|
|
23
23
|
MeMesh's retrieval is **FTS5 alone** — no LLM, no embeddings on the hot path. Measured against the public [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) benchmark (500 questions, MIT-licensed):
|
|
24
24
|
|
|
25
25
|
| System | R@5 | Source |
|
|
26
26
|
|---|---|---|
|
|
27
|
-
| **MeMesh (Mode A,
|
|
27
|
+
| **MeMesh (Mode A, via `recallEnhanced()`)** | **95.60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
28
28
|
| MemPalace | 96.6% | Vendor self-report |
|
|
29
29
|
| Supermemory | ~82% | Vendor estimate |
|
|
30
30
|
| Zep | 63.8% | LongMemEval paper |
|
|
@@ -202,7 +202,7 @@ memesh
|
|
|
202
202
|
| **A developer using Claude Code** | Auto-recall project decisions, file-specific lessons, and past failures as you work |
|
|
203
203
|
| **A coding-agent power user** | Share one local memory layer across MCP-compatible tools |
|
|
204
204
|
| **A team experimenting with AI coding workflows** | Export/import project knowledge without introducing hosted infrastructure |
|
|
205
|
-
| **An agent developer** | Add local memory through MCP, HTTP,
|
|
205
|
+
| **An agent developer** | Add local memory through MCP, HTTP, or the CLI |
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
@@ -287,7 +287,7 @@ All configuration is via environment variables. Defaults are local-only and zero
|
|
|
287
287
|
|---|---|---|
|
|
288
288
|
| `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | Override the SQLite database location. |
|
|
289
289
|
| `MEMESH_AUTO_CAPTURE` | `true` | Disable the auto-capture hooks (`Stop`, `PreCompact`) entirely. |
|
|
290
|
-
| `MEMESH_AUTO_DETECT_LLM` | unset (auto-detect **on**) | Set to `0` to stop memesh using an API key it finds in your shell env. By default, if `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` is set and you have not configured a provider in `~/.memesh/config.json`, memesh uses it for write-side LLM features (
|
|
290
|
+
| `MEMESH_AUTO_DETECT_LLM` | unset (auto-detect **on**) | Set to `0` to stop memesh using an API key it finds in your shell env. By default, if `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` is set and you have not configured a provider in `~/.memesh/config.json`, memesh uses it for write-side LLM features (lesson extraction, auto-tagging, dream). Embeddings are unaffected — they stay local ONNX (384-dim) unless you explicitly set `embedder.provider`. |
|
|
291
291
|
| `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | unset | Set to `1` to enable an experimental working-model protocol (CTO / Orchestrator / Agents framing). Adds a session-start banner, a Bash command nudge, and `verify_agent_work` telemetry. The protocol's effectiveness is being instrumented, not yet proven — opt in if you want to participate. **Default is OFF**: the core memory features work without this flag. |
|
|
292
292
|
| `MEMESH_AUTO_UPDATE` | `off` | Auto-update policy. `off` (default) never auto-updates; `patch` allows `X.Y.Z → X.Y.Z+N`; `minor` adds `X.Y.Z → X.Y+1.0`; `major` allows any bump. When permitted, a detached `npm install -g` fires at session end (Stop hook) so it never blocks your work — outcomes land in `~/.memesh/auto-update.log`. Also settable as `autoUpdate` in `~/.memesh/config.json` (env wins). When the installed version is deprecated by maintainers (security advisory), `patch` is force-allowed even on `off` — minor / major bumps still stay manual to avoid silent behaviour drift. |
|
|
293
293
|
| `OPENAI_API_KEY` | unset | Your OpenAI key. Used automatically for LLM features unless you set `MEMESH_AUTO_DETECT_LLM=0` or configure a provider explicitly. |
|
|
@@ -318,15 +318,17 @@ When npm flags an installed version as deprecated (typically a security advisory
|
|
|
318
318
|
|
|
319
319
|
## Smart Features
|
|
320
320
|
|
|
321
|
-
**🧠 Smart Search** — Search "login security" and find memories about "OAuth PKCE". MeMesh
|
|
321
|
+
**🧠 Smart Search** — Search "login security" and find memories about "OAuth PKCE". MeMesh uses FTS5 + sqlite-vec on the hot path, LLM-free, and the vector supplement still reaches across related wording.
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
**🌏 Search in scripts that don't use spaces** — Chinese, Japanese, Korean, Thai, Lao, Khmer and half-width katakana are indexed as overlapping character pairs, so a memory written as 「資料庫遷移前一定要先備份」 is found by searching 「備份」 — not only by its exact full text. Text is normalised (NFC) on both the write and the query side, so memories typed on macOS or with a Korean or Vietnamese IME are found in either spelling.
|
|
324
|
+
|
|
325
|
+
**📊 Scored Ranking** — Results ranked by relevance (30%) + recency (25%) + frequency (18%) + confidence (17%) + recall impact (10%).
|
|
324
326
|
|
|
325
327
|
**🔄 Knowledge Evolution** — Decisions change. `forget` archives old memories (never deletes). `supersedes` relations link old → new. Your AI always sees the latest version.
|
|
326
328
|
|
|
327
329
|
**⚠️ Conflict Detection** — If you have two memories that contradict each other, MeMesh warns you.
|
|
328
330
|
|
|
329
|
-
**🕸️ Knowledge Graph Connectivity** — `memesh kg backfill-relations --all-rules` links orphan entities using tag co-occurrence, project clustering, session context, and name similarity — no LLM required.
|
|
331
|
+
**🕸️ Knowledge Graph Connectivity** — `memesh kg backfill-relations --all-rules` links orphan entities using tag co-occurrence, project clustering, session context, and name similarity — no LLM required.
|
|
330
332
|
|
|
331
333
|
**📦 Team Sharing** — `memesh export > team-knowledge.json` → share with your team → `memesh import team-knowledge.json`
|
|
332
334
|
Imported bundles stay searchable, but MeMesh does not auto-inject imported memories into Claude hooks until you review or re-store them locally.
|
|
@@ -348,7 +350,7 @@ Imported bundles stay searchable, but MeMesh does not auto-inject imported memor
|
|
|
348
350
|
|
|
349
351
|
## Unlock Smart Mode (Optional)
|
|
350
352
|
|
|
351
|
-
MeMesh works offline by default — recall stays strictly LLM-free (95.
|
|
353
|
+
MeMesh works offline by default — recall stays strictly LLM-free (95.60% R@5 on LongMemEval-S out of the box). Add an LLM API key only if you want LLM-augmented analysis flows on top: smarter session extraction, auto-tagging of new memories, lesson generation from failures, and `dream` compression:
|
|
352
354
|
|
|
353
355
|
```bash
|
|
354
356
|
memesh config set llm.provider anthropic
|
|
@@ -374,11 +376,11 @@ The embedder is configured **independently of the chat LLM** — changing `llm.p
|
|
|
374
376
|
|
|
375
377
|
| | Level 0 (default) | Level 1 (Smart Mode) |
|
|
376
378
|
|---|---|---|
|
|
377
|
-
| **Search** | FTS5 + sqlite-vec, 95.
|
|
379
|
+
| **Search** | FTS5 + sqlite-vec, 95.60% R@5 | unchanged — recall is LLM-free at every level |
|
|
378
380
|
| **Auto-capture** | Rule-based patterns | + LLM extracts decisions & lessons |
|
|
379
381
|
| **Auto-tagging** | Manual tags only | + LLM generates tags for new memories |
|
|
380
382
|
| **Failure analysis** | Not available | + LLM converts session errors into structured lessons |
|
|
381
|
-
| **Compression** | Not available | `
|
|
383
|
+
| **Compression** | Not available | `dream` compress verbose memories |
|
|
382
384
|
| **Cost** | Free, no API key | ~$0.0001 per analysis call (Haiku) |
|
|
383
385
|
|
|
384
386
|
---
|
|
@@ -388,9 +390,8 @@ The embedder is configured **independently of the chat LLM** — changing `llm.p
|
|
|
388
390
|
| Tool | What it does |
|
|
389
391
|
|------|-------------|
|
|
390
392
|
| `remember` | Store knowledge with observations, relations, and tags |
|
|
391
|
-
| `recall` | FTS5 + sqlite-vec search with multi-factor scoring (relevance, recency, frequency, confidence,
|
|
393
|
+
| `recall` | FTS5 + sqlite-vec search with multi-factor scoring (relevance, recency, frequency, confidence, recall impact) — no LLM in the hot path |
|
|
392
394
|
| `forget` | Soft-archive (never deletes) or remove specific observations |
|
|
393
|
-
| `consolidate` | LLM-powered compression of verbose memories |
|
|
394
395
|
| `export` | Share memories as JSON between projects or team members |
|
|
395
396
|
| `import` | Import memories with merge strategies (skip / overwrite / append) |
|
|
396
397
|
| `learn` | Record structured lessons from mistakes (error, root cause, fix, prevention) |
|
|
@@ -454,7 +455,7 @@ Session start surfaces a one-line banner (throttled to once per 24h per version)
|
|
|
454
455
|
```bash
|
|
455
456
|
git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
|
|
456
457
|
cd memesh-llm-memory && npm install && npm run build
|
|
457
|
-
npm test
|
|
458
|
+
npm test
|
|
458
459
|
npm run test:e2e-dashboard
|
|
459
460
|
```
|
|
460
461
|
|
package/README.pt.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -29,13 +29,13 @@ Este pacote é a camada de memória local da família de produtos MeMesh. É pro
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## Prova — 95,
|
|
32
|
+
## Prova — 95,60% R@5 no LongMemEval-S
|
|
33
33
|
|
|
34
34
|
O motor de recuperação do MeMesh é **apenas FTS5** (sem LLM, sem embeddings no hot path), medido contra o benchmark público [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) (500 perguntas, licença MIT):
|
|
35
35
|
|
|
36
36
|
| Sistema | R@5 | Fonte |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| **MeMesh (Mode A,
|
|
38
|
+
| **MeMesh (Mode A, via `recallEnhanced()`)** | **95,60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
39
39
|
| MemPalace | 96,6% | Auto-relato do fornecedor |
|
|
40
40
|
| Supermemory | ~82% | Estimativa do fornecedor |
|
|
41
41
|
| Zep | 63,8% | Paper LongMemEval |
|
|
@@ -173,7 +173,7 @@ memesh
|
|
|
173
173
|
| **Um dev usando Claude Code** | Recuperar automaticamente decisões de projeto, lições por arquivo e falhas passadas enquanto trabalha |
|
|
174
174
|
| **Um power user de agentes de código** | Compartilhar uma camada de memória local entre ferramentas compatíveis com MCP |
|
|
175
175
|
| **Uma equipe experimentando workflows de IA para código** | Exportar/importar conhecimento de projeto sem precisar de infraestrutura hospedada |
|
|
176
|
-
| **Um desenvolvedor de agentes** | Adicionar memória local via MCP, HTTP
|
|
176
|
+
| **Um desenvolvedor de agentes** | Adicionar memória local via MCP, HTTP ou CLI |
|
|
177
177
|
|
|
178
178
|
---
|
|
179
179
|
|
|
@@ -289,15 +289,17 @@ Quando o npm sinaliza uma versão instalada como depreciada (tipicamente um advi
|
|
|
289
289
|
|
|
290
290
|
## Funcionalidades Inteligentes
|
|
291
291
|
|
|
292
|
-
**🧠 Busca Inteligente** — Busque "login security" e encontre memórias sobre "OAuth PKCE". MeMesh
|
|
292
|
+
**🧠 Busca Inteligente** — Busque "login security" e encontre memórias sobre "OAuth PKCE". MeMesh usa FTS5 + sqlite-vec no caminho quente, sem LLM; o complemento vetorial ainda alcança termos relacionados.
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
**🌏 Busca em escritas que não separam palavras por espaços** — Chinês, japonês, coreano, tailandês, laosiano, khmer e katakana de meia largura são indexados como pares de caracteres sobrepostos. Assim, uma memória escrita como 「資料庫遷移前一定要先備份」 é encontrada buscando 「備份」, e não apenas pelo texto completo exato. O texto é normalizado (NFC) tanto na escrita quanto na consulta, então uma memória digitada no macOS ou com um IME coreano ou vietnamita é encontrada em qualquer das duas grafias.
|
|
295
|
+
|
|
296
|
+
**📊 Ranking Pontuado** — Resultados ranqueados por relevância (30%) + recência (25%) + frequência (18%) + confiança (17%) + impacto de recall (10%).
|
|
295
297
|
|
|
296
298
|
**🔄 Evolução de Conhecimento** — Decisões mudam. `forget` arquiva memórias antigas (nunca deleta). Relações `supersedes` vinculam antigas → novas. Sua IA sempre vê a versão mais recente.
|
|
297
299
|
|
|
298
300
|
**⚠️ Detecção de Conflitos** — Se você tem duas memórias que se contradizem, MeMesh te avisa.
|
|
299
301
|
|
|
300
|
-
**🕸️ Conectividade do grafo de conhecimento** — `memesh kg backfill-relations --all-rules` liga entidades órfãs usando co-ocorrência de tags, agrupamento de projetos, contexto de sessão e similaridade de nomes — sem LLM.
|
|
302
|
+
**🕸️ Conectividade do grafo de conhecimento** — `memesh kg backfill-relations --all-rules` liga entidades órfãs usando co-ocorrência de tags, agrupamento de projetos, contexto de sessão e similaridade de nomes — sem LLM.
|
|
301
303
|
|
|
302
304
|
**📦 Compartilhamento em Equipe** — `memesh export > team-knowledge.json` → compartilhe com sua equipe → `memesh import team-knowledge.json`
|
|
303
305
|
Bundles importados permanecem pesquisáveis, mas MeMesh não injeta automaticamente memórias importadas nos hooks do Claude até você revisar ou re-armazená-las localmente.
|
|
@@ -319,7 +321,7 @@ Bundles importados permanecem pesquisáveis, mas MeMesh não injeta automaticame
|
|
|
319
321
|
|
|
320
322
|
## Desbloqueie Smart Mode (Opcional)
|
|
321
323
|
|
|
322
|
-
MeMesh funciona offline por padrão — o recall permanece estritamente LLM-free (95,
|
|
324
|
+
MeMesh funciona offline por padrão — o recall permanece estritamente LLM-free (95,60% R@5 no LongMemEval-S, sem LLM). Adicione uma chave de API de LLM apenas se quiser fluxos de análise LLM-augmented adicionais: extração de sessão mais inteligente, auto-tagging de novas memórias, geração de lessons a partir de falhas, e compressão `dream`:
|
|
323
325
|
|
|
324
326
|
```bash
|
|
325
327
|
memesh config set llm.provider anthropic
|
|
@@ -345,11 +347,11 @@ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.pr
|
|
|
345
347
|
|
|
346
348
|
| | Level 0 (padrão) | Level 1 (Smart Mode) |
|
|
347
349
|
|---|---|---|
|
|
348
|
-
| **Busca** | FTS5 + sqlite-vec, 95,
|
|
350
|
+
| **Busca** | FTS5 + sqlite-vec, 95,60% R@5 | inalterado — recall é LLM-free em todos os níveis |
|
|
349
351
|
| **Auto-capture** | Padrões baseados em regras | + LLM extrai decisões & lições |
|
|
350
352
|
| **Auto-tagging** | Apenas tags manuais | + LLM gera tags para novas memórias |
|
|
351
353
|
| **Análise de falhas** | Não disponível | + LLM converte erros de sessão em structured lessons |
|
|
352
|
-
| **Compressão** | Não disponível | `
|
|
354
|
+
| **Compressão** | Não disponível | `dream` comprimem memórias verbosas |
|
|
353
355
|
| **Custo** | Grátis, sem chave de API | ~$0.0001 por analysis call (Haiku) |
|
|
354
356
|
|
|
355
357
|
---
|
|
@@ -359,9 +361,8 @@ O embedder é configurado **independentemente do LLM de chat** — mudar `llm.pr
|
|
|
359
361
|
| Ferramenta | O que faz |
|
|
360
362
|
|------|-------------|
|
|
361
363
|
| `remember` | Armazena conhecimento com observações, relações e tags |
|
|
362
|
-
| `recall` | Busca FTS5 + sqlite-vec com scoring multi-fator (relevância, recência, frequência, confiança,
|
|
364
|
+
| `recall` | Busca FTS5 + sqlite-vec com scoring multi-fator (relevância, recência, frequência, confiança, impacto de recall) — sem LLM no hot path |
|
|
363
365
|
| `forget` | Soft-archive (nunca deleta) ou remove observações específicas |
|
|
364
|
-
| `consolidate` | Compressão com LLM de memórias verbosas |
|
|
365
366
|
| `export` | Compartilha memórias como JSON entre projetos ou membros da equipe |
|
|
366
367
|
| `import` | Importa memórias com estratégias de merge (skip / overwrite / append) |
|
|
367
368
|
| `learn` | Registra lições estruturadas de erros (erro, causa raiz, fix, prevenção) |
|
|
@@ -425,7 +426,7 @@ No início da sessão aparece um banner de uma linha (limitado a uma vez por 24h
|
|
|
425
426
|
```bash
|
|
426
427
|
git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
|
|
427
428
|
cd memesh-llm-memory && npm install && npm run build
|
|
428
|
-
npm test
|
|
429
|
+
npm test
|
|
429
430
|
npm run test:e2e-dashboard
|
|
430
431
|
```
|
|
431
432
|
|
package/README.th.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## หลักฐาน — 95.
|
|
32
|
+
## หลักฐาน — 95.60% R@5 บน LongMemEval-S
|
|
33
33
|
|
|
34
34
|
เครื่องมือเรียกคืนของ MeMesh ใช้ **FTS5 เพียงอย่างเดียว** (ไม่มี LLM ไม่มี embedding บนเส้นทางหลัก) วัดผลด้วยเบนช์มาร์กสาธารณะ [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) (500 คำถาม สัญญาอนุญาต MIT):
|
|
35
35
|
|
|
36
36
|
| ระบบ | R@5 | ที่มา |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| **MeMesh (Mode A,
|
|
38
|
+
| **MeMesh (Mode A, via `recallEnhanced()`)** | **95.60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
39
39
|
| MemPalace | 96.6% | รายงานของผู้พัฒนาเอง |
|
|
40
40
|
| Supermemory | ~82% | ประมาณการของผู้พัฒนา |
|
|
41
41
|
| Zep | 63.8% | เปเปอร์ LongMemEval |
|
|
@@ -188,7 +188,7 @@ memesh
|
|
|
188
188
|
| **นักพัฒนาที่ใช้ Claude Code** | เรียกคืนการตัดสินใจโครงการ บทเรียนเฉพาะไฟล์ และความล้มเหลวที่ผ่านมาโดยอัตโนมัติขณะทำงาน |
|
|
189
189
|
| **ผู้ใช้เอเจนต์คิดโค้ดขั้นสูง** | ใช้ชั้นหน่วยความจำภายในตัวเดียวร่วมกันบนเครื่องมือที่รองรับ MCP |
|
|
190
190
|
| **ทีมทดลองเวิร์กโฟลว์คิดโค้ด AI** | ส่งออก/นำเข้าความรู้โครงการโดยไม่ต้องสถาปัตยกรรมบนคลาวด์ |
|
|
191
|
-
| **นักพัฒนาเอเจนต์** | เพิ่มหน่วยความจำภายในผ่าน MCP HTTP
|
|
191
|
+
| **นักพัฒนาเอเจนต์** | เพิ่มหน่วยความจำภายในผ่าน MCP HTTP หรือ CLI |
|
|
192
192
|
|
|
193
193
|
---
|
|
194
194
|
|
|
@@ -273,7 +273,7 @@ memesh export-schema \
|
|
|
273
273
|
|---|---|---|
|
|
274
274
|
| `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | เปลี่ยนตำแหน่งฐานข้อมูล SQLite |
|
|
275
275
|
| `MEMESH_AUTO_CAPTURE` | `true` | ปิดการใช้ hook จับข้อมูลอัตโนมัติทั้งหมด (`Stop`, `PreCompact`) |
|
|
276
|
-
| `MEMESH_AUTO_DETECT_LLM` | ไม่ได้ตั้งค่า (ตรวจจับอัตโนมัติ **เปิด**) | ตั้งเป็น `0` เพื่อไม่ให้ memesh ใช้คีย์ API ที่พบในสภาพแวดล้อมของเชลล์ โดยค่าเริ่มต้น หากตั้ง `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` ไว้ และคุณยังไม่ได้กำหนดผู้ให้บริการใน `~/.memesh/config.json` memesh จะใช้คีย์นั้นสำหรับฟีเจอร์ LLM ฝั่งเขียน (
|
|
276
|
+
| `MEMESH_AUTO_DETECT_LLM` | ไม่ได้ตั้งค่า (ตรวจจับอัตโนมัติ **เปิด**) | ตั้งเป็น `0` เพื่อไม่ให้ memesh ใช้คีย์ API ที่พบในสภาพแวดล้อมของเชลล์ โดยค่าเริ่มต้น หากตั้ง `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` ไว้ และคุณยังไม่ได้กำหนดผู้ให้บริการใน `~/.memesh/config.json` memesh จะใช้คีย์นั้นสำหรับฟีเจอร์ LLM ฝั่งเขียน (การสกัดบทเรียน, auto-tagging, dream) ส่วน embeddings ไม่ได้รับผลกระทบ — ยังคงเป็น ONNX ในเครื่อง (384 มิติ) เว้นแต่คุณจะตั้ง `embedder.provider` อย่างชัดเจน |
|
|
277
277
|
| `MEMESH_ENABLE_AGENTIC_ORCHESTRATION` | ไม่ตั้ง | ตั้งเป็น `1` เพื่อเปิดใช้โปรโตคอล working-model เชิงทดลอง (กรอบ CTO / Orchestrator / Agents) เพิ่มแบนเนอร์ตอนเริ่มเซสชัน การเตือนคำสั่ง Bash และเทเลเมตรี `verify_agent_work` ประสิทธิผลของโปรโตคอลกำลังถูกเก็บข้อมูล ยังไม่ได้พิสูจน์ — opt-in ถ้าต้องการเข้าร่วม **ค่าเริ่มต้นปิด**: ฟีเจอร์หน่วยความจำหลักทำงานได้โดยไม่ต้องเปิดธงนี้ |
|
|
278
278
|
| `MEMESH_AUTO_UPDATE` | `off` | นโยบายอัปเดตอัตโนมัติ `off` (ค่าเริ่มต้น) ไม่อัปเดตเลย; `patch` อนุญาต `X.Y.Z → X.Y.Z+N`; `minor` เพิ่ม `X.Y.Z → X.Y+1.0`; `major` อนุญาตทุกการเพิ่มเวอร์ชัน เมื่ออนุญาต `npm install -g` แบบ detached จะทำงานเมื่อจบเซสชัน (Stop hook) เพื่อไม่บล็อกงานของคุณ — ผลลัพธ์ลงใน `~/.memesh/auto-update.log` ตั้งใน `~/.memesh/config.json` ผ่านคีย์ `autoUpdate` ก็ได้ (env ชนะ) เมื่อเวอร์ชันที่ติดตั้งถูก deprecate (security advisory) `patch` จะถูกบังคับเปิดแม้ตั้งเป็น `off` — minor / major ยังต้องทำมือเพื่อหลีกเลี่ยงการเปลี่ยนพฤติกรรมเงียบ ๆ |
|
|
279
279
|
| `OPENAI_API_KEY` | ไม่ได้ตั้งค่า | คีย์ OpenAI ของคุณ ใช้โดยอัตโนมัติสำหรับฟีเจอร์ LLM เว้นแต่คุณจะตั้ง `MEMESH_AUTO_DETECT_LLM=0` หรือกำหนดผู้ให้บริการอย่างชัดเจน |
|
|
@@ -304,15 +304,17 @@ memesh export-schema \
|
|
|
304
304
|
|
|
305
305
|
## คุณสมบัติอัจฉริยะ
|
|
306
306
|
|
|
307
|
-
**🧠 ค้นหาอัจฉริยะ** — ค้นหา "login security" และค้นหาหน่วยความจำเกี่ยวกับ "OAuth PKCE" MeMesh
|
|
307
|
+
**🧠 ค้นหาอัจฉริยะ** — ค้นหา "login security" และค้นหาหน่วยความจำเกี่ยวกับ "OAuth PKCE" MeMesh ใช้ FTS5 + sqlite-vec บนเส้นทางหลัก โดยไม่ใช้ LLM ส่วนเสริมเวกเตอร์ยังเข้าถึงถ้อยคำที่เกี่ยวข้องได้
|
|
308
308
|
|
|
309
|
-
|
|
309
|
+
**🌏 ค้นหาในภาษาที่ไม่เว้นวรรคระหว่างคำ** — ภาษาจีน ญี่ปุ่น เกาหลี ไทย ลาว เขมร และคาตากานะครึ่งความกว้าง จะถูกทำดัชนีเป็นคู่อักขระที่ต่อเนื่องกัน ดังนั้นความทรงจำที่บันทึกว่า "สำรองข้อมูลก่อนย้ายฐานข้อมูล" จึงค้นเจอได้ด้วยคำว่า "สำรอง" ไม่ต้องพิมพ์ข้อความเต็มให้ตรงทุกตัวอักษร ข้อความจะถูกทำให้เป็นรูปแบบมาตรฐาน (NFC) ทั้งตอนบันทึกและตอนค้นหา ความทรงจำที่พิมพ์บน macOS หรือด้วย IME ภาษาเกาหลีหรือเวียดนามจึงค้นเจอได้ทั้งสองรูปแบบ
|
|
310
|
+
|
|
311
|
+
**📊 การจัดอันดับแบบให้คะแนน** — ผลลัพธ์อันดับตามความเกี่ยวข้อง (30%) + ความเพิ่งพ้อง (25%) + ความถี่ (18%) + ความมั่นใจ (17%) + ผลกระทบการเรียกคืน (10%)
|
|
310
312
|
|
|
311
313
|
**🔄 วิวัฒนาการของความรู้** — การตัดสินใจเปลี่ยนแปลง `forget` เก็บหน่วยความจำเก่า (ไม่เคยลบ) `supersedes` ความสัมพันธ์เชื่อมโยงเก่า → ใหม่ AI เห็นรุ่นล่าสุดเสมอ
|
|
312
314
|
|
|
313
315
|
**⚠️ การตรวจจับความขัดแย้ง** — ถ้าคุณมีหน่วยความจำสองอันที่ขัดแย้งกัน MeMesh เตือนคุณ
|
|
314
316
|
|
|
315
|
-
**🕸️ การเชื่อมต่อกราฟความรู้** — `memesh kg backfill-relations --all-rules` เชื่อมโยงเอนทิตีกำพร้าโดยใช้การร่วมเกิดของแท็ก การจัดกลุ่มโครงการ บริบทเซสชัน และความคล้ายคลึงของชื่อ — ไม่ต้องใช้ LLM
|
|
317
|
+
**🕸️ การเชื่อมต่อกราฟความรู้** — `memesh kg backfill-relations --all-rules` เชื่อมโยงเอนทิตีกำพร้าโดยใช้การร่วมเกิดของแท็ก การจัดกลุ่มโครงการ บริบทเซสชัน และความคล้ายคลึงของชื่อ — ไม่ต้องใช้ LLM
|
|
316
318
|
|
|
317
319
|
**📦 การแบ่งปันทีม** — `memesh export > team-knowledge.json` → แบ่งปันกับทีม → `memesh import team-knowledge.json`
|
|
318
320
|
บันเดิลนำเข้าสามารถค้นหาได้ แต่ MeMesh ไม่ได้แทรกหน่วยความจำนำเข้าโดยอัตโนมัติลงใน hook Claude จนกว่าคุณจะตรวจสอบหรือเก็บเป็นท้องถิ่นอีกครั้ง
|
|
@@ -334,7 +336,7 @@ memesh export-schema \
|
|
|
334
336
|
|
|
335
337
|
## ปลดล็อค Smart Mode (ทางเลือก)
|
|
336
338
|
|
|
337
|
-
MeMesh ทำงานแบบออฟไลน์โดยค่าเริ่มต้น เพิ่มคีย์ API LLM
|
|
339
|
+
MeMesh ทำงานแบบออฟไลน์โดยค่าเริ่มต้น — การเรียกคืนไม่ใช้ LLM เลย (95.60% R@5 บน LongMemEval-S ทันทีที่ติดตั้ง) เพิ่มคีย์ API LLM เฉพาะเมื่อต้องการโฟลว์วิเคราะห์ที่เสริมด้วย LLM เท่านั้น ได้แก่ การสกัดเซสชันที่ฉลาดขึ้น การติดแท็กหน่วยความจำใหม่อัตโนมัติ การสร้างบทเรียนจากความล้มเหลว และการบีบอัดด้วย `dream`:
|
|
338
340
|
|
|
339
341
|
```bash
|
|
340
342
|
memesh config set llm.provider anthropic
|
|
@@ -360,11 +362,11 @@ embedder ถูกตั้งค่า**แยกจาก LLM แชท** —
|
|
|
360
362
|
|
|
361
363
|
| | ระดับ 0 (ค่าเริ่มต้น) | ระดับ 1 (Smart Mode) |
|
|
362
364
|
|---|---|---|
|
|
363
|
-
| **Search** | FTS5 + sqlite-vec, 95.
|
|
365
|
+
| **Search** | FTS5 + sqlite-vec, 95.60% R@5 | คงเดิม — recall ไม่ใช้ LLM ในทุก level |
|
|
364
366
|
| **Auto-capture** | รูปแบบตามกฎ | + LLM สกัดการตัดสินใจ & บทเรียน |
|
|
365
367
|
| **Auto-tagging** | แท็กด้วยตนเองเท่านั้น | + LLM สร้างแท็กให้ entity ใหม่ |
|
|
366
368
|
| **วิเคราะห์ความล้มเหลว** | ไม่พร้อมใช้ | + LLM แปลง session errors เป็น structured lessons |
|
|
367
|
-
| **Compression** | ไม่พร้อมใช้ | `
|
|
369
|
+
| **Compression** | ไม่พร้อมใช้ | `dream` บีบอัดหน่วยความจำ |
|
|
368
370
|
| **Cost** | ฟรี ไม่ต้องคีย์ API | ~$0.0001 ต่อ analysis call (Haiku) |
|
|
369
371
|
|
|
370
372
|
---
|
|
@@ -374,9 +376,8 @@ embedder ถูกตั้งค่า**แยกจาก LLM แชท** —
|
|
|
374
376
|
| เครื่องมือ | ทำอะไร |
|
|
375
377
|
|---|---|
|
|
376
378
|
| `remember` | เก็บความรู้พร้อมการสังเกต ความสัมพันธ์ และแท็ก |
|
|
377
|
-
| `recall` |
|
|
379
|
+
| `recall` | ค้นหา FTS5 + sqlite-vec พร้อมการให้คะแนนหลายปัจจัย (ความเกี่ยวข้อง, ความเพิ่งพ้อง, ความถี่, ความมั่นใจ, ผลกระทบการเรียกคืน) — ไม่ใช้ LLM ใน hot path |
|
|
378
380
|
| `forget` | เก็บแบบนุ่ม (ไม่เคยลบ) หรือลบการสังเกตเฉพาะ |
|
|
379
|
-
| `consolidate` | การบีบอัดหน่วยความจำที่ขับเคลื่อนโดย LLM |
|
|
380
381
|
| `export` | แบ่งปันหน่วยความจำเป็น JSON ระหว่างโครงการหรือสมาชิกทีม |
|
|
381
382
|
| `import` | นำเข้าหน่วยความจำพร้อมกลยุทธ์ผสาน (ข้าม / เขียนทับ / ผนวก) |
|
|
382
383
|
| `learn` | บันทึกบทเรียนโครงสร้างจากข้อผิดพลาด (ข้อผิดพลาด สาเหตุ การแก้ไข การป้องกัน) |
|
|
@@ -439,7 +440,7 @@ bash "$(npm prefix -g)/lib/node_modules/@pcircle/memesh/scripts/upgrade-plugin.s
|
|
|
439
440
|
```bash
|
|
440
441
|
git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
|
|
441
442
|
cd memesh-llm-memory && npm install && npm run build
|
|
442
|
-
npm test
|
|
443
|
+
npm test
|
|
443
444
|
npm run test:e2e-dashboard
|
|
444
445
|
```
|
|
445
446
|
|
package/README.vi.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -29,13 +29,13 @@ Package này là tầng bộ nhớ cục bộ của dòng sản phẩm MeMesh. N
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## Proof — 95.
|
|
32
|
+
## Proof — 95.60% R@5 trên LongMemEval-S
|
|
33
33
|
|
|
34
34
|
Engine truy hồi của MeMesh là **chỉ FTS5** (không LLM, không embeddings trên hot path), được đo trên benchmark công khai [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) (500 câu hỏi, giấy phép MIT):
|
|
35
35
|
|
|
36
36
|
| Hệ thống | R@5 | Nguồn |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| **MeMesh (Mode A,
|
|
38
|
+
| **MeMesh (Mode A, via `recallEnhanced()`)** | **95.60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
39
39
|
| MemPalace | 96.6% | Vendor self-report |
|
|
40
40
|
| Supermemory | ~82% | Vendor estimate |
|
|
41
41
|
| Zep | 63.8% | LongMemEval paper |
|
|
@@ -173,7 +173,7 @@ memesh
|
|
|
173
173
|
| **Nhà phát triển sử dụng Claude Code** | Tự động gọi lại các quyết định dự án, bài học cụ thể theo file, và những lỗi trong quá khứ khi bạn làm việc |
|
|
174
174
|
| **Power user của coding agent** | Chia sẻ một tầng bộ nhớ cục bộ qua các công cụ tương thích MCP |
|
|
175
175
|
| **Nhóm thử nghiệm workflow AI coding** | Export/import kiến thức dự án mà không cần hạ tầng được quản lý |
|
|
176
|
-
| **Nhà phát triển agent** | Thêm bộ nhớ cục bộ thông qua MCP, HTTP,
|
|
176
|
+
| **Nhà phát triển agent** | Thêm bộ nhớ cục bộ thông qua MCP, HTTP, hoặc CLI |
|
|
177
177
|
|
|
178
178
|
---
|
|
179
179
|
|
|
@@ -289,15 +289,17 @@ Khi npm gắn cờ phiên bản đã cài là deprecated (thường là security
|
|
|
289
289
|
|
|
290
290
|
## Tính năng thông minh
|
|
291
291
|
|
|
292
|
-
**🧠 Smart Search** — Tìm "login security" và tìm thấy memories về "OAuth PKCE". MeMesh
|
|
292
|
+
**🧠 Smart Search** — Tìm "login security" và tìm thấy memories về "OAuth PKCE". MeMesh dùng FTS5 + sqlite-vec trên hot path, không dùng LLM; phần bổ sung vector vẫn tiếp cận được các cách diễn đạt liên quan.
|
|
293
293
|
|
|
294
|
-
|
|
294
|
+
**🌏 Tìm kiếm trong các hệ chữ không dùng khoảng trắng** — Tiếng Trung, Nhật, Hàn, Thái, Lào, Khmer và katakana nửa chiều rộng được lập chỉ mục theo từng cặp ký tự liền nhau, nên một ghi nhớ viết là 「資料庫遷移前一定要先備份」 sẽ tìm thấy bằng 「備份」 — không cần gõ lại đúng nguyên văn. Văn bản được chuẩn hóa (NFC) ở cả phía ghi lẫn phía truy vấn, nên ghi nhớ gõ trên macOS hoặc bằng IME tiếng Hàn, tiếng Việt đều tìm được ở cả hai cách viết.
|
|
295
|
+
|
|
296
|
+
**📊 Scored Ranking** — Kết quả được xếp hạng theo relevance (30%) + recency (25%) + frequency (18%) + confidence (17%) + recall impact (10%).
|
|
295
297
|
|
|
296
298
|
**🔄 Knowledge Evolution** — Quyết định thay đổi. `forget` archives old memories (không bao giờ xóa). `supersedes` relations liên kết old → new. AI của bạn luôn thấy phiên bản mới nhất.
|
|
297
299
|
|
|
298
300
|
**⚠️ Conflict Detection** — Nếu bạn có hai memories mâu thuẫn với nhau, MeMesh cảnh báo bạn.
|
|
299
301
|
|
|
300
|
-
**🕸️ Kết nối đồ thị tri thức** — `memesh kg backfill-relations --all-rules` liên kết các thực thể cô lập bằng cách sử dụng đồng xuất hiện thẻ, phân cụm dự án, ngữ cảnh phiên và độ tương đồng tên — không cần LLM.
|
|
302
|
+
**🕸️ Kết nối đồ thị tri thức** — `memesh kg backfill-relations --all-rules` liên kết các thực thể cô lập bằng cách sử dụng đồng xuất hiện thẻ, phân cụm dự án, ngữ cảnh phiên và độ tương đồng tên — không cần LLM.
|
|
301
303
|
|
|
302
304
|
**📦 Team Sharing** — `memesh export > team-knowledge.json` → chia sẻ với team → `memesh import team-knowledge.json`
|
|
303
305
|
Các imported bundles vẫn có thể tìm kiếm được, nhưng MeMesh không auto-inject imported memories vào Claude hooks cho đến khi bạn review hoặc re-store chúng locally.
|
|
@@ -319,7 +321,7 @@ Các imported bundles vẫn có thể tìm kiếm được, nhưng MeMesh không
|
|
|
319
321
|
|
|
320
322
|
## Mở khóa Smart Mode (Tuỳ chọn)
|
|
321
323
|
|
|
322
|
-
MeMesh hoạt động offline theo mặc định — recall luôn LLM-free (95.
|
|
324
|
+
MeMesh hoạt động offline theo mặc định — recall luôn LLM-free (95.60% R@5 trên LongMemEval-S, không cần LLM). Thêm LLM API key chỉ nếu bạn muốn các luồng phân tích LLM-augmented bổ sung: trích xuất session thông minh hơn, auto-tagging cho memories mới, phân tích lỗi thành lessons có cấu trúc, và compression `dream`:
|
|
323
325
|
|
|
324
326
|
```bash
|
|
325
327
|
memesh config set llm.provider anthropic
|
|
@@ -345,11 +347,11 @@ Embedder được cấu hình **độc lập với LLM chat** — thay đổi `l
|
|
|
345
347
|
|
|
346
348
|
| | Level 0 (default) | Level 1 (Smart Mode) |
|
|
347
349
|
|---|---|---|
|
|
348
|
-
| **Search** | FTS5 + sqlite-vec, 95.
|
|
350
|
+
| **Search** | FTS5 + sqlite-vec, 95.60% R@5 | giữ nguyên — recall luôn LLM-free ở mọi level |
|
|
349
351
|
| **Auto-capture** | Rule-based patterns | + LLM extracts decisions & lessons |
|
|
350
352
|
| **Auto-tagging** | Chỉ thẻ thủ công | + LLM tự động gắn nhãn entity mới |
|
|
351
353
|
| **Phân tích lỗi** | Không có sẵn | + LLM chuyển session errors thành structured lessons |
|
|
352
|
-
| **Compression** | Không có sẵn | `
|
|
354
|
+
| **Compression** | Không có sẵn | `dream` nén verbose memories |
|
|
353
355
|
| **Chi phí** | Free, no API key | ~$0.0001 mỗi analysis call (Haiku) |
|
|
354
356
|
|
|
355
357
|
---
|
|
@@ -359,9 +361,8 @@ Embedder được cấu hình **độc lập với LLM chat** — thay đổi `l
|
|
|
359
361
|
| Tool | Nó làm gì |
|
|
360
362
|
|------|-------------|
|
|
361
363
|
| `remember` | Lưu trữ kiến thức với observations, relations, và tags |
|
|
362
|
-
| `recall` | Tìm kiếm FTS5 + sqlite-vec với multi-factor scoring (relevance, recency, frequency, confidence,
|
|
364
|
+
| `recall` | Tìm kiếm FTS5 + sqlite-vec với multi-factor scoring (relevance, recency, frequency, confidence, recall impact) — không có LLM trong hot path |
|
|
363
365
|
| `forget` | Soft-archive (không bao giờ xóa) hoặc xóa observations cụ thể |
|
|
364
|
-
| `consolidate` | LLM-powered compression của verbose memories |
|
|
365
366
|
| `export` | Chia sẻ memories dưới dạng JSON giữa các dự án hoặc thành viên team |
|
|
366
367
|
| `import` | Import memories với merge strategies (skip / overwrite / append) |
|
|
367
368
|
| `learn` | Ghi lại structured lessons từ những sai lầm (error, root cause, fix, prevention) |
|
|
@@ -425,7 +426,7 @@ Khi bắt đầu session, banner một dòng (throttle mỗi 24h mỗi version)
|
|
|
425
426
|
```bash
|
|
426
427
|
git clone https://github.com/PCIRCLE-AI/memesh-llm-memory
|
|
427
428
|
cd memesh-llm-memory && npm install && npm run build
|
|
428
|
-
npm test
|
|
429
|
+
npm test
|
|
429
430
|
npm run test:e2e-dashboard
|
|
430
431
|
```
|
|
431
432
|
|
package/README.zh-CN.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## 实测数据 — LongMemEval-S 上 R@5 达到 95.
|
|
32
|
+
## 实测数据 — LongMemEval-S 上 R@5 达到 95.60%
|
|
33
33
|
|
|
34
34
|
MeMesh 的检索引擎**只用 FTS5**(热路径上没有 LLM、也没有 embeddings),在公开的 [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) 基准(500 道题,MIT 许可)上的实测结果:
|
|
35
35
|
|
|
36
36
|
| 系统 | R@5 | 来源 |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| **MeMesh (Mode A,
|
|
38
|
+
| **MeMesh (Mode A, via `recallEnhanced()`)** | **95.60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
39
39
|
| MemPalace | 96.6% | 厂商自报 |
|
|
40
40
|
| Supermemory | ~82% | 厂商估计 |
|
|
41
41
|
| Zep | 63.8% | LongMemEval 论文 |
|
|
@@ -200,7 +200,7 @@ memesh
|
|
|
200
200
|
| **使用 Claude Code 的开发者** | 工作时自动回忆项目决策、文件特定的经验教训和过去的失败 |
|
|
201
201
|
| **编码代理重度用户** | 在 MCP 兼容工具间共享一个本地内存层 |
|
|
202
202
|
| **团队试验 AI 编码工作流** | 导出/导入项目知识,无需引入托管基础设施 |
|
|
203
|
-
| **代理开发者** | 通过 MCP、HTTP
|
|
203
|
+
| **代理开发者** | 通过 MCP、HTTP 或 CLI 添加本地内存 |
|
|
204
204
|
|
|
205
205
|
---
|
|
206
206
|
|
|
@@ -318,13 +318,15 @@ memesh export-schema \
|
|
|
318
318
|
|
|
319
319
|
**🧠 智能搜索** — 搜索"登录安全"也能找到"OAuth PKCE"相关的记忆。MeMesh 在热路径上用 FTS5 + sqlite-vec,零 LLM。
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
**🌏 支持不用空格分词的文字** — 中文、日文、韩文、泰文、老挝文、高棉文和半角片假名都会拆成相邻两字一组来建索引,所以写成「资料库迁移前一定要先备份」的记忆,搜索「备份」就找得到,不必打出一模一样的全文。写入和查询两边都会做 NFC 正规化,因此在 macOS 上或用韩文、越南文输入法打的记忆,两种写法都找得到。
|
|
322
|
+
|
|
323
|
+
**📊 评分排序** — 结果按相关性(30%)+ 新近度(25%)+ 频率(18%)+ 置信度(17%)+ 回忆影响(10%)排序。
|
|
322
324
|
|
|
323
325
|
**🔄 知识演进** — 决策会变化。`forget` 归档旧记忆(永不删除)。`supersedes` 关系链接 旧 → 新。你的 AI 总是看到最新版本。
|
|
324
326
|
|
|
325
327
|
**⚠️ 冲突检测** — 如果你有两条相互矛盾的记忆,MeMesh 会警告你。
|
|
326
328
|
|
|
327
|
-
**🕸️ 知识图连通性** — `memesh kg backfill-relations --all-rules` 使用标签共现、项目聚类、会话上下文和名称相似度连接孤立实体 — 无需 LLM
|
|
329
|
+
**🕸️ 知识图连通性** — `memesh kg backfill-relations --all-rules` 使用标签共现、项目聚类、会话上下文和名称相似度连接孤立实体 — 无需 LLM。
|
|
328
330
|
|
|
329
331
|
**📦 团队共享** — `memesh export > team-knowledge.json` → 与团队分享 → `memesh import team-knowledge.json`
|
|
330
332
|
导入的包保持可搜索,但 MeMesh 不会自动将导入的记忆注入到 Claude 钩子中,直到你审查或本地重新存储它们。
|
|
@@ -346,7 +348,7 @@ memesh export-schema \
|
|
|
346
348
|
|
|
347
349
|
## 解锁智能模式(可选)
|
|
348
350
|
|
|
349
|
-
MeMesh 默认离线工作 — 回忆始终是严格无 LLM 的(开箱即用 LongMemEval-S R@5 95.
|
|
351
|
+
MeMesh 默认离线工作 — 回忆始终是严格无 LLM 的(开箱即用 LongMemEval-S R@5 95.60%)。仅当你想要在此之上叠加 LLM 增强分析流程时才添加 LLM API 密钥:更聪慧的会话提取、为新记忆自动打标签、从失败生成经验教训,以及 `dream` 压缩:
|
|
350
352
|
|
|
351
353
|
```bash
|
|
352
354
|
memesh config set llm.provider anthropic
|
|
@@ -372,11 +374,11 @@ memesh config set embedder.model text-embedding-3-small
|
|
|
372
374
|
|
|
373
375
|
| | 级别 0(默认) | 级别 1(智能模式) |
|
|
374
376
|
|---|---|---|
|
|
375
|
-
| **搜索** | FTS5 + sqlite-vec,95.
|
|
377
|
+
| **搜索** | FTS5 + sqlite-vec,95.60% R@5(每次回忆约 4ms) | 不变 — 回忆在每个级别都是无 LLM 的 |
|
|
376
378
|
| **自动捕获** | 基于规则的模式 | + LLM 提取决策和经验教训 |
|
|
377
379
|
| **自动打标签** | 仅手动标签 | + LLM 为新记忆生成标签 |
|
|
378
380
|
| **失败分析** | 不可用 | + LLM 把会话错误转化为结构化经验教训 |
|
|
379
|
-
| **压缩** | 不可用 | `
|
|
381
|
+
| **压缩** | 不可用 | `dream` 压缩冗长的记忆 |
|
|
380
382
|
| **成本** | 免费,无需 API 密钥 | ~$0.0001 每次分析调用(Haiku) |
|
|
381
383
|
|
|
382
384
|
---
|
|
@@ -386,9 +388,8 @@ memesh config set embedder.model text-embedding-3-small
|
|
|
386
388
|
| 工具 | 它做什么 |
|
|
387
389
|
|------|--------|
|
|
388
390
|
| `remember` | 存储知识,附带观察、关系和标签 |
|
|
389
|
-
| `recall` | FTS5 + sqlite-vec
|
|
391
|
+
| `recall` | FTS5 + sqlite-vec 搜索,附带多因素评分(相关性、新近度、频率、置信度、回忆影响)— 热路径上无 LLM |
|
|
390
392
|
| `forget` | 软归档(永不删除)或移除特定观察 |
|
|
391
|
-
| `consolidate` | LLM 驱动的冗长记忆压缩 |
|
|
392
393
|
| `export` | 在项目或团队成员间共享内存,格式为 JSON |
|
|
393
394
|
| `import` | 导入内存,支持合并策略(跳过 / 覆盖 / 追加) |
|
|
394
395
|
| `learn` | 从错误中记录结构化经验教训(错误、根本原因、修复、预防) |
|
package/README.zh-TW.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@pcircle/memesh"><img src="https://img.shields.io/npm/v/@pcircle/memesh?style=flat-square&color=3b82f6&label=npm" alt="npm" /></a>
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-22c55e?style=flat-square" alt="MIT" /></a>
|
|
12
|
-
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%
|
|
12
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22-22c55e?style=flat-square" alt="Node" /></a>
|
|
13
13
|
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-compatible-a855f7?style=flat-square" alt="MCP" /></a>
|
|
14
14
|
</p>
|
|
15
15
|
</p>
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## 實證 — 在 LongMemEval-S 上 R@5 達 95.
|
|
32
|
+
## 實證 — 在 LongMemEval-S 上 R@5 達 95.60%
|
|
33
33
|
|
|
34
34
|
MeMesh 的檢索引擎**只用 FTS5**(熱路徑上不使用 LLM、不使用嵌入),對照公開的 [LongMemEval-S](https://huggingface.co/datasets/xiaowu0162/longmemeval) 基準測試(500 題,MIT 授權)量測:
|
|
35
35
|
|
|
36
36
|
| 系統 | R@5 | 來源 |
|
|
37
37
|
|---|---|---|
|
|
38
|
-
| **MeMesh(Mode A
|
|
38
|
+
| **MeMesh(Mode A,經由 `recallEnhanced()`)** | **95.60%** | [benchmarks/longmemeval/RESULTS.md](benchmarks/longmemeval/RESULTS.md) |
|
|
39
39
|
| MemPalace | 96.6% | 廠商自行回報 |
|
|
40
40
|
| Supermemory | ~82% | 廠商估計值 |
|
|
41
41
|
| Zep | 63.8% | LongMemEval 論文 |
|
|
@@ -200,7 +200,7 @@ memesh
|
|
|
200
200
|
| **使用 Claude Code 的開發者** | 在工作時自動回憶專案決策、檔案特定的經驗教訓和過去的失敗 |
|
|
201
201
|
| **程式開發代理進階使用者** | 在多個 MCP 相容工具間共享一層在地記憶 |
|
|
202
202
|
| **嘗試 AI 程式開發工作流的團隊** | 匯出/匯入專案知識,無需引入託管基礎設施 |
|
|
203
|
-
| **代理開發者** | 透過 MCP、HTTP
|
|
203
|
+
| **代理開發者** | 透過 MCP、HTTP 或 CLI 添加在地記憶 |
|
|
204
204
|
|
|
205
205
|
---
|
|
206
206
|
|
|
@@ -318,13 +318,15 @@ memesh export-schema \
|
|
|
318
318
|
|
|
319
319
|
**🧠 智慧搜尋** — 搜尋「登入安全」並找到關於「OAuth PKCE」的記憶。MeMesh 用 FTS5 + sqlite-vec 在熱路徑上保持 LLM-free,仍能跨同義詞匹配。
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
**🌏 支援不用空格分詞的文字** — 中文、日文、韓文、泰文、寮文、高棉文和半形片假名都會拆成相鄰兩字一組來建索引,所以寫成「資料庫遷移前一定要先備份」的記憶,搜尋「備份」就找得到,不必打出一模一樣的全文。寫入和查詢兩邊都會做 NFC 正規化,因此在 macOS 上或用韓文、越南文輸入法打的記憶,兩種寫法都找得到。
|
|
322
|
+
|
|
323
|
+
**📊 評分排名** — 結果按相關性(30%)+ 近期性(25%)+ 頻率(18%)+ 信心(17%)+ 回憶影響(10%)排名。
|
|
322
324
|
|
|
323
325
|
**🔄 知識演進** — 決策會改變。`forget` 歸檔舊記憶(永不刪除)。`supersedes` 關係連結舊 → 新。你的 AI 總是看到最新版本。
|
|
324
326
|
|
|
325
327
|
**⚠️ 衝突偵測** — 如果你有兩個互相矛盾的記憶,MeMesh 會警告你。
|
|
326
328
|
|
|
327
|
-
**🕸️ 知識圖連通性** — `memesh kg backfill-relations --all-rules` 使用標籤共現、專案叢集、會話上下文和名稱相似度連結孤立實體 — 無需 LLM
|
|
329
|
+
**🕸️ 知識圖連通性** — `memesh kg backfill-relations --all-rules` 使用標籤共現、專案叢集、會話上下文和名稱相似度連結孤立實體 — 無需 LLM。
|
|
328
330
|
|
|
329
331
|
**📦 團隊共享** — `memesh export > team-knowledge.json` → 與團隊共享 → `memesh import team-knowledge.json`
|
|
330
332
|
匯入的組合保持可搜尋,但 MeMesh 不會自動將匯入的記憶注入 Claude hooks,直到你檢查或在本地重新儲存。
|
|
@@ -346,7 +348,7 @@ memesh export-schema \
|
|
|
346
348
|
|
|
347
349
|
## 解鎖智慧模式(可選)
|
|
348
350
|
|
|
349
|
-
MeMesh 預設離線運作 — 回憶嚴格保持 LLM-free(開箱即用就有 LongMemEval-S 上 95.
|
|
351
|
+
MeMesh 預設離線運作 — 回憶嚴格保持 LLM-free(開箱即用就有 LongMemEval-S 上 95.60% R@5)。只有當你想要在上層加入 LLM 增強的分析流程時,才需要加入 LLM API 金鑰:更聰明的 session 擷取、新記憶的自動標籤、從失敗產生教訓,以及 `dream` 壓縮:
|
|
350
352
|
|
|
351
353
|
```bash
|
|
352
354
|
memesh config set llm.provider anthropic
|
|
@@ -372,11 +374,11 @@ memesh config set embedder.model text-embedding-3-small
|
|
|
372
374
|
|
|
373
375
|
| | 等級 0(預設) | 等級 1(智慧模式) |
|
|
374
376
|
|---|---|---|
|
|
375
|
-
| **搜尋** | FTS5 + sqlite-vec,95.
|
|
377
|
+
| **搜尋** | FTS5 + sqlite-vec,95.60% R@5(每次回憶約 4ms) | 不變 — 回憶在每個等級都保持 LLM-free |
|
|
376
378
|
| **自動擷取** | 基於規則的模式 | + LLM 擷取決策與教訓 |
|
|
377
379
|
| **自動標籤** | 僅手動標籤 | + LLM 為新記憶產生標籤 |
|
|
378
380
|
| **失敗分析** | 不可用 | + LLM 將 session 錯誤轉為結構化教訓 |
|
|
379
|
-
| **壓縮** | 不可用 | `
|
|
381
|
+
| **壓縮** | 不可用 | `dream` 壓縮冗長記憶 |
|
|
380
382
|
| **成本** | 免費,無需 API 金鑰 | 約 $0.0001 / 次分析呼叫(Haiku) |
|
|
381
383
|
|
|
382
384
|
---
|
|
@@ -386,9 +388,8 @@ memesh config set embedder.model text-embedding-3-small
|
|
|
386
388
|
| 工具 | 做什麼 |
|
|
387
389
|
|------|--------|
|
|
388
390
|
| `remember` | 用觀察、關係和標籤儲存知識 |
|
|
389
|
-
| `recall` | FTS5 + sqlite-vec
|
|
391
|
+
| `recall` | FTS5 + sqlite-vec 搜尋,包含多因素評分(相關性、近期性、頻率、信心、回憶影響)— 熱路徑上不使用 LLM |
|
|
390
392
|
| `forget` | 軟歸檔(永不刪除)或移除特定觀察 |
|
|
391
|
-
| `consolidate` | LLM 驅動的冗長記憶壓縮 |
|
|
392
393
|
| `export` | 在專案或團隊成員之間以 JSON 共享記憶 |
|
|
393
394
|
| `import` | 匯入記憶,包含合併策略(跳過 / 覆寫 / 追加) |
|
|
394
395
|
| `learn` | 記錄來自錯誤的結構化教訓(錯誤、根本原因、修復、預防) |
|