@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,171 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "stripe-restricted-key",
4
+ "title": "A read-only restricted key: reads succeed, every write fails PERMISSION_DENIED (403) naming the missing permission",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "readonly-key",
8
+ "task": {
9
+ "instruction": "Run the restricted-key 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-list-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "stripe",
32
+ "operationId": "customers.list"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "customers-create-error",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "stripe",
47
+ "operationId": "customers.create"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 2
55
+ }
56
+ },
57
+ {
58
+ "id": "refunds-create-error",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "stripe",
62
+ "operationId": "refunds.create"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "payment-intents-confirm-error",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "stripe",
77
+ "operationId": "payment_intents.confirm"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "invoices-finalize-error",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "stripe",
92
+ "operationId": "invoices.finalize"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "subscriptions-create-error",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "stripe",
107
+ "operationId": "subscriptions.create"
108
+ },
109
+ "outcomes": [
110
+ "tool_error"
111
+ ],
112
+ "comparison": {
113
+ "operator": "equals",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "products-create-error",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "stripe",
122
+ "operationId": "products.create"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "equals",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "customers-create-ok",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "stripe",
137
+ "operationId": "customers.create"
138
+ },
139
+ "outcomes": [
140
+ "ok"
141
+ ],
142
+ "comparison": {
143
+ "operator": "equals",
144
+ "value": 0
145
+ }
146
+ },
147
+ {
148
+ "id": "payment_intent-succeeded-events",
149
+ "kind": "event.count",
150
+ "event": {
151
+ "packageId": "stripe",
152
+ "eventId": "payment_intent.succeeded"
153
+ },
154
+ "phase": "emitted",
155
+ "comparison": {
156
+ "operator": "equals",
157
+ "value": 0
158
+ }
159
+ },
160
+ {
161
+ "id": "customers-count",
162
+ "kind": "state.count",
163
+ "packageId": "stripe",
164
+ "namespace": "customers",
165
+ "comparison": {
166
+ "operator": "equals",
167
+ "value": 12
168
+ }
169
+ }
170
+ ]
171
+ }
@@ -0,0 +1,36 @@
1
+ # Third-party assets used by the Stripe Tool app
2
+
3
+ The browser app is served from `../site/`. This directory keeps the attribution record, the font licence and the
4
+ original downloads; the copies under `../site/assets/` are byte-identical (the framework serves only
5
+ html/css/js/json/image/font files, so this Markdown file and the licence text cannot live inside the served root).
6
+
7
+ ## Logos (trademarks of Stripe, Inc.)
8
+
9
+ | file | served copy | source | brand version |
10
+ |---|---|---|---|
11
+ | `stripe-s.svg` | `../site/assets/stripe-s.svg` | https://logos.lndev.me/logos/stripe-s.svg (library: https://github.com/ln-dev7/logos-apps) | The current Stripe "S" icon (single path, `currentColor`), used as the favicon and rendered in brand purple `#635BFF` |
12
+ | `stripe.svg` | `../site/assets/stripe.svg` | https://logos.lndev.me/logos/stripe.svg (library: https://github.com/ln-dev7/logos-apps) | The current flat "stripe" wordmark in brand purple `#635BFF` (the post-2016 lowercase wordmark that Stripe uses today) |
13
+
14
+ Downloaded on 2026-09-14 and used unmodified. The library also offers `cc-stripe.svg` (a card-badge style mark
15
+ for payment-method pickers); it is not the product logo and is not used. The Dashboard itself shows the account
16
+ name rather than the logo in its sidebar, so the app does the same; the wordmark is bundled for the favicon/brand
17
+ context only.
18
+
19
+ Stripe and the Stripe logo are trademarks of Stripe, Inc. They identify the simulated service inside a test
20
+ environment only; this package is not affiliated with or endorsed by Stripe.
21
+
22
+ ## Font
23
+
24
+ | file | served copy | source | licence |
25
+ |---|---|---|---|
26
+ | — | `../site/assets/fonts/inter-latin.woff2` | https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7W0Q5nw.woff2 (Inter v20, latin subset, variable weight 400–700, as served by https://fonts.googleapis.com/css2?family=Inter:wght@400..700) | SIL Open Font License 1.1 — `fonts/OFL.txt` (copied from https://raw.githubusercontent.com/google/fonts/main/ofl/inter/OFL.txt) |
27
+
28
+ Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter). The real Stripe Dashboard renders in
29
+ Stripe's proprietary "Söhne" typeface, which cannot be bundled; Inter is the closest permissively licensed match
30
+ (same humanist-grotesque proportions, tabular figures for amounts) and is the face this app uses.
31
+
32
+ ## Interface glyphs
33
+
34
+ The monochrome 16 px glyphs in `../site/icons.js` (navigation, status, actions) are original SVG paths drawn for
35
+ this package in the solid, rounded style of the Dashboard's icon set. No third-party icon font or brand asset is
36
+ embedded. Card brands are shown as text chips ("Visa •••• 4242") rather than as card-network logos.
@@ -0,0 +1,93 @@
1
+ Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="currentColor" d="M13.706 9.663c0-1.394 1.162-1.931 3.025-1.931c2.713 0 6.156.831 8.869 2.294V1.633C22.644.452 19.694.002 16.737.002c-7.231 0-12.05 3.775-12.05 10.087c0 9.869 13.55 8.269 13.55 12.525c0 1.65-1.431 2.181-3.419 2.181c-2.95 0-6.763-1.219-9.756-2.844v8.031a24.75 24.75 0 0 0 9.75 2.025c7.413 0 12.519-3.188 12.519-9.6c0-10.637-13.625-8.731-13.625-12.744"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 214"><path fill="#635bff" d="M512 110.08c0-36.409-17.636-65.138-51.342-65.138c-33.85 0-54.33 28.73-54.33 64.854c0 42.808 24.179 64.426 58.88 64.426c16.925 0 29.725-3.84 39.396-9.244v-28.445c-9.67 4.836-20.764 7.823-34.844 7.823c-13.796 0-26.027-4.836-27.591-21.618h69.547c0-1.85.284-9.245.284-12.658m-70.258-13.511c0-16.071 9.814-22.756 18.774-22.756c8.675 0 17.92 6.685 17.92 22.756zm-90.31-51.627c-13.939 0-22.899 6.542-27.876 11.094l-1.85-8.818h-31.288v165.83l35.555-7.537l.143-40.249c5.12 3.698 12.657 8.96 25.173 8.96c25.458 0 48.64-20.48 48.64-65.564c-.142-41.245-23.609-63.716-48.498-63.716m-8.534 97.991c-8.391 0-13.37-2.986-16.782-6.684l-.143-52.765c3.698-4.124 8.818-6.968 16.925-6.968c12.942 0 21.902 14.506 21.902 33.137c0 19.058-8.818 33.28-21.902 33.28M241.493 36.551l35.698-7.68V0l-35.698 7.538zm0 10.809h35.698v124.444h-35.698zm-38.257 10.524L200.96 47.36h-30.72v124.444h35.556V87.467c8.39-10.951 22.613-8.96 27.022-7.396V47.36c-4.551-1.707-21.191-4.836-29.582 10.524m-71.112-41.386l-34.702 7.395l-.142 113.92c0 21.05 15.787 36.551 36.836 36.551c11.662 0 20.195-2.133 24.888-4.693V140.8c-4.55 1.849-27.022 8.391-27.022-12.658V77.653h27.022V47.36h-27.022zM35.982 83.484c0-5.546 4.551-7.68 12.09-7.68c10.808 0 24.461 3.272 35.27 9.103V51.484c-11.804-4.693-23.466-6.542-35.27-6.542C19.2 44.942 0 60.018 0 85.192c0 39.252 54.044 32.995 54.044 49.92c0 6.541-5.688 8.675-13.653 8.675c-11.804 0-26.88-4.836-38.827-11.378v33.849c13.227 5.689 26.596 8.106 38.827 8.106c29.582 0 49.92-14.648 49.92-40.106c-.142-42.382-54.329-34.845-54.329-50.774"/></svg>