meshagent-cli 0.5.8b5__tar.gz → 0.5.12__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.5.8b5 → meshagent_cli-0.5.12}/PKG-INFO +10 -16
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/agent.py +1 -2
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/call.py +0 -2
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/chatbot.py +2 -10
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/cli.py +0 -4
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/developer.py +1 -7
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/exec.py +55 -161
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/helper.py +1 -3
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/participant_token.py +2 -3
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/queue.py +2 -4
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/services.py +5 -27
- meshagent_cli-0.5.12/meshagent/cli/version.py +1 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent_cli.egg-info/PKG-INFO +10 -16
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent_cli.egg-info/SOURCES.txt +0 -2
- meshagent_cli-0.5.12/meshagent_cli.egg-info/requires.txt +15 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/pyproject.toml +10 -22
- meshagent_cli-0.5.8b5/meshagent/cli/containers.py +0 -849
- meshagent_cli-0.5.8b5/meshagent/cli/oauth2.py +0 -75
- meshagent_cli-0.5.8b5/meshagent/cli/version.py +0 -1
- meshagent_cli-0.5.8b5/meshagent_cli.egg-info/requires.txt +0 -23
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/README.md +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/__init__.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/api_keys.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/async_typer.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/auth.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/auth_async.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/cli_mcp.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/cli_secrets.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/common_options.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/mailbot.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/messaging.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/otel.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/projects.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/sessions.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/storage.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/voicebot.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent/cli/webhook.py +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent_cli.egg-info/dependency_links.txt +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent_cli.egg-info/entry_points.txt +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/meshagent_cli.egg-info/top_level.txt +0 -0
- {meshagent_cli-0.5.8b5 → meshagent_cli-0.5.12}/setup.cfg +0 -0
|
@@ -1,34 +1,28 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.12
|
|
4
4
|
Summary: CLI for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
7
7
|
Project-URL: Website, https://www.meshagent.com
|
|
8
8
|
Project-URL: Source, https://www.meshagent.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
Requires-Dist: typer~=0.15
|
|
12
|
+
Requires-Dist: pydantic-yaml~=1.4
|
|
13
|
+
Requires-Dist: meshagent-api~=0.5.12
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.5.12
|
|
15
|
+
Requires-Dist: meshagent-computers~=0.5.12
|
|
16
|
+
Requires-Dist: meshagent-openai~=0.5.12
|
|
17
|
+
Requires-Dist: meshagent-tools~=0.5.12
|
|
18
|
+
Requires-Dist: meshagent-mcp~=0.5.12
|
|
12
19
|
Requires-Dist: supabase~=2.15
|
|
13
20
|
Requires-Dist: fastmcp~=2.8
|
|
14
21
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
15
22
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.33
|
|
16
23
|
Requires-Dist: art~=6.5
|
|
17
24
|
Requires-Dist: pydantic-yaml~=1.5
|
|
18
|
-
|
|
19
|
-
Requires-Dist: meshagent-agents[all]~=0.5.8b5; extra == "all"
|
|
20
|
-
Requires-Dist: meshagent-api[all]~=0.5.8b5; extra == "all"
|
|
21
|
-
Requires-Dist: meshagent-computers~=0.5.8b5; extra == "all"
|
|
22
|
-
Requires-Dist: meshagent-openai~=0.5.8b5; extra == "all"
|
|
23
|
-
Requires-Dist: meshagent-mcp~=0.5.8b5; extra == "all"
|
|
24
|
-
Requires-Dist: meshagent-tools~=0.5.8b5; extra == "all"
|
|
25
|
-
Requires-Dist: supabase-auth~=2.12.3; extra == "all"
|
|
26
|
-
Provides-Extra: mcp-service
|
|
27
|
-
Requires-Dist: meshagent-agents[all]~=0.5.8b5; extra == "mcp-service"
|
|
28
|
-
Requires-Dist: meshagent-api~=0.5.8b5; extra == "mcp-service"
|
|
29
|
-
Requires-Dist: meshagent-mcp~=0.5.8b5; extra == "mcp-service"
|
|
30
|
-
Requires-Dist: meshagent-tools~=0.5.8b5; extra == "mcp-service"
|
|
31
|
-
Requires-Dist: supabase-auth~=2.12.3; extra == "mcp-service"
|
|
25
|
+
Requires-Dist: supabase-auth~=2.12.3
|
|
32
26
|
|
|
33
27
|
# [Meshagent](https://www.meshagent.com)
|
|
34
28
|
|
|
@@ -11,7 +11,6 @@ from meshagent.api import (
|
|
|
11
11
|
ParticipantToken,
|
|
12
12
|
WebSocketClientProtocol,
|
|
13
13
|
RoomException,
|
|
14
|
-
ApiScope,
|
|
15
14
|
)
|
|
16
15
|
from meshagent.cli.helper import resolve_project_id, resolve_api_key
|
|
17
16
|
from meshagent.cli import async_typer
|
|
@@ -52,7 +51,7 @@ async def ask(
|
|
|
52
51
|
token = ParticipantToken(
|
|
53
52
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
54
53
|
)
|
|
55
|
-
|
|
54
|
+
|
|
56
55
|
token.add_role_grant(role=role)
|
|
57
56
|
token.add_room_grant(room)
|
|
58
57
|
|
|
@@ -9,7 +9,6 @@ from meshagent.api import (
|
|
|
9
9
|
ParticipantToken,
|
|
10
10
|
WebSocketClientProtocol,
|
|
11
11
|
ParticipantGrant,
|
|
12
|
-
ApiScope,
|
|
13
12
|
)
|
|
14
13
|
from meshagent.api.helpers import meshagent_base_url, websocket_room_url
|
|
15
14
|
from meshagent.api.services import send_webhook
|
|
@@ -122,7 +121,6 @@ async def make_call(
|
|
|
122
121
|
token = ParticipantToken(
|
|
123
122
|
name=participant_name, project_id=project_id, api_key_id=api_key_id
|
|
124
123
|
)
|
|
125
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
126
124
|
token.add_role_grant(role=role)
|
|
127
125
|
token.add_room_grant(room)
|
|
128
126
|
token.grants.append(ParticipantGrant(name="tunnel_ports", scope="9000"))
|
|
@@ -20,12 +20,7 @@ from meshagent.cli.helper import (
|
|
|
20
20
|
from meshagent.agents.chat import ChatBot
|
|
21
21
|
from meshagent.openai import OpenAIResponsesAdapter
|
|
22
22
|
from meshagent.api.services import ServiceHost
|
|
23
|
-
|
|
24
|
-
try:
|
|
25
|
-
from meshagent.computers.agent import ComputerAgent
|
|
26
|
-
except ImportError:
|
|
27
|
-
ComputerAgent = None
|
|
28
|
-
|
|
23
|
+
from meshagent.computers.agent import ComputerAgent
|
|
29
24
|
from meshagent.agents.chat import (
|
|
30
25
|
ChatBotThreadOpenAIImageGenerationTool,
|
|
31
26
|
ChatBotThreadLocalShellTool,
|
|
@@ -72,11 +67,8 @@ def build_chatbot(
|
|
|
72
67
|
|
|
73
68
|
BaseClass = ChatBot
|
|
74
69
|
if computer_use:
|
|
75
|
-
if ComputerAgent is None:
|
|
76
|
-
raise RuntimeError(
|
|
77
|
-
"Computer use is enabled, but meshagent.computers is not installed."
|
|
78
|
-
)
|
|
79
70
|
BaseClass = ComputerAgent
|
|
71
|
+
|
|
80
72
|
llm_adapter = OpenAIResponsesAdapter(
|
|
81
73
|
model=model,
|
|
82
74
|
response_options={
|
|
@@ -22,8 +22,6 @@ from meshagent.cli import cli_mcp
|
|
|
22
22
|
from meshagent.cli import chatbot
|
|
23
23
|
from meshagent.cli import voicebot
|
|
24
24
|
from meshagent.cli import mailbot
|
|
25
|
-
from meshagent.cli import containers
|
|
26
|
-
from meshagent.cli import oauth2
|
|
27
25
|
from meshagent.cli.exec import register as register_exec
|
|
28
26
|
from meshagent.cli.version import __version__
|
|
29
27
|
|
|
@@ -64,8 +62,6 @@ app.add_typer(cli_mcp.app, name="mcp")
|
|
|
64
62
|
app.add_typer(chatbot.app, name="chatbot")
|
|
65
63
|
app.add_typer(voicebot.app, name="voicebot")
|
|
66
64
|
app.add_typer(mailbot.app, name="mailbot")
|
|
67
|
-
app.add_typer(containers.app, name="container")
|
|
68
|
-
app.add_typer(oauth2.app, name="oauth2")
|
|
69
65
|
|
|
70
66
|
register_exec(app)
|
|
71
67
|
|
|
@@ -11,12 +11,7 @@ from meshagent.cli.helper import (
|
|
|
11
11
|
resolve_api_key,
|
|
12
12
|
resolve_room,
|
|
13
13
|
)
|
|
14
|
-
from meshagent.api import
|
|
15
|
-
RoomClient,
|
|
16
|
-
ParticipantToken,
|
|
17
|
-
WebSocketClientProtocol,
|
|
18
|
-
ApiScope,
|
|
19
|
-
)
|
|
14
|
+
from meshagent.api import RoomClient, ParticipantToken, WebSocketClientProtocol
|
|
20
15
|
from meshagent.api.helpers import meshagent_base_url, websocket_room_url
|
|
21
16
|
|
|
22
17
|
app = async_typer.AsyncTyper()
|
|
@@ -55,7 +50,6 @@ async def watch_logs(
|
|
|
55
50
|
token = ParticipantToken(
|
|
56
51
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
57
52
|
)
|
|
58
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
59
53
|
token.add_role_grant(role=role)
|
|
60
54
|
token.add_room_grant(room)
|
|
61
55
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import sys
|
|
2
|
-
import
|
|
2
|
+
import tty as _tty
|
|
3
|
+
import termios
|
|
3
4
|
from meshagent.api.websocket_protocol import WebSocketClientProtocol
|
|
4
5
|
from meshagent.api import RoomClient
|
|
5
6
|
from meshagent.api.helpers import websocket_room_url
|
|
@@ -14,11 +15,8 @@ import signal
|
|
|
14
15
|
import shutil
|
|
15
16
|
import json
|
|
16
17
|
from urllib.parse import quote
|
|
17
|
-
import threading
|
|
18
|
-
import time
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
from meshagent.api import ParticipantToken, ApiScope
|
|
19
|
+
from meshagent.api import ParticipantToken
|
|
22
20
|
|
|
23
21
|
import logging
|
|
24
22
|
|
|
@@ -29,57 +27,6 @@ from meshagent.cli.helper import (
|
|
|
29
27
|
resolve_room,
|
|
30
28
|
)
|
|
31
29
|
|
|
32
|
-
if os.name == "nt":
|
|
33
|
-
import msvcrt
|
|
34
|
-
import ctypes
|
|
35
|
-
from ctypes import wintypes
|
|
36
|
-
|
|
37
|
-
_kernel32 = ctypes.windll.kernel32
|
|
38
|
-
_ENABLE_ECHO_INPUT = 0x0004
|
|
39
|
-
_ENABLE_LINE_INPUT = 0x0002
|
|
40
|
-
|
|
41
|
-
def set_raw(f):
|
|
42
|
-
"""Disable line and echo mode for the given file handle."""
|
|
43
|
-
handle = msvcrt.get_osfhandle(f.fileno())
|
|
44
|
-
original_mode = wintypes.DWORD()
|
|
45
|
-
if not _kernel32.GetConsoleMode(handle, ctypes.byref(original_mode)):
|
|
46
|
-
return None
|
|
47
|
-
new_mode = original_mode.value & ~(_ENABLE_ECHO_INPUT | _ENABLE_LINE_INPUT)
|
|
48
|
-
_kernel32.SetConsoleMode(handle, new_mode)
|
|
49
|
-
return handle, original_mode.value
|
|
50
|
-
|
|
51
|
-
def restore(f, state):
|
|
52
|
-
if state is None:
|
|
53
|
-
return None
|
|
54
|
-
handle, mode = state
|
|
55
|
-
_kernel32.SetConsoleMode(handle, mode)
|
|
56
|
-
return None
|
|
57
|
-
|
|
58
|
-
else:
|
|
59
|
-
import termios
|
|
60
|
-
import tty as _tty
|
|
61
|
-
|
|
62
|
-
def set_raw(fd):
|
|
63
|
-
old = termios.tcgetattr(fd)
|
|
64
|
-
_tty.setraw(fd)
|
|
65
|
-
return old
|
|
66
|
-
|
|
67
|
-
def restore(fd, old_settings):
|
|
68
|
-
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class _StdWriter:
|
|
72
|
-
"""Simple asyncio-friendly wrapper for standard streams on Windows."""
|
|
73
|
-
|
|
74
|
-
def __init__(self, file):
|
|
75
|
-
self._file = file
|
|
76
|
-
|
|
77
|
-
def write(self, data: bytes) -> None:
|
|
78
|
-
self._file.buffer.write(data)
|
|
79
|
-
|
|
80
|
-
async def drain(self) -> None:
|
|
81
|
-
await asyncio.get_running_loop().run_in_executor(None, self._file.flush)
|
|
82
|
-
|
|
83
30
|
|
|
84
31
|
def register(app: typer.Typer):
|
|
85
32
|
@app.async_command("exec")
|
|
@@ -106,7 +53,6 @@ def register(app: typer.Typer):
|
|
|
106
53
|
token = ParticipantToken(
|
|
107
54
|
name="tty", project_id=project_id, api_key_id=api_key_id
|
|
108
55
|
)
|
|
109
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
110
56
|
|
|
111
57
|
key = (
|
|
112
58
|
await client.decrypt_project_api_key(
|
|
@@ -152,7 +98,8 @@ def register(app: typer.Typer):
|
|
|
152
98
|
|
|
153
99
|
if tty:
|
|
154
100
|
# Save current terminal settings so we can restore them later.
|
|
155
|
-
old_tty_settings =
|
|
101
|
+
old_tty_settings = termios.tcgetattr(sys.stdin)
|
|
102
|
+
_tty.setraw(sys.stdin)
|
|
156
103
|
|
|
157
104
|
async with RoomClient(
|
|
158
105
|
protocol=WebSocketClientProtocol(
|
|
@@ -166,29 +113,25 @@ def register(app: typer.Typer):
|
|
|
166
113
|
send_queue = asyncio.Queue[bytes]()
|
|
167
114
|
|
|
168
115
|
loop = asyncio.get_running_loop()
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
)
|
|
179
|
-
stdout_writer = asyncio.StreamWriter(
|
|
180
|
-
stdout_transport, stdout_protocol, None, loop
|
|
181
|
-
)
|
|
116
|
+
(
|
|
117
|
+
stdout_transport,
|
|
118
|
+
stdout_protocol,
|
|
119
|
+
) = await loop.connect_write_pipe(
|
|
120
|
+
asyncio.streams.FlowControlMixin, sys.stdout
|
|
121
|
+
)
|
|
122
|
+
stdout_writer = asyncio.StreamWriter(
|
|
123
|
+
stdout_transport, stdout_protocol, None, loop
|
|
124
|
+
)
|
|
182
125
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
126
|
+
(
|
|
127
|
+
stderr_transport,
|
|
128
|
+
stderr_protocol,
|
|
129
|
+
) = await loop.connect_write_pipe(
|
|
130
|
+
asyncio.streams.FlowControlMixin, sys.stderr
|
|
131
|
+
)
|
|
132
|
+
stderr_writer = asyncio.StreamWriter(
|
|
133
|
+
stderr_transport, stderr_protocol, None, loop
|
|
134
|
+
)
|
|
192
135
|
|
|
193
136
|
async def recv_from_websocket():
|
|
194
137
|
while True:
|
|
@@ -263,97 +206,46 @@ def register(app: typer.Typer):
|
|
|
263
206
|
|
|
264
207
|
task.add_done_callback(on_done)
|
|
265
208
|
|
|
266
|
-
|
|
267
|
-
loop.add_signal_handler(signal.SIGWINCH, on_sigwinch)
|
|
209
|
+
loop.add_signal_handler(signal.SIGWINCH, on_sigwinch)
|
|
268
210
|
|
|
269
211
|
async def read_stdin():
|
|
270
212
|
loop = asyncio.get_running_loop()
|
|
271
213
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
def reader() -> None:
|
|
279
|
-
try:
|
|
280
|
-
while not stop_event.is_set():
|
|
281
|
-
if msvcrt.kbhit():
|
|
282
|
-
data = msvcrt.getch()
|
|
283
|
-
loop.call_soon_threadsafe(
|
|
284
|
-
queue.put_nowait, data
|
|
285
|
-
)
|
|
286
|
-
else:
|
|
287
|
-
time.sleep(0.01)
|
|
288
|
-
finally:
|
|
289
|
-
loop.call_soon_threadsafe(
|
|
290
|
-
queue.put_nowait, b""
|
|
291
|
-
)
|
|
292
|
-
else:
|
|
214
|
+
reader = asyncio.StreamReader()
|
|
215
|
+
protocol = asyncio.StreamReaderProtocol(reader)
|
|
216
|
+
await loop.connect_read_pipe(
|
|
217
|
+
lambda: protocol, sys.stdin
|
|
218
|
+
)
|
|
293
219
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
break
|
|
303
|
-
finally:
|
|
304
|
-
loop.call_soon_threadsafe(
|
|
305
|
-
queue.put_nowait, b""
|
|
306
|
-
)
|
|
307
|
-
|
|
308
|
-
thread = threading.Thread(target=reader)
|
|
309
|
-
thread.start()
|
|
310
|
-
|
|
311
|
-
async def reader_task() -> bytes:
|
|
312
|
-
return await queue.get()
|
|
313
|
-
else:
|
|
314
|
-
reader = asyncio.StreamReader()
|
|
315
|
-
protocol = asyncio.StreamReaderProtocol(reader)
|
|
316
|
-
await loop.connect_read_pipe(
|
|
317
|
-
lambda: protocol, sys.stdin
|
|
220
|
+
while True:
|
|
221
|
+
# Read one character at a time from stdin without blocking the event loop.
|
|
222
|
+
done, pending = await asyncio.wait(
|
|
223
|
+
[
|
|
224
|
+
asyncio.create_task(reader.read(1)),
|
|
225
|
+
websocket_recv_task,
|
|
226
|
+
],
|
|
227
|
+
return_when=asyncio.FIRST_COMPLETED,
|
|
318
228
|
)
|
|
319
229
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
try:
|
|
324
|
-
while True:
|
|
325
|
-
# Read one character at a time from stdin without blocking the event loop.
|
|
326
|
-
done, pending = await asyncio.wait(
|
|
327
|
-
[
|
|
328
|
-
asyncio.create_task(reader_task()),
|
|
329
|
-
websocket_recv_task,
|
|
330
|
-
],
|
|
331
|
-
return_when=asyncio.FIRST_COMPLETED,
|
|
332
|
-
)
|
|
333
|
-
|
|
334
|
-
first = done.pop()
|
|
335
|
-
if first == websocket_recv_task:
|
|
336
|
-
break
|
|
337
|
-
|
|
338
|
-
data = first.result()
|
|
339
|
-
if not data:
|
|
340
|
-
break
|
|
230
|
+
first = done.pop()
|
|
231
|
+
if first == websocket_recv_task:
|
|
232
|
+
break
|
|
341
233
|
|
|
342
|
-
|
|
343
|
-
|
|
234
|
+
data = first.result()
|
|
235
|
+
if not data:
|
|
236
|
+
break
|
|
344
237
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
break
|
|
238
|
+
if websocket.closed:
|
|
239
|
+
break
|
|
348
240
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
else:
|
|
241
|
+
if tty:
|
|
242
|
+
if data == b"\x04":
|
|
352
243
|
break
|
|
353
|
-
|
|
354
|
-
if
|
|
355
|
-
|
|
356
|
-
|
|
244
|
+
|
|
245
|
+
if data:
|
|
246
|
+
send_queue.put_nowait(b"\0" + data)
|
|
247
|
+
else:
|
|
248
|
+
break
|
|
357
249
|
|
|
358
250
|
send_queue.put_nowait(b"\0")
|
|
359
251
|
|
|
@@ -391,7 +283,9 @@ def register(app: typer.Typer):
|
|
|
391
283
|
finally:
|
|
392
284
|
if not sys.stdin.closed and tty:
|
|
393
285
|
# Restore original terminal settings even if the coroutine is cancelled.
|
|
394
|
-
|
|
286
|
+
termios.tcsetattr(
|
|
287
|
+
sys.stdin, termios.TCSADRAIN, old_tty_settings
|
|
288
|
+
)
|
|
395
289
|
|
|
396
290
|
except Exception as e:
|
|
397
291
|
print(f"[red]{e}[/red]")
|
|
@@ -8,7 +8,7 @@ from meshagent.cli import auth_async
|
|
|
8
8
|
from meshagent.cli import async_typer
|
|
9
9
|
from meshagent.api.helpers import meshagent_base_url
|
|
10
10
|
from meshagent.api.accounts_client import AccountsClient
|
|
11
|
-
from meshagent.api.participant_token import ParticipantToken
|
|
11
|
+
from meshagent.api.participant_token import ParticipantToken
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
|
|
@@ -169,8 +169,6 @@ async def resolve_token_jwt(
|
|
|
169
169
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
170
170
|
)
|
|
171
171
|
|
|
172
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
173
|
-
|
|
174
172
|
token.add_role_grant(role=role)
|
|
175
173
|
token.add_room_grant(room)
|
|
176
174
|
|
|
@@ -2,7 +2,7 @@ import typer
|
|
|
2
2
|
from rich import print
|
|
3
3
|
from typing import Annotated
|
|
4
4
|
from meshagent.cli.common_options import ProjectIdOption, ApiKeyIdOption, RoomOption
|
|
5
|
-
from meshagent.api import ParticipantToken
|
|
5
|
+
from meshagent.api import ParticipantToken
|
|
6
6
|
from meshagent.cli.helper import resolve_project_id, resolve_api_key, resolve_room
|
|
7
7
|
from meshagent.cli import async_typer
|
|
8
8
|
from meshagent.cli.helper import get_client
|
|
@@ -15,7 +15,7 @@ app = async_typer.AsyncTyper()
|
|
|
15
15
|
async def generate(
|
|
16
16
|
*,
|
|
17
17
|
project_id: ProjectIdOption = None,
|
|
18
|
-
token_path: Annotated[str, typer.Option()]
|
|
18
|
+
token_path: Annotated[str, typer.Option()],
|
|
19
19
|
room: RoomOption,
|
|
20
20
|
api_key_id: ApiKeyIdOption = None,
|
|
21
21
|
name: Annotated[str, typer.Option()],
|
|
@@ -37,7 +37,6 @@ async def generate(
|
|
|
37
37
|
token.add_role_grant(role=role)
|
|
38
38
|
|
|
39
39
|
token.add_room_grant(room)
|
|
40
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
41
40
|
|
|
42
41
|
if token_path is None:
|
|
43
42
|
print(token.to_jwt(token=key))
|
|
@@ -10,7 +10,6 @@ from meshagent.api import (
|
|
|
10
10
|
ParticipantToken,
|
|
11
11
|
WebSocketClientProtocol,
|
|
12
12
|
RoomException,
|
|
13
|
-
ApiScope,
|
|
14
13
|
)
|
|
15
14
|
from meshagent.cli.helper import resolve_project_id, resolve_api_key, resolve_room
|
|
16
15
|
from meshagent.cli import async_typer
|
|
@@ -49,10 +48,9 @@ async def send(
|
|
|
49
48
|
token = ParticipantToken(
|
|
50
49
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
51
50
|
)
|
|
52
|
-
|
|
51
|
+
|
|
53
52
|
token.add_role_grant(role=role)
|
|
54
53
|
token.add_room_grant(room)
|
|
55
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
56
54
|
|
|
57
55
|
print("[bold green]Connecting to room...[/bold green]")
|
|
58
56
|
async with RoomClient(
|
|
@@ -100,7 +98,7 @@ async def receive(
|
|
|
100
98
|
token = ParticipantToken(
|
|
101
99
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
102
100
|
)
|
|
103
|
-
|
|
101
|
+
|
|
104
102
|
token.add_role_grant(role=role)
|
|
105
103
|
token.add_room_grant(room)
|
|
106
104
|
|
|
@@ -11,11 +11,7 @@ from pydantic import PositiveInt
|
|
|
11
11
|
import pydantic
|
|
12
12
|
from typing import Literal
|
|
13
13
|
from meshagent.cli import async_typer
|
|
14
|
-
from meshagent.api.specs.service import
|
|
15
|
-
ServiceSpec,
|
|
16
|
-
ServiceStorageMounts,
|
|
17
|
-
RoomStorageMount,
|
|
18
|
-
)
|
|
14
|
+
from meshagent.api.specs.service import ServiceSpec
|
|
19
15
|
|
|
20
16
|
|
|
21
17
|
from meshagent.cli.helper import (
|
|
@@ -31,7 +27,6 @@ from meshagent.api import (
|
|
|
31
27
|
WebSocketClientProtocol,
|
|
32
28
|
websocket_room_url,
|
|
33
29
|
meshagent_base_url,
|
|
34
|
-
ApiScope,
|
|
35
30
|
)
|
|
36
31
|
from meshagent.cli.common_options import OutputFormatOption
|
|
37
32
|
|
|
@@ -174,15 +169,6 @@ async def service_create(
|
|
|
174
169
|
for ps in port_specs
|
|
175
170
|
} or None
|
|
176
171
|
|
|
177
|
-
storage = ServiceStorageMounts(room=[])
|
|
178
|
-
|
|
179
|
-
if room_storage_path is not None:
|
|
180
|
-
storage.room.append(
|
|
181
|
-
RoomStorageMount(
|
|
182
|
-
path=room_storage_path, subpath=room_storage_subpath
|
|
183
|
-
)
|
|
184
|
-
)
|
|
185
|
-
|
|
186
172
|
service_obj = Service(
|
|
187
173
|
created_at=datetime.now(timezone.utc).isoformat(),
|
|
188
174
|
name=name,
|
|
@@ -190,11 +176,12 @@ async def service_create(
|
|
|
190
176
|
image=image,
|
|
191
177
|
command=command,
|
|
192
178
|
pull_secret=pull_secret,
|
|
179
|
+
room_storage_path=room_storage_path,
|
|
180
|
+
room_storage_subpath=room_storage_subpath,
|
|
193
181
|
environment=_kv_to_dict(env),
|
|
194
182
|
environment_secrets=env_secret or None,
|
|
195
183
|
runtime_secrets=_kv_to_dict(runtime_secret),
|
|
196
184
|
ports=ports_dict,
|
|
197
|
-
storage=storage,
|
|
198
185
|
)
|
|
199
186
|
|
|
200
187
|
try:
|
|
@@ -295,15 +282,6 @@ async def service_update(
|
|
|
295
282
|
for ps in port_specs
|
|
296
283
|
} or None
|
|
297
284
|
|
|
298
|
-
storage = ServiceStorageMounts(room=[])
|
|
299
|
-
|
|
300
|
-
if room_storage_path is not None:
|
|
301
|
-
storage.room.append(
|
|
302
|
-
RoomStorageMount(
|
|
303
|
-
path=room_storage_path, subpath=room_storage_subpath
|
|
304
|
-
)
|
|
305
|
-
)
|
|
306
|
-
|
|
307
285
|
service_obj = Service(
|
|
308
286
|
created_at=datetime.now(timezone.utc).isoformat(),
|
|
309
287
|
name=name,
|
|
@@ -311,11 +289,12 @@ async def service_update(
|
|
|
311
289
|
image=image,
|
|
312
290
|
command=command,
|
|
313
291
|
pull_secret=pull_secret,
|
|
292
|
+
room_storage_path=room_storage_path,
|
|
293
|
+
room_storage_subpath=room_storage_subpath,
|
|
314
294
|
environment=_kv_to_dict(env),
|
|
315
295
|
environment_secrets=env_secret or None,
|
|
316
296
|
runtime_secrets=_kv_to_dict(runtime_secret),
|
|
317
297
|
ports=ports_dict,
|
|
318
|
-
storage=storage,
|
|
319
298
|
)
|
|
320
299
|
|
|
321
300
|
try:
|
|
@@ -451,7 +430,6 @@ async def service_test(
|
|
|
451
430
|
token = ParticipantToken(
|
|
452
431
|
name=name, project_id=project_id, api_key_id=api_key_id
|
|
453
432
|
)
|
|
454
|
-
token.add_api_grant(ApiScope.agent_default())
|
|
455
433
|
token.add_role_grant("user")
|
|
456
434
|
token.add_room_grant(room)
|
|
457
435
|
token.extra_payload = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.12"
|
|
@@ -1,34 +1,28 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.12
|
|
4
4
|
Summary: CLI for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
7
7
|
Project-URL: Website, https://www.meshagent.com
|
|
8
8
|
Project-URL: Source, https://www.meshagent.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.12
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
Requires-Dist: typer~=0.15
|
|
12
|
+
Requires-Dist: pydantic-yaml~=1.4
|
|
13
|
+
Requires-Dist: meshagent-api~=0.5.12
|
|
14
|
+
Requires-Dist: meshagent-agents~=0.5.12
|
|
15
|
+
Requires-Dist: meshagent-computers~=0.5.12
|
|
16
|
+
Requires-Dist: meshagent-openai~=0.5.12
|
|
17
|
+
Requires-Dist: meshagent-tools~=0.5.12
|
|
18
|
+
Requires-Dist: meshagent-mcp~=0.5.12
|
|
12
19
|
Requires-Dist: supabase~=2.15
|
|
13
20
|
Requires-Dist: fastmcp~=2.8
|
|
14
21
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
15
22
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http~=1.33
|
|
16
23
|
Requires-Dist: art~=6.5
|
|
17
24
|
Requires-Dist: pydantic-yaml~=1.5
|
|
18
|
-
|
|
19
|
-
Requires-Dist: meshagent-agents[all]~=0.5.8b5; extra == "all"
|
|
20
|
-
Requires-Dist: meshagent-api[all]~=0.5.8b5; extra == "all"
|
|
21
|
-
Requires-Dist: meshagent-computers~=0.5.8b5; extra == "all"
|
|
22
|
-
Requires-Dist: meshagent-openai~=0.5.8b5; extra == "all"
|
|
23
|
-
Requires-Dist: meshagent-mcp~=0.5.8b5; extra == "all"
|
|
24
|
-
Requires-Dist: meshagent-tools~=0.5.8b5; extra == "all"
|
|
25
|
-
Requires-Dist: supabase-auth~=2.12.3; extra == "all"
|
|
26
|
-
Provides-Extra: mcp-service
|
|
27
|
-
Requires-Dist: meshagent-agents[all]~=0.5.8b5; extra == "mcp-service"
|
|
28
|
-
Requires-Dist: meshagent-api~=0.5.8b5; extra == "mcp-service"
|
|
29
|
-
Requires-Dist: meshagent-mcp~=0.5.8b5; extra == "mcp-service"
|
|
30
|
-
Requires-Dist: meshagent-tools~=0.5.8b5; extra == "mcp-service"
|
|
31
|
-
Requires-Dist: supabase-auth~=2.12.3; extra == "mcp-service"
|
|
25
|
+
Requires-Dist: supabase-auth~=2.12.3
|
|
32
26
|
|
|
33
27
|
# [Meshagent](https://www.meshagent.com)
|
|
34
28
|
|
|
@@ -12,13 +12,11 @@ meshagent/cli/cli.py
|
|
|
12
12
|
meshagent/cli/cli_mcp.py
|
|
13
13
|
meshagent/cli/cli_secrets.py
|
|
14
14
|
meshagent/cli/common_options.py
|
|
15
|
-
meshagent/cli/containers.py
|
|
16
15
|
meshagent/cli/developer.py
|
|
17
16
|
meshagent/cli/exec.py
|
|
18
17
|
meshagent/cli/helper.py
|
|
19
18
|
meshagent/cli/mailbot.py
|
|
20
19
|
meshagent/cli/messaging.py
|
|
21
|
-
meshagent/cli/oauth2.py
|
|
22
20
|
meshagent/cli/otel.py
|
|
23
21
|
meshagent/cli/participant_token.py
|
|
24
22
|
meshagent/cli/projects.py
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
typer~=0.15
|
|
2
|
+
pydantic-yaml~=1.4
|
|
3
|
+
meshagent-api~=0.5.12
|
|
4
|
+
meshagent-agents~=0.5.12
|
|
5
|
+
meshagent-computers~=0.5.12
|
|
6
|
+
meshagent-openai~=0.5.12
|
|
7
|
+
meshagent-tools~=0.5.12
|
|
8
|
+
meshagent-mcp~=0.5.12
|
|
9
|
+
supabase~=2.15
|
|
10
|
+
fastmcp~=2.8
|
|
11
|
+
opentelemetry-distro~=0.54b1
|
|
12
|
+
opentelemetry-exporter-otlp-proto-http~=1.33
|
|
13
|
+
art~=6.5
|
|
14
|
+
pydantic-yaml~=1.5
|
|
15
|
+
supabase-auth~=2.12.3
|