context.dev 2.5.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/client.rb +4 -0
  5. data/lib/context_dev/models/batch_cancel_params.rb +22 -0
  6. data/lib/context_dev/models/batch_cancel_response.rb +354 -0
  7. data/lib/context_dev/models/batch_get_results_params.rb +42 -0
  8. data/lib/context_dev/models/batch_get_results_response.rb +463 -0
  9. data/lib/context_dev/models/batch_list_params.rb +94 -0
  10. data/lib/context_dev/models/batch_list_response.rb +388 -0
  11. data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
  12. data/lib/context_dev/models/batch_retrieve_response.rb +390 -0
  13. data/lib/context_dev/models/batch_submit_params.rb +56 -0
  14. data/lib/context_dev/models/batch_submit_response.rb +614 -0
  15. data/lib/context_dev/models/error.rb +26 -0
  16. data/lib/context_dev/models/error_count.rb +26 -0
  17. data/lib/context_dev/models/monitor_create_params.rb +141 -127
  18. data/lib/context_dev/models/monitor_create_response.rb +34 -10
  19. data/lib/context_dev/models/monitor_list_response.rb +21 -7
  20. data/lib/context_dev/models/monitor_retrieve_response.rb +21 -7
  21. data/lib/context_dev/models/monitor_update_params.rb +21 -7
  22. data/lib/context_dev/models/monitor_update_response.rb +21 -7
  23. data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
  24. data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
  25. data/lib/context_dev/models.rb +14 -0
  26. data/lib/context_dev/resources/batch.rb +155 -0
  27. data/lib/context_dev/resources/monitors.rb +5 -5
  28. data/lib/context_dev/version.rb +1 -1
  29. data/lib/context_dev.rb +13 -0
  30. data/rbi/context_dev/client.rbi +3 -0
  31. data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
  32. data/rbi/context_dev/models/batch_cancel_response.rbi +642 -0
  33. data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
  34. data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
  35. data/rbi/context_dev/models/batch_list_params.rbi +166 -0
  36. data/rbi/context_dev/models/batch_list_response.rbi +738 -0
  37. data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
  38. data/rbi/context_dev/models/batch_retrieve_response.rbi +707 -0
  39. data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
  40. data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
  41. data/rbi/context_dev/models/error.rbi +32 -0
  42. data/rbi/context_dev/models/error_count.rbi +34 -0
  43. data/rbi/context_dev/models/monitor_create_params.rbi +274 -242
  44. data/rbi/context_dev/models/monitor_create_response.rbi +38 -7
  45. data/rbi/context_dev/models/monitor_list_response.rbi +24 -5
  46. data/rbi/context_dev/models/monitor_retrieve_response.rbi +24 -5
  47. data/rbi/context_dev/models/monitor_update_params.rbi +24 -5
  48. data/rbi/context_dev/models/monitor_update_response.rbi +24 -5
  49. data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
  50. data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
  51. data/rbi/context_dev/models.rbi +14 -0
  52. data/rbi/context_dev/resources/batch.rbi +120 -0
  53. data/rbi/context_dev/resources/monitors.rbi +12 -12
  54. data/sig/context_dev/client.rbs +2 -0
  55. data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
  56. data/sig/context_dev/models/batch_cancel_response.rbs +266 -0
  57. data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
  58. data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
  59. data/sig/context_dev/models/batch_list_params.rbs +94 -0
  60. data/sig/context_dev/models/batch_list_response.rbs +304 -0
  61. data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
  62. data/sig/context_dev/models/batch_retrieve_response.rbs +290 -0
  63. data/sig/context_dev/models/batch_submit_params.rbs +52 -0
  64. data/sig/context_dev/models/batch_submit_response.rbs +542 -0
  65. data/sig/context_dev/models/error.rbs +15 -0
  66. data/sig/context_dev/models/error_count.rbs +15 -0
  67. data/sig/context_dev/models/monitor_create_params.rbs +117 -97
  68. data/sig/context_dev/models/monitor_create_response.rbs +18 -1
  69. data/sig/context_dev/models/monitor_list_response.rbs +13 -1
  70. data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
  71. data/sig/context_dev/models/monitor_update_params.rbs +13 -1
  72. data/sig/context_dev/models/monitor_update_response.rbs +13 -1
  73. data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
  74. data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
  75. data/sig/context_dev/models.rbs +14 -0
  76. data/sig/context_dev/resources/batch.rbs +41 -0
  77. data/sig/context_dev/resources/monitors.rbs +2 -2
  78. metadata +41 -2
