@pcircle/memesh 4.7.3 → 4.8.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/AGENTS.md +3 -1
- package/README.de.md +42 -16
- package/README.md +46 -19
- package/README.zh-TW.md +42 -17
- package/dashboard/dist/index.html +1 -1
- package/dist/core/agent-message-storage.d.ts +76 -0
- package/dist/core/agent-message-storage.d.ts.map +1 -0
- package/dist/core/agent-message-storage.js +359 -0
- package/dist/core/agent-message-storage.js.map +1 -0
- package/dist/core/agent-messaging.d.ts +224 -0
- package/dist/core/agent-messaging.d.ts.map +1 -0
- package/dist/core/agent-messaging.js +881 -0
- package/dist/core/agent-messaging.js.map +1 -0
- package/dist/core/agent-router.d.ts +194 -0
- package/dist/core/agent-router.d.ts.map +1 -0
- package/dist/core/agent-router.js +1138 -0
- package/dist/core/agent-router.js.map +1 -0
- package/dist/core/briefing.d.ts.map +1 -1
- package/dist/core/briefing.js +8 -1
- package/dist/core/briefing.js.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js.map +1 -1
- package/dist/core/doctor.d.ts +19 -0
- package/dist/core/doctor.d.ts.map +1 -1
- package/dist/core/doctor.js +176 -2
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/dreamer.d.ts +8 -5
- package/dist/core/dreamer.d.ts.map +1 -1
- package/dist/core/dreamer.js +88 -3
- package/dist/core/dreamer.js.map +1 -1
- package/dist/core/product-improvements.d.ts +61 -0
- package/dist/core/product-improvements.d.ts.map +1 -0
- package/dist/core/product-improvements.js +216 -0
- package/dist/core/product-improvements.js.map +1 -0
- package/dist/core/repo-state.d.ts +11 -0
- package/dist/core/repo-state.d.ts.map +1 -0
- package/dist/core/repo-state.js +70 -0
- package/dist/core/repo-state.js.map +1 -0
- package/dist/core/schema-export.d.ts.map +1 -1
- package/dist/core/schema-export.js +70 -0
- package/dist/core/schema-export.js.map +1 -1
- package/dist/core/task-state.d.ts.map +1 -1
- package/dist/core/task-state.js +3 -3
- package/dist/core/task-state.js.map +1 -1
- package/dist/core/updater.d.ts +2 -0
- package/dist/core/updater.d.ts.map +1 -1
- package/dist/core/updater.js +11 -5
- package/dist/core/updater.js.map +1 -1
- package/dist/core/work-topology.d.ts.map +1 -1
- package/dist/core/work-topology.js +1 -0
- package/dist/core/work-topology.js.map +1 -1
- package/dist/host-adapters/acp-client.d.ts +147 -0
- package/dist/host-adapters/acp-client.d.ts.map +1 -0
- package/dist/host-adapters/acp-client.js +793 -0
- package/dist/host-adapters/acp-client.js.map +1 -0
- package/dist/host-adapters/claude-channel.d.ts +75 -0
- package/dist/host-adapters/claude-channel.d.ts.map +1 -0
- package/dist/host-adapters/claude-channel.js +255 -0
- package/dist/host-adapters/claude-channel.js.map +1 -0
- package/dist/host-adapters/codex-app-server.d.ts +83 -0
- package/dist/host-adapters/codex-app-server.d.ts.map +1 -0
- package/dist/host-adapters/codex-app-server.js +360 -0
- package/dist/host-adapters/codex-app-server.js.map +1 -0
- package/dist/host-adapters/codex-cli-queue.d.ts +17 -0
- package/dist/host-adapters/codex-cli-queue.d.ts.map +1 -0
- package/dist/host-adapters/codex-cli-queue.js +85 -0
- package/dist/host-adapters/codex-cli-queue.js.map +1 -0
- package/dist/host-runtime/acp.d.ts +57 -0
- package/dist/host-runtime/acp.d.ts.map +1 -0
- package/dist/host-runtime/acp.js +330 -0
- package/dist/host-runtime/acp.js.map +1 -0
- package/dist/host-runtime/claude.d.ts +41 -0
- package/dist/host-runtime/claude.d.ts.map +1 -0
- package/dist/host-runtime/claude.js +213 -0
- package/dist/host-runtime/claude.js.map +1 -0
- package/dist/host-runtime/codex-session.d.ts +24 -0
- package/dist/host-runtime/codex-session.d.ts.map +1 -0
- package/dist/host-runtime/codex-session.js +98 -0
- package/dist/host-runtime/codex-session.js.map +1 -0
- package/dist/host-runtime/codex.d.ts +33 -0
- package/dist/host-runtime/codex.d.ts.map +1 -0
- package/dist/host-runtime/codex.js +215 -0
- package/dist/host-runtime/codex.js.map +1 -0
- package/dist/host-runtime/config.d.ts +9 -0
- package/dist/host-runtime/config.d.ts.map +1 -0
- package/dist/host-runtime/config.js +91 -0
- package/dist/host-runtime/config.js.map +1 -0
- package/dist/host-runtime/router-client.d.ts +38 -0
- package/dist/host-runtime/router-client.d.ts.map +1 -0
- package/dist/host-runtime/router-client.js +463 -0
- package/dist/host-runtime/router-client.js.map +1 -0
- package/dist/host-runtime/router.d.ts +3 -0
- package/dist/host-runtime/router.d.ts.map +1 -0
- package/dist/host-runtime/router.js +43 -0
- package/dist/host-runtime/router.js.map +1 -0
- package/dist/mcp/server.js +2 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/skills-manifest.json +22 -17
- package/dist/storage/conflicts.d.ts.map +1 -1
- package/dist/storage/conflicts.js +8 -1
- package/dist/storage/conflicts.js.map +1 -1
- package/dist/storage/schema.d.ts +1 -1
- package/dist/storage/schema.d.ts.map +1 -1
- package/dist/storage/schema.js +255 -0
- package/dist/storage/schema.js.map +1 -1
- package/dist/transports/agent-messaging.d.ts +11 -0
- package/dist/transports/agent-messaging.d.ts.map +1 -0
- package/dist/transports/agent-messaging.js +273 -0
- package/dist/transports/agent-messaging.js.map +1 -0
- package/dist/transports/cli/cli.d.ts +1 -1
- package/dist/transports/cli/cli.d.ts.map +1 -1
- package/dist/transports/cli/cli.js +376 -12
- package/dist/transports/cli/cli.js.map +1 -1
- package/dist/transports/http/server.d.ts.map +1 -1
- package/dist/transports/http/server.js +31 -2
- package/dist/transports/http/server.js.map +1 -1
- package/dist/transports/mcp/handlers.d.ts +152 -1
- package/dist/transports/mcp/handlers.d.ts.map +1 -1
- package/dist/transports/mcp/handlers.js +108 -3
- package/dist/transports/mcp/handlers.js.map +1 -1
- package/dist/transports/schemas.d.ts +106 -1
- package/dist/transports/schemas.d.ts.map +1 -1
- package/dist/transports/schemas.js +86 -0
- package/dist/transports/schemas.js.map +1 -1
- package/docs/platforms/README.md +167 -0
- package/docs/platforms/agent-messaging.md +290 -0
- package/hooks/hooks.json +11 -0
- package/llms-install.md +101 -25
- package/package.json +14 -5
- package/scripts/hooks/_generated/repo-state.js +77 -0
- package/scripts/hooks/_generated/schema.js +255 -0
- package/scripts/hooks/_generated/task-state.js +3 -3
- package/scripts/hooks/_generated/work-topology.js +1 -0
- package/scripts/hooks/_shared.js +77 -97
- package/scripts/hooks/auto-update-runner.mjs +243 -0
- package/scripts/hooks/session-start.js +12 -2
- package/scripts/hooks/session-summary.js +7 -6
- package/skills/memesh/SKILL.md +40 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "memesh",
|
|
9
9
|
"source": "./",
|
|
10
10
|
"description": "MeMesh \u2014 agentic memory for coding agents. Captured from the agent's real work via hooks, recalled when it acts. One SQLite file, zero cloud required.",
|
|
11
|
-
"version": "4.
|
|
11
|
+
"version": "4.8.0",
|
|
12
12
|
"author": {
|
|
13
13
|
"name": "PCIRCLE AI"
|
|
14
14
|
},
|
package/AGENTS.md
CHANGED
|
@@ -24,7 +24,7 @@ host is recallable from all of them. Not installed yet? Follow
|
|
|
24
24
|
3. **"What do you remember?"** — call `briefing` and relay its content. Do
|
|
25
25
|
not answer from your own conversation context.
|
|
26
26
|
|
|
27
|
-
## All
|
|
27
|
+
## All 11 MCP tools
|
|
28
28
|
|
|
29
29
|
| Tool | Purpose |
|
|
30
30
|
|---|---|
|
|
@@ -37,6 +37,8 @@ host is recallable from all of them. Not installed yet? Follow
|
|
|
37
37
|
| `task_state` | Read or update where the work stands: goal / next / blocked / done |
|
|
38
38
|
| `briefing` | The assembled work topology for a project — call once at session start |
|
|
39
39
|
| `user_patterns` | Analyze work schedule, tool preferences, and focus areas from memory |
|
|
40
|
+
| `improvement` | Propose an evidence-linked product improvement or read its status; only a human may accept/reject it |
|
|
41
|
+
| `message` | Exchange durable exact-recipient local messages; polling/fetching never implies acknowledgement |
|
|
40
42
|
|
|
41
43
|
## Memory hygiene
|
|
42
44
|
|
package/README.de.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<h1 align="center">MeMesh</h1>
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong>
|
|
6
|
+
<strong>Gemeinsamer Speicher und dauerhafte lokale Koordination für Coding-Agenten.</strong><br />
|
|
7
7
|
Eine SQLite-Datei. Kein Docker. Keine Cloud erforderlich.
|
|
8
8
|
</p>
|
|
9
9
|
<p align="center">
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
**MeMesh** ist
|
|
19
|
+
**MeMesh** ist die **Open-Source-Kollaborationsschicht** für lokale KI-Coding-Agenten: gemeinsamer Speicher, dauerhafte Nachrichten an einen bestimmten Empfänger und kontrollierte Memory-to-Product-Vorschläge für Claude Code, Codex, Cursor, eigene oder Ollama-basierte Agenten und kompatible lokale MCP-Clients. Alles liegt in einer SQLite-Datei. Kein Docker und keine Cloud erforderlich.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### Neue Kollaborationsflächen
|
|
22
|
+
|
|
23
|
+
- `message` gibt lokalen Agenten einen dauerhaften Exact-Recipient-Posteingang mit Cursor-Recovery und expliziten Receipts über MCP, HTTP und CLI.
|
|
24
|
+
- `improvement` verwandelt aktive Memories in evidenzverknüpfte Produktarbeits-Vorschläge; Agenten dürfen sie einreichen und ihren Status lesen, aber nur ein Mensch darf annehmen oder ablehnen.
|
|
22
25
|
|
|
23
26
|
## Installation
|
|
24
27
|
|
|
@@ -31,7 +34,7 @@ Sie erfasst Memories aus dem, was der Agent wirklich tut, und gibt das Passende
|
|
|
31
34
|
|
|
32
35
|
Claude Code neu starten. Eine `◉ MeMesh`-Statuszeile am Anfang der nächsten Session bedeutet: es zeichnet auf.
|
|
33
36
|
|
|
34
|
-
**Im Terminal** — die `memesh`-CLI, das Dashboard und der `memesh-mcp`-Server für Codex /
|
|
37
|
+
**Im Terminal** — die `memesh`-CLI, das Dashboard und der `memesh-mcp`-Server für Codex / Cursor und kompatible lokale MCP-Clients (braucht [Node 22.13+](https://nodejs.org)):
|
|
35
38
|
|
|
36
39
|
```bash
|
|
37
40
|
npm install -g @pcircle/memesh
|
|
@@ -64,6 +67,28 @@ Installation über npm, gespeichert wird in `~/.memesh/knowledge-graph.db`, ange
|
|
|
64
67
|
|
|
65
68
|
---
|
|
66
69
|
|
|
70
|
+
## Lokale Agenten-Zusammenarbeit — mit klaren Grenzen
|
|
71
|
+
|
|
72
|
+
Alle Hosts, die mit derselben lokalen MeMesh-Instanz verbunden sind, teilen dauerhaften Speicher. Das `message`-Tool ergänzt einen expliziten Nachrichtenpfad über MCP, HTTP und CLI.
|
|
73
|
+
|
|
74
|
+
Die optionale sichere Host-Native-Wakeup-Laufzeit unterstützt derzeit macOS und Linux. MeMesh-Kernspeicher, dauerhafte Nachrichtenspeicherung und MCP-Tools bleiben unter Windows verfügbar; Host-Native-Wakeup unter Windows wird noch nicht unterstützt.
|
|
75
|
+
|
|
76
|
+
- Heute verfügbar: Ein Sender kann eine Nachricht dauerhaft an genau einen lokalen Empfänger senden. Der Empfänger kann den Payload getrennt abrufen, nach einem Neustart mit einem opaken Cursor fortsetzen und Intake, Bestätigung, Workflow-Status und Host-Aktivierung getrennt protokollieren.
|
|
77
|
+
- Mit aktiviertem MeMesh-Codex-Plugin und dem owner-private Opt-in `memesh agent setup codex-session` erhält eine aktive Codex-Session im exakt konfigurierten lokalen Workspace ohne Polling oder menschliche Erinnerung einen nativen `memesh_message_available`-Wakeup. Der Marker enthält nur Routing-Metadaten; Codex ruft danach den dauerhaften Payload mit dem passend eingegrenzten `message`-Tool ab.
|
|
78
|
+
- Eine erfolgreiche Queue-Annahme (`host_accept`) bedeutet nur, dass die lokale Codex-Queue den Marker annahm. Sie beweist nicht, dass ein Agent den Payload gelesen, bestätigt oder die Arbeit akzeptiert hat.
|
|
79
|
+
- Der dauerhafte Nachrichtenspeicher wird durch eine Owner-Richtlinie begrenzt, nicht still gelöscht: `memesh message storage report` zeigt logische Payload-Größe, geschützte Zeilen, wiederverwendbare SQLite-Seiten und WAL-Größe. Das begrenzte Pruning ist standardmäßig ein Dry Run und tombstoniert nur alte terminale Payloads. Ein optionales `MEMESH_AGENT_MESSAGE_STORAGE_QUOTA_BYTES` lehnt einen zu großen Send atomar ab. Siehe [begrenzte Speicherung und Audit-Aufbewahrung](docs/platforms/agent-messaging.md#bounded-storage-and-audit-retention).
|
|
80
|
+
- Eine gestoppte, fehlende oder getrennte Codex-Session wird weder geweckt noch ersetzt. Ihr dauerhafter Posteingang bleibt für Audit und Wiederherstellung erhalten; `poll` und `memesh message watch` sind Kompatibilitäts- und Diagnosepfade. Native Zustellung setzt keine beendete Modell-Session fort, führt keinen Payload aus und gilt nicht als Bestätigung.
|
|
81
|
+
- Kooperative Vertrauensgrenze: Der Empfängername ist eine logische Routing-ID, keine Anmeldung oder ACL pro Agent. Jeder Aufrufer mit Zugriff auf dieselbe lokale MeMesh-Instanz muss als vertrauenswürdiger Workspace-Teilnehmer gelten; Host-Adapter setzen weiterhin ihre eigenen Berechtigungen und menschlichen Freigaben durch.
|
|
82
|
+
- Adapter-Grenze: Der hier beschriebene native Wakeup ist nur der konfigurierte lokale Codex-Session-Pfad. Andere lokale MCP-Loops können die dauerhaften Nachrichtenoperationen nutzen, die ihr eigener Host-Loop unterstützt; dies ist keine universelle Host-Support-Aussage.
|
|
83
|
+
|
|
84
|
+
Der Leitfaden [Local Agent Messaging](docs/platforms/agent-messaging.md) beschreibt Lifecycle, Support-Matrix und Grenzen im Detail.
|
|
85
|
+
|
|
86
|
+
### Agenten-Erfahrung in geprüfte Produktarbeit überführen
|
|
87
|
+
|
|
88
|
+
Das `improvement`-Tool wandelt aktive Memories und Lessons in einen evidenzverknüpften Verbesserungsvorschlag um. Agenten dürfen Vorschläge einreichen und ihren Status lesen, aber nicht selbst akzeptieren oder ablehnen. Nach menschlicher Freigabe bleiben alle Quellen erhalten, der neue Arbeitseintrag wird mit ihnen verknüpft und erscheint in späteren Projekt-Briefings.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
67
92
|
## Installationspfade auf einen Blick
|
|
68
93
|
|
|
69
94
|
MeMesh hat **zwei Installationspfade, die nebeneinander existieren**. Die meisten Nutzer brauchen beide. Beide schreiben in die **selbe Speicher-Datenbank** (`~/.memesh/knowledge-graph.db`), so dass im Claude-Code-Chat erfasste Memories auch in deiner Shell erscheinen und umgekehrt.
|
|
@@ -78,7 +103,7 @@ flowchart TB
|
|
|
78
103
|
subgraph clients["Where you use memesh from"]
|
|
79
104
|
direction LR
|
|
80
105
|
CC["Claude Code<br/>(chat + agent)"]:::client
|
|
81
|
-
TERM["Terminal / other<br/>MCP clients<br/>(Codex,
|
|
106
|
+
TERM["Terminal / other<br/>MCP clients<br/>(Codex, Cursor...)"]:::client
|
|
82
107
|
end
|
|
83
108
|
|
|
84
109
|
subgraph paths["Two install paths"]
|
|
@@ -153,7 +178,7 @@ npm install -g @pcircle/memesh
|
|
|
153
178
|
`npm install -g` legt die CLI in den PATH — aber nichts ist damit in Claude Code eingebunden: Das npm-Paket führt bewusst keine Install-Skripte aus; MCP-Server und Hooks in Claude Code registriert das Plugin (Option A). Was der npm-Pfad selbst verdrahten kann, sind die Session-Hooks. Ohne diese Hooks können Sie `memesh remember` / `recall` manuell verwenden, aber die **Auto-Capture-Schleife** (Session → Lektionen → proaktive Erinnerung in der nächsten Session) bleibt stumm.
|
|
154
179
|
|
|
155
180
|
```bash
|
|
156
|
-
memesh setup #
|
|
181
|
+
memesh setup # prüft die lokale Host-Verdrahtung und meldet den Befund
|
|
157
182
|
```
|
|
158
183
|
|
|
159
184
|
Oder die Einzelschritte von Hand:
|
|
@@ -165,7 +190,7 @@ memesh setup --check # Prüfung auf Maschinenebene: liest die Host-Confi
|
|
|
165
190
|
|
|
166
191
|
Die Hooks existieren neben Ihren bestehenden Custom-Hooks unter `~/.claude/hooks/` — `install-hooks` schreibt additiv und überschreibt nie Ihre Einträge. Zum Entfernen: `memesh uninstall-hooks`.
|
|
167
192
|
|
|
168
|
-
### Dieselben Memories aus Codex CLI,
|
|
193
|
+
### Dieselben Memories aus Codex CLI, Cursor und anderen MCP-Clients
|
|
169
194
|
|
|
170
195
|
`memesh-mcp` ist ein gewöhnlicher stdio-MCP-Server — jeder MCP-fähige Host kann ihn nutzen, nicht nur Claude Code. Mit installierter Option B (`memesh-mcp` im `PATH`) einmal pro Host registrieren:
|
|
171
196
|
|
|
@@ -173,8 +198,6 @@ Die Hooks existieren neben Ihren bestehenden Custom-Hooks unter `~/.claude/hooks
|
|
|
173
198
|
# OpenAI Codex CLI — schreibt [mcp_servers.memesh] in ~/.codex/config.toml
|
|
174
199
|
codex mcp add memesh -- memesh-mcp
|
|
175
200
|
|
|
176
|
-
# Google Gemini CLI — User-Scope, funktioniert in jedem Ordner
|
|
177
|
-
gemini mcp add -s user memesh memesh-mcp
|
|
178
201
|
```
|
|
179
202
|
|
|
180
203
|
Für Cursor fügen Sie denselben stdio-Server in `~/.cursor/mcp.json` (global)
|
|
@@ -188,11 +211,10 @@ oder in `.cursor/mcp.json` (projektspezifisch) ein:
|
|
|
188
211
|
}
|
|
189
212
|
```
|
|
190
213
|
|
|
191
|
-
Jeder Host liest und schreibt dieselbe `~/.memesh/knowledge-graph.db` — eine in einem Agenten gespeicherte Memory ist aus Codex,
|
|
214
|
+
Jeder konfigurierte lokale Host liest und schreibt dieselbe `~/.memesh/knowledge-graph.db` — eine in einem Agenten gespeicherte Memory ist aus Codex, Cursor oder einem anderen MCP-Client abrufbar. Prüfen:
|
|
192
215
|
|
|
193
216
|
```bash
|
|
194
217
|
codex mcp list # memesh sollte als enabled gelistet sein
|
|
195
|
-
gemini mcp list # memesh sollte "Connected" zeigen
|
|
196
218
|
```
|
|
197
219
|
|
|
198
220
|
> **Als konfigurierten Befehl `memesh-mcp` verwenden, NICHT `npx -p @pcircle/memesh`.** `npx -p` löst zum *lokalen* Paket auf, sobald das Arbeitsverzeichnis des Hosts in einem Checkout dieses Repositories liegt — und führt dann stillschweigend dessen aktuellen Stand statt des installierten Release aus.
|
|
@@ -288,7 +310,7 @@ Denselben Block erhält Claude Code automatisch beim Session-Start, und jeder an
|
|
|
288
310
|
|---------------|---------------------|
|
|
289
311
|
| **Claude Code verwenden** | Projektentscheidungen, dateispezifische Erkenntnisse und vergangene Fehler während der Arbeit automatisch abrufen |
|
|
290
312
|
| **Power-User von Coding-Agenten** | Eine lokale Speicherschicht über MCP-kompatible Tools verteilen |
|
|
291
|
-
| **Codex,
|
|
313
|
+
| **Codex, Cursor, Claude Code oder einen anderen MCP-Client einzeln nutzt** | Eine lokale Speicherschicht über Agenten und Sessions hinweg verwenden |
|
|
292
314
|
| **einen Agenten integrieren** | Lokalen Speicher via MCP, HTTP oder CLI hinzufügen |
|
|
293
315
|
|
|
294
316
|
---
|
|
@@ -366,16 +388,18 @@ Reproduktionsbefehle, Datensatz-SHA256, rohe Ergebnisse pro Frage und Analyse be
|
|
|
366
388
|
|
|
367
389
|
## Was läuft in Claude Code automatisch ab
|
|
368
390
|
|
|
369
|
-
Sie müssen nicht manuell alles speichern. MeMesh verfügt über **
|
|
391
|
+
Sie müssen nicht manuell alles speichern. MeMesh verfügt über **8 Hooks**, die Wissen während der Arbeit erfassen und injizieren:
|
|
370
392
|
|
|
371
393
|
| Wenn | Was MeMesh tut |
|
|
372
394
|
|------|------------------|
|
|
373
395
|
| **Am Anfang jeder Session** | Lädt Ihre relevantesten Memories + proaktive Warnungen aus früheren Lektionen + Agentur-Orchestrierungs-Banner |
|
|
374
396
|
| **Vor Dateibearbeitungen** | Ruft Memories ab, die an die Datei oder das Projekt gebunden sind, bevor Claude Code schreibt |
|
|
397
|
+
| **Wenn Sie etwas zu merken bitten** | Erkennt „remember this“-/„guardar en memesh“-/„sauvegarder dans memesh“-/„記下來“-Absicht und erinnert an MeMesh |
|
|
375
398
|
| **Nach jedem `git commit`** | Erfasst Ihre Änderungen mit Diff-Statistiken |
|
|
376
399
|
| **Wenn Claude stoppt** | Erfasst bearbeitete Dateien und behobene Fehler; generiert automatisch strukturierte Lektionen aus Fehlern |
|
|
377
400
|
| **Vor Context-Verdichtung** | Speichert Wissen, bevor es durch Context-Limits verloren geht |
|
|
378
401
|
| **Vor riskanten Befehlen und Edits** | Löst die von Ihnen akzeptierten Lektions-Guards aus — eine Warnung genau in dem Moment, in dem sich ein erfasster Fehler wiederholen würde |
|
|
402
|
+
| **Wenn eine optierte Codex-Session startet oder fortgesetzt wird** | Registriert genau diesen aktiven Thread für metadata-only MeMesh-Wakeups; andere Workspaces und gestoppte Sessions werden nicht angehängt |
|
|
379
403
|
|
|
380
404
|
> **Jederzeit abschalten:** `export MEMESH_AUTO_CAPTURE=false`
|
|
381
405
|
|
|
@@ -390,7 +414,7 @@ Die gesamte Konfiguration erfolgt über Umgebungsvariablen. Die Standardwerte si
|
|
|
390
414
|
| `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | Überschreibt den Speicherort der SQLite-Datenbank. |
|
|
391
415
|
| `MEMESH_AUTO_CAPTURE` | `true` | Deaktiviert die Auto-Capture-Hooks (`Stop`, `PreCompact`) vollständig. |
|
|
392
416
|
| `MEMESH_AUTO_DETECT_LLM` | nicht gesetzt (Auto-Erkennung **an**) | Auf `0` setzen, damit memesh einen im Shell-Environment gefundenen API-Schlüssel NICHT verwendet. Standardmäßig nutzt memesh einen gesetzten `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` für schreibseitige LLM-Funktionen (Konsolidierung, Lesson-Extraktion, Auto-Tagging, Dream), sofern in `~/.memesh/config.json` kein Provider konfiguriert ist. Embeddings sind nicht betroffen — sie bleiben Keyword-only (FTS5), außer du setzt `embedder.provider` explizit auf `ollama` oder `openai`. |
|
|
393
|
-
| `MEMESH_AUTO_UPDATE` | `off` | Auto-Update-Richtlinie. `off` (Standard) aktualisiert nie automatisch; `patch` erlaubt `X.Y.Z → X.Y.Z+N`; `minor` ergänzt `X.Y.Z → X.Y+1.0`; `major` erlaubt jedes Bump. Wenn zugelassen, läuft am Session-Ende (Stop-Hook) ein abgekoppeltes `npm install -g`, sodass es Ihre Arbeit nie blockiert — Ergebnisse landen in `~/.memesh/auto-update.log`. Ebenfalls als `autoUpdate` in `~/.memesh/config.json` setzbar (Env hat Vorrang).
|
|
417
|
+
| `MEMESH_AUTO_UPDATE` | `off` | Auto-Update-Richtlinie. `off` (Standard) aktualisiert nie automatisch; `patch` erlaubt `X.Y.Z → X.Y.Z+N`; `minor` ergänzt `X.Y.Z → X.Y+1.0`; `major` erlaubt jedes Bump. Wenn zugelassen, läuft am Session-Ende (Stop-Hook) ein abgekoppeltes `npm install -g`, sodass es Ihre Arbeit nie blockiert — Ergebnisse landen in `~/.memesh/auto-update.log`. Ebenfalls als `autoUpdate` in `~/.memesh/config.json` setzbar (Env hat Vorrang). Eine Maintainer-Deprecation-Warnung überschreibt `off` niemals: Aktualisieren Sie manuell oder wählen Sie eine Richtlinie, die den Bump erlaubt. |
|
|
394
418
|
| `OPENAI_API_KEY` | nicht gesetzt | Dein OpenAI-Schlüssel. Wird automatisch für LLM-Funktionen genutzt, außer du setzt `MEMESH_AUTO_DETECT_LLM=0` oder konfigurierst einen Provider explizit. |
|
|
395
419
|
| `OLLAMA_HOST` | `http://localhost:11434` | Überschreibt den Ollama-Endpoint, wenn ein lokaler Ollama-Provider verwendet wird. |
|
|
396
420
|
|
|
@@ -471,7 +495,7 @@ Ab dann wird jedem Assistenten, der eine der beiden Entscheidungen abruft, gesag
|
|
|
471
495
|
|
|
472
496
|
### Eine Erinnerung, drei Assistenten
|
|
473
497
|
|
|
474
|
-
MeMesh ist ein MCP-Server, daher bedient dieselbe SQLite-Datei jeden MCP-Client auf der Maschine. Einmal pro Tool registrieren (die genauen Befehle stehen oben unter „In 60 Sekunden starten") — und eine in Claude Code gespeicherte Entscheidung wird mitten in der Session von Codex oder
|
|
498
|
+
MeMesh ist ein MCP-Server, daher bedient dieselbe SQLite-Datei jeden MCP-Client auf der Maschine. Einmal pro Tool registrieren (die genauen Befehle stehen oben unter „In 60 Sekunden starten") — und eine in Claude Code gespeicherte Entscheidung wird mitten in der Session von Codex oder einem anderen konfigurierten lokalen MCP-Client abgerufen: kein erneutes Erklären, kein Kontext zwischen Anbietern hin- und herkopieren.
|
|
475
499
|
|
|
476
500
|
### Entscheidungen so festhalten, dass sie auffindbar bleiben
|
|
477
501
|
|
|
@@ -527,7 +551,7 @@ Wechselst du zu einer anderen Dimension (z. B. 768 → 1536), wird **nichts gel
|
|
|
527
551
|
|
|
528
552
|
---
|
|
529
553
|
|
|
530
|
-
## Alle
|
|
554
|
+
## Alle 11 Memory- und Koordinations-Tools
|
|
531
555
|
|
|
532
556
|
| Tool | Was es tut |
|
|
533
557
|
|------|-------------|
|
|
@@ -540,6 +564,8 @@ Wechselst du zu einer anderen Dimension (z. B. 768 → 1536), wird **nichts gel
|
|
|
540
564
|
| `task_state` | Arbeitsstand lesen oder festhalten — Ziel, nächster Schritt, Blocker, gerade Erledigtes |
|
|
541
565
|
| `briefing` | Die zusammengesetzte Arbeits-Topologie — derselbe Block, den Claude Code beim Session-Start erhält, für jeden MCP-Client |
|
|
542
566
|
| `user_patterns` | Arbeitsmuster analysieren — Zeitplan, Tools, Stärken, Lernbereiche |
|
|
567
|
+
| `improvement` | Evidenzverknüpfte Produktverbesserung zur menschlichen Prüfung vorschlagen oder ihren Status lesen; Agenten können sie nicht selbst annehmen oder ablehnen |
|
|
568
|
+
| `message` | Dauerhafte Nachrichten an einen bestimmten Empfänger in derselben lokalen MeMesh-Instanz senden, pollen, abrufen und getrennt quittieren |
|
|
543
569
|
|
|
544
570
|
---
|
|
545
571
|
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<h1 align="center">MeMesh</h1>
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong>
|
|
6
|
+
<strong>Shared memory and durable local coordination for coding agents.</strong><br />
|
|
7
7
|
One SQLite file. No Docker. No cloud required.
|
|
8
8
|
</p>
|
|
9
9
|
<p align="center">
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
**MeMesh**
|
|
19
|
+
**MeMesh** is the open-source **local collaboration layer for AI coding agents**: shared memory, durable exact-recipient messaging, and governed memory-to-product proposals for Claude Code, Codex, Cursor, custom or Ollama-backed agents, and compatible local MCP clients. One SQLite file. No Docker. No cloud required.
|
|
20
|
+
|
|
21
|
+
### New collaboration surfaces
|
|
22
|
+
|
|
23
|
+
- `message` gives local agents a durable exact-recipient inbox with cursor recovery and explicit receipts over MCP, HTTP, and CLI.
|
|
24
|
+
- `improvement` turns active memories into evidence-linked product-work proposals that agents can stage, but only a human can accept or reject.
|
|
20
25
|
|
|
21
26
|
## Install
|
|
22
27
|
|
|
@@ -29,7 +34,7 @@
|
|
|
29
34
|
|
|
30
35
|
Restart Claude Code. A `◉ MeMesh` status line at the top of your next session means it is capturing.
|
|
31
36
|
|
|
32
|
-
**In a terminal** — the `memesh` CLI, the dashboard, and the `memesh-mcp` server for Codex /
|
|
37
|
+
**In a terminal** — the `memesh` CLI, the dashboard, and the `memesh-mcp` server for Codex / Cursor and compatible local MCP clients (needs [Node 22.13+](https://nodejs.org)):
|
|
33
38
|
|
|
34
39
|
```bash
|
|
35
40
|
npm install -g @pcircle/memesh
|
|
@@ -53,6 +58,28 @@ That's not a chat-history problem; it's an agent-memory problem. What needs to s
|
|
|
53
58
|
|
|
54
59
|
---
|
|
55
60
|
|
|
61
|
+
## Local Agent Collaboration, Truthfully
|
|
62
|
+
|
|
63
|
+
MeMesh has a real cross-agent advantage: every host connected to the same local MeMesh instance can share durable memory, while the `message` tool provides an explicit exact-recipient messaging path over MCP, HTTP, and CLI.
|
|
64
|
+
|
|
65
|
+
The optional secure host-native wakeup runtime currently supports macOS and Linux. Core MeMesh memory, durable message storage, and MCP tools remain available on Windows; Windows host-native wakeup is not yet supported.
|
|
66
|
+
|
|
67
|
+
- Works today: an MCP, HTTP, or CLI sender can durably send to one named local recipient. A receiver can fetch the payload separately, resume from an opaque cursor after restart, and record intake, acknowledgement, workflow disposition, and host activation as separate facts.
|
|
68
|
+
- With the MeMesh Codex plugin enabled and the owner-private `memesh agent setup codex-session` opt-in, an active Codex session in the exact configured local workspace receives a native `memesh_message_available` wakeup without polling or a human reminder. The marker contains routing metadata only; Codex then fetches the durable payload with the scoped `message` tool.
|
|
69
|
+
- A successful queue admission (`host_accept`) means only that the local Codex queue accepted the marker. It does not mean an agent read the payload, acknowledged it, or accepted the work.
|
|
70
|
+
- Durable message storage is bounded by owner policy, not silent deletion: `memesh message storage report` exposes logical payload, protected rows, reusable SQLite pages, and WAL size; bounded prune is dry-run by default and only tombstones old terminal payloads. An optional `MEMESH_AGENT_MESSAGE_STORAGE_QUOTA_BYTES` rejects a send atomically. See [bounded storage and audit retention](docs/platforms/agent-messaging.md#bounded-storage-and-audit-retention).
|
|
71
|
+
- A stopped, missing, or disconnected Codex session is not awakened or replaced. Its durable inbox remains available for audit and recovery; `poll` and `memesh message watch` are compatibility and diagnostic paths. Native delivery never resumes a stopped model session, executes a payload, or implies acknowledgement.
|
|
72
|
+
- Cooperative trust boundary: the recipient name is a logical routing ID, not a per-agent login or ACL. Every caller with access to the same local MeMesh instance must be treated as a trusted workspace participant; host adapters still enforce their own permissions and human-approval rules.
|
|
73
|
+
- Adapter boundary: the native wakeup described here is the configured local Codex-session path. Other local MCP loops can use the durable message operations their own host loop supports; this is not a universal host-support claim.
|
|
74
|
+
|
|
75
|
+
See [Local Agent Messaging Guide](docs/platforms/agent-messaging.md) for the exact lifecycle, capability boundary, support matrix, and remaining adapter work.
|
|
76
|
+
|
|
77
|
+
### Turn agent experience into reviewed product work
|
|
78
|
+
|
|
79
|
+
The `improvement` tool converts active memories and lessons into an evidence-linked product-improvement proposal instead of leaving valuable feedback buried in an inbox. Agents can propose and inspect status, but they cannot approve their own ideas. A human accepts or rejects through the existing review surfaces; acceptance preserves every source memory, links the reviewed work item back to its evidence, and makes it visible in future project briefings. This keeps learning actionable without quietly turning an agent suggestion into product policy.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
56
83
|
## Install paths at a glance
|
|
57
84
|
|
|
58
85
|
MeMesh has **two install paths that coexist**. Most users want both. They write to the **same memory database** (`~/.memesh/knowledge-graph.db`), so memories captured in Claude Code chat appear in your shell, and vice versa.
|
|
@@ -67,7 +94,7 @@ flowchart TB
|
|
|
67
94
|
subgraph clients["Where you use memesh from"]
|
|
68
95
|
direction LR
|
|
69
96
|
CC["Claude Code<br/>(chat + agent)"]:::client
|
|
70
|
-
TERM["Terminal / other<br/>MCP clients<br/>(Codex,
|
|
97
|
+
TERM["Terminal / other<br/>MCP clients<br/>(Codex, Cursor...)"]:::client
|
|
71
98
|
end
|
|
72
99
|
|
|
73
100
|
subgraph paths["Two install paths"]
|
|
@@ -92,7 +119,7 @@ flowchart TB
|
|
|
92
119
|
| Get auto-capture (sessions → lessons → recall) in Claude Code | Path A (plugin) |
|
|
93
120
|
| Run `memesh remember` / `memesh recall` / `memesh doctor` in any terminal | Path B (npm-global) |
|
|
94
121
|
| Open the local dashboard via `memesh serve` (no `npx` lookup delay) | Path B (npm-global) |
|
|
95
|
-
| Plug `memesh-mcp` into Codex CLI,
|
|
122
|
+
| Plug `memesh-mcp` into Codex CLI, Cursor, or another local MCP client | Path B (npm-global) |
|
|
96
123
|
| All of the above | **Install both** — they don't conflict |
|
|
97
124
|
|
|
98
125
|
### ⚠️ Installing the plugin does NOT install the CLI
|
|
@@ -133,7 +160,7 @@ The MCP server runs directly from the plugin's bundled compiled output — no `n
|
|
|
133
160
|
|
|
134
161
|
### Option B — npm global (optional optimisation)
|
|
135
162
|
|
|
136
|
-
If you want the binary directly on your shell `PATH` (so plain `memesh`, `memesh-mcp`, etc. work in any terminal without the per-call `npx` lookup), or you want to expose `memesh-mcp` as a fixed-path stdio command to **non-Claude-Code MCP clients** (Codex CLI,
|
|
163
|
+
If you want the binary directly on your shell `PATH` (so plain `memesh`, `memesh-mcp`, etc. work in any terminal without the per-call `npx` lookup), or you want to expose `memesh-mcp` as a fixed-path stdio command to **non-Claude-Code MCP clients** (Codex CLI, Cursor, Cline, terminal-only flows):
|
|
137
164
|
|
|
138
165
|
```bash
|
|
139
166
|
npm install -g @pcircle/memesh
|
|
@@ -150,7 +177,7 @@ If you installed via **Option A** (`/plugin install memesh@pcircle-memesh`), ski
|
|
|
150
177
|
If you installed via **Option B** (`npm install -g`), the CLI is on your PATH — but nothing is wired into Claude Code yet: the npm package deliberately runs no install scripts, and the plugin (Option A) is what registers the MCP server and hooks inside Claude Code. What the npm path can wire by itself is the session hooks. Without them you can still use `memesh remember` / `recall` manually, but the **auto-capture loop** (sessions → lessons → recall on next session) is silent.
|
|
151
178
|
|
|
152
179
|
```bash
|
|
153
|
-
memesh setup #
|
|
180
|
+
memesh setup # checks local host wiring and reports what it finds
|
|
154
181
|
```
|
|
155
182
|
|
|
156
183
|
Or the individual steps by hand:
|
|
@@ -162,7 +189,7 @@ memesh setup --check # machine-level verification: reads the hosts' own
|
|
|
162
189
|
|
|
163
190
|
The hooks coexist with any custom hooks you already have under `~/.claude/hooks/` — `install-hooks` writes additive entries and never overwrites yours. To remove later: `memesh uninstall-hooks`.
|
|
164
191
|
|
|
165
|
-
### Same memory from Codex CLI,
|
|
192
|
+
### Same memory from Codex CLI, Cursor, and other MCP clients
|
|
166
193
|
|
|
167
194
|
`memesh-mcp` is a plain stdio MCP server, so any MCP-capable host can talk to it — not just Claude Code. With Option B installed (`memesh-mcp` on your `PATH`), register it once per host:
|
|
168
195
|
|
|
@@ -170,8 +197,6 @@ The hooks coexist with any custom hooks you already have under `~/.claude/hooks/
|
|
|
170
197
|
# OpenAI Codex CLI — writes [mcp_servers.memesh] into ~/.codex/config.toml
|
|
171
198
|
codex mcp add memesh -- memesh-mcp
|
|
172
199
|
|
|
173
|
-
# Google Gemini CLI — user scope, so it works in every folder
|
|
174
|
-
gemini mcp add -s user memesh memesh-mcp
|
|
175
200
|
```
|
|
176
201
|
|
|
177
202
|
For Cursor, add the same stdio server to `~/.cursor/mcp.json` (global) or
|
|
@@ -185,11 +210,10 @@ For Cursor, add the same stdio server to `~/.cursor/mcp.json` (global) or
|
|
|
185
210
|
}
|
|
186
211
|
```
|
|
187
212
|
|
|
188
|
-
Every host reads and writes the same `~/.memesh/knowledge-graph.db`, so a memory stored from one agent is recallable from Codex,
|
|
213
|
+
Every configured local host reads and writes the same `~/.memesh/knowledge-graph.db`, so a memory stored from one agent is recallable from Codex, Cursor, or another MCP client. Verify from the host by asking it to call the `recall` tool, or from a terminal:
|
|
189
214
|
|
|
190
215
|
```bash
|
|
191
216
|
codex mcp list # memesh should be listed as enabled
|
|
192
|
-
gemini mcp list # memesh should show "Connected"
|
|
193
217
|
```
|
|
194
218
|
|
|
195
219
|
> **Use `memesh-mcp`, not `npx -p @pcircle/memesh`, as the configured command.** `npx -p` resolves to the *local* package whenever the host's working directory is inside a checkout of this repository, silently running whatever state that working tree is in instead of the installed release.
|
|
@@ -286,8 +310,8 @@ This same block is what Claude Code receives automatically at session start, and
|
|
|
286
310
|
| If you are... | MeMesh helps you... |
|
|
287
311
|
|---------------|---------------------|
|
|
288
312
|
| **A developer using Claude Code** | Auto-recall project decisions, file-specific lessons, and past failures as you work |
|
|
289
|
-
| **A coding-agent power user** | Share one local memory layer across MCP-compatible tools |
|
|
290
|
-
| **An individual using Codex,
|
|
313
|
+
| **A coding-agent power user** | Share one local memory layer and a truthful local inbox pattern across MCP-compatible tools |
|
|
314
|
+
| **An individual using Codex, Cursor, Claude Code, or another MCP client** | Use one local memory layer across agents and sessions, and coordinate handoffs through the shared store |
|
|
291
315
|
| **A developer integrating an agent** | Add local memory through MCP, HTTP, or the CLI |
|
|
292
316
|
|
|
293
317
|
---
|
|
@@ -365,7 +389,7 @@ Re-runnable in ~10 seconds. Full instructions, dataset SHA256, raw per-question
|
|
|
365
389
|
|
|
366
390
|
## What Happens Automatically In Claude Code
|
|
367
391
|
|
|
368
|
-
You don't need to manually remember everything. MeMesh has **
|
|
392
|
+
You don't need to manually remember everything. MeMesh has **8 hooks** that capture and inject knowledge while you work:
|
|
369
393
|
|
|
370
394
|
| When | What MeMesh does |
|
|
371
395
|
|------|------------------|
|
|
@@ -376,6 +400,7 @@ You don't need to manually remember everything. MeMesh has **7 hooks** that capt
|
|
|
376
400
|
| **When Claude stops** | Captures files edited, errors fixed, and auto-generates structured lessons from failures |
|
|
377
401
|
| **Before context compaction** | Saves knowledge before it's lost to context limits |
|
|
378
402
|
| **Before risky commands and edits** | Fires the lesson-guards you accepted — a warning at the exact moment a recorded mistake is about to repeat |
|
|
403
|
+
| **When an opted-in Codex session starts or resumes** | Registers that exact live thread for metadata-only MeMesh message wakeups; other workspaces and stopped sessions are not attached |
|
|
379
404
|
|
|
380
405
|
> **Opt out anytime:** `export MEMESH_AUTO_CAPTURE=false`
|
|
381
406
|
|
|
@@ -390,7 +415,7 @@ All configuration is via environment variables. Defaults are local-only and zero
|
|
|
390
415
|
| `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | Override the SQLite database location. |
|
|
391
416
|
| `MEMESH_AUTO_CAPTURE` | `true` | Disable the auto-capture hooks (`Stop`, `PreCompact`) entirely. |
|
|
392
417
|
| `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 keyword-only (FTS5) unless you explicitly set `embedder.provider` to `ollama` or `openai`. |
|
|
393
|
-
| `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).
|
|
418
|
+
| `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). A maintainer deprecation warning never overrides `off`: update manually or choose a policy that permits the bump. |
|
|
394
419
|
| `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. |
|
|
395
420
|
| `OLLAMA_HOST` | `http://localhost:11434` | Override the Ollama endpoint when using a local Ollama provider. |
|
|
396
421
|
|
|
@@ -476,7 +501,7 @@ conflict — instead of confidently quoting whichever one it found first.
|
|
|
476
501
|
MeMesh is an MCP server, so the same SQLite file serves every MCP client on
|
|
477
502
|
the machine. Register it once per tool (exact commands in
|
|
478
503
|
[Get Started](#get-started-in-60-seconds)) and a decision recorded in Claude
|
|
479
|
-
Code is recalled by Codex or
|
|
504
|
+
Code is recalled by Codex or another configured local MCP client mid-session — no re-explaining, no
|
|
480
505
|
copy-pasting context between vendors.
|
|
481
506
|
|
|
482
507
|
### Record decisions so they stay findable
|
|
@@ -542,7 +567,7 @@ If you switch to an embedder with a different dimension (e.g. 768 → 1536), **n
|
|
|
542
567
|
|
|
543
568
|
---
|
|
544
569
|
|
|
545
|
-
## All
|
|
570
|
+
## All 11 Memory and Coordination Tools
|
|
546
571
|
|
|
547
572
|
| Tool | What it does |
|
|
548
573
|
|------|-------------|
|
|
@@ -555,6 +580,8 @@ If you switch to an embedder with a different dimension (e.g. 768 → 1536), **n
|
|
|
555
580
|
| `task_state` | Read or record where the work stands — goal, next step, blocker, what was just finished |
|
|
556
581
|
| `briefing` | The assembled work topology — the same block Claude Code gets at session start, for any MCP client |
|
|
557
582
|
| `user_patterns` | Analyze your work patterns — schedule, tools, strengths, learning areas |
|
|
583
|
+
| `improvement` | Stage an evidence-linked product improvement for human review, or read its status; agents cannot accept or reject it |
|
|
584
|
+
| `message` | Send, poll, fetch, and explicitly receipt durable exact-recipient messages on one local MeMesh instance |
|
|
558
585
|
|
|
559
586
|
---
|
|
560
587
|
|
|
@@ -563,7 +590,7 @@ If you switch to an embedder with a different dimension (e.g. 768 → 1536), **n
|
|
|
563
590
|
```
|
|
564
591
|
┌─────────────────┐
|
|
565
592
|
│ Core Engine │
|
|
566
|
-
│
|
|
593
|
+
│ operations │
|
|
567
594
|
└────────┬────────┘
|
|
568
595
|
┌─────────────────┼─────────────────┐
|
|
569
596
|
│ │ │
|
package/README.zh-TW.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<h1 align="center">MeMesh</h1>
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong
|
|
6
|
+
<strong>給程式開發代理的共享記憶與耐久化本機協作層。</strong><br />
|
|
7
7
|
一個 SQLite 檔案。不需要 Docker。不需要雲端。
|
|
8
8
|
</p>
|
|
9
9
|
<p align="center">
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
**MeMesh** 是給 AI
|
|
19
|
+
**MeMesh** 是給 AI 程式開發代理用的**開源本機協作層**:讓 Claude Code、Codex、Cursor、自訂或 Ollama-backed agents 與相容的本機 MCP 用戶端共享記憶、交換耐久化單一收件人訊息,並把有價值的經驗轉成受治理的產品改善提案。全部存在一個 SQLite 檔案裡,不需要 Docker,也不需要雲端。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
### 新的協作入口
|
|
22
|
+
|
|
23
|
+
- `message` 讓本機 agent 擁有可恢復 cursor、可明確記錄 receipt 的單一收件人耐久化 inbox,MCP、HTTP、CLI 三個 surface 都可用。
|
|
24
|
+
- `improvement` 讓 active memories 直接進入有證據連結的產品工作提案;agent 能發起與查狀態,但只有人類能接受或拒絕。
|
|
22
25
|
|
|
23
26
|
## 安裝
|
|
24
27
|
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
|
|
32
35
|
重開 Claude Code。下一個 session 開頭出現 `◉ MeMesh` 狀態列,就代表它在記了。
|
|
33
36
|
|
|
34
|
-
**在終端機裡** — `memesh` CLI、儀表板,以及給 Codex /
|
|
37
|
+
**在終端機裡** — `memesh` CLI、儀表板,以及給 Codex / Cursor 與相容本機 MCP 用戶端用的 `memesh-mcp` server(需要 [Node 22.13+](https://nodejs.org)):
|
|
35
38
|
|
|
36
39
|
```bash
|
|
37
40
|
npm install -g @pcircle/memesh
|
|
@@ -64,6 +67,28 @@ memesh doctor # 端到端驗證這份安裝
|
|
|
64
67
|
|
|
65
68
|
---
|
|
66
69
|
|
|
70
|
+
## Local Agent Collaboration,要說真話
|
|
71
|
+
|
|
72
|
+
MeMesh 有一個很強的跨代理優勢:凡是連到同一個本機 MeMesh instance 的 host,都能共享持久化記憶;`message` tool 則提供 MCP、HTTP 與 CLI 共用的明確單一收件人訊息路徑。
|
|
73
|
+
|
|
74
|
+
可選的安全 host-native 喚醒 runtime 目前支援 macOS 與 Linux。Windows 仍可使用 MeMesh 核心記憶、耐久化 message storage 與 MCP tools;Windows host-native 喚醒目前尚未支援。
|
|
75
|
+
|
|
76
|
+
- 今天就能做的:MCP、HTTP 或 CLI sender 可把訊息耐久化送給一個指定的本機 recipient。接收端可另行擷取 payload、在重啟後用 opaque cursor 補收,並把 intake、acknowledgement、workflow disposition 與 host activation 分開記錄。
|
|
77
|
+
- 啟用 MeMesh Codex plugin 並完成 owner-private 的 `memesh agent setup codex-session` opt-in 後,位於**確切設定本機 workspace** 的活動中 Codex session 可在沒有輪詢或人工提醒下收到原生 `memesh_message_available` 喚醒。marker 只含 routing metadata;Codex 接著以 scope 相符的 `message` tool 擷取耐久化 payload。
|
|
78
|
+
- 成功的 queue admission(`host_accept`)只代表本機 Codex queue 接受了 marker;它不代表 agent 已讀 payload、已確認收到,或接受了工作。
|
|
79
|
+
- Durable message storage 由 owner policy 控制,不會偷偷刪除未解決訊息:`memesh message storage report` 會顯示 logical payload、protected rows、可重用 SQLite pages 與 WAL 大小;bounded prune 預設只 dry-run,且只 tombstone 舊的 terminal payload。可選的 `MEMESH_AGENT_MESSAGE_STORAGE_QUOTA_BYTES` 會在交易內原子拒絕超額 send。詳見 [bounded storage and audit retention](docs/platforms/agent-messaging.md#bounded-storage-and-audit-retention)。
|
|
80
|
+
- 已停止、缺失或斷線的 Codex session 不會被喚醒或取代。它的耐久化 inbox 仍可供稽核與復原;`poll` 與 `memesh message watch` 是相容與診斷路徑。原生傳遞不會自動恢復已停止的模型 session、不會執行 payload,也不代表已確認收到。
|
|
81
|
+
- 協作式信任邊界:recipient 名稱只是邏輯 routing ID,不是每個 agent 各自登入的身分或 ACL。能存取同一本機 MeMesh instance 的 caller 都必須視為受信任的 workspace participant;host adapter 仍需自行落實權限與人工核准規則。
|
|
82
|
+
- Adapter 邊界:這裡的原生喚醒只指已設定的本機 Codex-session 路徑。其他本機 MCP loop 可使用自己 host loop 支援的耐久化 message 操作;這不是通用 host 支援宣告。
|
|
83
|
+
|
|
84
|
+
完整 lifecycle、現況邊界、支援矩陣和剩餘 adapter 工作,請看 [Local Agent Messaging Guide](docs/platforms/agent-messaging.md)。
|
|
85
|
+
|
|
86
|
+
### 把 agent 經驗轉成受審核的產品工作
|
|
87
|
+
|
|
88
|
+
`improvement` tool 能把仍有效的記憶與教訓轉成有證據連結的產品改善提案,不再讓有價值的 feedback 只停在 inbox。Agent 可以提案與查狀態,但不能核准自己的建議;人類透過既有 review surface 接受或拒絕。接受後,MeMesh 會保留全部來源記憶、把工作項目連回證據,並讓它出現在後續 project briefing。這讓學習真正進入產品流程,同時避免 agent 建議在沒有人工授權下直接變成產品政策。
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
67
92
|
## 安裝路徑一覽
|
|
68
93
|
|
|
69
94
|
MeMesh 有**兩條會共存的安裝路徑**。多數使用者兩條都需要。它們寫入**同一份記憶資料庫**(`~/.memesh/knowledge-graph.db`),所以 Claude Code 對話裡記下的東西在 terminal 也看得到,反之亦然。
|
|
@@ -78,7 +103,7 @@ flowchart TB
|
|
|
78
103
|
subgraph clients["Where you use memesh from"]
|
|
79
104
|
direction LR
|
|
80
105
|
CC["Claude Code<br/>(chat + agent)"]:::client
|
|
81
|
-
TERM["Terminal / other<br/>MCP clients<br/>(Codex,
|
|
106
|
+
TERM["Terminal / other<br/>MCP clients<br/>(Codex, Cursor...)"]:::client
|
|
82
107
|
end
|
|
83
108
|
|
|
84
109
|
subgraph paths["Two install paths"]
|
|
@@ -159,7 +184,7 @@ npm install -g @pcircle/memesh
|
|
|
159
184
|
如果你透過**選項 B**(`npm install -g`)安裝,CLI 已在 PATH 上 — 但**還沒有任何東西接進 Claude Code**:npm 套件刻意不執行安裝腳本,把 MCP server 和 hooks 接進 Claude Code 的是外掛(選項 A)。npm 路徑自己能接的是 session hooks。沒有這些 hooks 還是可以手動使用 `memesh remember` / `recall`,但**自動擷取迴路**(session → 教訓 → 下次 session 主動回憶)就會靜默不動。
|
|
160
185
|
|
|
161
186
|
```bash
|
|
162
|
-
memesh setup #
|
|
187
|
+
memesh setup # 檢查本機 host 接線並回報結果
|
|
163
188
|
```
|
|
164
189
|
|
|
165
190
|
或手動逐步:
|
|
@@ -171,7 +196,7 @@ memesh setup --check # 機器層級驗證:讀各主機自己的設定
|
|
|
171
196
|
|
|
172
197
|
這些 hooks 會跟你既有的 `~/.claude/hooks/` 自訂 hooks 共存 — `install-hooks` 用追加方式寫入,從不覆寫你的東西。要移除:`memesh uninstall-hooks`。
|
|
173
198
|
|
|
174
|
-
### 從 Codex CLI、
|
|
199
|
+
### 從 Codex CLI、Cursor 與其他 MCP 用戶端使用同一份記憶
|
|
175
200
|
|
|
176
201
|
`memesh-mcp` 是標準的 stdio MCP server,任何支援 MCP 的主機都能用 — 不限 Claude Code。裝好選項 B(`memesh-mcp` 在 `PATH` 上)之後,每個主機註冊一次:
|
|
177
202
|
|
|
@@ -179,8 +204,6 @@ memesh setup --check # 機器層級驗證:讀各主機自己的設定
|
|
|
179
204
|
# OpenAI Codex CLI — 會把 [mcp_servers.memesh] 寫進 ~/.codex/config.toml
|
|
180
205
|
codex mcp add memesh -- memesh-mcp
|
|
181
206
|
|
|
182
|
-
# Google Gemini CLI — user 範圍,每個資料夾都能用
|
|
183
|
-
gemini mcp add -s user memesh memesh-mcp
|
|
184
207
|
```
|
|
185
208
|
|
|
186
209
|
Cursor 請將同一個 stdio server 加入 `~/.cursor/mcp.json`(全域),或專案內的 `.cursor/mcp.json`:
|
|
@@ -193,11 +216,10 @@ Cursor 請將同一個 stdio server 加入 `~/.cursor/mcp.json`(全域),
|
|
|
193
216
|
}
|
|
194
217
|
```
|
|
195
218
|
|
|
196
|
-
|
|
219
|
+
每個已設定的本機 host 讀寫的都是同一個 `~/.memesh/knowledge-graph.db`,所以在任何代理儲存的記憶,Codex、Cursor 和其他 MCP 用戶端都能回憶得到。請從主機要求它呼叫 `recall` 工具驗證:
|
|
197
220
|
|
|
198
221
|
```bash
|
|
199
222
|
codex mcp list # memesh 應顯示為 enabled
|
|
200
|
-
gemini mcp list # memesh 應顯示 "Connected"
|
|
201
223
|
```
|
|
202
224
|
|
|
203
225
|
> **設定的指令要用 `memesh-mcp`,不要用 `npx -p @pcircle/memesh`。**當主機的工作目錄在這個 repo 的 checkout 裡時,`npx -p` 會解析到*本地*套件,靜默執行工作樹當下的狀態而不是安裝好的正式版。
|
|
@@ -295,7 +317,7 @@ Claude Code 在 session 開始時自動收到的就是同一個區塊,其他 M
|
|
|
295
317
|
|---------------|---------------------|
|
|
296
318
|
| **使用 Claude Code 的開發者** | 在工作時自動回憶專案決策、檔案特定的經驗教訓和過去的失敗 |
|
|
297
319
|
| **程式開發代理進階使用者** | 在多個 MCP 相容工具間共享一層在地記憶 |
|
|
298
|
-
| **使用 Codex、
|
|
320
|
+
| **使用 Codex、Cursor、Claude Code 或其他 MCP 用戶端的個人** | 在不同代理與 session 之間使用同一層在地記憶 |
|
|
299
321
|
| **整合 AI 代理的開發者** | 透過 MCP、HTTP 或 CLI 添加在地記憶 |
|
|
300
322
|
|
|
301
323
|
---
|
|
@@ -373,7 +395,7 @@ MeMesh 的檢索引擎**只用 FTS5**(熱路徑上不使用 LLM、不使用嵌
|
|
|
373
395
|
|
|
374
396
|
## Claude Code 自動進行的事情
|
|
375
397
|
|
|
376
|
-
你不需要手動記住所有事情。MeMesh 有 **
|
|
398
|
+
你不需要手動記住所有事情。MeMesh 有 **8 個 hooks**,會在你工作時自動擷取與注入知識:
|
|
377
399
|
|
|
378
400
|
| 何時 | MeMesh 做什麼 |
|
|
379
401
|
|------|------------------|
|
|
@@ -384,6 +406,7 @@ MeMesh 的檢索引擎**只用 FTS5**(熱路徑上不使用 LLM、不使用嵌
|
|
|
384
406
|
| **Claude 停止時** | 擷取已編輯的檔案、已修復的錯誤,並從失敗自動產生結構化教訓 |
|
|
385
407
|
| **上下文壓縮前** | 在知識被上下文限制丟掉之前先保存 |
|
|
386
408
|
| **危險指令與編輯前** | 觸發你接受過的教訓守衛——在記錄過的錯誤即將重演的那一刻發出警告 |
|
|
409
|
+
| **已 opt-in 的 Codex session 啟動或恢復時** | 註冊該確切活動 thread 以接收 metadata-only MeMesh 訊息喚醒;其他 workspace 與已停止 session 不會被附掛 |
|
|
387
410
|
|
|
388
411
|
> **隨時退出:** `export MEMESH_AUTO_CAPTURE=false`
|
|
389
412
|
|
|
@@ -398,7 +421,7 @@ MeMesh 的檢索引擎**只用 FTS5**(熱路徑上不使用 LLM、不使用嵌
|
|
|
398
421
|
| `MEMESH_DB_PATH` | `~/.memesh/knowledge-graph.db` | 覆寫 SQLite 資料庫位置。 |
|
|
399
422
|
| `MEMESH_AUTO_CAPTURE` | `true` | 完全停用自動擷取 hooks(`Stop`、`PreCompact`)。 |
|
|
400
423
|
| `MEMESH_AUTO_DETECT_LLM` | 未設定(自動偵測**開啟**) | 設為 `0` 讓 memesh 不使用它在 shell 環境中找到的 API 金鑰。預設情況下,如果設定了 `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `OLLAMA_HOST` 且你沒有在 `~/.memesh/config.json` 設定供應商,memesh 會用它來跑寫入側的 LLM 功能(整合、經驗提取、自動打標籤、dream)。嵌入不受影響 —— 除非你把 `embedder.provider` 明確設定為 `ollama` 或 `openai`,否則保持僅關鍵字(FTS5)。 |
|
|
401
|
-
| `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` 會在 session 結束時(Stop hook)執行,避免阻塞你的工作 — 結果寫入 `~/.memesh/auto-update.log`。也可在 `~/.memesh/config.json` 中以 `autoUpdate`
|
|
424
|
+
| `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` 會在 session 結束時(Stop hook)執行,避免阻塞你的工作 — 結果寫入 `~/.memesh/auto-update.log`。也可在 `~/.memesh/config.json` 中以 `autoUpdate` 設定(環境變數優先)。維護者的 deprecated 警示絕不會覆寫 `off`:請手動更新,或選擇允許該升級的 policy。 |
|
|
402
425
|
| `OPENAI_API_KEY` | 未設定 | 你的 OpenAI 金鑰。除非你設定 `MEMESH_AUTO_DETECT_LLM=0` 或明確設定供應商,否則會自動用於 LLM 功能。 |
|
|
403
426
|
| `OLLAMA_HOST` | `http://localhost:11434` | 使用本地 Ollama 供應商時覆寫 Ollama 的端點。 |
|
|
404
427
|
|
|
@@ -479,7 +502,7 @@ memesh recall "retry policy" # → 警告:偵測到衝突
|
|
|
479
502
|
|
|
480
503
|
### 一份記憶,三個代理
|
|
481
504
|
|
|
482
|
-
MeMesh 是一個 MCP server,所以同一個 SQLite 檔案能服務機器上的每一個 MCP 用戶端。每個工具只要註冊一次(確切指令見上方「60 秒快速開始」),在 Claude Code 記錄的決策,session 進行到一半時就能被 Codex
|
|
505
|
+
MeMesh 是一個 MCP server,所以同一個 SQLite 檔案能服務機器上的每一個 MCP 用戶端。每個工具只要註冊一次(確切指令見上方「60 秒快速開始」),在 Claude Code 記錄的決策,session 進行到一半時就能被 Codex 或另一個已設定的本機 MCP client 回憶起來 — 不用重新解釋,不用在不同廠商之間複製貼上 context。
|
|
483
506
|
|
|
484
507
|
### 記錄決策讓它們保持可被找到
|
|
485
508
|
|
|
@@ -535,7 +558,7 @@ memesh config set embedder.provider openai # or: ollama
|
|
|
535
558
|
|
|
536
559
|
---
|
|
537
560
|
|
|
538
|
-
## 全部
|
|
561
|
+
## 全部 11 個記憶與協作工具
|
|
539
562
|
|
|
540
563
|
| 工具 | 做什麼 |
|
|
541
564
|
|------|--------|
|
|
@@ -548,6 +571,8 @@ memesh config set embedder.provider openai # or: ollama
|
|
|
548
571
|
| `task_state` | 讀取或記下工作進度——目標、下一步、卡住的地方、剛完成的事 |
|
|
549
572
|
| `briefing` | 組合好的工作拓撲——Claude Code 在 session 開始拿到的那個區塊,任何 MCP client 都拿得到 |
|
|
550
573
|
| `user_patterns` | 分析你的工作模式——時間表、工具、優勢、學習領域 |
|
|
574
|
+
| `improvement` | 將有證據來源的產品改善送交人類審核,或讀取其狀態;agent 不能自行接受或拒絕 |
|
|
575
|
+
| `message` | 在同一個本機 MeMesh instance 上耐久化送出、輪詢、擷取並明確記錄單一收件人訊息狀態 |
|
|
551
576
|
|
|
552
577
|
---
|
|
553
578
|
|
|
@@ -556,7 +581,7 @@ memesh config set embedder.provider openai # or: ollama
|
|
|
556
581
|
```
|
|
557
582
|
┌─────────────────┐
|
|
558
583
|
│ 核心引擎 │
|
|
559
|
-
│
|
|
584
|
+
│ 核心操作 │
|
|
560
585
|
└────────┬────────┘
|
|
561
586
|
┌─────────────────┼─────────────────┐
|
|
562
587
|
│ │ │
|