mem0-open-mcp 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl
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.
- {mem0_open_mcp-0.1.6.dist-info → mem0_open_mcp-0.1.8.dist-info}/METADATA +1 -1
- {mem0_open_mcp-0.1.6.dist-info → mem0_open_mcp-0.1.8.dist-info}/RECORD +5 -5
- mem0_server/cli.py +67 -5
- {mem0_open_mcp-0.1.6.dist-info → mem0_open_mcp-0.1.8.dist-info}/WHEEL +0 -0
- {mem0_open_mcp-0.1.6.dist-info → mem0_open_mcp-0.1.8.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
mem0_server/__init__.py,sha256=FrcCqmcA_VSR57xjgdQ1obSrsSzxDsDsXdEGSdVhUq0,379
|
|
2
|
-
mem0_server/cli.py,sha256=
|
|
2
|
+
mem0_server/cli.py,sha256=JQViA0ZBCZLGzEuV9qXlJgdeApGMmQWRgWiY1doFUlA,28970
|
|
3
3
|
mem0_server/server.py,sha256=Obc2eZaAYuZdUgYpOY8qWwbOXgc3w1vRmmEF3tc0gdI,12494
|
|
4
4
|
mem0_server/api/__init__.py,sha256=JOOnrq3v7yym3xotMkOUAoZj1zjhI8C_a1wEdbpCakQ,122
|
|
5
5
|
mem0_server/api/routes.py,sha256=fBOeQ1kckEa9Nr57cutCunhG9D1J5zYrv9sFiYcZ1yQ,21743
|
|
@@ -9,7 +9,7 @@ mem0_server/config/schema.py,sha256=HnFWUR4KxwHkyukFw_ptMCHt7K26Zl7AU02-5jdtjL4,
|
|
|
9
9
|
mem0_server/mcp/__init__.py,sha256=8BWWjlJj5_jdeUuQFN4i5hm5Zd3Pk0cCR2Vf0G4eUB4,127
|
|
10
10
|
mem0_server/mcp/server.py,sha256=Y_f8upEtvjr0JjZaUQ4YWLRrof9btR2ds8FL2DucCZI,184
|
|
11
11
|
mem0_server/utils/__init__.py,sha256=GvVR3Tz4OmU2gRGCbTyQg5Xip5cAx7KW6ToIh2sKA4w,41
|
|
12
|
-
mem0_open_mcp-0.1.
|
|
13
|
-
mem0_open_mcp-0.1.
|
|
14
|
-
mem0_open_mcp-0.1.
|
|
15
|
-
mem0_open_mcp-0.1.
|
|
12
|
+
mem0_open_mcp-0.1.8.dist-info/METADATA,sha256=Yt9jHUkYgOn3ivUZIq6d8Edtwn5Q3KgHPbURKSR_1Ko,4908
|
|
13
|
+
mem0_open_mcp-0.1.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
14
|
+
mem0_open_mcp-0.1.8.dist-info/entry_points.txt,sha256=WXqVdvwhFvMkzAmNtdlHlRZV23yikM43BtB8S4F9ByE,54
|
|
15
|
+
mem0_open_mcp-0.1.8.dist-info/RECORD,,
|
mem0_server/cli.py
CHANGED
|
@@ -199,11 +199,14 @@ def _run_connectivity_tests(config: Mem0ServerConfig) -> bool:
|
|
|
199
199
|
def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
200
200
|
"""Run actual mem0 memory add/search tests."""
|
|
201
201
|
import os
|
|
202
|
+
import time
|
|
202
203
|
import uuid
|
|
203
204
|
console.print("[bold]Running memory tests...[/bold]\n")
|
|
204
205
|
|
|
205
206
|
test_user_id = f"__test_user_{uuid.uuid4().hex[:8]}"
|
|
206
207
|
test_memory_text = "This is a test memory for connectivity verification."
|
|
208
|
+
max_retries = 20
|
|
209
|
+
retry_interval = 0.5
|
|
207
210
|
|
|
208
211
|
try:
|
|
209
212
|
console.print(" [dim]Initializing mem0 client...[/dim]", end=" ")
|
|
@@ -213,8 +216,10 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
213
216
|
memory = Memory.from_config(mem0_config)
|
|
214
217
|
console.print("[green]✓[/green]")
|
|
215
218
|
|
|
216
|
-
|
|
219
|
+
# 1. Add memory
|
|
220
|
+
console.print(" [dim]1. Adding test memory...[/dim]", end=" ")
|
|
217
221
|
add_result = memory.add(test_memory_text, user_id=test_user_id)
|
|
222
|
+
memory_id = None
|
|
218
223
|
if add_result and add_result.get("results"):
|
|
219
224
|
first_result = add_result["results"][0]
|
|
220
225
|
memory_id = first_result.get("id") if first_result else None
|
|
@@ -225,16 +230,73 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
225
230
|
else:
|
|
226
231
|
console.print("[green]✓ Added[/green]")
|
|
227
232
|
|
|
228
|
-
|
|
233
|
+
# 2. List memories (with retry)
|
|
234
|
+
console.print(" [dim]2. Listing memories...[/dim]", end=" ")
|
|
235
|
+
stored_count = 0
|
|
236
|
+
for attempt in range(max_retries):
|
|
237
|
+
list_result = memory.get_all(user_id=test_user_id)
|
|
238
|
+
if list_result and list_result.get("results"):
|
|
239
|
+
stored_count = len(list_result["results"])
|
|
240
|
+
if not memory_id and stored_count > 0:
|
|
241
|
+
memory_id = list_result["results"][0].get("id")
|
|
242
|
+
break
|
|
243
|
+
if attempt < max_retries - 1:
|
|
244
|
+
time.sleep(retry_interval)
|
|
245
|
+
|
|
246
|
+
if stored_count > 0:
|
|
247
|
+
console.print(f"[green]✓ Found {stored_count} memory(s)[/green]")
|
|
248
|
+
else:
|
|
249
|
+
console.print(f"[red]✗ Memory not stored (waited 10s)[/red]")
|
|
250
|
+
return False
|
|
251
|
+
|
|
252
|
+
# 3. Search memories
|
|
253
|
+
console.print(" [dim]3. Searching memories...[/dim]", end=" ")
|
|
229
254
|
search_result = memory.search("test memory verification", user_id=test_user_id, limit=5)
|
|
230
255
|
if search_result and search_result.get("results"):
|
|
231
256
|
console.print(f"[green]✓ Found {len(search_result['results'])} result(s)[/green]")
|
|
232
257
|
else:
|
|
233
|
-
console.print("[yellow]⚠ No results (may be
|
|
258
|
+
console.print("[yellow]⚠ No search results (indexing may be delayed)[/yellow]")
|
|
259
|
+
|
|
260
|
+
# 4. Delete single memory (with retry verification)
|
|
261
|
+
console.print(" [dim]4. Deleting single memory...[/dim]", end=" ")
|
|
262
|
+
if memory_id:
|
|
263
|
+
memory.delete(memory_id)
|
|
264
|
+
# Verify deletion
|
|
265
|
+
deleted = False
|
|
266
|
+
for attempt in range(max_retries):
|
|
267
|
+
list_result = memory.get_all(user_id=test_user_id)
|
|
268
|
+
results = list_result.get("results", []) if list_result else []
|
|
269
|
+
if not any(m.get("id") == memory_id for m in results):
|
|
270
|
+
deleted = True
|
|
271
|
+
break
|
|
272
|
+
if attempt < max_retries - 1:
|
|
273
|
+
time.sleep(retry_interval)
|
|
274
|
+
|
|
275
|
+
if deleted:
|
|
276
|
+
console.print(f"[green]✓ Deleted (id: {memory_id[:8]}...)[/green]")
|
|
277
|
+
else:
|
|
278
|
+
console.print("[yellow]⚠ Delete called but not confirmed after 10s[/yellow]")
|
|
279
|
+
else:
|
|
280
|
+
console.print("[yellow]⚠ Skipped (no memory_id)[/yellow]")
|
|
234
281
|
|
|
235
|
-
|
|
282
|
+
# 5. Cleanup remaining test data (with retry verification)
|
|
283
|
+
console.print(" [dim]5. Cleaning up test data...[/dim]", end=" ")
|
|
236
284
|
memory.delete_all(user_id=test_user_id)
|
|
237
|
-
|
|
285
|
+
# Verify cleanup
|
|
286
|
+
cleaned = False
|
|
287
|
+
for attempt in range(max_retries):
|
|
288
|
+
list_result = memory.get_all(user_id=test_user_id)
|
|
289
|
+
results = list_result.get("results", []) if list_result else []
|
|
290
|
+
if len(results) == 0:
|
|
291
|
+
cleaned = True
|
|
292
|
+
break
|
|
293
|
+
if attempt < max_retries - 1:
|
|
294
|
+
time.sleep(retry_interval)
|
|
295
|
+
|
|
296
|
+
if cleaned:
|
|
297
|
+
console.print("[green]✓ Cleaned[/green]")
|
|
298
|
+
else:
|
|
299
|
+
console.print(f"[yellow]⚠ Cleanup called but not confirmed after {max_retries}s[/yellow]")
|
|
238
300
|
|
|
239
301
|
console.print()
|
|
240
302
|
console.print("[bold green]All memory tests passed![/bold green]\n")
|
|
File without changes
|
|
File without changes
|