meshagent-cli 0.0.22__tar.gz → 0.0.24__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 (32) hide show
  1. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/PKG-INFO +5 -5
  2. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/services.py +50 -19
  3. meshagent_cli-0.0.24/meshagent/cli/version.py +1 -0
  4. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent_cli.egg-info/PKG-INFO +5 -5
  5. meshagent_cli-0.0.24/meshagent_cli.egg-info/requires.txt +7 -0
  6. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/pyproject.toml +4 -4
  7. meshagent_cli-0.0.22/meshagent/cli/version.py +0 -1
  8. meshagent_cli-0.0.22/meshagent_cli.egg-info/requires.txt +0 -7
  9. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/README.md +0 -0
  10. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/__init__.py +0 -0
  11. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/agent.py +0 -0
  12. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/api_keys.py +0 -0
  13. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/async_typer.py +0 -0
  14. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/auth.py +0 -0
  15. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/auth_async.py +0 -0
  16. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/call.py +0 -0
  17. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/cli.py +0 -0
  18. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/cli_mcp.py +0 -0
  19. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/cli_secrets.py +0 -0
  20. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/developer.py +0 -0
  21. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/helper.py +0 -0
  22. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/messaging.py +0 -0
  23. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/participant_token.py +0 -0
  24. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/projects.py +0 -0
  25. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/sessions.py +0 -0
  26. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/storage.py +0 -0
  27. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent/cli/webhook.py +0 -0
  28. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent_cli.egg-info/SOURCES.txt +0 -0
  29. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent_cli.egg-info/dependency_links.txt +0 -0
  30. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent_cli.egg-info/entry_points.txt +0 -0
  31. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/meshagent_cli.egg-info/top_level.txt +0 -0
  32. {meshagent_cli-0.0.22 → meshagent_cli-0.0.24}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.0.22
3
+ Version: 0.0.24
4
4
  Summary: CLI for Meshagent
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.meshagent.com
@@ -10,10 +10,10 @@ Requires-Python: >=3.12
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.22
14
- Requires-Dist: meshagent-agents~=0.0.22
15
- Requires-Dist: meshagent-tools~=0.0.22
16
- Requires-Dist: meshagent-mcp~=0.0.22
13
+ Requires-Dist: meshagent-api~=0.0.24
14
+ Requires-Dist: meshagent-agents~=0.0.24
15
+ Requires-Dist: meshagent-tools~=0.0.24
16
+ Requires-Dist: meshagent-mcp~=0.0.24
17
17
  Requires-Dist: supabase~=2.15.1
18
18
 
19
19
  ### Meshagent CLI
@@ -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 aiohttp import ClientResponseError
7
8
  from datetime import datetime, timezone
8
9
  from pydantic_yaml import parse_yaml_raw_as, to_yaml_str
9
10
  from pydantic import PositiveInt
@@ -21,6 +22,7 @@ app = async_typer.AsyncTyper()
21
22
  # Utilities
22
23
  # ---------------------------------------------------------------------------
23
24
 
25
+
24
26
  def _kv_to_dict(pairs: List[str]) -> Dict[str, str]:
25
27
  """Convert ["A=1","B=2"] → {"A":"1","B":"2"}."""
26
28
  out: Dict[str, str] = {}
@@ -31,17 +33,20 @@ def _kv_to_dict(pairs: List[str]) -> Dict[str, str]:
31
33
  out[k] = v
32
34
  return out
33
35
 
36
+
34
37
  class PortSpec(pydantic.BaseModel):
35
38
  """
36
39
  CLI schema for --port.
37
40
  Example:
38
- --port num=8080 type=webserver liveness=/health
41
+ --port num=8080 type=webserver liveness=/health path=path
39
42
  """
43
+
40
44
  num: PositiveInt
41
45
  type: Literal["mcp.sse", "meshagent.callable", "http", "tcp"]
42
46
  liveness: str | None = None
43
47
  participant_name: str | None = None
44
48
 
49
+
45
50
  def _parse_port_spec(spec: str) -> PortSpec:
