mcp-proxy-adapter 6.9.0__py3-none-any.whl → 6.9.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.
@@ -69,7 +69,7 @@ class ConfigValidator:
69
69
  "log_file": str,
70
70
  "error_log_file": str,
71
71
  "access_log_file": str,
72
- "max_file_size": str,
72
+ "max_file_size": (str, int),
73
73
  "backup_count": int,
74
74
  "format": str,
75
75
  "date_format": str,
@@ -251,8 +251,16 @@ class ConfigValidator:
251
251
  return self.validation_results
252
252
 
253
253
  def _validate_required_sections(self) -> None:
254
- """Validate that all required sections and keys are present."""
255
- for section_name, required_keys in self.required_sections.items():
254
+ """Validate that all required sections and keys are present for enabled features only."""
255
+ # Always required sections (core functionality)
256
+ always_required = {
257
+ "server": self.required_sections["server"],
258
+ "logging": self.required_sections["logging"],
259
+ "commands": self.required_sections["commands"]
260
+ }
261
+
262
+ # Check always required sections
263
+ for section_name, required_keys in always_required.items():
256
264
  if section_name not in self.config_data:
257
265
  self.validation_results.append(ValidationResult(
258
266
  level="error",
@@ -273,13 +281,70 @@ class ConfigValidator:
273
281
  else:
274
282
  # Validate type
275
283
  value = section_data[key]
276
- if not isinstance(value, expected_type):
284
+ if isinstance(expected_type, tuple):
285
+ if not isinstance(value, expected_type):
286
+ expected_names = [t.__name__ for t in expected_type]
287
+ self.validation_results.append(ValidationResult(
288
+ level="error",
289
+ message=f"Key '{key}' in section '{section_name}' has wrong type. Expected {' or '.join(expected_names)}, got {type(value).__name__}",
290
+ section=section_name,
291
+ key=key
292
+ ))
293
+ else:
294
+ if not isinstance(value, expected_type):
295
+ self.validation_results.append(ValidationResult(
296
+ level="error",
297
+ message=f"Key '{key}' in section '{section_name}' has wrong type. Expected {expected_type.__name__}, got {type(value).__name__}",
298
+ section=section_name,
299
+ key=key
300
+ ))
301
+
302
+ # Check conditional sections based on feature flags
303
+ for feature_name, feature_config in self.feature_flags.items():
304
+ enabled_key = feature_config["enabled_key"]
305
+ is_enabled = self._get_nested_value(enabled_key, False)
306
+
307
+ if is_enabled and feature_name in self.required_sections:
308
+ section_name = feature_name
309
+ required_keys = self.required_sections[section_name]
310
+
311
+ if section_name not in self.config_data:
312
+ self.validation_results.append(ValidationResult(
313
+ level="error",
314
+ message=f"Required section '{section_name}' is missing for enabled feature",
315
+ section=section_name
316
+ ))
317
+ continue
318
+
319
+ section_data = self.config_data[section_name]
320
+ for key, expected_type in required_keys.items():
321
+ if key not in section_data:
277
322
  self.validation_results.append(ValidationResult(
278
323
  level="error",
279
- message=f"Key '{key}' in section '{section_name}' has wrong type. Expected {expected_type.__name__}, got {type(value).__name__}",
324
+ message=f"Required key '{key}' is missing in section '{section_name}' for enabled feature",
280
325
  section=section_name,
281
326
  key=key
282
327
  ))
328
+ else:
329
+ # Validate type
330
+ value = section_data[key]
331
+ if isinstance(expected_type, tuple):
332
+ if not isinstance(value, expected_type):
333
+ expected_names = [t.__name__ for t in expected_type]
334
+ self.validation_results.append(ValidationResult(
335
+ level="error",
336
+ message=f"Key '{key}' in section '{section_name}' has wrong type. Expected {' or '.join(expected_names)}, got {type(value).__name__}",
337
+ section=section_name,
338
+ key=key
339
+ ))
340
+ else:
341
+ if not isinstance(value, expected_type):
342
+ self.validation_results.append(ValidationResult(
343
+ level="error",
344
+ message=f"Key '{key}' in section '{section_name}' has wrong type. Expected {expected_type.__name__}, got {type(value).__name__}",
345
+ section=section_name,
346
+ key=key
347
+ ))
283
348
 
284
349
  def _validate_feature_flags(self) -> None:
285
350
  """Validate feature flags and their dependencies."""
@@ -2,4 +2,4 @@
2
2
  Version information for MCP Proxy Adapter.
3
3
  """
4
4
 
5
- __version__ = "6.9.0"
5
+ __version__ = "6.9.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-proxy-adapter
3
- Version: 6.9.0
3
+ Version: 6.9.1
4
4
  Summary: Powerful JSON-RPC microservices framework with built-in security, authentication, and proxy registration
5
5
  Home-page: https://github.com/maverikod/mcp-proxy-adapter
6
6
  Author: Vasiliy Zdanovskiy
@@ -4,7 +4,7 @@ mcp_proxy_adapter/config.py,sha256=1Ngxri2IPGoytYdCF5pXzbLUXsWcf6qYENkaDkAppg0,2
4
4
  mcp_proxy_adapter/custom_openapi.py,sha256=XRviX-C-ZkSKdBhORhDTdeN_1FWyEfXZADiASft3t9I,28149
5
5
  mcp_proxy_adapter/main.py,sha256=NFcSW7WaEnimRWe5zj28D0CH9otHlRZ92d2Um6XiGjE,10399
6
6
  mcp_proxy_adapter/openapi.py,sha256=2UZOI09ZDRJuBYBjKbMyb2U4uASszoCMD5o_4ktRpvg,13480
7
- mcp_proxy_adapter/version.py,sha256=yX54-cNu3WDv2Y6PxrAvGEH5Ju4EUsUaVQ0KC0Y_zqk,74
7
+ mcp_proxy_adapter/version.py,sha256=xxLpHDvb9-qm46V6EFbniTBteivya9aY7QDpe4dtqOM,74
8
8
  mcp_proxy_adapter/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  mcp_proxy_adapter/api/app.py,sha256=PQ1Ch5ydJIHp3Z6gcMCzKkTsXPQAuZ9weHtQ-EXnNGY,37134
10
10
  mcp_proxy_adapter/api/handlers.py,sha256=X-hcMNVeTAu4yVkKJEChEsj2bFptUS6sLNN-Wysjkow,10011
@@ -62,7 +62,7 @@ mcp_proxy_adapter/core/client.py,sha256=qIbPl8prEwK2U65kl-vGJW2_imo1E4i6HxG_VpPe
62
62
  mcp_proxy_adapter/core/client_manager.py,sha256=yD8HZJlOwmDbVU49YfzSbh1XZ-Vib8qfcLVAaH03Jdg,8832
63
63
  mcp_proxy_adapter/core/client_security.py,sha256=siUaYorcDbpZsEIKgLfg-jBKkp7z_Er8wsO63mDD3Is,13127
64
64
  mcp_proxy_adapter/core/config_converter.py,sha256=Wnnsrbw7DxtgDfLG-IyyzK-hkKu0_1yp7-7dW87tu_4,17422
65
- mcp_proxy_adapter/core/config_validator.py,sha256=jsTZJA8oxWtmbDAoTfrQX38e6pZ9RIVepwWlk8gP91c,43873
65
+ mcp_proxy_adapter/core/config_validator.py,sha256=3RpcpifXDpZ9aPujYSNpFPpkD0MW6SCTHaYLWO2cTMg,47580
66
66
  mcp_proxy_adapter/core/crl_utils.py,sha256=Jnwq2UN52IoCDZCwByRP3XNMOJexftb-mVaH6zes6Fc,11706
67
67
  mcp_proxy_adapter/core/errors.py,sha256=uXm0zslc1iyvuu-aEfX5euEHPWaQn8LZUwgQGKVWe8U,6825
68
68
  mcp_proxy_adapter/core/logging.py,sha256=VIpiC6QTGLukRjiJoVpq3VEoLKhUeLNl8IdfljpW6ZU,9654
@@ -135,8 +135,8 @@ mcp_proxy_adapter/schemas/base_schema.json,sha256=v9G9cGMd4dRhCZsOQ_FMqOi5VFyVbI
135
135
  mcp_proxy_adapter/schemas/openapi_schema.json,sha256=C3yLkwmDsvnLW9B5gnKKdBGl4zxkeU-rEmjTrNVsQU0,8405
136
136
  mcp_proxy_adapter/schemas/roles.json,sha256=pgf_ZyqKyXbfGUxvobpiLiSJz9zzxrMuoVWEkEpz3N8,764
137
137
  mcp_proxy_adapter/schemas/roles_schema.json,sha256=deHgI7L6GwfBXacOlNtDgDJelDThppClC3Ti4Eh8rJY,5659
138
- mcp_proxy_adapter-6.9.0.dist-info/METADATA,sha256=uEnRinAvORlAl_2fXmaDEt8Hy8UuwNniFTw-sijCn1s,8510
139
- mcp_proxy_adapter-6.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
- mcp_proxy_adapter-6.9.0.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
- mcp_proxy_adapter-6.9.0.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
- mcp_proxy_adapter-6.9.0.dist-info/RECORD,,
138
+ mcp_proxy_adapter-6.9.1.dist-info/METADATA,sha256=jJwI38aM70gFbownUozRNW9UjrY7zDSD3pC4C1SdBbw,8510
139
+ mcp_proxy_adapter-6.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
140
+ mcp_proxy_adapter-6.9.1.dist-info/entry_points.txt,sha256=Bf-O5Aq80n22Ayu9fI9BgidzWqwzIVaqextAddTuHZw,563
141
+ mcp_proxy_adapter-6.9.1.dist-info/top_level.txt,sha256=JZT7vPLBYrtroX-ij68JBhJYbjDdghcV-DFySRy-Nnw,18
142
+ mcp_proxy_adapter-6.9.1.dist-info/RECORD,,