meshcode 2.10.73__tar.gz → 2.10.75__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 (49) hide show
  1. {meshcode-2.10.73 → meshcode-2.10.75}/PKG-INFO +1 -1
  2. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/__init__.py +1 -1
  3. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/backend.py +28 -1
  4. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/server.py +22 -0
  5. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/PKG-INFO +1 -1
  6. {meshcode-2.10.73 → meshcode-2.10.75}/pyproject.toml +1 -1
  7. {meshcode-2.10.73 → meshcode-2.10.75}/README.md +0 -0
  8. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/ascii_art.py +0 -0
  9. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/cli.py +0 -0
  10. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/comms_v4.py +0 -0
  11. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/compat.py +0 -0
  12. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/error_hints.py +0 -0
  13. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/exceptions.py +0 -0
  14. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/invites.py +0 -0
  15. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/launcher.py +0 -0
  16. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/launcher_install.py +0 -0
  17. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/__init__.py +0 -0
  18. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/__main__.py +0 -0
  19. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/realtime.py +0 -0
  20. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/test_backend.py +0 -0
  21. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  22. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
  23. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/preferences.py +0 -0
  24. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/protocol_v2.py +0 -0
  25. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/quickstart.py +0 -0
  26. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/run_agent.py +0 -0
  27. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/secrets.py +0 -0
  28. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/self_update.py +0 -0
  29. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/setup_clients.py +0 -0
  30. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/supervisor.py +0 -0
  31. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode/upload.py +0 -0
  32. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/SOURCES.txt +0 -0
  33. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/dependency_links.txt +0 -0
  34. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/entry_points.txt +0 -0
  35. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/requires.txt +0 -0
  36. {meshcode-2.10.73 → meshcode-2.10.75}/meshcode.egg-info/top_level.txt +0 -0
  37. {meshcode-2.10.73 → meshcode-2.10.75}/setup.cfg +0 -0
  38. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_core.py +0 -0
  39. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_cross_agent_messaging.py +0 -0
  40. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_esc_deaf_state.py +0 -0
  41. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_exceptions.py +0 -0
  42. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_mark_read_batch.py +0 -0
  43. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_migration_integrity.py +0 -0
  44. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_realtime_event_freshness.py +0 -0
  45. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_rls_cross_tenant.py +0 -0
  46. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_rpc_migrations.py +0 -0
  47. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_security_regressions.py +0 -0
  48. {meshcode-2.10.73 → meshcode-2.10.75}/tests/test_sentinel.py +0 -0
  49. {meshcode-2.10.73 → meshcode-2.10.75}/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.10.73
3
+ Version: 2.10.75
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,5 +1,5 @@
1
1
  """MeshCode — Real-time communication between AI agents."""
2
- __version__ = "2.10.73"
2
+ __version__ = "2.10.75"
3
3
 
4
4
  # Exception hierarchy — eagerly imported (lightweight, no deps)
5
5
  from meshcode.exceptions import ( # noqa: F401
@@ -1092,14 +1092,41 @@ def task_create(api_key, project_id, creator_agent, title, description="", assig
1092
1092
  })
1093
1093
 
1094
1094
 
1095
+ # Client-side debounce for task_list to neutralize runaway pollers without a
1096
+ # server round-trip. Pairs with the planned DB-side rate limit
1097
+ # (migration_task_list_rate_limit_DRAFT.sql). Two windows:
1098
+ # * MIN_INTERVAL: hard floor between identical calls. Within this window we
1099
+ # return the prior result without hitting the network.
1100
+ # * SOFT_TTL: returned-payload reuse window. After MIN_INTERVAL elapses, we
1101
+ # refresh from the network and overwrite the cache.
1102
+ # Cache key includes status_filter + include_done so different views don't
1103
+ # poison each other.
1104
+ _TASK_LIST_CACHE: Dict[tuple, tuple] = {}
1105
+ _TASK_LIST_CACHE_LOCK = _threading.Lock()
1106
+ _TASK_LIST_MIN_INTERVAL = 0.5 # seconds; >= 2/sec is throttled
1107
+ _TASK_LIST_CACHE_MAX = 64
1108
+
1109
+
1095
1110
  def task_list(api_key, project_id, agent, status_filter=None, include_done=False):
1096
- return sb_rpc("mc_task_list", {
1111
+ cache_key = (project_id, agent, status_filter, bool(include_done))
1112
+ now = _time.time()
1113
+ with _TASK_LIST_CACHE_LOCK:
1114
+ cached = _TASK_LIST_CACHE.get(cache_key)
1115
+ if cached and (now - cached[1]) < _TASK_LIST_MIN_INTERVAL:
1116
+ return cached[0]
1117
+ result = sb_rpc("mc_task_list", {
1097
1118
  "p_api_key": api_key,
1098
1119
  "p_project_id": project_id,
1099
1120
  "p_agent": agent,
1100
1121
  "p_status_filter": status_filter,
1101
1122
  "p_include_done": include_done,
1102
1123
  })
1124
+ with _TASK_LIST_CACHE_LOCK:
1125
+ if len(_TASK_LIST_CACHE) >= _TASK_LIST_CACHE_MAX:
1126
+ oldest_key = min(_TASK_LIST_CACHE, key=lambda k: _TASK_LIST_CACHE[k][1])
1127
+ _TASK_LIST_CACHE.pop(oldest_key, None)
1128
+ _TASK_LIST_CACHE[cache_key] = (result, now)
1129
+ return result
1103
1130
 
1104
1131
 
1105
1132
  def task_claim(api_key, project_id, task_id, claiming_agent):
@@ -3698,6 +3698,28 @@ def meshcode_health() -> Dict[str, Any]:
3698
3698
  except Exception:
3699
3699
  pass # mc_system_health may not be deployed yet
3700
3700
 
3701
+ # Installed-vs-PyPI version diagnostic. Running MCP servers cannot hot-reload
3702
+ # server.py edits — fixes shipped to PyPI need a Claude Code restart to take
3703
+ # effect. Surface the gap so users know to restart.
3704
+ try:
3705
+ import urllib.request as _vreq
3706
+ import json as _vjson
3707
+ with _vreq.urlopen("https://pypi.org/pypi/meshcode/json", timeout=3) as _vr:
3708
+ _latest = _vjson.loads(_vr.read()).get("info", {}).get("version")
3709
+ health["pypi"] = {
3710
+ "installed": _SDK_VERSION,
3711
+ "latest": _latest,
3712
+ "stale": _latest != _SDK_VERSION if _latest else None,
3713
+ }
3714
+ if _latest and _latest != _SDK_VERSION:
3715
+ health["pypi"]["recommendation"] = (
3716
+ f"Restart Claude Code to upgrade MeshCode {_SDK_VERSION} → {_latest}. "
3717
+ "Server.py-side fixes (sends, downloads, normalization) will not "
3718
+ "take effect until restart."
3719
+ )
3720
+ except Exception as _e:
3721
+ health["pypi"] = {"installed": _SDK_VERSION, "latest": None, "error": str(_e)[:120]}
3722
+
3701
3723
  return health
3702
3724
 
3703
3725
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.10.73
3
+ Version: 2.10.75
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.10.73"
7
+ version = "2.10.75"
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