meshcode 2.4.4__tar.gz → 2.4.5__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.4.4 → meshcode-2.4.5}/PKG-INFO +1 -1
  2. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/__init__.py +1 -1
  3. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/server.py +20 -2
  4. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/PKG-INFO +1 -1
  5. {meshcode-2.4.4 → meshcode-2.4.5}/pyproject.toml +1 -1
  6. {meshcode-2.4.4 → meshcode-2.4.5}/README.md +0 -0
  7. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/cli.py +0 -0
  8. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/comms_v4.py +0 -0
  9. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/invites.py +0 -0
  10. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/launcher.py +0 -0
  11. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/launcher_install.py +0 -0
  12. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/__init__.py +0 -0
  13. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/__main__.py +0 -0
  14. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/backend.py +0 -0
  15. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/realtime.py +0 -0
  16. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/test_backend.py +0 -0
  17. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  18. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
  19. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/preferences.py +0 -0
  20. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/protocol_v2.py +0 -0
  21. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/run_agent.py +0 -0
  22. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/secrets.py +0 -0
  23. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/self_update.py +0 -0
  24. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode/setup_clients.py +0 -0
  25. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/SOURCES.txt +0 -0
  26. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/dependency_links.txt +0 -0
  27. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/entry_points.txt +0 -0
  28. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/requires.txt +0 -0
  29. {meshcode-2.4.4 → meshcode-2.4.5}/meshcode.egg-info/top_level.txt +0 -0
  30. {meshcode-2.4.4 → meshcode-2.4.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.4.4
3
+ Version: 2.4.5
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.4"
2
+ __version__ = "2.4.5"
@@ -37,14 +37,32 @@ _AUTO_WAKE = os.environ.get("MESHCODE_AUTO_WAKE", "1").lower() not in ("0", "fal
37
37
 
38
38
 
39
39
  def _try_auto_wake(from_agent: str, preview: str) -> None:
40
- """Inject a nudge into the terminal if the agent is idle (not in wait).
40
+ """Inject a nudge into the terminal ONLY when agent is truly sleeping.
41
41
 
42
42
  macOS: AppleScript → keystroke into Terminal/iTerm2
43
43
  Windows: PowerShell SendKeys to the console window
44
44
  Linux: xdotool (best-effort)
45
+
46
+ Conditions to fire (ALL must be true):
47
+ - _AUTO_WAKE is enabled
48
+ - NOT in meshcode_wait (wait loop already handles delivery)
49
+ - _current_state is 'sleeping' (truly idle, not working, not just online)
50
+ - LLM CPU is low (not actively generating)
51
+ Otherwise the keystroke would interrupt the user's typing or
52
+ the LLM mid-thought.
45
53
  """
46
- if _IN_WAIT or not _AUTO_WAKE:
54
+ if not _AUTO_WAKE or _IN_WAIT:
55
+ return
56
+ # Only fire when agent is actually sleeping — never when working or online
57
+ # (working = LLM generating; online = brief post-tool window; both would be interrupted)
58
+ if _current_state != 'sleeping':
47
59
  return
60
+ # Belt-and-suspenders: also check parent CPU is low (LLM not generating right now)
61
+ try:
62
+ if _get_parent_cpu() > 5.0:
63
+ return # LLM is actively generating, don't interrupt
64
+ except Exception:
65
+ pass
48
66
  import subprocess, platform, re
49
67
  # Sanitize inputs: strip everything except alphanumeric, spaces, basic punctuation
50
68
  safe_agent = re.sub(r'[^a-zA-Z0-9_\- ]', '', from_agent)[:50]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.4.4
3
+ Version: 2.4.5
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.4.4"
7
+ version = "2.4.5"
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