chuk-tool-processor 0.6.17__tar.gz → 0.6.19__tar.gz

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 chuk-tool-processor might be problematic. Click here for more details.

Files changed (65) hide show
  1. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/PKG-INFO +2 -2
  2. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/pyproject.toml +2 -2
  3. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_http_streamable.py +3 -0
  4. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_sse.py +3 -0
  5. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_stdio.py +2 -0
  6. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/stream_manager.py +69 -50
  7. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/stdio_transport.py +2 -1
  8. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/PKG-INFO +2 -2
  9. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/requires.txt +1 -1
  10. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/README.md +0 -0
  11. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/setup.cfg +0 -0
  12. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/__init__.py +0 -0
  13. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/__init__.py +0 -0
  14. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/exceptions.py +0 -0
  15. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/processor.py +0 -0
  16. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/__init__.py +0 -0
  17. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/__init__.py +0 -0
  18. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/inprocess_strategy.py +0 -0
  19. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/subprocess_strategy.py +0 -0
  20. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/tool_executor.py +0 -0
  21. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/__init__.py +0 -0
  22. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/caching.py +0 -0
  23. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/rate_limiting.py +0 -0
  24. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/retry.py +0 -0
  25. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/__init__.py +0 -0
  26. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/context.py +0 -0
  27. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/formatter.py +0 -0
  28. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/helpers.py +0 -0
  29. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/metrics.py +0 -0
  30. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/__init__.py +0 -0
  31. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/mcp_tool.py +0 -0
  32. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/register_mcp_tools.py +0 -0
  33. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/__init__.py +0 -0
  34. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/base_transport.py +0 -0
  35. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/http_streamable_transport.py +0 -0
  36. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/sse_transport.py +0 -0
  37. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/__init__.py +0 -0
  38. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/execution_strategy.py +0 -0
  39. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/streaming_tool.py +0 -0
  40. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_call.py +0 -0
  41. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_export_mixin.py +0 -0
  42. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_result.py +0 -0
  43. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/validated_tool.py +0 -0
  44. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/__init__.py +0 -0
  45. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/discovery.py +0 -0
  46. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/__init__.py +0 -0
  47. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/base.py +0 -0
  48. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/function_call_tool.py +0 -0
  49. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/json_tool.py +0 -0
  50. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/openai_tool.py +0 -0
  51. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/xml_tool.py +0 -0
  52. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/__init__.py +0 -0
  53. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/auto_register.py +0 -0
  54. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/decorators.py +0 -0
  55. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/interface.py +0 -0
  56. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/metadata.py +0 -0
  57. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/provider.py +0 -0
  58. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/providers/__init__.py +0 -0
  59. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/providers/memory.py +0 -0
  60. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/tool_export.py +0 -0
  61. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/utils/__init__.py +0 -0
  62. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/utils/validation.py +0 -0
  63. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/SOURCES.txt +0 -0
  64. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/dependency_links.txt +0 -0
  65. {chuk_tool_processor-0.6.17 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chuk-tool-processor
3
- Version: 0.6.17
3
+ Version: 0.6.19
4
4
  Summary: Async-native framework for registering, discovering, and executing tools referenced in LLM responses
5
5
  Author-email: CHUK Team <chrishayuk@somejunkmailbox.com>
6
6
  Maintainer-email: CHUK Team <chrishayuk@somejunkmailbox.com>
@@ -20,7 +20,7 @@ Classifier: Framework :: AsyncIO
20
20
  Classifier: Typing :: Typed
21
21
  Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: chuk-mcp>=0.5.3
23
+ Requires-Dist: chuk-mcp>=0.5.4
24
24
  Requires-Dist: dotenv>=0.9.9
25
25
  Requires-Dist: psutil>=7.0.0
26
26
  Requires-Dist: pydantic>=2.11.3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "chuk-tool-processor"
7
- version = "0.6.17"
7
+ version = "0.6.19"
8
8
  description = "Async-native framework for registering, discovering, and executing tools referenced in LLM responses"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -41,7 +41,7 @@ classifiers = [
41
41
  "Typing :: Typed",
42
42
  ]
43
43
  dependencies = [
44
- "chuk-mcp>=0.5.3",
44
+ "chuk-mcp>=0.5.4",
45
45
  "dotenv>=0.9.9",
46
46
  "psutil>=7.0.0",
47
47
  "pydantic>=2.11.3",
@@ -34,6 +34,7 @@ async def setup_mcp_http_streamable(
34
34
  server_names: dict[int, str] | None = None,
35
35
  connection_timeout: float = 30.0,
36
36
  default_timeout: float = 30.0,
37
+ initialization_timeout: float = 60.0,
37
38
  max_concurrency: int | None = None,
38
39
  enable_caching: bool = True,
39
40
  cache_ttl: int = 300,
@@ -58,6 +59,7 @@ async def setup_mcp_http_streamable(
58
59
  server_names: Optional mapping of server indices to names
59
60
  connection_timeout: Timeout for initial HTTP connection setup
60
61
  default_timeout: Default timeout for tool execution
62
+ initialization_timeout: Timeout for complete initialization (default 60s, increase to 120s+ for slow servers like Notion)
61
63
  max_concurrency: Maximum concurrent operations
62
64
  enable_caching: Whether to enable response caching
63
65
  cache_ttl: Cache time-to-live in seconds
@@ -90,6 +92,7 @@ async def setup_mcp_http_streamable(
90
92
  server_names=server_names,
91
93
  connection_timeout=connection_timeout,
92
94
  default_timeout=default_timeout,
95
+ initialization_timeout=initialization_timeout,
93
96
  )
94
97
 
95
98
  # 2️⃣ pull the remote tool list and register each one locally
@@ -30,6 +30,7 @@ async def setup_mcp_sse( # noqa: C901 - long but just a config facade
30
30
  server_names: dict[int, str] | None = None,
31
31
  connection_timeout: float = 30.0, # 🔧 INCREASED DEFAULT: was 10.0
32
32
  default_timeout: float = 30.0, # 🔧 INCREASED DEFAULT: was 10.0
33
+ initialization_timeout: float = 60.0,
33
34
  max_concurrency: int | None = None,
34
35
  enable_caching: bool = True,
35
36
  cache_ttl: int = 300,
@@ -50,6 +51,7 @@ async def setup_mcp_sse( # noqa: C901 - long but just a config facade
50
51
  server_names: Optional mapping of server indices to names
51
52
  connection_timeout: Timeout for initial SSE connection setup
52
53
  default_timeout: Default timeout for tool execution
54
+ initialization_timeout: Timeout for complete initialization (default 60s, increase for slow servers)
53
55
  max_concurrency: Maximum concurrent operations
54
56
  enable_caching: Whether to enable response caching
55
57
  cache_ttl: Cache time-to-live in seconds
@@ -69,6 +71,7 @@ async def setup_mcp_sse( # noqa: C901 - long but just a config facade
69
71
  server_names=server_names,
70
72
  connection_timeout=connection_timeout, # 🔧 ADD THIS LINE
71
73
  default_timeout=default_timeout, # 🔧 ADD THIS LINE
74
+ initialization_timeout=initialization_timeout,
72
75
  )
73
76
 
74
77
  # 2️⃣ pull the remote tool list and register each one locally
@@ -30,6 +30,7 @@ async def setup_mcp_stdio( # noqa: C901 - long but just a config facade
30
30
  servers: list[str],
31
31
  server_names: dict[int, str] | None = None,
32
32
  default_timeout: float = 10.0,
33
+ initialization_timeout: float = 60.0,
33
34
  max_concurrency: int | None = None,
34
35
  enable_caching: bool = True,
35
36
  cache_ttl: int = 300,
@@ -53,6 +54,7 @@ async def setup_mcp_stdio( # noqa: C901 - long but just a config facade
53
54
  server_names=server_names,
54
55
  transport_type="stdio",
55
56
  default_timeout=default_timeout, # 🔧 ADD THIS LINE
57
+ initialization_timeout=initialization_timeout,
56
58
  )
57
59
 
58
60
  # 2️⃣ pull the remote tool list and register each one locally
@@ -62,16 +62,16 @@ class StreamManager:
62
62
  initialization_timeout: float = 60.0, # NEW: Timeout for entire initialization
63
63
  ) -> StreamManager:
64
64
  """Create StreamManager with timeout protection."""
65
- try:
66
- inst = cls()
67
- await asyncio.wait_for(
68
- inst.initialize(config_file, servers, server_names, transport_type, default_timeout=default_timeout),
69
- timeout=initialization_timeout,
70
- )
71
- return inst
72
- except TimeoutError:
73
- logger.error("StreamManager initialization timed out after %ss", initialization_timeout)
74
- raise RuntimeError(f"StreamManager initialization timed out after {initialization_timeout}s")
65
+ inst = cls()
66
+ await inst.initialize(
67
+ config_file,
68
+ servers,
69
+ server_names,
70
+ transport_type,
71
+ default_timeout=default_timeout,
72
+ initialization_timeout=initialization_timeout,
73
+ )
74
+ return inst
75
75
 
76
76
  @classmethod
77
77
  async def create_with_sse(
@@ -83,18 +83,15 @@ class StreamManager:
83
83
  initialization_timeout: float = 60.0, # NEW
84
84
  ) -> StreamManager:
85
85
  """Create StreamManager with SSE transport and timeout protection."""
86
- try:
87
- inst = cls()
88
- await asyncio.wait_for(
89
- inst.initialize_with_sse(
90
- servers, server_names, connection_timeout=connection_timeout, default_timeout=default_timeout
91
- ),
92
- timeout=initialization_timeout,
93
- )
94
- return inst
95
- except TimeoutError:
96
- logger.error("SSE StreamManager initialization timed out after %ss", initialization_timeout)
97
- raise RuntimeError(f"SSE StreamManager initialization timed out after {initialization_timeout}s")
86
+ inst = cls()
87
+ await inst.initialize_with_sse(
88
+ servers,
89
+ server_names,
90
+ connection_timeout=connection_timeout,
91
+ default_timeout=default_timeout,
92
+ initialization_timeout=initialization_timeout,
93
+ )
94
+ return inst
98
95
 
99
96
  @classmethod
100
97
  async def create_with_http_streamable(
@@ -106,20 +103,15 @@ class StreamManager:
106
103
  initialization_timeout: float = 60.0, # NEW
107
104
  ) -> StreamManager:
108
105
  """Create StreamManager with HTTP Streamable transport and timeout protection."""
109
- try:
110
- inst = cls()
111
- await asyncio.wait_for(
112
- inst.initialize_with_http_streamable(
113
- servers, server_names, connection_timeout=connection_timeout, default_timeout=default_timeout
114
- ),
115
- timeout=initialization_timeout,
116
- )
117
- return inst
118
- except TimeoutError:
119
- logger.error("HTTP Streamable StreamManager initialization timed out after %ss", initialization_timeout)
120
- raise RuntimeError(
121
- f"HTTP Streamable StreamManager initialization timed out after {initialization_timeout}s"
122
- )
106
+ inst = cls()
107
+ await inst.initialize_with_http_streamable(
108
+ servers,
109
+ server_names,
110
+ connection_timeout=connection_timeout,
111
+ default_timeout=default_timeout,
112
+ initialization_timeout=initialization_timeout,
113
+ )
114
+ return inst
123
115
 
124
116
  # ------------------------------------------------------------------ #
125
117
  # NEW: Context manager support for automatic cleanup #
@@ -167,6 +159,7 @@ class StreamManager:
167
159
  server_names: dict[int, str] | None = None,
168
160
  transport_type: str = "stdio",
169
161
  default_timeout: float = 30.0,
162
+ initialization_timeout: float = 60.0,
170
163
  ) -> None:
171
164
  """Initialize with graceful headers handling for all transport types."""
172
165
  if self._closed:
@@ -179,7 +172,11 @@ class StreamManager:
179
172
  try:
180
173
  if transport_type == "stdio":
181
174
  params = await load_config(config_file, server_name)
182
- transport: MCPBaseTransport = StdioTransport(params)
175
+ # Use initialization_timeout for connection_timeout since subprocess
176
+ # launch can take time (e.g., uvx downloading packages)
177
+ transport: MCPBaseTransport = StdioTransport(
178
+ params, connection_timeout=initialization_timeout, default_timeout=default_timeout
179
+ )
183
180
  elif transport_type == "sse":
184
181
  logger.warning(
185
182
  "Using SSE transport in initialize() - consider using initialize_with_sse() instead"
@@ -241,15 +238,19 @@ class StreamManager:
241
238
  continue
242
239
 
243
240
  # Initialize with timeout protection
244
- if not await asyncio.wait_for(transport.initialize(), timeout=default_timeout):
245
- logger.error("Failed to init %s", server_name)
241
+ try:
242
+ if not await asyncio.wait_for(transport.initialize(), timeout=initialization_timeout):
243
+ logger.error("Failed to init %s", server_name)
244
+ continue
245
+ except TimeoutError:
246
+ logger.error("Timeout initialising %s (timeout=%ss)", server_name, initialization_timeout)
246
247
  continue
247
248
 
248
249
  self.transports[server_name] = transport
249
250
 
250
- # Ping and get tools with timeout protection
251
- status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=5.0) else "Down"
252
- tools = await asyncio.wait_for(transport.get_tools(), timeout=10.0)
251
+ # Ping and get tools with timeout protection (use longer timeouts for slow servers)
252
+ status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=30.0) else "Down"
253
+ tools = await asyncio.wait_for(transport.get_tools(), timeout=30.0)
253
254
 
254
255
  for t in tools:
255
256
  name = t.get("name")
@@ -283,6 +284,7 @@ class StreamManager:
283
284
  server_names: dict[int, str] | None = None,
284
285
  connection_timeout: float = 10.0,
285
286
  default_timeout: float = 30.0,
287
+ initialization_timeout: float = 60.0,
286
288
  ) -> None:
287
289
  """Initialize with SSE transport with optional headers support."""
288
290
  if self._closed:
@@ -313,13 +315,18 @@ class StreamManager:
313
315
 
314
316
  transport = SSETransport(**transport_params)
315
317
 
316
- if not await asyncio.wait_for(transport.initialize(), timeout=connection_timeout):
317
- logger.error("Failed to init SSE %s", name)
318
+ try:
319
+ if not await asyncio.wait_for(transport.initialize(), timeout=initialization_timeout):
320
+ logger.error("Failed to init SSE %s", name)
321
+ continue
322
+ except TimeoutError:
323
+ logger.error("Timeout initialising SSE %s (timeout=%ss)", name, initialization_timeout)
318
324
  continue
319
325
 
320
326
  self.transports[name] = transport
321
- status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=5.0) else "Down"
322
- tools = await asyncio.wait_for(transport.get_tools(), timeout=10.0)
327
+ # Use longer timeouts for slow servers (ping can take time after initialization)
328
+ status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=30.0) else "Down"
329
+ tools = await asyncio.wait_for(transport.get_tools(), timeout=30.0)
323
330
 
324
331
  for t in tools:
325
332
  tname = t.get("name")
@@ -346,11 +353,14 @@ class StreamManager:
346
353
  server_names: dict[int, str] | None = None,
347
354
  connection_timeout: float = 30.0,
348
355
  default_timeout: float = 30.0,
356
+ initialization_timeout: float = 60.0,
349
357
  ) -> None:
