chuk-tool-processor 0.6.18__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.
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/PKG-INFO +1 -1
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/pyproject.toml +1 -1
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_http_streamable.py +3 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_sse.py +3 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/setup_mcp_stdio.py +2 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/stream_manager.py +69 -50
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/stdio_transport.py +2 -1
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/PKG-INFO +1 -1
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/README.md +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/setup.cfg +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/exceptions.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/processor.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/inprocess_strategy.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/strategies/subprocess_strategy.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/tool_executor.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/caching.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/rate_limiting.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/execution/wrappers/retry.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/context.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/formatter.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/helpers.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/metrics.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/mcp_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/register_mcp_tools.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/base_transport.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/http_streamable_transport.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/transport/sse_transport.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/execution_strategy.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/streaming_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_call.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_export_mixin.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/tool_result.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/validated_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/discovery.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/base.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/function_call_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/json_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/openai_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/plugins/parsers/xml_tool.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/auto_register.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/decorators.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/interface.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/metadata.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/provider.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/providers/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/providers/memory.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/registry/tool_export.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/utils/__init__.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/utils/validation.py +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/SOURCES.txt +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/dependency_links.txt +0 -0
- {chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/requires.txt +0 -0
- {chuk_tool_processor-0.6.18 → 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.
|
|
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>
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "chuk-tool-processor"
|
|
7
|
-
version = "0.6.
|
|
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"
|
|
@@ -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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
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
|
-
|
|
245
|
-
|
|
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=
|
|
252
|
-
tools = await asyncio.wait_for(transport.get_tools(), timeout=
|
|
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
|
-
|
|
317
|
-
|
|
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
|
-
|
|
322
|
-
|
|
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
|
-
|
|
381
|
-
|
|
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
|
-
|
|
386
|
-
|
|
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
|
-
|
|
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:
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chuk-tool-processor
|
|
3
|
-
Version: 0.6.
|
|
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>
|
|
File without changes
|
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/__init__.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/__init__.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/exceptions.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/core/processor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/context.py
RENAMED
|
File without changes
|
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/helpers.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/logging/metrics.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/__init__.py
RENAMED
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/mcp/mcp_tool.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chuk_tool_processor-0.6.18 → chuk_tool_processor-0.6.19}/src/chuk_tool_processor/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|