@@ -7,31 +7,23 @@ module ContextDev
7
7
  extend ContextDev::Internal::Type::RequestParameters::Converter
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute change_detection
11
- # Discriminated union describing how changes are detected.
12
- #
13
- # @return [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic]
14
- required :change_detection, union: -> { ContextDev::MonitorCreateParams::ChangeDetection }
15
-
16
10
  # @!attribute name
17
11
  #
18
12
  # @return [String]
19
13
  required :name, String
20
14
 
21
- # @!attribute schedule
22
- # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
23
- # every 6 hours or every 2 days. The total interval (frequency × unit) must be
24
- # between 10 minutes and 1 year.
25
- #
26
- # @return [ContextDev::Models::MonitorCreateParams::Schedule]
27
- required :schedule, -> { ContextDev::MonitorCreateParams::Schedule }
28
-
29
15
  # @!attribute target
30
16
  # Discriminated union describing what the monitor watches.
31
17
  #
32
18
  # @return [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract]
33
19
  required :target, union: -> { ContextDev::MonitorCreateParams::Target }
34
20
 
21
+ # @!attribute change_detection
22
+ # Discriminated union describing how changes are detected.
23
+ #
24
+ # @return [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic, nil]
25
+ optional :change_detection, union: -> { ContextDev::MonitorCreateParams::ChangeDetection }
26
+
35
27
  # @!attribute mode
36
28
  # Top-level monitor category. Always `web` today; the concrete behavior is
37
29
  # described by `target` and `change_detection`.
@@ -39,6 +31,14 @@ module ContextDev
39
31
  # @return [Symbol, ContextDev::Models::MonitorCreateParams::Mode, nil]
40
32
  optional :mode, enum: -> { ContextDev::MonitorCreateParams::Mode }
41
33
 
34
+ # @!attribute schedule
35
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
36
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
37
+ # between 10 minutes and 1 year.
38
+ #
39
+ # @return [ContextDev::Models::MonitorCreateParams::Schedule, nil]
40
+ optional :schedule, -> { ContextDev::MonitorCreateParams::Schedule }
41
+
42
42
  # @!attribute tags
43
43
  # User-defined tags for grouping and filtering monitors and their changes.
44
44
  # Duplicates are removed.
@@ -51,138 +51,33 @@ module ContextDev
51
51
  # @return [ContextDev::Models::MonitorCreateParams::Webhook, nil]
52
52
  optional :webhook, -> { ContextDev::MonitorCreateParams::Webhook }, nil?: true
53
53
 
54
- # @!method initialize(change_detection:, name:, schedule:, target:, mode: nil, tags: nil, webhook: nil, request_options: {})
54
+ # @!method initialize(name:, target:, change_detection: nil, mode: nil, schedule: nil, tags: nil, webhook: nil, request_options: {})
55
55
  # Some parameter documentations has been truncated, see
56
56
  # {ContextDev::Models::MonitorCreateParams} for more details.
57
57
  #
58
- # @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
59
- #
60
58
  # @param name [String]
61
59
  #
62
- # @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
63
- #
64
60
  # @param target [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract] Discriminated union describing what the monitor watches.
65
61
  #
62
+ # @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
63
+ #
66
64
  # @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
67
65
  #
66
+ # @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
67
+ #
68
68
  # @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes. Duplica
69
69
  #
70
70
  # @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
71
71
  #
72
72
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
73
73
 