350
358
  """Initialize with HTTP Streamable transport with graceful headers handling."""
351
359
  if self._closed:
352
360
  raise RuntimeError("Cannot initialize a closed StreamManager")
353
361
 
362
+ logger.debug(f"initialize_with_http_streamable: initialization_timeout={initialization_timeout}")
363
+
354
364
  async with self._lock:
355
365
  self.server_names = server_names or {}
356
366
 
@@ -377,13 +387,22 @@ class StreamManager:
377
387
 
378
388
  transport = HTTPStreamableTransport(**transport_params)
379
389
 
380
- if not await asyncio.wait_for(transport.initialize(), timeout=connection_timeout):
381
- logger.error("Failed to init HTTP Streamable %s", name)
390
+ logger.debug(f"Calling transport.initialize() for {name} with timeout={initialization_timeout}s")
391
+ try:
392
+ if not await asyncio.wait_for(transport.initialize(), timeout=initialization_timeout):
393
+ logger.error("Failed to init HTTP Streamable %s", name)
394
+ continue
395
+ except TimeoutError:
396
+ logger.error(
397
+ "Timeout initialising HTTP Streamable %s (timeout=%ss)", name, initialization_timeout
398
+ )
382
399
  continue
400
+ logger.debug(f"Successfully initialized {name}")
383
401
 
