mnueron 0.3.0 → 0.4.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/README.md +123 -1
- package/dashboard/index.html +38 -0
- package/dist/cli.js +1187 -1
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/server.js +95 -0
- package/dist/dashboard/server.js.map +1 -1
- package/dist/detectors/claude_desktop.js +79 -22
- package/dist/detectors/claude_desktop.js.map +1 -1
- package/dist/import/claude_cowork.js +359 -0
- package/dist/import/claude_cowork.js.map +1 -0
- package/dist/import/claude_desktop.js +196 -0
- package/dist/import/claude_desktop.js.map +1 -0
- package/dist/store/consolidator.js +168 -0
- package/dist/store/consolidator.js.map +1 -0
- package/dist/store/entity-extractor.js +283 -0
- package/dist/store/entity-extractor.js.map +1 -0
- package/dist/store/entity-resolver.js +378 -0
- package/dist/store/entity-resolver.js.map +1 -0
- package/dist/store/local.js +522 -14
- package/dist/store/local.js.map +1 -1
- package/dist/store/procedural.js +328 -0
- package/dist/store/procedural.js.map +1 -0
- package/dist/store/relation-extractor.js +292 -0
- package/dist/store/relation-extractor.js.map +1 -0
- package/dist/store/remote.js +182 -20
- package/dist/store/remote.js.map +1 -1
- package/dist/tools.js +84 -0
- package/dist/tools.js.map +1 -1
- package/dist/watch/cowork.js +137 -0
- package/dist/watch/cowork.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/promo-large-dark.png" alt="mnueron — memory for every AI" width="420" />
|
|
2
|
+
<img src="https://raw.githubusercontent.com/randi2160/mnueron/main/assets/promo-large-dark.png" alt="mnueron — memory for every AI" width="420" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center"><strong>One memory layer. Every LLM. Every dev tool. Every app you build.</strong></p>
|
|
@@ -36,6 +36,22 @@ What changes day-to-day:
|
|
|
36
36
|
- **In your apps:** When a user comes back, the AI already knows their preferences — without you wiring it up per-provider.
|
|
37
37
|
- **Across providers:** Switch from OpenAI to Claude to Mistral without losing your customer's history. The memory layer is the constant.
|
|
38
38
|
|
|
39
|
+
## What's new
|
|
40
|
+
|
|
41
|
+
See [CHANGELOG.md](CHANGELOG.md) for the full history. Headlines:
|
|
42
|
+
|
|
43
|
+
- **`mnueron primer`** — emit a CLAUDE.md / cursorrules-style memory primer (`mnueron primer > CLAUDE.md`)
|
|
44
|
+
- **5 more IDE detectors** — Continue, Zed, Aider, Goose, OpenCode
|
|
45
|
+
- **Platform API gaps closed** — date-range filter, PATCH update, bulk search, metadata-field filter
|
|
46
|
+
- **Webhook subscriptions** — HMAC-signed POSTs on memory events
|
|
47
|
+
- **Fact extraction** — long assistant responses get distilled into searchable facts
|
|
48
|
+
- **Backend secret redaction** — defense in depth on top of the client-side redactor
|
|
49
|
+
- **Chrome extension v0.2.0** — Local/Hosted toggle, recall + inject, ambient context, build-prompt multi-select
|
|
50
|
+
- **SDKs refreshed** — Python `0.3.1` + .NET `0.3` cover the new endpoints (date filters, PATCH, bulk search, webhook CRUD, HMAC verifier)
|
|
51
|
+
- **Claude Desktop import** — `mnueron import --claude-desktop` probes for and ingests Claude Desktop's export JSON
|
|
52
|
+
|
|
53
|
+
Full API docs at [mnueron.com/docs/api/overview](https://mnueron.com/docs/api/overview).
|
|
54
|
+
|
|
39
55
|
## What you get out of the box — free, forever
|
|
40
56
|
|
|
41
57
|
Run `mnueron setup` and every single one of these is yours. No account, no credit card, no telemetry. Your data lives at `~/.mnueron/memories.db` and never leaves your computer unless you explicitly opt into hosted mode.
|
|
@@ -162,6 +178,112 @@ mnueron import ~/Downloads/conversations.json --ns my-project
|
|
|
162
178
|
Auto-detects Claude vs OpenAI format. Each conversation becomes a searchable
|
|
163
179
|
memory tagged `imported`.
|
|
164
180
|
|
|
181
|
+
### Import your Claude Cowork sessions
|
|
182
|
+
|
|
183
|
+
If you use Claude's "Cowork" mode (the desktop app's local agent mode), every
|
|
184
|
+
chat is already on disk as a JSONL transcript. mnueron can find and import
|
|
185
|
+
all of them with no export step.
|
|
186
|
+
|
|
187
|
+
#### CLI — one-shot import
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# See what would be imported without saving anything
|
|
191
|
+
mnueron import --claude-cowork --probe
|
|
192
|
+
|
|
193
|
+
# Import every Cowork session into the default namespace ("claude-cowork")
|
|
194
|
+
mnueron import --claude-cowork
|
|
195
|
+
|
|
196
|
+
# Import into a custom namespace (e.g. group with one of your projects)
|
|
197
|
+
mnueron import --claude-cowork --ns elevizio
|
|
198
|
+
|
|
199
|
+
# Only import the 10 most recent Cowork sessions
|
|
200
|
+
mnueron import --claude-cowork --limit 10 --ns elevizio
|
|
201
|
+
|
|
202
|
+
# Parse everything but do NOT save — useful to confirm the parse is clean
|
|
203
|
+
mnueron import --claude-cowork --dry-run
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Re-runs are safe: each session is upserted by `source_ref="cowork:<sessionId>"`,
|
|
207
|
+
so importing twice just refreshes any sessions whose transcripts have changed.
|
|
208
|
+
|
|
209
|
+
Where mnueron looks for transcripts:
|
|
210
|
+
|
|
211
|
+
| OS | Paths scanned |
|
|
212
|
+
|---|---|
|
|
213
|
+
| Windows (regular install) | `%APPDATA%\Claude\local-agent-mode-sessions\` |
|
|
214
|
+
| Windows (Microsoft Store install) | `%LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\local-agent-mode-sessions\` |
|
|
215
|
+
| macOS | `~/Library/Application Support/Claude/local-agent-mode-sessions/` |
|
|
216
|
+
| Linux | `~/.config/Claude/local-agent-mode-sessions/` |
|
|
217
|
+
| All | `~/.claude/projects/` (regular Claude Code) |
|
|
218
|
+
|
|
219
|
+
Each Cowork session becomes one memory. The chunker then splits long
|
|
220
|
+
transcripts per-turn so search returns the specific exchange, not the whole
|
|
221
|
+
6000-message session.
|
|
222
|
+
|
|
223
|
+
#### CLI — background watcher
|
|
224
|
+
|
|
225
|
+
Long-running mode: keeps Cowork in step with mnueron memory by re-importing
|
|
226
|
+
any session whose transcript file changes.
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Default: poll every 5 minutes, save into the "claude-cowork" namespace,
|
|
230
|
+
# run forever (Ctrl+C to stop).
|
|
231
|
+
mnueron watch --claude-cowork
|
|
232
|
+
|
|
233
|
+
# Custom interval (poll every 2 minutes) and namespace
|
|
234
|
+
mnueron watch --claude-cowork --interval 2 --ns elevizio
|
|
235
|
+
|
|
236
|
+
# Run exactly one sync tick and exit — useful for cron / Task Scheduler
|
|
237
|
+
mnueron watch --claude-cowork --once
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
The watcher persists last-synced mtimes per session at
|
|
241
|
+
`~/.mnueron/cowork-sync.json`, so restarting it doesn't re-import everything.
|
|
242
|
+
|
|
243
|
+
#### Dashboard — one-click import
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Open the dashboard at localhost:3122 in your browser
|
|
247
|
+
mnueron dashboard
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Then click the **Import Cowork** button in the toolbar (next to the existing
|
|
251
|
+
**Import…** button). You'll get a confirmation showing the session and
|
|
252
|
+
message count before the import runs.
|
|
253
|
+
|
|
254
|
+
#### MCP — trigger from inside any Claude session
|
|
255
|
+
|
|
256
|
+
mnueron's MCP server exposes a `memory_import_cowork` tool. Once mnueron is
|
|
257
|
+
wired into Claude Desktop / Claude Code (`mnueron setup`), just say:
|
|
258
|
+
|
|
259
|
+
> "Import my cowork chats."
|
|
260
|
+
|
|
261
|
+
Claude will call the tool with sensible defaults. To pass specific options:
|
|
262
|
+
|
|
263
|
+
> "Use the `memory_import_cowork` tool with `namespace="elevizio"` and `limit=5`."
|
|
264
|
+
|
|
265
|
+
The tool accepts:
|
|
266
|
+
- `namespace` (string, default `"claude-cowork"`) — where to save the memories
|
|
267
|
+
- `limit` (number, optional) — cap how many sessions to import in this call
|
|
268
|
+
- `probe_only` (boolean, default `false`) — report what would be imported, don't save
|
|
269
|
+
|
|
270
|
+
#### Daily scheduled task
|
|
271
|
+
|
|
272
|
+
The Claude desktop app's scheduled-tasks feature can run the import on a
|
|
273
|
+
cron. Example: every weekday at 7am.
|
|
274
|
+
|
|
275
|
+
- Cron expression: `0 7 * * 1-5`
|
|
276
|
+
- Prompt for the scheduled task:
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
Run the daily mnueron Cowork sync by calling the memory_import_cowork
|
|
280
|
+
MCP tool with no arguments. Report a one-line digest of saved chunks
|
|
281
|
+
vs total sessions.
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
This runs while the Claude app is open; if it's closed when the task is
|
|
285
|
+
due, it fires on next launch.
|
|
286
|
+
|
|
165
287
|
## Use it in your apps (Python)
|
|
166
288
|
|
|
167
289
|
```bash
|
package/dashboard/index.html
CHANGED
|
@@ -349,6 +349,7 @@
|
|
|
349
349
|
<span class="scope" id="scope">all namespaces</span>
|
|
350
350
|
<button class="btn" id="import-btn">Import…</button>
|
|
351
351
|
<input type="file" id="import-file" accept=".json" style="display:none" />
|
|
352
|
+
<button class="btn" id="import-cowork-btn" title="Import every Claude Cowork (local-agent-mode) chat from this machine">Import Cowork</button>
|
|
352
353
|
</div>
|
|
353
354
|
|
|
354
355
|
<div class="list-body" id="list">
|
|
@@ -726,6 +727,42 @@
|
|
|
726
727
|
}
|
|
727
728
|
|
|
728
729
|
// ─── import ───────────────────────────────────────────────────────────
|
|
730
|
+
async function importCowork() {
|
|
731
|
+
try {
|
|
732
|
+
toast('Probing for Cowork sessions…');
|
|
733
|
+
const probe = await api('/api/import/claude-cowork');
|
|
734
|
+
if (!probe || !probe.found || (probe.sessions ?? []).length === 0) {
|
|
735
|
+
const where = (probe?.scanned_roots ?? []).length
|
|
736
|
+
? `Scanned ${probe.scanned_roots.length} root(s) but found no transcripts.`
|
|
737
|
+
: 'No Cowork install detected on this machine.';
|
|
738
|
+
toast(where + ' Try running Cowork once first.', 'err');
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
const n = probe.sessions.length;
|
|
742
|
+
const totalMsgs = probe.sessions.reduce((a, s) => a + (s.message_count ?? 0), 0);
|
|
743
|
+
const ok = window.confirm(
|
|
744
|
+
`Import ${n} Cowork session${n === 1 ? '' : 's'} (${totalMsgs.toLocaleString()} messages) ` +
|
|
745
|
+
`into the "claude-cowork" namespace?\n\nIdempotent — safe to re-run.`,
|
|
746
|
+
);
|
|
747
|
+
if (!ok) return;
|
|
748
|
+
toast(`Importing ${n} session${n === 1 ? '' : 's'}…`);
|
|
749
|
+
const res = await api('/api/import/claude-cowork', {
|
|
750
|
+
method: 'POST',
|
|
751
|
+
headers: { 'Content-Type': 'application/json' },
|
|
752
|
+
body: JSON.stringify({ namespace: 'claude-cowork' }),
|
|
753
|
+
});
|
|
754
|
+
const saved = res.saved ?? 0;
|
|
755
|
+
const errs = res.errors ?? 0;
|
|
756
|
+
toast(
|
|
757
|
+
`Imported ${saved} memory chunk${saved === 1 ? '' : 's'} from ${res.parsed ?? n} session(s)` +
|
|
758
|
+
(errs ? ` — ${errs} error${errs === 1 ? '' : 's'}` : '') +
|
|
759
|
+
` (namespace "${res.namespace}").`,
|
|
760
|
+
errs ? 'err' : 'ok',
|
|
761
|
+
);
|
|
762
|
+
await Promise.all([loadList(), loadNamespaces(), loadStats()]);
|
|
763
|
+
} catch (e) { toast('cowork import failed: ' + e.message, 'err'); }
|
|
764
|
+
}
|
|
765
|
+
|
|
729
766
|
async function importFile(file) {
|
|
730
767
|
try {
|
|
731
768
|
const text = await file.text();
|
|
@@ -768,6 +805,7 @@
|
|
|
768
805
|
if (f) importFile(f);
|
|
769
806
|
e.target.value = '';
|
|
770
807
|
});
|
|
808
|
+
document.getElementById('import-cowork-btn').addEventListener('click', importCowork);
|
|
771
809
|
|
|
772
810
|
// Drag-drop import
|
|
773
811
|
const drop = document.getElementById('drop');
|