mcp-proxy-adapter 6.9.28__py3-none-any.whl → 6.9.30__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 mcp-proxy-adapter might be problematic. Click here for more details.

Files changed (212) hide show
  1. mcp_proxy_adapter/__init__.py +10 -0
  2. mcp_proxy_adapter/__main__.py +8 -21
  3. mcp_proxy_adapter/api/app.py +10 -913
  4. mcp_proxy_adapter/api/core/__init__.py +18 -0
  5. mcp_proxy_adapter/api/core/app_factory.py +243 -0
  6. mcp_proxy_adapter/api/core/lifespan_manager.py +55 -0
  7. mcp_proxy_adapter/api/core/registration_manager.py +166 -0
  8. mcp_proxy_adapter/api/core/ssl_context_factory.py +88 -0
  9. mcp_proxy_adapter/api/handlers.py +78 -199
  10. mcp_proxy_adapter/api/middleware/__init__.py +1 -44
  11. mcp_proxy_adapter/api/middleware/base.py +0 -42
  12. mcp_proxy_adapter/api/middleware/command_permission_middleware.py +0 -85
  13. mcp_proxy_adapter/api/middleware/error_handling.py +1 -127
  14. mcp_proxy_adapter/api/middleware/factory.py +0 -94
  15. mcp_proxy_adapter/api/middleware/logging.py +0 -112
  16. mcp_proxy_adapter/api/middleware/performance.py +0 -35
  17. mcp_proxy_adapter/api/middleware/protocol_middleware.py +2 -98
  18. mcp_proxy_adapter/api/middleware/transport_middleware.py +0 -37
  19. mcp_proxy_adapter/api/middleware/unified_security.py +10 -10
  20. mcp_proxy_adapter/api/middleware/user_info_middleware.py +0 -118
  21. mcp_proxy_adapter/api/openapi/__init__.py +21 -0
  22. mcp_proxy_adapter/api/openapi/command_integration.py +105 -0
  23. mcp_proxy_adapter/api/openapi/openapi_generator.py +40 -0
  24. mcp_proxy_adapter/api/openapi/openapi_registry.py +62 -0
  25. mcp_proxy_adapter/api/openapi/schema_loader.py +116 -0
  26. mcp_proxy_adapter/api/schemas.py +0 -61
  27. mcp_proxy_adapter/api/tool_integration.py +0 -117
  28. mcp_proxy_adapter/api/tools.py +0 -46
  29. mcp_proxy_adapter/cli/__init__.py +12 -0
  30. mcp_proxy_adapter/cli/commands/__init__.py +15 -0
  31. mcp_proxy_adapter/cli/commands/client.py +100 -0
  32. mcp_proxy_adapter/cli/commands/config_generate.py +21 -0
  33. mcp_proxy_adapter/cli/commands/config_validate.py +36 -0
  34. mcp_proxy_adapter/cli/commands/generate.py +259 -0
  35. mcp_proxy_adapter/cli/commands/server.py +174 -0
  36. mcp_proxy_adapter/cli/commands/sets.py +128 -0
  37. mcp_proxy_adapter/cli/commands/testconfig.py +177 -0
  38. mcp_proxy_adapter/cli/examples/__init__.py +8 -0
  39. mcp_proxy_adapter/cli/examples/http_basic.py +82 -0
  40. mcp_proxy_adapter/cli/examples/https_token.py +96 -0
  41. mcp_proxy_adapter/cli/examples/mtls_roles.py +103 -0
  42. mcp_proxy_adapter/cli/main.py +63 -0
  43. mcp_proxy_adapter/cli/parser.py +324 -0
  44. mcp_proxy_adapter/cli/validators.py +231 -0
  45. mcp_proxy_adapter/client/jsonrpc_client.py +406 -0
  46. mcp_proxy_adapter/client/proxy.py +45 -0
  47. mcp_proxy_adapter/commands/__init__.py +44 -28
  48. mcp_proxy_adapter/commands/auth_validation_command.py +7 -344
  49. mcp_proxy_adapter/commands/base.py +19 -43
  50. mcp_proxy_adapter/commands/builtin_commands.py +0 -75
  51. mcp_proxy_adapter/commands/catalog/__init__.py +20 -0
  52. mcp_proxy_adapter/commands/catalog/catalog_loader.py +34 -0
  53. mcp_proxy_adapter/commands/catalog/catalog_manager.py +122 -0
  54. mcp_proxy_adapter/commands/catalog/catalog_syncer.py +149 -0
  55. mcp_proxy_adapter/commands/catalog/command_catalog.py +43 -0
  56. mcp_proxy_adapter/commands/catalog/dependency_manager.py +37 -0
  57. mcp_proxy_adapter/commands/catalog_manager.py +58 -928
  58. mcp_proxy_adapter/commands/cert_monitor_command.py +0 -88
  59. mcp_proxy_adapter/commands/certificate_management_command.py +0 -45
  60. mcp_proxy_adapter/commands/command_registry.py +172 -904
  61. mcp_proxy_adapter/commands/config_command.py +0 -28
  62. mcp_proxy_adapter/commands/dependency_container.py +1 -70
  63. mcp_proxy_adapter/commands/dependency_manager.py +0 -128
  64. mcp_proxy_adapter/commands/echo_command.py +0 -34
  65. mcp_proxy_adapter/commands/health_command.py +0 -3
  66. mcp_proxy_adapter/commands/help_command.py +0 -159
  67. mcp_proxy_adapter/commands/hooks.py +0 -137
  68. mcp_proxy_adapter/commands/key_management_command.py +0 -25
  69. mcp_proxy_adapter/commands/load_command.py +7 -78
  70. mcp_proxy_adapter/commands/plugins_command.py +0 -16
  71. mcp_proxy_adapter/commands/protocol_management_command.py +0 -28
  72. mcp_proxy_adapter/commands/proxy_registration_command.py +0 -88
  73. mcp_proxy_adapter/commands/queue_commands.py +750 -0
  74. mcp_proxy_adapter/commands/registration_status_command.py +0 -43
  75. mcp_proxy_adapter/commands/registry/__init__.py +18 -0
  76. mcp_proxy_adapter/commands/registry/command_info.py +103 -0
  77. mcp_proxy_adapter/commands/registry/command_loader.py +207 -0
  78. mcp_proxy_adapter/commands/registry/command_manager.py +119 -0
  79. mcp_proxy_adapter/commands/registry/command_registry.py +217 -0
  80. mcp_proxy_adapter/commands/reload_command.py +0 -80
  81. mcp_proxy_adapter/commands/result.py +25 -77
  82. mcp_proxy_adapter/commands/role_test_command.py +0 -44
  83. mcp_proxy_adapter/commands/roles_management_command.py +0 -199
  84. mcp_proxy_adapter/commands/security_command.py +0 -30
  85. mcp_proxy_adapter/commands/settings_command.py +0 -68
  86. mcp_proxy_adapter/commands/ssl_setup_command.py +0 -42
  87. mcp_proxy_adapter/commands/token_management_command.py +0 -1
  88. mcp_proxy_adapter/commands/transport_management_command.py +0 -20
  89. mcp_proxy_adapter/commands/unload_command.py +0 -71
  90. mcp_proxy_adapter/config.py +15 -626
  91. mcp_proxy_adapter/core/__init__.py +5 -39
  92. mcp_proxy_adapter/core/app_factory.py +14 -36
  93. mcp_proxy_adapter/core/app_runner.py +0 -27
  94. mcp_proxy_adapter/core/auth_validator.py +1 -93
  95. mcp_proxy_adapter/core/certificate/__init__.py +20 -0
  96. mcp_proxy_adapter/core/certificate/certificate_creator.py +371 -0
  97. mcp_proxy_adapter/core/certificate/certificate_extractor.py +183 -0
  98. mcp_proxy_adapter/core/certificate/certificate_utils.py +249 -0
  99. mcp_proxy_adapter/core/certificate/certificate_validator.py +110 -0
  100. mcp_proxy_adapter/core/certificate/ssl_context_manager.py +70 -0
  101. mcp_proxy_adapter/core/certificate_utils.py +64 -903
  102. mcp_proxy_adapter/core/client.py +10 -9
  103. mcp_proxy_adapter/core/client_manager.py +0 -19
  104. mcp_proxy_adapter/core/client_security.py +0 -2
  105. mcp_proxy_adapter/core/config/__init__.py +18 -0
  106. mcp_proxy_adapter/core/config/config.py +195 -0
  107. mcp_proxy_adapter/core/config/config_factory.py +22 -0
  108. mcp_proxy_adapter/core/config/config_loader.py +66 -0
  109. mcp_proxy_adapter/core/config/feature_manager.py +31 -0
  110. mcp_proxy_adapter/core/config/simple_config.py +112 -0
  111. mcp_proxy_adapter/core/config/simple_config_generator.py +50 -0
  112. mcp_proxy_adapter/core/config/simple_config_validator.py +96 -0
  113. mcp_proxy_adapter/core/config_converter.py +0 -186
  114. mcp_proxy_adapter/core/config_validator.py +96 -1238
  115. mcp_proxy_adapter/core/errors.py +7 -42
  116. mcp_proxy_adapter/core/job_manager.py +54 -0
  117. mcp_proxy_adapter/core/logging.py +2 -22
  118. mcp_proxy_adapter/core/mtls_asgi.py +0 -20
  119. mcp_proxy_adapter/core/mtls_asgi_app.py +0 -12
  120. mcp_proxy_adapter/core/mtls_proxy.py +0 -80
  121. mcp_proxy_adapter/core/mtls_server.py +3 -173
  122. mcp_proxy_adapter/core/protocol_manager.py +1 -191
  123. mcp_proxy_adapter/core/proxy/__init__.py +22 -0
  124. mcp_proxy_adapter/core/proxy/auth_manager.py +27 -0
  125. mcp_proxy_adapter/core/proxy/proxy_registration_manager.py +137 -0
  126. mcp_proxy_adapter/core/proxy/registration_client.py +60 -0
  127. mcp_proxy_adapter/core/proxy/ssl_manager.py +101 -0
  128. mcp_proxy_adapter/core/proxy_client.py +0 -1
  129. mcp_proxy_adapter/core/proxy_registration.py +36 -913
  130. mcp_proxy_adapter/core/role_utils.py +0 -308
  131. mcp_proxy_adapter/core/security_adapter.py +1 -36
  132. mcp_proxy_adapter/core/security_factory.py +1 -150
  133. mcp_proxy_adapter/core/security_integration.py +0 -33
  134. mcp_proxy_adapter/core/server_adapter.py +1 -40
  135. mcp_proxy_adapter/core/server_engine.py +2 -173
  136. mcp_proxy_adapter/core/settings.py +0 -127
  137. mcp_proxy_adapter/core/signal_handler.py +0 -65
  138. mcp_proxy_adapter/core/ssl_utils.py +19 -137
  139. mcp_proxy_adapter/core/transport_manager.py +0 -151
  140. mcp_proxy_adapter/core/unified_config_adapter.py +1 -193
  141. mcp_proxy_adapter/core/utils.py +1 -182
  142. mcp_proxy_adapter/core/validation/__init__.py +21 -0
  143. mcp_proxy_adapter/core/validation/config_validator.py +211 -0
  144. mcp_proxy_adapter/core/validation/file_validator.py +73 -0
  145. mcp_proxy_adapter/core/validation/protocol_validator.py +191 -0
  146. mcp_proxy_adapter/core/validation/security_validator.py +58 -0
  147. mcp_proxy_adapter/core/validation/validation_result.py +27 -0
  148. mcp_proxy_adapter/custom_openapi.py +33 -652
  149. mcp_proxy_adapter/examples/bugfix_certificate_config.py +0 -23
  150. mcp_proxy_adapter/examples/check_config.py +0 -2
  151. mcp_proxy_adapter/examples/client_usage_example.py +164 -0
  152. mcp_proxy_adapter/examples/config_builder.py +13 -2
  153. mcp_proxy_adapter/examples/config_cli.py +0 -1
  154. mcp_proxy_adapter/examples/create_test_configs.py +0 -46
  155. mcp_proxy_adapter/examples/debug_request_state.py +0 -1
  156. mcp_proxy_adapter/examples/full_application/commands/custom_echo_command.py +0 -47
  157. mcp_proxy_adapter/examples/full_application/commands/dynamic_calculator_command.py +0 -45
  158. mcp_proxy_adapter/examples/full_application/commands/echo_command.py +0 -12
  159. mcp_proxy_adapter/examples/full_application/commands/help_command.py +0 -12
  160. mcp_proxy_adapter/examples/full_application/commands/list_command.py +0 -7
  161. mcp_proxy_adapter/examples/full_application/hooks/__init__.py +0 -2
  162. mcp_proxy_adapter/examples/full_application/hooks/application_hooks.py +0 -59
  163. mcp_proxy_adapter/examples/full_application/hooks/builtin_command_hooks.py +0 -54
  164. mcp_proxy_adapter/examples/full_application/main.py +186 -150
  165. mcp_proxy_adapter/examples/full_application/proxy_endpoints.py +0 -107
  166. mcp_proxy_adapter/examples/full_application/test_minimal_server.py +0 -24
  167. mcp_proxy_adapter/examples/full_application/test_server.py +0 -58
  168. mcp_proxy_adapter/examples/generate_config.py +65 -11
  169. mcp_proxy_adapter/examples/queue_demo_simple.py +632 -0
  170. mcp_proxy_adapter/examples/queue_integration_example.py +578 -0
  171. mcp_proxy_adapter/examples/queue_server_demo.py +82 -0
  172. mcp_proxy_adapter/examples/queue_server_example.py +85 -0
  173. mcp_proxy_adapter/examples/queue_server_simple.py +173 -0
  174. mcp_proxy_adapter/examples/required_certificates.py +0 -2
  175. mcp_proxy_adapter/examples/run_full_test_suite.py +0 -29
  176. mcp_proxy_adapter/examples/run_proxy_server.py +31 -71
  177. mcp_proxy_adapter/examples/run_security_tests_fixed.py +0 -27
  178. mcp_proxy_adapter/examples/security_test/__init__.py +18 -0
  179. mcp_proxy_adapter/examples/security_test/auth_manager.py +14 -0
  180. mcp_proxy_adapter/examples/security_test/ssl_context_manager.py +28 -0
  181. mcp_proxy_adapter/examples/security_test/test_client.py +159 -0
  182. mcp_proxy_adapter/examples/security_test/test_result.py +22 -0
  183. mcp_proxy_adapter/examples/security_test_client.py +24 -1075
  184. mcp_proxy_adapter/examples/setup/__init__.py +24 -0
  185. mcp_proxy_adapter/examples/setup/certificate_manager.py +215 -0
  186. mcp_proxy_adapter/examples/setup/config_generator.py +12 -0
  187. mcp_proxy_adapter/examples/setup/config_validator.py +118 -0
  188. mcp_proxy_adapter/examples/setup/environment_setup.py +62 -0
  189. mcp_proxy_adapter/examples/setup/test_files_generator.py +10 -0
  190. mcp_proxy_adapter/examples/setup/test_runner.py +89 -0
  191. mcp_proxy_adapter/examples/setup_test_environment.py +133 -1425
  192. mcp_proxy_adapter/examples/test_config.py +0 -3
  193. mcp_proxy_adapter/examples/test_config_builder.py +25 -405
  194. mcp_proxy_adapter/examples/test_examples.py +0 -1
  195. mcp_proxy_adapter/examples/test_framework_complete.py +0 -2
  196. mcp_proxy_adapter/examples/test_mcp_server.py +0 -1
  197. mcp_proxy_adapter/examples/test_protocol_examples.py +0 -1
  198. mcp_proxy_adapter/examples/universal_client.py +0 -6
  199. mcp_proxy_adapter/examples/update_config_certificates.py +0 -1
  200. mcp_proxy_adapter/examples/validate_generator_compatibility.py +0 -1
  201. mcp_proxy_adapter/examples/validate_generator_compatibility_simple.py +0 -187
  202. mcp_proxy_adapter/integrations/__init__.py +25 -0
  203. mcp_proxy_adapter/integrations/queuemgr_integration.py +462 -0
  204. mcp_proxy_adapter/main.py +70 -62
  205. mcp_proxy_adapter/openapi.py +0 -22
  206. mcp_proxy_adapter/version.py +1 -1
  207. {mcp_proxy_adapter-6.9.28.dist-info → mcp_proxy_adapter-6.9.30.dist-info}/METADATA +2 -1
  208. mcp_proxy_adapter-6.9.30.dist-info/RECORD +235 -0
  209. {mcp_proxy_adapter-6.9.28.dist-info → mcp_proxy_adapter-6.9.30.dist-info}/entry_points.txt +1 -1
  210. mcp_proxy_adapter-6.9.28.dist-info/RECORD +0 -149
  211. {mcp_proxy_adapter-6.9.28.dist-info → mcp_proxy_adapter-6.9.30.dist-info}/WHEEL +0 -0
  212. {mcp_proxy_adapter-6.9.28.dist-info → mcp_proxy_adapter-6.9.30.dist-info}/top_level.txt +0 -0
