th-memory-mcp 1.2.0 → 1.2.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 CHANGED
@@ -87,40 +87,37 @@ is supported. Full **auto-capture** (background prompt/tool/error capture + prof
87
87
  injection) needs a hook runtime — OpenCode has it built in; Claude Code gets it via
88
88
  our hooks bridge; Codex and Cursor use the tools manually (no hook runtime yet).
89
89
 
90
- | Feature | OpenCode | Claude Code | Codex | Cursor |
91
- |---|---|---|---|---|
92
- | 9 MCP tools | ✅ | ✅ | ✅ | ✅ |
93
- | Auto-capture (background) | ✅ plugin | ✅ [hooks](CLAUDE_CODE_HOOKS.md) | ❌ manual | ❌ Rules |
94
- | Profile injection | ✅ compaction | ✅ UserPromptSubmit | ❌ `get_profile` | ❌ `get_profile` |
95
- | Local semantic search | ✅ (v1.2) | ✅ (v1.2) | ✅ (v1.2) | ✅ (v1.2) |
90
+ | Feature | OpenCode | Claude Code | Qwen Code | Codex | Cursor |
91
+ |---|---|---|---|---|---|
92
+ | 9 MCP tools | ✅ | ✅ | ✅ | ✅ | ✅ |
93
+ | Auto-capture (background) | ✅ plugin | ✅ [hooks](CLAUDE_CODE_HOOKS.md) | ⚠️ adapter | ❌ manual | ❌ Rules |
94
+ | Profile injection | ✅ compaction | ✅ UserPromptSubmit | ❌ `get_profile` | ❌ `get_profile` | ❌ `get_profile` |
95
+ | Local semantic search | ✅ (v1.2) | ✅ (v1.2) | ✅ (v1.2) | ✅ (v1.2) | ✅ (v1.2) |
96
96
 
97
97
  - **Claude Code:** see [CLAUDE_CODE_HOOKS.md](CLAUDE_CODE_HOOKS.md) — drop-in hooks replicate the OpenCode plugin (capture + profile injection on `UserPromptSubmit`/`PreCompact`, rule-based distill on `SessionEnd`).
98
+ - **Qwen Code:** see [QWEN_SETUP.md](QWEN_SETUP.md) — MCP works fully; hooks use the Gemini-CLI schema so auto-capture needs a small adapter.
98
99
  - **Codex:** see [CODEX_SETUP.md](CODEX_SETUP.md)
99
100
  - **Cursor:** see [CURSOR_SETUP.md](CURSOR_SETUP.md)
100
101
 
101
102
  All harnesses share one SQLite file via `MEMORY_DB_PATH`, so memory captured
102
103
  anywhere is readable everywhere.
103
104
 
104
- ## Comparison with rekal
105
-
106
- [rekal](https://github.com/janbjorge/rekal) is the closest alternative (Python,
107
- single SQLite file, hybrid search). How th-memory-mcp differs:
108
-
109
- | | th-memory-mcp | rekal |
110
- |---|---|---|
111
- | Runtime | Node ≥20 (`better-sqlite3`) | Python 3.11+ |
112
- | Search | FTS5 keyword + **local vector blend** (v1.2, no model download) | BM25 + vector (384-dim local) + recency |
113
- | Memory model | `preference` (confidence) / `lesson` (situation→mistake→correction) / `profile` / `interactions` | flat `fact` |
114
- | Auto-capture | OpenCode plugin + Claude hooks (capture + `PreCompact` + `SessionEnd` distill) | Claude plugin (SessionStart/UserPromptSubmit/`PreCompact`/`SessionEnd`) |
115
- | Harness coverage | OpenCode, Claude Code, Codex, Cursor | Claude Code, Codex, OpenCode, Cursor |
116
- | Thai / i18n | Thai tokenization in distill | English-centric |
117
- | Secret filter | built-in | not specified |
118
- | Weight | lightweight, zero native extras | needs embedding model (local) |
119
-
120
- th-memory-mcp's edge: structured **lessons** for corrections, confidence scoring,
121
- first-class **Thai** support, secret filtering, and a dependency-free local vector
122
- search that stays 100% offline. rekal's edge: transformer-grade semantic embeddings
123
- and a one-command plugin marketplace install.
105
+ ## Highlights
106
+
107
+ - **Structured memory** preferences with confidence scoring plus dedicated
108
+ `lesson` records (situation mistake → correction) for capturing corrections,
109
+ not just flat facts.
110
+ - **Local semantic search** `recall` blends FTS5 keyword search with a
111
+ dependency-free local vector embedding (no model download, 100% offline).
112
+ - **First-class Thai / i18n** — Thai-aware tokenization in distill; the AI
113
+ accepts Thai and English interchangeably.
114
+ - **Private by default** a single local SQLite file, no cloud, no API keys,
115
+ with secret lines (`api_key=`, `password:`, `token`) filtered before storage.
116
+ - **Cross-harness** runs on OpenCode, Claude Code, Codex, and Cursor sharing
117
+ one DB; auto-capture + profile injection via OpenCode plugin or Claude hooks.
118
+ - **Lightweight & resilient** Node + `better-sqlite3`, no extra native
119
+ extensions; every tool degrades gracefully so the AI keeps working if the DB
120
+ is unavailable.
124
121
 
125
122
  ## Scripts
126
123
 
package/dist/lib/embed.js CHANGED
@@ -1,5 +1,4 @@
1
1
  export const EMBED_DIM = 512;
2
- const THAI = /[ก-์]/;
3
2
  function fnv1a(str) {
4
3
  let h = 0x811c9dc5;
5
4
  for (let i = 0; i < str.length; i++) {
@@ -64,6 +63,3 @@ export function deserialize(buf) {
64
63
  out.set(new Float32Array(ab));
65
64
  return out;
66
65
  }
67
- export function hasThai(text) {
68
- return THAI.test(text);
69
- }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "th-memory-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
+ "mcpName": "io.github.worakorn-prince/th-memory-mcp",
4
5
  "description": "Adaptive Memory MCP server - SQLite-backed memory for OpenCode",
5
6
  "author": "worakorn-prince",
6
7
  "repository": {