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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +4 -0
- data/lib/context_dev/models/batch_cancel_params.rb +22 -0
- data/lib/context_dev/models/batch_cancel_response.rb +354 -0
- data/lib/context_dev/models/batch_get_results_params.rb +42 -0
- data/lib/context_dev/models/batch_get_results_response.rb +463 -0
- data/lib/context_dev/models/batch_list_params.rb +94 -0
- data/lib/context_dev/models/batch_list_response.rb +388 -0
- data/lib/context_dev/models/batch_retrieve_params.rb +22 -0
- data/lib/context_dev/models/batch_retrieve_response.rb +390 -0
- data/lib/context_dev/models/batch_submit_params.rb +56 -0
- data/lib/context_dev/models/batch_submit_response.rb +614 -0
- data/lib/context_dev/models/error.rb +26 -0
- data/lib/context_dev/models/error_count.rb +26 -0
- data/lib/context_dev/models/monitor_create_params.rb +141 -127
- data/lib/context_dev/models/monitor_create_response.rb +34 -10
- data/lib/context_dev/models/monitor_list_response.rb +21 -7
- data/lib/context_dev/models/monitor_retrieve_response.rb +21 -7
- data/lib/context_dev/models/monitor_update_params.rb +21 -7
- data/lib/context_dev/models/monitor_update_response.rb +21 -7
- data/lib/context_dev/models/web_web_scrape_html_response.rb +93 -1
- data/lib/context_dev/models/web_web_scrape_md_response.rb +93 -1
- data/lib/context_dev/models.rb +14 -0
- data/lib/context_dev/resources/batch.rb +155 -0
- data/lib/context_dev/resources/monitors.rb +5 -5
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +13 -0
- data/rbi/context_dev/client.rbi +3 -0
- data/rbi/context_dev/models/batch_cancel_params.rbi +40 -0
- data/rbi/context_dev/models/batch_cancel_response.rbi +642 -0
- data/rbi/context_dev/models/batch_get_results_params.rbi +70 -0
- data/rbi/context_dev/models/batch_get_results_response.rbi +848 -0
- data/rbi/context_dev/models/batch_list_params.rbi +166 -0
- data/rbi/context_dev/models/batch_list_response.rbi +738 -0
- data/rbi/context_dev/models/batch_retrieve_params.rbi +40 -0
- data/rbi/context_dev/models/batch_retrieve_response.rbi +707 -0
- data/rbi/context_dev/models/batch_submit_params.rbi +105 -0
- data/rbi/context_dev/models/batch_submit_response.rbi +1330 -0
- data/rbi/context_dev/models/error.rbi +32 -0
- data/rbi/context_dev/models/error_count.rbi +34 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +274 -242
- data/rbi/context_dev/models/monitor_create_response.rbi +38 -7
- data/rbi/context_dev/models/monitor_list_response.rbi +24 -5
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +24 -5
- data/rbi/context_dev/models/monitor_update_params.rbi +24 -5
- data/rbi/context_dev/models/monitor_update_response.rbi +24 -5
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +182 -0
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +180 -0
- data/rbi/context_dev/models.rbi +14 -0
- data/rbi/context_dev/resources/batch.rbi +120 -0
- data/rbi/context_dev/resources/monitors.rbi +12 -12
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/batch_cancel_params.rbs +23 -0
- data/sig/context_dev/models/batch_cancel_response.rbs +266 -0
- data/sig/context_dev/models/batch_get_results_params.rbs +36 -0
- data/sig/context_dev/models/batch_get_results_response.rbs +399 -0
- data/sig/context_dev/models/batch_list_params.rbs +94 -0
- data/sig/context_dev/models/batch_list_response.rbs +304 -0
- data/sig/context_dev/models/batch_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/batch_retrieve_response.rbs +290 -0
- data/sig/context_dev/models/batch_submit_params.rbs +52 -0
- data/sig/context_dev/models/batch_submit_response.rbs +542 -0
- data/sig/context_dev/models/error.rbs +15 -0
- data/sig/context_dev/models/error_count.rbs +15 -0
- data/sig/context_dev/models/monitor_create_params.rbs +117 -97
- data/sig/context_dev/models/monitor_create_response.rbs +18 -1
- data/sig/context_dev/models/monitor_list_response.rbs +13 -1
- data/sig/context_dev/models/monitor_retrieve_response.rbs +13 -1
- data/sig/context_dev/models/monitor_update_params.rbs +13 -1
- data/sig/context_dev/models/monitor_update_response.rbs +13 -1
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +85 -0
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +85 -0
- data/sig/context_dev/models.rbs +14 -0
- data/sig/context_dev/resources/batch.rbs +41 -0
- data/sig/context_dev/resources/monitors.rbs +2 -2
- metadata +41 -2
|
@@ -25,6 +25,12 @@ module ContextDev
|
|
|
25
25
|
sig { returns(Time) }
|
|
26
26
|
attr_accessor :created_at
|
|
27
27
|
|
|
28
|
+
# The baseline run queued by this create call, or null if it could not be queued
|
|
29
|
+
# immediately (in which case the baseline runs on the next scheduled tick). Poll
|
|
30
|
+
# GET /monitors/{monitor_id}/runs/{run_id}.
|
|
31
|
+
sig { returns(T.nilable(String)) }
|
|
32
|
+
attr_accessor :initial_run_id
|
|
33
|
+
|
|
28
34
|
# Top-level monitor category. Always `web` today; the concrete behavior is
|
|
29
35
|
# described by `target` and `change_detection`.
|
|
30
36
|
sig do
|
|
@@ -149,8 +155,8 @@ module ContextDev
|
|
|
149
155
|
end
|
|
150
156
|
attr_writer :webhook_failure
|
|
151
157
|
|
|
152
|
-
# A
|
|
153
|
-
#
|
|
158
|
+
# A newly created monitor plus `initial_run_id`, the id of the baseline run queued
|
|
159
|
+
# at creation.
|
|
154
160
|
sig do
|
|
155
161
|
params(
|
|
156
162
|
id: String,
|
|
@@ -160,6 +166,7 @@ module ContextDev
|
|
|
160
166
|
ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic::OrHash
|
|
161
167
|
),
|
|
162
168
|
created_at: Time,
|
|
169
|
+
initial_run_id: T.nilable(String),
|
|
163
170
|
mode: ContextDev::Models::MonitorCreateResponse::Mode::OrSymbol,
|
|
164
171
|
name: String,
|
|
165
172
|
schedule: ContextDev::Models::MonitorCreateResponse::Schedule::OrHash,
|
|
@@ -202,6 +209,10 @@ module ContextDev
|
|
|
202
209
|
# Discriminated union describing how changes are detected.
|
|
203
210
|
change_detection:,
|
|
204
211
|
created_at:,
|
|
212
|
+
# The baseline run queued by this create call, or null if it could not be queued
|
|
213
|
+
# immediately (in which case the baseline runs on the next scheduled tick). Poll
|
|
214
|
+
# GET /monitors/{monitor_id}/runs/{run_id}.
|
|
215
|
+
initial_run_id:,
|
|
205
216
|
# Top-level monitor category. Always `web` today; the concrete behavior is
|
|
206
217
|
# described by `target` and `change_detection`.
|
|
207
218
|
mode:,
|
|
@@ -248,6 +259,7 @@ module ContextDev
|
|
|
248
259
|
change_detection:
|
|
249
260
|
ContextDev::Models::MonitorCreateResponse::ChangeDetection::Variants,
|
|
250
261
|
created_at: Time,
|
|
262
|
+
initial_run_id: T.nilable(String),
|
|
251
263
|
mode: ContextDev::Models::MonitorCreateResponse::Mode::TaggedSymbol,
|
|
252
264
|
name: String,
|
|
253
265
|
schedule: ContextDev::Models::MonitorCreateResponse::Schedule,
|
|
@@ -330,9 +342,10 @@ module ContextDev
|
|
|
330
342
|
sig { params(confidence_threshold: Float).void }
|
|
331
343
|
attr_writer :confidence_threshold
|
|
332
344
|
|
|
333
|
-
# Detect meaning-level changes to
|
|
334
|
-
#
|
|
335
|
-
# extract target's `instructions` (and
|
|
345
|
+
# Detect meaning-level changes to page content, ignoring cosmetic or
|
|
346
|
+
# instruction-irrelevant differences. Which changes are meaningful is judged
|
|
347
|
+
# against the page or extract target's `instructions` (and an extract target's
|
|
348
|
+
# `schema`, when provided).
|
|
336
349
|
sig do
|
|
337
350
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
338
351
|
T.attached_class
|
|
@@ -590,6 +603,14 @@ module ContextDev
|
|
|
590
603
|
sig { returns(String) }
|
|
591
604
|
attr_accessor :url
|
|
592
605
|
|
|
606
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
607
|
+
# change_detection, semantic detection is inferred.
|
|
608
|
+
sig { returns(T.nilable(String)) }
|
|
609
|
+
attr_reader :instructions
|
|
610
|
+
|
|
611
|
+
sig { params(instructions: String).void }
|
|
612
|
+
attr_writer :instructions
|
|
613
|
+
|
|
593
614
|
# Normalize whitespace before comparing or analyzing text.
|
|
594
615
|
sig { returns(T.nilable(T::Boolean)) }
|
|
595
616
|
attr_reader :normalize_whitespace
|
|
@@ -597,16 +618,21 @@ module ContextDev
|
|
|
597
618
|
sig { params(normalize_whitespace: T::Boolean).void }
|
|
598
619
|
attr_writer :normalize_whitespace
|
|
599
620
|
|
|
600
|
-
# Watch a single web page.
|
|
621
|
+
# Watch a single web page. Exact detection reports visible-text diffs; semantic
|
|
622
|
+
# detection judges confirmed stable diffs against `instructions`.
|
|
601
623
|
sig do
|
|
602
624
|
params(
|
|
603
625
|
url: String,
|
|
626
|
+
instructions: String,
|
|
604
627
|
normalize_whitespace: T::Boolean,
|
|
605
628
|
type: Symbol
|
|
606
629
|
).returns(T.attached_class)
|
|
607
630
|
end
|
|
608
631
|
def self.new(
|
|
609
632
|
url:,
|
|
633
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
634
|
+
# change_detection, semantic detection is inferred.
|
|
635
|
+
instructions: nil,
|
|
610
636
|
# Normalize whitespace before comparing or analyzing text.
|
|
611
637
|
normalize_whitespace: nil,
|
|
612
638
|
type: :page
|
|
@@ -615,7 +641,12 @@ module ContextDev
|
|
|
615
641
|
|
|
616
642
|
sig do
|
|
617
643
|
override.returns(
|
|
618
|
-
{
|
|
644
|
+
{
|
|
645
|
+
type: Symbol,
|
|
646
|
+
url: String,
|
|
647
|
+
instructions: String,
|
|
648
|
+
normalize_whitespace: T::Boolean
|
|
649
|
+
}
|
|
619
650
|
)
|
|
620
651
|
end
|
|
621
652
|
def to_hash
|
|
@@ -391,9 +391,10 @@ module ContextDev
|
|
|
391
391
|
sig { params(confidence_threshold: Float).void }
|
|
392
392
|
attr_writer :confidence_threshold
|
|
393
393
|
|
|
394
|
-
# Detect meaning-level changes to
|
|
395
|
-
#
|
|
396
|
-
# extract target's `instructions` (and
|
|
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).
|
|
397
398
|
sig do
|
|
398
399
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
399
400
|
T.attached_class
|
|
@@ -654,6 +655,14 @@ module ContextDev
|
|
|
654
655
|
sig { returns(String) }
|
|
655
656
|
attr_accessor :url
|
|
656
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
|
+
|
|
657
666
|
# Normalize whitespace before comparing or analyzing text.
|
|
658
667
|
sig { returns(T.nilable(T::Boolean)) }
|
|
659
668
|
attr_reader :normalize_whitespace
|
|
@@ -661,16 +670,21 @@ module ContextDev
|
|
|
661
670
|
sig { params(normalize_whitespace: T::Boolean).void }
|
|
662
671
|
attr_writer :normalize_whitespace
|
|
663
672
|
|
|
664
|
-
# 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`.
|
|
665
675
|
sig do
|
|
666
676
|
params(
|
|
667
677
|
url: String,
|
|
678
|
+
instructions: String,
|
|
668
679
|
normalize_whitespace: T::Boolean,
|
|
669
680
|
type: Symbol
|
|
670
681
|
).returns(T.attached_class)
|
|
671
682
|
end
|
|
672
683
|
def self.new(
|
|
673
684
|
url:,
|
|
685
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
686
|
+
# change_detection, semantic detection is inferred.
|
|
687
|
+
instructions: nil,
|
|
674
688
|
# Normalize whitespace before comparing or analyzing text.
|
|
675
689
|
normalize_whitespace: nil,
|
|
676
690
|
type: :page
|
|
@@ -679,7 +693,12 @@ module ContextDev
|
|
|
679
693
|
|
|
680
694
|
sig do
|
|
681
695
|
override.returns(
|
|
682
|
-
{
|
|
696
|
+
{
|
|
697
|
+
type: Symbol,
|
|
698
|
+
url: String,
|
|
699
|
+
instructions: String,
|
|
700
|
+
normalize_whitespace: T::Boolean
|
|
701
|
+
}
|
|
683
702
|
)
|
|
684
703
|
end
|
|
685
704
|
def to_hash
|
|
@@ -338,9 +338,10 @@ module ContextDev
|
|
|
338
338
|
sig { params(confidence_threshold: Float).void }
|
|
339
339
|
attr_writer :confidence_threshold
|
|
340
340
|
|
|
341
|
-
# Detect meaning-level changes to
|
|
342
|
-
#
|
|
343
|
-
# extract target's `instructions` (and
|
|
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).
|
|
344
345
|
sig do
|
|
345
346
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
346
347
|
T.attached_class
|
|
@@ -598,6 +599,14 @@ module ContextDev
|
|
|
598
599
|
sig { returns(String) }
|
|
599
600
|
attr_accessor :url
|
|
600
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
|
+
|
|
601
610
|
# Normalize whitespace before comparing or analyzing text.
|
|
602
611
|
sig { returns(T.nilable(T::Boolean)) }
|
|
603
612
|
attr_reader :normalize_whitespace
|
|
@@ -605,16 +614,21 @@ module ContextDev
|
|
|
605
614
|
sig { params(normalize_whitespace: T::Boolean).void }
|
|
606
615
|
attr_writer :normalize_whitespace
|
|
607
616
|
|
|
608
|
-
# 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`.
|
|
609
619
|
sig do
|
|
610
620
|
params(
|
|
611
621
|
url: String,
|
|
622
|
+
instructions: String,
|
|
612
623
|
normalize_whitespace: T::Boolean,
|
|
613
624
|
type: Symbol
|
|
614
625
|
).returns(T.attached_class)
|
|
615
626
|
end
|
|
616
627
|
def self.new(
|
|
617
628
|
url:,
|
|
629
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
630
|
+
# change_detection, semantic detection is inferred.
|
|
631
|
+
instructions: nil,
|
|
618
632
|
# Normalize whitespace before comparing or analyzing text.
|
|
619
633
|
normalize_whitespace: nil,
|
|
620
634
|
type: :page
|
|
@@ -623,7 +637,12 @@ module ContextDev
|
|
|
623
637
|
|
|
624
638
|
sig do
|
|
625
639
|
override.returns(
|
|
626
|
-
{
|
|
640
|
+
{
|
|
641
|
+
type: Symbol,
|
|
642
|
+
url: String,
|
|
643
|
+
instructions: String,
|
|
644
|
+
normalize_whitespace: T::Boolean
|
|
645
|
+
}
|
|
627
646
|
)
|
|
628
647
|
end
|
|
629
648
|
def to_hash
|
|
@@ -233,9 +233,10 @@ module ContextDev
|
|
|
233
233
|
sig { params(confidence_threshold: Float).void }
|
|
234
234
|
attr_writer :confidence_threshold
|
|
235
235
|
|
|
236
|
-
# Detect meaning-level changes to
|
|
237
|
-
#
|
|
238
|
-
# extract target's `instructions` (and
|
|
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).
|
|
239
240
|
sig do
|
|
240
241
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
241
242
|
T.attached_class
|
|
@@ -431,6 +432,14 @@ module ContextDev
|
|
|
431
432
|
sig { returns(String) }
|
|
432
433
|
attr_accessor :url
|
|
433
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
|
+
|
|
434
443
|
# Normalize whitespace before comparing or analyzing text.
|
|
435
444
|
sig { returns(T.nilable(T::Boolean)) }
|
|
436
445
|
attr_reader :normalize_whitespace
|
|
@@ -438,16 +447,21 @@ module ContextDev
|
|
|
438
447
|
sig { params(normalize_whitespace: T::Boolean).void }
|
|
439
448
|
attr_writer :normalize_whitespace
|
|
440
449
|
|
|
441
|
-
# 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`.
|
|
442
452
|
sig do
|
|
443
453
|
params(
|
|
444
454
|
url: String,
|
|
455
|
+
instructions: String,
|
|
445
456
|
normalize_whitespace: T::Boolean,
|
|
446
457
|
type: Symbol
|
|
447
458
|
).returns(T.attached_class)
|
|
448
459
|
end
|
|
449
460
|
def self.new(
|
|
450
461
|
url:,
|
|
462
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
463
|
+
# change_detection, semantic detection is inferred.
|
|
464
|
+
instructions: nil,
|
|
451
465
|
# Normalize whitespace before comparing or analyzing text.
|
|
452
466
|
normalize_whitespace: nil,
|
|
453
467
|
type: :page
|
|
@@ -456,7 +470,12 @@ module ContextDev
|
|
|
456
470
|
|
|
457
471
|
sig do
|
|
458
472
|
override.returns(
|
|
459
|
-
{
|
|
473
|
+
{
|
|
474
|
+
type: Symbol,
|
|
475
|
+
url: String,
|
|
476
|
+
instructions: String,
|
|
477
|
+
normalize_whitespace: T::Boolean
|
|
478
|
+
}
|
|
460
479
|
)
|
|
461
480
|
end
|
|
462
481
|
def to_hash
|
|
@@ -330,9 +330,10 @@ module ContextDev
|
|
|
330
330
|
sig { params(confidence_threshold: Float).void }
|
|
331
331
|
attr_writer :confidence_threshold
|
|
332
332
|
|
|
333
|
-
# Detect meaning-level changes to
|
|
334
|
-
#
|
|
335
|
-
# extract target's `instructions` (and
|
|
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).
|
|
336
337
|
sig do
|
|
337
338
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
338
339
|
T.attached_class
|
|
@@ -590,6 +591,14 @@ module ContextDev
|
|
|
590
591
|
sig { returns(String) }
|
|
591
592
|
attr_accessor :url
|
|
592
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
|
+
|
|
593
602
|
# Normalize whitespace before comparing or analyzing text.
|
|
594
603
|
sig { returns(T.nilable(T::Boolean)) }
|
|
595
604
|
attr_reader :normalize_whitespace
|
|
@@ -597,16 +606,21 @@ module ContextDev
|
|
|
597
606
|
sig { params(normalize_whitespace: T::Boolean).void }
|
|
598
607
|
attr_writer :normalize_whitespace
|
|
599
608
|
|
|
600
|
-
# 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`.
|
|
601
611
|
sig do
|
|
602
612
|
params(
|
|
603
613
|
url: String,
|
|
614
|
+
instructions: String,
|
|
604
615
|
normalize_whitespace: T::Boolean,
|
|
605
616
|
type: Symbol
|
|
606
617
|
).returns(T.attached_class)
|
|
607
618
|
end
|
|
608
619
|
def self.new(
|
|
609
620
|
url:,
|
|
621
|
+
# Plain-language goal describing which page changes matter. When provided without
|
|
622
|
+
# change_detection, semantic detection is inferred.
|
|
623
|
+
instructions: nil,
|
|
610
624
|
# Normalize whitespace before comparing or analyzing text.
|
|
611
625
|
normalize_whitespace: nil,
|
|
612
626
|
type: :page
|
|
@@ -615,7 +629,12 @@ module ContextDev
|
|
|
615
629
|
|
|
616
630
|
sig do
|
|
617
631
|
override.returns(
|
|
618
|
-
{
|
|
632
|
+
{
|
|
633
|
+
type: Symbol,
|
|
634
|
+
url: String,
|
|
635
|
+
instructions: String,
|
|
636
|
+
normalize_whitespace: T::Boolean
|
|
637
|
+
}
|
|
619
638
|
)
|
|
620
639
|
end
|
|
621
640
|
def to_hash
|
|
@@ -52,6 +52,36 @@ module ContextDev
|
|
|
52
52
|
sig { returns(String) }
|
|
53
53
|
attr_accessor :url
|
|
54
54
|
|
|
55
|
+
# One verified outcome per requested browser action, in request order.
|
|
56
|
+
sig do
|
|
57
|
+
returns(
|
|
58
|
+
T.nilable(
|
|
59
|
+
T::Array[
|
|
60
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
attr_reader :actions_applied
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
params(
|
|
69
|
+
actions_applied:
|
|
70
|
+
T::Array[
|
|
71
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::OrHash
|
|
72
|
+
]
|
|
73
|
+
).void
|
|
74
|
+
end
|
|
75
|
+
attr_writer :actions_applied
|
|
76
|
+
|
|
77
|
+
# True when an action was applied but the returned content could not be refreshed
|
|
78
|
+
# afterward.
|
|
79
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
80
|
+
attr_reader :actions_html_stale
|
|
81
|
+
|
|
82
|
+
sig { params(actions_html_stale: T::Boolean).void }
|
|
83
|
+
attr_writer :actions_html_stale
|
|
84
|
+
|
|
55
85
|
# Metadata about the API key used for the request. Included in every response
|
|
56
86
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
57
87
|
sig do
|
|
@@ -78,6 +108,11 @@ module ContextDev
|
|
|
78
108
|
ContextDev::Models::WebWebScrapeHTMLResponse::Success::OrBoolean,
|
|
79
109
|
type: ContextDev::Models::WebWebScrapeHTMLResponse::Type::OrSymbol,
|
|
80
110
|
url: String,
|
|
111
|
+
actions_applied:
|
|
112
|
+
T::Array[
|
|
113
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::OrHash
|
|
114
|
+
],
|
|
115
|
+
actions_html_stale: T::Boolean,
|
|
81
116
|
key_metadata:
|
|
82
117
|
ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata::OrHash
|
|
83
118
|
).returns(T.attached_class)
|
|
@@ -98,6 +133,11 @@ module ContextDev
|
|
|
98
133
|
type:,
|
|
99
134
|
# The URL that was scraped
|
|
100
135
|
url:,
|
|
136
|
+
# One verified outcome per requested browser action, in request order.
|
|
137
|
+
actions_applied: nil,
|
|
138
|
+
# True when an action was applied but the returned content could not be refreshed
|
|
139
|
+
# afterward.
|
|
140
|
+
actions_html_stale: nil,
|
|
101
141
|
# Metadata about the API key used for the request. Included in every response
|
|
102
142
|
# whenever a valid API key is provided, even when the response status is not 200.
|
|
103
143
|
key_metadata: nil
|
|
@@ -114,6 +154,11 @@ module ContextDev
|
|
|
114
154
|
type:
|
|
115
155
|
ContextDev::Models::WebWebScrapeHTMLResponse::Type::TaggedSymbol,
|
|
116
156
|
url: String,
|
|
157
|
+
actions_applied:
|
|
158
|
+
T::Array[
|
|
159
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied
|
|
160
|
+
],
|
|
161
|
+
actions_html_stale: T::Boolean,
|
|
117
162
|
key_metadata:
|
|
118
163
|
ContextDev::Models::WebWebScrapeHTMLResponse::KeyMetadata
|
|
119
164
|
}
|
|
@@ -705,6 +750,143 @@ module ContextDev
|
|
|
705
750
|
end
|
|
706
751
|
end
|
|
707
752
|
|
|
753
|
+
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
754
|
+
OrHash =
|
|
755
|
+
T.type_alias do
|
|
756
|
+
T.any(
|
|
757
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied,
|
|
758
|
+
ContextDev::Internal::AnyHash
|
|
759
|
+
)
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
sig { returns(String) }
|
|
763
|
+
attr_accessor :instruction
|
|
764
|
+
|
|
765
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
766
|
+
# not verified. Skipped means it was not attempted.
|
|
767
|
+
sig do
|
|
768
|
+
returns(
|
|
769
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
770
|
+
)
|
|
771
|
+
end
|
|
772
|
+
attr_accessor :status
|
|
773
|
+
|
|
774
|
+
# Visible page evidence used to verify an applied action.
|
|
775
|
+
sig { returns(T.nilable(String)) }
|
|
776
|
+
attr_reader :completion_evidence
|
|
777
|
+
|
|
778
|
+
sig { params(completion_evidence: String).void }
|
|
779
|
+
attr_writer :completion_evidence
|
|
780
|
+
|
|
781
|
+
sig { returns(T.nilable(Float)) }
|
|
782
|
+
attr_reader :duration_ms
|
|
783
|
+
|
|
784
|
+
sig { params(duration_ms: Float).void }
|
|
785
|
+
attr_writer :duration_ms
|
|
786
|
+
|
|
787
|
+
sig { returns(T.nilable(String)) }
|
|
788
|
+
attr_reader :error
|
|
789
|
+
|
|
790
|
+
sig { params(error: String).void }
|
|
791
|
+
attr_writer :error
|
|
792
|
+
|
|
793
|
+
sig { returns(T.nilable(String)) }
|
|
794
|
+
attr_reader :method_
|
|
795
|
+
|
|
796
|
+
sig { params(method_: String).void }
|
|
797
|
+
attr_writer :method_
|
|
798
|
+
|
|
799
|
+
sig { returns(T.nilable(String)) }
|
|
800
|
+
attr_reader :target_description
|
|
801
|
+
|
|
802
|
+
sig { params(target_description: String).void }
|
|
803
|
+
attr_writer :target_description
|
|
804
|
+
|
|
805
|
+
sig do
|
|
806
|
+
params(
|
|
807
|
+
instruction: String,
|
|
808
|
+
status:
|
|
809
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::OrSymbol,
|
|
810
|
+
completion_evidence: String,
|
|
811
|
+
duration_ms: Float,
|
|
812
|
+
error: String,
|
|
813
|
+
method_: String,
|
|
814
|
+
target_description: String
|
|
815
|
+
).returns(T.attached_class)
|
|
816
|
+
end
|
|
817
|
+
def self.new(
|
|
818
|
+
instruction:,
|
|
819
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
820
|
+
# not verified. Skipped means it was not attempted.
|
|
821
|
+
status:,
|
|
822
|
+
# Visible page evidence used to verify an applied action.
|
|
823
|
+
completion_evidence: nil,
|
|
824
|
+
duration_ms: nil,
|
|
825
|
+
error: nil,
|
|
826
|
+
method_: nil,
|
|
827
|
+
target_description: nil
|
|
828
|
+
)
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
sig do
|
|
832
|
+
override.returns(
|
|
833
|
+
{
|
|
834
|
+
instruction: String,
|
|
835
|
+
status:
|
|
836
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol,
|
|
837
|
+
completion_evidence: String,
|
|
838
|
+
duration_ms: Float,
|
|
839
|
+
error: String,
|
|
840
|
+
method_: String,
|
|
841
|
+
target_description: String
|
|
842
|
+
}
|
|
843
|
+
)
|
|
844
|
+
end
|
|
845
|
+
def to_hash
|
|
846
|
+
end
|
|
847
|
+
|
|
848
|
+
# Applied means the requested page state was visibly verified. Failed means it was
|
|
849
|
+
# not verified. Skipped means it was not attempted.
|
|
850
|
+
module Status
|
|
851
|
+
extend ContextDev::Internal::Type::Enum
|
|
852
|
+
|
|
853
|
+
TaggedSymbol =
|
|
854
|
+
T.type_alias do
|
|
855
|
+
T.all(
|
|
856
|
+
Symbol,
|
|
857
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status
|
|
858
|
+
)
|
|
859
|
+
end
|
|
860
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
861
|
+
|
|
862
|
+
APPLIED =
|
|
863
|
+
T.let(
|
|
864
|
+
:applied,
|
|
865
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
866
|
+
)
|
|
867
|
+
FAILED =
|
|
868
|
+
T.let(
|
|
869
|
+
:failed,
|
|
870
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
871
|
+
)
|
|
872
|
+
SKIPPED =
|
|
873
|
+
T.let(
|
|
874
|
+
:skipped,
|
|
875
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
sig do
|
|
879
|
+
override.returns(
|
|
880
|
+
T::Array[
|
|
881
|
+
ContextDev::Models::WebWebScrapeHTMLResponse::ActionsApplied::Status::TaggedSymbol
|
|
882
|
+
]
|
|
883
|
+
)
|
|
884
|
+
end
|
|
885
|
+
def self.values
|
|
886
|
+
end
|
|
887
|
+
end
|
|
888
|
+
end
|
|
889
|
+
|
|
708
890
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
709
891
|
OrHash =
|
|
710
892
|
T.type_alias do
|