@@ -11,7 +11,6 @@ Version: 1.0.0
11
11
  import logging
12
12
  import os
13
13
  import shutil
14
- from typing import Dict, List, Optional, Any
15
14
  from pathlib import Path
16
15
  from datetime import datetime
17
16
 
@@ -78,30 +77,6 @@ class KeyResult:
78
77
  }
79
78
 
80
79
  @classmethod
81
- def get_schema(cls) -> Dict[str, Any]:
82
- """
83
- Get JSON schema for this result.
84
-
85
- Returns:
86
- JSON schema dictionary
87
- """
88
- return {
89
- "type": "object",
90
- "properties": {
91
- "key_path": {"type": "string", "description": "Path to key file"},
92
- "key_type": {"type": "string", "description": "Type of key"},
93
- "key_size": {"type": "integer", "description": "Key size in bits"},
94
- "created_date": {"type": "string", "description": "Key creation date"},
95
- "expiry_date": {"type": "string", "description": "Key expiry date"},
96
- "status": {
97
- "type": "string",
98
- "enum": ["valid", "expired", "error"],
99
- "description": "Key status",
100
- },
101
- "error": {"type": "string", "description": "Error message if any"},
102
- },
103
- "required": ["key_path", "key_type", "key_size", "status"],
104
- }
105
80
 
