context.dev 1.30.0 → 1.31.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: 074be977167979846299e7e3c6eb549b3ae6ac29e1c928aec4d692111250c305
4
- data.tar.gz: c6837a38aea2ae93f3faf15d835e845d5333332fc188bf92ccfa999134d33cfc
3
+ metadata.gz: 113f1babdb07592f8be5f9e71e90c91dbb71e247c23d4c8607ab3e41454d0134
4
+ data.tar.gz: 3d360daae866082593f3bd1c96aca5e8344a47ea8ba6b1d0d3a25f5caa8ce65c
5
5
  SHA512:
6
- metadata.gz: 867c490615c21f264743296a01d0038280546f75eac1c7bf8355c6c32bf6fb2cf24312b66336d02298bb284db9015dd98cb9e3d1f11a588c4fd72989a8123549
7
- data.tar.gz: 228294367be4138af290bfe6d0775f9266c019b4c739121f6464ad19a8998ffcb34b3b6dc377edcac4acb7a17368f211066c5499f49bd6b416c9399f15963906
6
+ metadata.gz: 5482ddcb84ae21fa52f1b15af283d0a9106674c9a59403183d6496d3c1d125fb070e926246ee9348b1848eff0c9859f8e26496e61e24c9198a0e0afcc6f0f204
7
+ data.tar.gz: 047b20f851d1d4af45eb23986823e664a2bdcf08bffd470f519367806328ecb8a27635d3fd1e9a5a724129b05bad8242b9d6f51d0ee80391fc5adea0ff567b1e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.31.0 (2026-06-08)
4
+
5
+ Full Changelog: [v1.30.0...v1.31.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.30.0...v1.31.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([2170040](https://github.com/context-dot-dev/context-ruby-sdk/commit/2170040142dab272a55f903f0d062b0d36d751aa))
10
+ * **api:** api update ([c57bae4](https://github.com/context-dot-dev/context-ruby-sdk/commit/c57bae40d99770e18c92d402eb71dc0aa651f522))
11
+
3
12
  ## 1.30.0 (2026-06-07)
4
13
 
5
14
  Full Changelog: [v1.29.0...v1.30.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.29.0...v1.30.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "context.dev", "~> 1.30.0"
29
+ gem "context.dev", "~> 1.31.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -65,7 +65,8 @@ module ContextDev
65
65
  optional :pdf, -> { ContextDev::WebExtractParams::Pdf }
66
66
 
67
67
  # @!attribute stop_after_ms
68
- # Soft time budget for the crawl in milliseconds.
68
+ # Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
69
+ # (110s). Default: 80000 (80s).
69
70
  #
70
71
  # @return [Integer, nil]
71
72
  optional :stop_after_ms, Integer, api_name: :stopAfterMs
@@ -105,7 +106,7 @@ module ContextDev
105
106
  #
106
107
  # @param pdf [ContextDev::Models::WebExtractParams::Pdf]
107
108
  #
108
- # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds.
109
+ # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
109
110
  #
110
111
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
111
112
  #
@@ -93,8 +93,8 @@ module ContextDev
93
93
  # @!attribute stop_after_ms
94
94
  # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
95
95
  # checks the elapsed time and, if exceeded, returns the pages collected so far
96
- # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
97
- # min).
96
+ # instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
97
+ # (80s).
98
98
  #
99
99
  # @return [Integer, nil]
100
100
  optional :stop_after_ms, Integer, api_name: :stopAfterMs
@@ -66,6 +66,13 @@ module ContextDev
66
66
  # @return [Integer, nil]
67
67
  optional :timeout_ms, Integer
68
68
 
69
+ # @!attribute use_main_content_only
70
+ # When true, return only the page's main content in the HTML response, excluding
71
+ # headers, footers, sidebars, and navigation when detectable.
72
+ #
73
+ # @return [Boolean, nil]
74
+ optional :use_main_content_only, ContextDev::Internal::Type::Boolean
75
+
69
76
  # @!attribute wait_for_ms
70
77
  # Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
71
78
  # 30000 (30 seconds).
@@ -73,7 +80,7 @@ module ContextDev
73
80
  # @return [Integer, nil]
74
81
  optional :wait_for_ms, Integer
75
82
 
76
- # @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
83
+ # @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
77
84
  # Some parameter documentations has been truncated, see
78
85
  # {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
79
86
  #
@@ -93,6 +100,8 @@ module ContextDev
93
100
  #
94
101
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
95
102
  #
103
+ # @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
104
+ #
96
105
  # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
97
106
  #
98
107
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
@@ -27,7 +27,7 @@ module ContextDev
27
27
  #
28
28
  # @param pdf [ContextDev::Models::WebExtractParams::Pdf]
29
29
  #
30
- # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds.
30
+ # @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
31
31
  #
32
32
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
33
33
  #
@@ -303,7 +303,7 @@ module ContextDev
303
303
  #
304
304
  # Scrapes the given URL and returns the raw HTML content of the page.
305
305
  #
306
- # @overload web_scrape_html(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
306
+ # @overload web_scrape_html(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
307
307
  #
308
308
  # @param url [String] Full URL to scrape (must include http:// or https:// protocol)
309
309
  #
@@ -321,6 +321,8 @@ module ContextDev
321
321
  #
322
322
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
323
323
  #
324
+ # @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
325
+ #
324
326
  # @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
325
327
  #
326
328
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -340,6 +342,7 @@ module ContextDev
340
342
  include_selectors: "includeSelectors",
341
343
  max_age_ms: "maxAgeMs",
342
344
  timeout_ms: "timeoutMS",
345
+ use_main_content_only: "useMainContentOnly",
343
346
  wait_for_ms: "waitForMs"
344
347
  ),
345
348
  model: ContextDev::Models::WebWebScrapeHTMLResponse,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "1.30.0"
4
+ VERSION = "1.31.0"
5
5
  end
@@ -70,7 +70,8 @@ module ContextDev
70
70
  sig { params(pdf: ContextDev::WebExtractParams::Pdf::OrHash).void }
71
71
  attr_writer :pdf
72
72
 
73
- # Soft time budget for the crawl in milliseconds.
73
+ # Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
74
+ # (110s). Default: 80000 (80s).
74
75
  sig { returns(T.nilable(Integer)) }
75
76
  attr_reader :stop_after_ms
76
77
 
@@ -136,7 +137,8 @@ module ContextDev
136
137
  # younger than this many milliseconds. Defaults to 7 days (604800000 ms).
137
138
  max_age_ms: nil,
138
139
  pdf: nil,
139
- # Soft time budget for the crawl in milliseconds.
140
+ # Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
141
+ # (110s). Default: 80000 (80s).
140
142
  stop_after_ms: nil,
141
143
  # Optional timeout in milliseconds for the request. If the request takes longer
142
144
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -105,8 +105,8 @@ module ContextDev
105
105
 
106
106
  # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
107
107
  # checks the elapsed time and, if exceeded, returns the pages collected so far
108
- # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
109
- # min).
108
+ # instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
109
+ # (80s).
110
110
  sig { returns(T.nilable(Integer)) }
111
111
  attr_reader :stop_after_ms
112
112
 
@@ -205,8 +205,8 @@ module ContextDev
205
205
  shorten_base64_images: nil,
206
206
  # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
207
207
  # checks the elapsed time and, if exceeded, returns the pages collected so far
208
- # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
209
- # min).
208
+ # instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
209
+ # (80s).
210
210
  stop_after_ms: nil,
211
211
  # Optional timeout in milliseconds for the request. If the request takes longer
212
212
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -78,6 +78,14 @@ module ContextDev
78
78
  sig { params(timeout_ms: Integer).void }
79
79
  attr_writer :timeout_ms
80
80
 
81
+ # When true, return only the page's main content in the HTML response, excluding
82
+ # headers, footers, sidebars, and navigation when detectable.
83
+ sig { returns(T.nilable(T::Boolean)) }
84
+ attr_reader :use_main_content_only
85
+
86
+ sig { params(use_main_content_only: T::Boolean).void }
87
+ attr_writer :use_main_content_only
88
+
81
89
  # Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
82
90
  # 30000 (30 seconds).
83
91
  sig { returns(T.nilable(Integer)) }
@@ -96,6 +104,7 @@ module ContextDev
96
104
  max_age_ms: Integer,
97
105
  pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
98
106
  timeout_ms: Integer,
107
+ use_main_content_only: T::Boolean,
99
108
  wait_for_ms: Integer,
100
109
  request_options: ContextDev::RequestOptions::OrHash
101
110
  ).returns(T.attached_class)
@@ -128,6 +137,9 @@ module ContextDev
128
137
  # than this value, it will be aborted with a 408 status code. Maximum allowed
129
138
  # value is 300000ms (5 minutes).
130
139
  timeout_ms: nil,
140
+ # When true, return only the page's main content in the HTML response, excluding
141
+ # headers, footers, sidebars, and navigation when detectable.
142
+ use_main_content_only: nil,
131
143
  # Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
132
144
  # 30000 (30 seconds).
133
145
  wait_for_ms: nil,
@@ -146,6 +158,7 @@ module ContextDev
146
158
  max_age_ms: Integer,
147
159
  pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
148
160
  timeout_ms: Integer,
161
+ use_main_content_only: T::Boolean,
149
162
  wait_for_ms: Integer,
150
163
  request_options: ContextDev::RequestOptions
151
164
  }
@@ -47,7 +47,8 @@ module ContextDev
47
47
  # younger than this many milliseconds. Defaults to 7 days (604800000 ms).
48
48
  max_age_ms: nil,
49
49
  pdf: nil,
50
- # Soft time budget for the crawl in milliseconds.
50
+ # Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
51
+ # (110s). Default: 80000 (80s).
51
52
  stop_after_ms: nil,
52
53
  # Optional timeout in milliseconds for the request. If the request takes longer
53
54
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -308,8 +309,8 @@ module ContextDev
308
309
  shorten_base64_images: nil,
309
310
  # Soft time budget for the crawl in milliseconds. After each scrape, the crawler
310
311
  # checks the elapsed time and, if exceeded, returns the pages collected so far
311
- # instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
312
- # min).
312
+ # instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
313
+ # (80s).
313
314
  stop_after_ms: nil,
314
315
  # Optional timeout in milliseconds for the request. If the request takes longer
315
316
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -338,6 +339,7 @@ module ContextDev
338
339
  max_age_ms: Integer,
339
340
  pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
340
341
  timeout_ms: Integer,
342
+ use_main_content_only: T::Boolean,
341
343
  wait_for_ms: Integer,
342
344
  request_options: ContextDev::RequestOptions::OrHash
343
345
  ).returns(ContextDev::Models::WebWebScrapeHTMLResponse)
@@ -370,6 +372,9 @@ module ContextDev
370
372
  # than this value, it will be aborted with a 408 status code. Maximum allowed
371
373
  # value is 300000ms (5 minutes).
372
374
  timeout_ms: nil,
375
+ # When true, return only the page's main content in the HTML response, excluding
376
+ # headers, footers, sidebars, and navigation when detectable.
377
+ use_main_content_only: nil,
373
378
  # Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
374
379
  # 30000 (30 seconds).
375
380
  wait_for_ms: nil,
@@ -10,6 +10,7 @@ module ContextDev
10
10
  max_age_ms: Integer,
11
11
  pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
12
12
  timeout_ms: Integer,
13
+ use_main_content_only: bool,
13
14
  wait_for_ms: Integer
14
15
  }
15
16
  & ContextDev::Internal::Type::request_parameters
@@ -50,6 +51,10 @@ module ContextDev
50
51
 
51
52
  def timeout_ms=: (Integer) -> Integer
52
53
 
54
+ attr_reader use_main_content_only: bool?
55
+
56
+ def use_main_content_only=: (bool) -> bool
57
+
53
58
  attr_reader wait_for_ms: Integer?
54
59
 
55
60
  def wait_for_ms=: (Integer) -> Integer
@@ -63,6 +68,7 @@ module ContextDev
63
68
  ?max_age_ms: Integer,
64
69
  ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
65
70
  ?timeout_ms: Integer,
71
+ ?use_main_content_only: bool,
66
72
  ?wait_for_ms: Integer,
67
73
  ?request_options: ContextDev::request_opts
68
74
  ) -> void
@@ -76,6 +82,7 @@ module ContextDev
76
82
  max_age_ms: Integer,
77
83
  pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
78
84
  timeout_ms: Integer,
85
+ use_main_content_only: bool,
79
86
  wait_for_ms: Integer,
80
87
  request_options: ContextDev::RequestOptions
81
88
  }
@@ -93,6 +93,7 @@ module ContextDev
93
93
  ?max_age_ms: Integer,
94
94
  ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
95
95
  ?timeout_ms: Integer,
96
+ ?use_main_content_only: bool,
96
97
  ?wait_for_ms: Integer,
97
98
  ?request_options: ContextDev::request_opts
98
99
  ) -> ContextDev::Models::WebWebScrapeHTMLResponse
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: context.dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.30.0
4
+ version: 1.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Context Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-07 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi