meshcode 2.9.1__tar.gz → 2.9.2__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.9.1 → meshcode-2.9.2}/PKG-INFO +1 -1
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/__init__.py +1 -1
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/run_agent.py +13 -13
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/PKG-INFO +1 -1
- {meshcode-2.9.1 → meshcode-2.9.2}/pyproject.toml +1 -1
- {meshcode-2.9.1 → meshcode-2.9.2}/README.md +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/ascii_art.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/cli.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/comms_v4.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/invites.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/launcher.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/launcher_install.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/__init__.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/__main__.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/backend.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/realtime.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/server.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/test_backend.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/test_realtime.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/meshcode_mcp/test_server_wrapper.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/preferences.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/protocol_v2.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/secrets.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/self_update.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode/setup_clients.py +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/SOURCES.txt +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/dependency_links.txt +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/entry_points.txt +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/requires.txt +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/meshcode.egg-info/top_level.txt +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/setup.cfg +0 -0
- {meshcode-2.9.1 → meshcode-2.9.2}/tests/test_status_enum_coverage.py +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""MeshCode — Real-time communication between AI agents."""
|
|
2
|
-
__version__ = "2.9.
|
|
2
|
+
__version__ = "2.9.2"
|
|
@@ -32,20 +32,21 @@ WORKSPACES_ROOT = Path.home() / "meshcode"
|
|
|
32
32
|
REGISTRY_PATH = WORKSPACES_ROOT / ".registry.json"
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
def _fetch_or_generate_art(agent: str, project: str) ->
|
|
36
|
-
"""Fetch ASCII art from server. If not stored yet, generate and save
|
|
35
|
+
def _fetch_or_generate_art(agent: str, project: str) -> tuple:
|
|
36
|
+
"""Fetch ASCII art + role from server. If not stored yet, generate and save.
|
|
37
|
+
Returns (ascii_art, role_description)."""
|
|
37
38
|
from .ascii_art import generate_art
|
|
38
39
|
try:
|
|
39
40
|
from .setup_clients import _load_supabase_env
|
|
40
41
|
import importlib
|
|
41
42
|
secrets_mod = importlib.import_module("meshcode.secrets")
|
|
42
43
|
except Exception:
|
|
43
|
-
return generate_art(agent)
|
|
44
|
+
return generate_art(agent), agent
|
|
44
45
|
|
|
45
46
|
profile = os.environ.get("MESHCODE_KEYCHAIN_PROFILE") or "default"
|
|
46
47
|
api_key = secrets_mod.get_api_key(profile=profile)
|
|
47
48
|
if not api_key:
|
|
48
|
-
return generate_art(agent)
|
|
49
|
+
return generate_art(agent), agent, agent
|
|
49
50
|
|
|
50
51
|
sb = _load_supabase_env()
|
|
51
52
|
try:
|
|
@@ -63,11 +64,11 @@ def _fetch_or_generate_art(agent: str, project: str) -> str:
|
|
|
63
64
|
with urlopen(proj_req, timeout=5) as resp:
|
|
64
65
|
proj_data = json.loads(resp.read().decode())
|
|
65
66
|
if not proj_data:
|
|
66
|
-
return generate_art(agent)
|
|
67
|
+
return generate_art(agent), agent
|
|
67
68
|
project_id = proj_data[0]["id"]
|
|
68
|
-
# Step 2: fetch existing art
|
|
69
|
+
# Step 2: fetch existing art + role
|
|
69
70
|
req = Request(
|
|
70
|
-
f"{sb['SUPABASE_URL']}/rest/v1/mc_agents?select=ascii_art&name=eq.{urllib.parse.quote(agent)}&project_id=eq.{project_id}",
|
|
71
|
+
f"{sb['SUPABASE_URL']}/rest/v1/mc_agents?select=ascii_art,role&name=eq.{urllib.parse.quote(agent)}&project_id=eq.{project_id}",
|
|
71
72
|
headers={
|
|
72
73
|
"apikey": sb["SUPABASE_KEY"],
|
|
73
74
|
"Authorization": f"Bearer {sb['SUPABASE_KEY']}",
|
|
@@ -77,7 +78,7 @@ def _fetch_or_generate_art(agent: str, project: str) -> str:
|
|
|
77
78
|
with urlopen(req, timeout=5) as resp:
|
|
78
79
|
data = json.loads(resp.read().decode())
|
|
79
80
|
if data and data[0].get("ascii_art"):
|
|
80
|
-
return data[0]["ascii_art"]
|
|
81
|
+
return data[0]["ascii_art"], data[0].get("role") or agent
|
|
81
82
|
except Exception:
|
|
82
83
|
pass
|
|
83
84
|
|
|
@@ -99,7 +100,7 @@ def _fetch_or_generate_art(agent: str, project: str) -> str:
|
|
|
99
100
|
urlopen(req, timeout=5)
|
|
100
101
|
except Exception:
|
|
101
102
|
pass
|
|
102
|
-
return art
|
|
103
|
+
return art, agent
|
|
103
104
|
|
|
104
105
|
|
|
105
106
|
def _fetch_agent_stats(agent: str, project: str) -> dict:
|
|
@@ -380,13 +381,12 @@ def run(agent: str, project: Optional[str] = None, editor_override: Optional[str
|
|
|
380
381
|
try:
|
|
381
382
|
from .ascii_art import generate_art, render_welcome
|
|
382
383
|
from . import __version__ as cli_version
|
|
383
|
-
ascii_art = _fetch_or_generate_art(agent, resolved_project)
|
|
384
|
-
is_cmd = "commander" in agent.lower()
|
|
385
|
-
# Fetch basic stats for achievements (non-blocking)
|
|
384
|
+
ascii_art, agent_role = _fetch_or_generate_art(agent, resolved_project)
|
|
385
|
+
is_cmd = "commander" in agent.lower() or "commander" in agent_role.lower()
|
|
386
386
|
agent_stats = _fetch_agent_stats(agent, resolved_project)
|
|
387
387
|
print(render_welcome(
|
|
388
388
|
agent, resolved_project, ascii_art, cli_version,
|
|
389
|
-
is_commander=is_cmd, role=
|
|
389
|
+
is_commander=is_cmd, role=agent_role, stats=agent_stats,
|
|
390
390
|
))
|
|
391
391
|
except Exception:
|
|
392
392
|
pass # Non-critical — skip banner on error
|
|
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
|