meshagent-cli 0.5.8b5__py3-none-any.whl → 0.5.13__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/oauth2.py DELETED
@@ -1,75 +0,0 @@
1
- from meshagent.cli import async_typer
2
- from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
3
- from meshagent.cli.helper import (
4
- get_client,
5
- resolve_project_id,
6
- resolve_api_key,
7
- resolve_token_jwt,
8
- )
9
- from meshagent.api import RoomClient, WebSocketClientProtocol
10
- from meshagent.api.helpers import meshagent_base_url, websocket_room_url
11
- from rich import print
12
- from typing import Annotated, Optional
13
- import typer
14
-
15
- app = async_typer.AsyncTyper(help="OAuth2 test commands")
16
-
17
-
18
- @app.async_command("request")
19
- async def oauth2(
20
- *,
21
- project_id: ProjectIdOption = None,
22
- room: RoomOption,
23
- token_path: Annotated[Optional[str], typer.Option()] = None,
24
- api_key_id: ApiKeyIdOption = None,
25
- name: Annotated[str, typer.Option()] = "cli",
26
- from_participant_id: Annotated[str, typer.Option()],
27
- client_id: Annotated[str, typer.Option()],
28
- authorization_endpoint: Annotated[str, typer.Option()],
29
- token_endpoint: Annotated[str, typer.Option()],
30
- role: str = "user",
31
- scopes: Annotated[Optional[str], typer.Option()] = None,
32
- client_secret: Annotated[Optional[str], typer.Option()],
33
- redirect_uri: Annotated[Optional[str], typer.Option()],
34
- ):
35
- """
36
- Run an OAuth2 request test between two participants in the same room.
37
- One will act as the consumer, the other as the provider.
38
- """
39
-
40
- account_client = await get_client()
41
- try:
42
- project_id = await resolve_project_id(project_id=project_id)
43
- api_key_id = await resolve_api_key(project_id, api_key_id)
44
-
45
- jwt_consumer = await resolve_token_jwt(
46
- project_id=project_id,
47
- api_key_id=api_key_id,
48
- token_path=token_path,
49
- name=f"{name}-consumer",
50
- role=role,
51
- room=room,
52
- )
53
-
54
- async with RoomClient(
55
- protocol=WebSocketClientProtocol(
56
- url=websocket_room_url(room_name=room, base_url=meshagent_base_url()),
57
- token=jwt_consumer,
58
- )
59
- ) as consumer:
60
- print("[green]Requesting OAuth token from consumer side...[/green]")
61
- token = await consumer.secrets.request_oauth_token(
62
- client_id=client_id,
63
- authorization_endpoint=authorization_endpoint,
64
- token_endpoint=token_endpoint,
65
- scopes=scopes.split(",") if scopes is not None else scopes,
66
- from_participant_id=from_participant_id,
67
- timeout=10,
68
- client_secret=client_secret,
69
- redirect_uri=redirect_uri,
70
- )
71
-
72
- print(f"[bold cyan]Got access token:[/bold cyan] {token}")
73
-
74
- finally:
75
- await account_client.close()
@@ -1,34 +0,0 @@
1
- meshagent/cli/__init__.py,sha256=X78Z4yEg5XfkNKH0HiIdG4k1q5ktB-ampTuXHLNFrAw,58
2
- meshagent/cli/agent.py,sha256=uP2VNkEPlwglG0sdbOwfk3KHvSKvi7lvNuX2MnJ3V8Y,10758
3
- meshagent/cli/api_keys.py,sha256=l288EXciwj7C3ooSb-kQIjLInq7QVs2QuTtbMewTgM4,5026
4
- meshagent/cli/async_typer.py,sha256=GCeSefBDbpd-V4V8LrvHGUTBMth3HspVMfFa-HUZ0cg,898
5
- meshagent/cli/auth.py,sha256=wpGTomrFH0uvbwv262sTqK0DgB4ltAuurEmI9tYedIs,815
6
- meshagent/cli/auth_async.py,sha256=RD5po390t1Sv3OCvJgf4qT4iuOkKaHfwCDW6rrjUldo,4065
7
- meshagent/cli/call.py,sha256=XGJXOyU4v7dct-eCJ6eVG5n46_DQgU2z19kbDOvq-eg,5473
8
- meshagent/cli/chatbot.py,sha256=Wgi4HtMuu6qzfewCxKm7uNkBAJCfwVzot_RrzTG1zvg,9166
9
- meshagent/cli/cli.py,sha256=er6OSn9kXk5P3IAWKw9Xol1LMExXbRsA3FPYZwHGf90,6836
10
- meshagent/cli/cli_mcp.py,sha256=Wh3brbzBIs3h15qLrZltLOKxpJoImIEuBEb5ISDOKGY,10656
11
- meshagent/cli/cli_secrets.py,sha256=RC236eYGV4sl4gOzaBYAGl23RNIAs7qXnwOSJpDMt-4,13722
12
- meshagent/cli/common_options.py,sha256=-eNhLfHxbVG3DXME5ONySMfMel8nZsOBwXHKsGtLSq4,726
13
- meshagent/cli/containers.py,sha256=uAv_hIKfnkuB1j4XGn8BVI547xs4ZkbDLtKtYh3JVRY,27528
14
- meshagent/cli/developer.py,sha256=BHCVENfp6MkYohVBZCCqP0R0n673lG88xSBqtBOOzAM,3059
15
- meshagent/cli/exec.py,sha256=Pymq3I3uwRAoCwyTKYFo9fOl9VYhQqaYBhPe-s9LdII,16295
16
- meshagent/cli/helper.py,sha256=Y_RP5SzGIgJXSlYhIOfN85bFrMvrA6gUN_9QOASQrAo,4942
17
- meshagent/cli/mailbot.py,sha256=LttSEpR15947OYSlN6B_eFDTxesahA0ZxNIC_-s3vfE,8204
18
- meshagent/cli/messaging.py,sha256=2_wd71vvG71ctTBXW9FdnwSUnoPy_W6I8aw2f3SUD24,6407
19
- meshagent/cli/oauth2.py,sha256=xNYgCju99pjPQMdUzvHiiGAFWn7f2Zu0vuek-HYowOs,2711
20
- meshagent/cli/otel.py,sha256=1yoMGivskLV9f7M_LqCLKbttTTAPmFY5yhWXqFzvRN8,4066
21
- meshagent/cli/participant_token.py,sha256=hi15CIdL0DbIAgIRJWHb2mowTNHTbsF6BjQwwUwEcVM,1559
22
- meshagent/cli/projects.py,sha256=-s5xIfd2pCW8HsuqRsNoKZr5hsF6xYxfEjyYI6Nm4YI,3511
23
- meshagent/cli/queue.py,sha256=pxSwL_W8_BXHWcFekzRrL5pfDc3RMGBbuE6yT7RAaTA,4120
24
- meshagent/cli/services.py,sha256=3hC0nFnL_uMgD6chdMX-GQmFVUEj5ljiwIlxUlou8Ic,18096
25
- meshagent/cli/sessions.py,sha256=bUwrPkzeEWE8gTqD4E-tfr2ChBns3Fvv9MsSV4RRNTQ,881
26
- meshagent/cli/storage.py,sha256=aqSLojVF-aTEvSaVRyPh2dfOd2LrO_kcbUbhQYj8g5E,34827
27
- meshagent/cli/version.py,sha256=cnkAixOtKNU4Eo4_iFGOBcSwj8iNkorkKr1m7S2tXFQ,24
28
- meshagent/cli/voicebot.py,sha256=DCSvsa2EeGQTxI2i6xA6tS1dM2U4op8MsMNy99KQfjo,5775
29
- meshagent/cli/webhook.py,sha256=3vSZAGC19A8GN26uogh-ZUFeAOOCUOeqn80RVXj4qaA,2995
30
- meshagent_cli-0.5.8b5.dist-info/METADATA,sha256=HiQjQGehzliqaieNANlk7v79QIMnWOEwznYb0YmXRew,1996
31
- meshagent_cli-0.5.8b5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
32
- meshagent_cli-0.5.8b5.dist-info/entry_points.txt,sha256=WRcGGN4vMtvC5Pgl3uRFqsJiQXNoHuLLa-TCSY3gAhQ,52
33
- meshagent_cli-0.5.8b5.dist-info/top_level.txt,sha256=GlcXnHtRP6m7zlG3Df04M35OsHtNXy_DY09oFwWrH74,10
34
- meshagent_cli-0.5.8b5.dist-info/RECORD,,