meshagent-cli 0.0.19__py3-none-any.whl → 0.0.21__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/__init__.py CHANGED
@@ -0,0 +1 @@
1
+ from .version import __version__
@@ -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.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImZqZGh5bWhhZ3BwZ2drYWJ6bGFmIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzYzMTYyOTQsImV4cCI6MjA1MTg5MjI5NH0.8AuzzNcCuEaHQ-gjqHxBmsN1YrtM-TpL1_W-kxzooNs")
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"
meshagent/cli/cli_mcp.py CHANGED
@@ -63,7 +63,7 @@ async def sse(*, project_id: str = None, room: Annotated[str, typer.Option()], t
63
63
 
64
64
 
65
65
  @app.async_command("stdio")
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()], args: 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()]):
67
67
  account_client = await get_client()
68
68
  try:
69
69
  project_id = await resolve_project_id(project_id=project_id)
@@ -74,9 +74,11 @@ async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()],
74
74
  print("[bold green]Connecting to room...[/bold green]")
75
75
  async with RoomClient(protocol=WebSocketClientProtocol(url=websocket_room_url(room_name=room, base_url=meshagent_base_url()), token=jwt)) as client:
76
76
 
77
+ parsed_command = shlex.split(command)
78
+
77
79
  async with stdio_client(StdioServerParameters(
78
- command=command, # Executable
79
- args=shlex.split(args), # Optional command line arguments
80
+ command=parsed_command[0], # Executable
81
+ args=parsed_command[1:], # Optional command line arguments
80
82
  env=None, # Optional environment variables
81
83
  )) as (read_stream, write_stream):
82
84
 
@@ -102,13 +104,15 @@ async def stdio(*, project_id: str = None, room: Annotated[str, typer.Option()],
102
104
 
103
105
 
104
106
  @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):
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):
106
108
  account_client = await get_client()
107
109
  try:
110
+
111
+ parsed_command = shlex.split(command)
108
112
 
109
113
  async with stdio_client(StdioServerParameters(
110
- command=command, # Executable
111
- args=shlex.split(args), # Optional command line arguments
114
+ command=parsed_command[0], # Executable
115
+ args=parsed_command[1:], # Optional command line arguments
112
116
  env=None, # Optional environment variables
113
117
  )) as (read_stream, write_stream):
114
118
 
meshagent/cli/helper.py CHANGED
@@ -49,7 +49,7 @@ async def get_active_api_key(project_id: str):
49
49
  settings = _load_settings()
50
50
  if settings == None:
51
51
  return None
52
- return settings.active_api_keys[project_id]
52
+ return settings.active_api_keys.get(project_id, None)
53
53
 
54
54
 
55
55
  async def set_active_api_key(project_id: str, api_key_id: str | None):
@@ -115,7 +115,7 @@ async def resolve_api_key(project_id: str, api_key_id: Optional[str] = None):
115
115
 
116
116
  async def resolve_token_jwt(*, project_id: str, api_key_id: Optional[str] = None, token_path: Optional[str] = None, name: Optional[str] = None, role: Optional[str] = None, room: Optional[str]= None) -> str:
117
117
  jwt = None
118
-
118
+
119
119
  if api_key_id == None:
120
120
 
121
121
  if token_path != None:
meshagent/cli/projects.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from meshagent.cli import async_typer
4
- from meshagent.cli.helper import get_client, print_json_table, set_active_project
4
+ from meshagent.cli.helper import get_client, print_json_table, set_active_project, get_active_project
5
5
 
6
6
  app = async_typer.AsyncTyper()
7
7
 
@@ -10,6 +10,11 @@ app = async_typer.AsyncTyper()
10
10
  async def list():
11
11
  client = await get_client()
12
12
  projects = await client.list_projects()
13
+ active_project = await get_active_project()
14
+ for project in projects["projects"]:
15
+ if project["id"] == active_project:
16
+ project["name"] = "*" + project["name"]
17
+
13
18
  print_json_table(projects["projects"], "id", "name")
14
19
  await client.close()
15
20
 
meshagent/cli/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.19"
1
+ __version__ = "0.0.21"
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.0.19
3
+ Version: 0.0.21
4
4
  Summary: CLI for Meshagent
5
- License-Expression: LicenseRef-Proprietary
5
+ License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://meshagent.com
7
7
  Project-URL: Website, https://meshagent.com
