mem0-open-mcp 0.1.7__tar.gz → 0.1.8__tar.gz
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.7 → mem0_open_mcp-0.1.8}/PKG-INFO +1 -1
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/pyproject.toml +1 -1
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/cli.py +48 -14
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/.env.example +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/.github/workflows/publish.yml +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/.gitignore +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/Dockerfile +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/README.md +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/docker-compose.yaml +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/examples/ollama-config.yaml +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/mem0-open-mcp.example.yaml +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/__init__.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/api/__init__.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/api/routes.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/config/__init__.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/config/loader.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/config/schema.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/mcp/__init__.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/mcp/server.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/server.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/src/mem0_server/utils/__init__.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/tests/test_api.py +0 -0
- {mem0_open_mcp-0.1.7 → mem0_open_mcp-0.1.8}/tests/test_config.py +0 -0
|
@@ -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=" ")
|
|
@@ -227,17 +230,23 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
227
230
|
else:
|
|
228
231
|
console.print("[green]✓ Added[/green]")
|
|
229
232
|
|
|
230
|
-
# 2. List memories
|
|
233
|
+
# 2. List memories (with retry)
|
|
231
234
|
console.print(" [dim]2. Listing memories...[/dim]", end=" ")
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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:
|
|
235
247
|
console.print(f"[green]✓ Found {stored_count} memory(s)[/green]")
|
|
236
|
-
# Get memory_id from list if not captured from add
|
|
237
|
-
if not memory_id and stored_count > 0:
|
|
238
|
-
memory_id = list_result["results"][0].get("id")
|
|
239
248
|
else:
|
|
240
|
-
console.print("[red]✗ Memory not stored[/red]")
|
|
249
|
+
console.print(f"[red]✗ Memory not stored (waited 10s)[/red]")
|
|
241
250
|
return False
|
|
242
251
|
|
|
243
252
|
# 3. Search memories
|
|
@@ -248,21 +257,46 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
248
257
|
else:
|
|
249
258
|
console.print("[yellow]⚠ No search results (indexing may be delayed)[/yellow]")
|
|
250
259
|
|
|
251
|
-
# 4. Delete single memory
|
|
260
|
+
# 4. Delete single memory (with retry verification)
|
|
252
261
|
console.print(" [dim]4. Deleting single memory...[/dim]", end=" ")
|
|
253
262
|
if memory_id:
|
|
254
|
-
|
|
255
|
-
|
|
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:
|
|
256
276
|
console.print(f"[green]✓ Deleted (id: {memory_id[:8]}...)[/green]")
|
|
257
277
|
else:
|
|
258
|
-
console.print("[
|
|
278
|
+
console.print("[yellow]⚠ Delete called but not confirmed after 10s[/yellow]")
|
|
259
279
|
else:
|
|
260
280
|
console.print("[yellow]⚠ Skipped (no memory_id)[/yellow]")
|
|
261
281
|
|
|
262
|
-
# 5. Cleanup remaining test data
|
|
282
|
+
# 5. Cleanup remaining test data (with retry verification)
|
|
263
283
|
console.print(" [dim]5. Cleaning up test data...[/dim]", end=" ")
|
|
264
284
|
memory.delete_all(user_id=test_user_id)
|
|
265
|
-
|
|
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]")
|
|
266
300
|
|
|
267
301
|
console.print()
|
|
268
302
|
console.print("[bold green]All memory tests passed![/bold green]\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|