mcp-proxy-adapter 6.0.0__py3-none-any.whl → 6.1.0__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.
- mcp_proxy_adapter/api/app.py +174 -80
- mcp_proxy_adapter/api/handlers.py +16 -5
- mcp_proxy_adapter/api/middleware/__init__.py +7 -2
- mcp_proxy_adapter/api/middleware/command_permission_middleware.py +148 -0
- mcp_proxy_adapter/api/middleware/factory.py +36 -12
- mcp_proxy_adapter/api/middleware/unified_security.py +152 -0
- mcp_proxy_adapter/api/middleware/user_info_middleware.py +83 -0
- mcp_proxy_adapter/commands/__init__.py +7 -1
- mcp_proxy_adapter/commands/base.py +7 -4
- mcp_proxy_adapter/commands/builtin_commands.py +8 -2
- mcp_proxy_adapter/commands/command_registry.py +8 -0
- mcp_proxy_adapter/commands/echo_command.py +81 -0
- mcp_proxy_adapter/commands/help_command.py +21 -14
- mcp_proxy_adapter/commands/proxy_registration_command.py +326 -185
- mcp_proxy_adapter/commands/role_test_command.py +141 -0
- mcp_proxy_adapter/commands/security_command.py +488 -0
- mcp_proxy_adapter/commands/ssl_setup_command.py +2 -2
- mcp_proxy_adapter/commands/token_management_command.py +1 -1
- mcp_proxy_adapter/config.py +81 -21
- mcp_proxy_adapter/core/app_factory.py +326 -0
- mcp_proxy_adapter/core/client_security.py +384 -0
- mcp_proxy_adapter/core/logging.py +8 -3
- mcp_proxy_adapter/core/mtls_asgi.py +156 -0
- mcp_proxy_adapter/core/mtls_asgi_app.py +187 -0
- mcp_proxy_adapter/core/protocol_manager.py +9 -0
- mcp_proxy_adapter/core/proxy_client.py +602 -0
- mcp_proxy_adapter/core/proxy_registration.py +299 -47
- mcp_proxy_adapter/core/security_adapter.py +12 -15
- mcp_proxy_adapter/core/security_integration.py +277 -0
- mcp_proxy_adapter/core/server_adapter.py +345 -0
- mcp_proxy_adapter/core/server_engine.py +364 -0
- mcp_proxy_adapter/core/unified_config_adapter.py +579 -0
- mcp_proxy_adapter/examples/README.md +230 -97
- mcp_proxy_adapter/examples/README_EN.md +258 -0
- mcp_proxy_adapter/examples/SECURITY_TESTING.md +455 -0
- mcp_proxy_adapter/examples/__pycache__/security_configurations.cpython-312.pyc +0 -0
- mcp_proxy_adapter/examples/__pycache__/security_test_client.cpython-312.pyc +0 -0
- mcp_proxy_adapter/examples/basic_framework/configs/http_auth.json +37 -0
- mcp_proxy_adapter/examples/basic_framework/configs/http_simple.json +23 -0
- mcp_proxy_adapter/examples/basic_framework/configs/https_auth.json +39 -0
- mcp_proxy_adapter/examples/basic_framework/configs/https_simple.json +25 -0
- mcp_proxy_adapter/examples/basic_framework/configs/mtls_no_roles.json +39 -0
- mcp_proxy_adapter/examples/basic_framework/configs/mtls_with_roles.json +45 -0
- mcp_proxy_adapter/examples/basic_framework/main.py +63 -0
- mcp_proxy_adapter/examples/basic_framework/roles.json +21 -0
- mcp_proxy_adapter/examples/cert_config.json +9 -0
- mcp_proxy_adapter/examples/certs/admin.crt +32 -0
- mcp_proxy_adapter/examples/certs/admin.key +52 -0
- mcp_proxy_adapter/examples/certs/admin_cert.pem +21 -0
- mcp_proxy_adapter/examples/certs/admin_key.pem +28 -0
- mcp_proxy_adapter/examples/certs/ca_cert.pem +23 -0
- mcp_proxy_adapter/examples/certs/ca_cert.srl +1 -0
- mcp_proxy_adapter/examples/certs/ca_key.pem +28 -0
- mcp_proxy_adapter/examples/certs/cert_config.json +9 -0
- mcp_proxy_adapter/examples/certs/client.crt +32 -0
- mcp_proxy_adapter/examples/certs/client.key +52 -0
- mcp_proxy_adapter/examples/certs/client_admin.crt +32 -0
- mcp_proxy_adapter/examples/certs/client_admin.key +52 -0
- mcp_proxy_adapter/examples/certs/client_user.crt +32 -0
- mcp_proxy_adapter/examples/certs/client_user.key +52 -0
- mcp_proxy_adapter/examples/certs/guest_cert.pem +21 -0
- mcp_proxy_adapter/examples/certs/guest_key.pem +28 -0
- mcp_proxy_adapter/examples/certs/mcp_proxy_adapter_ca_ca.crt +23 -0
- mcp_proxy_adapter/examples/certs/proxy_cert.pem +21 -0
- mcp_proxy_adapter/examples/certs/proxy_key.pem +28 -0
- mcp_proxy_adapter/examples/certs/readonly.crt +32 -0
- mcp_proxy_adapter/examples/certs/readonly.key +52 -0
- mcp_proxy_adapter/examples/certs/readonly_cert.pem +21 -0
- mcp_proxy_adapter/examples/certs/readonly_key.pem +28 -0
- mcp_proxy_adapter/examples/certs/server.crt +32 -0
- mcp_proxy_adapter/examples/certs/server.key +52 -0
- mcp_proxy_adapter/examples/certs/server_cert.pem +32 -0
- mcp_proxy_adapter/examples/certs/server_key.pem +52 -0
- mcp_proxy_adapter/examples/certs/test_ca_ca.crt +20 -0
- mcp_proxy_adapter/examples/certs/user.crt +32 -0
- mcp_proxy_adapter/examples/certs/user.key +52 -0
- mcp_proxy_adapter/examples/certs/user_cert.pem +21 -0
- mcp_proxy_adapter/examples/certs/user_key.pem +28 -0
- mcp_proxy_adapter/examples/client_configs/api_key_client.json +13 -0
- mcp_proxy_adapter/examples/client_configs/basic_auth_client.json +13 -0
- mcp_proxy_adapter/examples/client_configs/certificate_client.json +22 -0
- mcp_proxy_adapter/examples/client_configs/jwt_client.json +15 -0
- mcp_proxy_adapter/examples/client_configs/no_auth_client.json +9 -0
- mcp_proxy_adapter/examples/commands/__init__.py +1 -0
- mcp_proxy_adapter/examples/create_certificates_simple.py +307 -0
- mcp_proxy_adapter/examples/debug_request_state.py +144 -0
- mcp_proxy_adapter/examples/debug_role_chain.py +205 -0
- mcp_proxy_adapter/examples/demo_client.py +341 -0
- mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +99 -0
- mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +106 -0
- mcp_proxy_adapter/examples/full_application/configs/http_auth.json +37 -0
- mcp_proxy_adapter/examples/full_application/configs/http_simple.json +23 -0
- mcp_proxy_adapter/examples/full_application/configs/https_auth.json +39 -0
- mcp_proxy_adapter/examples/full_application/configs/https_simple.json +25 -0
- mcp_proxy_adapter/examples/full_application/configs/mtls_no_roles.json +39 -0
- mcp_proxy_adapter/examples/full_application/configs/mtls_with_roles.json +45 -0
- mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +97 -0
- mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +95 -0
- mcp_proxy_adapter/examples/full_application/main.py +138 -0
- mcp_proxy_adapter/examples/full_application/roles.json +21 -0
- mcp_proxy_adapter/examples/generate_all_certificates.py +429 -0
- mcp_proxy_adapter/examples/generate_certificates.py +121 -0
- mcp_proxy_adapter/examples/keys/ca_key.pem +28 -0
- mcp_proxy_adapter/examples/keys/mcp_proxy_adapter_ca_ca.key +28 -0
- mcp_proxy_adapter/examples/keys/test_ca_ca.key +28 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log +220 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.1 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.2 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.3 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.4 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter.log.5 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log +220 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.1 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.2 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.3 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.4 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_access.log.5 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log +2 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.1 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.2 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.3 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.4 +1 -0
- mcp_proxy_adapter/examples/logs/mcp_proxy_adapter_error.log.5 +1 -0
- mcp_proxy_adapter/examples/proxy_registration_example.py +401 -0
- mcp_proxy_adapter/examples/roles.json +38 -0
- mcp_proxy_adapter/examples/run_example.py +81 -0
- mcp_proxy_adapter/examples/run_security_tests.py +326 -0
- mcp_proxy_adapter/examples/run_security_tests_fixed.py +300 -0
- mcp_proxy_adapter/examples/security_test_client.py +743 -0
- mcp_proxy_adapter/examples/server_configs/config_basic_http.json +204 -0
- mcp_proxy_adapter/examples/server_configs/config_http_token.json +238 -0
- mcp_proxy_adapter/examples/server_configs/config_https.json +215 -0
- mcp_proxy_adapter/examples/server_configs/config_https_token.json +231 -0
- mcp_proxy_adapter/examples/server_configs/config_mtls.json +215 -0
- mcp_proxy_adapter/examples/server_configs/config_proxy_registration.json +250 -0
- mcp_proxy_adapter/examples/server_configs/config_simple.json +46 -0
- mcp_proxy_adapter/examples/server_configs/roles.json +38 -0
- mcp_proxy_adapter/examples/test_examples.py +344 -0
- mcp_proxy_adapter/examples/universal_client.py +628 -0
- mcp_proxy_adapter/main.py +21 -10
- mcp_proxy_adapter/utils/config_generator.py +639 -0
- mcp_proxy_adapter/version.py +2 -1
- mcp_proxy_adapter-6.1.0.dist-info/METADATA +205 -0
- mcp_proxy_adapter-6.1.0.dist-info/RECORD +193 -0
- mcp_proxy_adapter-6.1.0.dist-info/entry_points.txt +2 -0
- {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.0.dist-info}/licenses/LICENSE +2 -2
- mcp_proxy_adapter/api/middleware/auth.py +0 -146
- mcp_proxy_adapter/api/middleware/auth_adapter.py +0 -235
- mcp_proxy_adapter/api/middleware/mtls_adapter.py +0 -305
- mcp_proxy_adapter/api/middleware/mtls_middleware.py +0 -296
- mcp_proxy_adapter/api/middleware/rate_limit.py +0 -152
- mcp_proxy_adapter/api/middleware/rate_limit_adapter.py +0 -241
- mcp_proxy_adapter/api/middleware/roles_adapter.py +0 -365
- mcp_proxy_adapter/api/middleware/roles_middleware.py +0 -381
- mcp_proxy_adapter/api/middleware/security.py +0 -376
- mcp_proxy_adapter/api/middleware/token_auth_middleware.py +0 -261
- mcp_proxy_adapter/examples/__init__.py +0 -7
- mcp_proxy_adapter/examples/basic_server/README.md +0 -60
- mcp_proxy_adapter/examples/basic_server/__init__.py +0 -7
- mcp_proxy_adapter/examples/basic_server/basic_custom_settings.json +0 -39
- mcp_proxy_adapter/examples/basic_server/config.json +0 -70
- mcp_proxy_adapter/examples/basic_server/config_all_protocols.json +0 -54
- mcp_proxy_adapter/examples/basic_server/config_http.json +0 -70
- mcp_proxy_adapter/examples/basic_server/config_http_only.json +0 -52
- mcp_proxy_adapter/examples/basic_server/config_https.json +0 -58
- mcp_proxy_adapter/examples/basic_server/config_mtls.json +0 -58
- mcp_proxy_adapter/examples/basic_server/config_ssl.json +0 -46
- mcp_proxy_adapter/examples/basic_server/custom_settings_example.py +0 -238
- mcp_proxy_adapter/examples/basic_server/server.py +0 -114
- mcp_proxy_adapter/examples/custom_commands/README.md +0 -127
- mcp_proxy_adapter/examples/custom_commands/__init__.py +0 -27
- mcp_proxy_adapter/examples/custom_commands/advanced_hooks.py +0 -566
- mcp_proxy_adapter/examples/custom_commands/auto_commands/__init__.py +0 -6
- mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_echo_command.py +0 -103
- mcp_proxy_adapter/examples/custom_commands/auto_commands/auto_info_command.py +0 -111
- mcp_proxy_adapter/examples/custom_commands/auto_commands/test_command.py +0 -105
- mcp_proxy_adapter/examples/custom_commands/catalog/commands/test_command.py +0 -129
- mcp_proxy_adapter/examples/custom_commands/config.json +0 -118
- mcp_proxy_adapter/examples/custom_commands/config_all_protocols.json +0 -46
- mcp_proxy_adapter/examples/custom_commands/config_https_only.json +0 -46
- mcp_proxy_adapter/examples/custom_commands/config_https_transport.json +0 -33
- mcp_proxy_adapter/examples/custom_commands/config_mtls_only.json +0 -46
- mcp_proxy_adapter/examples/custom_commands/config_mtls_transport.json +0 -33
- mcp_proxy_adapter/examples/custom_commands/config_single_transport.json +0 -33
- mcp_proxy_adapter/examples/custom_commands/custom_health_command.py +0 -169
- mcp_proxy_adapter/examples/custom_commands/custom_help_command.py +0 -215
- mcp_proxy_adapter/examples/custom_commands/custom_openapi_generator.py +0 -76
- mcp_proxy_adapter/examples/custom_commands/custom_settings.json +0 -96
- mcp_proxy_adapter/examples/custom_commands/custom_settings_manager.py +0 -241
- mcp_proxy_adapter/examples/custom_commands/data_transform_command.py +0 -135
- mcp_proxy_adapter/examples/custom_commands/echo_command.py +0 -122
- mcp_proxy_adapter/examples/custom_commands/full_help_response.json +0 -1
- mcp_proxy_adapter/examples/custom_commands/generated_openapi.json +0 -629
- mcp_proxy_adapter/examples/custom_commands/get_openapi.py +0 -103
- mcp_proxy_adapter/examples/custom_commands/hooks.py +0 -230
- mcp_proxy_adapter/examples/custom_commands/intercept_command.py +0 -123
- mcp_proxy_adapter/examples/custom_commands/loadable_commands/test_ignored.py +0 -129
- mcp_proxy_adapter/examples/custom_commands/manual_echo_command.py +0 -103
- mcp_proxy_adapter/examples/custom_commands/proxy_connection_manager.py +0 -278
- mcp_proxy_adapter/examples/custom_commands/server.py +0 -252
- mcp_proxy_adapter/examples/custom_commands/simple_openapi_server.py +0 -75
- mcp_proxy_adapter/examples/custom_commands/start_server_with_proxy_manager.py +0 -299
- mcp_proxy_adapter/examples/custom_commands/start_server_with_registration.py +0 -278
- mcp_proxy_adapter/examples/custom_commands/test_hooks.py +0 -176
- mcp_proxy_adapter/examples/custom_commands/test_openapi.py +0 -27
- mcp_proxy_adapter/examples/custom_commands/test_registry.py +0 -23
- mcp_proxy_adapter/examples/custom_commands/test_simple.py +0 -19
- mcp_proxy_adapter/examples/custom_project_example/README.md +0 -103
- mcp_proxy_adapter/examples/custom_project_example/README_EN.md +0 -103
- mcp_proxy_adapter/examples/deployment/README.md +0 -49
- mcp_proxy_adapter/examples/deployment/__init__.py +0 -7
- mcp_proxy_adapter/examples/deployment/config.development.json +0 -8
- mcp_proxy_adapter/examples/deployment/config.json +0 -29
- mcp_proxy_adapter/examples/deployment/config.production.json +0 -12
- mcp_proxy_adapter/examples/deployment/config.staging.json +0 -11
- mcp_proxy_adapter/examples/deployment/docker-compose.yml +0 -31
- mcp_proxy_adapter/examples/deployment/run.sh +0 -43
- mcp_proxy_adapter/examples/deployment/run_docker.sh +0 -84
- mcp_proxy_adapter/examples/simple_custom_commands/README.md +0 -149
- mcp_proxy_adapter/examples/simple_custom_commands/README_EN.md +0 -149
- mcp_proxy_adapter/schemas/base_schema.json +0 -114
- mcp_proxy_adapter/schemas/openapi_schema.json +0 -314
- mcp_proxy_adapter/schemas/roles_schema.json +0 -162
- mcp_proxy_adapter/tests/__init__.py +0 -0
- mcp_proxy_adapter/tests/api/__init__.py +0 -3
- mcp_proxy_adapter/tests/api/test_cmd_endpoint.py +0 -115
- mcp_proxy_adapter/tests/api/test_custom_openapi.py +0 -617
- mcp_proxy_adapter/tests/api/test_handlers.py +0 -522
- mcp_proxy_adapter/tests/api/test_middleware.py +0 -340
- mcp_proxy_adapter/tests/api/test_schemas.py +0 -546
- mcp_proxy_adapter/tests/api/test_tool_integration.py +0 -531
- mcp_proxy_adapter/tests/commands/__init__.py +0 -3
- mcp_proxy_adapter/tests/commands/test_config_command.py +0 -211
- mcp_proxy_adapter/tests/commands/test_echo_command.py +0 -127
- mcp_proxy_adapter/tests/commands/test_help_command.py +0 -136
- mcp_proxy_adapter/tests/conftest.py +0 -131
- mcp_proxy_adapter/tests/functional/__init__.py +0 -3
- mcp_proxy_adapter/tests/functional/test_api.py +0 -253
- mcp_proxy_adapter/tests/integration/__init__.py +0 -3
- mcp_proxy_adapter/tests/integration/test_cmd_integration.py +0 -129
- mcp_proxy_adapter/tests/integration/test_integration.py +0 -255
- mcp_proxy_adapter/tests/performance/__init__.py +0 -3
- mcp_proxy_adapter/tests/performance/test_performance.py +0 -189
- mcp_proxy_adapter/tests/stubs/__init__.py +0 -10
- mcp_proxy_adapter/tests/stubs/echo_command.py +0 -104
- mcp_proxy_adapter/tests/test_api_endpoints.py +0 -271
- mcp_proxy_adapter/tests/test_api_handlers.py +0 -289
- mcp_proxy_adapter/tests/test_base_command.py +0 -123
- mcp_proxy_adapter/tests/test_batch_requests.py +0 -117
- mcp_proxy_adapter/tests/test_command_registry.py +0 -281
- mcp_proxy_adapter/tests/test_config.py +0 -127
- mcp_proxy_adapter/tests/test_utils.py +0 -65
- mcp_proxy_adapter/tests/unit/__init__.py +0 -3
- mcp_proxy_adapter/tests/unit/test_base_command.py +0 -436
- mcp_proxy_adapter/tests/unit/test_config.py +0 -270
- mcp_proxy_adapter-6.0.0.dist-info/METADATA +0 -201
- mcp_proxy_adapter-6.0.0.dist-info/RECORD +0 -179
- {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.0.dist-info}/WHEEL +0 -0
- {mcp_proxy_adapter-6.0.0.dist-info → mcp_proxy_adapter-6.1.0.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
|
-
}
|