context.dev 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +4 -0
  5. data/lib/context_dev/models/ai_extract_product_params.rb +9 -1
  6. data/lib/context_dev/models/ai_extract_products_params.rb +18 -2
  7. data/lib/context_dev/models/batch_cancel_params.rb +22 -0
  8. data/lib/context_dev/models/batch_cancel_response.rb +354 -0
  9. data/lib/context_dev/models/batch_get_results_params.rb +42 -0
  10. data/lib/context_dev/models/batch_get_results_response.rb +463 -0
  11. data/lib/context_dev/models/batch_list_params.rb +94 -0
  12. data/lib/context_dev/models/batch_list_response.rb +388 -0
  13. data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
  14. data/lib/context_dev/models/batch_retrieve_response.rb +390 -0
  15. data/lib/context_dev/models/batch_submit_params.rb +56 -0
  16. data/lib/context_dev/models/batch_submit_response.rb +614 -0
  17. data/lib/context_dev/models/brand_retrieve_params.rb +109 -22
  18. data/lib/context_dev/models/brand_retrieve_response.rb +4 -6
  19. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +32 -3
  20. data/lib/context_dev/models/error.rb +26 -0
  21. data/lib/context_dev/models/error_count.rb +26 -0
  22. data/lib/context_dev/models/industry_retrieve_naics_params.rb +11 -1
  23. data/lib/context_dev/models/industry_retrieve_sic_params.rb +11 -1
  24. data/lib/context_dev/models/monitor_create_params.rb +147 -132
  25. data/lib/context_dev/models/monitor_create_response.rb +40 -15
  26. data/lib/context_dev/models/monitor_get_credit_usage_params.rb +30 -0
  27. data/lib/context_dev/models/monitor_get_credit_usage_response.rb +59 -0
  28. data/lib/context_dev/models/monitor_get_limits_params.rb +14 -0
  29. data/lib/context_dev/models/monitor_get_limits_response.rb +52 -0
  30. data/lib/context_dev/models/monitor_list_account_changes_params.rb +16 -7
  31. data/lib/context_dev/models/monitor_list_account_changes_response.rb +2 -1
  32. data/lib/context_dev/models/monitor_list_account_runs_params.rb +7 -10
  33. data/lib/context_dev/models/monitor_list_changes_params.rb +8 -4
  34. data/lib/context_dev/models/monitor_list_changes_response.rb +2 -1
  35. data/lib/context_dev/models/monitor_list_params.rb +18 -19
  36. data/lib/context_dev/models/monitor_list_response.rb +27 -12
  37. data/lib/context_dev/models/monitor_list_runs_params.rb +7 -10
  38. data/lib/context_dev/models/monitor_retrieve_change_response.rb +2 -1
  39. data/lib/context_dev/models/monitor_retrieve_response.rb +27 -12
  40. data/lib/context_dev/models/monitor_update_params.rb +27 -12
  41. data/lib/context_dev/models/monitor_update_response.rb +27 -12
  42. data/lib/context_dev/models/parse_handle_params.rb +199 -33
  43. data/lib/context_dev/models/utility_prefetch_params.rb +9 -1
  44. data/lib/context_dev/models/web_extract_competitors_params.rb +11 -1
  45. data/lib/context_dev/models/web_extract_fonts_params.rb +14 -4
  46. data/lib/context_dev/models/web_extract_params.rb +19 -1
  47. data/lib/context_dev/models/web_extract_styleguide_params.rb +14 -4
  48. data/lib/context_dev/models/web_screenshot_params.rb +69 -18
  49. data/lib/context_dev/models/web_screenshot_response.rb +3 -2
  50. data/lib/context_dev/models/web_search_params.rb +9 -1
  51. data/lib/context_dev/models/web_web_crawl_md_params.rb +34 -1
  52. data/lib/context_dev/models/web_web_scrape_html_params.rb +268 -29
  53. data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
  54. data/lib/context_dev/models/web_web_scrape_images_params.rb +208 -19
  55. data/lib/context_dev/models/web_web_scrape_md_params.rb +352 -38
  56. data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
  57. data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +45 -1
  58. data/lib/context_dev/models.rb +18 -0
  59. data/lib/context_dev/resources/ai.rb +3 -1
  60. data/lib/context_dev/resources/batch.rb +155 -0
  61. data/lib/context_dev/resources/brand.rb +6 -2
  62. data/lib/context_dev/resources/industry.rb +6 -2
  63. data/lib/context_dev/resources/monitors.rb +75 -37
  64. data/lib/context_dev/resources/parse.rb +15 -11
  65. data/lib/context_dev/resources/utility.rb +3 -1
  66. data/lib/context_dev/resources/web.rb +104 -55
  67. data/lib/context_dev/version.rb +1 -1
  68. data/lib/context_dev.rb +17 -0
  69. data/rbi/context_dev/client.rbi +3 -0
  70. data/rbi/context_dev/models/ai_extract_product_params.rbi +11 -0
  71. data/rbi/context_dev/models/ai_extract_products_params.rbi +22 -0
  72. data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
  73. data/rbi/context_dev/models/batch_cancel_response.rbi +642 -0
  74. data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
  75. data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
  76. data/rbi/context_dev/models/batch_list_params.rbi +166 -0
  77. data/rbi/context_dev/models/batch_list_response.rbi +738 -0
  78. data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
  79. data/rbi/context_dev/models/batch_retrieve_response.rbi +707 -0
  80. data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
  81. data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
  82. data/rbi/context_dev/models/brand_retrieve_params.rbi +175 -64
  83. data/rbi/context_dev/models/brand_retrieve_response.rbi +8 -11
  84. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +68 -5
  85. data/rbi/context_dev/models/error.rbi +32 -0
  86. data/rbi/context_dev/models/error_count.rbi +34 -0
  87. data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +15 -0
  88. data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +15 -0
  89. data/rbi/context_dev/models/monitor_create_params.rbi +280 -246
  90. data/rbi/context_dev/models/monitor_create_response.rbi +44 -11
  91. data/rbi/context_dev/models/monitor_get_credit_usage_params.rbi +60 -0
  92. data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +111 -0
  93. data/rbi/context_dev/models/monitor_get_limits_params.rbi +30 -0
  94. data/rbi/context_dev/models/monitor_get_limits_response.rbi +105 -0
  95. data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +16 -0
  96. data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +2 -0
  97. data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +7 -6
  98. data/rbi/context_dev/models/monitor_list_changes_params.rbi +8 -0
  99. data/rbi/context_dev/models/monitor_list_changes_response.rbi +2 -0
  100. data/rbi/context_dev/models/monitor_list_params.rbi +23 -31
  101. data/rbi/context_dev/models/monitor_list_response.rbi +30 -9
  102. data/rbi/context_dev/models/monitor_list_runs_params.rbi +7 -6
  103. data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +2 -0
  104. data/rbi/context_dev/models/monitor_retrieve_response.rbi +30 -9
  105. data/rbi/context_dev/models/monitor_update_params.rbi +30 -9
  106. data/rbi/context_dev/models/monitor_update_response.rbi +30 -9
  107. data/rbi/context_dev/models/parse_handle_params.rbi +400 -46
  108. data/rbi/context_dev/models/utility_prefetch_params.rbi +11 -0
  109. data/rbi/context_dev/models/web_extract_competitors_params.rbi +15 -0
  110. data/rbi/context_dev/models/web_extract_fonts_params.rbi +19 -7
  111. data/rbi/context_dev/models/web_extract_params.rbi +26 -0
  112. data/rbi/context_dev/models/web_extract_styleguide_params.rbi +19 -7
  113. data/rbi/context_dev/models/web_screenshot_params.rbi +108 -37
  114. data/rbi/context_dev/models/web_screenshot_response.rbi +4 -2
  115. data/rbi/context_dev/models/web_search_params.rbi +11 -0
  116. data/rbi/context_dev/models/web_web_crawl_md_params.rbi +53 -0
  117. data/rbi/context_dev/models/web_web_scrape_html_params.rbi +554 -49
  118. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
  119. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +426 -30
  120. data/rbi/context_dev/models/web_web_scrape_md_params.rbi +742 -61
  121. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
  122. data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +82 -0
  123. data/rbi/context_dev/models.rbi +18 -0
  124. data/rbi/context_dev/resources/ai.rbi +3 -0
  125. data/rbi/context_dev/resources/batch.rbi +120 -0
  126. data/rbi/context_dev/resources/brand.rbi +9 -1
  127. data/rbi/context_dev/resources/industry.rbi +10 -0
  128. data/rbi/context_dev/resources/monitors.rbi +67 -23
  129. data/rbi/context_dev/resources/parse.rbi +46 -19
  130. data/rbi/context_dev/resources/utility.rbi +3 -0
  131. data/rbi/context_dev/resources/web.rbi +224 -48
  132. data/sig/context_dev/client.rbs +2 -0
  133. data/sig/context_dev/models/ai_extract_product_params.rbs +12 -1
  134. data/sig/context_dev/models/ai_extract_products_params.rbs +14 -0
  135. data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
  136. data/sig/context_dev/models/batch_cancel_response.rbs +266 -0
  137. data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
  138. data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
  139. data/sig/context_dev/models/batch_list_params.rbs +94 -0
  140. data/sig/context_dev/models/batch_list_response.rbs +304 -0
  141. data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
  142. data/sig/context_dev/models/batch_retrieve_response.rbs +290 -0
  143. data/sig/context_dev/models/batch_submit_params.rbs +52 -0
  144. data/sig/context_dev/models/batch_submit_response.rbs +542 -0
  145. data/sig/context_dev/models/brand_retrieve_params.rbs +97 -51
  146. data/sig/context_dev/models/brand_retrieve_response.rbs +2 -2
  147. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +34 -5
  148. data/sig/context_dev/models/error.rbs +15 -0
  149. data/sig/context_dev/models/error_count.rbs +15 -0
  150. data/sig/context_dev/models/industry_retrieve_naics_params.rbs +7 -0
  151. data/sig/context_dev/models/industry_retrieve_sic_params.rbs +7 -0
  152. data/sig/context_dev/models/monitor_create_params.rbs +117 -97
  153. data/sig/context_dev/models/monitor_create_response.rbs +18 -1
  154. data/sig/context_dev/models/monitor_get_credit_usage_params.rbs +32 -0
  155. data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +52 -0
  156. data/sig/context_dev/models/monitor_get_limits_params.rbs +15 -0
  157. data/sig/context_dev/models/monitor_get_limits_response.rbs +43 -0
  158. data/sig/context_dev/models/monitor_list_params.rbs +8 -14
  159. data/sig/context_dev/models/monitor_list_response.rbs +13 -1
  160. data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
  161. data/sig/context_dev/models/monitor_update_params.rbs +13 -1
  162. data/sig/context_dev/models/monitor_update_response.rbs +13 -1
  163. data/sig/context_dev/models/parse_handle_params.rbs +124 -25
  164. data/sig/context_dev/models/utility_prefetch_params.rbs +7 -0
  165. data/sig/context_dev/models/web_extract_competitors_params.rbs +12 -1
  166. data/sig/context_dev/models/web_extract_fonts_params.rbs +10 -5
  167. data/sig/context_dev/models/web_extract_params.rbs +14 -0
  168. data/sig/context_dev/models/web_extract_styleguide_params.rbs +10 -5
  169. data/sig/context_dev/models/web_screenshot_params.rbs +41 -20
  170. data/sig/context_dev/models/web_search_params.rbs +7 -0
  171. data/sig/context_dev/models/web_web_crawl_md_params.rbs +28 -1
  172. data/sig/context_dev/models/web_web_scrape_html_params.rbs +175 -47
  173. data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
  174. data/sig/context_dev/models/web_web_scrape_images_params.rbs +128 -38
  175. data/sig/context_dev/models/web_web_scrape_md_params.rbs +229 -62
  176. data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
  177. data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +35 -1
  178. data/sig/context_dev/models.rbs +18 -0
  179. data/sig/context_dev/resources/ai.rbs +1 -0
  180. data/sig/context_dev/resources/batch.rbs +41 -0
  181. data/sig/context_dev/resources/brand.rbs +3 -1
  182. data/sig/context_dev/resources/industry.rbs +2 -0
  183. data/sig/context_dev/resources/monitors.rbs +14 -4
  184. data/sig/context_dev/resources/parse.rbs +8 -5
  185. data/sig/context_dev/resources/utility.rbs +1 -0
  186. data/sig/context_dev/resources/web.rbs +47 -26
  187. metadata +53 -2