8
8
  Project-URL: Source, https://github.com/meshagent
@@ -10,10 +10,10 @@ 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.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
13
+ Requires-Dist: meshagent-api~=0.0.21
14
+ Requires-Dist: meshagent-agents~=0.0.21
15
+ Requires-Dist: meshagent-tools~=0.0.21
16
+ Requires-Dist: meshagent-mcp~=0.0.21
17
17
  Requires-Dist: supabase~=2.15.1
18
18
 
19
19
  ### Meshagent CLI
@@ -1,25 +1,25 @@
1
- meshagent/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1
+ meshagent/cli/__init__.py,sha256=8zLGg-DfQhnDl2Ky0n-zXpN-8e-g7iR0AcaI4l4Vvpk,32
2
2
  meshagent/cli/agent.py,sha256=0VjwJkwZ-G637Mps3OtxxWIfjWbrirJ4TTq2Idvjtug,10023
3
3
  meshagent/cli/api_keys.py,sha256=okj-xbnl1twPgT2yBbZQY4xNqe57d_MeCWsE_Qhl12g,2393
4
4
  meshagent/cli/async_typer.py,sha256=GCeSefBDbpd-V4V8LrvHGUTBMth3HspVMfFa-HUZ0cg,898
5
5
  meshagent/cli/auth.py,sha256=24UrVTvrlDfmGeLrG7oT7jTwM77296bdKVQ_egc3IAo,766
6
- meshagent/cli/auth_async.py,sha256=f2cMq1DyTpb7l-q5RbDCa_Mc86Ft7kmBJwdTukrXkcc,4001
6
+ meshagent/cli/auth_async.py,sha256=LArKxTxQAPmItv0JaGkW3Ybutl6MVmb6_EeSjI18IbI,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=2Ij4_rAwm_1c7m31BgB1QGThquTs25nVnA0hAUTSPv0,6880
9
+ meshagent/cli/cli_mcp.py,sha256=jJXTVZjPYF69QOT50sGPgNCklVs4aoHrcz9eWaH0s90,6918
10
10
  meshagent/cli/cli_secrets.py,sha256=U0kdzN3zt7JIqzdRLynAjxdvAsI0enesBd_m7TeXjnQ,13629
11
11
  meshagent/cli/developer.py,sha256=5eoDr3kfi-IufA5d6OESqNr739Bdut_IFBtT3nq0xZU,3002
12
- meshagent/cli/helper.py,sha256=vrREJZJ6d7ivkJRyjvxE5au6Ict7-zlSJMnpCzL9WRQ,4626
12
+ meshagent/cli/helper.py,sha256=hcY6C5BqGnYmwFVIG7nS9NPIZXbdpOoEna-t0mYmHGY,4632
13
13
  meshagent/cli/messaging.py,sha256=cU6LIK6gwOveLo_x2x3iWW5rC4MhDpwp2hvehAkvybI,6068
14
14
  meshagent/cli/participant_token.py,sha256=uCGmlUgNOfarYGkDZpzreXwnv9AJrM76tu5Lt690vYU,1456
15
- meshagent/cli/projects.py,sha256=dBItK5RYaF89zQnzOyL7HSuOKhulZWyWPfwMOm2PCGA,894
15
+ meshagent/cli/projects.py,sha256=Tut8kRCVvgdWzlAR1Zqf0QxAi4sNfQEIHY9zxfS1nuI,1100
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=AixLlU6Em9Z_zs4l1lTxAHg1b8pa8z3BTNKIHDkjBmo,23
19
+ meshagent/cli/version.py,sha256=PsqtE_T084MVsMv47JyTQ3DK2CRZJ3Kd9Q_vnw02oZk,23
20
20
  meshagent/cli/webhook.py,sha256=KBl8U1TcOX3z2uoyH4YMuUuw0vSVX7xpRxYvzxI5c-Y,2811
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,,
21
+ meshagent_cli-0.0.21.dist-info/METADATA,sha256=JY6FBTa8k7JUj5s04UlUPdrcJbKn6z546uskbxNdEAk,600
22
+ meshagent_cli-0.0.21.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
23
+ meshagent_cli-0.0.21.dist-info/entry_points.txt,sha256=WRcGGN4vMtvC5Pgl3uRFqsJiQXNoHuLLa-TCSY3gAhQ,52
24
+ meshagent_cli-0.0.21.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
25
+ meshagent_cli-0.0.21.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5