meshagent-cli 0.0.18__py3-none-any.whl → 0.0.19__py3-none-any.whl

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.

Potentially problematic release.


This version of meshagent-cli might be problematic. Click here for more details.

meshagent/cli/cli_mcp.py CHANGED
@@ -9,16 +9,18 @@ from typing import Annotated, Optional
9
9
 
10
10
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
11
11
  from meshagent.api import RoomClient, ParticipantToken, WebSocketClientProtocol, RoomException
12
- from meshagent.api.services import send_webhook
13
12
  from meshagent.cli import async_typer
14
13
  from meshagent.cli.helper import get_client, print_json_table, set_active_project, resolve_project_id
15
14
  from meshagent.cli.helper import set_active_project, get_active_project, resolve_project_id, resolve_api_key, resolve_token_jwt
16
15
 
17
- from meshagent.tools.hosting import RemoteToolkit
16
+ from meshagent.tools.hosting import RemoteToolkit, RemoteToolkitServer
18
17
 
19
18
  from meshagent.mcp import MCPToolkit
20
19
  from pathlib import Path
21
20
 
21
+ from meshagent.api.services import ServiceHost
22
+ import os
23
+
22
24
 
23
25
  import shlex
24
26
 
@@ -97,3 +99,53 @@ async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()],
97
99
  print(f"[red]{e}[/red]")
98
100
  finally:
99
101
  await account_client.close()
102
+
103
+
104
+ @app.async_command("stdio-service")
105
+ async def stdio_host(*, command: Annotated[str, typer.Option()], args: Annotated[Optional[str], typer.Option()] = "", host: Annotated[Optional[str], typer.Option()] = None, port: Annotated[Optional[int], typer.Option()] = None, webhook_secret: Annotated[Optional[str], typer.Option()] = None, path: Annotated[Optional[str], typer.Option()] = None):
106
+ account_client = await get_client()
107
+ try:
108
+
109
+ async with stdio_client(StdioServerParameters(
110
+ command=command, # Executable
111
+ args=shlex.split(args), # Optional command line arguments
112
+ env=None, # Optional environment variables
113
+ )) as (read_stream, write_stream):
114
+
115
+ async with ClientSession(read_stream=read_stream, write_stream=write_stream) as session:
116
+
117
+ mcp_tools_response = await session.list_tools()
118
+
119
+ toolkit = MCPToolkit(name="mcp", session=session, tools=mcp_tools_response.tools)
120
+
121
+ if port == None:
122
+
123
+ port = int(os.getenv("MESHAGENT_PORT", "8080"))
124
+
125
+ if host == None:
126
+
127
+ host = "localhost"
128
+
129
+ service_host = ServiceHost(
130
+ host=host,
131
+ port=port,
132
+ webhook_secret=webhook_secret
133
+ )
134
+
135
+ if path == None:
136
+ path = "/service"
137
+
138
+ print(f"[bold green]Starting service host on {host}:{port}{path}...[/bold green]")
139
+ @service_host.path(path=path)
140
+ class CustomToolkit(RemoteToolkit):
141
+ def __init__(self):
142
+ super().__init__(name=toolkit.name, tools=toolkit.tools, title=toolkit.title, description=toolkit.description)
143
+
144
+
145
+ await service_host.run()
146
+
147
+
148
+ except RoomException as e:
149
+ print(f"[red]{e}[/red]")
150
+ finally:
151
+ await account_client.close()
meshagent/cli/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.18"
1
+ __version__ = "0.0.19"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.0.18
3
+ Version: 0.0.19
4
4
  Summary: CLI for Meshagent
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  Project-URL: Documentation, https://meshagent.com
@@ -10,9 +10,11 @@ Requires-Python: >=3.9.0
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: typer~=0.15.3
12
12
  Requires-Dist: pydantic-yaml~=1.4.0
13
- Requires-Dist: meshagent-api~=0.0.18
14
- Requires-Dist: meshagent-agents~=0.0.18
15
- Requires-Dist: meshagent-tools~=0.0.18
13
+ Requires-Dist: meshagent-api~=0.0.19
14
+ Requires-Dist: meshagent-agents~=0.0.19
15
+ Requires-Dist: meshagent-tools~=0.0.19
16
+ Requires-Dist: meshagent-mcp~=0.0.19
17
+ Requires-Dist: supabase~=2.15.1
16
18
 
