meshcode 2.5.0__tar.gz → 2.5.2__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.
Files changed (31) hide show
  1. {meshcode-2.5.0 → meshcode-2.5.2}/PKG-INFO +1 -1
  2. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/__init__.py +1 -1
  3. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/server.py +29 -0
  4. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/PKG-INFO +1 -1
  5. {meshcode-2.5.0 → meshcode-2.5.2}/pyproject.toml +1 -1
  6. {meshcode-2.5.0 → meshcode-2.5.2}/README.md +0 -0
  7. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/cli.py +0 -0
  8. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/comms_v4.py +0 -0
  9. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/invites.py +0 -0
  10. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/launcher.py +0 -0
  11. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/launcher_install.py +0 -0
  12. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/__init__.py +0 -0
  13. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/__main__.py +0 -0
  14. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/backend.py +0 -0
  15. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/realtime.py +0 -0
  16. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/test_backend.py +0 -0
  17. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  18. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
  19. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/preferences.py +0 -0
  20. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/protocol_v2.py +0 -0
  21. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/run_agent.py +0 -0
  22. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/secrets.py +0 -0
  23. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/self_update.py +0 -0
  24. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode/setup_clients.py +0 -0
  25. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/SOURCES.txt +0 -0
  26. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/dependency_links.txt +0 -0
  27. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/entry_points.txt +0 -0
  28. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/requires.txt +0 -0
  29. {meshcode-2.5.0 → meshcode-2.5.2}/meshcode.egg-info/top_level.txt +0 -0
  30. {meshcode-2.5.0 → meshcode-2.5.2}/setup.cfg +0 -0
  31. {meshcode-2.5.0 → meshcode-2.5.2}/tests/test_status_enum_coverage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Real-time communication between AI agents — Supabase-backed CLI
5
5
  Author-email: MeshCode <hello@meshcode.io>
6
6
  License: MIT
@@ -1,2 +1,2 @@
1
1
  """MeshCode — Real-time communication between AI agents."""
2
- __version__ = "2.4.8"
2
+ __version__ = "2.5.2"
@@ -452,6 +452,27 @@ def _working_to_online() -> None:
452
452
  _set_state("online", "")
453
453
 
454
454
 
455
+ def _auto_learn_error(tool_name: str, error: Exception, args_keys: list) -> None:
456
+ """Auto-save failed tool calls to agent memory for self-improvement."""
457
+ try:
458
+ import datetime as _dt
459
+ key = f"error_{tool_name}_{_dt.date.today().isoformat()}"
460
+ be.sb_rpc("mc_memory_set", {
461
+ "p_api_key": _get_api_key(),
462
+ "p_project_id": _PROJECT_ID,
463
+ "p_agent_name": AGENT_NAME,
464
+ "p_key": key,
465
+ "p_value": {
466
+ "tool": tool_name,
467
+ "error": str(error)[:200],
468
+ "args_keys": args_keys,
469
+ "timestamp": _dt.datetime.utcnow().isoformat(),
470
+ },
471
+ })
472
+ except Exception:
473
+ pass # Never let error-learning itself cause failures
474
+
475
+
455
476
  def with_working_status(func):
456
477
  name = func.__name__
457
478
  skip = (name == "meshcode_wait")
@@ -465,6 +486,10 @@ def with_working_status(func):
465
486
  _record_event_bg("tool_call", {"tool": name, "args_keys": list(kwargs.keys())})
466
487
  try:
467
488
  return await func(*args, **kwargs)
489
+ except Exception as e:
490
+ if not skip:
491
+ _auto_learn_error(name, e, list(kwargs.keys()))
492
+ raise
468
493
  finally:
469
494
  if not skip:
470
495
  global _last_tool_at
@@ -482,6 +507,10 @@ def with_working_status(func):
482
507
  _record_event_bg("tool_call", {"tool": name, "args_keys": list(kwargs.keys())})
483
508
  try:
484
509
  return func(*args, **kwargs)
510
+ except Exception as e:
511
+ if not skip:
512
+ _auto_learn_error(name, e, list(kwargs.keys()))
513
+ raise
485
514
  finally:
486
515
  if not skip:
487
516
  global _last_tool_at
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Real-time communication between AI agents — Supabase-backed CLI
5
5
  Author-email: MeshCode <hello@meshcode.io>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "meshcode"
7
- version = "2.5.0"
7
+ version = "2.5.2"
8
8
  description = "Real-time communication between AI agents — Supabase-backed CLI"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes