meshcode 1.6.0__tar.gz → 1.7.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 (27) hide show
  1. {meshcode-1.6.0 → meshcode-1.7.0}/PKG-INFO +1 -1
  2. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/__init__.py +1 -1
  3. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/backend.py +41 -0
  4. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/server.py +74 -0
  5. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/PKG-INFO +1 -1
  6. {meshcode-1.6.0 → meshcode-1.7.0}/pyproject.toml +1 -1
  7. {meshcode-1.6.0 → meshcode-1.7.0}/README.md +0 -0
  8. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/cli.py +0 -0
  9. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/comms_v4.py +0 -0
  10. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/invites.py +0 -0
  11. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/launcher.py +0 -0
  12. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/launcher_install.py +0 -0
  13. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/__init__.py +0 -0
  14. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/__main__.py +0 -0
  15. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/realtime.py +0 -0
  16. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/test_backend.py +0 -0
  17. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/meshcode_mcp/test_realtime.py +0 -0
  18. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/protocol_v2.py +0 -0
  19. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/run_agent.py +0 -0
  20. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/secrets.py +0 -0
  21. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode/setup_clients.py +0 -0
  22. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/SOURCES.txt +0 -0
  23. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/dependency_links.txt +0 -0
  24. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/entry_points.txt +0 -0
  25. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/requires.txt +0 -0
  26. {meshcode-1.6.0 → meshcode-1.7.0}/meshcode.egg-info/top_level.txt +0 -0
  27. {meshcode-1.6.0 → meshcode-1.7.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 1.6.0
3
+ Version: 1.7.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__ = "1.6.0"
2
+ __version__ = "1.7.0"
@@ -257,6 +257,47 @@ def set_status(project_id: str, agent: str, status: str, task: str = "") -> Dict
257
257
  return {"ok": True, "status": status}
258
258
 
259
259
 
260
+ def task_create(api_key, project_id, creator_agent, title, description="", assignee="*", priority="normal", parent_task_id=None):
261
+ return sb_rpc("mc_task_create", {
262
+ "p_api_key": api_key,
263
+ "p_project_id": project_id,
264
+ "p_creator_agent": creator_agent,
265
+ "p_title": title,
266
+ "p_description": description,
267
+ "p_assignee": assignee,
268
+ "p_priority": priority,
269
+ "p_parent_task_id": parent_task_id,
270
+ })
271
+
272
+
273
+ def task_list(api_key, project_id, agent, status_filter=None):
274
+ return sb_rpc("mc_task_list", {
275
+ "p_api_key": api_key,
276
+ "p_project_id": project_id,
277
+ "p_agent": agent,
278
+ "p_status_filter": status_filter,
279
+ })
280
+
281
+
282
+ def task_claim(api_key, project_id, task_id, claiming_agent):
283
+ return sb_rpc("mc_task_claim", {
284
+ "p_api_key": api_key,
285
+ "p_project_id": project_id,
286
+ "p_task_id": task_id,
287
+ "p_claiming_agent": claiming_agent,
288
+ })
289
+
290
+
291
+ def task_complete(api_key, project_id, task_id, completing_agent, summary=""):
292
+ return sb_rpc("mc_task_complete", {
293
+ "p_api_key": api_key,
294
+ "p_project_id": project_id,
295
+ "p_task_id": task_id,
296
+ "p_completing_agent": completing_agent,
297
+ "p_summary": summary,
298
+ })
299
+
300
+
260
301
  def get_history(project_id: str, limit: int = 20) -> List[Dict]:
261
302
  return sb_select(
262
303
  "mc_messages",
@@ -383,6 +383,17 @@ YOUR FIRST ACTIONS WHEN THIS SESSION STARTS:
383
383
  idle/listening state. Stay there forever unless one of the
384
384
  break-out conditions above fires.
385
385
 
386
+ TASK BOARD: the meshwork has a shared task list. Use it instead of just messages
387
+ when work needs tracking. Tools:
388
+ meshcode_tasks(status_filter='open') — list tasks you could pick up
389
+ meshcode_task_claim(task_id) — atomically claim one (CAS — fails if
390
+ another agent already claimed)
391
+ meshcode_task_complete(task_id, summary)— mark done with a 1-line summary
392
+ meshcode_task_create(title, description, assignee='*') — create one (commanders
393
+ usually do this)
394
+ The dashboard renders the board live. Prefer claiming open tasks over starting
395
+ fresh work — it makes coordination visible to humans.
396
+
386
397
  AVAILABLE MESH TOOLS (all from this MCP server):
387
398
  meshcode_wait — block until a mesh message arrives (your idle state)
388
399
  meshcode_done — broadcast a GLOBAL DONE to break every agent out of wait
@@ -394,6 +405,10 @@ AVAILABLE MESH TOOLS (all from this MCP server):
394
405
  meshcode_broadcast — send to ALL agents in the meshwork
395
406
  meshcode_register — re-register if disconnected
396
407
  meshcode_init — re-initialize agent context (rarely needed)
408
+ meshcode_tasks — list tasks on the shared board
409
+ meshcode_task_create — create a new task
410
+ meshcode_task_claim — atomically claim an open task
411
+ meshcode_task_complete — mark a claimed task done
397
412
 
398
413
  You are not a single-turn chatbot. You are a persistent mesh agent. Act
399
414
  accordingly.
@@ -763,6 +778,65 @@ def meshcode_init(project: str, agent: str, role: str = "") -> Dict[str, Any]:
763
778
  return {"ok": True, "project": project, "agent": agent, "register": result}
764
779
 
765
780
 
781
+ @mcp.tool()
782
+ def meshcode_task_create(title: str, description: str = "", assignee: str = "*",
783
+ priority: str = "normal", parent_task_id: Optional[str] = None) -> Dict[str, Any]:
784
+ """Create a task in the meshwork's shared backlog. Use this when you (typically
785
+ the commander) want to assign work that needs tracking.
786
+
787
+ Args:
788
+ title: Short title of the task.
789
+ description: Longer description / acceptance criteria.
790
+ assignee: Agent name to assign to, or "*" for any agent (anyone can claim).
791
+ priority: 'low' / 'normal' / 'high' / 'urgent'.
792
+ parent_task_id: Optional parent task id for nesting subtasks.
793
+
794
+ Returns: {"ok": true, "task_id": "...", "title": "..."}
795
+ """
796
+ api_key = _get_api_key()
797
+ return be.task_create(api_key, _PROJECT_ID, AGENT_NAME, title,
798
+ description=description, assignee=assignee,
799
+ priority=priority, parent_task_id=parent_task_id)
800
+
801
+
802
+ @mcp.tool()
803
+ def meshcode_tasks(status_filter: Optional[str] = None) -> Dict[str, Any]:
804
+ """List tasks in the meshwork. Use this to discover work you can pick up.
805
+
806
+ Args:
807
+ status_filter: 'open' / 'in_progress' / 'done' / etc. None = all.
808
+
809
+ Returns: {"ok": true, "tasks": [...]}
810
+ """
811
+ api_key = _get_api_key()
812
+ return be.task_list(api_key, _PROJECT_ID, AGENT_NAME, status_filter=status_filter)
813
+
814
+
815
+ @mcp.tool()
816
+ def meshcode_task_claim(task_id: str) -> Dict[str, Any]:
817
+ """Atomically claim an open task. If the task is already claimed by someone
818
+ else (or assigned to a different agent), this returns an error and another
819
+ task should be picked.
820
+
821
+ Args:
822
+ task_id: The uuid of the task you want to claim.
823
+ """
824
+ api_key = _get_api_key()
825
+ return be.task_claim(api_key, _PROJECT_ID, task_id, AGENT_NAME)
826
+
827
+
828
+ @mcp.tool()
829
+ def meshcode_task_complete(task_id: str, summary: str = "") -> Dict[str, Any]:
830
+ """Mark a task as done. Only the claimer can complete it.
831
+
832
+ Args:
833
+ task_id: The uuid of the task you previously claimed.
834
+ summary: Short description of what was accomplished + any artifacts.
835
+ """
836
+ api_key = _get_api_key()
837
+ return be.task_complete(api_key, _PROJECT_ID, task_id, AGENT_NAME, summary=summary)
838
+
839
+
766
840
  # ----------------- RESOURCES -----------------
767
841
 
768
842
  @mcp.resource("meshcode://inbox")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshcode
3
- Version: 1.6.0
3
+ Version: 1.7.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 = "1.6.0"
7
+ version = "1.7.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