74
- # Discriminated union describing how changes are detected.
75
- module ChangeDetection
76
- extend ContextDev::Internal::Type::Union
77
-
78
- discriminator :type
79
-
80
- # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
81
- variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }
82
-
83
- # 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).
84
- variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }
85
-
86
- class Exact < ContextDev::Internal::Type::BaseModel
87
- # @!attribute type
88
- #
89
- # @return [Symbol, :exact]
90
- required :type, const: :exact
91
-
92
- # @!method initialize(type: :exact)
93
- # Detect exact changes. For page targets, this means visible text diffs. For
94
- # sitemap targets, this means URL additions and removals.
95
- #
96
- # @param type [Symbol, :exact]
97
- end
98
-
99
- class Semantic < ContextDev::Internal::Type::BaseModel
100
- # @!attribute type
101
- #
102
- # @return [Symbol, :semantic]
103
- required :type, const: :semantic
104
-
105
- # @!attribute confidence_threshold
106
- #
107
- # @return [Float, nil]
108
- optional :confidence_threshold, Float
109
-
110
- # @!method initialize(confidence_threshold: nil, type: :semantic)
111
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
112
- # paraphrase-only differences. Which changes are meaningful is judged against the
113
- # extract target's `instructions` (and `schema`, when provided).
114
- #
115
- # @param confidence_threshold [Float]
116
- # @param type [Symbol, :semantic]
117
- end
118
-
119
- # @!method self.variants
120
- # @return [Array(ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic)]
121
- end
122
-
123
- class Schedule < ContextDev::Internal::Type::BaseModel
124
- # @!attribute frequency
125
- # Number of units between runs. The resulting interval (frequency × unit) must be
126
- # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
127
- # maximum 365 when unit is days).
128
- #
129
- # @return [Integer]
130
- required :frequency, Integer
131
-
132
- # @!attribute type
133
- #
134
- # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
135
- required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }
136
-
137
- # @!attribute unit
138
- #
139
- # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
140
- required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }
141
-
142
- # @!method initialize(frequency:, type:, unit:)
143
- # Some parameter documentations has been truncated, see
144
- # {ContextDev::Models::MonitorCreateParams::Schedule} for more details.
145
- #
146
- # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
147
- # every 6 hours or every 2 days. The total interval (frequency × unit) must be
148
- # between 10 minutes and 1 year.
149
- #
150
- # @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
151
- #
152
- # @param type [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
153
- #
154
- # @param unit [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
155
-
156
- # @see ContextDev::Models::MonitorCreateParams::Schedule#type
157
- module Type
158
- extend ContextDev::Internal::Type::Enum
159
-
160
- INTERVAL = :interval
161
-
162
- # @!method self.values
163
- # @return [Array<Symbol>]
164
- end
165
-
166
- # @see ContextDev::Models::MonitorCreateParams::Schedule#unit
167
- module Unit
168
- extend ContextDev::Internal::Type::Enum
169
-
170
- MINUTES = :minutes
171
- HOURS = :hours
172
- DAYS = :days
173
-
174
- # @!method self.values
175
- # @return [Array<Symbol>]
176
- end
177
- end
178
-
179
74
  # Discriminated union describing what the monitor watches.
180
75
  module Target
181
76
  extend ContextDev::Internal::Type::Union
182
77
 
183
78
  discriminator :type
184
79
 
185
- # Watch a single web page.
80
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
186
81
  variant :page, -> { ContextDev::MonitorCreateParams::Target::Page }
187
82
 
188
83
  # 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.
@@ -202,17 +97,30 @@ module ContextDev
202
97
  # @return [String]
203
98
  required :url, String
204
99
 
100
+ # @!attribute instructions
101
+ # Plain-language goal describing which page changes matter. When provided without
102
+ # change_detection, semantic detection is inferred.
103
+ #
104
+ # @return [String, nil]
105
+ optional :instructions, String
106
+
205
107
  # @!attribute normalize_whitespace
206
108
  # Normalize whitespace before comparing or analyzing text.
207
109
  #
208
110
  # @return [Boolean, nil]
209
111
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
210
112
 
211
- # @!method initialize(url:, normalize_whitespace: nil, type: :page)
212
- # Watch a single web page.
113
+ # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
114
+ # Some parameter documentations has been truncated, see
115
+ # {ContextDev::Models::MonitorCreateParams::Target::Page} for more details.
116
+ #
117
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
118
+ # detection judges confirmed stable diffs against `instructions`.
213
119
  #
214
120
  # @param url [String]
215
121
  #
122
+ # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
123
+ #
216
124
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
217
125
  #
218
126
  # @param type [Symbol, :page]
@@ -344,6 +252,56 @@ module ContextDev
344
252
  # @return [Array(ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract)]
345
253
  end
346
254
 
