meshagent-cli 0.22.2__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/__init__.py +3 -0
- meshagent/cli/agent.py +273 -0
- meshagent/cli/api_keys.py +102 -0
- meshagent/cli/async_typer.py +79 -0
- meshagent/cli/auth.py +30 -0
- meshagent/cli/auth_async.py +295 -0
- meshagent/cli/call.py +215 -0
- meshagent/cli/chatbot.py +1983 -0
- meshagent/cli/cli.py +187 -0
- meshagent/cli/cli_mcp.py +408 -0
- meshagent/cli/cli_secrets.py +414 -0
- meshagent/cli/common_options.py +47 -0
- meshagent/cli/containers.py +725 -0
- meshagent/cli/database.py +997 -0
- meshagent/cli/developer.py +70 -0
- meshagent/cli/exec.py +397 -0
- meshagent/cli/helper.py +236 -0
- meshagent/cli/helpers.py +185 -0
- meshagent/cli/host.py +41 -0
- meshagent/cli/mailbot.py +1295 -0
- meshagent/cli/mailboxes.py +223 -0
- meshagent/cli/meeting_transcriber.py +138 -0
- meshagent/cli/messaging.py +157 -0
- meshagent/cli/multi.py +357 -0
- meshagent/cli/oauth2.py +341 -0
- meshagent/cli/participant_token.py +63 -0
- meshagent/cli/port.py +70 -0
- meshagent/cli/projects.py +105 -0
- meshagent/cli/queue.py +91 -0
- meshagent/cli/room.py +26 -0
- meshagent/cli/rooms.py +214 -0
- meshagent/cli/services.py +722 -0
- meshagent/cli/sessions.py +26 -0
- meshagent/cli/storage.py +813 -0
- meshagent/cli/sync.py +434 -0
- meshagent/cli/task_runner.py +1317 -0
- meshagent/cli/version.py +1 -0
- meshagent/cli/voicebot.py +624 -0
- meshagent/cli/webhook.py +100 -0
- meshagent/cli/worker.py +1403 -0
- meshagent_cli-0.22.2.dist-info/METADATA +49 -0
- meshagent_cli-0.22.2.dist-info/RECORD +45 -0
- meshagent_cli-0.22.2.dist-info/WHEEL +5 -0
- meshagent_cli-0.22.2.dist-info/entry_points.txt +2 -0
- meshagent_cli-0.22.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
# Imports
|
|
3
|
+
# --------------------------------------------------------------------------
|
|
4
|
+
import typer
|
|
5
|
+
from rich import print
|
|
6
|
+
from typing import Annotated, Dict
|
|
7
|
+
from meshagent.cli.common_options import ProjectIdOption
|
|
8
|
+
|
|
9
|
+
from meshagent.cli import async_typer
|
|
10
|
+
from meshagent.cli.helper import get_client, print_json_table, resolve_project_id
|
|
11
|
+
from meshagent.api.client import (
|
|
12
|
+
PullSecret,
|
|
13
|
+
KeysSecret,
|
|
14
|
+
SecretLike,
|
|
15
|
+
) # or wherever you defined them
|
|
16
|
+
|
|
17
|
+
# --------------------------------------------------------------------------
|
|
18
|
+
# App Definition
|
|
19
|
+
# --------------------------------------------------------------------------
|
|
20
|
+
secrets_app = async_typer.AsyncTyper(help="Manage secrets for your project.")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# --------------------------------------------------------------------------
|
|
24
|
+
# Utility helpers
|
|
25
|
+
# --------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _parse_kv_inline(source: str | None) -> Dict[str, str]:
|
|
29
|
+
"""
|
|
30
|
+
Parse a space-separated list of `key=value` tokens into a dict.
|
|
31
|
+
"""
|
|
32
|
+
if source is None:
|
|
33
|
+
return {}
|
|
34
|
+
tokens = source.strip().split()
|
|
35
|
+
kv: Dict[str, str] = {}
|
|
36
|
+
for t in tokens:
|
|
37
|
+
if "=" not in t:
|
|
38
|
+
raise typer.BadParameter(f"Expected key=value, got '{t}'")
|
|
39
|
+
k, v = t.split("=", 1)
|
|
40
|
+
kv[k] = v
|
|
41
|
+
return kv
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# --------------------------------------------------------------------------
|
|
45
|
+
# Subcommand group: "keys"
|
|
46
|
+
# e.g.: meshagent secrets keys create --name <NAME> --data ...
|
|
47
|
+
# --------------------------------------------------------------------------
|
|
48
|
+
keys_app = async_typer.AsyncTyper(
|
|
49
|
+
help="Create or update environment-based key-value secrets."
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@keys_app.async_command("create")
|
|
54
|
+
async def create_keys_secret(
|
|
55
|
+
*,
|
|
56
|
+
project_id: ProjectIdOption,
|
|
57
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
58
|
+
data: Annotated[
|
|
59
|
+
str,
|
|
60
|
+
typer.Option(
|
|
61
|
+
"--data",
|
|
62
|
+
help="Format: key=value key2=value (space-separated)",
|
|
63
|
+
),
|
|
64
|
+
],
|
|
65
|
+
):
|
|
66
|
+
"""
|
|
67
|
+
Create a new 'keys' secret (opaque env-vars).
|
|
68
|
+
"""
|
|
69
|
+
client = await get_client()
|
|
70
|
+
try:
|
|
71
|
+
project_id = await resolve_project_id(project_id)
|
|
72
|
+
data_dict = _parse_kv_inline(data)
|
|
73
|
+
|
|
74
|
+
secret_obj = KeysSecret(
|
|
75
|
+
id="",
|
|
76
|
+
name=name,
|
|
77
|
+
data=data_dict,
|
|
78
|
+
)
|
|
79
|
+
secret_id = await client.create_secret(project_id=project_id, secret=secret_obj)
|
|
80
|
+
print(f"[green]Created keys secret:[/] {secret_id}")
|
|
81
|
+
|
|
82
|
+
finally:
|
|
83
|
+
await client.close()
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
@keys_app.async_command("update")
|
|
87
|
+
async def update_keys_secret(
|
|
88
|
+
*,
|
|
89
|
+
project_id: ProjectIdOption,
|
|
90
|
+
secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
|
|
91
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
92
|
+
data: Annotated[
|
|
93
|
+
str,
|
|
94
|
+
typer.Option(
|
|
95
|
+
"--data",
|
|
96
|
+
help="Format: key=value key2=value (space-separated)",
|
|
97
|
+
),
|
|
98
|
+
],
|
|
99
|
+
):
|
|
100
|
+
"""
|
|
101
|
+
Update an existing 'keys' secret (opaque env-vars).
|
|
102
|
+
"""
|
|
103
|
+
client = await get_client()
|
|
104
|
+
try:
|
|
105
|
+
project_id = await resolve_project_id(project_id)
|
|
106
|
+
data_dict = _parse_kv_inline(data)
|
|
107
|
+
|
|
108
|
+
secret_obj = KeysSecret(
|
|
109
|
+
id=secret_id,
|
|
110
|
+
name=name,
|
|
111
|
+
data=data_dict,
|
|
112
|
+
)
|
|
113
|
+
await client.update_secret(project_id=project_id, secret=secret_obj)
|
|
114
|
+
print(f"[green]Keys secret {secret_id} updated.[/]")
|
|
115
|
+
finally:
|
|
116
|
+
await client.close()
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# --------------------------------------------------------------------------
|
|
120
|
+
# Subcommand group: "docker"
|
|
121
|
+
# e.g.: meshagent secrets docker create --name myregistry --server ...
|
|
122
|
+
# --------------------------------------------------------------------------
|
|
123
|
+
docker_app = async_typer.AsyncTyper(
|
|
124
|
+
help="Create or update a Docker registry pull secret."
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
@docker_app.async_command("create")
|
|
129
|
+
async def create_docker_secret(
|
|
130
|
+
*,
|
|
131
|
+
project_id: ProjectIdOption,
|
|
132
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
133
|
+
server: Annotated[
|
|
134
|
+
str, typer.Option(help="Docker registry server, e.g. index.docker.io")
|
|
135
|
+
],
|
|
136
|
+
username: Annotated[str, typer.Option(help="Registry user name")],
|
|
137
|
+
password: Annotated[str, typer.Option(help="Registry password")],
|
|
138
|
+
email: Annotated[
|
|
139
|
+
str,
|
|
140
|
+
typer.Option(
|
|
141
|
+
"--email", help="User email for Docker config", show_default=False
|
|
142
|
+
),
|
|
143
|
+
] = "none@example.com",
|
|
144
|
+
):
|
|
145
|
+
"""
|
|
146
|
+
Create a new Docker pull secret (generic).
|
|
147
|
+
"""
|
|
148
|
+
client = await get_client()
|
|
149
|
+
try:
|
|
150
|
+
project_id = await resolve_project_id(project_id)
|
|
151
|
+
|
|
152
|
+
secret_obj = PullSecret(
|
|
153
|
+
id="",
|
|
154
|
+
name=name,
|
|
155
|
+
server=server,
|
|
156
|
+
username=username,
|
|
157
|
+
password=password,
|
|
158
|
+
email=email,
|
|
159
|
+
)
|
|
160
|
+
secret_id = await client.create_secret(project_id=project_id, secret=secret_obj)
|
|
161
|
+
print(f"[green]Created Docker pull secret:[/] {secret_id}")
|
|
162
|
+
finally:
|
|
163
|
+
await client.close()
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
@docker_app.async_command("update")
|
|
167
|
+
async def update_docker_secret(
|
|
168
|
+
*,
|
|
169
|
+
project_id: ProjectIdOption,
|
|
170
|
+
secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
|
|
171
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
172
|
+
server: Annotated[str, typer.Option(help="Docker registry server")],
|
|
173
|
+
username: Annotated[str, typer.Option(help="Registry user name")],
|
|
174
|
+
password: Annotated[str, typer.Option(help="Registry password")],
|
|
175
|
+
email: Annotated[
|
|
176
|
+
str,
|
|
177
|
+
typer.Option(
|
|
178
|
+
"--email", help="User email for Docker config", show_default=False
|
|
179
|
+
),
|
|
180
|
+
] = "none@example.com",
|
|
181
|
+
):
|
|
182
|
+
"""
|
|
183
|
+
Update an existing Docker pull secret (generic).
|
|
184
|
+
"""
|
|
185
|
+
client = await get_client()
|
|
186
|
+
try:
|
|
187
|
+
project_id = await resolve_project_id(project_id)
|
|
188
|
+
secret_obj = PullSecret(
|
|
189
|
+
id=secret_id,
|
|
190
|
+
name=name,
|
|
191
|
+
server=server,
|
|
192
|
+
username=username,
|
|
193
|
+
password=password,
|
|
194
|
+
email=email,
|
|
195
|
+
)
|
|
196
|
+
await client.update_secret(project_id=project_id, secret=secret_obj)
|
|
197
|
+
print(f"[green]Docker pull secret {secret_id} updated.[/]")
|
|
198
|
+
finally:
|
|
199
|
+
await client.close()
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
# --------------------------------------------------------------------------
|
|
203
|
+
# Subcommand group: "acr"
|
|
204
|
+
# e.g.: meshagent secrets acr create --name <NAME> --server <REG>.azurecr.io ...
|
|
205
|
+
# --------------------------------------------------------------------------
|
|
206
|
+
acr_app = async_typer.AsyncTyper(
|
|
207
|
+
help="Create or update an Azure Container Registry pull secret."
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
@acr_app.async_command("create")
|
|
212
|
+
async def create_acr_secret(
|
|
213
|
+
*,
|
|
214
|
+
project_id: ProjectIdOption,
|
|
215
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
216
|
+
server: Annotated[str, typer.Option(help="ACR server, e.g. myregistry.azurecr.io")],
|
|
217
|
+
username: Annotated[str, typer.Option(help="Service principal ID")],
|
|
218
|
+
password: Annotated[str, typer.Option(help="Service principal secret/password")],
|
|
219
|
+
):
|
|
220
|
+
"""
|
|
221
|
+
Create a new ACR pull secret (defaults email to 'none@microsoft.com').
|
|
222
|
+
"""
|
|
223
|
+
client = await get_client()
|
|
224
|
+
try:
|
|
225
|
+
project_id = await resolve_project_id(project_id)
|
|
226
|
+
|
|
227
|
+
secret_obj = PullSecret(
|
|
228
|
+
id="",
|
|
229
|
+
name=name,
|
|
230
|
+
server=server,
|
|
231
|
+
username=username,
|
|
232
|
+
password=password,
|
|
233
|
+
email="none@microsoft.com", # Set a default for ACR usage
|
|
234
|
+
)
|
|
235
|
+
secret_id = await client.create_secret(project_id=project_id, secret=secret_obj)
|
|
236
|
+
print(f"[green]Created ACR pull secret:[/] {secret_id}")
|
|
237
|
+
finally:
|
|
238
|
+
await client.close()
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
@acr_app.async_command("update")
|
|
242
|
+
async def update_acr_secret(
|
|
243
|
+
*,
|
|
244
|
+
project_id: ProjectIdOption,
|
|
245
|
+
secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
|
|
246
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
247
|
+
server: Annotated[str, typer.Option(help="ACR server, e.g. myregistry.azurecr.io")],
|
|
248
|
+
username: Annotated[str, typer.Option(help="Service principal ID")],
|
|
249
|
+
password: Annotated[str, typer.Option(help="Service principal secret/password")],
|
|
250
|
+
):
|
|
251
|
+
"""
|
|
252
|
+
Update an existing ACR pull secret (defaults email to 'none@microsoft.com').
|
|
253
|
+
"""
|
|
254
|
+
client = await get_client()
|
|
255
|
+
try:
|
|
256
|
+
project_id = await resolve_project_id(project_id)
|
|
257
|
+
secret_obj = PullSecret(
|
|
258
|
+
id=secret_id,
|
|
259
|
+
name=name,
|
|
260
|
+
server=server,
|
|
261
|
+
username=username,
|
|
262
|
+
password=password,
|
|
263
|
+
email="none@microsoft.com",
|
|
264
|
+
)
|
|
265
|
+
await client.update_secret(project_id=project_id, secret=secret_obj)
|
|
266
|
+
print(f"[green]ACR pull secret {secret_id} updated.[/]")
|
|
267
|
+
finally:
|
|
268
|
+
await client.close()
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# --------------------------------------------------------------------------
|
|
272
|
+
# Subcommand group: "gar"
|
|
273
|
+
# e.g.: meshagent secrets gar create --name <NAME> --server ...
|
|
274
|
+
# (Typically sets email='none@google.com' and username='_json_key')
|
|
275
|
+
# --------------------------------------------------------------------------
|
|
276
|
+
gar_app = async_typer.AsyncTyper(
|
|
277
|
+
help="Create or update a Google Artifact Registry pull secret."
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
@gar_app.async_command("create")
|
|
282
|
+
async def create_gar_secret(
|
|
283
|
+
*,
|
|
284
|
+
project_id: ProjectIdOption,
|
|
285
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
286
|
+
server: Annotated[str, typer.Option(help="GAR host, e.g. us-west1-docker.pkg.dev")],
|
|
287
|
+
json_key: Annotated[
|
|
288
|
+
str, typer.Option(help="Entire GCP service account JSON as string")
|
|
289
|
+
],
|
|
290
|
+
):
|
|
291
|
+
"""
|
|
292
|
+
Create a new Google Artifact Registry pull secret.
|
|
293
|
+
|
|
294
|
+
By default, sets email='none@google.com', username='_json_key'
|
|
295
|
+
"""
|
|
296
|
+
client = await get_client()
|
|
297
|
+
try:
|
|
298
|
+
project_id = await resolve_project_id(project_id)
|
|
299
|
+
|
|
300
|
+
secret_obj = PullSecret(
|
|
301
|
+
id="",
|
|
302
|
+
name=name,
|
|
303
|
+
server=server,
|
|
304
|
+
username="_json_key",
|
|
305
|
+
password=json_key,
|
|
306
|
+
email="none@google.com",
|
|
307
|
+
)
|
|
308
|
+
secret_id = await client.create_secret(project_id=project_id, secret=secret_obj)
|
|
309
|
+
print(f"[green]Created GAR pull secret:[/] {secret_id}")
|
|
310
|
+
finally:
|
|
311
|
+
await client.close()
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
@gar_app.async_command("update")
|
|
315
|
+
async def update_gar_secret(
|
|
316
|
+
*,
|
|
317
|
+
project_id: ProjectIdOption,
|
|
318
|
+
secret_id: Annotated[str, typer.Option(help="Existing secret ID")],
|
|
319
|
+
name: Annotated[str, typer.Option(help="Secret name")],
|
|
320
|
+
server: Annotated[str, typer.Option(help="GAR host, e.g. us-west1-docker.pkg.dev")],
|
|
321
|
+
json_key: Annotated[
|
|
322
|
+
str, typer.Option(help="Entire GCP service account JSON as string")
|
|
323
|
+
],
|
|
324
|
+
):
|
|
325
|
+
"""
|
|
326
|
+
Update an existing Google Artifact Registry pull secret.
|
|
327
|
+
"""
|
|
328
|
+
client = await get_client()
|
|
329
|
+
try:
|
|
330
|
+
project_id = await resolve_project_id(project_id)
|
|
331
|
+
secret_obj = PullSecret(
|
|
332
|
+
id=secret_id,
|
|
333
|
+
name=name,
|
|
334
|
+
server=server,
|
|
335
|
+
username="_json_key",
|
|
336
|
+
password=json_key,
|
|
337
|
+
email="none@google.com",
|
|
338
|
+
)
|
|
339
|
+
await client.update_secret(project_id=project_id, secret=secret_obj)
|
|
340
|
+
print(f"[green]GAR pull secret {secret_id} updated.[/]")
|
|
341
|
+
finally:
|
|
342
|
+
await client.close()
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
# --------------------------------------------------------------------------
|
|
346
|
+
# Additional commands (shared by all secrets): list, delete
|
|
347
|
+
# --------------------------------------------------------------------------
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
@secrets_app.async_command("list")
|
|
351
|
+
async def secret_list(*, project_id: ProjectIdOption):
|
|
352
|
+
"""List all secrets in the project (typed as Docker/ACR/GAR or Keys secrets)."""
|
|
353
|
+
client = await get_client()
|
|
354
|
+
try:
|
|
355
|
+
project_id = await resolve_project_id(project_id)
|
|
356
|
+
|
|
357
|
+
secrets: list[SecretLike] = await client.list_secrets(project_id)
|
|
358
|
+
|
|
359
|
+
# Convert each secret → plain dict for tabular output
|
|
360
|
+
rows = []
|
|
361
|
+
for s in secrets:
|
|
362
|
+
row = {
|
|
363
|
+
"id": s.id,
|
|
364
|
+
"name": s.name,
|
|
365
|
+
"type": s.type,
|
|
366
|
+
}
|
|
367
|
+
# If it's a KeysSecret, row["data_keys"] = ...
|
|
368
|
+
if hasattr(s, "data"):
|
|
369
|
+
# For Docker-ish secrets, 'data' typically has server/username/password
|
|
370
|
+
if isinstance(s, PullSecret):
|
|
371
|
+
row["data_keys"] = "server, username, password"
|
|
372
|
+
else:
|
|
373
|
+
# KeysSecret
|
|
374
|
+
row["data_keys"] = ", ".join(s.data.keys())
|
|
375
|
+
rows.append(row)
|
|
376
|
+
|
|
377
|
+
print_json_table(rows, "id", "type", "name", "data_keys")
|
|
378
|
+
|
|
379
|
+
finally:
|
|
380
|
+
await client.close()
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
@secrets_app.async_command("delete")
|
|
384
|
+
async def secret_delete(
|
|
385
|
+
*,
|
|
386
|
+
project_id: ProjectIdOption,
|
|
387
|
+
secret_id: Annotated[str, typer.Argument(help="ID of the secret to delete")],
|
|
388
|
+
):
|
|
389
|
+
"""Delete a secret."""
|
|
390
|
+
client = await get_client()
|
|
391
|
+
try:
|
|
392
|
+
project_id = await resolve_project_id(project_id=project_id)
|
|
393
|
+
await client.delete_secret(project_id=project_id, secret_id=secret_id)
|
|
394
|
+
print(f"[green]Secret {secret_id} deleted.[/]")
|
|
395
|
+
finally:
|
|
396
|
+
await client.close()
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
# --------------------------------------------------------------------------
|
|
400
|
+
# Wire up sub-apps
|
|
401
|
+
# --------------------------------------------------------------------------
|
|
402
|
+
secrets_app.add_typer(keys_app, name="keys")
|
|
403
|
+
secrets_app.add_typer(docker_app, name="docker")
|
|
404
|
+
secrets_app.add_typer(acr_app, name="acr")
|
|
405
|
+
secrets_app.add_typer(gar_app, name="gar")
|
|
406
|
+
|
|
407
|
+
app = secrets_app
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
# If you want to attach `secrets_app` to your main CLI app, do something like:
|
|
411
|
+
# main_app = async_typer.AsyncTyper()
|
|
412
|
+
# main_app.add_typer(secrets_app, name="secrets")
|
|
413
|
+
# if __name__ == "__main__":
|
|
414
|
+
# main_app()
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import typer
|
|
2
|
+
from typing import Annotated, Optional
|
|
3
|
+
import os
|
|
4
|
+
from meshagent.cli.helper import _load_settings
|
|
5
|
+
|
|
6
|
+
OutputFormatOption = Annotated[
|
|
7
|
+
str,
|
|
8
|
+
typer.Option("--output", "-o", help="output format [json|table]"),
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
if os.getenv("MESHAGENT_CLI_BUILD"):
|
|
12
|
+
default_project_id = None
|
|
13
|
+
else:
|
|
14
|
+
settings = _load_settings()
|
|
15
|
+
if settings is None:
|
|
16
|
+
default_project_id = None
|
|
17
|
+
else:
|
|
18
|
+
default_project_id = settings.active_project
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def get_default_project_id():
|
|
22
|
+
return os.getenv("MESHAGENT_PROJECT_ID") or default_project_id
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
ProjectIdOption = Annotated[
|
|
26
|
+
Optional[str],
|
|
27
|
+
typer.Option(
|
|
28
|
+
"--project-id",
|
|
29
|
+
help="A MeshAgent project id. If empty, the activated project will be used.",
|
|
30
|
+
default_factory=get_default_project_id(),
|
|
31
|
+
),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
RoomOption = Annotated[
|
|
35
|
+
Optional[str],
|
|
36
|
+
typer.Option(
|
|
37
|
+
"--room", help="Room name", default_factory=os.getenv("MESHAGENT_ROOM")
|
|
38
|
+
),
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
RoomCreateOption = Annotated[
|
|
42
|
+
bool,
|
|
43
|
+
typer.Option(
|
|
44
|
+
"--create",
|
|
45
|
+
help="Room name",
|
|
46
|
+
),
|
|
47
|
+
]
|