46
51
  """
47
52
  Convert "num=8080 type=webserver liveness=/health" → PortSpec.
@@ -64,6 +69,7 @@ def _parse_port_spec(spec: str) -> PortSpec:
64
69
  # Commands
65
70
  # ---------------------------------------------------------------------------
66
71
 
72
+
67
73
  @app.async_command("create")
68
74
  async def service_create(
69
75
  *,
@@ -91,7 +97,7 @@ async def service_create(
91
97
  "--port",
92
98
  "-p",
93
99
  help=(
94
- 'Repeatable. Example:\n'
100
+ "Repeatable. Example:\n"
95
101
  ' -p "num=8080 type=[mcp.sse | meshagent.callable | http | tcp] liveness=/health"'
96
102
  ),
97
103
  ),
@@ -105,17 +111,14 @@ async def service_create(
105
111
  # ✅ validate / coerce port specs
106
112
  port_specs: List[PortSpec] = [_parse_port_spec(s) for s in port]
107
113
 
108
- ports_dict = (
109
- {
110
- ps.num: Port(
111
- type=ps.type,
112
- liveness=ps.liveness,
113
- participant_name=ps.participant_name,
114
- )
115
- for ps in port_specs
116
- }
117
- or None
118
- )
114
+ ports_dict = {
115
+ ps.num: Port(
116
+ type=ps.type,
117
+ liveness=ps.liveness,
118
+ participant_name=ps.participant_name,
119
+ )
120
+ for ps in port_specs
121
+ } or None
119
122
 
120
123
  service_obj = Service(
121
124
  id="",
@@ -131,19 +134,35 @@ async def service_create(
131
134
  ports=ports_dict,
132
135
  )
133
136
 
134
- new_id = (await client.create_service(project_id=project_id, service=service_obj))["id"]
135
- print(f"[green]Created service:[/] {new_id}")
137
+ try:
138
+ new_id = (
139
+ await client.create_service(project_id=project_id, service=service_obj)
140
+ )["id"]
141
+ except ClientResponseError as exc:
142
+ if exc.status == 409:
143
+ print(f"[red]Service name already in use: {name}[/red]")
144
+ raise typer.Exit(code=1)
145
+ raise
146
+ else:
147
+ print(f"[green]Created service:[/] {new_id}")
136
148
 
137
149
  finally:
138
150
  await client.close()
139
151
 
152
+
140
153
  @app.async_command("show")
141
- async def service_show(*, project_id: str = None, service_id: Annotated[str, typer.Argument(help="ID of the service to delete")],):
154
+ async def service_show(
155
+ *,
156
+ project_id: str = None,
157
+ service_id: Annotated[str, typer.Argument(help="ID of the service to delete")],
158
+ ):
142
159
  """Show a services for the project."""
143
160
  client = await get_client()
144
161
  try:
145
162
  project_id = await resolve_project_id(project_id)
146
- service = await client.get_service(project_id=project_id, service_id=service_id) # → List[Service]
163
+ service = await client.get_service(
164
+ project_id=project_id, service_id=service_id
165
+ ) # → List[Service]
147
166
  print(service.model_dump(mode="json"))
148
167
  finally:
149
168
  await client.close()
@@ -155,8 +174,20 @@ async def service_list(*, project_id: str = None):
155
174
  client = await get_client()
156
175
  try:
157
176
  project_id = await resolve_project_id(project_id)
158
- services : list[Service] = await client.list_services(project_id=project_id) # → List[Service]
159
- print_json_table([svc.model_dump(mode="json") for svc in services], "id", "name", "image", "command", "room_storage_path", "pull_secret", "environment_secrets", "ports")
177
+ services: list[Service] = await client.list_services(
178
+ project_id=project_id
179
+ ) # → List[Service]
180
+ print_json_table(
181
+ [svc.model_dump(mode="json") for svc in services],
182
+ "id",
183
+ "name",
184
+ "image",
185
+ "command",
186
+ "room_storage_path",
187
+ "pull_secret",
188
+ "environment_secrets",
189
+ "ports",
190
+ )
160
191
  finally:
161
192
  await client.close()
162
193
 
@@ -0,0 +1 @@
1
+ __version__ = "0.0.24"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: meshagent-cli
3
- Version: 0.0.22
3
+ Version: 0.0.24
4
4
  Summary: CLI for Meshagent
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Documentation, https://docs.meshagent.com
@@ -10,10 +10,10 @@ Requires-Python: >=3.12
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.22
14
- Requires-Dist: meshagent-agents~=0.0.22
15
- Requires-Dist: meshagent-tools~=0.0.22
16
- Requires-Dist: meshagent-mcp~=0.0.22
13
+ Requires-Dist: meshagent-api~=0.0.24
14
+ Requires-Dist: meshagent-agents~=0.0.24
15
+ Requires-Dist: meshagent-tools~=0.0.24
16
+ Requires-Dist: meshagent-mcp~=0.0.24
17
17
  Requires-Dist: supabase~=2.15.1
18
18
 
19
19
  ### Meshagent CLI
@@ -0,0 +1,7 @@
1
+ typer~=0.15.3
2
+ pydantic-yaml~=1.4.0
3
+ meshagent-api~=0.0.24
4
+ meshagent-agents~=0.0.24
5
+ meshagent-tools~=0.0.24
6
+ meshagent-mcp~=0.0.24
7
+ supabase~=2.15.1
@@ -11,10 +11,10 @@ keywords = []
11
11
  dependencies = [
12
12
  "typer~=0.15.3",
13
13
  "pydantic-yaml~=1.4.0",
14
- "meshagent-api~=0.0.22",
15
- "meshagent-agents~=0.0.22",
16
- "meshagent-tools~=0.0.22",
17
- "meshagent-mcp~=0.0.22",
14
+ "meshagent-api~=0.0.24",
15
+ "meshagent-agents~=0.0.24",
16
+ "meshagent-tools~=0.0.24",
17
+ "meshagent-mcp~=0.0.24",
18
18
  "supabase~=2.15.1",
19
19
  ]
20
20
  dynamic = ["version", "readme"]
@@ -1 +0,0 @@
1
- __version__ = "0.0.22"
@@ -1,7 +0,0 @@
1
- typer~=0.15.3
2
- pydantic-yaml~=1.4.0
3
- meshagent-api~=0.0.22
4
- meshagent-agents~=0.0.22
5
- meshagent-tools~=0.0.22
6
- meshagent-mcp~=0.0.22
7
- supabase~=2.15.1
File without changes
File without changes