255
+ # Discriminated union describing how changes are detected.
256
+ module ChangeDetection
257
+ extend ContextDev::Internal::Type::Union
258
+
259
+ discriminator :type
260
+
261
+ # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
262
+ variant :exact, -> { ContextDev::MonitorCreateParams::ChangeDetection::Exact }
263
+
264
+ # Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
265
+ variant :semantic, -> { ContextDev::MonitorCreateParams::ChangeDetection::Semantic }
266
+
267
+ class Exact < ContextDev::Internal::Type::BaseModel
268
+ # @!attribute type
269
+ #
270
+ # @return [Symbol, :exact]
271
+ required :type, const: :exact
272
+
273
+ # @!method initialize(type: :exact)
274
+ # Detect exact changes. For page targets, this means visible text diffs. For
275
+ # sitemap targets, this means URL additions and removals.
276
+ #
277
+ # @param type [Symbol, :exact]
278
+ end
279
+
280
+ class Semantic < ContextDev::Internal::Type::BaseModel
281
+ # @!attribute type
282
+ #
283
+ # @return [Symbol, :semantic]
284
+ required :type, const: :semantic
285
+
286
+ # @!attribute confidence_threshold
287
+ #
288
+ # @return [Float, nil]
289
+ optional :confidence_threshold, Float
290
+
291
+ # @!method initialize(confidence_threshold: nil, type: :semantic)
292
+ # Detect meaning-level changes to page content, ignoring cosmetic or
293
+ # instruction-irrelevant differences. Which changes are meaningful is judged
294
+ # against the page or extract target's `instructions` (and an extract target's
295
+ # `schema`, when provided).
296
+ #
297
+ # @param confidence_threshold [Float]
298
+ # @param type [Symbol, :semantic]
299
+ end
300
+
301
+ # @!method self.variants
302
+ # @return [Array(ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic)]
303
+ end
304
+
347
305
  # Top-level monitor category. Always `web` today; the concrete behavior is
348
306
  # described by `target` and `change_detection`.
349
307
  module Mode
@@ -355,6 +313,62 @@ module ContextDev
355
313
  # @return [Array<Symbol>]
356
314
  end
357
315
 
316
+ class Schedule < ContextDev::Internal::Type::BaseModel
317
+ # @!attribute frequency
318
+ # Number of units between runs. The resulting interval (frequency × unit) must be
319
+ # at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes;
320
+ # maximum 365 when unit is days).
321
+ #
322
+ # @return [Integer]
323
+ required :frequency, Integer
324
+
325
+ # @!attribute type
326
+ #
327
+ # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
328
+ required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }
329
+
330
+ # @!attribute unit
331
+ #
332
+ # @return [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
333
+ required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }
334
+
335
+ # @!method initialize(frequency:, type:, unit:)
336
+ # Some parameter documentations has been truncated, see
337
+ # {ContextDev::Models::MonitorCreateParams::Schedule} for more details.
338
+ #
339
+ # Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
340
+ # every 6 hours or every 2 days. The total interval (frequency × unit) must be
341
+ # between 10 minutes and 1 year.
342
+ #
343
+ # @param frequency [Integer] Number of units between runs. The resulting interval (frequency × unit) must be
344
+ #
345
+ # @param type [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Type]
346
+ #
347
+ # @param unit [Symbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit]
348
+
349
+ # @see ContextDev::Models::MonitorCreateParams::Schedule#type
350
+ module Type
351
+ extend ContextDev::Internal::Type::Enum
352
+
353
+ INTERVAL = :interval
354
+
355
+ # @!method self.values
356
+ # @return [Array<Symbol>]
357
+ end
358
+
359
+ # @see ContextDev::Models::MonitorCreateParams::Schedule#unit
360
+ module Unit
361
+ extend ContextDev::Internal::Type::Enum
362
+
363
+ MINUTES = :minutes
364
+ HOURS = :hours
365
+ DAYS = :days
366
+
367
+ # @!method self.values
368
+ # @return [Array<Symbol>]
369
+ end
370
+ end
371
+
358
372
  class Webhook < ContextDev::Internal::Type::BaseModel
359
373
  # @!attribute url
360
374
  # Webhook URL events are delivered to.
@@ -20,6 +20,14 @@ module ContextDev
20
20
  # @return [Time]
21
21
  required :created_at, Time
22
22
 
23
+ # @!attribute initial_run_id
24
+ # The baseline run queued by this create call, or null if it could not be queued
25
+ # immediately (in which case the baseline runs on the next scheduled tick). Poll
26
+ # GET /monitors/{monitor_id}/runs/{run_id}.
27
+ #
28
+ # @return [String, nil]
29
+ required :initial_run_id, String, nil?: true
30
+
23
31
  # @!attribute mode
