@dropins/mcp 0.1.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.
Files changed (103) hide show
  1. package/LICENSE.md +127 -0
  2. package/README.md +314 -0
  3. package/dist/common/project-reader.d.ts +55 -0
  4. package/dist/common/project-reader.js +173 -0
  5. package/dist/common/registry-loader.d.ts +101 -0
  6. package/dist/common/registry-loader.js +386 -0
  7. package/dist/common/response-handling.d.ts +12 -0
  8. package/dist/common/response-handling.js +21 -0
  9. package/dist/common/sanitize.d.ts +8 -0
  10. package/dist/common/sanitize.js +45 -0
  11. package/dist/common/synonyms.d.ts +9 -0
  12. package/dist/common/synonyms.js +127 -0
  13. package/dist/common/telemetry.d.ts +14 -0
  14. package/dist/common/telemetry.js +54 -0
  15. package/dist/common/types.d.ts +308 -0
  16. package/dist/common/types.js +1 -0
  17. package/dist/common/version.d.ts +2 -0
  18. package/dist/common/version.js +14 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +136 -0
  21. package/dist/operations/analyze-project.d.ts +13 -0
  22. package/dist/operations/analyze-project.js +125 -0
  23. package/dist/operations/check-block-health.d.ts +19 -0
  24. package/dist/operations/check-block-health.js +1149 -0
  25. package/dist/operations/check-config.d.ts +13 -0
  26. package/dist/operations/check-config.js +228 -0
  27. package/dist/operations/explain-event-flow.d.ts +16 -0
  28. package/dist/operations/explain-event-flow.js +218 -0
  29. package/dist/operations/get-upgrade-diff.d.ts +13 -0
  30. package/dist/operations/get-upgrade-diff.js +144 -0
  31. package/dist/operations/list-api-functions.d.ts +13 -0
  32. package/dist/operations/list-api-functions.js +53 -0
  33. package/dist/operations/list-containers.d.ts +13 -0
  34. package/dist/operations/list-containers.js +44 -0
  35. package/dist/operations/list-design-tokens.d.ts +13 -0
  36. package/dist/operations/list-design-tokens.js +47 -0
  37. package/dist/operations/list-events.d.ts +16 -0
  38. package/dist/operations/list-events.js +39 -0
  39. package/dist/operations/list-graphql-queries.d.ts +19 -0
  40. package/dist/operations/list-graphql-queries.js +84 -0
  41. package/dist/operations/list-i18n-keys.d.ts +19 -0
  42. package/dist/operations/list-i18n-keys.js +105 -0
  43. package/dist/operations/list-models.d.ts +16 -0
  44. package/dist/operations/list-models.js +80 -0
  45. package/dist/operations/list-slots.d.ts +16 -0
  46. package/dist/operations/list-slots.js +81 -0
  47. package/dist/operations/scaffold-block.d.ts +31 -0
  48. package/dist/operations/scaffold-block.js +331 -0
  49. package/dist/operations/scaffold-extension.d.ts +28 -0
  50. package/dist/operations/scaffold-extension.js +346 -0
  51. package/dist/operations/scaffold-slot.d.ts +22 -0
  52. package/dist/operations/scaffold-slot.js +189 -0
  53. package/dist/operations/search-commerce-docs.d.ts +16 -0
  54. package/dist/operations/search-commerce-docs.js +101 -0
  55. package/dist/operations/search-docs.d.ts +23 -0
  56. package/dist/operations/search-docs.js +298 -0
  57. package/dist/operations/suggest-event-handler.d.ts +16 -0
  58. package/dist/operations/suggest-event-handler.js +175 -0
  59. package/dist/operations/suggest-slot-implementation.d.ts +19 -0
  60. package/dist/operations/suggest-slot-implementation.js +183 -0
  61. package/dist/registry/api-functions.json +3045 -0
  62. package/dist/registry/block-patterns.json +78 -0
  63. package/dist/registry/containers.json +2003 -0
  64. package/dist/registry/design-tokens.json +577 -0
  65. package/dist/registry/docs/boilerplate.json +55 -0
  66. package/dist/registry/docs/dropins-all.json +97 -0
  67. package/dist/registry/docs/dropins-b2b.json +607 -0
  68. package/dist/registry/docs/dropins-cart.json +163 -0
  69. package/dist/registry/docs/dropins-checkout.json +193 -0
  70. package/dist/registry/docs/dropins-order.json +139 -0
  71. package/dist/registry/docs/dropins-payment-services.json +73 -0
  72. package/dist/registry/docs/dropins-personalization.json +67 -0
  73. package/dist/registry/docs/dropins-product-details.json +139 -0
  74. package/dist/registry/docs/dropins-product-discovery.json +85 -0
  75. package/dist/registry/docs/dropins-recommendations.json +67 -0
  76. package/dist/registry/docs/dropins-user-account.json +121 -0
  77. package/dist/registry/docs/dropins-user-auth.json +103 -0
  78. package/dist/registry/docs/dropins-wishlist.json +85 -0
  79. package/dist/registry/docs/get-started.json +85 -0
  80. package/dist/registry/docs/how-tos.json +19 -0
  81. package/dist/registry/docs/index.json +139 -0
  82. package/dist/registry/docs/licensing.json +19 -0
  83. package/dist/registry/docs/merchants.json +523 -0
  84. package/dist/registry/docs/resources.json +13 -0
  85. package/dist/registry/docs/sdk.json +139 -0
  86. package/dist/registry/docs/setup.json +145 -0
  87. package/dist/registry/docs/troubleshooting.json +19 -0
  88. package/dist/registry/events.json +2200 -0
  89. package/dist/registry/examples/index.json +19 -0
  90. package/dist/registry/examples/storefront-checkout.json +377 -0
  91. package/dist/registry/examples/storefront-quote-management.json +49 -0
  92. package/dist/registry/extensions.json +272 -0
  93. package/dist/registry/graphql.json +3469 -0
  94. package/dist/registry/i18n.json +1873 -0
  95. package/dist/registry/models.json +1001 -0
  96. package/dist/registry/sdk.json +2357 -0
  97. package/dist/registry/slots.json +2270 -0
  98. package/dist/registry/tools-components.json +595 -0
  99. package/dist/resources/guides.d.ts +7 -0
  100. package/dist/resources/guides.js +625 -0
  101. package/dist/resources/handlers.d.ts +31 -0
  102. package/dist/resources/handlers.js +322 -0
  103. package/package.json +47 -0
