ruby_llm-mcp 0.5.1 → 0.6.1

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.
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RubyLLM
4
- module MCP
5
- module Transports
6
- module Timeout
7
- def with_timeout(seconds, request_id: nil)
8
- result = nil
9
- exception = nil
10
-
11
- worker = Thread.new do
12
- result = yield
13
- rescue StandardError => e
14
- exception = e
15
- end
16
-
17
- if worker.join(seconds)
18
- raise exception if exception
19
-
20
- result
21
- else
22
- worker.kill # stop the thread (can still have some risk if shared resources)
23
- raise RubyLLM::MCP::Errors::TimeoutError.new(
24
- message: "Request timed out after #{seconds} seconds",
25
- request_id: request_id
26
- )
27
- end
28
- end
29
- end
30
- end
31
- end
32
- end