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.11.0"
".": "1.12.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-449cbc8437530f305b8e3ed49465d5faf720505a77f539bc8078162139fbbb69.yml
openapi_spec_hash: 8e1dd204746bcfaaf637d93b1d339eb2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-3ab7c195646f05374a224a980cab48a6c9844ba7aedf9dba28c7fd8273b173f2.yml
openapi_spec_hash: b10ee8536928665190a110738964fccb
config_hash: ff13935d1231ad44cd3822ffe39904b4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.12.0 (2026-05-01)

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

### Features

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

## 1.11.0 (2026-05-01)

Full Changelog: [v1.10.0...v1.11.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.10.0...v1.11.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.11.0)
context.dev (1.12.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.11.0"
gem "context.dev", "~> 1.12.0"
```

<!-- x-release-please-end -->
Expand Down
11 changes: 10 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 @@ -21,6 +21,13 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :follow_subdomains, ContextDev::Internal::Type::Boolean, api_name: :followSubdomains

# @!attribute include_frames
# When true, the contents of iframes are rendered to Markdown for each crawled
# page.
#
# @return [Boolean, nil]
optional :include_frames, ContextDev::Internal::Type::Boolean, api_name: :includeFrames

# @!attribute include_images
# Include image references in the Markdown output
#
Expand Down Expand Up @@ -80,14 +87,16 @@ 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_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: {})
# @!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: {})
# 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 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
#
# @param include_images [Boolean] Include image references in the Markdown output
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
Expand Down
10 changes: 9 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,12 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute include_frames
# When true, iframes are rendered inline into the returned HTML.
#
# @return [Boolean, nil]
optional :include_frames, ContextDev::Internal::Type::Boolean

# @!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 All @@ -29,12 +35,14 @@ class WebWebScrapeHTMLParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :parse_pdf, ContextDev::Internal::Type::Boolean

# @!method initialize(url:, max_age_ms: nil, parse_pdf: nil, request_options: {})
# @!method initialize(url:, include_frames: nil, max_age_ms: nil, parse_pdf: 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 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
#
# @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
Expand Down
10 changes: 9 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,12 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [String]
required :url, String

# @!attribute include_frames
# When true, the contents of iframes are rendered to Markdown.
#
# @return [Boolean, nil]
optional :include_frames, ContextDev::Internal::Type::Boolean

# @!attribute include_images
# Include image references in Markdown output
#
Expand Down Expand Up @@ -55,12 +61,14 @@ class WebWebScrapeMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :use_main_content_only, ContextDev::Internal::Type::Boolean

# @!method initialize(url:, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
# @!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: {})
# 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 include_frames [Boolean] When true, the contents of iframes are rendered to Markdown.
#
# @param include_images [Boolean] Include image references in Markdown output
#
# @param include_links [Boolean] Preserve hyperlinks in Markdown output
Expand Down
19 changes: 15 additions & 4 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ def screenshot(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_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: {})
# @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, parse_pdf: nil, shorten_base64_images: nil, url_regex: nil, use_main_content_only: nil, request_options: {})
#
# @param url [String] The starting URL for the crawl (must include http:// or https:// protocol)
#
# @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
#
# @param include_images [Boolean] Include image references in the Markdown output
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
Expand Down Expand Up @@ -150,10 +152,12 @@ def web_crawl_md(params)
#
# Scrapes the given URL and returns the raw HTML content of the page.
#
# @overload web_scrape_html(url:, max_age_ms: nil, parse_pdf: nil, request_options: {})
# @overload web_scrape_html(url:, include_frames: nil, max_age_ms: nil, parse_pdf: nil, request_options: {})
#
# @param url [String] Full URL to scrape (must include http:// or https:// protocol)
#
# @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
#
# @param parse_pdf [Boolean] When true (default), PDF URLs are fetched and their text layer is extracted and
Expand All @@ -169,7 +173,11 @@ def web_scrape_html(params)
@client.request(
method: :get,
path: "web/scrape/html",
query: query.transform_keys(max_age_ms: "maxAgeMs", parse_pdf: "parsePDF"),
query: query.transform_keys(
include_frames: "includeFrames",
max_age_ms: "maxAgeMs",
parse_pdf: "parsePDF"
),
model: ContextDev::Models::WebWebScrapeHTMLResponse,
options: options
)
Expand Down Expand Up @@ -205,10 +213,12 @@ def web_scrape_images(params)
#
# Scrapes the given URL into LLM usable Markdown.
#
# @overload web_scrape_md(url:, include_images: nil, include_links: nil, max_age_ms: nil, parse_pdf: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
# @overload web_scrape_md(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: {})
#
# @param url [String] Full URL to scrape into LLM usable Markdown (must include http:// or https:// pr
#
# @param include_frames [Boolean] When true, the contents of iframes are rendered to Markdown.
#
# @param include_images [Boolean] Include image references in Markdown output
#
# @param include_links [Boolean] Preserve hyperlinks in Markdown output
Expand All @@ -233,6 +243,7 @@ def web_scrape_md(params)
method: :get,
path: "web/scrape/markdown",
query: query.transform_keys(
include_frames: "includeFrames",
include_images: "includeImages",
include_links: "includeLinks",
max_age_ms: "maxAgeMs",
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.11.0"
VERSION = "1.12.0"
end
13 changes: 13 additions & 0 deletions rbi/context_dev/models/web_web_crawl_md_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ module ContextDev
sig { params(follow_subdomains: T::Boolean).void }
attr_writer :follow_subdomains

# When true, the contents of iframes are rendered to Markdown for each crawled
# page.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_frames

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

# Include image references in the Markdown output
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_images
Expand Down Expand Up @@ -96,6 +104,7 @@ module ContextDev
params(
url: String,
follow_subdomains: T::Boolean,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand All @@ -115,6 +124,9 @@ module ContextDev
# docs.example.com when starting from example.com). www and apex are always
# treated as equivalent.
follow_subdomains: nil,
# When true, the contents of iframes are rendered to Markdown for each crawled
# page.
include_frames: nil,
# Include image references in the Markdown output
include_images: nil,
# Preserve hyperlinks in the Markdown output
Expand Down Expand Up @@ -147,6 +159,7 @@ module ContextDev
{
url: String,
follow_subdomains: T::Boolean,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand Down
11 changes: 11 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,13 @@ module ContextDev
sig { returns(String) }
attr_accessor :url

# When true, iframes are rendered inline into the returned HTML.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_frames

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

# 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
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
Expand All @@ -39,6 +46,7 @@ module ContextDev
sig do
params(
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
parse_pdf: T::Boolean,
request_options: ContextDev::RequestOptions::OrHash
Expand All @@ -47,6 +55,8 @@ module ContextDev
def self.new(
# Full URL to scrape (must include http:// or https:// protocol)
url:,
# 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
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
Expand All @@ -63,6 +73,7 @@ module ContextDev
override.returns(
{
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
parse_pdf: T::Boolean,
request_options: ContextDev::RequestOptions
Expand Down
11 changes: 11 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,13 @@ module ContextDev
sig { returns(String) }
attr_accessor :url

# When true, the contents of iframes are rendered to Markdown.
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_frames

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

# Include image references in Markdown output
sig { returns(T.nilable(T::Boolean)) }
attr_reader :include_images
Expand Down Expand Up @@ -66,6 +73,7 @@ module ContextDev
sig do
params(
url: String,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand All @@ -79,6 +87,8 @@ module ContextDev
# Full URL to scrape into LLM usable Markdown (must include http:// or https://
# protocol)
url:,
# When true, the contents of iframes are rendered to Markdown.
include_frames: nil,
# Include image references in Markdown output
include_images: nil,
# Preserve hyperlinks in Markdown output
Expand All @@ -104,6 +114,7 @@ module ContextDev
override.returns(
{
url: String,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand Down
10 changes: 10 additions & 0 deletions rbi/context_dev/resources/web.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module ContextDev
params(
url: String,
follow_subdomains: T::Boolean,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand All @@ -122,6 +123,9 @@ module ContextDev
# docs.example.com when starting from example.com). www and apex are always
# treated as equivalent.
follow_subdomains: nil,
# When true, the contents of iframes are rendered to Markdown for each crawled
# page.
include_frames: nil,
# Include image references in the Markdown output
include_images: nil,
# Preserve hyperlinks in the Markdown output
Expand Down Expand Up @@ -153,6 +157,7 @@ module ContextDev
sig do
params(
url: String,
include_frames: T::Boolean,
max_age_ms: Integer,
parse_pdf: T::Boolean,
request_options: ContextDev::RequestOptions::OrHash
Expand All @@ -161,6 +166,8 @@ module ContextDev
def web_scrape_html(
# Full URL to scrape (must include http:// or https:// protocol)
url:,
# 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
# younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
Expand Down Expand Up @@ -193,6 +200,7 @@ module ContextDev
sig do
params(
url: String,
include_frames: T::Boolean,
include_images: T::Boolean,
include_links: T::Boolean,
max_age_ms: Integer,
Expand All @@ -206,6 +214,8 @@ module ContextDev
# Full URL to scrape into LLM usable Markdown (must include http:// or https://
# protocol)
url:,
# When true, the contents of iframes are rendered to Markdown.
include_frames: nil,
# Include image references in Markdown output
include_images: nil,
# Preserve hyperlinks in Markdown output
Expand Down
Loading
Loading