17
19
  ### Meshagent CLI
18
20
 
@@ -6,7 +6,7 @@ meshagent/cli/auth.py,sha256=24UrVTvrlDfmGeLrG7oT7jTwM77296bdKVQ_egc3IAo,766
6
6
  meshagent/cli/auth_async.py,sha256=f2cMq1DyTpb7l-q5RbDCa_Mc86Ft7kmBJwdTukrXkcc,4001
7
7
  meshagent/cli/call.py,sha256=M8oMo-hsYIzQzMF0OMNdJuoYCjDwtYUtdV1hCwZs0co,4610
8
8
  meshagent/cli/cli.py,sha256=y1zXBLeb1xFDgAh9SwwpjBaOdNQe1gJO6Kdmgm5-gO4,1181
9
- meshagent/cli/cli_mcp.py,sha256=UytGO55ONmW8HYpVTE5_1vqPaIwUuzF46nlgjKZlAeA,4835
9
+ meshagent/cli/cli_mcp.py,sha256=2Ij4_rAwm_1c7m31BgB1QGThquTs25nVnA0hAUTSPv0,6880
10
10
  meshagent/cli/cli_secrets.py,sha256=U0kdzN3zt7JIqzdRLynAjxdvAsI0enesBd_m7TeXjnQ,13629
11
11
  meshagent/cli/developer.py,sha256=5eoDr3kfi-IufA5d6OESqNr739Bdut_IFBtT3nq0xZU,3002
12
12
  meshagent/cli/helper.py,sha256=vrREJZJ6d7ivkJRyjvxE5au6Ict7-zlSJMnpCzL9WRQ,4626
@@ -16,10 +16,10 @@ meshagent/cli/projects.py,sha256=dBItK5RYaF89zQnzOyL7HSuOKhulZWyWPfwMOm2PCGA,894
16
16
  meshagent/cli/services.py,sha256=bxNOqJ03S7D4HgjIFzuAIvTrEbOdSjsdZH8FMlu9rzY,6152
17
17
  meshagent/cli/sessions.py,sha256=WWvuztYqRfthSq6ztwL_eQ_sz9JRc33jcN6p7YyM_Fs,782
18
18
  meshagent/cli/storage.py,sha256=BsagaJfThrUWqXFyAk9IvQtUuDAMckE2mffZ_peozMo,33555
19
- meshagent/cli/version.py,sha256=qgKF-lRlzaBqf95e1sodHCZkSUCbz7ECKSeYHwXfAvI,23
19
+ meshagent/cli/version.py,sha256=AixLlU6Em9Z_zs4l1lTxAHg1b8pa8z3BTNKIHDkjBmo,23
20
20
  meshagent/cli/webhook.py,sha256=KBl8U1TcOX3z2uoyH4YMuUuw0vSVX7xpRxYvzxI5c-Y,2811
21
- meshagent_cli-0.0.18.dist-info/METADATA,sha256=M0baDyuDs5nEVPk5ULuOaTs_SgKR95dTsJNy5cp7WzI,543
22
- meshagent_cli-0.0.18.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
23
- meshagent_cli-0.0.18.dist-info/entry_points.txt,sha256=WRcGGN4vMtvC5Pgl3uRFqsJiQXNoHuLLa-TCSY3gAhQ,52
24
- meshagent_cli-0.0.18.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
25
- meshagent_cli-0.0.18.dist-info/RECORD,,
21
+ meshagent_cli-0.0.19.dist-info/METADATA,sha256=YG9i93LZnpU2mL5NHiSd_4c3XlCKbdgmWCCOi_dsDiU,612
22
+ meshagent_cli-0.0.19.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
23
+ meshagent_cli-0.0.19.dist-info/entry_points.txt,sha256=WRcGGN4vMtvC5Pgl3uRFqsJiQXNoHuLLa-TCSY3gAhQ,52
24
+ meshagent_cli-0.0.19.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
25
+ meshagent_cli-0.0.19.dist-info/RECORD,,