24
32
  # Top-level monitor category. Always `web` today; the concrete behavior is
25
33
  # described by `target` and `change_detection`.
@@ -112,12 +120,12 @@ module ContextDev
112
120
  # @return [ContextDev::Models::MonitorCreateResponse::WebhookFailure, nil]
113
121
  optional :webhook_failure, -> { ContextDev::Models::MonitorCreateResponse::WebhookFailure }, nil?: true
114
122
 
115
- # @!method initialize(id:, change_detection:, created_at:, mode:, name:, schedule:, status:, target:, updated_at:, baseline: nil, last_change_at: nil, last_error: nil, last_run_at: nil, next_run_at: nil, tags: nil, webhook: nil, webhook_failure: nil)
123
+ # @!method initialize(id:, change_detection:, created_at:, initial_run_id:, mode:, name:, schedule:, status:, target:, updated_at:, baseline: nil, last_change_at: nil, last_error: nil, last_run_at: nil, next_run_at: nil, tags: nil, webhook: nil, webhook_failure: nil)
116
124
  # Some parameter documentations has been truncated, see
117
125
  # {ContextDev::Models::MonitorCreateResponse} for more details.
118
126
  #
119
- # A web monitor. `mode` is the constant `web`; behavior is described by `target`
120
- # (page/sitemap/extract) and `change_detection` (exact/semantic).
127
+ # A newly created monitor plus `initial_run_id`, the id of the baseline run queued
128
+ # at creation.
121
129
  #
122
130
  # @param id [String]
123
131
  #
@@ -125,6 +133,8 @@ module ContextDev
125
133
  #
126
134
  # @param created_at [Time]
127
135
  #
136
+ # @param initial_run_id [String, nil] The baseline run queued by this create call, or null if it could not be queued i
137
+ #
128
138
  # @param mode [Symbol, ContextDev::Models::MonitorCreateResponse::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
129
139
  #
130
140
  # @param name [String]
@@ -164,7 +174,7 @@ module ContextDev
164
174
  # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
165
175
  variant :exact, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Exact }
166
176
 
167
- # 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).
177
+ # Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
168
178
  variant :semantic, -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic }
169
179
 
170
180
  class Exact < ContextDev::Internal::Type::BaseModel
@@ -192,9 +202,10 @@ module ContextDev
192
202
  optional :confidence_threshold, Float
193
203
 
194
204
  # @!method initialize(confidence_threshold: nil, type: :semantic)
195
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
196
- # paraphrase-only differences. Which changes are meaningful is judged against the
197
- # extract target's `instructions` (and `schema`, when provided).
205
+ # Detect meaning-level changes to page content, ignoring cosmetic or
206
+ # instruction-irrelevant differences. Which changes are meaningful is judged
207
+ # against the page or extract target's `instructions` (and an extract target's
208
+ # `schema`, when provided).
198
209
  #
199
210
  # @param confidence_threshold [Float]
200
211
  # @param type [Symbol, :semantic]
@@ -300,7 +311,7 @@ module ContextDev
300
311
 
301
312
  discriminator :type
302
313
 
303
- # Watch a single web page.
314
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
304
315
  variant :page, -> { ContextDev::Models::MonitorCreateResponse::Target::Page }
305
316
 
306
317
  # 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.
@@ -320,17 +331,30 @@ module ContextDev
320
331
  # @return [String]
321
332
  required :url, String
322
333
 
334
+ # @!attribute instructions
335
+ # Plain-language goal describing which page changes matter. When provided without
336
+ # change_detection, semantic detection is inferred.
337
+ #
338
+ # @return [String, nil]
339
+ optional :instructions, String
340
+
323
341
  # @!attribute normalize_whitespace
324
342
  # Normalize whitespace before comparing or analyzing text.
325
343
  #
326
344
  # @return [Boolean, nil]
327
345
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
328
346
 
329
- # @!method initialize(url:, normalize_whitespace: nil, type: :page)
330
- # Watch a single web page.
347
+ # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
348
+ # Some parameter documentations has been truncated, see
349
+ # {ContextDev::Models::MonitorCreateResponse::Target::Page} for more details.
350
+ #
351
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
352
+ # detection judges confirmed stable diffs against `instructions`.
331
353
  #
