@firedrill-tools/stripe 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 (59) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +433 -0
  3. package/firedrill/agent.target.json +17 -0
  4. package/firedrill/api-unavailable.scenario.json +11 -0
  5. package/firedrill/baseline.scenario.json +5 -0
  6. package/firedrill/conformance.suite.json +17 -0
  7. package/firedrill/rate-limited.scenario.json +11 -0
  8. package/firedrill/refund-committed-lost.scenario.json +11 -0
  9. package/firedrill/stripe-api-unavailable.drill.json +463 -0
  10. package/firedrill/stripe-denied.drill.json +74 -0
  11. package/firedrill/stripe-large-pages.drill.json +153 -0
  12. package/firedrill/stripe-live-mode.drill.json +136 -0
  13. package/firedrill/stripe-mcp-aliases.drill.json +406 -0
  14. package/firedrill/stripe-no-permissions.drill.json +1143 -0
  15. package/firedrill/stripe-rate-limited.drill.json +616 -0
  16. package/firedrill/stripe-refund-committed-lost.drill.json +139 -0
  17. package/firedrill/stripe-rest-flow.drill.json +1401 -0
  18. package/firedrill/stripe-restricted-key.drill.json +171 -0
  19. package/firedrill/tools/stripe/app/assets/ATTRIBUTION.md +36 -0
  20. package/firedrill/tools/stripe/app/assets/fonts/OFL.txt +93 -0
  21. package/firedrill/tools/stripe/app/assets/stripe-s.svg +1 -0
  22. package/firedrill/tools/stripe/app/assets/stripe.svg +1 -0
  23. package/firedrill/tools/stripe/app/site/app.js +456 -0
  24. package/firedrill/tools/stripe/app/site/assets/fonts/inter-latin.woff2 +0 -0
  25. package/firedrill/tools/stripe/app/site/assets/stripe-s.svg +1 -0
  26. package/firedrill/tools/stripe/app/site/assets/stripe.svg +1 -0
  27. package/firedrill/tools/stripe/app/site/icons.js +90 -0
  28. package/firedrill/tools/stripe/app/site/index.html +137 -0
  29. package/firedrill/tools/stripe/app/site/pages-billing.js +902 -0
  30. package/firedrill/tools/stripe/app/site/pages-catalog.js +314 -0
  31. package/firedrill/tools/stripe/app/site/pages-customers.js +416 -0
  32. package/firedrill/tools/stripe/app/site/pages-home.js +373 -0
  33. package/firedrill/tools/stripe/app/site/pages-payments.js +502 -0
  34. package/firedrill/tools/stripe/app/site/store.js +99 -0
  35. package/firedrill/tools/stripe/app/site/styles.css +2512 -0
  36. package/firedrill/tools/stripe/app/site/ui.js +767 -0
  37. package/firedrill/tools/stripe/app/site/widgets.js +707 -0
  38. package/firedrill/tools/stripe/behavior.mjs +148 -0
  39. package/firedrill/tools/stripe/lib/cards.mjs +53 -0
  40. package/firedrill/tools/stripe/lib/form.mjs +204 -0
  41. package/firedrill/tools/stripe/lib/ids.mjs +85 -0
  42. package/firedrill/tools/stripe/lib/money.mjs +35 -0
  43. package/firedrill/tools/stripe/lib/objects.mjs +229 -0
  44. package/firedrill/tools/stripe/lib/periods.mjs +41 -0
  45. package/firedrill/tools/stripe/lib/size.mjs +55 -0
  46. package/firedrill/tools/stripe/lib/state.mjs +230 -0
  47. package/firedrill/tools/stripe/lib/validate.mjs +184 -0
  48. package/firedrill/tools/stripe/lib/wire.mjs +98 -0
  49. package/firedrill/tools/stripe/ops/billing.mjs +914 -0
  50. package/firedrill/tools/stripe/ops/catalog.mjs +203 -0
  51. package/firedrill/tools/stripe/ops/customers.mjs +241 -0
  52. package/firedrill/tools/stripe/ops/dashboard.mjs +29 -0
  53. package/firedrill/tools/stripe/ops/payments.mjs +608 -0
  54. package/firedrill/tools/stripe/stripe.tool.json +28833 -0
  55. package/firedrill/world.json +8527 -0
  56. package/firedrill.json +5 -0
  57. package/package.json +64 -0
  58. package/starter.json +7999 -0
  59. package/test/conformance.mjs +1133 -0