@@ -11,6 +11,7 @@ module ContextDev
11
11
  T.any(ContextDev::MonitorListParams, ContextDev::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Filter by change detection type.
14
15
  sig do
15
16
  returns(
16
17
  T.nilable(
@@ -28,12 +29,14 @@ module ContextDev
28
29
  end
29
30
  attr_writer :change_detection_type
30
31
 
32
+ # Opaque pagination cursor from a previous response.
31
33
  sig { returns(T.nilable(String)) }
32
34
  attr_reader :cursor
33
35
 
34
36
  sig { params(cursor: String).void }
35
37
  attr_writer :cursor
36
38
 
39
+ # Maximum number of items to return per page (1-100). Defaults to 25.
37
40
  sig { returns(T.nilable(Integer)) }
38
41
  attr_reader :limit
39
42
 
@@ -54,14 +57,7 @@ module ContextDev
54
57
  T.nilable(T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol])
55
58
  )
56
59
  end
57
- attr_reader :search_by
58
-
59
- sig do
60
- params(
61
- search_by: T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol]
62
- ).void
63
- end
64
- attr_writer :search_by
60
+ attr_accessor :search_by
65
61
 
66
62
  # `prefix` for as-you-type prefix matching (default), `exact` for full-token
67
63
  # matching.
@@ -77,11 +73,7 @@ module ContextDev
77
73
  end
78
74
  attr_writer :search_type
79
75
 
80
- # Monitor lifecycle status. `failed` means the most recent run failed (see the
81
- # monitor's `last_error`); failed monitors keep running on schedule and flip back
82
- # to `active` on the next successful run. Monitors are auto-`paused` after
83
- # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
84
- # status to `active`.
76
+ # Filter monitors by lifecycle status.
85
77
  sig do
86
78
  returns(T.nilable(ContextDev::MonitorListParams::Status::OrSymbol))
87
79
  end
@@ -101,11 +93,9 @@ module ContextDev
101
93
 
102
94
  # Comma-separated list of tags to filter by (matches monitors having any of them).
103
95
  sig { returns(T.nilable(T::Array[String])) }
104
- attr_reader :tags
105
-
106
- sig { params(tags: T::Array[String]).void }
107
- attr_writer :tags
96
+ attr_accessor :tags
108
97
 
98
+ # Filter by target type.
109
99
  sig do
110
100
  returns(T.nilable(ContextDev::MonitorListParams::TargetType::OrSymbol))
111
101
  end
@@ -126,18 +116,23 @@ module ContextDev
126
116
  limit: Integer,
127
117
  q: String,
128
118
  search_by:
129
- T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol],
119
+ T.nilable(
120
+ T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol]
121
+ ),
130
122
  search_type: ContextDev::MonitorListParams::SearchType::OrSymbol,
131
123
  status: ContextDev::MonitorListParams::Status::OrSymbol,
132
124
  tag: String,
133
- tags: T::Array[String],
125
+ tags: T.nilable(T::Array[String]),
134
126
  target_type: ContextDev::MonitorListParams::TargetType::OrSymbol,
135
127
  request_options: ContextDev::RequestOptions::OrHash
136
128
  ).returns(T.attached_class)
137
129
  end
138
130
  def self.new(
131
+ # Filter by change detection type.
139
132
  change_detection_type: nil,
133
+ # Opaque pagination cursor from a previous response.
140
134
  cursor: nil,
135
+ # Maximum number of items to return per page (1-100). Defaults to 25.
141
136
  limit: nil,
142
137
  # Free-text search term, matched against the fields named in `search_by`.
143
138
  q: nil,
@@ -147,16 +142,13 @@ module ContextDev
147
142
  # `prefix` for as-you-type prefix matching (default), `exact` for full-token
148
143
  # matching.
149
144
  search_type: nil,
150
- # Monitor lifecycle status. `failed` means the most recent run failed (see the
151
- # monitor's `last_error`); failed monitors keep running on schedule and flip back
152
- # to `active` on the next successful run. Monitors are auto-`paused` after
153
- # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
154
- # status to `active`.
145
+ # Filter monitors by lifecycle status.
155
146
  status: nil,
156
147
  # Filter to items that have this tag.
157
148
  tag: nil,
158
149
  # Comma-separated list of tags to filter by (matches monitors having any of them).
159
150
  tags: nil,
151
+ # Filter by target type.
160
152
  target_type: nil,
161
153
  request_options: {}
162
154
  )
@@ -171,11 +163,13 @@ module ContextDev
171
163
  limit: Integer,
172
164
  q: String,
173
165
  search_by:
174
- T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol],
166
+ T.nilable(
167
+ T::Array[ContextDev::MonitorListParams::SearchBy::OrSymbol]
168
+ ),
175
169
  search_type: ContextDev::MonitorListParams::SearchType::OrSymbol,
176
170
  status: ContextDev::MonitorListParams::Status::OrSymbol,
177
171
  tag: String,
178
- tags: T::Array[String],
172
+ tags: T.nilable(T::Array[String]),
179
173
  target_type: ContextDev::MonitorListParams::TargetType::OrSymbol,
180
174
  request_options: ContextDev::RequestOptions
181
175
  }
@@ -184,6 +178,7 @@ module ContextDev
184
178
  def to_hash
185
179
  end
186
180
 
181
+ # Filter by change detection type.
187
182
  module ChangeDetectionType
188
183
  extend ContextDev::Internal::Type::Enum
189
184
 
@@ -272,11 +267,7 @@ module ContextDev
272
267
  end
273
268
  end
274
269
 
275
- # Monitor lifecycle status. `failed` means the most recent run failed (see the
276
- # monitor's `last_error`); failed monitors keep running on schedule and flip back
277
- # to `active` on the next successful run. Monitors are auto-`paused` after
278
- # repeated consecutive failures or insufficient-credit skips; resume by PATCHing
279
- # status to `active`.
270
+ # Filter monitors by lifecycle status.
280
271
  module Status
281
272
  extend ContextDev::Internal::Type::Enum
282
273
 
@@ -300,6 +291,7 @@ module ContextDev
300
291
  end
301
292
  end
302
293
 
294
+ # Filter by target type.
303
295
  module TargetType
304
296
  extend ContextDev::Internal::Type::Enum
305
297
 
@@ -156,6 +156,7 @@ module ContextDev
156
156
  attr_accessor :next_run_at
157
157
 
158
158
  # User-defined tags for grouping and filtering monitors and their changes.
159
+ # Duplicates are removed.
159
160
  sig { returns(T.nilable(T::Array[String])) }
160
161
  attr_reader :tags
161
162
 
@@ -285,6 +286,7 @@ module ContextDev
285
286
  # When the next scheduled run is due.
286
287
  next_run_at: nil,
287
288
  # User-defined tags for grouping and filtering monitors and their changes.
289
+ # Duplicates are removed.
288
290
  tags: nil,
289
291
  webhook: nil,
290
292
  # Present while webhook deliveries are failing consecutively; null when deliveries
@@ -389,9 +391,10 @@ module ContextDev
389
391
  sig { params(confidence_threshold: Float).void }
