mcp-mesh 0.7.18__py3-none-any.whl → 0.7.19__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_mesh/__init__.py CHANGED
@@ -31,7 +31,7 @@ from .engine.decorator_registry import (
31
31
  get_decorator_stats,
32
32
  )
33
33
 
34
- __version__ = "0.7.18"
34
+ __version__ = "0.7.19"
35
35
 
36
36
  # Store reference to runtime processor if initialized
37
37
  _runtime_processor = None
@@ -92,7 +92,12 @@ def configure_logging():
92
92
  # Configure with safe stream handler for background threads
93
93
  handler = SafeStreamHandler(sys.stdout)
94
94
  handler.setLevel(TRACE) # Handler allows all levels including TRACE
95
- handler.setFormatter(logging.Formatter("%(levelname)-8s %(message)s"))
95
+ handler.setFormatter(
96
+ logging.Formatter(
97
+ "%(asctime)s %(levelname)-8s %(message)s",
98
+ datefmt="%Y-%m-%d %H:%M:%S",
99
+ )
100
+ )
96
101
 
97
102
  root_logger.addHandler(handler)
98
103
 
@@ -164,15 +169,16 @@ def get_trace_prefix() -> str:
164
169
  return ""
165
170
 
166
171
 
167
- def format_log_value(value, max_len: int = 1000) -> str:
168
- """Format a value for logging with truncation.
172
+ def format_log_value(value, max_len: int = 0) -> str:
173
+ """Format a value for logging.
169
174
 
170
- Provides a readable representation of values with size info and truncation
171
- for large payloads. Suitable for DEBUG level logging.
175
+ Provides a readable representation of values with size info.
176
+ By default, no truncation is applied (max_len=0) to enable full
177
+ request/response logging at DEBUG/TRACE levels.
172
178
 
173
179
  Args:
174
180
  value: Any value to format
175
- max_len: Maximum length before truncation (default 1000)
181
+ max_len: Maximum length before truncation (0 = no truncation)
176
182
 
177
183
  Returns:
178
184
  Formatted string representation
@@ -185,18 +191,18 @@ def format_log_value(value, max_len: int = 1000) -> str:
185
191
  try:
186
192
  if isinstance(value, dict):
187
193
  content = str(value)
188
- if len(content) > max_len:
194
+ if max_len > 0 and len(content) > max_len:
189
195
  return f"{type_name}({len(value)} keys): {content[:max_len]}..."
190
196
  return content
191
197
 
192
198
  elif isinstance(value, (list, tuple)):
193
199
  content = str(value)
194
- if len(content) > max_len:
200
+ if max_len > 0 and len(content) > max_len:
195
201
  return f"{type_name}({len(value)} items): {content[:max_len]}..."
196
202
  return content
197
203
 
198
204
  elif isinstance(value, str):
199
- if len(value) > max_len:
205
+ if max_len > 0 and len(value) > max_len:
200
206
  return f'"{value[:max_len]}..." ({len(value)} chars)'
201
207
  return f'"{value}"'
202
208
 
@@ -206,13 +212,13 @@ def format_log_value(value, max_len: int = 1000) -> str:
206
212
  elif hasattr(value, "__dict__"):
207
213
  # Object with attributes - show class name and key attributes
208
214
  content = str(value)
209
- if len(content) > max_len:
215
+ if max_len > 0 and len(content) > max_len:
210
216
  return f"{type_name}: {content[:max_len]}..."
211
217
  return f"{type_name}: {content}"
212
218
 
213
219
  else:
214
220
  content = str(value)
215
- if len(content) > max_len:
221
+ if max_len > 0 and len(content) > max_len:
216
222
  return f"{type_name}: {content[:max_len]}..."
217
223
  return content
218
224
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-mesh
3
- Version: 0.7.18
3
+ Version: 0.7.19
4
4
  Summary: Kubernetes-native platform for distributed MCP applications
5
5
  Project-URL: Homepage, https://github.com/dhyansraj/mcp-mesh
6
6
  Project-URL: Documentation, https://github.com/dhyansraj/mcp-mesh/tree/main/docs
@@ -1,4 +1,4 @@
1
- _mcp_mesh/__init__.py,sha256=-inFsbyxIrkU3mTeXcExxEthCbehKTq_efP8UIYwtFQ,2720
1
+ _mcp_mesh/__init__.py,sha256=U1zre1cO00iynX2kNgMLkNw-fBdTTJREGFUjpDrHLmU,2720
2
2
  _mcp_mesh/reload.py,sha256=IqZeS7lsFw7bwOzDPE0LJLPkY5nR68BKc8C4srSCX1o,6239
3
3
  _mcp_mesh/reload_runner.py,sha256=SgQKzzO2yHfSUBq8s3SpAnovWA0rveimVNaxeLCEo_0,1310
4
4
  _mcp_mesh/engine/__init__.py,sha256=U_6Kw3vA_3RiNK0Oln5c5C7WvA9lSONV22wWzfxYHNw,2975