106
81
 
107
82
  class KeyManagementCommand(Command):
@@ -5,8 +5,8 @@ Module with load command implementation.
5
5
  from typing import Dict, Any, Optional, List
6
6
 
7
7
  from mcp_proxy_adapter.commands.base import Command
8
- from mcp_proxy_adapter.commands.result import CommandResult, SuccessResult
9
8
  from mcp_proxy_adapter.commands.command_registry import registry
9
+ from mcp_proxy_adapter.commands.result import SuccessResult
10
10
 
11
11
 
12
12
  class LoadResult(SuccessResult):
@@ -49,36 +49,15 @@ class LoadResult(SuccessResult):
49
49
 
50
50
  @classmethod
51
51
  def get_schema(cls) -> Dict[str, Any]:
52
- """
53
- Get JSON schema for result validation.
54
-
55
- Returns:
56
- Dict[str, Any]: JSON schema
57
- """
58
52
  return {
59
53
  "type": "object",
60
54
  "properties": {
61
- "data": {
62
- "type": "object",
63
- "properties": {
64
- "success": {"type": "boolean"},
65
- "commands_loaded": {"type": "integer"},
66
- "loaded_commands": {
67
- "type": "array",
68
- "items": {"type": "string"},
69
- },
70
- "source": {"type": "string"},
71
- "error": {"type": "string"},
72
- },
73
- "required": [
74
- "success",
75
- "commands_loaded",
76
- "loaded_commands",
77
- "source",
78
- ],
79
- }
55
+ "success": {"type": "boolean"},
56
+ "commands_loaded": {"type": "integer"},
57
+ "loaded_commands": {"type": "array", "items": {"type": "string"}},
58
+ "source": {"type": "string"},
59
+ "error": {"type": "string"},
80
60
  },
81
- "required": ["data"],
82
61
  }
