context.dev 2.1.0 → 2.3.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 +23 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +7 -2
- data/lib/context_dev/internal/type/base_model.rb +5 -5
- data/lib/context_dev/models/monitor_create_params.rb +44 -14
- data/lib/context_dev/models/monitor_create_response.rb +112 -15
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +23 -1
- data/lib/context_dev/models/monitor_list_response.rb +116 -15
- data/lib/context_dev/models/monitor_list_runs_response.rb +23 -1
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +10 -10
- data/lib/context_dev/models/monitor_retrieve_response.rb +113 -15
- data/lib/context_dev/models/monitor_update_params.rb +44 -14
- data/lib/context_dev/models/monitor_update_response.rb +112 -15
- data/lib/context_dev/models/parse_handle_params.rb +110 -0
- data/lib/context_dev/models/parse_handle_response.rb +132 -0
- data/lib/context_dev/models/web_web_crawl_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_html_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_params.rb +16 -6
- data/lib/context_dev/models/web_web_scrape_md_response.rb +11 -1
- data/lib/context_dev/models/webhook_delivery.rb +109 -0
- data/lib/context_dev/models.rb +4 -0
- data/lib/context_dev/resources/monitors.rb +3 -2
- data/lib/context_dev/resources/parse.rb +63 -0
- data/lib/context_dev/resources/web.rb +19 -4
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +4 -0
- data/rbi/context_dev/client.rbi +6 -2
- data/rbi/context_dev/models/monitor_create_params.rbi +106 -16
- data/rbi/context_dev/models/monitor_create_response.rbi +255 -17
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +39 -3
- data/rbi/context_dev/models/monitor_list_response.rbi +256 -16
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +39 -3
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +12 -15
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +255 -17
- data/rbi/context_dev/models/monitor_update_params.rbi +106 -16
- data/rbi/context_dev/models/monitor_update_response.rbi +255 -17
- data/rbi/context_dev/models/parse_handle_params.rbi +163 -0
- data/rbi/context_dev/models/parse_handle_response.rbi +377 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +26 -7
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +12 -0
- data/rbi/context_dev/models/webhook_delivery.rbi +172 -0
- data/rbi/context_dev/models.rbi +4 -0
- data/rbi/context_dev/resources/monitors.rbi +3 -2
- data/rbi/context_dev/resources/parse.rbi +65 -0
- data/rbi/context_dev/resources/web.rbi +22 -7
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/monitor_create_params.rbs +32 -3
- data/sig/context_dev/models/monitor_create_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +21 -3
- data/sig/context_dev/models/monitor_list_response.rbs +85 -6
- data/sig/context_dev/models/monitor_list_runs_response.rbs +21 -3
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +8 -10
- data/sig/context_dev/models/monitor_retrieve_response.rbs +85 -6
- data/sig/context_dev/models/monitor_update_params.rbs +32 -3
- data/sig/context_dev/models/monitor_update_response.rbs +85 -6
- data/sig/context_dev/models/parse_handle_params.rbs +96 -0
- data/sig/context_dev/models/parse_handle_response.rbs +159 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +13 -2
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +5 -0
- data/sig/context_dev/models/webhook_delivery.rbs +81 -0
- data/sig/context_dev/models.rbs +4 -0
- data/sig/context_dev/resources/parse.rbs +22 -0
- metadata +14 -2
|
@@ -179,6 +179,28 @@ module ContextDev
|
|
|
179
179
|
end
|
|
180
180
|
attr_writer :webhook
|
|
181
181
|
|
|
182
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
183
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
184
|
+
# and when the webhook URL changes.
|
|
185
|
+
sig do
|
|
186
|
+
returns(
|
|
187
|
+
T.nilable(
|
|
188
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure
|
|
189
|
+
)
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
attr_reader :webhook_failure
|
|
193
|
+
|
|
194
|
+
sig do
|
|
195
|
+
params(
|
|
196
|
+
webhook_failure:
|
|
197
|
+
T.nilable(
|
|
198
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::OrHash
|
|
199
|
+
)
|
|
200
|
+
).void
|
|
201
|
+
end
|
|
202
|
+
attr_writer :webhook_failure
|
|
203
|
+
|
|
182
204
|
# A web monitor. `mode` is the constant `web`; behavior is described by `target`
|
|
183
205
|
# (page/sitemap/extract) and `change_detection` (exact/semantic).
|
|
184
206
|
sig do
|
|
@@ -222,6 +244,10 @@ module ContextDev
|
|
|
222
244
|
webhook:
|
|
223
245
|
T.nilable(
|
|
224
246
|
ContextDev::Models::MonitorListResponse::Data::Webhook::OrHash
|
|
247
|
+
),
|
|
248
|
+
webhook_failure:
|
|
249
|
+
T.nilable(
|
|
250
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::OrHash
|
|
225
251
|
)
|
|
226
252
|
).returns(T.attached_class)
|
|
227
253
|
end
|
|
@@ -260,7 +286,11 @@ module ContextDev
|
|
|
260
286
|
next_run_at: nil,
|
|
261
287
|
# User-defined tags for grouping and filtering monitors and their changes.
|
|
262
288
|
tags: nil,
|
|
263
|
-
webhook: nil
|
|
289
|
+
webhook: nil,
|
|
290
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
291
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
292
|
+
# and when the webhook URL changes.
|
|
293
|
+
webhook_failure: nil
|
|
264
294
|
)
|
|
265
295
|
end
|
|
266
296
|
|
|
@@ -295,6 +325,10 @@ module ContextDev
|
|
|
295
325
|
webhook:
|
|
296
326
|
T.nilable(
|
|
297
327
|
ContextDev::Models::MonitorListResponse::Data::Webhook
|
|
328
|
+
),
|
|
329
|
+
webhook_failure:
|
|
330
|
+
T.nilable(
|
|
331
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure
|
|
298
332
|
)
|
|
299
333
|
}
|
|
300
334
|
)
|
|
@@ -355,9 +389,9 @@ module ContextDev
|
|
|
355
389
|
sig { params(confidence_threshold: Float).void }
|
|
356
390
|
attr_writer :confidence_threshold
|
|
357
391
|
|
|
358
|
-
# Detect meaning-level changes to
|
|
359
|
-
# paraphrase-only differences.
|
|
360
|
-
# target's `
|
|
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).
|
|
361
395
|
sig do
|
|
362
396
|
params(confidence_threshold: Float, type: Symbol).returns(
|
|
363
397
|
T.attached_class
|
|
@@ -770,9 +804,14 @@ module ContextDev
|
|
|
770
804
|
sig { params(max_pages: Integer).void }
|
|
771
805
|
attr_writer :max_pages
|
|
772
806
|
|
|
773
|
-
# JSON Schema describing the data you care about. It
|
|
774
|
-
# selected for tracking
|
|
775
|
-
#
|
|
807
|
+
# JSON Schema describing the data you care about. It is used three ways: it guides
|
|
808
|
+
# which pages are selected for tracking, it gives the change judge extra context
|
|
809
|
+
# on which changes matter (alongside `instructions`), and it defines the shape of
|
|
810
|
+
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
|
|
811
|
+
# about once a day). It is not a response format for changes: change events and
|
|
812
|
+
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
|
|
813
|
+
# data in this schema's shape. If omitted, a default summary + key-points schema
|
|
814
|
+
# is used.
|
|
776
815
|
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
777
816
|
attr_reader :schema
|
|
778
817
|
|
|
@@ -782,8 +821,8 @@ module ContextDev
|
|
|
782
821
|
# Watch the monitor-relevant pages of a site for meaningful changes. A crawl
|
|
783
822
|
# guided by `schema`/`instructions` selects up to `max_pages` relevant pages to
|
|
784
823
|
# track; each run re-checks exactly those pages, and confirmed content changes are
|
|
785
|
-
# judged against the monitor's instructions
|
|
786
|
-
# a periodic re-discovery crawl.
|
|
824
|
+
# judged for relevance against the monitor's `instructions` (and `schema`, when
|
|
825
|
+
# provided). The tracked page set is refreshed by a periodic re-discovery crawl.
|
|
787
826
|
sig do
|
|
788
827
|
params(
|
|
789
828
|
instructions: String,
|
|
@@ -806,9 +845,14 @@ module ContextDev
|
|
|
806
845
|
max_depth: nil,
|
|
807
846
|
# Maximum number of pages to track.
|
|
808
847
|
max_pages: nil,
|
|
809
|
-
# JSON Schema describing the data you care about. It
|
|
810
|
-
# selected for tracking
|
|
811
|
-
#
|
|
848
|
+
# JSON Schema describing the data you care about. It is used three ways: it guides
|
|
849
|
+
# which pages are selected for tracking, it gives the change judge extra context
|
|
850
|
+
# on which changes matter (alongside `instructions`), and it defines the shape of
|
|
851
|
+
# the baseline `data` snapshot on GET /monitors/{monitor_id} (refreshed at most
|
|
852
|
+
# about once a day). It is not a response format for changes: change events and
|
|
853
|
+
# webhook payloads always contain diffs, summaries, and evidence excerpts — never
|
|
854
|
+
# data in this schema's shape. If omitted, a default summary + key-points schema
|
|
855
|
+
# is used.
|
|
812
856
|
schema: nil,
|
|
813
857
|
type: :extract
|
|
814
858
|
)
|
|
@@ -1051,10 +1095,35 @@ module ContextDev
|
|
|
1051
1095
|
)
|
|
1052
1096
|
end
|
|
1053
1097
|
|
|
1054
|
-
# Webhook URL
|
|
1098
|
+
# Webhook URL events are delivered to.
|
|
1055
1099
|
sig { returns(String) }
|
|
1056
1100
|
attr_accessor :url
|
|
1057
1101
|
|
|
1102
|
+
# Events delivered to this endpoint. `change.detected` fires only when a run
|
|
1103
|
+
# detects a change; `run.completed` fires on every completed run — including runs
|
|
1104
|
+
# that detected no change — and embeds the change when one was detected. Defaults
|
|
1105
|
+
# to `["change.detected"]` when omitted.
|
|
1106
|
+
sig do
|
|
1107
|
+
returns(
|
|
1108
|
+
T.nilable(
|
|
1109
|
+
T::Array[
|
|
1110
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1111
|
+
]
|
|
1112
|
+
)
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
attr_reader :events
|
|
1116
|
+
|
|
1117
|
+
sig do
|
|
1118
|
+
params(
|
|
1119
|
+
events:
|
|
1120
|
+
T::Array[
|
|
1121
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::OrSymbol
|
|
1122
|
+
]
|
|
1123
|
+
).void
|
|
1124
|
+
end
|
|
1125
|
+
attr_writer :events
|
|
1126
|
+
|
|
1058
1127
|
# Signing secret used to verify webhook authenticity. Each delivery includes an
|
|
1059
1128
|
# `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
|
|
1060
1129
|
# `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
|
|
@@ -1066,10 +1135,24 @@ module ContextDev
|
|
|
1066
1135
|
sig { params(secret: String).void }
|
|
1067
1136
|
attr_writer :secret
|
|
1068
1137
|
|
|
1069
|
-
sig
|
|
1138
|
+
sig do
|
|
1139
|
+
params(
|
|
1140
|
+
url: String,
|
|
1141
|
+
events:
|
|
1142
|
+
T::Array[
|
|
1143
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::OrSymbol
|
|
1144
|
+
],
|
|
1145
|
+
secret: String
|
|
1146
|
+
).returns(T.attached_class)
|
|
1147
|
+
end
|
|
1070
1148
|
def self.new(
|
|
1071
|
-
# Webhook URL
|
|
1149
|
+
# Webhook URL events are delivered to.
|
|
1072
1150
|
url:,
|
|
1151
|
+
# Events delivered to this endpoint. `change.detected` fires only when a run
|
|
1152
|
+
# detects a change; `run.completed` fires on every completed run — including runs
|
|
1153
|
+
# that detected no change — and embeds the change when one was detected. Defaults
|
|
1154
|
+
# to `["change.detected"]` when omitted.
|
|
1155
|
+
events: nil,
|
|
1073
1156
|
# Signing secret used to verify webhook authenticity. Each delivery includes an
|
|
1074
1157
|
# `X-Context-Signature: t=<unix>,v1=<hmac>` header, where the HMAC is SHA-256 over
|
|
1075
1158
|
# `"{t}.{rawRequestBody}"` keyed by this secret. Recompute it with a constant-time
|
|
@@ -1079,9 +1162,166 @@ module ContextDev
|
|
|
1079
1162
|
)
|
|
1080
1163
|
end
|
|
1081
1164
|
|
|
1082
|
-
sig
|
|
1165
|
+
sig do
|
|
1166
|
+
override.returns(
|
|
1167
|
+
{
|
|
1168
|
+
url: String,
|
|
1169
|
+
events:
|
|
1170
|
+
T::Array[
|
|
1171
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1172
|
+
],
|
|
1173
|
+
secret: String
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
end
|
|
1177
|
+
def to_hash
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
module Event
|
|
1181
|
+
extend ContextDev::Internal::Type::Enum
|
|
1182
|
+
|
|
1183
|
+
TaggedSymbol =
|
|
1184
|
+
T.type_alias do
|
|
1185
|
+
T.all(
|
|
1186
|
+
Symbol,
|
|
1187
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event
|
|
1188
|
+
)
|
|
1189
|
+
end
|
|
1190
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1191
|
+
|
|
1192
|
+
CHANGE_DETECTED =
|
|
1193
|
+
T.let(
|
|
1194
|
+
:"change.detected",
|
|
1195
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1196
|
+
)
|
|
1197
|
+
RUN_COMPLETED =
|
|
1198
|
+
T.let(
|
|
1199
|
+
:"run.completed",
|
|
1200
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
sig do
|
|
1204
|
+
override.returns(
|
|
1205
|
+
T::Array[
|
|
1206
|
+
ContextDev::Models::MonitorListResponse::Data::Webhook::Event::TaggedSymbol
|
|
1207
|
+
]
|
|
1208
|
+
)
|
|
1209
|
+
end
|
|
1210
|
+
def self.values
|
|
1211
|
+
end
|
|
1212
|
+
end
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
class WebhookFailure < ContextDev::Internal::Type::BaseModel
|
|
1216
|
+
OrHash =
|
|
1217
|
+
T.type_alias do
|
|
1218
|
+
T.any(
|
|
1219
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure,
|
|
1220
|
+
ContextDev::Internal::AnyHash
|
|
1221
|
+
)
|
|
1222
|
+
end
|
|
1223
|
+
|
|
1224
|
+
# Number of consecutive delivery attempts that did not succeed.
|
|
1225
|
+
sig { returns(Integer) }
|
|
1226
|
+
attr_accessor :consecutive_failures
|
|
1227
|
+
|
|
1228
|
+
sig { returns(Time) }
|
|
1229
|
+
attr_accessor :last_failed_at
|
|
1230
|
+
|
|
1231
|
+
# Human-readable description of the most recent failure.
|
|
1232
|
+
sig { returns(String) }
|
|
1233
|
+
attr_accessor :last_message
|
|
1234
|
+
|
|
1235
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1236
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1237
|
+
# failed the public-endpoint safety check.
|
|
1238
|
+
sig do
|
|
1239
|
+
returns(
|
|
1240
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1241
|
+
)
|
|
1242
|
+
end
|
|
1243
|
+
attr_accessor :last_status
|
|
1244
|
+
|
|
1245
|
+
# Present while webhook deliveries are failing consecutively; null when deliveries
|
|
1246
|
+
# are healthy or no webhook is configured. Cleared on the next successful delivery
|
|
1247
|
+
# and when the webhook URL changes.
|
|
1248
|
+
sig do
|
|
1249
|
+
params(
|
|
1250
|
+
consecutive_failures: Integer,
|
|
1251
|
+
last_failed_at: Time,
|
|
1252
|
+
last_message: String,
|
|
1253
|
+
last_status:
|
|
1254
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::OrSymbol
|
|
1255
|
+
).returns(T.attached_class)
|
|
1256
|
+
end
|
|
1257
|
+
def self.new(
|
|
1258
|
+
# Number of consecutive delivery attempts that did not succeed.
|
|
1259
|
+
consecutive_failures:,
|
|
1260
|
+
last_failed_at:,
|
|
1261
|
+
# Human-readable description of the most recent failure.
|
|
1262
|
+
last_message:,
|
|
1263
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1264
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1265
|
+
# failed the public-endpoint safety check.
|
|
1266
|
+
last_status:
|
|
1267
|
+
)
|
|
1268
|
+
end
|
|
1269
|
+
|
|
1270
|
+
sig do
|
|
1271
|
+
override.returns(
|
|
1272
|
+
{
|
|
1273
|
+
consecutive_failures: Integer,
|
|
1274
|
+
last_failed_at: Time,
|
|
1275
|
+
last_message: String,
|
|
1276
|
+
last_status:
|
|
1277
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1278
|
+
}
|
|
1279
|
+
)
|
|
1280
|
+
end
|
|
1083
1281
|
def to_hash
|
|
1084
1282
|
end
|
|
1283
|
+
|
|
1284
|
+
# Outcome of the most recent failed delivery. rejected means a non-2xx response;
|
|
1285
|
+
# failed means no HTTP response was received; skipped_unsafe_url means the URL
|
|
1286
|
+
# failed the public-endpoint safety check.
|
|
1287
|
+
module LastStatus
|
|
1288
|
+
extend ContextDev::Internal::Type::Enum
|
|
1289
|
+
|
|
1290
|
+
TaggedSymbol =
|
|
1291
|
+
T.type_alias do
|
|
1292
|
+
T.all(
|
|
1293
|
+
Symbol,
|
|
1294
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus
|
|
1295
|
+
)
|
|
1296
|
+
end
|
|
1297
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1298
|
+
|
|
1299
|
+
REJECTED =
|
|
1300
|
+
T.let(
|
|
1301
|
+
:rejected,
|
|
1302
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1303
|
+
)
|
|
1304
|
+
FAILED =
|
|
1305
|
+
T.let(
|
|
1306
|
+
:failed,
|
|
1307
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1308
|
+
)
|
|
1309
|
+
SKIPPED_UNSAFE_URL =
|
|
1310
|
+
T.let(
|
|
1311
|
+
:skipped_unsafe_url,
|
|
1312
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1313
|
+
)
|
|
1314
|
+
|
|
1315
|
+
sig do
|
|
1316
|
+
override.returns(
|
|
1317
|
+
T::Array[
|
|
1318
|
+
ContextDev::Models::MonitorListResponse::Data::WebhookFailure::LastStatus::TaggedSymbol
|
|
1319
|
+
]
|
|
1320
|
+
)
|
|
1321
|
+
end
|
|
1322
|
+
def self.values
|
|
1323
|
+
end
|
|
1324
|
+
end
|
|
1085
1325
|
end
|
|
1086
1326
|
end
|
|
1087
1327
|
end
|
|
@@ -139,6 +139,30 @@ module ContextDev
|
|
|
139
139
|
sig { returns(T.nilable(Time)) }
|
|
140
140
|
attr_accessor :started_at
|
|
141
141
|
|
|
142
|
+
# All webhook deliveries attempted by this run — one per subscribed event that
|
|
143
|
+
# fired. Omitted when no webhook was attempted, including runs created before
|
|
144
|
+
# event selection was added.
|
|
145
|
+
sig { returns(T.nilable(T::Array[ContextDev::WebhookDelivery])) }
|
|
146
|
+
attr_reader :webhook_deliveries
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
params(
|
|
150
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery::OrHash]
|
|
151
|
+
).void
|
|
152
|
+
end
|
|
153
|
+
attr_writer :webhook_deliveries
|
|
154
|
+
|
|
155
|
+
# Deprecated: use `webhook_deliveries`, which records every attempt now that a run
|
|
156
|
+
# can deliver multiple events. Omitted when no webhook was attempted, including
|
|
157
|
+
# historical runs created before delivery tracking was added.
|
|
158
|
+
sig { returns(T.nilable(ContextDev::WebhookDelivery)) }
|
|
159
|
+
attr_reader :webhook_delivery
|
|
160
|
+
|
|
161
|
+
sig do
|
|
162
|
+
params(webhook_delivery: ContextDev::WebhookDelivery::OrHash).void
|
|
163
|
+
end
|
|
164
|
+
attr_writer :webhook_delivery
|
|
165
|
+
|
|
142
166
|
sig do
|
|
143
167
|
params(
|
|
144
168
|
id: String,
|
|
@@ -164,7 +188,9 @@ module ContextDev
|
|
|
164
188
|
T.nilable(
|
|
165
189
|
ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::OrSymbol
|
|
166
190
|
),
|
|
167
|
-
started_at: T.nilable(Time)
|
|
191
|
+
started_at: T.nilable(Time),
|
|
192
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery::OrHash],
|
|
193
|
+
webhook_delivery: ContextDev::WebhookDelivery::OrHash
|
|
168
194
|
).returns(T.attached_class)
|
|
169
195
|
end
|
|
170
196
|
def self.new(
|
|
@@ -188,7 +214,15 @@ module ContextDev
|
|
|
188
214
|
error: nil,
|
|
189
215
|
# Why a skipped run never executed; null unless status is `skipped`.
|
|
190
216
|
skip_reason: nil,
|
|
191
|
-
started_at: nil
|
|
217
|
+
started_at: nil,
|
|
218
|
+
# All webhook deliveries attempted by this run — one per subscribed event that
|
|
219
|
+
# fired. Omitted when no webhook was attempted, including runs created before
|
|
220
|
+
# event selection was added.
|
|
221
|
+
webhook_deliveries: nil,
|
|
222
|
+
# Deprecated: use `webhook_deliveries`, which records every attempt now that a run
|
|
223
|
+
# can deliver multiple events. Omitted when no webhook was attempted, including
|
|
224
|
+
# historical runs created before delivery tracking was added.
|
|
225
|
+
webhook_delivery: nil
|
|
192
226
|
)
|
|
193
227
|
end
|
|
194
228
|
|
|
@@ -218,7 +252,9 @@ module ContextDev
|
|
|
218
252
|
T.nilable(
|
|
219
253
|
ContextDev::Models::MonitorListRunsResponse::Data::SkipReason::TaggedSymbol
|
|
220
254
|
),
|
|
221
|
-
started_at: T.nilable(Time)
|
|
255
|
+
started_at: T.nilable(Time),
|
|
256
|
+
webhook_deliveries: T::Array[ContextDev::WebhookDelivery],
|
|
257
|
+
webhook_delivery: ContextDev::WebhookDelivery
|
|
222
258
|
}
|
|
223
259
|
)
|
|
224
260
|
end
|
|
@@ -43,6 +43,10 @@ module ContextDev
|
|
|
43
43
|
sig { returns(String) }
|
|
44
44
|
attr_accessor :summary
|
|
45
45
|
|
|
46
|
+
# User-defined tags for grouping and filtering monitors and their changes.
|
|
47
|
+
sig { returns(T::Array[String]) }
|
|
48
|
+
attr_accessor :tags
|
|
49
|
+
|
|
46
50
|
sig do
|
|
47
51
|
returns(
|
|
48
52
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::TaggedSymbol
|
|
@@ -158,18 +162,11 @@ module ContextDev
|
|
|
158
162
|
sig { params(removed_urls: T::Array[String]).void }
|
|
159
163
|
attr_writer :removed_urls
|
|
160
164
|
|
|
161
|
-
# User-defined tags for grouping and filtering monitors and their changes.
|
|
162
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
163
|
-
attr_reader :tags
|
|
164
|
-
|
|
165
|
-
sig { params(tags: T::Array[String]).void }
|
|
166
|
-
attr_writer :tags
|
|
167
|
-
|
|
168
165
|
# A detected change. `mode` is the constant `web`; `target_type` and
|
|
169
166
|
# `change_detection_type` describe the change, and which optional fields are
|
|
170
167
|
# present depends on them (page: `diff` + excerpts; sitemap:
|
|
171
168
|
# `added_urls`/`removed_urls`; semantic:
|
|
172
|
-
# `
|
|
169
|
+
# `confidence`/`importance`/`evidence`/`matched_urls`).
|
|
173
170
|
sig do
|
|
174
171
|
params(
|
|
175
172
|
id: String,
|
|
@@ -181,6 +178,7 @@ module ContextDev
|
|
|
181
178
|
monitor_id: String,
|
|
182
179
|
run_id: String,
|
|
183
180
|
summary: String,
|
|
181
|
+
tags: T::Array[String],
|
|
184
182
|
target_type:
|
|
185
183
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::OrSymbol,
|
|
186
184
|
title: String,
|
|
@@ -200,8 +198,7 @@ module ContextDev
|
|
|
200
198
|
matched_url_count: Integer,
|
|
201
199
|
matched_urls: T::Array[String],
|
|
202
200
|
removed_url_count: Integer,
|
|
203
|
-
removed_urls: T::Array[String]
|
|
204
|
-
tags: T::Array[String]
|
|
201
|
+
removed_urls: T::Array[String]
|
|
205
202
|
).returns(T.attached_class)
|
|
206
203
|
end
|
|
207
204
|
def self.new(
|
|
@@ -215,6 +212,8 @@ module ContextDev
|
|
|
215
212
|
# The run that detected this change.
|
|
216
213
|
run_id:,
|
|
217
214
|
summary:,
|
|
215
|
+
# User-defined tags for grouping and filtering monitors and their changes.
|
|
216
|
+
tags:,
|
|
218
217
|
target_type:,
|
|
219
218
|
title:,
|
|
220
219
|
url:,
|
|
@@ -233,9 +232,7 @@ module ContextDev
|
|
|
233
232
|
matched_urls: nil,
|
|
234
233
|
removed_url_count: nil,
|
|
235
234
|
# At most 500 URLs are included; the corresponding count field is always exact.
|
|
236
|
-
removed_urls: nil
|
|
237
|
-
# User-defined tags for grouping and filtering monitors and their changes.
|
|
238
|
-
tags: nil
|
|
235
|
+
removed_urls: nil
|
|
239
236
|
)
|
|
240
237
|
end
|
|
241
238
|
|
|
@@ -251,6 +248,7 @@ module ContextDev
|
|
|
251
248
|
monitor_id: String,
|
|
252
249
|
run_id: String,
|
|
253
250
|
summary: String,
|
|
251
|
+
tags: T::Array[String],
|
|
254
252
|
target_type:
|
|
255
253
|
ContextDev::Models::MonitorRetrieveChangeResponse::TargetType::TaggedSymbol,
|
|
256
254
|
title: String,
|
|
@@ -270,8 +268,7 @@ module ContextDev
|
|
|
270
268
|
matched_url_count: Integer,
|
|
271
269
|
matched_urls: T::Array[String],
|
|
272
270
|
removed_url_count: Integer,
|
|
273
|
-
removed_urls: T::Array[String]
|
|
274
|
-
tags: T::Array[String]
|
|
271
|
+
removed_urls: T::Array[String]
|
|
275
272
|
}
|
|
276
273
|
)
|
|
277
274
|
end
|