meshcode 2.10.20__tar.gz → 2.10.21__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.
- {meshcode-2.10.20 → meshcode-2.10.21}/PKG-INFO +1 -1
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/__init__.py +1 -1
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/server.py +15 -26
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/PKG-INFO +1 -1
- {meshcode-2.10.20 → meshcode-2.10.21}/pyproject.toml +1 -1
- {meshcode-2.10.20 → meshcode-2.10.21}/README.md +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/ascii_art.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/cli.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/comms_v4.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/invites.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/launcher.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/launcher_install.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/__init__.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/__main__.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/backend.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/realtime.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/test_backend.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/test_realtime.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/preferences.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/protocol_v2.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/run_agent.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/secrets.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/self_update.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode/setup_clients.py +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/SOURCES.txt +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/dependency_links.txt +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/entry_points.txt +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/requires.txt +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/meshcode.egg-info/top_level.txt +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/setup.cfg +0 -0
- {meshcode-2.10.20 → meshcode-2.10.21}/tests/test_status_enum_coverage.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""MeshCode — Real-time communication between AI agents."""
|
|
2
|
-
__version__ = "2.10.
|
|
2
|
+
__version__ = "2.10.21"
|
|
@@ -516,17 +516,16 @@ def _schedule_flip(status: str, task: str = "") -> None:
|
|
|
516
516
|
|
|
517
517
|
|
|
518
518
|
def _set_state(state: str, tool: str = "") -> None:
|
|
519
|
-
"""Update the state machine and broadcast to dashboard.
|
|
519
|
+
"""Update the state machine and broadcast to dashboard."""
|
|
520
520
|
global _current_state, _current_tool, _last_tool_at, _working_timer
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
_last_tool_at = _time.time()
|
|
521
|
+
# Cancel any pending working→online timer
|
|
522
|
+
if _working_timer is not None:
|
|
523
|
+
_working_timer.cancel()
|
|
524
|
+
_working_timer = None
|
|
525
|
+
_current_state = state
|
|
526
|
+
_current_tool = tool
|
|
527
|
+
if state == "working":
|
|
528
|
+
_last_tool_at = _time.time()
|
|
530
529
|
_schedule_flip(state, tool)
|
|
531
530
|
|
|
532
531
|
|
|
@@ -574,16 +573,10 @@ def with_working_status(func):
|
|
|
574
573
|
_record_event_bg("tool_call", {"tool": name, "args_keys": list(kwargs.keys())})
|
|
575
574
|
try:
|
|
576
575
|
return await func(*args, **kwargs)
|
|
577
|
-
except asyncio.CancelledError:
|
|
578
|
-
# Let CancelledError propagate — FastMCP handles it correctly.
|
|
579
|
-
raise
|
|
580
576
|
except Exception as e:
|
|
581
577
|
if not skip:
|
|
582
578
|
_auto_learn_error(name, e, list(kwargs.keys()))
|
|
583
|
-
|
|
584
|
-
import traceback as _tb
|
|
585
|
-
_log_crash_to_db("tool_exception", f"{name}: {type(e).__name__}: {e}\n{_tb.format_exc()[-500:]}")
|
|
586
|
-
return {"error": f"tool {name} failed: {type(e).__name__}: {e}", "_recovered": True}
|
|
579
|
+
raise
|
|
587
580
|
finally:
|
|
588
581
|
if not skip:
|
|
589
582
|
global _last_tool_at
|
|
@@ -604,10 +597,7 @@ def with_working_status(func):
|
|
|
604
597
|
except Exception as e:
|
|
605
598
|
if not skip:
|
|
606
599
|
_auto_learn_error(name, e, list(kwargs.keys()))
|
|
607
|
-
|
|
608
|
-
import traceback as _tb
|
|
609
|
-
_log_crash_to_db("tool_exception", f"{name}: {type(e).__name__}: {e}\n{_tb.format_exc()[-500:]}")
|
|
610
|
-
return {"error": f"tool {name} failed: {type(e).__name__}: {e}", "_recovered": True}
|
|
600
|
+
raise
|
|
611
601
|
finally:
|
|
612
602
|
if not skip:
|
|
613
603
|
global _last_tool_at
|
|
@@ -1107,12 +1097,11 @@ def _heartbeat_thread_fn():
|
|
|
1107
1097
|
try:
|
|
1108
1098
|
be.sb_rpc("mc_heartbeat", {"p_project_id": _PROJECT_ID, "p_agent_name": AGENT_NAME, "p_version": _SDK_VERSION})
|
|
1109
1099
|
|
|
1110
|
-
# CPU-based status detection
|
|
1100
|
+
# CPU-based status detection
|
|
1111
1101
|
parent_cpu = _get_parent_cpu()
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
idle_secs = _time.time() - _last_tool_at
|
|
1102
|
+
cur_state = _current_state
|
|
1103
|
+
in_wait = _IN_WAIT
|
|
1104
|
+
idle_secs = _time.time() - _last_tool_at
|
|
1116
1105
|
|
|
1117
1106
|
if in_wait:
|
|
1118
1107
|
# Actually in meshcode_wait right now — listening for messages
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|