390
392
  attr_writer :confidence_threshold
391
393
 
392
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
393
- # paraphrase-only differences. Which changes are meaningful is judged against the
394
- # extract target's `instructions` (and `schema`, when provided).
394
+ # Detect meaning-level changes to page content, ignoring cosmetic or
395
+ # instruction-irrelevant differences. Which changes are meaningful is judged
396
+ # against the page or extract target's `instructions` (and an extract target's
397
+ # `schema`, when provided).
395
398
  sig do
396
399
  params(confidence_threshold: Float, type: Symbol).returns(
397
400
  T.attached_class
@@ -652,6 +655,14 @@ module ContextDev
652
655
  sig { returns(String) }
653
656
  attr_accessor :url
654
657
 
658
+ # Plain-language goal describing which page changes matter. When provided without
659
+ # change_detection, semantic detection is inferred.
660
+ sig { returns(T.nilable(String)) }
661
+ attr_reader :instructions
662
+
663
+ sig { params(instructions: String).void }
664
+ attr_writer :instructions
665
+
655
666
  # Normalize whitespace before comparing or analyzing text.
656
667
  sig { returns(T.nilable(T::Boolean)) }
657
668
  attr_reader :normalize_whitespace
@@ -659,16 +670,21 @@ module ContextDev
659
670
  sig { params(normalize_whitespace: T::Boolean).void }
660
671
  attr_writer :normalize_whitespace
661
672
 
662
- # Watch a single web page.
673
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
674
+ # detection judges confirmed stable diffs against `instructions`.
663
675
  sig do
664
676
  params(
665
677
  url: String,
678
+ instructions: String,
666
679
  normalize_whitespace: T::Boolean,
667
680
  type: Symbol
668
681
  ).returns(T.attached_class)
669
682
  end
670
683
  def self.new(
671
684
  url:,
685
+ # Plain-language goal describing which page changes matter. When provided without
686
+ # change_detection, semantic detection is inferred.
687
+ instructions: nil,
672
688
  # Normalize whitespace before comparing or analyzing text.
673
689
  normalize_whitespace: nil,
674
690
  type: :page
@@ -677,7 +693,12 @@ module ContextDev
677
693
 
678
694
  sig do
679
695
  override.returns(
680
- { type: Symbol, url: String, normalize_whitespace: T::Boolean }
696
+ {
697
+ type: Symbol,
698
+ url: String,
699
+ instructions: String,
700
+ normalize_whitespace: T::Boolean
701
+ }
681
702
  )
682
703
  end
683
704
  def to_hash
@@ -700,14 +721,14 @@ module ContextDev
700
721
  sig { returns(String) }
701
722
  attr_accessor :url
702
723
 
703
- # URL path patterns to exclude.
724
+ # URL path patterns to exclude (max 50).
704
725
  sig { returns(T.nilable(T::Array[String])) }
705
726
  attr_reader :exclude
706
727
 
707
728
  sig { params(exclude: T::Array[String]).void }
708
729
  attr_writer :exclude
709
730
 
710
- # URL path patterns to include.
731
+ # URL path patterns to include (max 50).
711
732
  sig { returns(T.nilable(T::Array[String])) }
712
733
  attr_reader :include
713
734
 
@@ -738,9 +759,9 @@ module ContextDev
738
759
  def self.new(
739
760
  # Sitemap URL to monitor.
740
761
  url:,
741
- # URL path patterns to exclude.
762
+ # URL path patterns to exclude (max 50).
742
763
  exclude: nil,
743
- # URL path patterns to include.
764
+ # URL path patterns to include (max 50).
744
765
  include: nil,
745
766
  # Maximum number of sitemap URLs to track (capped at 10,000).
746
767
  max_urls: nil,
@@ -17,20 +17,21 @@ module ContextDev
17
17
  sig { returns(String) }
18
18
  attr_accessor :monitor_id
19
19
 
20
+ # Opaque pagination cursor from a previous response.
20
21
  sig { returns(T.nilable(String)) }
21
22
  attr_reader :cursor
22
23
 
23
24
  sig { params(cursor: String).void }
24
25
  attr_writer :cursor
25
26
 
27
+ # Maximum number of items to return per page (1-100). Defaults to 25.
26
28
  sig { returns(T.nilable(Integer)) }
27
29
  attr_reader :limit
28
30
 
29
31
  sig { params(limit: Integer).void }
30
32
  attr_writer :limit
31
33
 
32
- # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
33
- # (insufficient credits, monitor paused, or superseded by a concurrent run).
34
+ # Filter runs by lifecycle status.
34
35
  sig do
35
36
  returns(T.nilable(ContextDev::MonitorListRunsParams::Status::OrSymbol))
36
37
  end
@@ -52,10 +53,11 @@ module ContextDev
52
53
  end
53
54
  def self.new(
54
55
  monitor_id:,
56
+ # Opaque pagination cursor from a previous response.
55
57
  cursor: nil,
58
+ # Maximum number of items to return per page (1-100). Defaults to 25.
56
59
  limit: nil,
57
- # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
58
- # (insufficient credits, monitor paused, or superseded by a concurrent run).
60
+ # Filter runs by lifecycle status.
59
61
  status: nil,
60
62
  request_options: {}
61
63
  )
@@ -75,8 +77,7 @@ module ContextDev
75
77
  def to_hash
76
78
  end
77
79
 
78
- # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
79
- # (insufficient credits, monitor paused, or superseded by a concurrent run).
80
+ # Filter runs by lifecycle status.
80
81
  module Status
81
82
  extend ContextDev::Internal::Type::Enum
82
83
 
@@ -44,6 +44,7 @@ module ContextDev
44
44
  attr_accessor :summary
45
45
 
46
46
  # User-defined tags for grouping and filtering monitors and their changes.
47
+ # Duplicates are removed.
47
48
  sig { returns(T::Array[String]) }
48
49
  attr_accessor :tags
49
50
 
@@ -213,6 +214,7 @@ module ContextDev
213
214
  run_id:,
214
215
  summary:,
215
216
  # User-defined tags for grouping and filtering monitors and their changes.
217
+ # Duplicates are removed.
216
218
  tags:,
217
219
  target_type:,
218
220
  title:,
@@ -112,6 +112,7 @@ module ContextDev
112
112
  attr_accessor :next_run_at
113
113
 
114
114
  # User-defined tags for grouping and filtering monitors and their changes.
115
+ # Duplicates are removed.
115
116
  sig { returns(T.nilable(T::Array[String])) }
116
117
  attr_reader :tags
117
118
 
@@ -236,6 +237,7 @@ module ContextDev
236
237
  # When the next scheduled run is due.
237
238
  next_run_at: nil,
238
239
  # User-defined tags for grouping and filtering monitors and their changes.
240
+ # Duplicates are removed.
239
241
  tags: nil,
240
242
  webhook: nil,
241
243
  # Present while webhook deliveries are failing consecutively; null when deliveries
@@ -336,9 +338,10 @@ module ContextDev
336
338
  sig { params(confidence_threshold: Float).void }
337
339
  attr_writer :confidence_threshold
338
340
 
339
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
340
- # paraphrase-only differences. Which changes are meaningful is judged against the
341
- # extract target's `instructions` (and `schema`, when provided).
341
+ # Detect meaning-level changes to page content, ignoring cosmetic or
342
+ # instruction-irrelevant differences. Which changes are meaningful is judged
343
+ # against the page or extract target's `instructions` (and an extract target's
344
+ # `schema`, when provided).
342
345
  sig do
343
346
  params(confidence_threshold: Float, type: Symbol).returns(
344
347
  T.attached_class
@@ -596,6 +599,14 @@ module ContextDev
596
599
  sig { returns(String) }
597
600
  attr_accessor :url
598
601
 
602
+ # Plain-language goal describing which page changes matter. When provided without
603
+ # change_detection, semantic detection is inferred.
604
+ sig { returns(T.nilable(String)) }
605
+ attr_reader :instructions
606
+
607
+ sig { params(instructions: String).void }
608
+ attr_writer :instructions
609
+
599
610
  # Normalize whitespace before comparing or analyzing text.
600
611
  sig { returns(T.nilable(T::Boolean)) }
601
612
  attr_reader :normalize_whitespace
@@ -603,16 +614,21 @@ module ContextDev
603
614
  sig { params(normalize_whitespace: T::Boolean).void }
604
615
  attr_writer :normalize_whitespace
605
616
 
606
- # Watch a single web page.
617
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
618
+ # detection judges confirmed stable diffs against `instructions`.
607
619
  sig do
608
620
  params(
609
621
  url: String,
622
+ instructions: String,
610
623
  normalize_whitespace: T::Boolean,
611
624
  type: Symbol
612
625
  ).returns(T.attached_class)
613
626
  end
614
627
  def self.new(
615
628
  url:,
629
+ # Plain-language goal describing which page changes matter. When provided without
630
+ # change_detection, semantic detection is inferred.
631
+ instructions: nil,
616
632
  # Normalize whitespace before comparing or analyzing text.
617
633
  normalize_whitespace: nil,
618
634
  type: :page
@@ -621,7 +637,12 @@ module ContextDev
621
637
 
622
638
  sig do
623
639
  override.returns(
624
- { type: Symbol, url: String, normalize_whitespace: T::Boolean }
640
+ {
641
+ type: Symbol,
642
+ url: String,
643
+ instructions: String,
644
+ normalize_whitespace: T::Boolean
645
+ }
625
646
  )
626
647
  end
627
648
  def to_hash
@@ -644,14 +665,14 @@ module ContextDev
644
665
  sig { returns(String) }
645
666
  attr_accessor :url
646
667
 
647
- # URL path patterns to exclude.
668
+ # URL path patterns to exclude (max 50).
648
669
  sig { returns(T.nilable(T::Array[String])) }
649
670
  attr_reader :exclude
650
671
 
651
672
  sig { params(exclude: T::Array[String]).void }
652
673
  attr_writer :exclude
653
674
 
654
- # URL path patterns to include.
675
+ # URL path patterns to include (max 50).
655
676
  sig { returns(T.nilable(T::Array[String])) }
656
677
  attr_reader :include
657
678
 
@@ -682,9 +703,9 @@ module ContextDev
682
703
  def self.new(
683
704
  # Sitemap URL to monitor.
684
705
  url:,
685
- # URL path patterns to exclude.
706
+ # URL path patterns to exclude (max 50).
686
707
  exclude: nil,
687
- # URL path patterns to include.
708
+ # URL path patterns to include (max 50).
688
709
  include: nil,
689
710
  # Maximum number of sitemap URLs to track (capped at 10,000).
690
711
  max_urls: nil,
@@ -66,6 +66,7 @@ module ContextDev
66
66
  attr_writer :status
67
67
 
68
68
  # User-defined tags for grouping and filtering monitors and their changes.
69
+ # Duplicates are removed.
69
70
  sig { returns(T.nilable(T::Array[String])) }
70
71
  attr_reader :tags
71
72
 
@@ -142,6 +143,7 @@ module ContextDev
142
143
  schedule: nil,
143
144
  status: nil,
144
145
  # User-defined tags for grouping and filtering monitors and their changes.
146
+ # Duplicates are removed.
145
147
  tags: nil,
146
148
  # Discriminated union describing what the monitor watches.
147
149
  target: nil,
@@ -231,9 +233,10 @@ module ContextDev
231
233
  sig { params(confidence_threshold: Float).void }
232
234
  attr_writer :confidence_threshold
233
235
 
234
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
235
- # paraphrase-only differences. Which changes are meaningful is judged against the
236
- # extract target's `instructions` (and `schema`, when provided).
236
+ # Detect meaning-level changes to page content, ignoring cosmetic or
237
+ # instruction-irrelevant differences. Which changes are meaningful is judged
238
+ # against the page or extract target's `instructions` (and an extract target's
239
+ # `schema`, when provided).
237
240
  sig do
238
241
  params(confidence_threshold: Float, type: Symbol).returns(
239
242
  T.attached_class
@@ -429,6 +432,14 @@ module ContextDev
429
432
  sig { returns(String) }
430
433
  attr_accessor :url
431
434
 
435
+ # Plain-language goal describing which page changes matter. When provided without
436
+ # change_detection, semantic detection is inferred.
437
+ sig { returns(T.nilable(String)) }
438
+ attr_reader :instructions
439
+
440
+ sig { params(instructions: String).void }
441
+ attr_writer :instructions
442
+
432
443
  # Normalize whitespace before comparing or analyzing text.
433
444
  sig { returns(T.nilable(T::Boolean)) }
434
445
  attr_reader :normalize_whitespace
@@ -436,16 +447,21 @@ module ContextDev
436
447
  sig { params(normalize_whitespace: T::Boolean).void }
437
448
  attr_writer :normalize_whitespace
438
449
 
439
- # Watch a single web page.
450
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
451
+ # detection judges confirmed stable diffs against `instructions`.
440
452
  sig do
441
453
  params(
442
454
  url: String,
455
+ instructions: String,
443
456
  normalize_whitespace: T::Boolean,
444
457
  type: Symbol
445
458
  ).returns(T.attached_class)
446
459
  end
447
460
  def self.new(
448
461
  url:,
462
+ # Plain-language goal describing which page changes matter. When provided without
463
+ # change_detection, semantic detection is inferred.
464
+ instructions: nil,
449
465
  # Normalize whitespace before comparing or analyzing text.
450
466
  normalize_whitespace: nil,
451
467
  type: :page
@@ -454,7 +470,12 @@ module ContextDev
454
470
 
455
471
  sig do
456
472
  override.returns(
457
- { type: Symbol, url: String, normalize_whitespace: T::Boolean }
473
+ {
474
+ type: Symbol,
475
+ url: String,
476
+ instructions: String,
477
+ normalize_whitespace: T::Boolean
478
+ }
458
479
  )
459
480
  end
460
481
  def to_hash
@@ -477,14 +498,14 @@ module ContextDev
477
498
  sig { returns(String) }
478
499
  attr_accessor :url
479
500
 
480
- # URL path patterns to exclude.
501
+ # URL path patterns to exclude (max 50).
481
502
  sig { returns(T.nilable(T::Array[String])) }
482
503
  attr_reader :exclude
483
504
 
484
505
  sig { params(exclude: T::Array[String]).void }
485
506
  attr_writer :exclude
486
507
 
487
- # URL path patterns to include.
508
+ # URL path patterns to include (max 50).
488
509
  sig { returns(T.nilable(T::Array[String])) }
489
510
  attr_reader :include
490
511
 
@@ -515,9 +536,9 @@ module ContextDev
515
536
  def self.new(
516
537
  # Sitemap URL to monitor.
517
538
  url:,
518
- # URL path patterns to exclude.
539
+ # URL path patterns to exclude (max 50).
519
540
  exclude: nil,
520
- # URL path patterns to include.
541
+ # URL path patterns to include (max 50).
521
542
  include: nil,
522
543
  # Maximum number of sitemap URLs to track (capped at 10,000).
523
544
  max_urls: nil,
@@ -107,6 +107,7 @@ module ContextDev
107
107
  attr_accessor :next_run_at
108
108
 
109
109
  # User-defined tags for grouping and filtering monitors and their changes.
110
+ # Duplicates are removed.
110
111
  sig { returns(T.nilable(T::Array[String])) }
111
112
  attr_reader :tags
112
113
 
@@ -230,6 +231,7 @@ module ContextDev
230
231
  # When the next scheduled run is due.
231
232
  next_run_at: nil,
232
233
  # User-defined tags for grouping and filtering monitors and their changes.
234
+ # Duplicates are removed.
233
235
  tags: nil,
234
236
  webhook: nil,
235
237
  # Present while webhook deliveries are failing consecutively; null when deliveries
@@ -328,9 +330,10 @@ module ContextDev
328
330
  sig { params(confidence_threshold: Float).void }
329
331
  attr_writer :confidence_threshold
330
332
 
331
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
332
- # paraphrase-only differences. Which changes are meaningful is judged against the
333
- # extract target's `instructions` (and `schema`, when provided).
333
+ # Detect meaning-level changes to page content, ignoring cosmetic or
334
+ # instruction-irrelevant differences. Which changes are meaningful is judged
335
+ # against the page or extract target's `instructions` (and an extract target's
336
+ # `schema`, when provided).
334
337
  sig do
335
338
  params(confidence_threshold: Float, type: Symbol).returns(
336
339
  T.attached_class
@@ -588,6 +591,14 @@ module ContextDev
588
591
  sig { returns(String) }
589
592
  attr_accessor :url
590
593
 
594
+ # Plain-language goal describing which page changes matter. When provided without
595
+ # change_detection, semantic detection is inferred.
596
+ sig { returns(T.nilable(String)) }
597
+ attr_reader :instructions
598
+
599
+ sig { params(instructions: String).void }
600
+ attr_writer :instructions
601
+
591
602
  # Normalize whitespace before comparing or analyzing text.
592
603
  sig { returns(T.nilable(T::Boolean)) }
593
604
  attr_reader :normalize_whitespace
@@ -595,16 +606,21 @@ module ContextDev
595
606
  sig { params(normalize_whitespace: T::Boolean).void }
596
607
  attr_writer :normalize_whitespace
597
608
 
598
- # Watch a single web page.
609
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
610
+ # detection judges confirmed stable diffs against `instructions`.
599
611
  sig do
600
612
  params(
601
613
  url: String,
614
+ instructions: String,
602
615
  normalize_whitespace: T::Boolean,
603
616
  type: Symbol
604
617
  ).returns(T.attached_class)
605
618
  end
606
619
  def self.new(
607
620
  url:,
621
+ # Plain-language goal describing which page changes matter. When provided without
622
+ # change_detection, semantic detection is inferred.
623
+ instructions: nil,
608
624
  # Normalize whitespace before comparing or analyzing text.
609
625
  normalize_whitespace: nil,
610
626
  type: :page
@@ -613,7 +629,12 @@ module ContextDev
613
629
 
614
630
  sig do
615
631
  override.returns(
616
- { type: Symbol, url: String, normalize_whitespace: T::Boolean }
632
+ {
633
+ type: Symbol,
634
+ url: String,
635
+ instructions: String,
636
+ normalize_whitespace: T::Boolean
637
+ }
617
638
  )
618
639
  end
619
640
  def to_hash
@@ -636,14 +657,14 @@ module ContextDev
636
657
  sig { returns(String) }
637
658
  attr_accessor :url
638
659
 
639
- # URL path patterns to exclude.
660
+ # URL path patterns to exclude (max 50).
640
661
  sig { returns(T.nilable(T::Array[String])) }
641
662
  attr_reader :exclude
642
663
 
643
664
  sig { params(exclude: T::Array[String]).void }
644
665
  attr_writer :exclude
645
666
 
646
- # URL path patterns to include.
667
+ # URL path patterns to include (max 50).
647
668
  sig { returns(T.nilable(T::Array[String])) }
648
669
  attr_reader :include
649
670
 
@@ -674,9 +695,9 @@ module ContextDev
674
695
  def self.new(
675
696
  # Sitemap URL to monitor.
676
697
  url:,
677
- # URL path patterns to exclude.
698
+ # URL path patterns to exclude (max 50).
678
699
  exclude: nil,
679
- # URL path patterns to include.
700
+ # URL path patterns to include (max 50).
680
701
  include: nil,
681
702
  # Maximum number of sitemap URLs to track (capped at 10,000).
682
703
  max_urls: nil,