@firedrill-tools/resend 0.1.1

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 (65) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +198 -0
  3. package/firedrill/agent.target.json +16 -0
  4. package/firedrill/baseline.scenario.json +1687 -0
  5. package/firedrill/conformance.suite.json +19 -0
  6. package/firedrill/contacts-outage.scenario.json +11 -0
  7. package/firedrill/quota-exhausted.scenario.json +17 -0
  8. package/firedrill/rate-limited.scenario.json +11 -0
  9. package/firedrill/resend-audience.drill.json +407 -0
  10. package/firedrill/resend-contacts-outage.drill.json +63 -0
  11. package/firedrill/resend-denied.drill.json +68 -0
  12. package/firedrill/resend-domains-and-keys.drill.json +307 -0
  13. package/firedrill/resend-email-flow.drill.json +286 -0
  14. package/firedrill/resend-fresh-install.drill.json +73 -0
  15. package/firedrill/resend-invalid-key.drill.json +803 -0
  16. package/firedrill/resend-large-page.drill.json +53 -0
  17. package/firedrill/resend-quota-exhausted.drill.json +82 -0
  18. package/firedrill/resend-rate-limited.drill.json +81 -0
  19. package/firedrill/resend-restricted-key.drill.json +441 -0
  20. package/firedrill/resend-tight-limits.drill.json +163 -0
  21. package/firedrill/tight-limits.scenario.json +16 -0
  22. package/firedrill/tools/resend/app/assets/ATTRIBUTION.md +30 -0
  23. package/firedrill/tools/resend/app/assets/fonts/Inter-OFL.txt +93 -0
  24. package/firedrill/tools/resend/app/assets/fonts/JetBrainsMono-OFL.txt +93 -0
  25. package/firedrill/tools/resend/app/assets/fonts/inter-latin-wght-normal.woff2 +0 -0
  26. package/firedrill/tools/resend/app/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  27. package/firedrill/tools/resend/app/assets/resend-icon-white.svg +3 -0
  28. package/firedrill/tools/resend/app/assets/resend-wordmark-white.svg +3 -0
  29. package/firedrill/tools/resend/app/assets/resend.svg +3 -0
  30. package/firedrill/tools/resend/app/site/app.js +90 -0
  31. package/firedrill/tools/resend/app/site/assets/fonts/inter-latin-wght-normal.woff2 +0 -0
  32. package/firedrill/tools/resend/app/site/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  33. package/firedrill/tools/resend/app/site/assets/resend-icon-white.svg +3 -0
  34. package/firedrill/tools/resend/app/site/assets/resend-wordmark-white.svg +3 -0
  35. package/firedrill/tools/resend/app/site/assets/resend.svg +3 -0
  36. package/firedrill/tools/resend/app/site/contact-panel.js +86 -0
  37. package/firedrill/tools/resend/app/site/icons.js +70 -0
  38. package/firedrill/tools/resend/app/site/index.html +56 -0
  39. package/firedrill/tools/resend/app/site/list.js +41 -0
  40. package/firedrill/tools/resend/app/site/styles.css +67 -0
  41. package/firedrill/tools/resend/app/site/ui.js +259 -0
  42. package/firedrill/tools/resend/app/site/view-audience.js +160 -0
  43. package/firedrill/tools/resend/app/site/view-domains.js +106 -0
  44. package/firedrill/tools/resend/app/site/view-email-detail.js +126 -0
  45. package/firedrill/tools/resend/app/site/view-emails.js +83 -0
  46. package/firedrill/tools/resend/app/site/view-keys.js +91 -0
  47. package/firedrill/tools/resend/app/site/views.css +141 -0
  48. package/firedrill/tools/resend/behavior.mjs +114 -0
  49. package/firedrill/tools/resend/lib/check.mjs +75 -0
  50. package/firedrill/tools/resend/lib/core.mjs +112 -0
  51. package/firedrill/tools/resend/lib/json-depth.mjs +45 -0
  52. package/firedrill/tools/resend/lib/page.mjs +66 -0
  53. package/firedrill/tools/resend/lib/time.mjs +60 -0
  54. package/firedrill/tools/resend/lib/wire.mjs +98 -0
  55. package/firedrill/tools/resend/ops/contacts.mjs +199 -0
  56. package/firedrill/tools/resend/ops/domains.mjs +125 -0
  57. package/firedrill/tools/resend/ops/email-model.mjs +100 -0
  58. package/firedrill/tools/resend/ops/emails.mjs +139 -0
  59. package/firedrill/tools/resend/ops/keys-segments.mjs +97 -0
  60. package/firedrill/tools/resend/resend.tool.json +4804 -0
  61. package/firedrill/world.json +2148 -0
  62. package/firedrill.json +5 -0
  63. package/package.json +62 -0
  64. package/starter.json +1686 -0
  65. package/test/conformance.mjs +480 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "conformance",