332
354
  # @param url [String]
333
355
  #
356
+ # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
357
+ #
334
358
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
335
359
  #
336
360
  # @param type [Symbol, :page]
@@ -187,7 +187,7 @@ module ContextDev
187
187
  # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
188
188
  variant :exact, -> { ContextDev::Models::MonitorListResponse::Data::ChangeDetection::Exact }
189
189
 
190
- # 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).
190
+ # Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
191
191
  variant :semantic, -> { ContextDev::Models::MonitorListResponse::Data::ChangeDetection::Semantic }
192
192
 
193
193
  class Exact < ContextDev::Internal::Type::BaseModel
@@ -215,9 +215,10 @@ module ContextDev
215
215
  optional :confidence_threshold, Float
216
216
 
217
217
  # @!method initialize(confidence_threshold: nil, type: :semantic)
218
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
219
- # paraphrase-only differences. Which changes are meaningful is judged against the
220
- # extract target's `instructions` (and `schema`, when provided).
218
+ # Detect meaning-level changes to page content, ignoring cosmetic or
219
+ # instruction-irrelevant differences. Which changes are meaningful is judged
220
+ # against the page or extract target's `instructions` (and an extract target's
221
+ # `schema`, when provided).
221
222
  #
222
223
  # @param confidence_threshold [Float]
223
224
  # @param type [Symbol, :semantic]
@@ -323,7 +324,7 @@ module ContextDev
323
324
 
324
325
  discriminator :type
325
326
 
326
- # Watch a single web page.
327
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
327
328
  variant :page, -> { ContextDev::Models::MonitorListResponse::Data::Target::Page }
328
329
 
329
330
  # 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.
@@ -343,17 +344,30 @@ module ContextDev
343
344
  # @return [String]
344
345
  required :url, String
345
346
 
347
+ # @!attribute instructions
348
+ # Plain-language goal describing which page changes matter. When provided without
349
+ # change_detection, semantic detection is inferred.
350
+ #
351
+ # @return [String, nil]
352
+ optional :instructions, String
353
+
346
354
  # @!attribute normalize_whitespace
347
355
  # Normalize whitespace before comparing or analyzing text.
348
356
  #
349
357
  # @return [Boolean, nil]
350
358
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
351
359
 
352
- # @!method initialize(url:, normalize_whitespace: nil, type: :page)
353
- # Watch a single web page.
360
+ # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
361
+ # Some parameter documentations has been truncated, see
362
+ # {ContextDev::Models::MonitorListResponse::Data::Target::Page} for more details.
363
+ #
364
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
365
+ # detection judges confirmed stable diffs against `instructions`.
354
366
  #
355
367
  # @param url [String]
356
368
  #
369
+ # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
370
+ #
357
371
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
358
372
  #
359
373
  # @param type [Symbol, :page]
@@ -164,7 +164,7 @@ module ContextDev
164
164
  # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
165
165
  variant :exact, -> { ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Exact }
166
166
 
167
- # 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).
167
+ # Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
168
168
  variant :semantic, -> { ContextDev::Models::MonitorRetrieveResponse::ChangeDetection::Semantic }
169
169
 
170
170
  class Exact < ContextDev::Internal::Type::BaseModel
@@ -192,9 +192,10 @@ module ContextDev
192
192
  optional :confidence_threshold, Float
193
193
 
194
194
  # @!method initialize(confidence_threshold: nil, type: :semantic)
195
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
196
- # paraphrase-only differences. Which changes are meaningful is judged against the
197
- # extract target's `instructions` (and `schema`, when provided).
195
+ # Detect meaning-level changes to page content, ignoring cosmetic or
196
+ # instruction-irrelevant differences. Which changes are meaningful is judged
197
+ # against the page or extract target's `instructions` (and an extract target's
198
+ # `schema`, when provided).
198
199
  #
199
200
  # @param confidence_threshold [Float]
200
201
  # @param type [Symbol, :semantic]
@@ -300,7 +301,7 @@ module ContextDev
300
301
 
301
302
  discriminator :type
302
303
 
303
- # Watch a single web page.
304
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
304
305
  variant :page, -> { ContextDev::Models::MonitorRetrieveResponse::Target::Page }
305
306
 
306
307
  # 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.
@@ -320,17 +321,30 @@ module ContextDev
320
321
  # @return [String]
321
322
  required :url, String
322
323
 
