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.16.0"
".": "1.17.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: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d880c25aee159e1260e23dfa3685b1bb9e35b02a1927adecbff32664ba8e11a4.yml
openapi_spec_hash: aa96a6030390bca0b4cdfa2363961807
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-18e7692e180f911962f33787228afa2cf31f6c05ab23c6afb1ca4f82b108fba5.yml
openapi_spec_hash: 865bd1e346267d1e33f8ca63963c6aa3
config_hash: 70354330f92ce169beabc98696ebb9a3
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.17.0 (2026-05-09)

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

### Features

* **api:** api update ([ae638b0](https://github.com/context-dot-dev/context-ruby-sdk/commit/ae638b04d0e08bf93e2cdd1211236d841d5313b1))
* **api:** api update ([8376344](https://github.com/context-dot-dev/context-ruby-sdk/commit/8376344a7a72a7ff01906bc3d6a5913a4de60bcb))

## 1.16.0 (2026-05-07)

Full Changelog: [v1.15.0...v1.16.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.15.0...v1.16.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.16.0)
context.dev (1.17.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.16.0"
gem "context.dev", "~> 1.17.0"
```

<!-- x-release-please-end -->
Expand Down
7 changes: 4 additions & 3 deletions lib/context_dev/models/ai_extract_product_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ class AIExtractProductParams < ContextDev::Internal::Type::BaseModel
optional :max_age_ms, Integer, api_name: :maxAgeMs

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS
Expand All @@ -36,7 +37,7 @@ class AIExtractProductParams < ContextDev::Internal::Type::BaseModel
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
end
Expand Down
14 changes: 8 additions & 6 deletions lib/context_dev/models/ai_extract_products_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ class ByDomain < ContextDev::Internal::Type::BaseModel
optional :max_products, Integer, api_name: :maxProducts

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS
Expand All @@ -61,7 +62,7 @@ class ByDomain < ContextDev::Internal::Type::BaseModel
#
# @param max_products [Integer] Maximum number of products to extract.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
end

class ByDirectURL < ContextDev::Internal::Type::BaseModel
Expand All @@ -87,8 +88,9 @@ class ByDirectURL < ContextDev::Internal::Type::BaseModel
optional :max_products, Integer, api_name: :maxProducts

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. Maximum allowed value is
# 300000ms (5 minutes).
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS
Expand All @@ -104,7 +106,7 @@ class ByDirectURL < ContextDev::Internal::Type::BaseModel
#
# @param max_products [Integer] Maximum number of products to extract.
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
end

# @!method self.variants
Expand Down
39 changes: 18 additions & 21 deletions lib/context_dev/models/web_screenshot_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,29 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
# @return [Symbol, ContextDev::Models::WebScreenshotParams::Page, nil]
optional :page, enum: -> { ContextDev::WebScreenshotParams::Page }

# @!attribute prioritize
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
# faster capture with basic quality. If 'quality', optimizes for higher quality
# with longer wait times. Defaults to 'quality' if not provided.
# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Symbol, ContextDev::Models::WebScreenshotParams::Prioritize, nil]
optional :prioritize, enum: -> { ContextDev::WebScreenshotParams::Prioritize }
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!attribute viewport
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
#
# @return [ContextDev::Models::WebScreenshotParams::Viewport, nil]
optional :viewport, -> { ContextDev::WebScreenshotParams::Viewport }

# @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, prioritize: nil, viewport: nil, request_options: {})
# @!attribute wait_for_ms
# Optional browser wait time in milliseconds after initial page load before taking
# the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
# omitted.
#
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, timeout_ms: nil, viewport: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebScreenshotParams} for more details.
#
Expand All @@ -77,10 +85,12 @@ class WebScreenshotParams < ContextDev::Internal::Type::BaseModel
#
# @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
#
# @param prioritize [Symbol, ContextDev::Models::WebScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before taking
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]

# Optional parameter to determine screenshot type. If 'true', takes a full page
Expand Down Expand Up @@ -117,19 +127,6 @@ module Page
# @return [Array<Symbol>]
end

# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
# faster capture with basic quality. If 'quality', optimizes for higher quality
# with longer wait times. Defaults to 'quality' if not provided.
module Prioritize
extend ContextDev::Internal::Type::Enum

SPEED = :speed
QUALITY = :quality

# @!method self.values
# @return [Array<Symbol>]
end

class Viewport < ContextDev::Internal::Type::BaseModel
# @!attribute height
# Viewport height in pixels.
Expand Down
21 changes: 20 additions & 1 deletion lib/context_dev/models/web_web_crawl_md_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :shorten_base64_images, ContextDev::Internal::Type::Boolean, api_name: :shortenBase64Images

# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer, api_name: :timeoutMS

# @!attribute url_regex
# Regex pattern. Only URLs matching this pattern will be followed and scraped.
#
Expand All @@ -87,7 +95,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :use_main_content_only, ContextDev::Internal::Type::Boolean, api_name: :useMainContentOnly

# @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, parse_pdf: nil, shorten_base64_images: nil, url_regex: nil, use_main_content_only: nil, request_options: {})
# @!attribute wait_for_ms
# Optional browser wait time in milliseconds after initial page load for each
# crawled page. Min: 0. Max: 30000 (30 seconds).
#
# @return [Integer, nil]
optional :wait_for_ms, Integer, api_name: :waitForMs

# @!method initialize(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebCrawlMdParams} for more details.
#
Expand All @@ -111,10 +126,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
#
# @param shorten_base64_images [Boolean] Truncate base64-encoded image data in the Markdown output
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param url_regex [String] Regex pattern. Only URLs matching this pattern will be followed and scraped.
#
# @param use_main_content_only [Boolean] Extract only the main content, stripping headers, footers, sidebars, and navigat
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
21 changes: 20 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 @@ -35,7 +35,22 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :parse_pdf, ContextDev::Internal::Type::Boolean

# @!method initialize(url:, include_frames: nil, max_age_ms: nil, parse_pdf: nil, request_options: {})
# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!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:, include_frames: nil, max_age_ms: nil, parse_pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
#
Expand All @@ -47,6 +62,10 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
#
# @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @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}]
end
end
Expand Down
21 changes: 20 additions & 1 deletion lib/context_dev/models/web_web_scrape_images_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_age_ms, Integer

# @!method initialize(url:, enrichment: nil, max_age_ms: nil, request_options: {})
# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer

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

# @!method initialize(url:, enrichment: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeImagesParams} for more details.
#
Expand All @@ -37,6 +52,10 @@ class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel
#
# @param max_age_ms [Integer] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before collec
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]

class Enrichment < ContextDev::Internal::Type::BaseModel
Expand Down
21 changes: 20 additions & 1 deletion lib/context_dev/models/web_web_scrape_md_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,29 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :shorten_base64_images, ContextDev::Internal::Type::Boolean

# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!attribute use_main_content_only
# Extract only the main content of the page, excluding headers, footers, sidebars,
# and navigation
#
# @return [Boolean, nil]
optional :use_main_content_only, ContextDev::Internal::Type::Boolean

# @!method initialize(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
# @!attribute wait_for_ms
# Optional browser wait time in milliseconds after initial page load before
# converting the page to Markdown. Min: 0. Max: 30000 (30 seconds).
#
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(url:, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeMdParams} for more details.
#
Expand All @@ -79,8 +94,12 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
#
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
#
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load before conver
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
12 changes: 11 additions & 1 deletion lib/context_dev/models/web_web_scrape_sitemap_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,31 @@ class WebWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_links, Integer

# @!attribute timeout_ms
# 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
# value is 300000ms (5 minutes).
#
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!attribute url_regex
# Optional RE2-compatible regex pattern. Only URLs matching this pattern are
# returned and counted against maxLinks.
#
# @return [String, nil]
optional :url_regex, String

# @!method initialize(domain:, max_links: nil, url_regex: nil, request_options: {})
# @!method initialize(domain:, max_links: nil, timeout_ms: nil, url_regex: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeSitemapParams} for more details.
#
# @param domain [String] Domain to build a sitemap for
#
# @param max_links [Integer] Maximum number of links to return from the sitemap crawl. Defaults to 10,000. Mi
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
Expand Down
2 changes: 1 addition & 1 deletion lib/context_dev/resources/ai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def ai_query(params)
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. Maximum allowed value is 30000
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
#
Expand Down
Loading
Loading