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.

Files changed (45) hide show
  1. meshagent/cli/__init__.py +3 -0
  2. meshagent/cli/agent.py +273 -0
  3. meshagent/cli/api_keys.py +102 -0
  4. meshagent/cli/async_typer.py +79 -0
  5. meshagent/cli/auth.py +30 -0
  6. meshagent/cli/auth_async.py +295 -0
  7. meshagent/cli/call.py +215 -0
  8. meshagent/cli/chatbot.py +1983 -0
  9. meshagent/cli/cli.py +187 -0
  10. meshagent/cli/cli_mcp.py +408 -0
  11. meshagent/cli/cli_secrets.py +414 -0
  12. meshagent/cli/common_options.py +47 -0
  13. meshagent/cli/containers.py +725 -0
  14. meshagent/cli/database.py +997 -0
  15. meshagent/cli/developer.py +70 -0
  16. meshagent/cli/exec.py +397 -0
  17. meshagent/cli/helper.py +236 -0
  18. meshagent/cli/helpers.py +185 -0
  19. meshagent/cli/host.py +41 -0
  20. meshagent/cli/mailbot.py +1295 -0
  21. meshagent/cli/mailboxes.py +223 -0
  22. meshagent/cli/meeting_transcriber.py +138 -0
  23. meshagent/cli/messaging.py +157 -0
  24. meshagent/cli/multi.py +357 -0
  25. meshagent/cli/oauth2.py +341 -0
  26. meshagent/cli/participant_token.py +63 -0
  27. meshagent/cli/port.py +70 -0
  28. meshagent/cli/projects.py +105 -0
  29. meshagent/cli/queue.py +91 -0
  30. meshagent/cli/room.py +26 -0
  31. meshagent/cli/rooms.py +214 -0
  32. meshagent/cli/services.py +722 -0
  33. meshagent/cli/sessions.py +26 -0
  34. meshagent/cli/storage.py +813 -0
  35. meshagent/cli/sync.py +434 -0
  36. meshagent/cli/task_runner.py +1317 -0
  37. meshagent/cli/version.py +1 -0
  38. meshagent/cli/voicebot.py +624 -0
  39. meshagent/cli/webhook.py +100 -0
  40. meshagent/cli/worker.py +1403 -0
  41. meshagent_cli-0.22.2.dist-info/METADATA +49 -0
  42. meshagent_cli-0.22.2.dist-info/RECORD +45 -0
  43. meshagent_cli-0.22.2.dist-info/WHEEL +5 -0
  44. meshagent_cli-0.22.2.dist-info/entry_points.txt +2 -0
  45. meshagent_cli-0.22.2.dist-info/top_level.txt +1 -0
