ask-web-fetch-mcp 0.6.8 → 0.7.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e251ef67fddb05e237d910c336a4fbfc58fe5d6c18ae3edcd32986ff8a5601e
4
- data.tar.gz: dcee122644c6264a54b9cf5129960a5698af95b7a3ca2425d2bd6285bd1d0014
3
+ metadata.gz: c93ebb268775dc96095fee1f9843e8dadabd8a8ecf5b4945d29d35ad4ef2479e
4
+ data.tar.gz: 8e2952f51b68d0274b1a9b6cdbe54cb4355bfe401c15116d630d7cf5d73e47e9
5
5
  SHA512:
6
- metadata.gz: 9cbf769e93940fb885c002fe19408b11323c9c6f954dd90d2aa1c83cb6ed0682f7bf53ab3eb76ead04e6f9e9ecfd356ba4f655f50eece6d2a90f6bcaf817118b
7
- data.tar.gz: 2af9127603559c89ba8401407aa3a092747381ff65073ba53cea330e246f8b3bfc0fed0341df237dc0a820ae36d2a5b49767f5bd36d7785d973b67b5ec6f628d
6
+ metadata.gz: aa93bb7fcc44565dcd2916dce258c8af427d4f1d5868b8d19bcaf5e3dc2a53f5b038b925b65ce017ae9faca391bbecc70885d9b056542a8d738eea12673fbe4b
7
+ data.tar.gz: 50ad953f99c9e4611dec53e821188d3bfd2eff785444cc90dbbed536372e8486b3df1afa9a678fe080e5c6abf90093035b50f89e7e03a75e4b7804f613878688
data/CHANGELOG.md CHANGED
@@ -1,10 +1,20 @@
1
- ## [0.6.7] — 2026-09-09
1
+ ## [0.7.0] — 2026-09-09
2
2
 
3
3
  ### Changed
4
4
 
5
- - Depends on `ask-web-fetch >= 0.7.5` for structured error classes,
6
- HTTP status codes on errors, 404 content extraction, agent-native
7
- content negotiation, and Turnstile false-positive fix.
5
+ - **Errors are returned as formatted strings, not raised.** The MCP tool
6
+ now catches `Ask::WebFetch::Error` and returns a formatted error string
7
+ with class, message, and hint — so the agent gets our gem's diagnostics
8
+ instead of ZCode's generic "Request timed out" when the fetch takes
9
+ longer than the transport timeout.
10
+
11
+ ## [0.6.8] — 2026-09-09
12
+
13
+ ### Changed
14
+
15
+ - Depends on `ask-web-fetch >= 0.7.6` for error hints, structured error
16
+ classes with HTTP status, 404 content extraction, agent-native content
17
+ negotiation, and Turnstile false-positive fix.
8
18
 
9
19
  ## [0.6.0] — 2026-08-12
10
20
 
@@ -32,10 +32,9 @@ module Ask
32
32
  end
33
33
 
34
34
  # Returns the fetched markdown (a String is a success for the
35
- # adapter) or raises. The terminal verdicts — ParkedDomainError,
36
- # EmptyContentError, FetchError — reach the client as their class,
37
- # so it never retries the unretryable; transient failures raise
38
- # the base Error.
35
+ # adapter). On failure, returns a formatted error string with the
36
+ # error class, message, and hint — so the agent gets our gem's
37
+ # diagnostics instead of ZCode's generic timeout.
39
38
  def call(args)
40
39
  extra = args.keys.map(&:to_s) - params_schema['properties'].keys
41
40
  unless extra.empty?
@@ -48,6 +47,16 @@ module Ask
48
47
 
49
48
  max_chars = args['max_chars']
50
49
  Ask::WebFetch.fetch(url, max_chars: max_chars || Ask::WebFetch::DEFAULT_MAX_CHARS)
50
+ rescue Ask::WebFetch::Error => e
51
+ format_error(e)
52
+ end
53
+
54
+ private
55
+
56
+ def format_error(e)
57
+ parts = ["Error: #{e.class.name.split('::').last}: #{e.message}"]
58
+ parts << "Hint: #{e.hint}" if e.respond_to?(:hint) && e.hint
59
+ parts.join("\n")
51
60
  end
52
61
  end
53
62
  end
@@ -3,7 +3,7 @@
3
3
  module Ask
4
4
  module WebFetch
5
5
  module MCP
6
- VERSION = '0.6.8'
6
+ VERSION = '0.7.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask-web-fetch-mcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaka Ruto
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.7.5
32
+ version: 0.7.6
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 0.7.5
39
+ version: 0.7.6
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: minitest
42
42
  requirement: !ruby/object:Gem::Requirement