meshagent-cli 0.7.0__py3-none-any.whl → 0.21.0__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.
Files changed (41) hide show
  1. meshagent/cli/agent.py +15 -11
  2. meshagent/cli/api_keys.py +4 -4
  3. meshagent/cli/async_typer.py +52 -4
  4. meshagent/cli/call.py +12 -8
  5. meshagent/cli/chatbot.py +1007 -129
  6. meshagent/cli/cli.py +21 -20
  7. meshagent/cli/cli_mcp.py +92 -28
  8. meshagent/cli/cli_secrets.py +10 -10
  9. meshagent/cli/common_options.py +19 -4
  10. meshagent/cli/containers.py +164 -16
  11. meshagent/cli/database.py +997 -0
  12. meshagent/cli/developer.py +3 -3
  13. meshagent/cli/exec.py +22 -6
  14. meshagent/cli/helper.py +62 -11
  15. meshagent/cli/helpers.py +66 -9
  16. meshagent/cli/host.py +37 -0
  17. meshagent/cli/mailbot.py +1004 -40
  18. meshagent/cli/mailboxes.py +223 -0
  19. meshagent/cli/meeting_transcriber.py +10 -4
  20. meshagent/cli/messaging.py +7 -7
  21. meshagent/cli/multi.py +402 -0
  22. meshagent/cli/oauth2.py +44 -21
  23. meshagent/cli/participant_token.py +5 -3
  24. meshagent/cli/port.py +70 -0
  25. meshagent/cli/queue.py +2 -2
  26. meshagent/cli/room.py +20 -212
  27. meshagent/cli/rooms.py +214 -0
  28. meshagent/cli/services.py +32 -23
  29. meshagent/cli/sessions.py +5 -5
  30. meshagent/cli/storage.py +5 -5
  31. meshagent/cli/task_runner.py +770 -0
  32. meshagent/cli/version.py +1 -1
  33. meshagent/cli/voicebot.py +502 -76
  34. meshagent/cli/webhook.py +7 -7
  35. meshagent/cli/worker.py +1327 -0
  36. {meshagent_cli-0.7.0.dist-info → meshagent_cli-0.21.0.dist-info}/METADATA +13 -13
  37. meshagent_cli-0.21.0.dist-info/RECORD +44 -0
  38. meshagent_cli-0.7.0.dist-info/RECORD +0 -36
  39. {meshagent_cli-0.7.0.dist-info → meshagent_cli-0.21.0.dist-info}/WHEEL +0 -0
  40. {meshagent_cli-0.7.0.dist-info → meshagent_cli-0.21.0.dist-info}/entry_points.txt +0 -0
  41. {meshagent_cli-0.7.0.dist-info → meshagent_cli-0.21.0.dist-info}/top_level.txt +0 -0
meshagent/cli/services.py CHANGED
@@ -40,22 +40,21 @@ from pydantic_yaml import parse_yaml_raw_as
40
40
 
41
41
  from meshagent.cli.call import _make_call
42
42
 
43
+
43
44
  app = async_typer.AsyncTyper(help="Manage services for your project")
44
45
 
45
46
 
46
47
  @app.async_command("create")
47
48
  async def service_create(
48
49
  *,
49
- project_id: ProjectIdOption = None,
50
+ project_id: ProjectIdOption,
50
51
  file: Annotated[
51
52
  str,
52
53
  typer.Option("--file", "-f", help="File path to a service definition"),
53
54
  ],
54
55
  room: Annotated[
55
56
  Optional[str],
56
- typer.Option(
57
- "--room", "-r", help="The name of a room to create the service for"
58
- ),
57
+ typer.Option("--room", help="The name of a room to create the service for"),
59
58
  ] = None,
60
59
  ):
61
60
  """Create a service attached to the project."""