@@ -0,0 +1,8 @@
1
+ export declare function validateIdentifier(value: string, label: string): string | null;
2
+ export declare function validatePathContainment(basePath: string, childPath: string): boolean;
3
+ export declare function sanitizeForComment(value: string): string;
4
+ export declare function escapeJsString(value: string): string;
5
+ export declare function validateUrl(value: string, label: string): string | null;
6
+ export declare function validateBlockName(blockName: string): string | null;
7
+ export declare function validateExtensionId(extensionId: string): string | null;
8
+ export declare function sanitizeErrorMessage(message: string): string;
@@ -0,0 +1,45 @@
1
+ import { resolve, normalize } from "path";
2
+ const SAFE_IDENTIFIER = /^[a-zA-Z0-9_-]+$/;
3
+ const SAFE_URL = /^https?:\/\/[^\s'"`;]+$/;
4
+ export function validateIdentifier(value, label) {
5
+ if (!SAFE_IDENTIFIER.test(value)) {
6
+ return `Invalid ${label}: "${value}". Only alphanumeric characters, hyphens, and underscores are allowed.`;
7
+ }
8
+ return null;
9
+ }
10
+ export function validatePathContainment(basePath, childPath) {
11
+ const resolvedBase = resolve(basePath);
12
+ const resolvedChild = resolve(basePath, childPath);
13
+ const normalizedBase = normalize(resolvedBase) + "/";
14
+ const normalizedChild = normalize(resolvedChild);
15
+ return (normalizedChild.startsWith(normalizedBase) ||
16
+ normalizedChild === resolve(basePath));
17
+ }
18
+ export function sanitizeForComment(value) {
19
+ return value
20
+ .replace(/\r?\n/g, " ")
21
+ .replace(/\*\//g, "* /")
22
+ .replace(/\/\*/g, "/ *");
23
+ }
24
+ export function escapeJsString(value) {
25
+ return value
26
+ .replace(/\\/g, "\\\\")
27
+ .replace(/'/g, "\\'")
28
+ .replace(/\r?\n/g, "\\n")
29
+ .replace(/\r/g, "\\r");
30
+ }
31
+ export function validateUrl(value, label) {
32
+ if (!SAFE_URL.test(value)) {
33
+ return `Invalid ${label}: "${value}". Only http/https URLs without quotes or backticks are allowed.`;
34
+ }
35
+ return null;
36
+ }
37
+ export function validateBlockName(blockName) {
38
+ return validateIdentifier(blockName, "block name");
39
+ }
40
+ export function validateExtensionId(extensionId) {
41
+ return validateIdentifier(extensionId, "extension ID");
42
+ }
43
+ export function sanitizeErrorMessage(message) {
44
+ return message.replace(/\/[^\s:]+/g, "[path]");
45
+ }
@@ -0,0 +1,9 @@
1
+ export declare const SYNONYM_MAP: Record<string, string[]>;
2
+ export interface SynonymExpansion {
3
+ term: string;
4
+ expanded: string[];
5
+ }
6
+ export declare function expandQuery(query: string): {
7
+ extraWords: string[];
8
+ synonymsApplied: SynonymExpansion[];
9
+ };
@@ -0,0 +1,127 @@
1
+ export const SYNONYM_MAP = {
2
+ address: ["AddressForm", "Addresses"],
3
+ addresses: ["AddressForm", "Addresses"],
4
+ billing: ["AddressForm", "Addresses"],
5
+ shipping: ["AddressForm", "Addresses", "ShippingMethods", "EstimateShipping"],
6
+ payment: ["PaymentMethods", "CreditCard"],
7
+ pay: ["PaymentMethods", "PlaceOrder"],
8
+ paying: ["PaymentMethods"],
9
+ apple: ["ApplePay"],
10
+ "credit-card": ["CreditCard"],
11
+ basket: ["MiniCart"],
12
+ minicart: ["MiniCart"],
13
+ cart: ["MiniCart", "CartSummaryList", "CartSummaryGrid"],
14
+ product: ["ProductDetails", "ProductGallery", "ProductList"],
15
+ pdp: ["ProductDetails", "ProductGallery", "ProductHeader"],
16
+ plp: ["ProductList", "Facets", "SortBy"],
17
+ catalog: ["ProductList", "Facets"],
18
+ gallery: ["ProductGallery"],
19
+ image: ["ProductGallery"],
20
+ photo: ["ProductGallery"],
21
+ photos: ["ProductGallery"],
22
+ price: ["ProductPrice", "OrderCostSummary"],
23
+ quantity: ["ProductQuantity"],
24
+ options: ["ProductOptions"],
25
+ attributes: ["ProductAttributes"],
26
+ search: ["SearchResults", "Facets"],
27
+ find: ["SearchResults"],
28
+ filter: ["Facets"],
29
+ facets: ["Facets"],
30
+ sort: ["SortBy"],
31
+ sorting: ["SortBy"],
32
+ login: ["SignIn", "LoginForm"],
33
+ "log-in": ["SignIn", "LoginForm"],
34
+ signin: ["SignIn", "LoginForm"],
35
+ "sign-in": ["SignIn", "LoginForm"],
36
+ logout: ["SignIn"],
37
+ register: ["SignUp"],
38
+ signup: ["SignUp"],
39
+ "sign-up": ["SignUp"],
40
+ registration: ["SignUp", "CompanyRegistration"],
41
+ password: ["ResetPassword", "UpdatePassword"],
42
+ forgot: ["ResetPassword"],
43
+ reset: ["ResetPassword"],
44
+ checkout: ["PlaceOrder", "ShippingMethods", "EstimateShipping"],
45
+ submit: ["PlaceOrder"],
46
+ place: ["PlaceOrder"],
47
+ terms: ["TermsAndConditions"],
48
+ conditions: ["TermsAndConditions"],
49
+ delivery: ["ShippingMethods", "EstimateShipping"],
50
+ freight: ["ShippingMethods"],
51
+ estimate: ["EstimateShipping"],
52
+ order: ["OrdersList", "OrderHeader", "OrderCostSummary"],
53
+ orders: ["OrdersList"],
54
+ history: ["OrdersList"],
55
+ invoice: ["OrderHeader", "OrderCostSummary"],
56
+ receipt: ["OrderHeader", "OrderCostSummary"],
57
+ confirmation: ["SuccessNotification", "PurchaseOrderConfirmation"],
58
+ success: ["SuccessNotification"],
59
+ "thank-you": ["SuccessNotification"],
60
+ thankyou: ["SuccessNotification"],
61
+ return: ["CreateReturn", "ReturnsList"],
62
+ returns: ["CreateReturn", "ReturnsList"],
63
+ rma: ["CreateReturn", "ReturnsList"],
64
+ refund: ["CreateReturn"],
65
+ wishlist: ["Wishlist", "WishlistToggle"],
66
+ favorites: ["Wishlist", "WishlistToggle"],
67
+ favourite: ["Wishlist", "WishlistToggle"],
68
+ "save-for-later": ["WishlistToggle"],
69
+ coupon: ["Coupons"],
70
+ coupons: ["Coupons"],
71
+ promo: ["Coupons", "GiftOptions"],
72
+ discount: ["Coupons"],
73
+ voucher: ["Coupons"],
74
+ gift: ["GiftCards", "GiftOptions"],
75
+ gifting: ["GiftCards", "GiftOptions"],
76
+ wrapping: ["GiftOptions"],
77
+ company: ["CompanyProfile", "CompanyUsers", "CompanyStructure"],
78
+ b2b: ["CompanyProfile", "CompanyRegistration", "CompanyUsers"],
79
+ corporate: ["CompanyProfile"],
80
+ team: ["CompanyUsers", "RolesAndPermissions"],
81
+ role: ["RolesAndPermissions"],
82
+ roles: ["RolesAndPermissions"],
83
+ permissions: ["RolesAndPermissions"],
84
+ purchase: ["PurchaseOrder", "CustomerPurchaseOrders"],
85
+ po: ["PurchaseOrder"],
86
+ quote: ["RequestNegotiableQuoteForm", "QuotesListTable"],
87
+ quotes: ["QuotesListTable"],
88
+ negotiable: ["RequestNegotiableQuoteForm", "ManageNegotiableQuote"],
89
+ rfq: ["RequestNegotiableQuoteForm"],
90
+ requisition: ["RequisitionListForm", "RequisitionListView"],
91
+ account: ["CustomerDetails", "CustomerInformation"],
92
+ profile: ["CustomerDetails", "CustomerInformation"],
93
+ customer: ["CustomerDetails", "CustomerInformation"],
94
+ bulk: ["QuickOrderItems", "QuickOrderMultipleSku"],
95
+ quick: ["QuickOrderItems"],
96
+ csv: ["QuickOrderCsvUpload"],
97
+ sku: ["QuickOrderItems", "QuickOrderMultipleSku"],
98
+ skus: ["QuickOrderItems", "QuickOrderMultipleSku"],
99
+ empty: ["EmptyCart", "OutOfStock"],
100
+ stock: ["OutOfStock"],
101
+ unavailable: ["OutOfStock"],
102
+ pagination: ["Pagination"],
103
+ paging: ["Pagination"],
104
+ };
105
+ export function expandQuery(query) {
106
+ const words = query
107
+ .toLowerCase()
108
+ .split(/\s+/)
109
+ .filter((w) => w.length > 1);
110
+ const synonymsApplied = [];
111
+ const extraWords = [];
112
+ const seen = new Set(words);
113
+ for (const word of words) {
114
+ const syns = SYNONYM_MAP[word];
115
+ if (!syns?.length)
116
+ continue;
117
+ const newSyns = syns.filter((s) => !seen.has(s.toLowerCase()));
118
+ if (newSyns.length === 0)
119
+ continue;
120
+ synonymsApplied.push({ term: word, expanded: newSyns });
121
+ for (const s of newSyns) {
122
+ seen.add(s.toLowerCase());
123
+ extraWords.push(s);
124
+ }
125
+ }
126
+ return { extraWords, synonymsApplied };
127
+ }
@@ -0,0 +1,14 @@
1
+ export interface TelemetryEntry {
2
+ ts: string;
3
+ tool: string;
4
+ dropin?: string;
5
+ query?: string;
6
+ durationMs: number;
7
+ empty: boolean;
8
+ error?: string;
9
+ }
10
+ export interface TelemetryBackend {
11
+ record(entry: TelemetryEntry): void | Promise<void>;
12
+ }
13
+ export declare function setBackend(backend: TelemetryBackend): void;
14
+ export declare function record(tool: string, params: Record<string, unknown>, result: unknown, durationMs: number, error?: string): void;
@@ -0,0 +1,54 @@
1
+ const NoopBackend = {
2
+ record: () => { },
3
+ };
4
+ let activeBackend = NoopBackend;
5
+ export function setBackend(backend) {
6
+ activeBackend = backend;
7
+ }
8
+ function isEmptyResult(result) {
9
+ if (result == null)
10
+ return true;
11
+ if (typeof result !== "object")
12
+ return false;
13
+ const obj = result;
14
+ if (obj.success === false)
15
+ return false;
16
+ const data = obj.data;
17
+ if (data == null)
18
+ return true;
19
+ if (Array.isArray(data) && data.length === 0)
20
+ return true;
21
+ if (typeof data === "object" && Object.keys(data).length === 0)
22
+ return true;
23
+ if (typeof data === "object" && !Array.isArray(data)) {
24
+ const values = Object.values(data);
25
+ const arrays = values.filter((v) => Array.isArray(v));
26
+ if (arrays.length > 0 && arrays.every((a) => a.length === 0))
27
+ return true;
28
+ }
29
+ return false;
30
+ }
31
+ function extractDropin(params) {
32
+ const val = params.dropin ?? params.dropinName;
33
+ return typeof val === "string" ? val : undefined;
34
+ }
35
+ function extractQuery(params) {
36
+ const val = params.query ?? params.keyword;
37
+ return typeof val === "string" ? val : undefined;
38
+ }
39
+ export function record(tool, params, result, durationMs, error) {
40
+ try {
41
+ const entry = {
42
+ ts: new Date().toISOString(),
43
+ tool,
44
+ dropin: extractDropin(params),
45
+ query: extractQuery(params),
46
+ durationMs,
47
+ empty: isEmptyResult(result),
48
+ ...(error ? { error } : {}),
49
+ };
50
+ void activeBackend.record(entry);
51
+ }
52
+ catch {
53
+ }
54
+ }
@@ -0,0 +1,308 @@
1
+ export interface SlotEntry {
2
+ name: string;
3
+ description: string;
4
+ contextType: string;
5
+ customMethods: string[];
6
+ dynamic: boolean;
7
+ example: string;
8
+ }
9
+ export interface SlotContainerData {
10
+ slots: SlotEntry[];
11
+ }
12
+ export interface SlotDropinData {
13
+ containers: Record<string, SlotContainerData>;
14
+ }
15
+ export interface DefaultSlotContextProperty {
16
+ type: string;
17
+ description: string;
18
+ }
19
+ export interface DefaultSlotContextInfo {
20
+ description: string;
21
+ properties: Record<string, DefaultSlotContextProperty>;
22
+ }
23
+ export interface SlotRegistry {
24
+ version: string;
25
+ description: string;
26
+ defaultSlotContext?: DefaultSlotContextInfo;
27
+ defaultSlotMethods: Record<string, string>;
28
+ dropins: Record<string, SlotDropinData>;
29
+ }
30
+ export interface EventRef {
31
+ dropin: string;
32
+ file?: string;
33
+ function: string;
34
+ }
35
+ export interface EventEntry {
36
+ name: string;
37
+ payloadType: string;
38
+ description: string;
39
+ emittedBy: EventRef[];
40
+ consumedBy: EventRef[];
41
+ }
42
+ export interface EventCatalog {
43
+ version: string;
44
+ description: string;
45
+ events: EventEntry[];
46
+ }
47
+ export interface ContainerEntry {
48
+ name: string;
49
+ importPath: string;
50
+ description: string;
51
+ props: Record<string, string>;
52
+ extendsHTMLAttributes?: boolean;
53
+ slotNames: string[];
54
+ }
55
+ export interface ContainerDropinData {
56
+ version: string;
57
+ renderImport: string;
58
+ apiImport: string;
59
+ containers: ContainerEntry[];
60
+ }
61
+ export interface ContainerRegistry {
62
+ version: string;
63
+ description: string;
64
+ dropins: Record<string, ContainerDropinData>;
65
+ }
66
+ export interface ApiFunctionParam {
67
+ name: string;
68
+ type: string;
69
+ optional: boolean;
70
+ }
71
+ export interface ApiFunctionEntry {
72
+ name: string;
73
+ signature: string;
74
+ parameters: ApiFunctionParam[];
75
+ returnType: string;
76
+ description: string;
77
+ }
78
+ export interface ApiFunctionUtilModule {
79
+ description: string;
80
+ functions: {
81
+ name: string;
82
+ signature: string;
83
+ description: string;
84
+ }[];
85
+ }
86
+ export interface ApiFunctionUtils {
87
+ importPath: string;
88
+ description: string;
89
+ modules: Record<string, ApiFunctionUtilModule>;
90
+ }
91
+ export interface ApiFunctionDropinData {
92
+ version: string;
93
+ importPath: string;
94
+ functions: ApiFunctionEntry[];
95
+ utils?: ApiFunctionUtils;
96
+ }
97
+ export interface ApiFunctionRegistry {
98
+ version: string;
99
+ description: string;
100
+ sharedFunctions: Record<string, string>;
101
+ dropins: Record<string, ApiFunctionDropinData>;
102
+ }
103
+ export interface ToolsComponentEntry {
104
+ name: string;
105
+ importPath: string;
106
+ props: string[];
107
+ extendsHTMLAttributes: boolean;
108
+ }
109
+ export interface ToolsComponentsRegistry {
110
+ version: string;
111
+ description: string;
112
+ importPath: string;
113
+ components: ToolsComponentEntry[];
114
+ }
115
+ export interface DesignToken {
116
+ cssVariable: string;
117
+ defaultValue: string;
118
+ description: string;
119
+ }
120
+ export interface DesignTokenCategory {
121
+ description: string;
122
+ tokens: DesignToken[];
123
+ }
124
+ export interface DesignTokenRegistry {
125
+ version: string;
126
+ cssScope: string;
127
+ overrideExample: string;
128
+ categories: Record<string, DesignTokenCategory>;
129
+ }
130
+ export interface ExtensionHook {
131
+ name: string;
132
+ description: string;
133
+ whenFired: string;
134
+ contextShape: Record<string, string>;
135
+ }
136
+ export interface ExistingExtension {
137
+ id: string;
138
+ name: string;
139
+ hooks: string[];
140
+ externalScripts: string[];
141
+ externalStyles: string[];
142
+ sourceFile: string;
143
+ }
144
+ export interface ExtensionRegistry {
145
+ version: string;
146
+ description: string;
147
+ managerImport: string;
148
+ managerDescription: string;
149
+ hooks: ExtensionHook[];
150
+ existingExtensions: ExistingExtension[];
151
+ }
152
+ export interface GraphqlVariable {
153
+ name: string;
154
+ type: string;
155
+ }
156
+ export interface GraphqlOperation {
157
+ name: string;
158
+ type: "query" | "mutation";
159
+ exportName: string;
160
+ file?: string;
161
+ variables: GraphqlVariable[];
162
+ fragmentDependencies: string[];
163
+ source?: string;
164
+ }
165
+ export interface GraphqlFragment {
166
+ name: string;
167
+ exportName: string;
168
+ file?: string;
169
+ onType: string;
170
+ source?: string;
171
+ fragmentDependencies: string[];
172
+ exported: boolean;
173
+ }
174
+ export interface GraphqlDropinData {
175
+ version: string;
176
+ operationCount: number;
177
+ fragmentCount: number;
178
+ operations: GraphqlOperation[];
179
+ fragments: GraphqlFragment[];
180
+ }
181
+ export interface GraphqlRegistry {
182
+ version: string;
183
+ description: string;
184
+ dropins: Record<string, GraphqlDropinData>;
185
+ }
186
+ export interface SdkPropInfo {
187
+ name: string;
188
+ type: string;
189
+ required: boolean;
190
+ isSlot?: boolean;
191
+ }
192
+ export interface SdkExportedType {
193
+ name: string;
194
+ source: string;
195
+ definition: string;
196
+ }
197
+ export interface SdkComponent {
198
+ name: string;
199
+ description: string;
200
+ propsInterface?: string;
201
+ props?: SdkPropInfo[];
202
+ slots?: string[];
203
+ extends?: string;
204
+ omits?: string[];
205
+ }
206
+ export interface SdkTypeEntry {
207
+ name: string;
208
+ definition: string;
209
+ description: string;
210
+ }
211
+ export interface SdkFunction {
212
+ name: string;
213
+ signature: string;
214
+ description: string;
215
+ }
216
+ export interface SdkPackage {
217
+ name: string;
218
+ description: string;
219
+ importPath: string;
220
+ components?: SdkComponent[];
221
+ functions?: SdkFunction[];
222
+ utilities?: SdkFunction[];
223
+ types?: SdkTypeEntry[];
224
+ exportedTypes?: SdkExportedType[];
225
+ usageExample?: string;
226
+ usageNotes?: string;
227
+ }
228
+ export interface SdkRegistry {
229
+ description: string;
230
+ packages: Record<string, SdkPackage>;
231
+ }
232
+ export interface I18nDropinData {
233
+ version: string;
234
+ keyCount: number;
235
+ keys: Record<string, string>;
236
+ }
237
+ export interface I18nRegistry {
238
+ version: string;
239
+ description: string;
240
+ dropins: Record<string, I18nDropinData>;
241
+ }
242
+ export interface BlockPattern {
243
+ name: string;
244
+ description: string;
245
+ template: string;
246
+ requiredImports: string[];
247
+ examples: string[];
248
+ }
249
+ export interface BlockPatternRegistry {
250
+ version: string;
251
+ description: string;
252
+ blockLifecycle: string;
253
+ initializerPattern: string;
254
+ patterns: BlockPattern[];
255
+ }
256
+ export interface DocsSectionEntry {
257
+ section: string;
258
+ label: string;
259
+ pageCount: number;
260
+ file: string;
261
+ }
262
+ export interface DocsIndex {
263
+ totalPages: number;
264
+ totalSections: number;
265
+ priority: string;
266
+ sections: DocsSectionEntry[];
267
+ }
268
+ export interface DocsPage {
269
+ path: string;
270
+ title: string;
271
+ description: string;
272
+ content: string;
273
+ }
274
+ export interface DocsSection {
275
+ pages: DocsPage[];
276
+ }
277
+ export interface ExamplesDropinEntry {
278
+ dropin: string;
279
+ file: string;
280
+ extensionCount: number;
281
+ blockCount: number;
282
+ }
283
+ export interface ExamplesIndex {
284
+ version: string;
285
+ totalExtensions: number;
286
+ totalBlocks: number;
287
+ dropins: ExamplesDropinEntry[];
288
+ }
289
+ export interface ExampleExtension {
290
+ id: string;
291
+ name: string;
292
+ provider: string;
293
+ description: string;
294
+ hooks: string[];
295
+ files: Record<string, string>;
296
+ sharedFiles?: string[];
297
+ }
298
+ export interface ExampleBlock {
299
+ name: string;
300
+ description: string;
301
+ files: Record<string, string>;
302
+ }
303
+ export interface ExamplesDropinData {
304
+ extensions: ExampleExtension[];
305
+ blocks: ExampleBlock[];
306
+ extensionGuide?: string;
307
+ sharedExtensionFiles?: Record<string, string>;
308
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const VERSION: string;
2
+ export declare const DOCS_BASE_URL = "https://experienceleague.adobe.com/developer/commerce/storefront";
@@ -0,0 +1,14 @@
1
+ import { createRequire } from "node:module";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { existsSync } from "node:fs";
5
+ const _require = createRequire(import.meta.url);
6
+ const _dir = dirname(fileURLToPath(import.meta.url));
7
+ const _pkgPath = ["../package.json", "../../package.json"]
8
+ .map((rel) => join(_dir, rel))
9
+ .find(existsSync);
10
+ if (!_pkgPath)
11
+ throw new Error("Cannot find package.json for @dropins/mcp");
12
+ const _pkg = _require(_pkgPath);
13
+ export const VERSION = _pkg.version;
14
+ export const DOCS_BASE_URL = "https://experienceleague.adobe.com/developer/commerce/storefront";
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};