83
62
 
84
63
 
@@ -135,60 +114,10 @@ class LoadCommand(Command):
135
114
 
136
115
  @classmethod
137
116
  def get_schema(cls) -> Dict[str, Any]:
138
- """
139
- Get JSON schema for command parameters.
140
-
141
- Returns:
142
- Dict[str, Any]: JSON schema
143
- """
144
117
  return {
145
118
  "type": "object",
146
119
  "properties": {
147
- "source": {
148
- "type": "string",
149
- "description": "Source path or URL to load command from (must end with '_command.py')",
150
- "examples": [
151
- "./my_command.py",
152
- "https://example.com/remote_command.py",
153
- ],
154
- }
120
+ "source": {"type": "string", "description": "Path or URL to command file"}
155
121
  },
156
122
  "required": ["source"],
157
123
  }
158
-
159
- @classmethod
160
- def _generate_examples(
161
- cls, params: Dict[str, Dict[str, Any]]
162
- ) -> List[Dict[str, Any]]:
163
- """
164
- Generate custom examples for load command.
165
-
166
- Args:
167
- params: Information about command parameters
168
-
169
- Returns:
170
- List of examples
171
- """
172
- examples = [
173
- {
174
- "command": cls.name,
175
- "params": {"source": "./custom_command.py"},
176
- "description": "Load a command from local file system",
177
- },
178
- {
179
- "command": cls.name,
180
- "params": {
181
- "source": "https://raw.githubusercontent.com/user/repo/main/remote_command.py"
182
- },
183
- "description": "Load a command from GitHub raw content",
184
- },
185
- {
186
- "command": cls.name,
187
- "params": {
188
- "source": "https://example.com/api/commands/test_command.py"
189
- },
190
- "description": "Load a command from remote API endpoint",
191
- },
192
- ]
193
-
194
- return examples
@@ -5,7 +5,6 @@ Module with plugins command implementation.
5
5
  from typing import Dict, Any, Optional, List
