th-memory-mcp 1.2.0 → 1.2.1
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 +23 -26
- package/dist/lib/embed.js +0 -4
- package/package.json +1 -1
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
|
-
##
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
}
|