384
402
  self.transports[name] = transport
385
- status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=5.0) else "Down"
386
- tools = await asyncio.wait_for(transport.get_tools(), timeout=10.0)
403
+ # Use longer timeouts for slow servers (ping can take time after initialization)
404
+ status = "Up" if await asyncio.wait_for(transport.send_ping(), timeout=30.0) else "Down"
405
+ tools = await asyncio.wait_for(transport.get_tools(), timeout=30.0)
387
406
 
388
407
  for t in tools:
389
408
  tname = t.get("name")
@@ -200,7 +200,8 @@ class StdioTransport(MCPBaseTransport):
200
200
  # Enhanced health verification (like SSE)
201
201
  logger.debug("Verifying connection with ping...")
202
202
  ping_start = time.time()
203
- ping_success = await asyncio.wait_for(send_ping(*self._streams), timeout=10.0)
203
+ # Use longer timeout for slow servers
204
+ ping_success = await asyncio.wait_for(send_ping(*self._streams), timeout=30.0)
204
205
  ping_time = time.time() - ping_start
205
206
 
206
207
  if ping_success:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chuk-tool-processor
3
- Version: 0.6.17
3
+ Version: 0.6.19
4
4
  Summary: Async-native framework for registering, discovering, and executing tools referenced in LLM responses
5
5
  Author-email: CHUK Team <chrishayuk@somejunkmailbox.com>
6
6
  Maintainer-email: CHUK Team <chrishayuk@somejunkmailbox.com>
@@ -20,7 +20,7 @@ Classifier: Framework :: AsyncIO
20
20
  Classifier: Typing :: Typed
21
21
  Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: chuk-mcp>=0.5.3
23
+ Requires-Dist: chuk-mcp>=0.5.4
24
24
  Requires-Dist: dotenv>=0.9.9
25
25
  Requires-Dist: psutil>=7.0.0
26
26
  Requires-Dist: pydantic>=2.11.3
@@ -1,4 +1,4 @@
1
- chuk-mcp>=0.5.3
1
+ chuk-mcp>=0.5.4
2
2
  dotenv>=0.9.9
3
3
  psutil>=7.0.0
4
4
  pydantic>=2.11.3