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.5.0"
".": "1.6.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: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-5afee68d7308a77a9ef51fb53917080746f96327c6d745fc029363a7d1494c3c.yml
openapi_spec_hash: b2e32bb58d92a00f6ede04c4f7bf1a34
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-ca8e38b0f28a9967dab631b8868f1d59bc035fd994a717e0125c77ca592bd105.yml
openapi_spec_hash: ef0a5df01201a032dcc41f9a25b733e6
config_hash: 7d13dca2b2c6f71fc463cb6062efa5ea
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 1.6.0 (2026-04-23)

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

### Features

* **api:** api update ([c1543f7](https://github.com/context-dot-dev/context-ruby-sdk/commit/c1543f7513b2d88b0c8ad8e209e62075bd9658bc))
* **api:** api update ([9c98e20](https://github.com/context-dot-dev/context-ruby-sdk/commit/9c98e20725dcda8466a2274b61be75943d0564d9))
* **api:** api update ([8ccafd9](https://github.com/context-dot-dev/context-ruby-sdk/commit/8ccafd9625079f40393fe23890958a80d8bdb4e8))


### Chores

* **internal:** more robust bootstrap script ([57b2d93](https://github.com/context-dot-dev/context-ruby-sdk/commit/57b2d93877e5ceeb388679f239e21c09b087b2a1))

## 1.5.0 (2026-04-19)

Full Changelog: [v1.4.0...v1.5.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.4.0...v1.5.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.5.0)
context.dev (1.6.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.5.0"
gem "context.dev", "~> 1.6.0"
```

<!-- x-release-please-end -->
Expand Down
69 changes: 68 additions & 1 deletion lib/context_dev/models/web_extract_fonts_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,29 @@ class WebExtractFontsResponse < ContextDev::Internal::Type::BaseModel
# @return [String]
required :status, String

# @!method initialize(code:, domain:, fonts:, status:)
# @!attribute font_links
# Font assets keyed by family name as it appears in the fonts array (non-generic
# names only). Clients match entries in fonts to pick a file URL from files.
# Omitted when no families resolve to Google or custom @font-face URLs.
#
# @return [Hash{Symbol=>ContextDev::Models::WebExtractFontsResponse::FontLink}, nil]
optional :font_links,
-> { ContextDev::Internal::Type::HashOf[ContextDev::Models::WebExtractFontsResponse::FontLink] },
api_name: :fontLinks

# @!method initialize(code:, domain:, fonts:, status:, font_links: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebExtractFontsResponse} for more details.
#
# @param code [Integer] HTTP status code, e.g., 200
#
# @param domain [String] The normalized domain that was processed
#
# @param fonts [Array<ContextDev::Models::WebExtractFontsResponse::Font>] Array of font usage information
#
# @param status [String] Status of the response, e.g., 'ok'
#
# @param font_links [Hash{Symbol=>ContextDev::Models::WebExtractFontsResponse::FontLink}] Font assets keyed by family name as it appears in the fonts array (non-generic n

class Font < ContextDev::Internal::Type::BaseModel
# @!attribute fallbacks
Expand Down Expand Up @@ -96,6 +111,58 @@ class Font < ContextDev::Internal::Type::BaseModel
#
# @param uses [Array<String>] Array of CSS selectors or element types where this font is used
end

class FontLink < ContextDev::Internal::Type::BaseModel
# @!attribute files
# Upright font files keyed by weight string (e.g. "400" for regular, "500",
# "700"). Values are absolute URLs.
#
# @return [Hash{Symbol=>String}]
required :files, ContextDev::Internal::Type::HashOf[String]

# @!attribute type
#
# @return [Symbol, ContextDev::Models::WebExtractFontsResponse::FontLink::Type]
required :type, enum: -> { ContextDev::Models::WebExtractFontsResponse::FontLink::Type }

# @!attribute category
# Google Fonts category when type is google (e.g. sans-serif, serif, monospace,
# display, handwriting). Omitted for custom fonts when unknown.
#
# @return [String, nil]
optional :category, String

# @!attribute display_name
# Present when type is custom: human-readable name derived from the fontLinks key
# (strip build/hash suffixes, split camelCase / PascalCase, normalize separators).
# Google entries omit this.
#
# @return [String, nil]
optional :display_name, String, api_name: :displayName

# @!method initialize(files:, type:, category: nil, display_name: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebExtractFontsResponse::FontLink} for more details.
#
# @param files [Hash{Symbol=>String}] Upright font files keyed by weight string (e.g. "400" for regular, "500", "700")
#
# @param type [Symbol, ContextDev::Models::WebExtractFontsResponse::FontLink::Type]
#
# @param category [String] Google Fonts category when type is google (e.g. sans-serif, serif, monospace, di
#
# @param display_name [String] Present when type is custom: human-readable name derived from the fontLinks key

# @see ContextDev::Models::WebExtractFontsResponse::FontLink#type
module Type
extend ContextDev::Internal::Type::Enum

GOOGLE = :google
CUSTOM = :custom

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
end
12 changes: 11 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 @@ -33,6 +33,14 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :include_links, ContextDev::Internal::Type::Boolean, api_name: :includeLinks

# @!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
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
#
# @return [Integer, nil]
optional :max_age_ms, Integer, api_name: :maxAgeMs

# @!attribute max_depth
# Maximum link depth from the starting URL (0 = only the starting page)
#
Expand Down Expand Up @@ -64,7 +72,7 @@ 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_depth: nil, max_pages: nil, shorten_base64_images: nil, url_regex: nil, use_main_content_only: nil, request_options: {})
# @!method initialize(url:, follow_subdomains: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: 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.
#
Expand All @@ -76,6 +84,8 @@ class WebWebCrawlMdParams < ContextDev::Internal::Type::BaseModel
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
#
# @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)
#
# @param max_pages [Integer] Maximum number of pages to crawl. Hard cap: 500.
Expand Down
11 changes: 10 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,14 +20,23 @@ class WebWebScrapeSitemapParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :max_links, Integer

# @!method initialize(domain:, max_links: nil, request_options: {})
# @!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: {})
# 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 url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
10 changes: 7 additions & 3 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ 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_depth: nil, max_pages: nil, shorten_base64_images: nil, url_regex: nil, use_main_content_only: nil, request_options: {})
# @overload web_crawl_md(url:, follow_subdomains: nil, include_images: nil, include_links: nil, max_age_ms: nil, max_depth: nil, max_pages: 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)
#
Expand All @@ -115,6 +115,8 @@ def screenshot(params = {})
#
# @param include_links [Boolean] Preserve hyperlinks in the Markdown output
#
# @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)
#
# @param max_pages [Integer] Maximum number of pages to crawl. Hard cap: 500.
Expand Down Expand Up @@ -241,12 +243,14 @@ 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, request_options: {})
# @overload web_scrape_sitemap(domain:, max_links: nil, url_regex: nil, request_options: {})
#
# @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 url_regex [String] Optional RE2-compatible regex pattern. Only URLs matching this pattern are retur
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [ContextDev::Models::WebWebScrapeSitemapResponse]
Expand All @@ -258,7 +262,7 @@ def web_scrape_sitemap(params)
@client.request(
method: :get,
path: "web/scrape/sitemap",
query: query.transform_keys(max_links: "maxLinks"),
query: query.transform_keys(max_links: "maxLinks", url_regex: "urlRegex"),
model: ContextDev::Models::WebWebScrapeSitemapResponse,
options: options
)
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.5.0"
VERSION = "1.6.0"
end
Loading
Loading