Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.30.0"
".": "1.31.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 25
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-8f6bc62256b5a4aa44e82389bfefee1d73172856c407567bba11a82fd4203641.yml
openapi_spec_hash: 8b7230de56ecbec4712fa1e81067a75c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-5a8e1f6e16ecdbab4b2ff14701779818fe0328b06a1c7fa44a32da4f4bc87a49.yml
openapi_spec_hash: 4b5407859d1154232189ef440b783b17
config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.31.0 (2026-06-08)

Full Changelog: [v1.30.0...v1.31.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.30.0...v1.31.0)

### Features

* **api:** api update ([2170040](https://github.com/context-dot-dev/context-ruby-sdk/commit/2170040142dab272a55f903f0d062b0d36d751aa))
* **api:** api update ([c57bae4](https://github.com/context-dot-dev/context-ruby-sdk/commit/c57bae40d99770e18c92d402eb71dc0aa651f522))

## 1.30.0 (2026-06-07)

Full Changelog: [v1.29.0...v1.30.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.29.0...v1.30.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
context.dev (1.30.0)
context.dev (1.31.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "context.dev", "~> 1.30.0"
gem "context.dev", "~> 1.31.0"
```

<!-- x-release-please-end -->
Expand Down
5 changes: 3 additions & 2 deletions lib/context_dev/models/web_extract_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class WebExtractParams < ContextDev::Internal::Type::BaseModel
optional :pdf, -> { ContextDev::WebExtractParams::Pdf }

# @!attribute stop_after_ms
# Soft time budget for the crawl in milliseconds.
# Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
# (110s). Default: 80000 (80s).
#
# @return [Integer, nil]
optional :stop_after_ms, Integer, api_name: :stopAfterMs
Expand Down Expand Up @@ -105,7 +106,7 @@ class WebExtractParams < ContextDev::Internal::Type::BaseModel
#
# @param pdf [ContextDev::Models::WebExtractParams::Pdf]
#
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds.
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
Expand Down
4 changes: 2 additions & 2 deletions lib/context_dev/models/web_web_crawl_md_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @!attribute stop_after_ms
# Soft time budget for the crawl in milliseconds. After each scrape, the crawler
# checks the elapsed time and, if exceeded, returns the pages collected so far
# instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
# min).
# instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
# (80s).
#
# @return [Integer, nil]
optional :stop_after_ms, Integer, api_name: :stopAfterMs
Expand Down
11 changes: 10 additions & 1 deletion lib/context_dev/models/web_web_scrape_html_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,21 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!attribute use_main_content_only
# When true, return only the page's main content in the HTML response, excluding
# headers, footers, sidebars, and navigation when detectable.
#
# @return [Boolean, nil]
optional :use_main_content_only, ContextDev::Internal::Type::Boolean

# @!attribute wait_for_ms
# Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
# 30000 (30 seconds).
#
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!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: {})
# @!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: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
#
Expand All @@ -93,6 +100,8 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
Expand Down
7 changes: 5 additions & 2 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Web
#
# @param pdf [ContextDev::Models::WebExtractParams::Pdf]
#
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds.
# @param stop_after_ms [Integer] Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000 (1
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
Expand Down Expand Up @@ -303,7 +303,7 @@ def web_crawl_md(params)
#
# Scrapes the given URL and returns the raw HTML content of the page.
#
# @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: {})
# @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: {})
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
Expand All @@ -321,6 +321,8 @@ def web_crawl_md(params)
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param use_main_content_only [Boolean] When true, return only the page's main content in the HTML response, excluding h
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
Expand All @@ -340,6 +342,7 @@ def web_scrape_html(params)
include_selectors: "includeSelectors",
max_age_ms: "maxAgeMs",
timeout_ms: "timeoutMS",
use_main_content_only: "useMainContentOnly",
wait_for_ms: "waitForMs"
),
model: ContextDev::Models::WebWebScrapeHTMLResponse,
Expand Down
2 changes: 1 addition & 1 deletion lib/context_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ContextDev
VERSION = "1.30.0"
VERSION = "1.31.0"
end
6 changes: 4 additions & 2 deletions rbi/context_dev/models/web_extract_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ module ContextDev
sig { params(pdf: ContextDev::WebExtractParams::Pdf::OrHash).void }
attr_writer :pdf

# Soft time budget for the crawl in milliseconds.
# Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
# (110s). Default: 80000 (80s).
sig { returns(T.nilable(Integer)) }
attr_reader :stop_after_ms

Expand Down Expand Up @@ -136,7 +137,8 @@ module ContextDev
# younger than this many milliseconds. Defaults to 7 days (604800000 ms).
max_age_ms: nil,
pdf: nil,
# Soft time budget for the crawl in milliseconds.
# Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
# (110s). Default: 80000 (80s).
stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand Down
8 changes: 4 additions & 4 deletions rbi/context_dev/models/web_web_crawl_md_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ module ContextDev

# Soft time budget for the crawl in milliseconds. After each scrape, the crawler
# checks the elapsed time and, if exceeded, returns the pages collected so far
# instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
# min).
# instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
# (80s).
sig { returns(T.nilable(Integer)) }
attr_reader :stop_after_ms

Expand Down Expand Up @@ -205,8 +205,8 @@ module ContextDev
shorten_base64_images: nil,
# Soft time budget for the crawl in milliseconds. After each scrape, the crawler
# checks the elapsed time and, if exceeded, returns the pages collected so far
# instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
# min).
# instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
# (80s).
stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand Down
13 changes: 13 additions & 0 deletions rbi/context_dev/models/web_web_scrape_html_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ module ContextDev
sig { params(timeout_ms: Integer).void }
attr_writer :timeout_ms

# When true, return only the page's main content in the HTML response, excluding
# headers, footers, sidebars, and navigation when detectable.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :use_main_content_only

sig { params(use_main_content_only: T::Boolean).void }
attr_writer :use_main_content_only

# Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
# 30000 (30 seconds).
sig { returns(T.nilable(Integer)) }
Expand All @@ -96,6 +104,7 @@ module ContextDev
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(T.attached_class)
Expand Down Expand Up @@ -128,6 +137,9 @@ module ContextDev
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
timeout_ms: nil,
# When true, return only the page's main content in the HTML response, excluding
# headers, footers, sidebars, and navigation when detectable.
use_main_content_only: nil,
# Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
# 30000 (30 seconds).
wait_for_ms: nil,
Expand All @@ -146,6 +158,7 @@ module ContextDev
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
11 changes: 8 additions & 3 deletions rbi/context_dev/resources/web.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module ContextDev
# younger than this many milliseconds. Defaults to 7 days (604800000 ms).
max_age_ms: nil,
pdf: nil,
# Soft time budget for the crawl in milliseconds.
# Soft time budget for the crawl in milliseconds. Min: 10000 (10s). Max: 110000
# (110s). Default: 80000 (80s).
stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand Down Expand Up @@ -308,8 +309,8 @@ module ContextDev
shorten_base64_images: nil,
# Soft time budget for the crawl in milliseconds. After each scrape, the crawler
# checks the elapsed time and, if exceeded, returns the pages collected so far
# instead of continuing. Min: 10000 (10s). Max: 240000 (4 min). Default: 120000 (2
# min).
# instead of continuing. Min: 10000 (10s). Max: 110000 (110s). Default: 80000
# (80s).
stop_after_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand Down Expand Up @@ -338,6 +339,7 @@ module ContextDev
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
timeout_ms: Integer,
use_main_content_only: T::Boolean,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(ContextDev::Models::WebWebScrapeHTMLResponse)
Expand Down Expand Up @@ -370,6 +372,9 @@ module ContextDev
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
timeout_ms: nil,
# When true, return only the page's main content in the HTML response, excluding
# headers, footers, sidebars, and navigation when detectable.
use_main_content_only: nil,
# Optional browser wait time in milliseconds after initial page load. Min: 0. Max:
# 30000 (30 seconds).
wait_for_ms: nil,
Expand Down
7 changes: 7 additions & 0 deletions sig/context_dev/models/web_web_scrape_html_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module ContextDev
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
use_main_content_only: bool,
wait_for_ms: Integer
}
& ContextDev::Internal::Type::request_parameters
Expand Down Expand Up @@ -50,6 +51,10 @@ module ContextDev

def timeout_ms=: (Integer) -> Integer

attr_reader use_main_content_only: bool?

def use_main_content_only=: (bool) -> bool

attr_reader wait_for_ms: Integer?

def wait_for_ms=: (Integer) -> Integer
Expand All @@ -63,6 +68,7 @@ module ContextDev
?max_age_ms: Integer,
?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
?timeout_ms: Integer,
?use_main_content_only: bool,
?wait_for_ms: Integer,
?request_options: ContextDev::request_opts
) -> void
Expand All @@ -76,6 +82,7 @@ module ContextDev
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
timeout_ms: Integer,
use_main_content_only: bool,
wait_for_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
1 change: 1 addition & 0 deletions sig/context_dev/resources/web.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ module ContextDev
?max_age_ms: Integer,
?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
?timeout_ms: Integer,
?use_main_content_only: bool,
?wait_for_ms: Integer,
?request_options: ContextDev::request_opts
) -> ContextDev::Models::WebWebScrapeHTMLResponse
Expand Down
Loading