mcp-proxy-adapter 6.0.0__py3-none-any.whl → 6.0.1__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.
Files changed (212) hide show
  1. mcp_proxy_adapter/__main__.py +27 -7
  2. mcp_proxy_adapter/api/app.py +209 -79
  3. mcp_proxy_adapter/api/handlers.py +16 -5
  4. mcp_proxy_adapter/api/middleware/__init__.py +14 -9
  5. mcp_proxy_adapter/api/middleware/command_permission_middleware.py +148 -0
  6. mcp_proxy_adapter/api/middleware/factory.py +36 -12
  7. mcp_proxy_adapter/api/middleware/protocol_middleware.py +84 -18
  8. mcp_proxy_adapter/api/middleware/unified_security.py +197 -0
  9. mcp_proxy_adapter/api/middleware/user_info_middleware.py +158 -0
  10. mcp_proxy_adapter/commands/__init__.py +7 -1
  11. mcp_proxy_adapter/commands/base.py +7 -4
  12. mcp_proxy_adapter/commands/builtin_commands.py +8 -2
  13. mcp_proxy_adapter/commands/command_registry.py +8 -0
  14. mcp_proxy_adapter/commands/echo_command.py +81 -0
  15. mcp_proxy_adapter/commands/health_command.py +1 -1
  16. mcp_proxy_adapter/commands/help_command.py +21 -14
  17. mcp_proxy_adapter/commands/proxy_registration_command.py +326 -185
  18. mcp_proxy_adapter/commands/role_test_command.py +141 -0
  19. mcp_proxy_adapter/commands/security_command.py +488 -0
  20. mcp_proxy_adapter/commands/ssl_setup_command.py +234 -351
  21. mcp_proxy_adapter/commands/token_management_command.py +1 -1
  22. mcp_proxy_adapter/config.py +323 -40
  23. mcp_proxy_adapter/core/app_factory.py +410 -0
  24. mcp_proxy_adapter/core/app_runner.py +272 -0
  25. mcp_proxy_adapter/core/certificate_utils.py +291 -73
  26. mcp_proxy_adapter/core/client.py +574 -0
  27. mcp_proxy_adapter/core/client_manager.py +284 -0
  28. mcp_proxy_adapter/core/client_security.py +384 -0
  29. mcp_proxy_adapter/core/logging.py +8 -3
  30. mcp_proxy_adapter/core/mtls_asgi.py +156 -0
  31. mcp_proxy_adapter/core/mtls_asgi_app.py +187 -0
  32. mcp_proxy_adapter/core/protocol_manager.py +169 -10
  33. mcp_proxy_adapter/core/proxy_client.py +602 -0
  34. mcp_proxy_adapter/core/proxy_registration.py +299 -47
  35. mcp_proxy_adapter/core/security_adapter.py +12 -15
  36. mcp_proxy_adapter/core/security_integration.py +286 -0
  37. mcp_proxy_adapter/core/server_adapter.py +282 -0
  38. mcp_proxy_adapter/core/server_engine.py +270 -0
  39. mcp_proxy_adapter/core/ssl_utils.py +13 -12
  40. mcp_proxy_adapter/core/transport_manager.py +5 -5
  41. mcp_proxy_adapter/core/unified_config_adapter.py +579 -0
  42. mcp_proxy_adapter/examples/__init__.py +13 -4
  43. mcp_proxy_adapter/examples/basic_framework/__init__.py +9 -0
  44. mcp_proxy_adapter/examples/basic_framework/commands/__init__.py +4 -0
  45. mcp_proxy_adapter/examples/basic_framework/hooks/__init__.py +4 -0
  46. mcp_proxy_adapter/examples/basic_framework/main.py +44 -0
  47. mcp_proxy_adapter/examples/commands/__init__.py +5 -0
  48. mcp_proxy_adapter/examples/create_certificates_simple.py +550 -0
  49. mcp_proxy_adapter/examples/debug_request_state.py +112 -0
  50. mcp_proxy_adapter/examples/debug_role_chain.py +158 -0
  51. mcp_proxy_adapter/examples/demo_client.py +275 -0
  52. mcp_proxy_adapter/examples/examples/basic_framework/__init__.py +9 -0
  53. mcp_proxy_adapter/examples/examples/basic_framework/commands/__init__.py +4 -0
  54. mcp_proxy_adapter/examples/examples/basic_framework/hooks/__init__.py +4 -0
  55. mcp_proxy_adapter/examples/examples/basic_framework/main.py +44 -0
  56. mcp_proxy_adapter/examples/examples/full_application/__init__.py +12 -0
  57. mcp_proxy_adapter/examples/examples/full_application/commands/__init__.py +7 -0
  58. mcp_proxy_adapter/examples/examples/full_application/commands/custom_echo_command.py +80 -0
  59. mcp_proxy_adapter/examples/examples/full_application/commands/dynamic_calculator_command.py +90 -0
  60. mcp_proxy_adapter/examples/examples/full_application/hooks/__init__.py +7 -0
  61. mcp_proxy_adapter/examples/examples/full_application/hooks/application_hooks.py +75 -0
  62. mcp_proxy_adapter/examples/examples/full_application/hooks/builtin_command_hooks.py +71 -0
  63. mcp_proxy_adapter/examples/examples/full_application/main.py +173 -0
  64. mcp_proxy_adapter/examples/examples/full_application/proxy_endpoints.py +154 -0
  65. mcp_proxy_adapter/examples/full_application/__init__.py +12 -0
  66. mcp_proxy_adapter/examples/full_application/commands/__init__.py +7 -0
  67. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +80 -0
  68. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +90 -0
  69. mcp_proxy_adapter/examples/full_application/hooks/__init__.py +7 -0
  70. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +75 -0
  71. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +71 -0
  72. mcp_proxy_adapter/examples/full_application/main.py +173 -0
  73. mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +154 -0
  74. mcp_proxy_adapter/examples/generate_all_certificates.py +362 -0
  75. mcp_proxy_adapter/examples/generate_certificates.py +177 -0
  76. mcp_proxy_adapter/examples/generate_certificates_and_tokens.py +369 -0
  77. mcp_proxy_adapter/examples/generate_test_configs.py +331 -0
  78. mcp_proxy_adapter/examples/proxy_registration_example.py +334 -0
  79. mcp_proxy_adapter/examples/run_example.py +59 -0
  80. mcp_proxy_adapter/examples/run_full_test_suite.py +318 -0
  81. mcp_proxy_adapter/examples/run_proxy_server.py +146 -0
  82. mcp_proxy_adapter/examples/run_security_tests.py +544 -0
  83. mcp_proxy_adapter/examples/run_security_tests_fixed.py +247 -0
  84. mcp_proxy_adapter/examples/scripts/config_generator.py +740 -0
  85. mcp_proxy_adapter/examples/scripts/create_certificates_simple.py +560 -0
  86. mcp_proxy_adapter/examples/scripts/generate_certificates_and_tokens.py +369 -0
  87. mcp_proxy_adapter/examples/security_test_client.py +782 -0
  88. mcp_proxy_adapter/examples/setup_test_environment.py +328 -0
  89. mcp_proxy_adapter/examples/test_config.py +148 -0
  90. mcp_proxy_adapter/examples/test_config_generator.py +86 -0
  91. mcp_proxy_adapter/examples/test_examples.py +281 -0
  92. mcp_proxy_adapter/examples/universal_client.py +620 -0
  93. mcp_proxy_adapter/main.py +66 -148
  94. mcp_proxy_adapter/utils/config_generator.py +1008 -0
  95. mcp_proxy_adapter/version.py +5 -2
  96. mcp_proxy_adapter-6.0.1.dist-info/METADATA +679 -0
  97. mcp_proxy_adapter-6.0.1.dist-info/RECORD +140 -0
  98. mcp_proxy_adapter-6.0.1.dist-info/entry_points.txt +2 -0
  99. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/licenses/LICENSE +2 -2
  100. mcp_proxy_adapter/api/middleware/auth.py +0 -146
  101. mcp_proxy_adapter/api/middleware/auth_adapter.py +0 -235
  102. mcp_proxy_adapter/api/middleware/mtls_adapter.py +0 -305
  103. mcp_proxy_adapter/api/middleware/mtls_middleware.py +0 -296
  104. mcp_proxy_adapter/api/middleware/rate_limit.py +0 -152
  105. mcp_proxy_adapter/api/middleware/rate_limit_adapter.py +0 -241
  106. mcp_proxy_adapter/api/middleware/roles_adapter.py +0 -365
  107. mcp_proxy_adapter/api/middleware/roles_middleware.py +0 -381
  108. mcp_proxy_adapter/api/middleware/security.py +0 -376
  109. mcp_proxy_adapter/api/middleware/token_auth_middleware.py +0 -261
  110. mcp_proxy_adapter/examples/README.md +0 -124
  111. mcp_proxy_adapter/examples/basic_server/README.md +0 -60
  112. mcp_proxy_adapter/examples/basic_server/__init__.py +0 -7
  113. mcp_proxy_adapter/examples/basic_server/basic_custom_settings.json +0 -39
  114. mcp_proxy_adapter/examples/basic_server/config.json +0 -70
  115. mcp_proxy_adapter/examples/basic_server/config_all_protocols.json +0 -54
  116. mcp_proxy_adapter/examples/basic_server/config_http.json +0 -70
  117. mcp_proxy_adapter/examples/basic_server/config_http_only.json +0 -52
  118. mcp_proxy_adapter/examples/basic_server/config_https.json +0 -58
  119. mcp_proxy_adapter/examples/basic_server/config_mtls.json +0 -58
  120. mcp_proxy_adapter/examples/basic_server/config_ssl.json +0 -46
  121. mcp_proxy_adapter/examples/basic_server/custom_settings_example.py +0 -238
  122. mcp_proxy_adapter/examples/basic_server/server.py +0 -114
  123. mcp_proxy_adapter/examples/custom_commands/README.md +0 -127
  124. mcp_proxy_adapter/examples/custom_commands/__init__.py +0 -27
  125. mcp_proxy_adapter/examples/custom_commands/advanced_hooks.py +0 -566
  126. mcp_proxy_adapter/examples/custom_commands/auto_commands/__init__.py +0 -6
  127. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_echo_command.py +0 -103
  128. mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_info_command.py +0 -111
  129. mcp_proxy_adapter/examples/custom_commands/auto_commands/test_command.py +0 -105
  130. mcp_proxy_adapter/examples/custom_commands/catalog/commands/test_command.py +0 -129
  131. mcp_proxy_adapter/examples/custom_commands/config.json +0 -118
  132. mcp_proxy_adapter/examples/custom_commands/config_all_protocols.json +0 -46
  133. mcp_proxy_adapter/examples/custom_commands/config_https_only.json +0 -46
  134. mcp_proxy_adapter/examples/custom_commands/config_https_transport.json +0 -33
  135. mcp_proxy_adapter/examples/custom_commands/config_mtls_only.json +0 -46
  136. mcp_proxy_adapter/examples/custom_commands/config_mtls_transport.json +0 -33
  137. mcp_proxy_adapter/examples/custom_commands/config_single_transport.json +0 -33
  138. mcp_proxy_adapter/examples/custom_commands/custom_health_command.py +0 -169
  139. mcp_proxy_adapter/examples/custom_commands/custom_help_command.py +0 -215
  140. mcp_proxy_adapter/examples/custom_commands/custom_openapi_generator.py +0 -76
  141. mcp_proxy_adapter/examples/custom_commands/custom_settings.json +0 -96
  142. mcp_proxy_adapter/examples/custom_commands/custom_settings_manager.py +0 -241
  143. mcp_proxy_adapter/examples/custom_commands/data_transform_command.py +0 -135
  144. mcp_proxy_adapter/examples/custom_commands/echo_command.py +0 -122
  145. mcp_proxy_adapter/examples/custom_commands/full_help_response.json +0 -1
  146. mcp_proxy_adapter/examples/custom_commands/generated_openapi.json +0 -629
  147. mcp_proxy_adapter/examples/custom_commands/get_openapi.py +0 -103
  148. mcp_proxy_adapter/examples/custom_commands/hooks.py +0 -230
  149. mcp_proxy_adapter/examples/custom_commands/intercept_command.py +0 -123
  150. mcp_proxy_adapter/examples/custom_commands/loadable_commands/test_ignored.py +0 -129
  151. mcp_proxy_adapter/examples/custom_commands/manual_echo_command.py +0 -103
  152. mcp_proxy_adapter/examples/custom_commands/proxy_connection_manager.py +0 -278
  153. mcp_proxy_adapter/examples/custom_commands/server.py +0 -252
  154. mcp_proxy_adapter/examples/custom_commands/simple_openapi_server.py +0 -75
  155. mcp_proxy_adapter/examples/custom_commands/start_server_with_proxy_manager.py +0 -299
  156. mcp_proxy_adapter/examples/custom_commands/start_server_with_registration.py +0 -278
  157. mcp_proxy_adapter/examples/custom_commands/test_hooks.py +0 -176
  158. mcp_proxy_adapter/examples/custom_commands/test_openapi.py +0 -27
  159. mcp_proxy_adapter/examples/custom_commands/test_registry.py +0 -23
  160. mcp_proxy_adapter/examples/custom_commands/test_simple.py +0 -19
  161. mcp_proxy_adapter/examples/custom_project_example/README.md +0 -103
  162. mcp_proxy_adapter/examples/custom_project_example/README_EN.md +0 -103
  163. mcp_proxy_adapter/examples/deployment/README.md +0 -49
  164. mcp_proxy_adapter/examples/deployment/__init__.py +0 -7
  165. mcp_proxy_adapter/examples/deployment/config.development.json +0 -8
  166. mcp_proxy_adapter/examples/deployment/config.json +0 -29
  167. mcp_proxy_adapter/examples/deployment/config.production.json +0 -12
  168. mcp_proxy_adapter/examples/deployment/config.staging.json +0 -11
  169. mcp_proxy_adapter/examples/deployment/docker-compose.yml +0 -31
  170. mcp_proxy_adapter/examples/deployment/run.sh +0 -43
  171. mcp_proxy_adapter/examples/deployment/run_docker.sh +0 -84
  172. mcp_proxy_adapter/examples/simple_custom_commands/README.md +0 -149
  173. mcp_proxy_adapter/examples/simple_custom_commands/README_EN.md +0 -149
  174. mcp_proxy_adapter/schemas/base_schema.json +0 -114
  175. mcp_proxy_adapter/schemas/openapi_schema.json +0 -314
  176. mcp_proxy_adapter/schemas/roles_schema.json +0 -162
  177. mcp_proxy_adapter/tests/__init__.py +0 -0
  178. mcp_proxy_adapter/tests/api/__init__.py +0 -3
  179. mcp_proxy_adapter/tests/api/test_cmd_endpoint.py +0 -115
  180. mcp_proxy_adapter/tests/api/test_custom_openapi.py +0 -617
  181. mcp_proxy_adapter/tests/api/test_handlers.py +0 -522
  182. mcp_proxy_adapter/tests/api/test_middleware.py +0 -340
  183. mcp_proxy_adapter/tests/api/test_schemas.py +0 -546
  184. mcp_proxy_adapter/tests/api/test_tool_integration.py +0 -531
  185. mcp_proxy_adapter/tests/commands/__init__.py +0 -3
  186. mcp_proxy_adapter/tests/commands/test_config_command.py +0 -211
  187. mcp_proxy_adapter/tests/commands/test_echo_command.py +0 -127
  188. mcp_proxy_adapter/tests/commands/test_help_command.py +0 -136
  189. mcp_proxy_adapter/tests/conftest.py +0 -131
  190. mcp_proxy_adapter/tests/functional/__init__.py +0 -3
  191. mcp_proxy_adapter/tests/functional/test_api.py +0 -253
  192. mcp_proxy_adapter/tests/integration/__init__.py +0 -3
  193. mcp_proxy_adapter/tests/integration/test_cmd_integration.py +0 -129
  194. mcp_proxy_adapter/tests/integration/test_integration.py +0 -255
  195. mcp_proxy_adapter/tests/performance/__init__.py +0 -3
  196. mcp_proxy_adapter/tests/performance/test_performance.py +0 -189
  197. mcp_proxy_adapter/tests/stubs/__init__.py +0 -10
  198. mcp_proxy_adapter/tests/stubs/echo_command.py +0 -104
  199. mcp_proxy_adapter/tests/test_api_endpoints.py +0 -271
  200. mcp_proxy_adapter/tests/test_api_handlers.py +0 -289
  201. mcp_proxy_adapter/tests/test_base_command.py +0 -123
  202. mcp_proxy_adapter/tests/test_batch_requests.py +0 -117
  203. mcp_proxy_adapter/tests/test_command_registry.py +0 -281
  204. mcp_proxy_adapter/tests/test_config.py +0 -127
  205. mcp_proxy_adapter/tests/test_utils.py +0 -65
  206. mcp_proxy_adapter/tests/unit/__init__.py +0 -3
  207. mcp_proxy_adapter/tests/unit/test_base_command.py +0 -436
  208. mcp_proxy_adapter/tests/unit/test_config.py +0 -270
  209. mcp_proxy_adapter-6.0.0.dist-info/METADATA +0 -201
  210. mcp_proxy_adapter-6.0.0.dist-info/RECORD +0 -179
  211. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/WHEEL +0 -0
  212. {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.0.1.dist-info}/top_level.txt +0 -0
@@ -1,629 +0,0 @@
1
- {
2
- "openapi": "3.0.2",
3
- "info": {
4
- "title": "Extended MCP Proxy Server",
5
- "description": "Advanced MCP Proxy Adapter server with custom commands and hooks\n\n## Available commands:\necho, help, health, manual_echo, config, reload, settings, load, unload, plugins, transport_management, proxy_registration\n\n## Getting help\n\nWithout parameters (list of all commands):\n```json\n{\"jsonrpc\": \"2.0\", \"method\": \"help\", \"id\": 1}\n```\n\nWith parameters (information about a specific command):\n```json\n{\"jsonrpc\": \"2.0\", \"method\": \"help\", \"params\": {\"command\": \"echo\"}, \"id\": 1}\n```\n",
6
- "version": "2.1.0"
7
- },
8
- "paths": {
9
- "/cmd": {
10
- "post": {
11
- "summary": "Execute Command",
12
- "description": "Executes a command via JSON-RPC protocol.",
13
- "operationId": "execute_command",
14
- "requestBody": {
15
- "content": {
16
- "application/json": {
17
- "schema": {
18
- "oneOf": [
19
- {
20
- "$ref": "#/components/schemas/CommandRequest"
21
- },
22
- {
23
- "$ref": "#/components/schemas/JsonRpcRequest"
24
- }
25
- ]
26
- }
27
- }
28
- },
29
- "required": true
30
- },
31
- "responses": {
32
- "200": {
33
- "description": "Successful Response",
34
- "content": {
35
- "application/json": {
36
- "schema": {
37
- "oneOf": [
38
- {
39
- "$ref": "#/components/schemas/CommandResponse"
40
- },
41
- {
42
- "$ref": "#/components/schemas/JsonRpcResponse"
43
- }
44
- ]
45
- }
46
- }
47
- }
48
- },
49
- "422": {
50
- "description": "Validation Error",
51
- "content": {
52
- "application/json": {
53
- "schema": {
54
- "$ref": "#/components/schemas/HTTPValidationError"
55
- }
56
- }
57
- }
58
- }
59
- }
60
- }
61
- },
62
- "/health": {
63
- "get": {
64
- "summary": "Проверить работоспособность сервиса",
65
- "description": "Возвращает информацию о состоянии сервиса",
66
- "operationId": "health_check",
67
- "responses": {
68
- "200": {
69
- "description": "Информация о состоянии сервиса",
70
- "content": {
71
- "application/json": {
72
- "schema": {
73
- "$ref": "#/components/schemas/HealthResponse"
74
- }
75
- }
76
- }
77
- }
78
- }
79
- }
80
- },
81
- "/openapi.json": {
82
- "get": {
83
- "summary": "Get Openapi Schema",
84
- "description": "Returns OpenAPI schema.",
85
- "operationId": "get_openapi_schema_openapi_json_get",
86
- "responses": {
87
- "200": {
88
- "description": "Successful Response",
89
- "content": {
90
- "application/json": {
91
- "schema": {}
92
- }
93
- }
94
- }
95
- }
96
- }
97
- },
98
- "/api/commands": {
99
- "get": {
100
- "summary": "Get Commands",
101
- "description": "Returns list of available commands with their descriptions.",
102
- "operationId": "get_commands_api_commands_get",
103
- "responses": {
104
- "200": {
105
- "description": "Successful Response",
106
- "content": {
107
- "application/json": {
108
- "schema": {}
109
- }
110
- }
111
- }
112
- }
113
- }
114
- }
115
- },
116
- "components": {
117
- "schemas": {
118
- "CommandRequest": {
119
- "title": "CommandRequest",
120
- "description": "Запрос на выполнение команды",
121
- "type": "object",
122
- "required": [
123
- "command"
124
- ],
125
- "properties": {
126
- "command": {
127
- "title": "Command",
128
- "description": "Команда для выполнения",
129
- "type": "string",
130
- "enum": [
131
- "echo",
132
- "help",
133
- "health",
134
- "manual_echo",
135
- "config",
136
- "reload",
137
- "settings",
138
- "load",
139
- "unload",
140
- "plugins",
141
- "transport_management",
142
- "proxy_registration"
143
- ]
144
- },
145
- "params": {
146
- "title": "Parameters",
147
- "description": "Параметры команды, зависят от типа команды",
148
- "type": "object",
149
- "additionalProperties": true,
150
- "oneOf": [
151
- {
152
- "$ref": "#/components/schemas/EchoParams"
153
- },
154
- {
155
- "$ref": "#/components/schemas/HelpParams"
156
- },
157
- {
158
- "$ref": "#/components/schemas/HealthParams"
159
- },
160
- {
161
- "$ref": "#/components/schemas/Manual_echoParams"
162
- },
163
- {
164
- "$ref": "#/components/schemas/ConfigParams"
165
- },
166
- {
167
- "$ref": "#/components/schemas/ReloadParams"
168
- },
169
- {
170
- "$ref": "#/components/schemas/SettingsParams"
171
- },
172
- {
173
- "$ref": "#/components/schemas/LoadParams"
174
- },
175
- {
176
- "$ref": "#/components/schemas/UnloadParams"
177
- },
178
- {
179
- "$ref": "#/components/schemas/PluginsParams"
180
- },
181
- {
182
- "$ref": "#/components/schemas/Transport_managementParams"
183
- },
184
- {
185
- "$ref": "#/components/schemas/Proxy_registrationParams"
186
- },
187
- {
188
- "type": "null"
189
- }
190
- ]
191
- }
192
- }
193
- },
194
- "CommandResponse": {
195
- "title": "CommandResponse",
196
- "description": "Ответ на выполнение команды",
197
- "type": "object",
198
- "required": [
199
- "result"
200
- ],
201
- "properties": {
202
- "result": {
203
- "title": "Result",
204
- "description": "Результат выполнения команды"
205
- }
206
- }
207
- },
208
- "JsonRpcRequest": {
209
- "properties": {
210
- "jsonrpc": {
211
- "type": "string",
212
- "title": "Jsonrpc",
213
- "description": "JSON-RPC version",
214
- "default": "2.0"
215
- },
216
- "method": {
217
- "type": "string",
218
- "title": "Method",
219
- "description": "Method name to call"
220
- },
221
- "params": {
222
- "additionalProperties": true,
223
- "type": "object",
224
- "title": "Params",
225
- "description": "Method parameters",
226
- "default": {}
227
- },
228
- "id": {
229
- "anyOf": [
230
- {
231
- "type": "string"
232
- },
233
- {
234
- "type": "integer"
235
- },
236
- {
237
- "type": "null"
238
- }
239
- ],
240
- "title": "Id",
241
- "description": "Request identifier"
242
- }
243
- },
244
- "type": "object",
245
- "required": [
246
- "method"
247
- ],
248
- "title": "JsonRpcRequest",
249
- "description": "Base model for JSON-RPC requests."
250
- },
251
- "JsonRpcResponse": {
252
- "properties": {
253
- "jsonrpc": {
254
- "type": "string",
255
- "title": "Jsonrpc",
256
- "description": "JSON-RPC version",
257
- "default": "2.0"
258
- },
259
- "result": {
260
- "anyOf": [
261
- {},
262
- {
263
- "type": "null"
264
- }
265
- ],
266
- "title": "Result",
267
- "description": "Method execution result"
268
- },
269
- "error": {
270
- "anyOf": [
271
- {
272
- "additionalProperties": true,
273
- "type": "object"
274
- },
275
- {
276
- "type": "null"
277
- }
278
- ],
279
- "title": "Error",
280
- "description": "Error information"
281
- },
282
- "id": {
283
- "anyOf": [
284
- {
285
- "type": "string"
286
- },
287
- {
288
- "type": "integer"
289
- },
290
- {
291
- "type": "null"
292
- }
293
- ],
294
- "title": "Id",
295
- "description": "Request identifier"
296
- }
297
- },
298
- "type": "object",
299
- "title": "JsonRpcResponse",
300
- "description": "Base model for JSON-RPC responses."
301
- },
302
- "HealthResponse": {
303
- "title": "HealthResponse",
304
- "description": "Информация о состоянии сервиса",
305
- "type": "object",
306
- "required": [
307
- "status",
308
- "model",
309
- "version"
310
- ],
311
- "properties": {
312
- "status": {
313
- "title": "Status",
314
- "description": "Статус сервиса (ok/error)",
315
- "type": "string"
316
- },
317
- "model": {
318
- "title": "Model",
319
- "description": "Текущая активная модель",
320
- "type": "string"
321
- },
322
- "version": {
323
- "title": "Version",
324
- "description": "Версия сервиса",
325
- "type": "string"
326
- }
327
- }
328
- },
329
- "HTTPValidationError": {
330
- "properties": {
331
- "detail": {
332
- "items": {
333
- "$ref": "#/components/schemas/ValidationError"
334
- },
335
- "type": "array",
336
- "title": "Detail"
337
- }
338
- },
339
- "type": "object",
340
- "title": "HTTPValidationError"
341
- },
342
- "ValidationError": {
343
- "properties": {
344
- "loc": {
345
- "items": {
346
- "anyOf": [
347
- {
348
- "type": "string"
349
- },
350
- {
351
- "type": "integer"
352
- }
353
- ]
354
- },
355
- "type": "array",
356
- "title": "Location"
357
- },
358
- "msg": {
359
- "type": "string",
360
- "title": "Message"
361
- },
362
- "type": {
363
- "type": "string",
364
- "title": "Error Type"
365
- }
366
- },
367
- "type": "object",
368
- "required": [
369
- "loc",
370
- "msg",
371
- "type"
372
- ],
373
- "title": "ValidationError"
374
- },
375
- "ToolDescription": {
376
- "type": "object",
377
- "title": "Tool Description",
378
- "description": "Description of the microservice tool",
379
- "properties": {
380
- "name": {
381
- "type": "string",
382
- "description": "Name of the tool"
383
- },
384
- "description": {
385
- "type": "string",
386
- "description": "Tool for executing microservice commands.\n\n## Available commands:\necho, help, health, manual_echo, config, reload, settings, load, unload, plugins, transport_management, proxy_registration\n\n## Getting help:\n- Without parameters (list of all commands): \n {\"jsonrpc\": \"2.0\", \"method\": \"help\", \"id\": 1}\n \n- With parameters (information about a specific command): \n {\"jsonrpc\": \"2.0\", \"method\": \"help\", \"params\": {\"command\": \"command_name\"}, \"id\": 1}\n"
387
- },
388
- "version": {
389
- "type": "string",
390
- "description": "Tool version"
391
- },
392
- "help_examples": {
393
- "type": "object",
394
- "description": "Examples of using the help command",
395
- "properties": {
396
- "without_params": {
397
- "type": "object",
398
- "description": "Get a list of all commands"
399
- },
400
- "with_params": {
401
- "type": "object",
402
- "description": "Get information about a specific command"
403
- }
404
- },
405
- "example": {
406
- "without_params": {
407
- "jsonrpc": "2.0",
408
- "method": "help",
409
- "id": 1
410
- },
411
- "with_params": {
412
- "jsonrpc": "2.0",
413
- "method": "help",
414
- "params": {
415
- "command": "echo"
416
- },
417
- "id": 1
418
- }
419
- }
420
- },
421
- "available_commands": {
422
- "type": "array",
423
- "description": "List of available commands",
424
- "items": {
425
- "type": "string"
426
- },
427
- "example": [
428
- "echo",
429
- "help",
430
- "health",
431
- "manual_echo",
432
- "config",
433
- "reload",
434
- "settings",
435
- "load",
436
- "unload",
437
- "plugins",
438
- "transport_management",
439
- "proxy_registration"
440
- ]
441
- }
442
- },
443
- "required": [
444
- "name",
445
- "description"
446
- ]
447
- },
448
- "EchoParams": {
449
- "type": "object",
450
- "properties": {
451
- "message": {
452
- "type": "string",
453
- "description": "Message to echo",
454
- "default": "Hello, World!"
455
- },
456
- "text": {
457
- "type": "string",
458
- "description": "Alternative parameter name for message"
459
- }
460
- },
461
- "title": "Parameters for echo",
462
- "description": "Parameters for the echo command"
463
- },
464
- "HelpParams": {
465
- "type": "object",
466
- "properties": {
467
- "cmdname": {
468
- "type": "string",
469
- "description": "Name of specific command to get help for"
470
- }
471
- },
472
- "title": "Parameters for help",
473
- "description": "Parameters for the help command"
474
- },
475
- "HealthParams": {
476
- "type": "object",
477
- "properties": {},
478
- "description": "Parameters for the health command",
479
- "title": "Parameters for health"
480
- },
481
- "Manual_echoParams": {
482
- "type": "object",
483
- "properties": {
484
- "message": {
485
- "type": "string",
486
- "description": "Message to echo",
487
- "default": "Hello from manually registered command!"
488
- }
489
- },
490
- "title": "Parameters for manual_echo",
491
- "description": "Parameters for the manual_echo command"
492
- },
493
- "ConfigParams": {
494
- "type": "object",
495
- "properties": {
496
- "operation": {
497
- "type": "string",
498
- "enum": [
499
- "get",
500
- "set"
501
- ],
502
- "default": "get",
503
- "description": "Operation to perform (get or set)"
504
- },
505
- "path": {
506
- "type": "string",
507
- "description": "Configuration path in dot notation (e.g. 'server.host')"
508
- },
509
- "value": {
510
- "description": "Value to set (required for 'set' operation)"
511
- }
512
- },
513
- "required": [
514
- "operation"
515
- ],
516
- "additionalProperties": false,
517
- "title": "Parameters for config",
518
- "description": "Parameters for the config command"
519
- },
520
- "ReloadParams": {
521
- "type": "object",
522
- "properties": {
523
- "config_path": {
524
- "type": "string",
525
- "description": "Path to configuration file to reload",
526
- "default": null
527
- }
528
- },
529
- "additionalProperties": false,
530
- "title": "Parameters for reload",
531
- "description": "Parameters for the reload command"
532
- },
533
- "SettingsParams": {
534
- "type": "object",
535
- "properties": {
536
- "operation": {
537
- "type": "string",
538
- "description": "Operation to perform",
539
- "enum": [
540
- "get",
541
- "set",
542
- "get_all",
543
- "reload"
544
- ],
545
- "default": "get_all"
546
- },
547
- "key": {
548
- "type": "string",
549
- "description": "Configuration key in dot notation (e.g., 'server.host', 'custom.feature_enabled')"
550
- },
551
- "value": {
552
- "description": "Configuration value to set (for 'set' operation)"
553
- }
554
- },
555
- "required": [
556
- "operation"
557
- ],
558
- "additionalProperties": false,
559
- "title": "Parameters for settings",
560
- "description": "Parameters for the settings command"
561
- },
562
- "LoadParams": {
563
- "type": "object",
564
- "properties": {
565
- "source": {
566
- "type": "string",
567
- "description": "Source path or URL to load command from (must end with '_command.py')",
568
- "examples": [
569
- "./my_command.py",
570
- "https://example.com/remote_command.py"
571
- ]
572
- }
573
- },
574
- "required": [
575
- "source"
576
- ],
577
- "title": "Parameters for load",
578
- "description": "Parameters for the load command"
579
- },
580
- "UnloadParams": {
581
- "type": "object",
582
- "properties": {
583
- "command_name": {
584
- "type": "string",
585
- "description": "Name of the command to unload (must be a loaded command)"
586
- }
587
- },
588
- "required": [
589
- "command_name"
590
- ],
591
- "title": "Parameters for unload",
592
- "description": "Parameters for the unload command"
593
- },
594
- "PluginsParams": {
595
- "type": "object",
596
- "properties": {},
597
- "additionalProperties": false,
598
- "title": "Parameters for plugins",
599
- "description": "Parameters for the plugins command"
600
- },
601
- "Transport_managementParams": {
602
- "type": "object",
603
- "properties": {
604
- "action": {
605
- "type": "string",
606
- "enum": [
607
- "get_info",
608
- "validate",
609
- "reload"
610
- ],
611
- "description": "Action to perform"
612
- }
613
- },
614
- "required": [
615
- "action"
616
- ],
617
- "title": "Parameters for transport_management",
618
- "description": "Parameters for the transport_management command"
619
- },
620
- "Proxy_registrationParams": {
621
- "type": "object",
622
- "title": "Parameters for proxy_registration",
623
- "description": "Parameters for the proxy_registration command (schema generation failed)",
624
- "properties": {},
625
- "additionalProperties": true
626
- }
627
- }
628
- }
629
- }