4
+ "title": "Resend Tool conformance: every operation, declared error, event and fault",
5
+ "drills": [
6
+ "resend-email-flow",
7
+ "resend-domains-and-keys",
8
+ "resend-audience",
9
+ "resend-restricted-key",
10
+ "resend-invalid-key",
11
+ "resend-fresh-install",
12
+ "resend-denied",
13
+ "resend-rate-limited",
14
+ "resend-contacts-outage",
15
+ "resend-quota-exhausted",
16
+ "resend-tight-limits",
17
+ "resend-large-page"
18
+ ]
19
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "contacts-outage",
4
+ "title": "Contact creation commits but the caller sees HTTP 500 application_error",
5
+ "faults": [
6
+ {
7
+ "packageId": "resend",
8
+ "faultId": "contacts-create-unavailable"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "quota-exhausted",
4
+ "title": "The team has one email left in today's quota of 100",
5
+ "state": [
6
+ {
7
+ "action": "upsert",
8
+ "packageId": "resend",
9
+ "namespace": "meta",
10
+ "rowId": "usage",
11
+ "value": {
12
+ "day": "2026-09-15",
13
+ "sent": 99
14
+ }
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "rate-limited",
4
+ "title": "Sending answers HTTP 429 rate_limit_exceeded before anything is written",
5
+ "faults": [
6
+ {
7
+ "packageId": "resend",
8
+ "faultId": "send-rate-limited"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,407 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "resend-audience",
4
+ "title": "Segments and contacts with membership, lookups by id and e-mail, pagination and removal",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "owner",
8
+ "task": {
9
+ "instruction": "Run the audience flow against the synthetic Resend Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "segments-create-ok",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "resend",
17
+ "operationId": "segments.create"
18
+ },
19
+ "outcomes": [
20
+ "ok"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "segments-create-tool-error",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "resend",
32
+ "operationId": "segments.create"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "segments-list-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "resend",
47
+ "operationId": "segments.list"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "segments-list-tool-error",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "resend",
62
+ "operationId": "segments.list"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "segments-remove-ok",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "resend",
77
+ "operationId": "segments.remove"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "segments-remove-tool-error",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "resend",
92
+ "operationId": "segments.remove"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "contacts-create-ok",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "resend",
107
+ "operationId": "contacts.create"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "contacts-create-tool-error",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "resend",
122
+ "operationId": "contacts.create"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "contacts-list-ok",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "resend",
137
+ "operationId": "contacts.list"
138
+ },
139
+ "outcomes": [
140
+ "ok"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "contacts-list-tool-error",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "resend",
152
+ "operationId": "contacts.list"
153
+ },
154
+ "outcomes": [
155
+ "tool_error"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "contacts-get-ok",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "resend",
167
+ "operationId": "contacts.get"
168
+ },
169
+ "outcomes": [
170
+ "ok"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 1
175
+ }
176
+ },
177
+ {
178
+ "id": "contacts-get-tool-error",
179
+ "kind": "operation.count",
180
+ "operation": {
181
+ "packageId": "resend",
182
+ "operationId": "contacts.get"
183
+ },
184
+ "outcomes": [
185
+ "tool_error"
186
+ ],
187
+ "comparison": {
188
+ "operator": "greater_than_or_equal",
189
+ "value": 1
190
+ }
191
+ },
192
+ {
193
+ "id": "contacts-update-ok",
194
+ "kind": "operation.count",
195
+ "operation": {
196
+ "packageId": "resend",
197
+ "operationId": "contacts.update"
198
+ },
199
+ "outcomes": [
200
+ "ok"
201
+ ],
202
+ "comparison": {
203
+ "operator": "greater_than_or_equal",
204
+ "value": 1
205
+ }
206
+ },
207
+ {
208
+ "id": "contacts-update-tool-error",
209
+ "kind": "operation.count",
210
+ "operation": {
211
+ "packageId": "resend",
212
+ "operationId": "contacts.update"
213
+ },
214
+ "outcomes": [
215
+ "tool_error"
216
+ ],
217
+ "comparison": {
218
+ "operator": "greater_than_or_equal",
219
+ "value": 1
220
+ }
221
+ },
222
+ {
223
+ "id": "contacts-remove-ok",
224
+ "kind": "operation.count",
225
+ "operation": {
226
+ "packageId": "resend",
227
+ "operationId": "contacts.remove"
228
+ },
229
+ "outcomes": [
230
+ "ok"
231
+ ],
232
+ "comparison": {
233
+ "operator": "greater_than_or_equal",
234
+ "value": 1
235
+ }
236
+ },
237
+ {
238
+ "id": "contacts-remove-tool-error",
239
+ "kind": "operation.count",
240
+ "operation": {
241
+ "packageId": "resend",
242
+ "operationId": "contacts.remove"
243
+ },
244
+ "outcomes": [
245
+ "tool_error"
246
+ ],
247
+ "comparison": {
248
+ "operator": "greater_than_or_equal",
249
+ "value": 1
250
+ }
251
+ },
252
+ {
253
+ "id": "contacts-add-segment-ok",
254
+ "kind": "operation.count",
255
+ "operation": {
256
+ "packageId": "resend",
257
+ "operationId": "contacts.add_segment"
258
+ },
259
+ "outcomes": [
260
+ "ok"
261
+ ],
262
+ "comparison": {
263
+ "operator": "greater_than_or_equal",
264
+ "value": 1
265
+ }
266
+ },
267
+ {
268
+ "id": "contacts-add-segment-tool-error",
269
+ "kind": "operation.count",
270
+ "operation": {
271
+ "packageId": "resend",
272
+ "operationId": "contacts.add_segment"
273
+ },
274
+ "outcomes": [
275
+ "tool_error"
276
+ ],
277
+ "comparison": {
278
+ "operator": "greater_than_or_equal",
279
+ "value": 1
280
+ }
281
+ },
282
+ {
283
+ "id": "contacts-remove-segment-ok",
284
+ "kind": "operation.count",
285
+ "operation": {
286
+ "packageId": "resend",
287
+ "operationId": "contacts.remove_segment"
288
+ },
289
+ "outcomes": [
290
+ "ok"
291
+ ],
292
+ "comparison": {
293
+ "operator": "greater_than_or_equal",
294
+ "value": 1
295
+ }
296
+ },
297
+ {
298
+ "id": "contacts-remove-segment-tool-error",
299
+ "kind": "operation.count",
300
+ "operation": {
301
+ "packageId": "resend",
302
+ "operationId": "contacts.remove_segment"
303
+ },
304
+ "outcomes": [
305
+ "tool_error"
306
+ ],
307
+ "comparison": {
308
+ "operator": "greater_than_or_equal",
309
+ "value": 1
310
+ }
311
+ },
312
+ {
313
+ "id": "contacts-list-segments-ok",
314
+ "kind": "operation.count",
315
+ "operation": {
316
+ "packageId": "resend",
317
+ "operationId": "contacts.list_segments"
318
+ },
319
+ "outcomes": [
320
+ "ok"
321
+ ],
322
+ "comparison": {
323
+ "operator": "greater_than_or_equal",
324
+ "value": 1
325
+ }
326
+ },
327
+ {
328
+ "id": "contacts-list-segments-tool-error",
329
+ "kind": "operation.count",
330
+ "operation": {
331
+ "packageId": "resend",
332
+ "operationId": "contacts.list_segments"
333
+ },
334
+ "outcomes": [
335
+ "tool_error"
336
+ ],
337
+ "comparison": {
338
+ "operator": "greater_than_or_equal",
339
+ "value": 1
340
+ }
341
+ },
342
+ {
343
+ "id": "segments-count",
344
+ "kind": "state.count",
345
+ "packageId": "resend",
346
+ "namespace": "segments",
347
+ "comparison": {
348
+ "operator": "equals",
349
+ "value": 2
350
+ }
351
+ },
352
+ {
353
+ "id": "contacts-count",
354
+ "kind": "state.count",
355
+ "packageId": "resend",
356
+ "namespace": "contacts",
357
+ "comparison": {
358
+ "operator": "equals",
359
+ "value": 14
360
+ }
361
+ },
362
+ {
363
+ "id": "contact-emails-count",
364
+ "kind": "state.count",
365
+ "packageId": "resend",
366
+ "namespace": "contact-emails",
367
+ "comparison": {
368
+ "operator": "equals",
369
+ "value": 14
370
+ }
371
+ },
372
+ {
373
+ "id": "segment-members-count",
374
+ "kind": "state.count",
375
+ "packageId": "resend",
376
+ "namespace": "segment-members",
377
+ "comparison": {
378
+ "operator": "equals",
379
+ "value": 9
380
+ }
381
+ },
382
+ {
383
+ "id": "contact-segments-count",
384
+ "kind": "state.count",
385
+ "packageId": "resend",
386
+ "namespace": "contact-segments",
387
+ "comparison": {
388
+ "operator": "equals",
389
+ "value": 9
390
+ }
391
+ },
392
+ {
393
+ "id": "theo-renamed",
394
+ "kind": "state.value",
395
+ "packageId": "resend",
396
+ "namespace": "contacts",
397
+ "rowId": "fffffffd-0000-4000-8000-000500000002",
398
+ "path": [
399
+ "firstName"
400
+ ],
401
+ "comparison": {
402
+ "operator": "equals",
403
+ "value": "Theodor"
404
+ }
405
+ }
406
+ ]
407
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "resend-contacts-outage",
4
+ "title": "Contact creation commits but answers 500; a retry finds the contact already exists",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "contacts-outage",
7
+ "actorId": "owner",
8
+ "task": {
9
+ "instruction": "Run the contacts-outage flow against the synthetic Resend Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "contacts-create-tool-error",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "resend",
17
+ "operationId": "contacts.create"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 2
25
+ }
26
+ },
27
+ {
28
+ "id": "contacts-get-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "resend",
32
+ "operationId": "contacts.get"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "contacts-count",
44
+ "kind": "state.count",
45
+ "packageId": "resend",
46
+ "namespace": "contacts",
47
+ "comparison": {
48
+ "operator": "equals",
49
+ "value": 15
50
+ }
51
+ },
52
+ {
53
+ "id": "contact-emails-count",
54
+ "kind": "state.count",
55
+ "packageId": "resend",
56
+ "namespace": "contact-emails",
57
+ "comparison": {
58
+ "operator": "equals",
59
+ "value": 15
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "resend-denied",
4
+ "title": "Without grants the framework denies calls before the Tool runs",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "no-grants",
8
+ "task": {
9
+ "instruction": "Run the denied flow against the synthetic Resend Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "emails-send-denied",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "resend",
17
+ "operationId": "emails.send"
18
+ },
19
+ "outcomes": [
20
+ "denied"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "emails-list-denied",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "resend",
32
+ "operationId": "emails.list"
33
+ },
34
+ "outcomes": [
35
+ "denied"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "emails-send-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "resend",
47
+ "operationId": "emails.send"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 0
55
+ }
56
+ },
57
+ {
58
+ "id": "emails-count",
59
+ "kind": "state.count",
60
+ "packageId": "resend",
61
+ "namespace": "emails",
62
+ "comparison": {
63
+ "operator": "equals",
64
+ "value": 23
65
+ }
66
+ }
67
+ ]
68
+ }