@@ -128,7 +128,7 @@ _mcp_mesh/shared/fast_heartbeat_status.py,sha256=OquEsX9ZTbxY1lIsll0Mbb2KDzSJD76
128
128
  _mcp_mesh/shared/fastapi_middleware_manager.py,sha256=_h10dSL9mgQstpJW_ZM2cpkU6yTKaYKlZaKXMk2i6IA,14638
129
129
  _mcp_mesh/shared/health_check_manager.py,sha256=xZjQp-mWdPD64djp06nU5fN-fqi3Q_cIc1PAwMQTRBY,10362
130
130
  _mcp_mesh/shared/host_resolver.py,sha256=ycs6gXnI1zJX5KiqiLJPX5GkHX8r4j8NMHQOlG2J2X8,2964
131
- _mcp_mesh/shared/logging_config.py,sha256=a0r6EmpuGhNHl3-t6fgw84qSiyGdW7cdiCGfiyEigSg,8872
131
+ _mcp_mesh/shared/logging_config.py,sha256=hf3DCEMDN2WwEaETK721iQkFxX9TENNGmF9H1QhVSls,9076
132
132
  _mcp_mesh/shared/registry_client_wrapper.py,sha256=WTHivh4Np740CvqN4d4wEYcimjPy1GCr1XXt-ZhEzO4,21181
133
133
  _mcp_mesh/shared/server_discovery.py,sha256=W5nsN-GvEVFD-7XkbMTxh-9FUIEiyWOxP3GYr8GNi3E,13142
134
134
  _mcp_mesh/shared/simple_shutdown.py,sha256=jnF1rTR2yR619LZnEjNlu-ZdKlB3PovxKqG0VZ3HDgE,8319
@@ -144,9 +144,9 @@ _mcp_mesh/tracing/utils.py,sha256=t9lJuTH7CeuzAiiAaD0WxsJMFJPdzZFR0w6-vyR9f2E,38
144
144
  _mcp_mesh/utils/fastmcp_schema_extractor.py,sha256=M54ffesC-56zl_fNJHj9dZxElDQaWFf1MXdSLCuFStg,17253
145
145
  mesh/__init__.py,sha256=Va5XRBWgejQurad7Maz3E-zPY7vu431B2_4sAdCu1zk,3868
146
146
  mesh/decorators.py,sha256=sFTLngsIo_2uBb-Fvuh9K1S8e2Kzq_70eWT4Z2FA83E,59730
147
- mesh/helpers.py,sha256=ITua2zdxbXeBLF5qS46A6A1P2GQNbfL_2_BMCKazQ4U,12575
147
+ mesh/helpers.py,sha256=1Y7V6aQvpV8BKfEeeKfjwPJ5g9FjMCzSNifs3se1jkA,12935
148
148
  mesh/types.py,sha256=n0MxrBYZJ84xyQWGf_X2ZbVWSAaIcEBkRV7qaCmX6Ac,17008
149
- mcp_mesh-0.7.18.dist-info/METADATA,sha256=ZrcFtHPBbBJJUFKcjiKklHVwDhafEwMuG6f-FkNG7V0,5006
150
- mcp_mesh-0.7.18.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
151
- mcp_mesh-0.7.18.dist-info/licenses/LICENSE,sha256=_EBQHRQThv9FPOLc5eFOUdeeRO0mYwChC7cx60dM1tM,1078
152
- mcp_mesh-0.7.18.dist-info/RECORD,,
149
+ mcp_mesh-0.7.19.dist-info/METADATA,sha256=08PRSHzF1SCog1d00mljKqzKC6QRVmOtuIqwVfIo2e0,5006
150
+ mcp_mesh-0.7.19.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
151
+ mcp_mesh-0.7.19.dist-info/licenses/LICENSE,sha256=_EBQHRQThv9FPOLc5eFOUdeeRO0mYwChC7cx60dM1tM,1078
152
+ mcp_mesh-0.7.19.dist-info/RECORD,,
mesh/helpers.py CHANGED
@@ -8,6 +8,8 @@ mesh decorators to simplify common patterns like zero-code LLM providers.
8
8
  import logging
9
9
  from typing import Any, Dict, List, Optional
10
10
 
11
+ from _mcp_mesh.shared.logging_config import format_log_value
12
+
11
13
  logger = logging.getLogger(__name__)
12
14
 
13
15
 
@@ -228,7 +230,16 @@ def llm_provider(
228
230
 
229
231
  # Call LiteLLM
230
232
  try:
233
+ # Log full request
234
+ logger.debug(
235
+ f"📤 LLM provider request: {format_log_value(completion_args)}"
236
+ )
237
+
231
238
  response = litellm.completion(**completion_args)
239
+
240
+ # Log full response
241
+ logger.debug(f"📥 LLM provider response: {format_log_value(response)}")
242
+
232
243
  message = response.choices[0].message
233
244
 
234
245
  # Build message dict with all necessary fields for agentic loop