meshcode 2.8.3__tar.gz → 2.8.4__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.8.3 → meshcode-2.8.4}/PKG-INFO +1 -1
  2. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/__init__.py +1 -1
  3. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/comms_v4.py +18 -10
  4. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/PKG-INFO +1 -1
  5. {meshcode-2.8.3 → meshcode-2.8.4}/pyproject.toml +1 -1
  6. {meshcode-2.8.3 → meshcode-2.8.4}/README.md +0 -0
  7. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/cli.py +0 -0
  8. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/invites.py +0 -0
  9. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/launcher.py +0 -0
  10. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/launcher_install.py +0 -0
  11. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/__init__.py +0 -0
  12. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/__main__.py +0 -0
  13. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/backend.py +0 -0
  14. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/realtime.py +0 -0
  15. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/server.py +0 -0
  16. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/test_backend.py +0 -0
  17. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  18. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
  19. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/preferences.py +0 -0
  20. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/protocol_v2.py +0 -0
  21. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/run_agent.py +0 -0
  22. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/secrets.py +0 -0
  23. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/self_update.py +0 -0
  24. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode/setup_clients.py +0 -0
  25. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/SOURCES.txt +0 -0
  26. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/dependency_links.txt +0 -0
  27. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/entry_points.txt +0 -0
  28. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/requires.txt +0 -0
  29. {meshcode-2.8.3 → meshcode-2.8.4}/meshcode.egg-info/top_level.txt +0 -0
  30. {meshcode-2.8.3 → meshcode-2.8.4}/setup.cfg +0 -0
  31. {meshcode-2.8.3 → meshcode-2.8.4}/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.8.3
3
+ Version: 2.8.4
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.8.3"
2
+ __version__ = "2.8.4"
@@ -1426,10 +1426,10 @@ def _stop_heartbeat_daemon(project, name):
1426
1426
 
1427
1427
 
1428
1428
  def connect_terminal(project, name, role=""):
1429
- """Bind THIS terminal to (project, agent). Calls mc_connect_agent RPC and
1430
- starts a 30s heartbeat loop. MeshCode is mesh infrastructure only — this
1431
- command does NOT spawn claude. The user must already have a claude session
1432
- running in this terminal."""
1429
+ """Bind THIS terminal to (project, agent). Calls mc_acquire_agent_lease RPC
1430
+ (ownership-validated) and starts a 30s heartbeat loop. MeshCode is mesh
1431
+ infrastructure only — this command does NOT spawn claude. The user must
1432
+ already have a claude session running in this terminal."""
1433
1433
  ensure_sessions()
1434
1434
  project_id = get_project_id(project)
1435
1435
  if not project_id:
@@ -1452,12 +1452,20 @@ def connect_terminal(project, name, role=""):
1452
1452
  "p_status": "needs_setup",
1453
1453
  })
1454
1454
 
1455
- rpc_result = sb_rpc("mc_connect_agent", {
1456
- "p_project_id": project_id,
1457
- "p_agent_name": name,
1458
- "p_tty": tty,
1459
- "p_pid": ppid,
1460
- })
1455
+ # Use mc_acquire_agent_lease (ownership-validated) instead of mc_connect_agent
1456
+ import uuid as _uuid
1457
+ _instance_id = f"{tty or 'no-tty'}-{ppid}-{_uuid.uuid4().hex[:8]}"
1458
+ if _api_key:
1459
+ rpc_result = sb_rpc("mc_acquire_agent_lease", {
1460
+ "p_api_key": _api_key,
1461
+ "p_project_id": project_id,
1462
+ "p_agent_name": name,
1463
+ "p_instance_id": _instance_id,
1464
+ })
1465
+ else:
1466
+ print("[ERROR] No API key found — cannot connect without authentication.")
1467
+ print("[ERROR] Run: meshcode setup-key")
1468
+ return
1461
1469
  if rpc_result and rpc_result.get("error"):
1462
1470
  print(f"[ERROR] {rpc_result['error']}")
1463
1471
  return
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 2.8.3
3
+ Version: 2.8.4
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.8.3"
7
+ version = "2.8.4"
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