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.29.0"
".": "1.30.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-de0ba2ed18ec7265b0b20d9639b3da207dd33e354f0a856091902291c6661830.yml
openapi_spec_hash: ae25efc2ac6bcab54bc3f4efaab73a55
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-8f6bc62256b5a4aa44e82389bfefee1d73172856c407567bba11a82fd4203641.yml
openapi_spec_hash: 8b7230de56ecbec4712fa1e81067a75c
config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 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)

### Features

* **api:** api update ([c897bbf](https://github.com/context-dot-dev/context-ruby-sdk/commit/c897bbf03235960c8036bd808c5239b935d94bf3))

## 1.29.0 (2026-06-07)

Full Changelog: [v1.28.0...v1.29.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.28.0...v1.29.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.29.0)
context.dev (1.30.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.29.0"
gem "context.dev", "~> 1.30.0"
```

<!-- x-release-please-end -->
Expand Down
23 changes: 22 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 @@ -13,6 +13,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute exclude_selectors
# CSS selectors to remove before each crawled page is converted to Markdown.
# Applied after includeSelectors. Exclusion takes precedence: an element matching
# both is removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]".
#
# @return [Array<String>, nil]
optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String], api_name: :excludeSelectors

# @!attribute follow_subdomains
# When true, follow links on subdomains of the starting URL's domain (e.g.
# docs.example.com when starting from example.com). www and apex are always
Expand Down Expand Up @@ -40,6 +48,15 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :include_links, ContextDev::Internal::Type::Boolean, api_name: :includeLinks

# @!attribute include_selectors
# CSS selectors. When provided, only matching HTML subtrees (and their
# descendants) are kept before each crawled page is converted to Markdown. When
# omitted, the entire document is kept. Examples: "article.main", "#content",
# "[role=main]".
#
# @return [Array<String>, nil]
optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String], api_name: :includeSelectors

# @!attribute max_age_ms
# Return a cached result if a prior scrape for the same parameters exists and is
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
Expand Down Expand Up @@ -110,12 +127,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @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, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# @!method initialize(url:, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: 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.
#
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
#
# @param exclude_selectors [Array<String>] CSS selectors to remove before each crawled page is converted to Markdown. Appli
#
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
#
# @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown for each crawled pag
Expand All @@ -124,6 +143,8 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching HTML subtrees (and their descendants
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param max_depth [Integer] Maximum link depth from the starting URL (0 = only the starting page)
Expand Down
22 changes: 21 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 @@ -13,6 +13,14 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute exclude_selectors
# CSS selectors to remove from the result. Applied after includeSelectors.
# Exclusion takes precedence: an element matching both is removed. Examples:
# "nav", "footer", ".ad-banner", "[aria-hidden=true]".
#
# @return [Array<String>, nil]
optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]

# @!attribute headers
# Optional outbound HTTP headers forwarded only to the target URL, sent as
# deep-object query params such as headers[X-Custom]=value. When provided, caching
Expand All @@ -27,6 +35,14 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :include_frames, ContextDev::Internal::Type::Boolean

# @!attribute include_selectors
# CSS selectors. When provided, only matching subtrees (and their descendants) are
# kept and everything else is dropped. When omitted, the entire document is kept.
# Examples: "article.main", "#content", "[role=main]".
#
# @return [Array<String>, nil]
optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]

# @!attribute max_age_ms
# Return a cached result if a prior scrape for the same parameters exists and is
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
Expand Down Expand Up @@ -57,16 +73,20 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(url:, headers: nil, include_frames: 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, wait_for_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebWebScrapeHTMLParams} for more details.
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
# @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @param include_frames [Boolean] When true, iframes are rendered inline into the returned HTML.
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching subtrees (and their descendants) are
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
Expand Down
22 changes: 21 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 @@ -14,6 +14,14 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute exclude_selectors
# CSS selectors to remove before conversion to Markdown. Applied after
# includeSelectors. Exclusion takes precedence: an element matching both is
# removed. Examples: "nav", "footer", ".ad-banner", "[aria-hidden=true]".
#
# @return [Array<String>, nil]
optional :exclude_selectors, ContextDev::Internal::Type::ArrayOf[String]

# @!attribute headers
# Optional outbound HTTP headers forwarded only to the target URL, sent as
# deep-object query params such as headers[X-Custom]=value. When provided, caching
Expand All @@ -40,6 +48,14 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :include_links, ContextDev::Internal::Type::Boolean

# @!attribute include_selectors
# CSS selectors. When provided, only matching HTML subtrees (and their
# descendants) are kept before conversion to Markdown. When omitted, the entire
# document is kept. Examples: "article.main", "#content", "[role=main]".
#
# @return [Array<String>, nil]
optional :include_selectors, ContextDev::Internal::Type::ArrayOf[String]

# @!attribute max_age_ms
# Return a cached result if a prior scrape for the same parameters exists and is
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
Expand Down Expand Up @@ -83,12 +99,14 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(url:, headers: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# @!method initialize(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, 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.
#
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
#
# @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown.
Expand All @@ -97,6 +115,8 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
#
# @param include_links [Boolean] Preserve hyperlinks in Markdown output
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching HTML subtrees (and their descendants
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
Expand Down
22 changes: 19 additions & 3 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,12 @@ def search(params)
# Performs a crawl starting from a given URL, extracts page content as Markdown,
# and returns results for all crawled pages.
#
# @overload web_crawl_md(url:, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# @overload web_crawl_md(url:, exclude_selectors: nil, follow_subdomains: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, shorten_base64_images: nil, stop_after_ms: nil, timeout_ms: nil, url_regex: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
#
# @param exclude_selectors [Array<String>] CSS selectors to remove before each crawled page is converted to Markdown. Appli
#
# @param follow_subdomains [Boolean] When true, follow links on subdomains of the starting URL's domain (e.g. docs.ex
#
# @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown for each crawled pag
Expand All @@ -258,6 +260,8 @@ def search(params)
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching HTML subtrees (and their descendants
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param max_depth [Integer] Maximum link depth from the starting URL (0 = only the starting page)
Expand Down Expand Up @@ -299,14 +303,18 @@ def web_crawl_md(params)
#
# Scrapes the given URL and returns the raw HTML content of the page.
#
# @overload web_scrape_html(url:, headers: nil, include_frames: 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, wait_for_ms: nil, request_options: {})
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
# @param exclude_selectors [Array<String>] CSS selectors to remove from the result. Applied after includeSelectors. Exclusi
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @param include_frames [Boolean] When true, iframes are rendered inline into the returned HTML.
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching subtrees (and their descendants) are
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param pdf [ContextDev::Models::WebWebScrapeHTMLParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
Expand All @@ -327,7 +335,9 @@ def web_scrape_html(params)
method: :get,
path: "web/scrape/html",
query: query.transform_keys(
exclude_selectors: "excludeSelectors",
include_frames: "includeFrames",
include_selectors: "includeSelectors",
max_age_ms: "maxAgeMs",
timeout_ms: "timeoutMS",
wait_for_ms: "waitForMs"
Expand Down Expand Up @@ -385,10 +395,12 @@ def web_scrape_images(params)
#
# Scrapes the given URL into LLM usable Markdown.
#
# @overload web_scrape_md(url:, headers: nil, include_frames: nil, include_images: nil, include_links: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
# @overload web_scrape_md(url:, exclude_selectors: nil, headers: nil, include_frames: nil, include_images: nil, include_links: nil, include_selectors: nil, max_age_ms: nil, pdf: nil, shorten_base64_images: nil, timeout_ms: nil, use_main_content_only: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
#
# @param exclude_selectors [Array<String>] CSS selectors to remove before conversion to Markdown. Applied after includeSele
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown.
Expand All @@ -397,6 +409,8 @@ def web_scrape_images(params)
#
# @param include_links [Boolean] Preserve hyperlinks in Markdown output
#
# @param include_selectors [Array<String>] CSS selectors. When provided, only matching HTML subtrees (and their descendants
#
# @param max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
#
# @param pdf [ContextDev::Models::WebWebScrapeMdParams::Pdf] PDF parsing controls. Use start/end to limit text extraction and OCR to an inclu
Expand All @@ -421,9 +435,11 @@ def web_scrape_md(params)
method: :get,
path: "web/scrape/markdown",
query: query.transform_keys(
exclude_selectors: "excludeSelectors",
include_frames: "includeFrames",
include_images: "includeImages",
include_links: "includeLinks",
include_selectors: "includeSelectors",
max_age_ms: "maxAgeMs",
shorten_base64_images: "shortenBase64Images",
timeout_ms: "timeoutMS",
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.29.0"
VERSION = "1.30.0"
end
Loading
Loading