meshcode 2.2.1__tar.gz → 2.3.0__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 (30) hide show
  1. {meshcode-2.2.1 → meshcode-2.3.0}/PKG-INFO +1 -1
  2. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/__init__.py +1 -1
  3. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/server.py +10 -5
  4. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/PKG-INFO +1 -1
  5. {meshcode-2.2.1 → meshcode-2.3.0}/pyproject.toml +1 -1
  6. {meshcode-2.2.1 → meshcode-2.3.0}/README.md +0 -0
  7. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/cli.py +0 -0
  8. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/comms_v4.py +0 -0
  9. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/invites.py +0 -0
  10. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/launcher.py +0 -0
  11. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/launcher_install.py +0 -0
  12. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/__init__.py +0 -0
  13. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/__main__.py +0 -0
  14. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/backend.py +0 -0
  15. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/realtime.py +0 -0
  16. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/test_backend.py +0 -0
  17. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  18. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
  19. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/preferences.py +0 -0
  20. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/protocol_v2.py +0 -0
  21. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/run_agent.py +0 -0
  22. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/secrets.py +0 -0
  23. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/self_update.py +0 -0
  24. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode/setup_clients.py +0 -0
  25. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/SOURCES.txt +0 -0
  26. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/dependency_links.txt +0 -0
  27. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/entry_points.txt +0 -0
  28. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/requires.txt +0 -0
  29. {meshcode-2.2.1 → meshcode-2.3.0}/meshcode.egg-info/top_level.txt +0 -0
  30. {meshcode-2.2.1 → meshcode-2.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.2.1
3
+ Version: 2.3.0
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.2.1"
2
+ __version__ = "2.3.0"
@@ -732,8 +732,10 @@ def _heartbeat_thread_fn():
732
732
  parent_cpu = _get_parent_cpu()
733
733
  idle_secs = _time.time() - _last_tool_at
734
734
 
735
- if _current_state == "waiting":
736
- pass # In meshcode_wait loopNEVER override. Agent is listening.
735
+ if _IN_WAIT:
736
+ # Actually in meshcode_wait right now listening for messages
737
+ if _current_state != "waiting":
738
+ _set_state("waiting", "listening for messages")
737
739
  elif parent_cpu > 5.0:
738
740
  # LLM is actively generating tokens
739
741
  if _current_state != "working":
@@ -741,7 +743,7 @@ def _heartbeat_thread_fn():
741
743
  elif _current_state == "working":
742
744
  # LLM just stopped — brief online before sleeping
743
745
  _set_state("online", "")
744
- elif _current_state in ("online", "idle") and idle_secs > 30:
746
+ elif _current_state in ("online", "idle") and idle_secs > 10:
745
747
  # Not in loop, not thinking → sleeping
746
748
  _set_state("sleeping", "sleeping")
747
749
 
@@ -1058,6 +1060,8 @@ def meshcode_done(reason: str) -> Dict[str, Any]:
1058
1060
  except Exception as e:
1059
1061
  log.warning(f"meshcode_done: failed to notify {name}: {e}")
1060
1062
  log.info(f"global done broadcast from {AGENT_NAME}: reason={reason!r} notified={sent}")
1063
+ # Immediately set sleeping — we're done, not listening anymore
1064
+ _set_state("sleeping", "sleeping")
1061
1065
  return {"ok": True, "global_done": True, "agents_notified": sent, "reason": reason}
1062
1066
 
1063
1067
 
@@ -1383,6 +1387,7 @@ def meshcode_scratchpad_set(key: str, value: Any) -> Dict[str, Any]:
1383
1387
  "p_api_key": api_key,
1384
1388
  "p_key": key,
1385
1389
  "p_value": json_value,
1390
+ "p_project_name": PROJECT_NAME,
1386
1391
  })
1387
1392
 
1388
1393
 
@@ -1396,9 +1401,9 @@ def meshcode_scratchpad_get(key: Optional[str] = None) -> Dict[str, Any]:
1396
1401
  """
1397
1402
  api_key = _get_api_key()
1398
1403
  if key:
1399
- return be.sb_rpc("mc_scratchpad_get", {"p_api_key": api_key, "p_key": key})
1404
+ return be.sb_rpc("mc_scratchpad_get", {"p_api_key": api_key, "p_key": key, "p_project_name": PROJECT_NAME})
1400
1405
  else:
1401
- return be.sb_rpc("mc_scratchpad_list", {"p_api_key": api_key})
1406
+ return be.sb_rpc("mc_scratchpad_list", {"p_api_key": api_key, "p_project_name": PROJECT_NAME})
1402
1407
 
1403
1408
 
1404
1409
  # ----------------- OBSIDIAN SYNC HELPER -----------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.2.1
3
+ Version: 2.3.0
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.2.1"
7
+ version = "2.3.0"
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