@@ -0,0 +1,136 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "stripe-live-mode",
4
+ "title": "A live-mode key: test payment method ids do not resolve and objects are stamped livemode=true",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "live-key",
8
+ "task": {
9
+ "instruction": "Run the live-mode conformance flow against the synthetic Stripe Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "payment-methods-attach-error",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "stripe",
17
+ "operationId": "payment_methods.attach"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "payment-intents-create-error",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "stripe",
32
+ "operationId": "payment_intents.create"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "payment-intents-create-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "stripe",
47
+ "operationId": "payment_intents.create"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "payment-intents-confirm-error",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "stripe",
62
+ "operationId": "payment_intents.confirm"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "customers-retrieve-ok",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "stripe",
77
+ "operationId": "customers.retrieve"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "live-intent-livemode",
89
+ "kind": "state.value",
90
+ "packageId": "stripe",
91
+ "namespace": "payment_intents",
92
+ "rowId": "pi_0000RS2sPG8b2r",
93
+ "path": [
94
+ "livemode"
95
+ ],
96
+ "comparison": {
97
+ "operator": "equals",
98
+ "value": true
99
+ }
100
+ },
101
+ {
102
+ "id": "live-intent-status",
103
+ "kind": "state.value",
104
+ "packageId": "stripe",
105
+ "namespace": "payment_intents",
106
+ "rowId": "pi_0000RS2sPG8b2r",
107
+ "path": [
108
+ "status"
109
+ ],
110
+ "comparison": {
111
+ "operator": "equals",
112
+ "value": "requires_payment_method"
113
+ }
114
+ },
115
+ {
116
+ "id": "payment_methods-count",
117
+ "kind": "state.count",
118
+ "packageId": "stripe",
119
+ "namespace": "payment_methods",
120
+ "comparison": {
121
+ "operator": "equals",
122
+ "value": 14
123
+ }
124
+ },
125
+ {
126
+ "id": "payment_intents-count",
127
+ "kind": "state.count",
128
+ "packageId": "stripe",
129
+ "namespace": "payment_intents",
130
+ "comparison": {
131
+ "operator": "equals",
132
+ "value": 22
133
+ }
134
+ }
135
+ ]
136
+ }
@@ -0,0 +1,406 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "stripe-mcp-aliases",
4
+ "title": "Stripe agent-toolkit MCP tool names over the MCP binding",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "owner",
8
+ "task": {
9
+ "instruction": "Run the mcp-aliases conformance flow against the synthetic Stripe Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "balance-retrieve-ok",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "stripe",
17
+ "operationId": "balance.retrieve"
18
+ },
19
+ "outcomes": [
20
+ "ok"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "customers-create-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "stripe",
32
+ "operationId": "customers.create"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "customers-list-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "stripe",
47
+ "operationId": "customers.list"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "invoice-items-create-ok",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "stripe",
62
+ "operationId": "invoice_items.create"
63
+ },
64
+ "outcomes": [
65
+ "ok"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "invoices-create-ok",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "stripe",
77
+ "operationId": "invoices.create"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "invoices-finalize-ok",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "stripe",
92
+ "operationId": "invoices.finalize"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "invoices-list-ok",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "stripe",
107
+ "operationId": "invoices.list"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "payment-intents-list-ok",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "stripe",
122
+ "operationId": "payment_intents.list"
123
+ },
124
+ "outcomes": [
125
+ "ok"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "prices-create-ok",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "stripe",
137
+ "operationId": "prices.create"
138
+ },
139
+ "outcomes": [
140
+ "ok"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "prices-list-ok",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "stripe",
152
+ "operationId": "prices.list"
153
+ },
154
+ "outcomes": [
155
+ "ok"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "products-create-ok",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "stripe",
167
+ "operationId": "products.create"
168
+ },
169
+ "outcomes": [
170
+ "ok"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 1
175
+ }
176
+ },
177
+ {
178
+ "id": "products-list-ok",
179
+ "kind": "operation.count",
180
+ "operation": {
181
+ "packageId": "stripe",
182
+ "operationId": "products.list"
183
+ },
184
+ "outcomes": [
185
+ "ok"
186
+ ],
187
+ "comparison": {
188
+ "operator": "greater_than_or_equal",
189
+ "value": 1
190
+ }
191
+ },
192
+ {
193
+ "id": "refunds-create-ok",
194
+ "kind": "operation.count",
195
+ "operation": {
196
+ "packageId": "stripe",
197
+ "operationId": "refunds.create"
198
+ },
199
+ "outcomes": [
200
+ "ok"
201
+ ],
202
+ "comparison": {
203
+ "operator": "greater_than_or_equal",
204
+ "value": 1
205
+ }
206
+ },
207
+ {
208
+ "id": "subscriptions-cancel-ok",
209
+ "kind": "operation.count",
210
+ "operation": {
211
+ "packageId": "stripe",
212
+ "operationId": "subscriptions.cancel"
213
+ },
214
+ "outcomes": [
215
+ "ok"
216
+ ],
217
+ "comparison": {
218
+ "operator": "greater_than_or_equal",
219
+ "value": 1
220
+ }
221
+ },
222
+ {
223
+ "id": "subscriptions-list-ok",
224
+ "kind": "operation.count",
225
+ "operation": {
226
+ "packageId": "stripe",
227
+ "operationId": "subscriptions.list"
228
+ },
229
+ "outcomes": [
230
+ "ok"
231
+ ],
232
+ "comparison": {
233
+ "operator": "greater_than_or_equal",
234
+ "value": 1
235
+ }
236
+ },
237
+ {
238
+ "id": "subscriptions-update-ok",
239
+ "kind": "operation.count",
240
+ "operation": {
241
+ "packageId": "stripe",
242
+ "operationId": "subscriptions.update"
243
+ },
244
+ "outcomes": [
245
+ "ok"
246
+ ],
247
+ "comparison": {
248
+ "operator": "greater_than_or_equal",
249
+ "value": 1
250
+ }
251
+ },
252
+ {
253
+ "id": "refunds-create-error",
254
+ "kind": "operation.count",
255
+ "operation": {
256
+ "packageId": "stripe",
257
+ "operationId": "refunds.create"
258
+ },
259
+ "outcomes": [
260
+ "tool_error"
261
+ ],
262
+ "comparison": {
263
+ "operator": "equals",
264
+ "value": 1
265
+ }
266
+ },
267
+ {
268
+ "id": "prices-list-error",
269
+ "kind": "operation.count",
270
+ "operation": {
271
+ "packageId": "stripe",
272
+ "operationId": "prices.list"
273
+ },
274
+ "outcomes": [
275
+ "tool_error"
276
+ ],
277
+ "comparison": {
278
+ "operator": "equals",
279
+ "value": 1
280
+ }
281
+ },
282
+ {
283
+ "id": "invoices-finalize-error",
284
+ "kind": "operation.count",
285
+ "operation": {
286
+ "packageId": "stripe",
287
+ "operationId": "invoices.finalize"
288
+ },
289
+ "outcomes": [
290
+ "tool_error"
291
+ ],
292
+ "comparison": {
293
+ "operator": "equals",
294
+ "value": 1
295
+ }
296
+ },
297
+ {
298
+ "id": "charge-refunded-events",
299
+ "kind": "event.count",
300
+ "event": {
301
+ "packageId": "stripe",
302
+ "eventId": "charge.refunded"
303
+ },
304
+ "phase": "emitted",
305
+ "comparison": {
306
+ "operator": "equals",
307
+ "value": 1
308
+ }
309
+ },
310
+ {
311
+ "id": "customer-subscription-deleted-events",
312
+ "kind": "event.count",
313
+ "event": {
314
+ "packageId": "stripe",
315
+ "eventId": "customer.subscription.deleted"
316
+ },
317
+ "phase": "emitted",
318
+ "comparison": {
319
+ "operator": "equals",
320
+ "value": 1
321
+ }
322
+ },
323
+ {
324
+ "id": "customers-count",
325
+ "kind": "state.count",
326
+ "packageId": "stripe",
327
+ "namespace": "customers",
328
+ "comparison": {
329
+ "operator": "equals",
330
+ "value": 13
331
+ }
332
+ },
333
+ {
334
+ "id": "products-count",
335
+ "kind": "state.count",
336
+ "packageId": "stripe",
337
+ "namespace": "products",
338
+ "comparison": {
339
+ "operator": "equals",
340
+ "value": 7
341
+ }
342
+ },
343
+ {
344
+ "id": "order",
345
+ "kind": "operation.order",
346
+ "sequence": [
347
+ {
348
+ "anyOf": [
349
+ {
350
+ "packageId": "stripe",
351
+ "operationId": "customers.create"
352
+ }
353
+ ]
354
+ },
355
+ {
356
+ "anyOf": [
357
+ {
358
+ "packageId": "stripe",
359
+ "operationId": "products.create"
360
+ }
361
+ ]
362
+ },
363
+ {
364
+ "anyOf": [
365
+ {
366
+ "packageId": "stripe",
367
+ "operationId": "prices.create"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "anyOf": [
373
+ {
374
+ "packageId": "stripe",
375
+ "operationId": "invoices.create"
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "anyOf": [
381
+ {
382
+ "packageId": "stripe",
383
+ "operationId": "invoice_items.create"
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ "anyOf": [
389
+ {
390
+ "packageId": "stripe",
391
+ "operationId": "invoices.finalize"
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ "anyOf": [
397
+ {
398
+ "packageId": "stripe",
399
+ "operationId": "subscriptions.cancel"
400
+ }
401
+ ]
402
+ }
403
+ ]
404
+ }
405
+ ]
406
+ }