meshagent-cli 0.0.18__tar.gz → 0.0.20__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.
Potentially problematic release.
This version of meshagent-cli might be problematic. Click here for more details.
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/PKG-INFO +6 -4
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/auth_async.py +1 -1
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/cli_mcp.py +61 -5
- meshagent_cli-0.0.20/meshagent/cli/version.py +1 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent_cli.egg-info/PKG-INFO +6 -4
- meshagent_cli-0.0.20/meshagent_cli.egg-info/requires.txt +7 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/pyproject.toml +5 -3
- meshagent_cli-0.0.18/meshagent/cli/version.py +0 -1
- meshagent_cli-0.0.18/meshagent_cli.egg-info/requires.txt +0 -5
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/README.md +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/__init__.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/agent.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/api_keys.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/async_typer.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/auth.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/call.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/cli.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/cli_secrets.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/developer.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/helper.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/messaging.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/participant_token.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/projects.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/services.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/sessions.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/storage.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent/cli/webhook.py +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent_cli.egg-info/SOURCES.txt +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent_cli.egg-info/dependency_links.txt +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent_cli.egg-info/entry_points.txt +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/meshagent_cli.egg-info/top_level.txt +0 -0
- {meshagent_cli-0.0.18 → meshagent_cli-0.0.20}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.20
|
|
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.
|
|
14
|
-
Requires-Dist: meshagent-agents~=0.0.
|
|
15
|
-
Requires-Dist: meshagent-tools~=0.0.
|
|
13
|
+
Requires-Dist: meshagent-api~=0.0.20
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.0.20
|
|
15
|
+
Requires-Dist: meshagent-tools~=0.0.20
|
|
16
|
+
Requires-Dist: meshagent-mcp~=0.0.20
|
|
17
|
+
Requires-Dist: supabase~=2.15.1
|
|
16
18
|
|
|
17
19
|
### Meshagent CLI
|
|
18
20
|
|
|
@@ -6,7 +6,7 @@ from supabase.lib.client_options import ClientOptions
|
|
|
6
6
|
from gotrue import AsyncMemoryStorage
|
|
7
7
|
|
|
8
8
|
AUTH_URL = os.getenv("MESHAGENT_AUTH_URL", "https://infra.meshagent.com")
|
|
9
|
-
AUTH_ANON_KEY = os.getenv("MESHAGENT_AUTH_ANON_KEY", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
9
|
+
AUTH_ANON_KEY = os.getenv("MESHAGENT_AUTH_ANON_KEY", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5memhyeWpoc3RjZXdkeWdvampzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzQ2MzU2MjgsImV4cCI6MjA1MDIxMTYyOH0.ujx9CIbYEvWbA77ogB1gg1Jrv3KtpB1rWh_LRRLpcow")
|
|
10
10
|
CACHE_FILE = Path.home() / ".meshagent" / "session.json"
|
|
11
11
|
REDIRECT_PORT = 8765
|
|
12
12
|
REDIRECT_URL = f"http://localhost:{REDIRECT_PORT}/callback"
|
|
@@ -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
|
|
|
@@ -61,7 +63,7 @@ async def sse(*, project_id: str = None, room: Annotated[str, typer.Option()], t
|
|
|
61
63
|
|
|
62
64
|
|
|
63
65
|
@app.async_command("stdio")
|
|
64
|
-
async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()], token_path: Annotated[Optional[str], typer.Option()] = None, api_key_id: Annotated[Optional[str], typer.Option()] = None, name: Annotated[str, typer.Option(..., help="Participant name")] = "cli", role: str = "tool", command: Annotated[str, typer.Option()]
|
|
66
|
+
async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()], token_path: Annotated[Optional[str], typer.Option()] = None, api_key_id: Annotated[Optional[str], typer.Option()] = None, name: Annotated[str, typer.Option(..., help="Participant name")] = "cli", role: str = "tool", command: Annotated[str, typer.Option()]):
|
|
65
67
|
account_client = await get_client()
|
|
66
68
|
try:
|
|
67
69
|
project_id = await resolve_project_id(project_id=project_id)
|
|
@@ -72,9 +74,11 @@ async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()],
|
|
|
72
74
|
print("[bold green]Connecting to room...[/bold green]")
|
|
73
75
|
async with RoomClient(protocol=WebSocketClientProtocol(url=websocket_room_url(room_name=room, base_url=meshagent_base_url()), token=jwt)) as client:
|
|
74
76
|
|
|
77
|
+
parsed_command = shlex.split(command)
|
|
78
|
+
|
|
75
79
|
async with stdio_client(StdioServerParameters(
|
|
76
|
-
command=
|
|
77
|
-
args=
|
|
80
|
+
command=parsed_command[0], # Executable
|
|
81
|
+
args=parsed_command[1:], # Optional command line arguments
|
|
78
82
|
env=None, # Optional environment variables
|
|
79
83
|
)) as (read_stream, write_stream):
|
|
80
84
|
|
|
@@ -97,3 +101,55 @@ async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()],
|
|
|
97
101
|
print(f"[red]{e}[/red]")
|
|
98
102
|
finally:
|
|
99
103
|
await account_client.close()
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@app.async_command("stdio-service")
|
|
107
|
+
async def stdio_host(*, command: Annotated[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):
|
|
108
|
+
account_client = await get_client()
|
|
109
|
+
try:
|
|
110
|
+
|
|
111
|
+
parsed_command = shlex.split(command)
|
|
112
|
+
|
|
113
|
+
async with stdio_client(StdioServerParameters(
|
|
114
|
+
command=parsed_command[0], # Executable
|
|
115
|
+
args=parsed_command[1:], # Optional command line arguments
|
|
116
|
+
env=None, # Optional environment variables
|
|
117
|
+
)) as (read_stream, write_stream):
|
|
118
|
+
|
|
119
|
+
async with ClientSession(read_stream=read_stream, write_stream=write_stream) as session:
|
|
120
|
+
|
|
121
|
+
mcp_tools_response = await session.list_tools()
|
|
122
|
+
|
|
123
|
+
toolkit = MCPToolkit(name="mcp", session=session, tools=mcp_tools_response.tools)
|
|
124
|
+
|
|
125
|
+
if port == None:
|
|
126
|
+
|
|
127
|
+
port = int(os.getenv("MESHAGENT_PORT", "8080"))
|
|
128
|
+
|
|
129
|
+
if host == None:
|
|
130
|
+
|
|
131
|
+
host = "localhost"
|
|
132
|
+
|
|
133
|
+
service_host = ServiceHost(
|
|
134
|
+
host=host,
|
|
135
|
+
port=port,
|
|
136
|
+
webhook_secret=webhook_secret
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
if path == None:
|
|
140
|
+
path = "/service"
|
|
141
|
+
|
|
142
|
+
print(f"[bold green]Starting service host on {host}:{port}{path}...[/bold green]")
|
|
143
|
+
@service_host.path(path=path)
|
|
144
|
+
class CustomToolkit(RemoteToolkit):
|
|
145
|
+
def __init__(self):
|
|
146
|
+
super().__init__(name=toolkit.name, tools=toolkit.tools, title=toolkit.title, description=toolkit.description)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
await service_host.run()
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
except RoomException as e:
|
|
153
|
+
print(f"[red]{e}[/red]")
|
|
154
|
+
finally:
|
|
155
|
+
await account_client.close()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.20"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.20
|
|
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.
|
|
14
|
-
Requires-Dist: meshagent-agents~=0.0.
|
|
15
|
-
Requires-Dist: meshagent-tools~=0.0.
|
|
13
|
+
Requires-Dist: meshagent-api~=0.0.20
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.0.20
|
|
15
|
+
Requires-Dist: meshagent-tools~=0.0.20
|
|
16
|
+
Requires-Dist: meshagent-mcp~=0.0.20
|
|
17
|
+
Requires-Dist: supabase~=2.15.1
|
|
16
18
|
|
|
17
19
|
### Meshagent CLI
|
|
18
20
|
|
|
@@ -11,9 +11,11 @@ keywords = []
|
|
|
11
11
|
dependencies = [
|
|
12
12
|
"typer~=0.15.3",
|
|
13
13
|
"pydantic-yaml~=1.4.0",
|
|
14
|
-
"meshagent-api~=0.0.
|
|
15
|
-
"meshagent-agents~=0.0.
|
|
16
|
-
"meshagent-tools~=0.0.
|
|
14
|
+
"meshagent-api~=0.0.20",
|
|
15
|
+
"meshagent-agents~=0.0.20",
|
|
16
|
+
"meshagent-tools~=0.0.20",
|
|
17
|
+
"meshagent-mcp~=0.0.20",
|
|
18
|
+
"supabase~=2.15.1",
|
|
17
19
|
]
|
|
18
20
|
dynamic = ["version", "readme"]
|
|
19
21
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.18"
|
|
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
|