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 @@
{
".": "2.1.0"
".": "2.2.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: 29
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-51ebe668b198157ccb18984017dd2fe35f7675220e8b933b03325b3c459ef2a6.yml
openapi_spec_hash: b3ed94bd6b59d4e32fc2c5aa8187d6b2
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-ecb277557634e2f0838ea196e2b21f11924f65e133c7977e8c2e1a603b8df466.yml
openapi_spec_hash: 798ce4cb042389a1179bf9af6fc1173d
config_hash: ff35e224e809656528c44163aa41bebd
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 2.2.0 (2026-07-10)

Full Changelog: [v2.1.0...v2.2.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.1.0...v2.2.0)

### Features

* **api:** api update ([04e3709](https://github.com/context-dot-dev/context-ruby-sdk/commit/04e370916ae9679892d86fc297e3c935afa1e2c2))
* **api:** api update ([59b7e62](https://github.com/context-dot-dev/context-ruby-sdk/commit/59b7e62e57eff7482db12fe2dd1a97298620b88f))

## 2.1.0 (2026-07-08)

Full Changelog: [v2.0.0...v2.1.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.0.0...v2.1.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 (2.1.0)
context.dev (2.2.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", "~> 2.1.0"
gem "context.dev", "~> 2.2.0"
```

<!-- x-release-please-end -->
Expand Down
27 changes: 16 additions & 11 deletions lib/context_dev/models/monitor_create_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module ChangeDetection
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }

# Detect meaning-level changes to the extracted data, ignoring cosmetic or paraphrase-only differences. What is watched is determined by the extract target's `schema` and `instructions`.
# Detect meaning-level changes to tracked page content, ignoring cosmetic or paraphrase-only differences. Which changes are meaningful is judged against the extract target's `instructions` (and `schema`, when provided).
variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }

class Exact < ContextDev::Internal::Type::BaseModel
Expand Down Expand Up @@ -107,9 +107,9 @@ class Semantic < ContextDev::Internal::Type::BaseModel
optional :confidence_threshold, Float

# @!method initialize(confidence_threshold: nil, type: :semantic)
# Detect meaning-level changes to the extracted data, ignoring cosmetic or
# paraphrase-only differences. What is watched is determined by the extract
# target's `schema` and `instructions`.
# Detect meaning-level changes to tracked page content, ignoring cosmetic or
# paraphrase-only differences. Which changes are meaningful is judged against the
# extract target's `instructions` (and `schema`, when provided).
#
# @param confidence_threshold [Float]
# @param type [Symbol, :semantic]
Expand Down Expand Up @@ -187,7 +187,7 @@ module Target
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
variant :sitemap, -> { ContextDev::MonitorCreateParams::Target::Sitemap }

# Watch the monitor-relevant pages of a site for meaningful changes. A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged for relevance against the monitor's `instructions` (and `schema`, when provided). The tracked page set is refreshed by a periodic re-discovery crawl.
variant :extract, -> { ContextDev::MonitorCreateParams::Target::Extract }

class Page < ContextDev::Internal::Type::BaseModel
Expand Down Expand Up @@ -302,9 +302,14 @@ class Extract < ContextDev::Internal::Type::BaseModel
optional :max_pages, Integer

# @!attribute schema
# JSON Schema describing the data you care about. It guides which pages are
# selected for tracking and gives the change judge context on what matters. If
# omitted, a default summary + key-points schema is used.
# JSON Schema describing the data you care about. It is used three ways: it guides
# which pages are selected for tracking, it gives the change judge extra context
# on which changes matter (alongside `instructions`), and it defines the shape of
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
# about once a day). It is not a response format for changes: change events and
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
# data in this schema's shape. If omitted, a default summary + key-points schema
# is used.
#
# @return [Hash{Symbol=>Object}, nil]
optional :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
Expand All @@ -316,8 +321,8 @@ class Extract < ContextDev::Internal::Type::BaseModel
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl
# guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
# track; each run re-checks exactly those pages, and confirmed content changes are
# judged against the monitor's instructions. The tracked page set is refreshed by
# a periodic re-discovery crawl.
# judged for relevance against the monitor's `instructions` (and `schema`, when
# provided). The tracked page set is refreshed by a periodic re-discovery crawl.
#
# @param instructions [String] Natural-language instructions guiding which pages and facts to track and which c
#
Expand All @@ -329,7 +334,7 @@ class Extract < ContextDev::Internal::Type::BaseModel
#
# @param max_pages [Integer] Maximum number of pages to track.
#
# @param schema [Hash{Symbol=>Object}] JSON Schema describing the data you care about. It guides which pages are select
# @param schema [Hash{Symbol=>Object}] JSON Schema describing the data you care about. It is used three ways: it guides
#
# @param type [Symbol, :extract]
end
Expand Down
27 changes: 16 additions & 11 deletions lib/context_dev/models/monitor_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module ChangeDetection
# Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
variant :exact, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Exact }

# Detect meaning-level changes to the extracted data, ignoring cosmetic or paraphrase-only differences. What is watched is determined by the extract target's `schema` and `instructions`.
# Detect meaning-level changes to tracked page content, ignoring cosmetic or paraphrase-only differences. Which changes are meaningful is judged against the extract target's `instructions` (and `schema`, when provided).
variant :semantic, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic }

class Exact < ContextDev::Internal::Type::BaseModel
Expand Down Expand Up @@ -181,9 +181,9 @@ class Semantic < ContextDev::Internal::Type::BaseModel
optional :confidence_threshold, Float

# @!method initialize(confidence_threshold: nil, type: :semantic)
# Detect meaning-level changes to the extracted data, ignoring cosmetic or
# paraphrase-only differences. What is watched is determined by the extract
# target's `schema` and `instructions`.
# Detect meaning-level changes to tracked page content, ignoring cosmetic or
# paraphrase-only differences. Which changes are meaningful is judged against the
# extract target's `instructions` (and `schema`, when provided).
#
# @param confidence_threshold [Float]
# @param type [Symbol, :semantic]
Expand Down Expand Up @@ -295,7 +295,7 @@ module Target
# Watch a sitemap for URL additions and removals. Crawled URLs are normalized (lowercased host, no trailing slash/fragment) and scoped to the monitored site and its subdomains before comparison. On a detected difference the sitemap is re-fetched within the same run and only URLs both observations agree on are reported, suppressing transient crawl flaps.
variant :sitemap, -> { ContextDev::Models::MonitorCreateResponse::Target::Sitemap }

# Watch the monitor-relevant pages of a site for meaningful changes. A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged against the monitor's instructions. The tracked page set is refreshed by a periodic re-discovery crawl.
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl guided by `schema`/`instructions` selects up to `max_pages` relevant pages to track; each run re-checks exactly those pages, and confirmed content changes are judged for relevance against the monitor's `instructions` (and `schema`, when provided). The tracked page set is refreshed by a periodic re-discovery crawl.
variant :extract, -> { ContextDev::Models::MonitorCreateResponse::Target::Extract }

class Page < ContextDev::Internal::Type::BaseModel
Expand Down Expand Up @@ -410,9 +410,14 @@ class Extract < ContextDev::Internal::Type::BaseModel
optional :max_pages, Integer

# @!attribute schema
# JSON Schema describing the data you care about. It guides which pages are
# selected for tracking and gives the change judge context on what matters. If
# omitted, a default summary + key-points schema is used.
# JSON Schema describing the data you care about. It is used three ways: it guides
# which pages are selected for tracking, it gives the change judge extra context
# on which changes matter (alongside `instructions`), and it defines the shape of
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
# about once a day). It is not a response format for changes: change events and
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
# data in this schema's shape. If omitted, a default summary + key-points schema
# is used.
#
# @return [Hash{Symbol=>Object}, nil]
optional :schema, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
Expand All @@ -424,8 +429,8 @@ class Extract < ContextDev::Internal::Type::BaseModel
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl
# guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
# track; each run re-checks exactly those pages, and confirmed content changes are
# judged against the monitor's instructions. The tracked page set is refreshed by
# a periodic re-discovery crawl.
# judged for relevance against the monitor's `instructions` (and `schema`, when
# provided). The tracked page set is refreshed by a periodic re-discovery crawl.
#
# @param instructions [String] Natural-language instructions guiding which pages and facts to track and which c
#
Expand All @@ -437,7 +442,7 @@ class Extract < ContextDev::Internal::Type::BaseModel
#
# @param max_pages [Integer] Maximum number of pages to track.
#
# @param schema [Hash{Symbol=>Object}] JSON Schema describing the data you care about. It guides which pages are select
# @param schema [Hash{Symbol=>Object}] JSON Schema describing the data you care about. It is used three ways: it guides
#
# @param type [Symbol, :extract]
end
Expand Down
103 changes: 102 additions & 1 deletion lib/context_dev/models/monitor_list_account_runs_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,16 @@ class Data < ContextDev::Internal::Type::BaseModel
# @return [Time, nil]
optional :started_at, Time, nil?: true

# @!method initialize(id:, baseline_created:, change_detected:, change_detection_type:, credits_charged:, monitor_id:, run_type:, status:, target_type:, change_id: nil, completed_at: nil, error: nil, skip_reason: nil, started_at: nil)
# @!attribute webhook_delivery
# The webhook delivery attempted for a change detected by this run. Omitted when
# no webhook was attempted, including historical runs created before delivery
# tracking was added.
#
# @return [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery, nil]
optional :webhook_delivery,
-> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery }

# @!method initialize(id:, baseline_created:, change_detected:, change_detection_type:, credits_charged:, monitor_id:, run_type:, status:, target_type:, change_id: nil, completed_at: nil, error: nil, skip_reason: nil, started_at: nil, webhook_delivery: nil)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::MonitorListAccountRunsResponse::Data} for more details.
#
Expand Down Expand Up @@ -137,6 +146,8 @@ class Data < ContextDev::Internal::Type::BaseModel
# @param skip_reason [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::SkipReason, nil] Why a skipped run never executed; null unless status is `skipped`.
#
# @param started_at [Time, nil]
#
# @param webhook_delivery [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery] The webhook delivery attempted for a change detected by this run. Omitted when n

# @see ContextDev::Models::MonitorListAccountRunsResponse::Data#change_detection_type
module ChangeDetectionType
Expand Down Expand Up @@ -221,6 +232,96 @@ module SkipReason
# @!method self.values
# @return [Array<Symbol>]
end

# @see ContextDev::Models::MonitorListAccountRunsResponse::Data#webhook_delivery
class WebhookDelivery < ContextDev::Internal::Type::BaseModel
# @!attribute attempted_at
#
# @return [Time]
required :attempted_at, Time

# @!attribute error
#
# @return [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error, nil]
required :error,
-> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error },
nil?: true

# @!attribute event_id
# Identifier sent in the X-Context-Id header.
#
# @return [String]
required :event_id, String

# @!attribute http_status
# The endpoint's final HTTP response status, or null when no response was
# received.
#
# @return [Integer, nil]
required :http_status, Integer, nil?: true

# @!attribute status
# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
# response; failed means no HTTP response was received; skipped_unsafe_url means
# the URL failed the public-endpoint safety check.
#
# @return [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status]
required :status,
enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status }

# @!method initialize(attempted_at:, error:, event_id:, http_status:, status:)
# Some parameter documentations has been truncated, see
# {ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery} for
# more details.
#
# The webhook delivery attempted for a change detected by this run. Omitted when
# no webhook was attempted, including historical runs created before delivery
# tracking was added.
#
# @param attempted_at [Time]
#
# @param error [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error, nil]
#
# @param event_id [String] Identifier sent in the X-Context-Id header.
#
# @param http_status [Integer, nil] The endpoint's final HTTP response status, or null when no response was received
#
# @param status [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status] Delivery outcome. delivered means any 2xx response; rejected means a non-2xx res

# @see ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery#error
class Error < ContextDev::Internal::Type::BaseModel
# @!attribute code
#
# @return [String]
required :code, String

# @!attribute message
#
# @return [String]
required :message, String

# @!method initialize(code:, message:)
# @param code [String]
# @param message [String]
end

# Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
# response; failed means no HTTP response was received; skipped_unsafe_url means
# the URL failed the public-endpoint safety check.
#
# @see ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery#status
module Status
extend ContextDev::Internal::Type::Enum

DELIVERED = :delivered
REJECTED = :rejected
FAILED = :failed
SKIPPED_UNSAFE_URL = :skipped_unsafe_url

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
end
Expand Down
Loading