@@ -94,7 +93,7 @@ async def service_create(
94
93
  @app.async_command("update")
95
94
  async def service_update(
96
95
  *,
97
- project_id: ProjectIdOption = None,
96
+ project_id: ProjectIdOption,
98
97
  id: Optional[str] = None,
99
98
  file: Annotated[
100
99
  str,
@@ -108,9 +107,7 @@ async def service_update(
108
107
  ] = False,
109
108
  room: Annotated[
110
109
  Optional[str],
111
- typer.Option(
112
- "--room", "-r", help="The name of a room to update the service for"
113
- ),
110
+ typer.Option("--room", help="The name of a room to update the service for"),
114
111
  ] = None,
115
112
  ):
116
113
  """Create a service attached to the project."""
@@ -179,7 +176,7 @@ async def service_update(
179
176
  @app.async_command("run")
180
177
  async def service_run(
181
178
  *,
182
- project_id: ProjectIdOption = None,
179
+ project_id: ProjectIdOption,
183
180
  command: str,
184
181
  port: Annotated[
185
182
  int,
@@ -238,11 +235,26 @@ async def service_run(
238
235
  run_tasks = []
239
236
 
240
237
  async def run_service(port: int):
241
- code, output = await _run_process(
242
- cmd=shlex.split("python3 " + command),
243
- log=True,
244
- env={**os.environ, "MESHAGENT_PORT": str(port)},
245
- )
238
+ if command.endswith(".py"):
239
+ code, output = await _run_process(
240
+ cmd=shlex.split("python3 " + command),
241
+ log=True,
242
+ env={**os.environ, "MESHAGENT_PORT": str(port)},
243
+ )
244
+
245
+ elif command.endswith(".dart"):
246
+ code, output = await _run_process(
247
+ cmd=shlex.split("dart run " + command),
248
+ log=True,
249
+ env={**os.environ, "MESHAGENT_PORT": str(port)},
250
+ )
251
+
252
+ else:
253
+ code, output = await _run_process(
254
+ cmd=shlex.split(command),
255
+ log=True,
256
+ env={**os.environ, "MESHAGENT_PORT": str(port)},
257
+ )
246
258
 
247
259
  if code != 0:
248
260
  print(f"[red]{output}[/red]")
@@ -274,6 +286,7 @@ async def service_run(
274
286
  print("[red]unable to read service spec[/red]")
275
287
  raise typer.Exit(-1)
276
288
 
289
+ print(f"getting spec {port}", flush=True)
277
290
  spec = await get_spec(port)
278
291
 
279
292
  sys.stdout.write("\n")
@@ -319,7 +332,7 @@ async def service_run(
319
332
  @app.async_command("show")
320
333
  async def service_show(
321
334
  *,
322
- project_id: ProjectIdOption = None,
335
+ project_id: ProjectIdOption,
323
336
  service_id: Annotated[str, typer.Argument(help="ID of the service to show")],
324
337
  ):
325
338
  """Show a services for the project."""
@@ -337,13 +350,11 @@ async def service_show(
337
350
  @app.async_command("list")
338
351
  async def service_list(
339
352
  *,
340
- project_id: ProjectIdOption = None,
353
+ project_id: ProjectIdOption,
341
354
  o: OutputFormatOption = "table",
342
355
  room: Annotated[
343
356
  Optional[str],
344
- typer.Option(
345
- "--room", "-r", help="The name of a room to list the services for"
346
- ),
357
+ typer.Option("--room", help="The name of a room to list the services for"),
347
358
  ] = None,
348
359
  ):
349
360
  """List all services for the project."""
@@ -385,13 +396,11 @@ async def service_list(
385
396
  @app.async_command("delete")
386
397
  async def service_delete(
387
398
  *,
388
- project_id: ProjectIdOption = None,
399
+ project_id: ProjectIdOption,
389
400
  service_id: Annotated[str, typer.Argument(help="ID of the service to delete")],
390
401
  room: Annotated[
391
402
  Optional[str],
392
- typer.Option(
393
- "--room", "-r", help="The name of a room to delete the service for"
394
- ),
403
+ typer.Option("--room", help="The name of a room to delete the service for"),
395
404
  ] = None,
396
405
  ):
397
406
  """Delete a service."""
meshagent/cli/sessions.py CHANGED
@@ -2,11 +2,11 @@ from meshagent.cli import async_typer
2
2
  from meshagent.cli.helper import get_client, print_json_table, resolve_project_id
3
3
  from meshagent.cli.common_options import ProjectIdOption
4
4
 
5
- app = async_typer.AsyncTyper()
5
+ app = async_typer.AsyncTyper(help="Inspect recent sessions and events")
6
6
 
7
7
 
8
- @app.async_command("list")
9
- async def list(*, project_id: ProjectIdOption = None):
8
+ @app.async_command("list", help="List recent sessions")
9
+ async def list(*, project_id: ProjectIdOption):
10
10
  client = await get_client()
11
11
  sessions = await client.list_recent_sessions(
12
12
  project_id=await resolve_project_id(project_id=project_id)
@@ -15,8 +15,8 @@ async def list(*, project_id: ProjectIdOption = None):
15
15
  await client.close()
16
16
 
17
17
 
18
- @app.async_command("show")
19
- async def show(*, project_id: ProjectIdOption = None, session_id: str):
18
+ @app.async_command("show", help="Show events for a session")
19
+ async def show(*, project_id: ProjectIdOption, session_id: str):
20
20
  client = await get_client()
21
21
  events = await client.list_session_events(
22
22
  project_id=await resolve_project_id(project_id=project_id),
meshagent/cli/storage.py CHANGED
@@ -55,7 +55,7 @@ def split_glob_subpath(subpath: str):
55
55
  @app.async_command("exists")
56
56
  async def storage_exists_command(
57
57
  *,
58
- project_id: ProjectIdOption = None,
58
+ project_id: ProjectIdOption,
59
59
  room: RoomOption,
60
60
  path: str,
61
61
  ):
@@ -89,7 +89,7 @@ async def storage_exists_command(
89
89
  @app.async_command("cp")
90
90
  async def storage_cp_command(
91
91
  *,
92
- project_id: ProjectIdOption = None,
92
+ project_id: ProjectIdOption,
93
93
  room: RoomOption,
94
94
  source_path: str,
95
95
  dest_path: str,
@@ -322,7 +322,7 @@ async def storage_cp_command(
322
322
  @app.async_command("show")
323
323
  async def storage_show_command(
324
324
  *,
325
- project_id: ProjectIdOption = None,
325
+ project_id: ProjectIdOption,
326
326
  room: RoomOption,
327
327
  path: str,
328
328
  encoding: Annotated[
@@ -395,7 +395,7 @@ async def storage_show_command(
395
395
  @app.async_command("rm")
396
396
  async def storage_rm_command(
397
397
  *,
398
- project_id: ProjectIdOption = None,
398
+ project_id: ProjectIdOption,
399
399
  room: RoomOption,
400
400
  path: str,
401
401
  recursive: Annotated[
@@ -599,7 +599,7 @@ async def storage_rm_command(
599
599
  @app.async_command("ls")
600
600
  async def storage_ls_command(
601
601
  *,
602
- project_id: ProjectIdOption = None,
602
+ project_id: ProjectIdOption,
603
603
  room: RoomOption,
604
604
  path: Annotated[
605
605
  str, typer.Argument(..., help="Path to list (local or room://...)")