@@ -0,0 +1,185 @@
1
+ from meshagent.cli import async_typer
2
+
3
+ from meshagent.api import SchemaRegistry, SchemaRegistration
4
+
5
+
6
+ import logging
7
+
8
+ app = async_typer.AsyncTyper(help="Developer helper services")
9
+
10
+
11
+ @app.async_command("service", help="Run local helper HTTP services")
12
+ async def helpers_service():
13
+ """Run local helper services (agents, schemas, toolkits)."""
14
+ from meshagent.agents.llmrunner import LLMTaskRunner, DynamicLLMTaskRunner
15
+ from meshagent.openai.tools import OpenAIResponsesAdapter
16
+ from meshagent.tools.storage import StorageToolkit
17
+ from meshagent.tools.database import DatabaseToolkitBuilder
18
+ from meshagent.api.services import ServiceHost
19
+
20
+ from meshagent.agents.schemas.gallery import gallery_schema
21
+ from meshagent.agents.schemas.document import document_schema
22
+ from meshagent.agents.schemas.transcript import transcript_schema
23
+ from meshagent.agents.schemas.super_editor_document import (
24
+ super_editor_document_schema,
25
+ )
26
+ from meshagent.agents.schemas.presentation import presentation_schema
27
+ from meshagent.agents import thread_schema
28
+ from meshagent.agents.widget_schema import widget_schema
29
+
30
+ logging.getLogger("openai").setLevel(logging.ERROR)
31
+ logging.getLogger("httpx").setLevel(logging.ERROR)
32
+
33
+ service = ServiceHost(port=9000)
34
+
35
+ @service.path("/runner")
36
+ class Runner(LLMTaskRunner):
37
+ def __init__(self, **kwargs):
38
+ super().__init__(
39
+ title="Generic Task Runner",
40
+ description="an agent that will perform a task with the selected tools",
41
+ llm_adapter=OpenAIResponsesAdapter(model="gpt-5.2"),
42
+ supports_tools=True,
43
+ input_prompt=True,
44
+ output_schema={
45
+ "type": "object",
46
+ "required": ["result"],
47
+ "additionalProperties": False,
48
+ "properties": {"result": {"type": "string"}},
49
+ },
50
+ annotations={"meshagent.task-runner.attachment-format": "tar"},
51
+ )
52
+
53
+ def get_toolkit_builders(self):
54
+ from meshagent.tools.storage import StorageToolkitBuilder
55
+ from meshagent.openai.tools.responses_adapter import WebSearchToolkitBuilder
56
+
57
+ providers = [
58
+ WebSearchToolkitBuilder(),
59
+ StorageToolkitBuilder(),
60
+ DatabaseToolkitBuilder(),
61
+ *super().get_toolkit_builders(),
62
+ ]
63
+
64
+ return providers
65
+
66
+ @service.path("/planner")
67
+ class Planner(LLMTaskRunner):
68
+ def __init__(self, **kwargs):
69
+ super().__init__(
70
+ title="Generic Task Runner (Legacy)",
71
+ description="an agent that will perform a task with the selected tools",
72
+ llm_adapter=OpenAIResponsesAdapter(model="gpt-5.2"),
73
+ supports_tools=True,
74
+ input_prompt=True,
75
+ output_schema={
76
+ "type": "object",
77
+ "required": ["result"],
78
+ "additionalProperties": False,
79
+ "properties": {"result": {"type": "string"}},
80
+ },
81
+ )
82
+
83
+ @service.path("/schema_planner")
84
+ class DynamicPlanner(DynamicLLMTaskRunner):
85
+ def __init__(self, **kwargs):
86
+ super().__init__(
87
+ title="Schema Task Runner",
88
+ description="an agent that can produces output that matches a schema",
89
+ llm_adapter=OpenAIResponsesAdapter(model="gpt-5.2"),
90
+ )
91
+
92
+ def get_toolkit_builders(self):
93
+ from meshagent.tools.storage import StorageToolkitBuilder
94
+ from meshagent.openai.tools.responses_adapter import WebSearchToolkitBuilder
95
+
96
+ providers = [
97
+ WebSearchToolkitBuilder(),
98
+ StorageToolkitBuilder(),
99
+ *super().get_toolkit_builders(),
100
+ ]
101
+
102
+ return providers
103
+
104
+ @service.path("/schemas/document")
105
+ class DocumentSchemaRegistry(SchemaRegistry):
106
+ def __init__(self):
107
+ name = "document"
108
+ schema = document_schema
109
+ super().__init__(
110
+ name=f"meshagent.schema.{name}",
111
+ validate_webhook_secret=False,
112
+ schemas=[SchemaRegistration(name=name, schema=schema)],
113
+ )
114
+
115
+ @service.path("/schemas/superdoc")
116
+ class SuperdocDocumentSchemaRegistry(SchemaRegistry):
117
+ def __init__(self):
118
+ name = "superdoc"
119
+ schema = super_editor_document_schema
120
+ super().__init__(
121
+ name=f"meshagent.schema.{name}",
122
+ validate_webhook_secret=False,
123
+ schemas=[SchemaRegistration(name=name, schema=schema)],
124
+ )
125
+
126
+ @service.path("/schemas/gallery")
127
+ class GalleryDocumentSchemaRegistry(SchemaRegistry):
128
+ def __init__(self):
129
+ name = "gallery"
130
+ schema = gallery_schema
131
+ super().__init__(
132
+ name=f"meshagent.schema.{name}",
133
+ validate_webhook_secret=False,
134
+ schemas=[SchemaRegistration(name=name, schema=schema)],
135
+ )
136
+
137
+ @service.path("/schemas/thread")
138
+ class ThreadDocumentSchemaRegistry(SchemaRegistry):
139
+ def __init__(self):
140
+ name = "thread"
141
+ schema = thread_schema
142
+ super().__init__(
143
+ name=f"meshagent.schema.{name}",
144
+ validate_webhook_secret=False,
145
+ schemas=[SchemaRegistration(name=name, schema=schema)],
146
+ )
147
+
148
+ @service.path("/schemas/widget")
149
+ class WidgetDocumentSchemaRegistry(SchemaRegistry):
150
+ def __init__(self):
151
+ name = "widget"
152
+ schema = widget_schema
153
+ super().__init__(
154
+ name=f"meshagent.schema.{name}",
155
+ validate_webhook_secret=False,
156
+ schemas=[SchemaRegistration(name=name, schema=schema)],
157
+ )
158
+
159
+ @service.path("/schemas/presentation")
160
+ class PresentationDocumentSchemaRegistry(SchemaRegistry):
161
+ def __init__(presentation):
162
+ name = "presentation"
163
+ schema = presentation_schema
164
+ super().__init__(
165
+ name=f"meshagent.schema.{name}",
166
+ validate_webhook_secret=False,
167
+ schemas=[SchemaRegistration(name=name, schema=schema)],
168
+ )
169
+
170
+ @service.path("/schemas/transcript")
171
+ class TranscriptRegistry(SchemaRegistry):
172
+ def __init__(self):
173
+ name = "transcript"
174
+ schema = transcript_schema
175
+ super().__init__(
176
+ name=f"meshagent.schema.{name}",
177
+ validate_webhook_secret=False,
178
+ schemas=[SchemaRegistration(name=name, schema=schema)],
179
+ )
180
+
181
+ @service.path("/toolkits/storage")
182
+ class HostedStorageToolkit(StorageToolkit):
183
+ pass
184
+
185
+ await service.run()
meshagent/cli/host.py ADDED
@@ -0,0 +1,41 @@
1
+ from meshagent.api.services import ServiceHost
2
+ from meshagent.api.specs.service import ServiceSpec
3
+ import asyncio
4
+ from meshagent.agents import Agent
5
+
6
+
7
+ options = {"deferred": False}
8
+ services = {}
9
+
10
+
11
+ agents: list[tuple[Agent, str]] = []
12
+
13
+
14
+ def set_deferred(deferred: bool):
15
+ options["deferred"] = deferred
16
+
17
+
18
+ def get_deferred() -> bool:
19
+ return options["deferred"]
20
+
21
+
22
+ def get_service(port: int, host: str) -> ServiceHost:
23
+ if port not in services:
24
+ services[port] = ServiceHost(host=host, port=port)
25
+
26
+ return services[port]
27
+
28
+
29
+ def service_specs() -> list[ServiceSpec]:
30
+ specs = []
31
+ for port, s in services.items():
32
+ specs.append(s.get_service_spec(image=""))
33
+ return specs
34
+
35
+
36
+ async def run_services():
37
+ tasks = []
38
+ for port, s in services.items():
39
+ tasks.append(s.run())
40
+
41
+ await asyncio.gather(*tasks)