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.27.0"
".": "1.28.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-30ba67603321f69c2ba0432320c45caa4727ebbe353bea8874c9e7db8b95b09e.yml
openapi_spec_hash: 7dc1fadcec32637e795f641a0e97c63e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-9575a58bf027da9ca006bf34d9e24850ef2bbc6de0459b9fff6f26cf62e1d82d.yml
openapi_spec_hash: e68a98dbc0e29b45c42b3517eb554e6c
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.28.0 (2026-06-06)

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

### Features

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

## 1.27.0 (2026-06-01)

Full Changelog: [v1.26.0...v1.27.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.26.0...v1.27.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.27.0)
context.dev (1.28.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.27.0"
gem "context.dev", "~> 1.28.0"
```

<!-- x-release-please-end -->
Expand Down
12 changes: 11 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 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
# is bypassed: the result is neither read from nor written to cache.
#
# @return [Hash{Symbol=>String}, nil]
optional :headers, ContextDev::Internal::Type::HashOf[String]

# @!attribute include_frames
# When true, iframes are rendered inline into the returned HTML.
#
Expand Down Expand Up @@ -49,12 +57,14 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(url:, include_frames: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# @!method initialize(url:, headers: nil, include_frames: 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 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 max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
Expand Down
12 changes: 11 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 @@ -20,6 +20,14 @@ class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel
# @return [ContextDev::Models::WebWebScrapeImagesParams::Enrichment, nil]
optional :enrichment, -> { ContextDev::WebWebScrapeImagesParams::Enrichment }

# @!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
# is bypassed: the result is neither read from nor written to cache.
#
# @return [Hash{Symbol=>String}, nil]
optional :headers, ContextDev::Internal::Type::HashOf[String]

# @!attribute max_age_ms
# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
Expand All @@ -42,14 +50,16 @@ class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel
# @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: {})
# @!method initialize(url:, enrichment: nil, headers: 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.
#
# @param url [String] Page URL to inspect. Must include http:// or https://.
#
# @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @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
Expand Down
12 changes: 11 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 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
# is bypassed: the result is neither read from nor written to cache.
#
# @return [Hash{Symbol=>String}, nil]
optional :headers, ContextDev::Internal::Type::HashOf[String]

# @!attribute include_frames
# When true, the contents of iframes are rendered to Markdown.
#
Expand Down Expand Up @@ -75,12 +83,14 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :wait_for_ms, Integer

# @!method initialize(url:, 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:, 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: {})
# 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 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.
#
# @param include_images [Boolean] Include image references in Markdown output
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 @@ -13,6 +13,14 @@ class WebWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :domain, 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
# is bypassed: the result is neither read from nor written to cache.
#
# @return [Hash{Symbol=>String}, nil]
optional :headers, ContextDev::Internal::Type::HashOf[String]

# @!attribute max_links
# Maximum number of links to return from the sitemap crawl. Defaults to 10,000.
# Minimum is 1, maximum is 100,000.
Expand All @@ -35,12 +43,14 @@ class WebWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
# @return [String, nil]
optional :url_regex, String

# @!method initialize(domain:, max_links: nil, timeout_ms: nil, url_regex: nil, request_options: {})
# @!method initialize(domain:, headers: nil, 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 headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @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
Expand Down
16 changes: 12 additions & 4 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,12 @@ def web_crawl_md(params)
#
# Scrapes the given URL and returns the raw HTML content of the page.
#
# @overload web_scrape_html(url:, include_frames: nil, max_age_ms: nil, pdf: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# @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: {})
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
# @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 max_age_ms [Integer] Return a cached result if a prior scrape for the same parameters exists and is y
Expand Down Expand Up @@ -343,12 +345,14 @@ def web_scrape_html(params)
# embeds. The base request costs 1 credit. When enrichment is enabled, the entire
# call costs 5 credits.
#
# @overload web_scrape_images(url:, enrichment: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
# @overload web_scrape_images(url:, enrichment: nil, headers: nil, max_age_ms: nil, timeout_ms: nil, wait_for_ms: nil, request_options: {})
#
# @param url [String] Page URL to inspect. Must include http:// or https://.
#
# @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @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
Expand Down Expand Up @@ -381,10 +385,12 @@ def web_scrape_images(params)
#
# Scrapes the given URL into LLM usable Markdown.
#
# @overload web_scrape_md(url:, 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:, 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: {})
#
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
#
# @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.
#
# @param include_images [Boolean] Include image references in Markdown output
Expand Down Expand Up @@ -434,10 +440,12 @@ def web_scrape_md(params)
#
# Crawl an entire website's sitemap and return all discovered page URLs.
#
# @overload web_scrape_sitemap(domain:, max_links: nil, timeout_ms: nil, url_regex: nil, request_options: {})
# @overload web_scrape_sitemap(domain:, headers: nil, max_links: nil, timeout_ms: nil, url_regex: nil, request_options: {})
#
# @param domain [String] Domain to build a sitemap for
#
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers forwarded only to the target URL, sent as deep-ob
#
# @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
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.27.0"
VERSION = "1.28.0"
end
15 changes: 15 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 @@ -18,6 +18,15 @@ module ContextDev
sig { returns(String) }
attr_accessor :url

# 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
# is bypassed: the result is neither read from nor written to cache.
sig { returns(T.nilable(T::Hash[Symbol, String])) }
attr_reader :headers

sig { params(headers: T::Hash[Symbol, String]).void }
attr_writer :headers

# When true, iframes are rendered inline into the returned HTML.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_frames
Expand Down Expand Up @@ -62,6 +71,7 @@ module ContextDev
sig do
params(
url: String,
headers: T::Hash[Symbol, String],
include_frames: T::Boolean,
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf::OrHash,
Expand All @@ -73,6 +83,10 @@ module ContextDev
def self.new(
# Full URL to scrape (must include http:// or https:// protocol)
url:,
# 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
# is bypassed: the result is neither read from nor written to cache.
headers: nil,
# When true, iframes are rendered inline into the returned HTML.
include_frames: nil,
# Return a cached result if a prior scrape for the same parameters exists and is
Expand All @@ -97,6 +111,7 @@ module ContextDev
override.returns(
{
url: String,
headers: T::Hash[Symbol, String],
include_frames: T::Boolean,
max_age_ms: Integer,
pdf: ContextDev::WebWebScrapeHTMLParams::Pdf,
Expand Down
15 changes: 15 additions & 0 deletions rbi/context_dev/models/web_web_scrape_images_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ module ContextDev
end
attr_writer :enrichment

# 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
# is bypassed: the result is neither read from nor written to cache.
sig { returns(T.nilable(T::Hash[Symbol, String])) }
attr_reader :headers

sig { params(headers: T::Hash[Symbol, String]).void }
attr_writer :headers

# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
sig { returns(T.nilable(Integer)) }
Expand Down Expand Up @@ -61,6 +70,7 @@ module ContextDev
params(
url: String,
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment::OrHash,
headers: T::Hash[Symbol, String],
max_age_ms: Integer,
timeout_ms: Integer,
wait_for_ms: Integer,
Expand All @@ -73,6 +83,10 @@ module ContextDev
# Optional per-image processing, sent as deep-object query params such as
# enrichment[resolution]=true.
enrichment: nil,
# 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
# is bypassed: the result is neither read from nor written to cache.
headers: nil,
# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
max_age_ms: nil,
Expand All @@ -92,6 +106,7 @@ module ContextDev
{
url: String,
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
headers: T::Hash[Symbol, String],
max_age_ms: Integer,
timeout_ms: Integer,
wait_for_ms: Integer,
Expand Down
15 changes: 15 additions & 0 deletions rbi/context_dev/models/web_web_scrape_md_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ module ContextDev
sig { returns(String) }
attr_accessor :url

# 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
# is bypassed: the result is neither read from nor written to cache.
sig { returns(T.nilable(T::Hash[Symbol, String])) }
attr_reader :headers

sig { params(headers: T::Hash[Symbol, String]).void }
attr_writer :headers

# When true, the contents of iframes are rendered to Markdown.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_frames
Expand Down Expand Up @@ -89,6 +98,7 @@ module ContextDev
sig do
params(
url: String,
headers: T::Hash[Symbol, String],
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
Expand All @@ -105,6 +115,10 @@ module ContextDev
# Full URL to scrape into LLM usable Markdown (must include http:// or https://
# protocol)
url:,
# 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
# is bypassed: the result is neither read from nor written to cache.
headers: nil,
# When true, the contents of iframes are rendered to Markdown.
include_frames: nil,
# Include image references in Markdown output
Expand Down Expand Up @@ -138,6 +152,7 @@ module ContextDev
override.returns(
{
url: String,
headers: T::Hash[Symbol, String],
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
Expand Down
Loading
Loading