324
+ # @!attribute instructions
325
+ # Plain-language goal describing which page changes matter. When provided without
326
+ # change_detection, semantic detection is inferred.
327
+ #
328
+ # @return [String, nil]
329
+ optional :instructions, String
330
+
323
331
  # @!attribute normalize_whitespace
324
332
  # Normalize whitespace before comparing or analyzing text.
325
333
  #
326
334
  # @return [Boolean, nil]
327
335
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
328
336
 
329
- # @!method initialize(url:, normalize_whitespace: nil, type: :page)
330
- # Watch a single web page.
337
+ # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
338
+ # Some parameter documentations has been truncated, see
339
+ # {ContextDev::Models::MonitorRetrieveResponse::Target::Page} for more details.
340
+ #
341
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
342
+ # detection judges confirmed stable diffs against `instructions`.
331
343
  #
332
344
  # @param url [String]
333
345
  #
346
+ # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
347
+ #
334
348
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
335
349
  #
336
350
  # @param type [Symbol, :page]
@@ -86,7 +86,7 @@ module ContextDev
86
86
  # Detect exact changes. For page targets, this means visible text diffs. For sitemap targets, this means URL additions and removals.
87
87
  variant :exact, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Exact }
88
88
 
89
- # 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).
89
+ # Detect meaning-level changes to page content, ignoring cosmetic or instruction-irrelevant differences. Which changes are meaningful is judged against the page or extract target's `instructions` (and an extract target's `schema`, when provided).
90
90
  variant :semantic, -> { ContextDev::MonitorUpdateParams::ChangeDetection::Semantic }
91
91
 
92
92
  class Exact < ContextDev::Internal::Type::BaseModel
@@ -114,9 +114,10 @@ module ContextDev
114
114
  optional :confidence_threshold, Float
115
115
 
116
116
  # @!method initialize(confidence_threshold: nil, type: :semantic)
117
- # Detect meaning-level changes to tracked page content, ignoring cosmetic or
118
- # paraphrase-only differences. Which changes are meaningful is judged against the
119
- # extract target's `instructions` (and `schema`, when provided).
117
+ # Detect meaning-level changes to page content, ignoring cosmetic or
118
+ # instruction-irrelevant differences. Which changes are meaningful is judged
119
+ # against the page or extract target's `instructions` (and an extract target's
120
+ # `schema`, when provided).
120
121
  #
121
122
  # @param confidence_threshold [Float]
122
123
  # @param type [Symbol, :semantic]
@@ -198,7 +199,7 @@ module ContextDev
198
199
 
199
200
  discriminator :type
200
201
 
201
- # Watch a single web page.
202
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic detection judges confirmed stable diffs against `instructions`.
202
203
  variant :page, -> { ContextDev::MonitorUpdateParams::Target::Page }
203
204
 
204
205
  # 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.
@@ -218,17 +219,30 @@ module ContextDev
218
219
  # @return [String]
219
220
  required :url, String
220
221
 
222
+ # @!attribute instructions
223
+ # Plain-language goal describing which page changes matter. When provided without
224
+ # change_detection, semantic detection is inferred.
225
+ #
226
+ # @return [String, nil]
227
+ optional :instructions, String
228
+
221
229
  # @!attribute normalize_whitespace
222
230
  # Normalize whitespace before comparing or analyzing text.
223
231
  #
224
232
  # @return [Boolean, nil]
225
233
  optional :normalize_whitespace, ContextDev::Internal::Type::Boolean
226
234
 
227
- # @!method initialize(url:, normalize_whitespace: nil, type: :page)
228
- # Watch a single web page.
235
+ # @!method initialize(url:, instructions: nil, normalize_whitespace: nil, type: :page)
236
+ # Some parameter documentations has been truncated, see
237
+ # {ContextDev::Models::MonitorUpdateParams::Target::Page} for more details.
238
+ #
239
+ # Watch a single web page. Exact detection reports visible-text diffs; semantic
240
+ # detection judges confirmed stable diffs against `instructions`.
229
241
  #
230
242
  # @param url [String]
231
243
  #
244
+ # @param instructions [String] Plain-language goal describing which page changes matter. When provided without
245
+ #
232
246
  # @param normalize_whitespace [Boolean] Normalize whitespace before comparing or analyzing text.
233
247
  #
234
248
  # @param type [Symbol, :page]