From e554e48cecd7749db2ec3210eba3c872060a0ee9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 10:44:50 +0000 Subject: [PATCH 1/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7e84f7a6..941e8835 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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-958f8baaf81f27791e9aa1c3fc4952fd86b259cfbdf4f2dde6061d6b02472eab.yml +openapi_spec_hash: 3011aaf3384c73715b26b84926886e46 config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From bd92709b2842021e2c120bccfea4561d87ec285f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:05:19 +0000 Subject: [PATCH 2/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 941e8835..27d854ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-958f8baaf81f27791e9aa1c3fc4952fd86b259cfbdf4f2dde6061d6b02472eab.yml -openapi_spec_hash: 3011aaf3384c73715b26b84926886e46 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-222e6df6441cd9739ea466ea233d64ffd6611f153d6a54c85c88155875a46f5b.yml +openapi_spec_hash: 01aad25b8ccb503e83214704e14054ae config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From 939bd659447cc991bde7c388e5a4bfc350e9f648 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:10:16 +0000 Subject: [PATCH 3/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 27d854ae..f3d77a19 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-222e6df6441cd9739ea466ea233d64ffd6611f153d6a54c85c88155875a46f5b.yml -openapi_spec_hash: 01aad25b8ccb503e83214704e14054ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-7e207f6740771ee8963aca651aab68d46b4883289688fc26306c20b532bed560.yml +openapi_spec_hash: f7e7276c171eeb428bdb16c42fc7bb9d config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From 9f2f5151075f1587e304587f7d24782f8304727c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 11:56:08 +0000 Subject: [PATCH 4/6] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f3d77a19..25623279 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-7e207f6740771ee8963aca651aab68d46b4883289688fc26306c20b532bed560.yml -openapi_spec_hash: f7e7276c171eeb428bdb16c42fc7bb9d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e101766776468a99be4ea6cb65eca390c2930a50708ec8e49a7210f3d1bee144.yml +openapi_spec_hash: 411df107cd6a9e03b051dca5540e4c96 config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c From 22eb08f65d1001052f1bd247a4d60e2680bb33ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:08:39 +0000 Subject: [PATCH 5/6] feat(api): api update --- .stats.yml | 4 ++-- .../models/web_web_scrape_html_params.rb | 12 ++++++++++- .../models/web_web_scrape_images_params.rb | 12 ++++++++++- .../models/web_web_scrape_md_params.rb | 12 ++++++++++- .../models/web_web_scrape_sitemap_params.rb | 12 ++++++++++- lib/context_dev/resources/web.rb | 16 +++++++++++---- .../models/web_web_scrape_html_params.rbi | 15 ++++++++++++++ .../models/web_web_scrape_images_params.rbi | 15 ++++++++++++++ .../models/web_web_scrape_md_params.rbi | 15 ++++++++++++++ .../models/web_web_scrape_sitemap_params.rbi | 15 ++++++++++++++ rbi/context_dev/resources/web.rbi | 20 +++++++++++++++++++ .../models/web_web_scrape_html_params.rbs | 7 +++++++ .../models/web_web_scrape_images_params.rbs | 7 +++++++ .../models/web_web_scrape_md_params.rbs | 7 +++++++ .../models/web_web_scrape_sitemap_params.rbs | 7 +++++++ sig/context_dev/resources/web.rbs | 4 ++++ 16 files changed, 170 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 25623279..132441d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 25 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-e101766776468a99be4ea6cb65eca390c2930a50708ec8e49a7210f3d1bee144.yml -openapi_spec_hash: 411df107cd6a9e03b051dca5540e4c96 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-9575a58bf027da9ca006bf34d9e24850ef2bbc6de0459b9fff6f26cf62e1d82d.yml +openapi_spec_hash: e68a98dbc0e29b45c42b3517eb554e6c config_hash: f86a4e06ae5ed725aa79d58d7a8dc27c diff --git a/lib/context_dev/models/web_web_scrape_html_params.rb b/lib/context_dev/models/web_web_scrape_html_params.rb index 1ea825a1..781f40be 100644 --- a/lib/context_dev/models/web_web_scrape_html_params.rb +++ b/lib/context_dev/models/web_web_scrape_html_params.rb @@ -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. # @@ -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 diff --git a/lib/context_dev/models/web_web_scrape_images_params.rb b/lib/context_dev/models/web_web_scrape_images_params.rb index 19ff0e25..93369385 100644 --- a/lib/context_dev/models/web_web_scrape_images_params.rb +++ b/lib/context_dev/models/web_web_scrape_images_params.rb @@ -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). @@ -42,7 +50,7 @@ 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. # @@ -50,6 +58,8 @@ class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel # # @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 diff --git a/lib/context_dev/models/web_web_scrape_md_params.rb b/lib/context_dev/models/web_web_scrape_md_params.rb index 98aa09d5..b899574c 100644 --- a/lib/context_dev/models/web_web_scrape_md_params.rb +++ b/lib/context_dev/models/web_web_scrape_md_params.rb @@ -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. # @@ -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 diff --git a/lib/context_dev/models/web_web_scrape_sitemap_params.rb b/lib/context_dev/models/web_web_scrape_sitemap_params.rb index ff3c91bc..c1f55578 100644 --- a/lib/context_dev/models/web_web_scrape_sitemap_params.rb +++ b/lib/context_dev/models/web_web_scrape_sitemap_params.rb @@ -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. @@ -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 diff --git a/lib/context_dev/resources/web.rb b/lib/context_dev/resources/web.rb index 2d7c70d6..1fb1dc3e 100644 --- a/lib/context_dev/resources/web.rb +++ b/lib/context_dev/resources/web.rb @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/rbi/context_dev/models/web_web_scrape_html_params.rbi b/rbi/context_dev/models/web_web_scrape_html_params.rbi index 1ada1fb6..c6273e37 100644 --- a/rbi/context_dev/models/web_web_scrape_html_params.rbi +++ b/rbi/context_dev/models/web_web_scrape_html_params.rbi @@ -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 @@ -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, @@ -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 @@ -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, diff --git a/rbi/context_dev/models/web_web_scrape_images_params.rbi b/rbi/context_dev/models/web_web_scrape_images_params.rbi index a5be0b21..bcf78e8b 100644 --- a/rbi/context_dev/models/web_web_scrape_images_params.rbi +++ b/rbi/context_dev/models/web_web_scrape_images_params.rbi @@ -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)) } @@ -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, @@ -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, @@ -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, diff --git a/rbi/context_dev/models/web_web_scrape_md_params.rbi b/rbi/context_dev/models/web_web_scrape_md_params.rbi index f47d4f0e..558e0469 100644 --- a/rbi/context_dev/models/web_web_scrape_md_params.rbi +++ b/rbi/context_dev/models/web_web_scrape_md_params.rbi @@ -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 @@ -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, @@ -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 @@ -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, diff --git a/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi b/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi index d71d0c53..2e8daf89 100644 --- a/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +++ b/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi @@ -18,6 +18,15 @@ module ContextDev sig { returns(String) } attr_accessor :domain + # 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 + # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. sig { returns(T.nilable(Integer)) } @@ -46,6 +55,7 @@ module ContextDev sig do params( domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, timeout_ms: Integer, url_regex: String, @@ -55,6 +65,10 @@ module ContextDev def self.new( # Domain to build a sitemap for domain:, + # 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, # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. max_links: nil, @@ -73,6 +87,7 @@ module ContextDev override.returns( { domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, timeout_ms: Integer, url_regex: String, diff --git a/rbi/context_dev/resources/web.rbi b/rbi/context_dev/resources/web.rbi index 67b456f0..759c66a7 100644 --- a/rbi/context_dev/resources/web.rbi +++ b/rbi/context_dev/resources/web.rbi @@ -320,6 +320,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, @@ -331,6 +332,10 @@ module ContextDev def web_scrape_html( # 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 @@ -359,6 +364,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, @@ -371,6 +377,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, @@ -389,6 +399,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, @@ -405,6 +416,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 @@ -438,6 +453,7 @@ module ContextDev sig do params( domain: String, + headers: T::Hash[Symbol, String], max_links: Integer, timeout_ms: Integer, url_regex: String, @@ -447,6 +463,10 @@ module ContextDev def web_scrape_sitemap( # Domain to build a sitemap for domain:, + # 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, # Maximum number of links to return from the sitemap crawl. Defaults to 10,000. # Minimum is 1, maximum is 100,000. max_links: nil, diff --git a/sig/context_dev/models/web_web_scrape_html_params.rbs b/sig/context_dev/models/web_web_scrape_html_params.rbs index 7de61db2..fdd0ca56 100644 --- a/sig/context_dev/models/web_web_scrape_html_params.rbs +++ b/sig/context_dev/models/web_web_scrape_html_params.rbs @@ -3,6 +3,7 @@ module ContextDev type web_web_scrape_html_params = { url: String, + headers: ::Hash[Symbol, String], include_frames: bool, max_age_ms: Integer, pdf: ContextDev::WebWebScrapeHTMLParams::Pdf, @@ -17,6 +18,10 @@ module ContextDev attr_accessor url: String + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + attr_reader include_frames: bool? def include_frames=: (bool) -> bool @@ -41,6 +46,7 @@ module ContextDev def initialize: ( url: String, + ?headers: ::Hash[Symbol, String], ?include_frames: bool, ?max_age_ms: Integer, ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf, @@ -51,6 +57,7 @@ module ContextDev def to_hash: -> { url: String, + headers: ::Hash[Symbol, String], include_frames: bool, max_age_ms: Integer, pdf: ContextDev::WebWebScrapeHTMLParams::Pdf, diff --git a/sig/context_dev/models/web_web_scrape_images_params.rbs b/sig/context_dev/models/web_web_scrape_images_params.rbs index acecf286..e40c7851 100644 --- a/sig/context_dev/models/web_web_scrape_images_params.rbs +++ b/sig/context_dev/models/web_web_scrape_images_params.rbs @@ -4,6 +4,7 @@ module ContextDev { url: String, enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment, + headers: ::Hash[Symbol, String], max_age_ms: Integer, timeout_ms: Integer, wait_for_ms: Integer @@ -22,6 +23,10 @@ module ContextDev ContextDev::WebWebScrapeImagesParams::Enrichment ) -> ContextDev::WebWebScrapeImagesParams::Enrichment + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + attr_reader max_age_ms: Integer? def max_age_ms=: (Integer) -> Integer @@ -37,6 +42,7 @@ module ContextDev def initialize: ( url: String, ?enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment, + ?headers: ::Hash[Symbol, String], ?max_age_ms: Integer, ?timeout_ms: Integer, ?wait_for_ms: Integer, @@ -46,6 +52,7 @@ module ContextDev def to_hash: -> { url: String, enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment, + headers: ::Hash[Symbol, String], max_age_ms: Integer, timeout_ms: Integer, wait_for_ms: Integer, diff --git a/sig/context_dev/models/web_web_scrape_md_params.rbs b/sig/context_dev/models/web_web_scrape_md_params.rbs index f1e893bd..b4f96dff 100644 --- a/sig/context_dev/models/web_web_scrape_md_params.rbs +++ b/sig/context_dev/models/web_web_scrape_md_params.rbs @@ -3,6 +3,7 @@ module ContextDev type web_web_scrape_md_params = { url: String, + headers: ::Hash[Symbol, String], include_frames: bool, include_images: bool, include_links: bool, @@ -21,6 +22,10 @@ module ContextDev attr_accessor url: String + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + attr_reader include_frames: bool? def include_frames=: (bool) -> bool @@ -61,6 +66,7 @@ module ContextDev def initialize: ( url: String, + ?headers: ::Hash[Symbol, String], ?include_frames: bool, ?include_images: bool, ?include_links: bool, @@ -75,6 +81,7 @@ module ContextDev def to_hash: -> { url: String, + headers: ::Hash[Symbol, String], include_frames: bool, include_images: bool, include_links: bool, diff --git a/sig/context_dev/models/web_web_scrape_sitemap_params.rbs b/sig/context_dev/models/web_web_scrape_sitemap_params.rbs index a01a1e20..2a365074 100644 --- a/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +++ b/sig/context_dev/models/web_web_scrape_sitemap_params.rbs @@ -3,6 +3,7 @@ module ContextDev type web_web_scrape_sitemap_params = { domain: String, + headers: ::Hash[Symbol, String], max_links: Integer, timeout_ms: Integer, url_regex: String @@ -15,6 +16,10 @@ module ContextDev attr_accessor domain: String + attr_reader headers: ::Hash[Symbol, String]? + + def headers=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String] + attr_reader max_links: Integer? def max_links=: (Integer) -> Integer @@ -29,6 +34,7 @@ module ContextDev def initialize: ( domain: String, + ?headers: ::Hash[Symbol, String], ?max_links: Integer, ?timeout_ms: Integer, ?url_regex: String, @@ -37,6 +43,7 @@ module ContextDev def to_hash: -> { domain: String, + headers: ::Hash[Symbol, String], max_links: Integer, timeout_ms: Integer, url_regex: String, diff --git a/sig/context_dev/resources/web.rbs b/sig/context_dev/resources/web.rbs index cec0432a..35a753b8 100644 --- a/sig/context_dev/resources/web.rbs +++ b/sig/context_dev/resources/web.rbs @@ -84,6 +84,7 @@ module ContextDev def web_scrape_html: ( url: String, + ?headers: ::Hash[Symbol, String], ?include_frames: bool, ?max_age_ms: Integer, ?pdf: ContextDev::WebWebScrapeHTMLParams::Pdf, @@ -95,6 +96,7 @@ module ContextDev def web_scrape_images: ( url: String, ?enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment, + ?headers: ::Hash[Symbol, String], ?max_age_ms: Integer, ?timeout_ms: Integer, ?wait_for_ms: Integer, @@ -103,6 +105,7 @@ module ContextDev def web_scrape_md: ( url: String, + ?headers: ::Hash[Symbol, String], ?include_frames: bool, ?include_images: bool, ?include_links: bool, @@ -117,6 +120,7 @@ module ContextDev def web_scrape_sitemap: ( domain: String, + ?headers: ::Hash[Symbol, String], ?max_links: Integer, ?timeout_ms: Integer, ?url_regex: String, From 671e39618c11f2e36fa68e9a15f6bce1e698fa47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:09:00 +0000 Subject: [PATCH 6/6] release: 1.28.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/context_dev/version.rb | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4eb89879..31d82388 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.27.0" + ".": "1.28.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ad36a35e..043319ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Gemfile.lock b/Gemfile.lock index df1bf28e..9092793a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - context.dev (1.27.0) + context.dev (1.28.0) cgi connection_pool diff --git a/README.md b/README.md index 7ec6e03f..1a184299 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "context.dev", "~> 1.27.0" +gem "context.dev", "~> 1.28.0" ``` diff --git a/lib/context_dev/version.rb b/lib/context_dev/version.rb index e577be49..2f843633 100644 --- a/lib/context_dev/version.rb +++ b/lib/context_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ContextDev - VERSION = "1.27.0" + VERSION = "1.28.0" end