meshagent-cli 0.2.0__tar.gz → 0.3.0__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.
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/PKG-INFO +7 -7
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/chatbot.py +8 -5
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/cli.py +2 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/exec.py +6 -0
- meshagent_cli-0.3.0/meshagent/cli/queue.py +119 -0
- meshagent_cli-0.3.0/meshagent/cli/version.py +1 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/PKG-INFO +7 -7
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/SOURCES.txt +1 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/requires.txt +6 -6
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/pyproject.toml +6 -6
- meshagent_cli-0.2.0/meshagent/cli/version.py +0 -1
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/README.md +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/__init__.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/agent.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/api_keys.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/async_typer.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/auth.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/auth_async.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/call.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/cli_mcp.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/cli_secrets.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/developer.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/helper.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/messaging.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/otel.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/participant_token.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/projects.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/services.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/sessions.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/storage.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/voicebot.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent/cli/webhook.py +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/dependency_links.txt +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/entry_points.txt +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/meshagent_cli.egg-info/top_level.txt +0 -0
- {meshagent_cli-0.2.0 → meshagent_cli-0.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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.
|
|
14
|
-
Requires-Dist: meshagent-agents~=0.
|
|
15
|
-
Requires-Dist: meshagent-computers~=0.
|
|
16
|
-
Requires-Dist: meshagent-openai~=0.
|
|
17
|
-
Requires-Dist: meshagent-tools~=0.
|
|
18
|
-
Requires-Dist: meshagent-mcp~=0.
|
|
13
|
+
Requires-Dist: meshagent-api~=0.3.0
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.3.0
|
|
15
|
+
Requires-Dist: meshagent-computers~=0.3.0
|
|
16
|
+
Requires-Dist: meshagent-openai~=0.3.0
|
|
17
|
+
Requires-Dist: meshagent-tools~=0.3.0
|
|
18
|
+
Requires-Dist: meshagent-mcp~=0.3.0
|
|
19
19
|
Requires-Dist: supabase~=2.15
|
|
20
20
|
Requires-Dist: fastmcp~=2.8
|
|
21
21
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
@@ -14,10 +14,12 @@ from meshagent.cli.helper import (
|
|
|
14
14
|
)
|
|
15
15
|
from meshagent.agents.chat import ChatBot
|
|
16
16
|
from meshagent.openai import OpenAIResponsesAdapter
|
|
17
|
-
from meshagent.openai.tools.responses_adapter import LocalShellTool
|
|
18
17
|
from meshagent.api.services import ServiceHost
|
|
19
18
|
from meshagent.computers.agent import ComputerAgent
|
|
20
|
-
from meshagent.agents.chat import
|
|
19
|
+
from meshagent.agents.chat import (
|
|
20
|
+
ChatBotThreadOpenAIImageGenerationTool,
|
|
21
|
+
ChatBotThreadLocalShellTool,
|
|
22
|
+
)
|
|
21
23
|
|
|
22
24
|
from typing import List
|
|
23
25
|
|
|
@@ -79,7 +81,9 @@ def build_chatbot(
|
|
|
79
81
|
thread_toolkit = Toolkit(name="thread_toolkit", tools=[])
|
|
80
82
|
|
|
81
83
|
if local_shell:
|
|
82
|
-
thread_toolkit.tools.append(
|
|
84
|
+
thread_toolkit.tools.append(
|
|
85
|
+
ChatBotThreadLocalShellTool(thread_context=thread_context)
|
|
86
|
+
)
|
|
83
87
|
|
|
84
88
|
if image_generation is not None:
|
|
85
89
|
print("adding openai image gen to thread", flush=True)
|
|
@@ -103,7 +107,6 @@ async def make_call(
|
|
|
103
107
|
project_id: str = None,
|
|
104
108
|
room: Annotated[Optional[str], typer.Option()] = None,
|
|
105
109
|
api_key_id: Annotated[Optional[str], typer.Option()] = None,
|
|
106
|
-
name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
|
|
107
110
|
role: str = "agent",
|
|
108
111
|
agent_name: Annotated[str, typer.Option(..., help="Name of the agent to call")],
|
|
109
112
|
token_path: Annotated[Optional[str], typer.Option()] = None,
|
|
@@ -142,7 +145,7 @@ async def make_call(
|
|
|
142
145
|
project_id=project_id,
|
|
143
146
|
api_key_id=api_key_id,
|
|
144
147
|
token_path=token_path,
|
|
145
|
-
name=
|
|
148
|
+
name=agent_name,
|
|
146
149
|
role=role,
|
|
147
150
|
room=room,
|
|
148
151
|
)
|
|
@@ -4,6 +4,7 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
from meshagent.cli import async_typer
|
|
6
6
|
|
|
7
|
+
from meshagent.cli import queue
|
|
7
8
|
from meshagent.cli import auth
|
|
8
9
|
from meshagent.cli import api_keys
|
|
9
10
|
from meshagent.cli import projects
|
|
@@ -54,6 +55,7 @@ app.add_typer(developer.app, name="developer")
|
|
|
54
55
|
app.add_typer(webhook.app, name="webhook")
|
|
55
56
|
app.add_typer(services.app, name="service")
|
|
56
57
|
app.add_typer(cli_secrets.app, name="secret")
|
|
58
|
+
app.add_typer(queue.app, name="queue")
|
|
57
59
|
app.add_typer(cli_mcp.app, name="mcp")
|
|
58
60
|
app.add_typer(chatbot.app, name="chatbot")
|
|
59
61
|
app.add_typer(voicebot.app, name="voicebot")
|
|
@@ -37,6 +37,7 @@ def register(app: typer.Typer):
|
|
|
37
37
|
api_key_id: Annotated[Optional[str], typer.Option()] = None,
|
|
38
38
|
command: Annotated[list[str], typer.Argument(...)] = None,
|
|
39
39
|
tty: bool = False,
|
|
40
|
+
room_storage_path: str = "/data",
|
|
40
41
|
):
|
|
41
42
|
"""Open an interactive websocket‑based TTY."""
|
|
42
43
|
client = await get_client()
|
|
@@ -73,6 +74,11 @@ def register(app: typer.Typer):
|
|
|
73
74
|
if command and len(command) != 0:
|
|
74
75
|
ws_url += f"&command={quote(' '.join(command))}"
|
|
75
76
|
|
|
77
|
+
if room_storage_path:
|
|
78
|
+
room_storage_path += (
|
|
79
|
+
f"&room_storage_path={quote(' '.join(room_storage_path))}"
|
|
80
|
+
)
|
|
81
|
+
|
|
76
82
|
if tty:
|
|
77
83
|
if not sys.stdin.isatty():
|
|
78
84
|
print("[red]TTY requested but process is not a TTY[/red]")
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from rich import print
|
|
3
|
+
from typing import Annotated, Optional
|
|
4
|
+
import json as _json
|
|
5
|
+
|
|
6
|
+
from meshagent.api.helpers import meshagent_base_url, websocket_room_url
|
|
7
|
+
from meshagent.api import (
|
|
8
|
+
RoomClient,
|
|
9
|
+
ParticipantToken,
|
|
10
|
+
WebSocketClientProtocol,
|
|
11
|
+
RoomException,
|
|
12
|
+
)
|
|
13
|
+
from meshagent.cli.helper import resolve_project_id, resolve_api_key
|
|
14
|
+
from meshagent.cli import async_typer
|
|
15
|
+
from meshagent.cli.helper import get_client
|
|
16
|
+
|
|
17
|
+
app = async_typer.AsyncTyper()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@app.async_command("send")
|
|
21
|
+
async def send(
|
|
22
|
+
*,
|
|
23
|
+
project_id: str = None,
|
|
24
|
+
room: Annotated[str, typer.Option()],
|
|
25
|
+
api_key_id: Annotated[Optional[str], typer.Option()] = None,
|
|
26
|
+
name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
|
|
27
|
+
role: str = "user",
|
|
28
|
+
queue: Annotated[str, typer.Option(..., help="Queue name")],
|
|
29
|
+
json: Optional[str] = typer.Option(..., help="a JSON message to send to the queue"),
|
|
30
|
+
file: Annotated[
|
|
31
|
+
Optional[str],
|
|
32
|
+
typer.Option("--file", "-f", help="File path to a JSON file"),
|
|
33
|
+
] = None,
|
|
34
|
+
):
|
|
35
|
+
account_client = await get_client()
|
|
36
|
+
try:
|
|
37
|
+
project_id = await resolve_project_id(project_id=project_id)
|
|
38
|
+
api_key_id = await resolve_api_key(project_id, api_key_id)
|
|
39
|
+
|
|
40
|
+
key = (
|
|
41
|
+
await account_client.decrypt_project_api_key(
|
|
42
|
+
project_id=project_id, id=api_key_id
|
|
43
|
+
)
|
|
44
|
+
)["token"]
|
|
45
|
+
|
|
46
|
+
token = ParticipantToken(
|
|
47
|
+
name=name, project_id=project_id, api_key_id=api_key_id
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
token.add_role_grant(role=role)
|
|
51
|
+
token.add_room_grant(room)
|
|
52
|
+
|
|
53
|
+
print("[bold green]Connecting to room...[/bold green]")
|
|
54
|
+
async with RoomClient(
|
|
55
|
+
protocol=WebSocketClientProtocol(
|
|
56
|
+
url=websocket_room_url(room_name=room, base_url=meshagent_base_url()),
|
|
57
|
+
token=token.to_jwt(token=key),
|
|
58
|
+
)
|
|
59
|
+
) as client:
|
|
60
|
+
if file is not None:
|
|
61
|
+
with open(file, "rb") as f:
|
|
62
|
+
message = f.read()
|
|
63
|
+
else:
|
|
64
|
+
message = _json.loads(json)
|
|
65
|
+
|
|
66
|
+
await client.queues.send(name=queue, message=message)
|
|
67
|
+
|
|
68
|
+
except RoomException as e:
|
|
69
|
+
print(f"[red]{e}[/red]")
|
|
70
|
+
finally:
|
|
71
|
+
await account_client.close()
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@app.async_command("receive")
|
|
75
|
+
async def receive(
|
|
76
|
+
*,
|
|
77
|
+
project_id: str = None,
|
|
78
|
+
room: Annotated[str, typer.Option()],
|
|
79
|
+
api_key_id: Annotated[Optional[str], typer.Option()] = None,
|
|
80
|
+
name: Annotated[str, typer.Option(..., help="Participant name")] = "cli",
|
|
81
|
+
role: str = "user",
|
|
82
|
+
queue: Annotated[str, typer.Option(..., help="Queue name")],
|
|
83
|
+
):
|
|
84
|
+
account_client = await get_client()
|
|
85
|
+
try:
|
|
86
|
+
project_id = await resolve_project_id(project_id=project_id)
|
|
87
|
+
api_key_id = await resolve_api_key(project_id, api_key_id)
|
|
88
|
+
|
|
89
|
+
key = (
|
|
90
|
+
await account_client.decrypt_project_api_key(
|
|
91
|
+
project_id=project_id, id=api_key_id
|
|
92
|
+
)
|
|
93
|
+
)["token"]
|
|
94
|
+
|
|
95
|
+
token = ParticipantToken(
|
|
96
|
+
name=name, project_id=project_id, api_key_id=api_key_id
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
token.add_role_grant(role=role)
|
|
100
|
+
token.add_room_grant(room)
|
|
101
|
+
|
|
102
|
+
async with RoomClient(
|
|
103
|
+
protocol=WebSocketClientProtocol(
|
|
104
|
+
url=websocket_room_url(room_name=room, base_url=meshagent_base_url()),
|
|
105
|
+
token=token.to_jwt(token=key),
|
|
106
|
+
)
|
|
107
|
+
) as client:
|
|
108
|
+
response = await client.queues.receive(name=queue, wait=False)
|
|
109
|
+
if response is None:
|
|
110
|
+
print("[bold yellow]Queue did not contain any messages.[/bold yellow]")
|
|
111
|
+
raise typer.Exit(1)
|
|
112
|
+
else:
|
|
113
|
+
print(response)
|
|
114
|
+
|
|
115
|
+
except RoomException as e:
|
|
116
|
+
print(f"[red]{e}[/red]")
|
|
117
|
+
raise typer.Exit(1)
|
|
118
|
+
finally:
|
|
119
|
+
await account_client.close()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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.
|
|
14
|
-
Requires-Dist: meshagent-agents~=0.
|
|
15
|
-
Requires-Dist: meshagent-computers~=0.
|
|
16
|
-
Requires-Dist: meshagent-openai~=0.
|
|
17
|
-
Requires-Dist: meshagent-tools~=0.
|
|
18
|
-
Requires-Dist: meshagent-mcp~=0.
|
|
13
|
+
Requires-Dist: meshagent-api~=0.3.0
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.3.0
|
|
15
|
+
Requires-Dist: meshagent-computers~=0.3.0
|
|
16
|
+
Requires-Dist: meshagent-openai~=0.3.0
|
|
17
|
+
Requires-Dist: meshagent-tools~=0.3.0
|
|
18
|
+
Requires-Dist: meshagent-mcp~=0.3.0
|
|
19
19
|
Requires-Dist: supabase~=2.15
|
|
20
20
|
Requires-Dist: fastmcp~=2.8
|
|
21
21
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
typer~=0.15
|
|
2
2
|
pydantic-yaml~=1.4
|
|
3
|
-
meshagent-api~=0.
|
|
4
|
-
meshagent-agents~=0.
|
|
5
|
-
meshagent-computers~=0.
|
|
6
|
-
meshagent-openai~=0.
|
|
7
|
-
meshagent-tools~=0.
|
|
8
|
-
meshagent-mcp~=0.
|
|
3
|
+
meshagent-api~=0.3.0
|
|
4
|
+
meshagent-agents~=0.3.0
|
|
5
|
+
meshagent-computers~=0.3.0
|
|
6
|
+
meshagent-openai~=0.3.0
|
|
7
|
+
meshagent-tools~=0.3.0
|
|
8
|
+
meshagent-mcp~=0.3.0
|
|
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.
|
|
15
|
-
"meshagent-agents~=0.
|
|
16
|
-
"meshagent-computers~=0.
|
|
17
|
-
"meshagent-openai~=0.
|
|
18
|
-
"meshagent-tools~=0.
|
|
19
|
-
"meshagent-mcp~=0.
|
|
14
|
+
"meshagent-api~=0.3.0",
|
|
15
|
+
"meshagent-agents~=0.3.0",
|
|
16
|
+
"meshagent-computers~=0.3.0",
|
|
17
|
+
"meshagent-openai~=0.3.0",
|
|
18
|
+
"meshagent-tools~=0.3.0",
|
|
19
|
+
"meshagent-mcp~=0.3.0",
|
|
20
20
|
"supabase~=2.15",
|
|
21
21
|
"fastmcp~=2.8",
|
|
22
22
|
"opentelemetry-distro~=0.54b1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|