meshagent-cli 0.5.1__tar.gz → 0.5.3__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.

Files changed (38) hide show
  1. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/PKG-INFO +7 -7
  2. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/agent.py +19 -13
  3. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/api_keys.py +18 -16
  4. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/call.py +6 -4
  5. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/chatbot.py +9 -5
  6. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/cli_mcp.py +7 -8
  7. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/cli_secrets.py +12 -11
  8. meshagent_cli-0.5.3/meshagent/cli/common_options.py +31 -0
  9. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/developer.py +12 -10
  10. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/exec.py +6 -3
  11. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/helper.py +0 -1
  12. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/mailbot.py +9 -4
  13. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/messaging.py +14 -9
  14. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/participant_token.py +7 -6
  15. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/projects.py +2 -9
  16. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/queue.py +10 -7
  17. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/services.py +12 -11
  18. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/sessions.py +3 -2
  19. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/storage.py +18 -37
  20. meshagent_cli-0.5.3/meshagent/cli/version.py +1 -0
  21. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/voicebot.py +5 -5
  22. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/webhook.py +4 -3
  23. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/PKG-INFO +7 -7
  24. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/SOURCES.txt +1 -0
  25. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/requires.txt +6 -6
  26. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/pyproject.toml +6 -6
  27. meshagent_cli-0.5.1/meshagent/cli/version.py +0 -1
  28. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/README.md +0 -0
  29. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/__init__.py +0 -0
  30. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/async_typer.py +0 -0
  31. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/auth.py +0 -0
  32. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/auth_async.py +0 -0
  33. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/cli.py +0 -0
  34. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent/cli/otel.py +0 -0
  35. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/dependency_links.txt +0 -0
  36. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/entry_points.txt +0 -0
  37. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/meshagent_cli.egg-info/top_level.txt +0 -0
  38. {meshagent_cli-0.5.1 → meshagent_cli-0.5.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: CLI for Meshagent
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.meshagent.com
@@ -10,12 +10,12 @@ Requires-Python: >=3.12
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: typer~=0.15
12
12
  Requires-Dist: pydantic-yaml~=1.4
13
- Requires-Dist: meshagent-api~=0.5.1
14
- Requires-Dist: meshagent-agents~=0.5.1
15
- Requires-Dist: meshagent-computers~=0.5.1
16
- Requires-Dist: meshagent-openai~=0.5.1
17
- Requires-Dist: meshagent-tools~=0.5.1
18
- Requires-Dist: meshagent-mcp~=0.5.1
13
+ Requires-Dist: meshagent-api~=0.5.3
14
+ Requires-Dist: meshagent-agents~=0.5.3
15
+ Requires-Dist: meshagent-computers~=0.5.3
16
+ Requires-Dist: meshagent-openai~=0.5.3
17
+ Requires-Dist: meshagent-tools~=0.5.3
18
+ Requires-Dist: meshagent-mcp~=0.5.3
19
19
  Requires-Dist: supabase~=2.15
20
20
  Requires-Dist: fastmcp~=2.8
21
21
  Requires-Dist: opentelemetry-distro~=0.54b1
@@ -1,6 +1,7 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
4
5
  import json
5
6
  import asyncio
6
7
 
@@ -13,7 +14,7 @@ from meshagent.api import (
13
14
  )
14
15
  from meshagent.cli.helper import resolve_project_id, resolve_api_key
15
16
  from meshagent.cli import async_typer
16
- from meshagent.cli.helper import get_client, resolve_token_jwt
17
+ from meshagent.cli.helper import get_client, resolve_token_jwt, resolve_room
17
18
 
18
19
  app = async_typer.AsyncTyper()
19
20
 
@@ -21,9 +22,9 @@ app = async_typer.AsyncTyper()
21
22
  @app.async_command("ask")
22
23
  async def ask(
23
24
  *,
24
- project_id: str = None,
25
- room: Annotated[str, typer.Option()],
26
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
25
+ project_id: ProjectIdOption = None,
26
+ room: RoomOption,
27
+ api_key_id: ApiKeyIdOption = None,
27
28
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
28
29
  role: str = "user",
29
30
  agent: Annotated[str, typer.Option()],
@@ -39,6 +40,7 @@ async def ask(
39
40
  try:
40
41
  project_id = await resolve_project_id(project_id=project_id)
41
42
  api_key_id = await resolve_api_key(project_id, api_key_id)
43
+ room = resolve_room(room)
42
44
 
43
45
  key = (
44
46
  await account_client.decrypt_project_api_key(
@@ -93,10 +95,10 @@ async def ask(
93
95
  @app.async_command("invoke-tool")
94
96
  async def invoke_tool(
95
97
  *,
96
- project_id: str = None,
97
- room: Annotated[str, typer.Option()],
98
+ project_id: ProjectIdOption = None,
99
+ room: RoomOption,
98
100
  token_path: Annotated[Optional[str], typer.Option()] = None,
99
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
101
+ api_key_id: ApiKeyIdOption = None,
100
102
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
101
103
  role: str = "user",
102
104
  toolkit: Annotated[str, typer.Option(..., help="Toolkit name")],
@@ -129,6 +131,7 @@ async def invoke_tool(
129
131
  try:
130
132
  project_id = await resolve_project_id(project_id=project_id)
131
133
  api_key_id = await resolve_api_key(project_id, api_key_id)
134
+ room = resolve_room(room)
132
135
 
133
136
  jwt = await resolve_token_jwt(
134
137
  project_id=project_id,
@@ -189,10 +192,10 @@ async def invoke_tool(
189
192
  @app.async_command("list-agents")
190
193
  async def list_agents_command(
191
194
  *,
192
- project_id: str = None,
193
- room: Annotated[str, typer.Option()],
195
+ project_id: ProjectIdOption = None,
196
+ room: RoomOption,
194
197
  token_path: Annotated[Optional[str], typer.Option()] = None,
195
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
198
+ api_key_id: ApiKeyIdOption = None,
196
199
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
197
200
  role: str = "user",
198
201
  ):
@@ -203,6 +206,8 @@ async def list_agents_command(
203
206
  try:
204
207
  project_id = await resolve_project_id(project_id=project_id)
205
208
  api_key_id = await resolve_api_key(project_id, api_key_id)
209
+ room = resolve_room(room)
210
+
206
211
  jwt = await resolve_token_jwt(
207
212
  project_id=project_id,
208
213
  api_key_id=api_key_id,
@@ -243,10 +248,10 @@ async def list_agents_command(
243
248
  @app.async_command("list-toolkits")
244
249
  async def list_toolkits_command(
245
250
  *,
246
- project_id: str = None,
247
- room: Annotated[str, typer.Option()],
251
+ project_id: ProjectIdOption = None,
252
+ room: RoomOption,
248
253
  token_path: Annotated[Optional[str], typer.Option()] = None,
249
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
254
+ api_key_id: ApiKeyIdOption = None,
250
255
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
251
256
  role: str = "user",
252
257
  participant_id: Annotated[
@@ -260,6 +265,7 @@ async def list_toolkits_command(
260
265
  try:
261
266
  project_id = await resolve_project_id(project_id=project_id)
262
267
  api_key_id = await resolve_api_key(project_id, api_key_id)
268
+ room = resolve_room(room)
263
269
  jwt = await resolve_token_jwt(
264
270
  project_id=project_id,
265
271
  api_key_id=api_key_id,
@@ -1,10 +1,17 @@
1
1
  import typer
2
2
  import json
3
3
  from rich import print
4
- from typing import Annotated
4
+
5
+ from meshagent.cli.common_options import ProjectIdOption
5
6
  from meshagent.cli import async_typer
6
- from meshagent.cli.helper import get_client, print_json_table
7
- from meshagent.cli.helper import resolve_project_id, set_active_api_key
7
+ from meshagent.cli.helper import (
8
+ get_client,
9
+ print_json_table,
10
+ resolve_project_id,
11
+ set_active_api_key,
12
+ )
13
+ from meshagent.cli.common_options import OutputFormatOption
14
+
8
15
 
9
16
  app = async_typer.AsyncTyper(help="Manage or activate api-keys for your project")
10
17
 
@@ -12,15 +19,8 @@ app = async_typer.AsyncTyper(help="Manage or activate api-keys for your project"
12
19
  @app.async_command("list")
13
20
  async def list(
14
21
  *,
15
- project_id: str = None,
16
- o: Annotated[
17
- str,
18
- typer.Option(
19
- "--output",
20
- "-o",
21
- help="output format [json|table]",
22
- ),
23
- ] = "table",
22
+ project_id: ProjectIdOption = None,
23
+ o: OutputFormatOption = "table",
24
24
  ):
25
25
  project_id = await resolve_project_id(project_id=project_id)
26
26
  client = await get_client()
@@ -39,7 +39,9 @@ async def list(
39
39
 
40
40
 
41
41
  @app.async_command("create")
42
- async def create(*, project_id: str = None, name: str, description: str = ""):
42
+ async def create(
43
+ *, project_id: ProjectIdOption = None, name: str, description: str = ""
44
+ ):
43
45
  project_id = await resolve_project_id(project_id=project_id)
44
46
 
45
47
  client = await get_client()
@@ -51,7 +53,7 @@ async def create(*, project_id: str = None, name: str, description: str = ""):
51
53
 
52
54
 
53
55
  @app.async_command("delete")
54
- async def delete(*, project_id: str = None, id: str):
56
+ async def delete(*, project_id: ProjectIdOption = None, id: str):
55
57
  project_id = await resolve_project_id(project_id=project_id)
56
58
 
57
59
  client = await get_client()
@@ -60,7 +62,7 @@ async def delete(*, project_id: str = None, id: str):
60
62
 
61
63
 
62
64
  @app.async_command("show")
63
- async def show(*, project_id: str = None, api_key_id: str):
65
+ async def show(*, project_id: ProjectIdOption = None, api_key_id: str):
64
66
  client = await get_client()
65
67
  try:
66
68
  project_id = await resolve_project_id(project_id=project_id)
@@ -76,7 +78,7 @@ async def show(*, project_id: str = None, api_key_id: str):
76
78
  @app.async_command("activate")
77
79
  async def activate(
78
80
  api_key_id: str | None = typer.Argument(None),
79
- project_id: str = None,
81
+ project_id: ProjectIdOption = None,
80
82
  interactive: bool = typer.Option(
81
83
  False,
82
84
  "-i",
@@ -1,6 +1,7 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
4
5
  import json
5
6
  import aiohttp
6
7
  from meshagent.api import (
@@ -13,7 +14,7 @@ from meshagent.api.helpers import meshagent_base_url, websocket_room_url
13
14
  from meshagent.api.services import send_webhook
14
15
  from meshagent.cli import async_typer
15
16
  from meshagent.cli.helper import get_client, resolve_project_id
16
- from meshagent.cli.helper import resolve_api_key
17
+ from meshagent.cli.helper import resolve_api_key, resolve_room
17
18
  from urllib.parse import urlparse
18
19
  from pathlib import PurePath
19
20
  import socket
@@ -69,9 +70,9 @@ def is_local_url(url: str) -> bool:
69
70
  @app.async_command("tool")
70
71
  async def make_call(
71
72
  *,
72
- project_id: str = None,
73
- room: Annotated[str, typer.Option()],
74
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
73
+ project_id: ProjectIdOption = None,
74
+ room: RoomOption,
75
+ api_key_id: ApiKeyIdOption = None,
75
76
  role: str = "agent",
76
77
  local: Optional[bool] = None,
77
78
  agent_name: Annotated[
@@ -109,6 +110,7 @@ async def make_call(
109
110
  try:
110
111
  project_id = await resolve_project_id(project_id=project_id)
111
112
  api_key_id = await resolve_api_key(project_id, api_key_id)
113
+ room = resolve_room(room)
112
114
 
113
115
  key = (
114
116
  await account_client.decrypt_project_api_key(
@@ -1,6 +1,11 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import (
5
+ ProjectIdOption,
6
+ ApiKeyIdOption,
7
+ RoomOption,
8
+ )
4
9
  from meshagent.tools import Toolkit
5
10
  from meshagent.api import RoomClient, WebSocketClientProtocol
6
11
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
@@ -118,9 +123,9 @@ def build_chatbot(
118
123
  @app.async_command("join")
119
124
  async def make_call(
120
125
  *,
121
- project_id: str = None,
122
- room: Annotated[Optional[str], typer.Option()] = None,
123
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
126
+ project_id: ProjectIdOption = None,
127
+ room: RoomOption = None,
128
+ api_key_id: ApiKeyIdOption = None,
124
129
  role: str = "agent",
125
130
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
126
131
  token_path: Annotated[Optional[str], typer.Option()] = None,
@@ -157,7 +162,6 @@ async def make_call(
157
162
  try:
158
163
  project_id = await resolve_project_id(project_id=project_id)
159
164
  api_key_id = await resolve_api_key(project_id, api_key_id)
160
-
161
165
  room = resolve_room(room)
162
166
  jwt = await resolve_token_jwt(
163
167
  project_id=project_id,
@@ -215,7 +219,7 @@ async def make_call(
215
219
  @app.async_command("service")
216
220
  async def service(
217
221
  *,
218
- room: Annotated[Optional[str], typer.Option()] = None,
222
+ room: RoomOption = None,
219
223
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
220
224
  rule: Annotated[List[str], typer.Option("--rule", "-r", help="a system rule")] = [],
221
225
  rules_file: Optional[str] = None,
@@ -5,6 +5,7 @@ from mcp.client.stdio import stdio_client, StdioServerParameters
5
5
  import typer
6
6
  from rich import print
7
7
  from typing import Annotated, Optional, List
8
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
8
9
 
9
10
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
10
11
  from meshagent.api import RoomClient, WebSocketClientProtocol, RoomException
@@ -33,10 +34,10 @@ app = async_typer.AsyncTyper()
33
34
  @app.async_command("sse")
34
35
  async def sse(
35
36
  *,
36
- project_id: str = None,
37
- room: Annotated[str, typer.Option()],
37
+ project_id: ProjectIdOption = None,
38
+ room: RoomOption,
38
39
  token_path: Annotated[Optional[str], typer.Option()] = None,
39
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
40
+ api_key_id: ApiKeyIdOption = None,
40
41
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
41
42
  role: str = "tool",
42
43
  url: Annotated[str, typer.Option()],
@@ -49,7 +50,6 @@ async def sse(
49
50
  try:
50
51
  project_id = await resolve_project_id(project_id=project_id)
51
52
  api_key_id = await resolve_api_key(project_id, api_key_id)
52
-
53
53
  room = resolve_room(room)
54
54
  jwt = await resolve_token_jwt(
55
55
  project_id=project_id,
@@ -101,10 +101,10 @@ async def sse(
101
101
  @app.async_command("stdio")
102
102
  async def stdio(
103
103
  *,
104
- project_id: str = None,
105
- room: Annotated[str, typer.Option()],
104
+ project_id: ProjectIdOption = None,
105
+ room: RoomOption,
106
106
  token_path: Annotated[Optional[str], typer.Option()] = None,
107
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
107
+ api_key_id: ApiKeyIdOption = None,
108
108
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
109
109
  role: str = "tool",
110
110
  command: Annotated[str, typer.Option()],
@@ -118,7 +118,6 @@ async def stdio(
118
118
  try:
119
119
  project_id = await resolve_project_id(project_id=project_id)
120
120
  api_key_id = await resolve_api_key(project_id, api_key_id)
121
-
122
121
  room = resolve_room(room)
123
122
  jwt = await resolve_token_jwt(
124
123
  project_id=project_id,
@@ -3,7 +3,8 @@
3
3
  # --------------------------------------------------------------------------
4
4
  import typer
5
5
  from rich import print
6
- from typing import Annotated, Dict, Optional
6
+ from typing import Annotated, Dict
7
+ from meshagent.cli.common_options import ProjectIdOption
7
8
 
8
9
  from meshagent.cli import async_typer
9
10
  from meshagent.cli.helper import get_client, print_json_table, resolve_project_id
@@ -52,7 +53,7 @@ keys_app = async_typer.AsyncTyper(
52
53
  @keys_app.async_command("create")
53
54
  async def create_keys_secret(
54
55
  *,
55
- project_id: Optional[str] = typer.Option(None),
56
+ project_id: ProjectIdOption = None,
56
57
  name: Annotated[str, typer.Option(help="Secret name")],
57
58
  data: Annotated[
58
59
  str,
@@ -85,7 +86,7 @@ async def create_keys_secret(
85
86
  @keys_app.async_command("update")
86
87
  async def update_keys_secret(
87
88
  *,
88
- project_id: Optional[str] = typer.Option(None),
89
+ project_id: ProjectIdOption = None,
89
90
  secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
90
91
  name: Annotated[str, typer.Option(help="Secret name")],
91
92
  data: Annotated[
@@ -127,7 +128,7 @@ docker_app = async_typer.AsyncTyper(
127
128
  @docker_app.async_command("create")
128
129
  async def create_docker_secret(
129
130
  *,
130
- project_id: Optional[str] = typer.Option(None),
131
+ project_id: ProjectIdOption = None,
131
132
  name: Annotated[str, typer.Option(help="Secret name")],
132
133
  server: Annotated[
133
134
  str, typer.Option(help="Docker registry server, e.g. index.docker.io")
@@ -165,7 +166,7 @@ async def create_docker_secret(
165
166
  @docker_app.async_command("update")
166
167
  async def update_docker_secret(
167
168
  *,
168
- project_id: Optional[str] = typer.Option(None),
169
+ project_id: ProjectIdOption = None,
169
170
  secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
170
171
  name: Annotated[str, typer.Option(help="Secret name")],
171
172
  server: Annotated[str, typer.Option(help="Docker registry server")],
@@ -210,7 +211,7 @@ acr_app = async_typer.AsyncTyper(
210
211
  @acr_app.async_command("create")
211
212
  async def create_acr_secret(
212
213
  *,
213
- project_id: Optional[str] = typer.Option(None),
214
+ project_id: ProjectIdOption = None,
214
215
  name: Annotated[str, typer.Option(help="Secret name")],
215
216
  server: Annotated[str, typer.Option(help="ACR server, e.g. myregistry.azurecr.io")],
216
217
  username: Annotated[str, typer.Option(help="Service principal ID")],
@@ -240,7 +241,7 @@ async def create_acr_secret(
240
241
  @acr_app.async_command("update")
241
242
  async def update_acr_secret(
242
243
  *,
243
- project_id: Optional[str] = typer.Option(None),
244
+ project_id: ProjectIdOption = None,
244
245
  secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
245
246
  name: Annotated[str, typer.Option(help="Secret name")],
246
247
  server: Annotated[str, typer.Option(help="ACR server, e.g. myregistry.azurecr.io")],
@@ -280,7 +281,7 @@ gar_app = async_typer.AsyncTyper(
280
281
  @gar_app.async_command("create")
281
282
  async def create_gar_secret(
282
283
  *,
283
- project_id: Optional[str] = typer.Option(None),
284
+ project_id: ProjectIdOption = None,
284
285
  name: Annotated[str, typer.Option(help="Secret name")],
285
286
  server: Annotated[str, typer.Option(help="GAR host, e.g. us-west1-docker.pkg.dev")],
286
287
  json_key: Annotated[
@@ -313,7 +314,7 @@ async def create_gar_secret(
313
314
  @gar_app.async_command("update")
314
315
  async def update_gar_secret(
315
316
  *,
316
- project_id: Optional[str] = typer.Option(None),
317
+ project_id: ProjectIdOption = None,
317
318
  secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
318
319
  name: Annotated[str, typer.Option(help="Secret name")],
319
320
  server: Annotated[str, typer.Option(help="GAR host, e.g. us-west1-docker.pkg.dev")],
@@ -347,7 +348,7 @@ async def update_gar_secret(
347
348
 
348
349
 
349
350
  @secrets_app.async_command("list")
350
- async def secret_list(*, project_id: Optional[str] = None):
351
+ async def secret_list(*, project_id: ProjectIdOption = None):
351
352
  """List all secrets in the project (typed as Docker/ACR/GAR or Keys secrets)."""
352
353
  client = await get_client()
353
354
  try:
@@ -382,7 +383,7 @@ async def secret_list(*, project_id: Optional[str] = None):
382
383
  @secrets_app.async_command("delete")
383
384
  async def secret_delete(
384
385
  *,
385
- project_id: Optional[str] = None,
386
+ project_id: ProjectIdOption = None,
386
387
  secret_id: Annotated[str, typer.Argument(help="ID of the secret to delete")],
387
388
  ):
388
389
  """Delete a secret."""
@@ -0,0 +1,31 @@
1
+ import typer
2
+ from typing import Annotated, Optional
3
+
4
+ OutputFormatOption = Annotated[
5
+ str,
6
+ typer.Option("--output", "-o", help="output format [json|table]"),
7
+ ]
8
+
9
+ ProjectIdOption = Annotated[
10
+ Optional[str],
11
+ typer.Option(
12
+ "--project-id",
13
+ help="A MeshAgent project id. If empty, the activated project will be used.",
14
+ ),
15
+ ]
16
+
17
+ ApiKeyIdOption = Annotated[
18
+ Optional[str],
19
+ typer.Option(
20
+ "--api-key-id",
21
+ help="A MeshAgent project API key id. If empty, the activated api key will be used.",
22
+ ),
23
+ ]
24
+
25
+ RoomOption = Annotated[
26
+ Optional[str],
27
+ typer.Option(
28
+ "--room",
29
+ help="Room name. If empty, the MESHAGENT_ROOM environment variable will be used.",
30
+ ),
31
+ ]
@@ -2,9 +2,15 @@ import asyncio
2
2
  import json
3
3
  import typer
4
4
  from rich import print
5
- from typing import Annotated, Optional
5
+ from typing import Annotated
6
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
6
7
  from meshagent.cli import async_typer
7
- from meshagent.cli.helper import get_client, resolve_project_id, resolve_api_key
8
+ from meshagent.cli.helper import (
9
+ get_client,
10
+ resolve_project_id,
11
+ resolve_api_key,
12
+ resolve_room,
13
+ )
8
14
  from meshagent.api import RoomClient, ParticipantToken, WebSocketClientProtocol
9
15
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
10
16
 
@@ -14,14 +20,9 @@ app = async_typer.AsyncTyper()
14
20
  @app.async_command("watch")
15
21
  async def watch_logs(
16
22
  *,
17
- project_id: Annotated[
18
- Optional[str],
19
- typer.Option(
20
- ..., help="Project ID (if not set, will try to use the active project)"
21
- ),
22
- ] = None,
23
- room: Annotated[str, typer.Option(..., help="Name of the room to connect to")],
24
- api_key_id: Annotated[Optional[str], typer.Option(..., help="API Key ID")] = None,
23
+ project_id: ProjectIdOption = None,
24
+ room: RoomOption,
25
+ api_key_id: ApiKeyIdOption = None,
25
26
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
26
27
  role: Annotated[
27
28
  str, typer.Option(..., help="Role to assign to this participant")
@@ -36,6 +37,7 @@ async def watch_logs(
36
37
  # Resolve project ID (or fetch from the active project if not provided)
37
38
  project_id = await resolve_project_id(project_id=project_id)
38
39
  api_key_id = await resolve_api_key(project_id, api_key_id)
40
+ room = resolve_room(room)
39
41
 
40
42
  # Decrypt the project's API key
41
43
  key = (
@@ -5,6 +5,7 @@ from meshagent.api.websocket_protocol import WebSocketClientProtocol
5
5
  from meshagent.api import RoomClient
6
6
  from meshagent.api.helpers import websocket_room_url
7
7
  from typing import Annotated, Optional
8
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
8
9
  import asyncio
9
10
  import typer
10
11
  from rich import print
@@ -23,6 +24,7 @@ from meshagent.cli.helper import (
23
24
  get_client,
24
25
  resolve_project_id,
25
26
  resolve_api_key,
27
+ resolve_room,
26
28
  )
27
29
 
28
30
 
@@ -30,11 +32,11 @@ def register(app: typer.Typer):
30
32
  @app.async_command("exec")
31
33
  async def exec_command(
32
34
  *,
33
- project_id: str = None,
34
- room: Annotated[str, typer.Option()],
35
+ project_id: ProjectIdOption = None,
36
+ room: RoomOption,
35
37
  name: Annotated[Optional[str], typer.Option()] = None,
36
38
  image: Annotated[Optional[str], typer.Option()] = None,
37
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
39
+ api_key_id: ApiKeyIdOption = None,
38
40
  command: Annotated[list[str], typer.Argument(...)] = None,
39
41
  tty: bool = False,
40
42
  room_storage_path: str = "/data",
@@ -46,6 +48,7 @@ def register(app: typer.Typer):
46
48
  api_key_id = await resolve_api_key(
47
49
  project_id=project_id, api_key_id=api_key_id
48
50
  )
51
+ room = resolve_room(room)
49
52
 
50
53
  token = ParticipantToken(
51
54
  name="tty", project_id=project_id, api_key_id=api_key_id
@@ -4,7 +4,6 @@ from rich.table import Table
4
4
  from pydantic import BaseModel
5
5
  from pathlib import Path
6
6
  from typing import Optional
7
-
8
7
  from meshagent.cli import auth_async
9
8
  from meshagent.cli import async_typer
10
9
  from meshagent.api.helpers import meshagent_base_url
@@ -4,6 +4,11 @@ import typer
4
4
  from meshagent.api import ParticipantToken
5
5
  from rich import print
6
6
  from typing import Annotated, Optional
7
+ from meshagent.cli.common_options import (
8
+ ProjectIdOption,
9
+ ApiKeyIdOption,
10
+ RoomOption,
11
+ )
7
12
  from meshagent.tools import Toolkit
8
13
  from meshagent.api import RoomClient, WebSocketClientProtocol
9
14
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
@@ -118,9 +123,9 @@ def build_mailbot(
118
123
  @app.async_command("join")
119
124
  async def make_call(
120
125
  *,
121
- project_id: str = None,
122
- room: Annotated[Optional[str], typer.Option()] = None,
123
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
126
+ project_id: ProjectIdOption = None,
127
+ room: RoomOption = None,
128
+ api_key_id: ApiKeyIdOption = None,
124
129
  role: str = "agent",
125
130
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
126
131
  token_path: Annotated[Optional[str], typer.Option()] = None,
@@ -205,7 +210,7 @@ async def make_call(
205
210
  @app.async_command("service")
206
211
  async def service(
207
212
  *,
208
- room: Annotated[Optional[str], typer.Option()] = None,
213
+ room: RoomOption = None,
209
214
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
210
215
  rule: Annotated[List[str], typer.Option("--rule", "-r", help="a system rule")] = [],
211
216
  rules_file: Optional[str] = None,
@@ -1,6 +1,11 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import (
5
+ ProjectIdOption,
6
+ ApiKeyIdOption,
7
+ RoomOption,
8
+ )
4
9
  import json
5
10
 
6
11
  from meshagent.api import RoomClient, WebSocketClientProtocol
@@ -20,10 +25,10 @@ app = async_typer.AsyncTyper()
20
25
  @app.async_command("list-participants")
21
26
  async def messaging_list_participants_command(
22
27
  *,
23
- project_id: str = None,
24
- room: Annotated[Optional[str], typer.Option()] = None,
28
+ project_id: ProjectIdOption = None,
29
+ room: RoomOption = None,
25
30
  token_path: Annotated[Optional[str], typer.Option()] = None,
26
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
31
+ api_key_id: ApiKeyIdOption = None,
27
32
  name: Annotated[str, typer.Option()] = "cli",
28
33
  role: str = "user",
29
34
  ):
@@ -74,10 +79,10 @@ async def messaging_list_participants_command(
74
79
  @app.async_command("send")
75
80
  async def messaging_send_command(
76
81
  *,
77
- project_id: str = None,
78
- room: Annotated[Optional[str], typer.Option()] = None,
82
+ project_id: ProjectIdOption = None,
83
+ room: RoomOption = None,
79
84
  token_path: Annotated[Optional[str], typer.Option()] = None,
80
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
85
+ api_key_id: ApiKeyIdOption = None,
81
86
  name: Annotated[str, typer.Option()] = "cli",
82
87
  role: str = "user",
83
88
  to_participant_id: Annotated[
@@ -145,10 +150,10 @@ async def messaging_send_command(
145
150
  @app.async_command("broadcast")
146
151
  async def messaging_broadcast_command(
147
152
  *,
148
- project_id: str = None,
149
- room: Annotated[Optional[str], typer.Option()] = None,
153
+ project_id: ProjectIdOption = None,
154
+ room: RoomOption = None,
150
155
  token_path: Annotated[Optional[str], typer.Option()] = None,
151
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
156
+ api_key_id: ApiKeyIdOption = None,
152
157
  name: Annotated[str, typer.Option()] = "cli",
153
158
  role: str = "user",
154
159
  data: Annotated[str, typer.Option(..., help="JSON message to broadcast")],
@@ -1,8 +1,9 @@
1
1
  import typer
2
2
  from rich import print
3
- from typing import Annotated, Optional
3
+ from typing import Annotated
4
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
4
5
  from meshagent.api import ParticipantToken
5
- from meshagent.cli.helper import resolve_project_id, resolve_api_key
6
+ from meshagent.cli.helper import resolve_project_id, resolve_api_key, resolve_room
6
7
  from meshagent.cli import async_typer
7
8
  from meshagent.cli.helper import get_client
8
9
  import pathlib
@@ -13,10 +14,10 @@ app = async_typer.AsyncTyper()
13
14
  @app.async_command("generate")
14
15
  async def generate(
15
16
  *,
16
- project_id: str = None,
17
+ project_id: ProjectIdOption = None,
17
18
  token_path: Annotated[str, typer.Option()],
18
- room: Annotated[str, typer.Option()],
19
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
19
+ room: RoomOption,
20
+ api_key_id: ApiKeyIdOption = None,
20
21
  name: Annotated[str, typer.Option()],
21
22
  role: str = "agent",
22
23
  ):
@@ -24,7 +25,7 @@ async def generate(
24
25
  try:
25
26
  project_id = await resolve_project_id(project_id=project_id)
26
27
  api_key_id = await resolve_api_key(project_id=project_id, api_key_id=api_key_id)
27
-
28
+ room = resolve_room(room)
28
29
  key = (
29
30
  await client.decrypt_project_api_key(project_id=project_id, id=api_key_id)
30
31
  )["token"]
@@ -1,6 +1,5 @@
1
1
  import typer
2
2
  from rich import print
3
- from typing import Annotated
4
3
  from meshagent.cli import async_typer
5
4
  from meshagent.cli.helper import (
6
5
  get_client,
@@ -8,6 +7,7 @@ from meshagent.cli.helper import (
8
7
  set_active_project,
9
8
  get_active_project,
10
9
  )
10
+ from meshagent.cli.common_options import OutputFormatOption
11
11
 
12
12
  app = async_typer.AsyncTyper(help="Manage or activate your meshagent projects")
13
13
 
@@ -24,14 +24,7 @@ async def create(name: str):
24
24
 
25
25
  @app.async_command("list")
26
26
  async def list(
27
- o: Annotated[
28
- str,
29
- typer.Option(
30
- "--output",
31
- "-o",
32
- help="output format [json|table]",
33
- ),
34
- ] = "table",
27
+ o: OutputFormatOption = "table",
35
28
  ):
36
29
  client = await get_client()
37
30
  projects = await client.list_projects()
@@ -1,6 +1,7 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
4
5
  import json as _json
5
6
 
6
7
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
@@ -10,7 +11,7 @@ from meshagent.api import (
10
11
  WebSocketClientProtocol,
11
12
  RoomException,
12
13
  )
13
- from meshagent.cli.helper import resolve_project_id, resolve_api_key
14
+ from meshagent.cli.helper import resolve_project_id, resolve_api_key, resolve_room
14
15
  from meshagent.cli import async_typer
15
16
  from meshagent.cli.helper import get_client
16
17
 
@@ -20,9 +21,9 @@ app = async_typer.AsyncTyper(help="Use queues in a room")
20
21
  @app.async_command("send")
21
22
  async def send(
22
23
  *,
23
- project_id: str = None,
24
- room: Annotated[str, typer.Option()],
25
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
24
+ project_id: ProjectIdOption = None,
25
+ room: RoomOption,
26
+ api_key_id: ApiKeyIdOption = None,
26
27
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
27
28
  role: str = "user",
28
29
  queue: Annotated[str, typer.Option(..., help="Queue name")],
@@ -36,6 +37,7 @@ async def send(
36
37
  try:
37
38
  project_id = await resolve_project_id(project_id=project_id)
38
39
  api_key_id = await resolve_api_key(project_id, api_key_id)
40
+ room = resolve_room(room)
39
41
 
40
42
  key = (
41
43
  await account_client.decrypt_project_api_key(
@@ -74,9 +76,9 @@ async def send(
74
76
  @app.async_command("receive")
75
77
  async def receive(
76
78
  *,
77
- project_id: str = None,
78
- room: Annotated[str, typer.Option()],
79
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
79
+ project_id: ProjectIdOption = None,
80
+ room: RoomOption,
81
+ api_key_id: ApiKeyIdOption = None,
80
82
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
81
83
  role: str = "user",
82
84
  queue: Annotated[str, typer.Option(..., help="Queue name")],
@@ -85,6 +87,7 @@ async def receive(
85
87
  try:
86
88
  project_id = await resolve_project_id(project_id=project_id)
87
89
  api_key_id = await resolve_api_key(project_id, api_key_id)
90
+ room = resolve_room(room)
88
91
 
89
92
  key = (
90
93
  await account_client.decrypt_project_api_key(
@@ -4,6 +4,7 @@
4
4
  import typer
5
5
  from rich import print
6
6
  from typing import Annotated, List, Optional, Dict
7
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption
7
8
  from aiohttp import ClientResponseError
8
9
  from datetime import datetime, timezone
9
10
  from pydantic import PositiveInt
@@ -18,6 +19,7 @@ from meshagent.cli.helper import (
18
19
  print_json_table,
19
20
  resolve_project_id,
20
21
  resolve_api_key,
22
+ resolve_room,
21
23
  )
22
24
  from meshagent.api import (
23
25
  ParticipantToken,
@@ -26,6 +28,7 @@ from meshagent.api import (
26
28
  websocket_room_url,
27
29
  meshagent_base_url,
28
30
  )
31
+ from meshagent.cli.common_options import OutputFormatOption
29
32
 
30
33
  from pydantic_yaml import parse_yaml_raw_as
31
34
 
@@ -92,7 +95,7 @@ def _parse_port_spec(spec: str) -> PortSpec:
92
95
  @app.async_command("create")
93
96
  async def service_create(
94
97
  *,
95
- project_id: str = None,
98
+ project_id: ProjectIdOption = None,
96
99
  file: Annotated[
97
100
  Optional[str],
98
101
  typer.Option("--file", "-f", help="File path to a service definition"),
@@ -200,7 +203,7 @@ async def service_create(
200
203
  @app.async_command("update")
201
204
  async def service_update(
202
205
  *,
203
- project_id: str = None,
206
+ project_id: ProjectIdOption = None,
204
207
  id: Optional[str] = None,
205
208
  file: Annotated[
206
209
  Optional[str],
@@ -332,8 +335,8 @@ async def service_update(
332
335
  @app.async_command("test")
333
336
  async def service_test(
334
337
  *,
335
- project_id: str = None,
336
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
338
+ project_id: ProjectIdOption = None,
339
+ api_key_id: ApiKeyIdOption = None,
337
340
  file: Annotated[
338
341
  Optional[str],
339
342
  typer.Option("--file", "-f", help="File path to a service definition"),
@@ -388,8 +391,8 @@ async def service_test(
388
391
  my_client = await get_client()
389
392
  try:
390
393
  project_id = await resolve_project_id(project_id)
391
-
392
394
  api_key_id = await resolve_api_key(project_id, api_key_id)
395
+ room = resolve_room(room)
393
396
 
394
397
  if file is not None:
395
398
  with open(file, "rb") as f:
@@ -467,7 +470,7 @@ async def service_test(
467
470
  @app.async_command("show")
468
471
  async def service_show(
469
472
  *,
470
- project_id: str = None,
473
+ project_id: ProjectIdOption = None,
471
474
  service_id: Annotated[str, typer.Argument(help="ID of the service to delete")],
472
475
  ):
473
476
  """Show a services for the project."""
@@ -485,10 +488,8 @@ async def service_show(
485
488
  @app.async_command("list")
486
489
  async def service_list(
487
490
  *,
488
- project_id: str = None,
489
- o: Annotated[
490
- str, typer.Option("--output", "-o", help="output format [json|table]")
491
- ] = "table",
491
+ project_id: ProjectIdOption = None,
492
+ o: OutputFormatOption = "table",
492
493
  ):
493
494
  """List all services for the project."""
494
495
  client = await get_client()
@@ -511,7 +512,7 @@ async def service_list(
511
512
  @app.async_command("delete")
512
513
  async def service_delete(
513
514
  *,
514
- project_id: Optional[str] = None,
515
+ project_id: ProjectIdOption = None,
515
516
  service_id: Annotated[str, typer.Argument(help="ID of the service to delete")],
516
517
  ):
517
518
  """Delete a service."""
@@ -1,11 +1,12 @@
1
1
  from meshagent.cli import async_typer
2
2
  from meshagent.cli.helper import get_client, print_json_table, resolve_project_id
3
+ from meshagent.cli.common_options import ProjectIdOption
3
4
 
4
5
  app = async_typer.AsyncTyper()
5
6
 
6
7
 
7
8
  @app.async_command("list")
8
- async def list(*, project_id: str = None):
9
+ async def list(*, project_id: ProjectIdOption = None):
9
10
  client = await get_client()
10
11
  sessions = await client.list_recent_sessions(
11
12
  project_id=await resolve_project_id(project_id=project_id)
@@ -15,7 +16,7 @@ async def list(*, project_id: str = None):
15
16
 
16
17
 
17
18
  @app.async_command("show")
18
- async def show(*, project_id: str = None, session_id: str):
19
+ async def show(*, project_id: ProjectIdOption = None, session_id: str):
19
20
  client = await get_client()
20
21
  events = await client.list_session_events(
21
22
  project_id=await resolve_project_id(project_id=project_id),
@@ -1,5 +1,6 @@
1
1
  import typer
2
2
  from typing import Annotated, Optional
3
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
3
4
  from rich import print
4
5
  import os
5
6
  import fnmatch
@@ -56,10 +57,10 @@ def split_glob_subpath(subpath: str):
56
57
  @app.async_command("exists")
57
58
  async def storage_exists_command(
58
59
  *,
59
- project_id: str = None,
60
- room: Annotated[str, typer.Option(..., help="Room name")],
60
+ project_id: ProjectIdOption = None,
61
+ room: RoomOption,
61
62
  token_path: Annotated[Optional[str], typer.Option()] = None,
62
- api_key_id: Annotated[Optional[str], typer.Option(..., help="API Key ID")] = None,
63
+ api_key_id: ApiKeyIdOption = None,
63
64
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
64
65
  role: str = "user",
65
66
  path: str,
@@ -102,14 +103,10 @@ async def storage_exists_command(
102
103
  @app.async_command("cp")
103
104
  async def storage_cp_command(
104
105
  *,
105
- project_id: str = None,
106
- room: Annotated[
107
- str, typer.Option(..., help="Room name (if copying to/from remote)")
108
- ],
106
+ project_id: ProjectIdOption = None,
107
+ room: RoomOption = None,
109
108
  token_path: Annotated[Optional[str], typer.Option()] = None,
110
- api_key_id: Annotated[
111
- str, typer.Option(..., help="API Key ID (if copying to/from remote)")
112
- ] = None,
109
+ api_key_id: ApiKeyIdOption = None,
113
110
  name: Annotated[
114
111
  str, typer.Option(..., help="Participant name (if copying to/from remote)")
115
112
  ] = "cli",
@@ -351,16 +348,10 @@ async def storage_cp_command(
351
348
  @app.async_command("show")
352
349
  async def storage_show_command(
353
350
  *,
354
- project_id: Annotated[
355
- Optional[str], typer.Option(..., help="Project ID (if remote)")
356
- ] = None,
357
- room: Annotated[
358
- Optional[str], typer.Option(..., help="Room name (if remote)")
359
- ] = None,
351
+ project_id: ProjectIdOption = None,
352
+ room: RoomOption = None,
360
353
  token_path: Annotated[Optional[str], typer.Option()] = None,
361
- api_key_id: Annotated[
362
- Optional[str], typer.Option(..., help="API Key ID (if remote)")
363
- ] = None,
354
+ api_key_id: ApiKeyIdOption = None,
364
355
  name: Annotated[
365
356
  Optional[str], typer.Option(..., help="Participant name (if remote)")
366
357
  ] = None,
@@ -444,16 +435,10 @@ async def storage_show_command(
444
435
  @app.async_command("rm")
445
436
  async def storage_rm_command(
446
437
  *,
447
- project_id: Annotated[
448
- Optional[str], typer.Option(..., help="Project ID (if remote)")
449
- ] = None,
450
- room: Annotated[
451
- Optional[str], typer.Option(..., help="Room name (if remote)")
452
- ] = None,
438
+ project_id: ProjectIdOption = None,
439
+ room: RoomOption = None,
453
440
  token_path: Annotated[Optional[str], typer.Option()] = None,
454
- api_key_id: Annotated[
455
- Optional[str], typer.Option(..., help="API Key ID (if remote)")
456
- ] = None,
441
+ api_key_id: ApiKeyIdOption = None,
457
442
  name: Annotated[
458
443
  Optional[str], typer.Option(..., help="Participant name (if remote)")
459
444
  ] = None,
@@ -665,16 +650,10 @@ async def storage_rm_command(
665
650
  @app.async_command("ls")
666
651
  async def storage_ls_command(
667
652
  *,
668
- project_id: Annotated[
669
- Optional[str], typer.Option(..., help="Project ID (if remote)")
670
- ] = None,
671
- room: Annotated[
672
- Optional[str], typer.Option(..., help="Room name (if remote)")
673
- ] = None,
653
+ project_id: ProjectIdOption = None,
654
+ room: RoomOption = None,
674
655
  token_path: Annotated[Optional[str], typer.Option()] = None,
675
- api_key_id: Annotated[
676
- Optional[str], typer.Option(..., help="API Key ID (if remote)")
677
- ] = None,
656
+ api_key_id: ApiKeyIdOption = None,
678
657
  name: Annotated[
679
658
  Optional[str], typer.Option(..., help="Participant name (if remote)")
680
659
  ] = None,
@@ -698,6 +677,8 @@ async def storage_ls_command(
698
677
  client = None
699
678
  storage_client: Optional[StorageClient] = None
700
679
 
680
+ room = resolve_room(room)
681
+
701
682
  # --- Set up remote connection if needed ---
702
683
  async def ensure_storage_client():
703
684
  nonlocal account_client, client, storage_client, project_id, api_key_id
@@ -0,0 +1 @@
1
+ __version__ = "0.5.3"
@@ -1,6 +1,7 @@
1
1
  import typer
2
2
  from rich import print
3
3
  from typing import Annotated, Optional
4
+ from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
4
5
  from meshagent.api import RoomClient, WebSocketClientProtocol, RoomException
5
6
  from meshagent.api.helpers import meshagent_base_url, websocket_room_url
6
7
  from meshagent.cli import async_typer
@@ -35,9 +36,9 @@ app = async_typer.AsyncTyper(help="Join a voicebot to a room")
35
36
  @app.async_command("join")
36
37
  async def make_call(
37
38
  *,
38
- project_id: str = None,
39
- room: Annotated[Optional[str], typer.Option()] = None,
40
- api_key_id: Annotated[Optional[str], typer.Option()] = None,
39
+ project_id: ProjectIdOption = None,
40
+ room: RoomOption = None,
41
+ api_key_id: ApiKeyIdOption = None,
41
42
  name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
42
43
  role: str = "agent",
43
44
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
@@ -59,7 +60,6 @@ async def make_call(
59
60
  try:
60
61
  project_id = await resolve_project_id(project_id=project_id)
61
62
  api_key_id = await resolve_api_key(project_id, api_key_id)
62
-
63
63
  room = resolve_room(room)
64
64
  jwt = await resolve_token_jwt(
65
65
  project_id=project_id,
@@ -118,7 +118,7 @@ async def make_call(
118
118
  @app.async_command("service")
119
119
  async def service(
120
120
  *,
121
- project_id: str = None,
121
+ project_id: ProjectIdOption = None,
122
122
  agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
123
123
  rule: Annotated[List[str], typer.Option("--rule", "-r", help="a system rule")] = [],
124
124
  rules_file: Optional[str] = None,
@@ -2,6 +2,7 @@ import typer
2
2
  from rich import print
3
3
  import json
4
4
  from typing import Annotated, List, Optional
5
+ from meshagent.cli.common_options import ProjectIdOption
5
6
 
6
7
  from meshagent.cli import async_typer
7
8
  from meshagent.cli.helper import get_client, print_json_table, resolve_project_id
@@ -16,7 +17,7 @@ app = async_typer.AsyncTyper()
16
17
  @app.async_command("create")
17
18
  async def webhook_create(
18
19
  *,
19
- project_id: str = None,
20
+ project_id: ProjectIdOption = None,
20
21
  name: Annotated[str, typer.Option(help="Friendly name for the webhook")],
21
22
  url: Annotated[str, typer.Option(help="Target URL that will receive POSTs")],
22
23
  event: Annotated[
@@ -63,7 +64,7 @@ async def webhook_create(
63
64
  @app.async_command("list")
64
65
  async def webhook_list(
65
66
  *,
66
- project_id: str = None,
67
+ project_id: ProjectIdOption = None,
67
68
  ):
68
69
  """List all webhooks for the project."""
69
70
  client = await get_client()
@@ -86,7 +87,7 @@ async def webhook_list(
86
87
  @app.async_command("delete")
87
88
  async def webhook_delete(
88
89
  *,
89
- project_id: str = None,
90
+ project_id: ProjectIdOption = None,
90
91
  webhook_id: Annotated[str, typer.Argument(help="ID of the webhook to delete")],
91
92
  ):
92
93
  """Delete a project webhook."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: CLI for Meshagent
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.meshagent.com
@@ -10,12 +10,12 @@ Requires-Python: >=3.12
10
10
  Description-Content-Type: text/markdown
11
11
  Requires-Dist: typer~=0.15
12
12
  Requires-Dist: pydantic-yaml~=1.4
13
- Requires-Dist: meshagent-api~=0.5.1
14
- Requires-Dist: meshagent-agents~=0.5.1
15
- Requires-Dist: meshagent-computers~=0.5.1
16
- Requires-Dist: meshagent-openai~=0.5.1
17
- Requires-Dist: meshagent-tools~=0.5.1
18
- Requires-Dist: meshagent-mcp~=0.5.1
13
+ Requires-Dist: meshagent-api~=0.5.3
14
+ Requires-Dist: meshagent-agents~=0.5.3
15
+ Requires-Dist: meshagent-computers~=0.5.3
16
+ Requires-Dist: meshagent-openai~=0.5.3
17
+ Requires-Dist: meshagent-tools~=0.5.3
18
+ Requires-Dist: meshagent-mcp~=0.5.3
19
19
  Requires-Dist: supabase~=2.15
20
20
  Requires-Dist: fastmcp~=2.8
21
21
  Requires-Dist: opentelemetry-distro~=0.54b1
@@ -11,6 +11,7 @@ meshagent/cli/chatbot.py
11
11
  meshagent/cli/cli.py
12
12
  meshagent/cli/cli_mcp.py
13
13
  meshagent/cli/cli_secrets.py
14
+ meshagent/cli/common_options.py
14
15
  meshagent/cli/developer.py
15
16
  meshagent/cli/exec.py
16
17
  meshagent/cli/helper.py
@@ -1,11 +1,11 @@
1
1
  typer~=0.15
2
2
  pydantic-yaml~=1.4
3
- meshagent-api~=0.5.1
4
- meshagent-agents~=0.5.1
5
- meshagent-computers~=0.5.1
6
- meshagent-openai~=0.5.1
7
- meshagent-tools~=0.5.1
8
- meshagent-mcp~=0.5.1
3
+ meshagent-api~=0.5.3
4
+ meshagent-agents~=0.5.3
5
+ meshagent-computers~=0.5.3
6
+ meshagent-openai~=0.5.3
7
+ meshagent-tools~=0.5.3
8
+ meshagent-mcp~=0.5.3
9
9
  supabase~=2.15
10
10
  fastmcp~=2.8
11
11
  opentelemetry-distro~=0.54b1
@@ -11,12 +11,12 @@ keywords = []
11
11
  dependencies = [
12
12
  "typer~=0.15",
13
13
  "pydantic-yaml~=1.4",
14
- "meshagent-api~=0.5.1",
15
- "meshagent-agents~=0.5.1",
16
- "meshagent-computers~=0.5.1",
17
- "meshagent-openai~=0.5.1",
18
- "meshagent-tools~=0.5.1",
19
- "meshagent-mcp~=0.5.1",
14
+ "meshagent-api~=0.5.3",
15
+ "meshagent-agents~=0.5.3",
16
+ "meshagent-computers~=0.5.3",
17
+ "meshagent-openai~=0.5.3",
18
+ "meshagent-tools~=0.5.3",
19
+ "meshagent-mcp~=0.5.3",
20
20
  "supabase~=2.15",
21
21
  "fastmcp~=2.8",
22
22
  "opentelemetry-distro~=0.54b1",
@@ -1 +0,0 @@
1
- __version__ = "0.5.1"
File without changes
File without changes