6
6
 
7
7
  from mcp_proxy_adapter.commands.base import Command
8
- from mcp_proxy_adapter.commands.result import CommandResult, SuccessResult
9
8
  from mcp_proxy_adapter.commands.command_registry import registry
10
9
  from mcp_proxy_adapter.config import get_config
11
10
 
@@ -219,21 +218,6 @@ class PluginsCommand(Command):
219
218
  )
220
219
 
221
220
  @classmethod
222
- def get_metadata(cls) -> Dict[str, Any]:
223
- """
224
- Get command metadata.
225
-
226
- Returns:
227
- Dict[str, Any]: Command metadata
228
- """
229
- return {
230
- "name": cls.name,
231
- "summary": "Command that reads and displays available plugins from a plugins server",
232
- "description": cls.__doc__,
233
- "parameters": {},
234
- "examples": cls._generate_examples({}),
235
- "schema": cls.result_class.get_schema(),
236
- }
237
221
 
238
222
  @classmethod
239
223
  def _generate_examples(
@@ -52,34 +52,6 @@ class ProtocolManagementCommand(Command):
52
52
  descr = "Manage and query protocol configurations (HTTP, HTTPS, MTLS)"
53
53
 
54
54
  @classmethod
55
- def get_schema(cls) -> Dict[str, Any]:
56
- """
57
- Get command schema.
58
-
59
- Returns:
60
- Command schema dictionary
61
- """
62
- return {
63
- "type": "object",
64
- "properties": {
65
- "action": {
66
- "type": "string",
67
- "enum": [
68
- "get_info",
69
- "validate_config",
70
- "get_allowed",
71
- "check_protocol",
72
- ],
73
- "description": "Action to perform",
74
- },
75
- "protocol": {
76
- "type": "string",
77
- "enum": ["http", "https", "mtls"],
78
- "description": "Protocol to check (for check_protocol action)",
79
- },
80
- },
81
- "required": ["action"],
82
- }
83
55
 
84
56
  async def execute(self, **kwargs) -> SuccessResult | ErrorResult:
85
57
  """
@@ -10,7 +10,6 @@ email: vasilyvz@gmail.com
10
10
 
11
11
  import json
12
12
  import time
13
- import uuid
14
13
  from typing import Dict, Any, List, Optional
15
14
  from dataclasses import dataclass
16
15
 
@@ -29,42 +28,8 @@ class ProxyRegistrationCommandResult(SuccessResult):
29
28
  message: str = ""
30
29
  details: Optional[Dict[str, Any]] = None
31
30
 
32
- def to_dict(self) -> Dict[str, Any]:
33
- """Convert result to dictionary."""
34
- result = {
35
- "operation": self.operation,
36
- "success": self.success,
37
- "message": self.message,
38
- }
39
-
40
- if self.server_key:
41
- result["server_key"] = self.server_key
42
-
43
- if self.details:
44
- result["details"] = self.details
45
-
46
- return result
47
31
 
48
32
  @classmethod
49
- def get_schema(cls) -> Dict[str, Any]:
50
- """Get JSON schema for result."""
51
- return {
52
- "type": "object",
53
- "properties": {
54
- "operation": {"type": "string", "description": "Operation performed"},
55
- "success": {
56
- "type": "boolean",
57
- "description": "Whether operation was successful",
58
- },
59
- "server_key": {
60
- "type": "string",
61
- "description": "Server key for registered server",
62
- },
63
- "message": {"type": "string", "description": "Result message"},
64
- "details": {"type": "object", "description": "Additional details"},
65
- },
66
- "required": ["operation", "success", "message"],
67
- }
68
33
 
69
34
 
70
35
  class ProxyRegistrationCommand(Command):
@@ -352,56 +317,3 @@ class ProxyRegistrationCommand(Command):
352
317
  return True
353
318
 
354
319
  @classmethod
355
- def get_schema(cls) -> Dict[str, Any]:
356
- """Get JSON schema for command parameters."""
357
- return {
358
- "type": "object",
359
- "properties": {
360
- "operation": {
361
- "type": "string",
362
- "enum": ["register", "unregister", "heartbeat", "discover"],
363
- "description": "Operation to perform",
364
- "default": "register",
365
- },
366
- "server_id": {
367
- "type": "string",
368
- "description": "Server ID for registration",
369
- },
370
- "server_url": {
371
- "type": "string",
372
- "description": "Server URL for registration",
373
- },
374
- "server_name": {"type": "string", "description": "Server name"},
375
- "description": {"type": "string", "description": "Server description"},
376
- "version": {"type": "string", "description": "Server version"},
377
- "capabilities": {
378
- "type": "array",
379
- "items": {"type": "string"},
380
- "description": "Server capabilities",
381
- },
382
- "endpoints": {"type": "object", "description": "Server endpoints"},
383
- "auth_method": {
384
- "type": "string",
385
- "description": "Authentication method",
386
- },
387
- "security_enabled": {
388
- "type": "boolean",
389
- "description": "Whether security is enabled",
390
- },
391
- "server_key": {
392
- "type": "string",
393
- "description": "Server key for unregistration/heartbeat",
394
- },
395
- "copy_number": {
396
- "type": "integer",
397
- "description": "Copy number for unregistration",
398
- },
399
- "timestamp": {
400
- "type": "integer",
401
- "description": "Timestamp for heartbeat",
402
- },
403
- "status": {"type": "string", "description": "Status for heartbeat"},
404
- },
405
- "required": ["operation"],
406
- "additionalProperties": False,
407
- }