@burdenoff/mcp-libs 2026.1101.7 → 2026.1106.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.
@@ -1,57 +1,413 @@
1
- import { mcpToolName, errorResult } from '../../chunk-22WYCMVS.js';
1
+ import { mcpToolName, errorResult, jsonResult } from '../../chunk-22WYCMVS.js';
2
+ import { z } from 'zod';
3
+
4
+ // src/modules/store/operations.ts
5
+ var PRODUCT_FIELDS = `
6
+ id name slug description price currency type status pricingModel
7
+ rating reviewCount downloads purchaseCount featured
8
+ `;
9
+ var CART_FIELDS = `
10
+ id currency subtotal total itemCount isEmpty requiresShipping status
11
+ items { id productId productName quantity unitPrice subtotal isAvailable }
12
+ `;
13
+ var CART_ERRORS = "errors { code field message }";
14
+ var BROWSE_STORE = `
15
+ query BrowseStore($input: BrowseStoreInput!) {
16
+ browseStore(input: $input) {
17
+ products { ${PRODUCT_FIELDS} }
18
+ facets {
19
+ categories { value count }
20
+ types { value count }
21
+ }
22
+ totalCount hasMore nextCursor
23
+ }
24
+ }
25
+ `;
26
+ var SEARCH_PRODUCTS = `
27
+ query SearchProducts($query: String!, $limit: Int, $offset: Int) {
28
+ searchProducts(query: $query, limit: $limit, offset: $offset) { ${PRODUCT_FIELDS} }
29
+ }
30
+ `;
31
+ var GET_STORE_PRODUCT = `
32
+ query GetStoreProduct($id: ID!) {
33
+ product(id: $id) {
34
+ ${PRODUCT_FIELDS}
35
+ longDescription category tags license
36
+ publisher { id name isVerified }
37
+ }
38
+ }
39
+ `;
40
+ var MY_CART = `
41
+ query MyCart {
42
+ myCart { ${CART_FIELDS} }
43
+ }
44
+ `;
45
+ var ADD_TO_CART = `
46
+ mutation AddToCart($input: AddToCartInput!) {
47
+ addToCart(input: $input) {
48
+ cart { ${CART_FIELDS} }
49
+ cartItem { id productId productName quantity unitPrice subtotal }
50
+ ${CART_ERRORS}
51
+ }
52
+ }
53
+ `;
54
+ var REMOVE_FROM_CART = `
55
+ mutation RemoveFromCart($cartItemId: String!) {
56
+ removeFromCart(cartItemId: $cartItemId) {
57
+ cart { ${CART_FIELDS} }
58
+ ${CART_ERRORS}
59
+ }
60
+ }
61
+ `;
62
+ var CLEAR_CART = `
63
+ mutation ClearCart {
64
+ clearCart {
65
+ cart { ${CART_FIELDS} }
66
+ ${CART_ERRORS}
67
+ }
68
+ }
69
+ `;
70
+ var CHECKOUT_CART = `
71
+ mutation Checkout($input: CheckoutInput!) {
72
+ checkout(input: $input) {
73
+ success
74
+ order { id status total currency createdAt }
75
+ ${CART_ERRORS}
76
+ }
77
+ }
78
+ `;
79
+ var GET_ORDERS = `
80
+ query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {
81
+ myOrders(limit: $limit, offset: $offset, status: $status) {
82
+ id status total currency createdAt
83
+ }
84
+ }
85
+ `;
86
+ var GET_ORDER = `
87
+ query GetStoreOrder($id: ID!) {
88
+ getStoreOrder(id: $id) {
89
+ id status total currency createdAt processedAt billingAccountId
90
+ lineItems
91
+ }
92
+ }
93
+ `;
94
+ var GET_INSTALLED_PRODUCTS = `
95
+ query MyStoreAppInstallations($filter: InstallationFilterInput, $limit: Int, $offset: Int) {
96
+ myStoreAppInstallations(filter: $filter, limit: $limit, offset: $offset) {
97
+ items {
98
+ id productId productName productType status version
99
+ workspaceId installedAt
100
+ }
101
+ total hasMore
102
+ }
103
+ }
104
+ `;
105
+ var UNINSTALL_PRODUCT = `
106
+ mutation UninstallApp($id: ID!, $reason: String, $feedback: String) {
107
+ uninstallApp(id: $id, reason: $reason, feedback: $feedback)
108
+ }
109
+ `;
110
+ var GET_LICENSES = `
111
+ query MyEntitlements($limit: Int, $offset: Int) {
112
+ myEntitlements(limit: $limit, offset: $offset) {
113
+ id productId status licenseKey workspaceId expiresAt createdAt
114
+ product { id name }
115
+ }
116
+ }
117
+ `;
118
+ var GET_MY_PUBLISHER = `
119
+ query MyPublisher {
120
+ myPublisher {
121
+ id name legalName email contactEmail websiteUrl
122
+ bio logoUrl isVerified verificationStatus
123
+ productCount totalSales totalEarnings tier
124
+ createdAt updatedAt
125
+ }
126
+ }
127
+ `;
128
+ var GET_MY_PUBLISHER_PRODUCTS = `
129
+ query MyPublisherProducts {
130
+ myPublisher {
131
+ id productCount
132
+ products {
133
+ id name slug description price currency type status downloads
134
+ publisher { id name isVerified }
135
+ }
136
+ }
137
+ }
138
+ `;
2
139
 
3
140
  // src/modules/store/tools.ts
4
- function stubbedTool(server, toolName, title, description, featureNote, inputSchema, altSuggestions) {
5
- server.registerTool(
6
- toolName,
7
- {
8
- title,
9
- description: `${description} [STUB]`,
10
- inputSchema
11
- },
12
- async () => errorResult(
13
- `[stubbed] ${featureNote} Use ${altSuggestions.join(", ")} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`
14
- )
15
- );
141
+ var PRODUCT_TYPES = [
142
+ "ACCESSORY",
143
+ "AGENT",
144
+ "APP",
145
+ "APPAREL",
146
+ "BOOK",
147
+ "BOTAPP",
148
+ "COLLECTIBLE",
149
+ "COMPONENT",
150
+ "CONSOLE",
151
+ "CONSUMABLE",
152
+ "DASHBOARD",
153
+ "DATASINK",
154
+ "EQUIPMENT",
155
+ "EXTENSION",
156
+ "HARDWARE",
157
+ "INTEGRATION",
158
+ "MERCHANDISE",
159
+ "NODE",
160
+ "PARSER",
161
+ "PLUGIN",
162
+ "TEMPLATE",
163
+ "THEME",
164
+ "VIBEMODULE",
165
+ "WIDGET",
166
+ "WORKFLOW"
167
+ ];
168
+ var ORDER_STATUSES = ["PENDING", "PROCESSED", "FAILED", "REFUNDED"];
169
+ var INSTALLATION_STATUSES = [
170
+ "PENDING",
171
+ "INSTALLING",
172
+ "ACTIVE",
173
+ "INACTIVE",
174
+ "FAILED",
175
+ "UNINSTALLED"
176
+ ];
177
+ var TOOL_ANNOTATIONS = {
178
+ store_cart_checkout: { readOnlyHint: false, destructiveHint: true },
179
+ store_cart_clear: { readOnlyHint: false, destructiveHint: true },
180
+ store_browse: { readOnlyHint: true, destructiveHint: false },
181
+ store_publisher_products: { readOnlyHint: true, destructiveHint: false }
182
+ };
183
+ function cartErrors(data) {
184
+ const payload = Object.values(data ?? {})[0];
185
+ const errors = payload?.errors;
186
+ return errors && errors.length > 0 ? errors.map((e) => e.message).join("; ") : null;
16
187
  }
17
188
  function registerStoreTools(server, ctx, track) {
18
- const featureNote = "Live alpha removed `Query.storeProducts` and the `searchStore` / `browseStore` / `myCart` family. The closest survivors (`searchProducts` / `featuredProducts`) are a different domain shape.";
19
- const alts = [
20
- "the next alpha release that restores the public `storeProducts` query",
21
- "the SDK store API (which the MCP will mirror once it lands)"
22
- ];
23
- const tools = [
24
- ["store_browse", "Browse Store", "Browse the marketplace."],
25
- ["store_search", "Search Store", "Search the marketplace."],
26
- ["store_get_product", "Get Product", "Get a product by ID."],
27
- ["store_cart_list", "Get My Cart", "Get the current user's cart."],
28
- ["store_cart_add", "Add to Cart", "Add a product to the cart."],
29
- ["store_cart_remove", "Remove from Cart", "Remove a product from the cart."],
30
- ["store_cart_checkout", "Checkout Cart", "Complete the cart checkout."],
31
- ["store_cart_clear", "Clear Cart", "Clear the cart."],
32
- ["store_orders_list", "List Orders", "List orders."],
33
- ["store_orders_get", "Get Order", "Get an order by ID."],
34
- ["store_installed_list", "List Installed Products", "List installed products."],
35
- ["store_installed_uninstall", "Uninstall Product", "Uninstall a product."],
36
- ["store_licenses_list", "List Licenses", "List product licenses."],
37
- ["store_publisher_get", "Get My Publisher", "Get the caller's publisher profile."],
38
- [
39
- "store_publisher_products",
40
- "List My Publisher Products",
41
- "List products published by the caller."
42
- ]
43
- ];
44
- for (const [tool, title, desc] of tools) {
45
- stubbedTool(
46
- server,
47
- track(mcpToolName(ctx.productName, tool)),
48
- title,
49
- desc,
50
- featureNote,
51
- {},
52
- alts
189
+ const tool = (name, title, description, inputSchema, document, variables, pick = (data) => Object.values(data)[0]) => {
190
+ server.registerTool(
191
+ track(mcpToolName(ctx.productName, name)),
192
+ {
193
+ title,
194
+ description,
195
+ inputSchema,
196
+ ...TOOL_ANNOTATIONS[name] ? { annotations: TOOL_ANNOTATIONS[name] } : {}
197
+ },
198
+ async (args) => {
199
+ try {
200
+ const data = await ctx.gql.global.request(
201
+ document,
202
+ variables(args)
203
+ );
204
+ const failure = cartErrors(data);
205
+ if (failure) return errorResult(`${title} failed: ${failure}`);
206
+ return jsonResult(pick(data));
207
+ } catch (error) {
208
+ ctx.logger.error(`${name} failed`, { error: String(error) });
209
+ return errorResult(
210
+ `${title} failed: ${error instanceof Error ? error.message : String(error)}`
211
+ );
212
+ }
213
+ }
53
214
  );
54
- }
215
+ };
216
+ tool(
217
+ "store_search",
218
+ "Search Store",
219
+ "Search the marketplace for products by free-text query.",
220
+ {
221
+ query: z.string().describe("Search query"),
222
+ limit: z.number().int().optional().describe("Page size"),
223
+ offset: z.number().int().optional().describe("Skip results")
224
+ },
225
+ SEARCH_PRODUCTS,
226
+ ({ query, limit, offset }) => ({ query, limit, offset })
227
+ );
228
+ tool(
229
+ "store_browse",
230
+ "Browse Store",
231
+ "Browse the marketplace with filters, sorting and paging; returns facets and totals.",
232
+ {
233
+ category: z.string().optional().describe("Category filter"),
234
+ type: z.enum(PRODUCT_TYPES).optional().describe("Product type filter"),
235
+ search: z.string().optional().describe("Free-text filter"),
236
+ sortBy: z.enum([
237
+ "RELEVANCE",
238
+ "NEWEST",
239
+ "OLDEST",
240
+ "NAME_ASC",
241
+ "NAME_DESC",
242
+ "PRICE_LOW",
243
+ "PRICE_HIGH",
244
+ "RATING",
245
+ "DOWNLOADS",
246
+ "FEATURED"
247
+ ]).optional().describe("Sort order"),
248
+ limit: z.number().int().optional().describe("Page size"),
249
+ offset: z.number().int().optional().describe("Skip results")
250
+ },
251
+ BROWSE_STORE,
252
+ ({ category, type, search, sortBy, limit, offset }) => {
253
+ const filter = {};
254
+ if (category !== void 0) filter.category = category;
255
+ if (type !== void 0) filter.type = type;
256
+ if (search !== void 0) filter.search = search;
257
+ const pagination = {};
258
+ if (limit !== void 0) pagination.limit = limit;
259
+ if (offset !== void 0) pagination.offset = offset;
260
+ const input = {};
261
+ if (Object.keys(filter).length > 0) input.filter = filter;
262
+ if (Object.keys(pagination).length > 0) input.pagination = pagination;
263
+ if (sortBy !== void 0) input.sortBy = sortBy;
264
+ return { input };
265
+ }
266
+ );
267
+ tool(
268
+ "store_get_product",
269
+ "Get Product",
270
+ "Get a marketplace product by ID.",
271
+ { id: z.string().describe("Product ID") },
272
+ GET_STORE_PRODUCT,
273
+ ({ id }) => ({ id })
274
+ );
275
+ tool("store_cart_list", "Get My Cart", "Get the current user's cart.", {}, MY_CART, () => ({}));
276
+ tool(
277
+ "store_cart_add",
278
+ "Add to Cart",
279
+ "Add a product (and optional variant) to the cart.",
280
+ {
281
+ product: z.string().describe("Product ID"),
282
+ quantity: z.number().int().optional().describe("Quantity (default 1)"),
283
+ variant: z.string().optional().describe("Variant ID")
284
+ },
285
+ ADD_TO_CART,
286
+ ({ product, quantity, variant }) => {
287
+ const input = { productId: product };
288
+ if (quantity !== void 0) input.quantity = quantity;
289
+ if (variant !== void 0) input.variantId = variant;
290
+ return { input };
291
+ }
292
+ );
293
+ tool(
294
+ "store_cart_remove",
295
+ "Remove from Cart",
296
+ "Remove one line item from the cart.",
297
+ { item: z.string().describe("Cart item ID (from store_cart_list)") },
298
+ REMOVE_FROM_CART,
299
+ ({ item }) => ({ cartItemId: item })
300
+ );
301
+ tool(
302
+ "store_cart_checkout",
303
+ "Checkout Cart",
304
+ "Check out the current cart server-side and return the resulting order.",
305
+ {
306
+ billingAccountId: z.string().optional().describe("Billing account to charge"),
307
+ paymentMethodId: z.string().optional().describe("Saved payment method"),
308
+ shippingAddressId: z.string().optional().describe("Shipping address (physical items)"),
309
+ shippingMethodId: z.string().optional().describe("Shipping method (physical items)"),
310
+ notes: z.string().optional().describe("Order notes")
311
+ },
312
+ CHECKOUT_CART,
313
+ (args) => {
314
+ const input = {};
315
+ for (const [key, value] of Object.entries(args)) if (value !== void 0) input[key] = value;
316
+ return { input };
317
+ }
318
+ );
319
+ tool(
320
+ "store_cart_clear",
321
+ "Clear Cart",
322
+ "Remove every item from the cart.",
323
+ {},
324
+ CLEAR_CART,
325
+ () => ({})
326
+ );
327
+ tool(
328
+ "store_orders_list",
329
+ "List Orders",
330
+ "List orders for the current user.",
331
+ {
332
+ status: z.enum(ORDER_STATUSES).optional().describe("Filter by order status"),
333
+ limit: z.number().int().optional().describe("Page size"),
334
+ offset: z.number().int().optional().describe("Skip results")
335
+ },
336
+ GET_ORDERS,
337
+ ({ status, limit, offset }) => ({ status, limit, offset })
338
+ );
339
+ tool(
340
+ "store_orders_get",
341
+ "Get Order",
342
+ "Get an order by ID.",
343
+ { id: z.string().describe("Order ID") },
344
+ GET_ORDER,
345
+ ({ id }) => ({ id })
346
+ );
347
+ tool(
348
+ "store_installed_list",
349
+ "List Installed Products",
350
+ "List the caller\u2019s store app installations, optionally for one workspace or product.",
351
+ {
352
+ workspace: z.string().optional().describe("Workspace ID filter"),
353
+ product: z.string().optional().describe("Product ID filter"),
354
+ status: z.enum(INSTALLATION_STATUSES).optional().describe("Installation status filter"),
355
+ limit: z.number().int().optional().describe("Page size"),
356
+ offset: z.number().int().optional().describe("Skip results")
357
+ },
358
+ GET_INSTALLED_PRODUCTS,
359
+ ({ workspace, product, status, limit, offset }) => {
360
+ const filter = {};
361
+ if (workspace !== void 0) filter.workspaceId = workspace;
362
+ if (product !== void 0) filter.productId = product;
363
+ if (status !== void 0) filter.status = status;
364
+ return {
365
+ filter: Object.keys(filter).length > 0 ? filter : void 0,
366
+ limit,
367
+ offset
368
+ };
369
+ }
370
+ );
371
+ tool(
372
+ "store_installed_uninstall",
373
+ "Uninstall Product",
374
+ "Uninstall a store app by installation ID (from store_installed_list).",
375
+ {
376
+ installationId: z.string().describe("Installation ID"),
377
+ reason: z.string().optional().describe("Why it is being uninstalled"),
378
+ feedback: z.string().optional().describe("Free-text feedback for the publisher")
379
+ },
380
+ UNINSTALL_PRODUCT,
381
+ ({ installationId, reason, feedback }) => ({ id: installationId, reason, feedback }),
382
+ (data) => ({ uninstalled: data.uninstallApp === true })
383
+ );
384
+ tool(
385
+ "store_licenses_list",
386
+ "List Licenses",
387
+ "List the caller's product entitlements (licenses), including license keys and expiry.",
388
+ {
389
+ limit: z.number().int().optional().describe("Page size"),
390
+ offset: z.number().int().optional().describe("Skip results")
391
+ },
392
+ GET_LICENSES,
393
+ ({ limit, offset }) => ({ limit, offset })
394
+ );
395
+ tool(
396
+ "store_publisher_get",
397
+ "Get My Publisher",
398
+ "Get the caller's publisher profile (null when the caller is not a publisher).",
399
+ {},
400
+ GET_MY_PUBLISHER,
401
+ () => ({})
402
+ );
403
+ tool(
404
+ "store_publisher_products",
405
+ "List My Publisher Products",
406
+ "List products published by the caller.",
407
+ {},
408
+ GET_MY_PUBLISHER_PRODUCTS,
409
+ () => ({})
410
+ );
55
411
  }
56
412
 
57
413
  // src/modules/store/index.ts
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/modules/store/tools.ts","../../../src/modules/store/index.ts"],"names":[],"mappings":";;;AAKA,SAAS,YACP,MAAA,EACA,QAAA,EACA,OACA,WAAA,EACA,WAAA,EACA,aACA,cAAA,EACM;AACN,EAAA,MAAA,CAAO,YAAA;AAAA,IACL,QAAA;AAAA,IACA;AAAA,MACE,KAAA;AAAA,MACA,WAAA,EAAa,GAAG,WAAW,CAAA,OAAA,CAAA;AAAA,MAC3B;AAAA,KACF;AAAA,IACA,YACE,WAAA;AAAA,MACE,aAAa,WAAW,CAAA,KAAA,EAAQ,cAAA,CAAe,IAAA,CAAK,IAAI,CAAC,CAAA,oHAAA;AAAA;AAC3D,GACJ;AACF;AAEO,SAAS,kBAAA,CACd,MAAA,EACA,GAAA,EACA,KAAA,EACM;AAQN,EAAA,MAAM,WAAA,GACJ,+LAAA;AACF,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,uEAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,MAAM,KAAA,GAAyC;AAAA,IAC7C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AA,EAC7B,EAAA,EAAI,OAAA;AAAA,EACJ,OAAA,EAAS,OAAA;AAAA,EACT,WAAA,EAAa,OAAA;AAAA,EACb,SAAA,EAAW,CAAC,MAAM,CAAA;AAAA,EAClB,YAAA,EAAc,EAAE,KAAA,EAAO,EAAC,EAAE;AAAA,EAE1B,QAAA,CAAS,QAAmB,GAAA,EAAqC;AAC/D,IAAA,MAAM,QAAkB,EAAC;AACzB,IAAA,MAAM,KAAA,GAAQ,CAAC,CAAA,KAAsB;AACnC,MAAA,KAAA,CAAM,KAAK,CAAC,CAAA;AACZ,MAAA,OAAO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,kBAAA,CAAmB,MAAA,EAAQ,KAAK,KAAK,CAAA;AAErC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,aAAA,GAAQ","file":"index.js","sourcesContent":["import { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { errorResult, mcpToolName, type McpContext } from '../../core/index.js';\n\ntype StubInputSchema = Record<string, z.ZodTypeAny>;\nfunction stubbedTool(\n server: McpServer,\n toolName: string,\n title: string,\n description: string,\n featureNote: string,\n inputSchema: StubInputSchema,\n altSuggestions: string[],\n): void {\n server.registerTool(\n toolName,\n {\n title,\n description: `${description} [STUB]`,\n inputSchema,\n },\n async () =>\n errorResult(\n `[stubbed] ${featureNote} Use ${altSuggestions.join(', ')} instead. The tool remains registered so callers receive a meaningful response instead of a schema-validation error.`,\n ),\n );\n}\n\nexport function registerStoreTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // BOFF-8199: `Query.storeProducts` (and the related `searchStore`,\n // `browseStore`, `myCart`, etc.) are gone from the live alpha gateway.\n // The closest survivors are `searchProducts`, `featuredProducts`,\n // `i18nProducts`, `lowStockProducts`, `platformProducts` — a\n // different domain. Stub all 14 store tools so callers get a clean\n // \"[stubbed]\" error and the per-call wiring is in place for the day\n // the store service re-exposes the public surface.\n const featureNote =\n 'Live alpha removed `Query.storeProducts` and the `searchStore` / `browseStore` / `myCart` family. The closest survivors (`searchProducts` / `featuredProducts`) are a different domain shape.';\n const alts = [\n 'the next alpha release that restores the public `storeProducts` query',\n 'the SDK store API (which the MCP will mirror once it lands)',\n ];\n\n const tools: Array<[string, string, string]> = [\n ['store_browse', 'Browse Store', 'Browse the marketplace.'],\n ['store_search', 'Search Store', 'Search the marketplace.'],\n ['store_get_product', 'Get Product', 'Get a product by ID.'],\n ['store_cart_list', 'Get My Cart', \"Get the current user's cart.\"],\n ['store_cart_add', 'Add to Cart', 'Add a product to the cart.'],\n ['store_cart_remove', 'Remove from Cart', 'Remove a product from the cart.'],\n ['store_cart_checkout', 'Checkout Cart', 'Complete the cart checkout.'],\n ['store_cart_clear', 'Clear Cart', 'Clear the cart.'],\n ['store_orders_list', 'List Orders', 'List orders.'],\n ['store_orders_get', 'Get Order', 'Get an order by ID.'],\n ['store_installed_list', 'List Installed Products', 'List installed products.'],\n ['store_installed_uninstall', 'Uninstall Product', 'Uninstall a product.'],\n ['store_licenses_list', 'List Licenses', 'List product licenses.'],\n ['store_publisher_get', 'Get My Publisher', \"Get the caller's publisher profile.\"],\n [\n 'store_publisher_products',\n 'List My Publisher Products',\n 'List products published by the caller.',\n ],\n ];\n for (const [tool, title, desc] of tools) {\n stubbedTool(\n server,\n track(mcpToolName(ctx.productName, tool)),\n title,\n desc,\n featureNote,\n {},\n alts,\n );\n }\n}\n","/**\n * Store module — marketplace search/browse, cart, orders, installed apps,\n * licenses. Backend: ~/products/global/store/global-store-svc/.\n * Ported from cli-sdk/src/modules/store/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerStoreTools } from './tools.js';\n\nconst storeModule: McpModule = {\n id: 'store',\n version: '0.0.1',\n displayName: 'Store',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerStoreTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default storeModule;\n"]}
1
+ {"version":3,"sources":["../../../src/modules/store/operations.ts","../../../src/modules/store/tools.ts","../../../src/modules/store/index.ts"],"names":[],"mappings":";;;;AAYA,IAAM,cAAA,GAAiB;AAAA;AAAA;AAAA,CAAA;AAKvB,IAAM,WAAA,GAAc;AAAA;AAAA;AAAA,CAAA;AAKpB,IAAM,WAAA,GAAc,+BAAA;AAEb,IAAM,YAAA,GAAe;AAAA;AAAA;AAAA,iBAAA,EAGT,cAAc,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAU1B,IAAM,eAAA,GAAkB;AAAA;AAAA,oEAAA,EAEuC,cAAc,CAAA;AAAA;AAAA,CAAA;AAI7E,IAAM,iBAAA,GAAoB;AAAA;AAAA;AAAA,MAAA,EAGzB,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAOf,IAAM,OAAA,GAAU;AAAA;AAAA,aAAA,EAER,WAAW,CAAA;AAAA;AAAA,CAAA;AAInB,IAAM,WAAA,GAAc;AAAA;AAAA;AAAA,aAAA,EAGZ,WAAW,CAAA;AAAA;AAAA,MAAA,EAElB,WAAW;AAAA;AAAA;AAAA,CAAA;AAKZ,IAAM,gBAAA,GAAmB;AAAA;AAAA;AAAA,aAAA,EAGjB,WAAW,CAAA;AAAA,MAAA,EAClB,WAAW;AAAA;AAAA;AAAA,CAAA;AAKZ,IAAM,UAAA,GAAa;AAAA;AAAA;AAAA,aAAA,EAGX,WAAW,CAAA;AAAA,MAAA,EAClB,WAAW;AAAA;AAAA;AAAA,CAAA;AAKZ,IAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA,MAAA,EA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AA;AACZ,MAAA,OAAO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,kBAAA,CAAmB,MAAA,EAAQ,KAAK,KAAK,CAAA;AAErC,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,aAAA,GAAQ","file":"index.js","sourcesContent":["/**\n * Store operations — all served by the GLOBAL supergraph (global-store-svc).\n *\n * BOFF-8199 stubbed this module on the belief that `Query.storeProducts`,\n * `searchStore`, `getOrders`, ... had been removed. They were never the right\n * fields: the store surface is `browseStore`, `searchProducts`, `product`,\n * `myCart`, `checkout`, `myOrders`, `getStoreOrder`, `myStoreAppInstallations`,\n * `uninstallApp`, `myEntitlements` and `myPublisher`. Every document here is\n * validated against the pruned global supergraph fixture by\n * tests/unit/platform-supergraph-contract.test.ts.\n */\n\nconst PRODUCT_FIELDS = `\n id name slug description price currency type status pricingModel\n rating reviewCount downloads purchaseCount featured\n`;\n\nconst CART_FIELDS = `\n id currency subtotal total itemCount isEmpty requiresShipping status\n items { id productId productName quantity unitPrice subtotal isAvailable }\n`;\n\nconst CART_ERRORS = 'errors { code field message }';\n\nexport const BROWSE_STORE = `\n query BrowseStore($input: BrowseStoreInput!) {\n browseStore(input: $input) {\n products { ${PRODUCT_FIELDS} }\n facets {\n categories { value count }\n types { value count }\n }\n totalCount hasMore nextCursor\n }\n }\n`;\n\nexport const SEARCH_PRODUCTS = `\n query SearchProducts($query: String!, $limit: Int, $offset: Int) {\n searchProducts(query: $query, limit: $limit, offset: $offset) { ${PRODUCT_FIELDS} }\n }\n`;\n\nexport const GET_STORE_PRODUCT = `\n query GetStoreProduct($id: ID!) {\n product(id: $id) {\n ${PRODUCT_FIELDS}\n longDescription category tags license\n publisher { id name isVerified }\n }\n }\n`;\n\nexport const MY_CART = `\n query MyCart {\n myCart { ${CART_FIELDS} }\n }\n`;\n\nexport const ADD_TO_CART = `\n mutation AddToCart($input: AddToCartInput!) {\n addToCart(input: $input) {\n cart { ${CART_FIELDS} }\n cartItem { id productId productName quantity unitPrice subtotal }\n ${CART_ERRORS}\n }\n }\n`;\n\nexport const REMOVE_FROM_CART = `\n mutation RemoveFromCart($cartItemId: String!) {\n removeFromCart(cartItemId: $cartItemId) {\n cart { ${CART_FIELDS} }\n ${CART_ERRORS}\n }\n }\n`;\n\nexport const CLEAR_CART = `\n mutation ClearCart {\n clearCart {\n cart { ${CART_FIELDS} }\n ${CART_ERRORS}\n }\n }\n`;\n\nexport const CHECKOUT_CART = `\n mutation Checkout($input: CheckoutInput!) {\n checkout(input: $input) {\n success\n order { id status total currency createdAt }\n ${CART_ERRORS}\n }\n }\n`;\n\nexport const GET_ORDERS = `\n query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {\n myOrders(limit: $limit, offset: $offset, status: $status) {\n id status total currency createdAt\n }\n }\n`;\n\nexport const GET_ORDER = `\n query GetStoreOrder($id: ID!) {\n getStoreOrder(id: $id) {\n id status total currency createdAt processedAt billingAccountId\n lineItems\n }\n }\n`;\n\nexport const GET_INSTALLED_PRODUCTS = `\n query MyStoreAppInstallations($filter: InstallationFilterInput, $limit: Int, $offset: Int) {\n myStoreAppInstallations(filter: $filter, limit: $limit, offset: $offset) {\n items {\n id productId productName productType status version\n workspaceId installedAt\n }\n total hasMore\n }\n }\n`;\n\nexport const UNINSTALL_PRODUCT = `\n mutation UninstallApp($id: ID!, $reason: String, $feedback: String) {\n uninstallApp(id: $id, reason: $reason, feedback: $feedback)\n }\n`;\n\nexport const GET_LICENSES = `\n query MyEntitlements($limit: Int, $offset: Int) {\n myEntitlements(limit: $limit, offset: $offset) {\n id productId status licenseKey workspaceId expiresAt createdAt\n product { id name }\n }\n }\n`;\n\nexport const GET_MY_PUBLISHER = `\n query MyPublisher {\n myPublisher {\n id name legalName email contactEmail websiteUrl\n bio logoUrl isVerified verificationStatus\n productCount totalSales totalEarnings tier\n createdAt updatedAt\n }\n }\n`;\n\nexport const GET_MY_PUBLISHER_PRODUCTS = `\n query MyPublisherProducts {\n myPublisher {\n id productCount\n products {\n id name slug description price currency type status downloads\n publisher { id name isVerified }\n }\n }\n }\n`;\n","/**\n * Store module tools — marketplace browse/search, cart, orders, installed apps,\n * licenses (entitlements) and the caller's publisher profile.\n *\n * Backend: ~/products/global/store/global-store-svc/ (GLOBAL supergraph).\n *\n * `store_cart_checkout` completes the cart server-side (no browser redirect);\n * provider-bound payment capture pages are not exposed here.\n */\n\nimport { z } from 'zod';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport {\n jsonResult,\n errorResult,\n mcpToolName,\n type McpContext,\n type ToolAnnotations,\n} from '../../core/index.js';\nimport {\n BROWSE_STORE,\n SEARCH_PRODUCTS,\n GET_STORE_PRODUCT,\n MY_CART,\n ADD_TO_CART,\n REMOVE_FROM_CART,\n CHECKOUT_CART,\n CLEAR_CART,\n GET_ORDERS,\n GET_ORDER,\n GET_INSTALLED_PRODUCTS,\n UNINSTALL_PRODUCT,\n GET_LICENSES,\n GET_MY_PUBLISHER,\n GET_MY_PUBLISHER_PRODUCTS,\n} from './operations.js';\n\nconst PRODUCT_TYPES = [\n 'ACCESSORY',\n 'AGENT',\n 'APP',\n 'APPAREL',\n 'BOOK',\n 'BOTAPP',\n 'COLLECTIBLE',\n 'COMPONENT',\n 'CONSOLE',\n 'CONSUMABLE',\n 'DASHBOARD',\n 'DATASINK',\n 'EQUIPMENT',\n 'EXTENSION',\n 'HARDWARE',\n 'INTEGRATION',\n 'MERCHANDISE',\n 'NODE',\n 'PARSER',\n 'PLUGIN',\n 'TEMPLATE',\n 'THEME',\n 'VIBEMODULE',\n 'WIDGET',\n 'WORKFLOW',\n] as const;\n\nconst ORDER_STATUSES = ['PENDING', 'PROCESSED', 'FAILED', 'REFUNDED'] as const;\nconst INSTALLATION_STATUSES = [\n 'PENDING',\n 'INSTALLING',\n 'ACTIVE',\n 'INACTIVE',\n 'FAILED',\n 'UNINSTALLED',\n] as const;\n\ntype Variables = Record<string, unknown>;\n\n/**\n * Explicit MCP annotations. The governance layer infers hints from the tool name\n * only, and that gets these wrong: `checkout` charges the billing account but\n * looks like a plain write, `clear` empties the cart, and `browse`/`products`\n * are reads that look like writes. A destructive hint makes a server that\n * enables `enforceDestructiveConfirmation` require `confirm: true`.\n */\nconst TOOL_ANNOTATIONS: Record<string, ToolAnnotations> = {\n store_cart_checkout: { readOnlyHint: false, destructiveHint: true },\n store_cart_clear: { readOnlyHint: false, destructiveHint: true },\n store_browse: { readOnlyHint: true, destructiveHint: false },\n store_publisher_products: { readOnlyHint: true, destructiveHint: false },\n};\n\n/** A cart mutation answers `success`/`errors` rather than throwing; surface them as an error. */\nfunction cartErrors(data: unknown): string | null {\n const payload = Object.values((data ?? {}) as Record<string, unknown>)[0] as\n { errors?: Array<{ message: string }> | null } | undefined;\n const errors = payload?.errors;\n return errors && errors.length > 0 ? errors.map((e) => e.message).join('; ') : null;\n}\n\nexport function registerStoreTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n const tool = (\n name: string,\n title: string,\n description: string,\n inputSchema: Record<string, z.ZodTypeAny>,\n document: string,\n variables: (args: Record<string, unknown>) => Variables,\n pick: (data: Record<string, unknown>) => unknown = (data) => Object.values(data)[0],\n ): void => {\n server.registerTool(\n track(mcpToolName(ctx.productName, name)),\n {\n title,\n description,\n inputSchema,\n ...(TOOL_ANNOTATIONS[name] ? { annotations: TOOL_ANNOTATIONS[name] } : {}),\n },\n async (args: Record<string, unknown>) => {\n try {\n const data = await ctx.gql.global.request<Record<string, unknown>>(\n document,\n variables(args),\n );\n const failure = cartErrors(data);\n if (failure) return errorResult(`${title} failed: ${failure}`);\n return jsonResult(pick(data));\n } catch (error) {\n ctx.logger.error(`${name} failed`, { error: String(error) });\n return errorResult(\n `${title} failed: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n };\n\n // ── Search / browse / get ──────────────────────────────────────────────\n tool(\n 'store_search',\n 'Search Store',\n 'Search the marketplace for products by free-text query.',\n {\n query: z.string().describe('Search query'),\n limit: z.number().int().optional().describe('Page size'),\n offset: z.number().int().optional().describe('Skip results'),\n },\n SEARCH_PRODUCTS,\n ({ query, limit, offset }) => ({ query, limit, offset }),\n );\n\n tool(\n 'store_browse',\n 'Browse Store',\n 'Browse the marketplace with filters, sorting and paging; returns facets and totals.',\n {\n category: z.string().optional().describe('Category filter'),\n type: z.enum(PRODUCT_TYPES).optional().describe('Product type filter'),\n search: z.string().optional().describe('Free-text filter'),\n sortBy: z\n .enum([\n 'RELEVANCE',\n 'NEWEST',\n 'OLDEST',\n 'NAME_ASC',\n 'NAME_DESC',\n 'PRICE_LOW',\n 'PRICE_HIGH',\n 'RATING',\n 'DOWNLOADS',\n 'FEATURED',\n ])\n .optional()\n .describe('Sort order'),\n limit: z.number().int().optional().describe('Page size'),\n offset: z.number().int().optional().describe('Skip results'),\n },\n BROWSE_STORE,\n ({ category, type, search, sortBy, limit, offset }) => {\n const filter: Variables = {};\n if (category !== undefined) filter.category = category;\n if (type !== undefined) filter.type = type;\n if (search !== undefined) filter.search = search;\n const pagination: Variables = {};\n if (limit !== undefined) pagination.limit = limit;\n if (offset !== undefined) pagination.offset = offset;\n const input: Variables = {};\n if (Object.keys(filter).length > 0) input.filter = filter;\n if (Object.keys(pagination).length > 0) input.pagination = pagination;\n if (sortBy !== undefined) input.sortBy = sortBy;\n return { input };\n },\n );\n\n tool(\n 'store_get_product',\n 'Get Product',\n 'Get a marketplace product by ID.',\n { id: z.string().describe('Product ID') },\n GET_STORE_PRODUCT,\n ({ id }) => ({ id }),\n );\n\n // ── Cart ───────────────────────────────────────────────────────────────\n tool('store_cart_list', 'Get My Cart', \"Get the current user's cart.\", {}, MY_CART, () => ({}));\n\n tool(\n 'store_cart_add',\n 'Add to Cart',\n 'Add a product (and optional variant) to the cart.',\n {\n product: z.string().describe('Product ID'),\n quantity: z.number().int().optional().describe('Quantity (default 1)'),\n variant: z.string().optional().describe('Variant ID'),\n },\n ADD_TO_CART,\n ({ product, quantity, variant }) => {\n const input: Variables = { productId: product };\n if (quantity !== undefined) input.quantity = quantity;\n if (variant !== undefined) input.variantId = variant;\n return { input };\n },\n );\n\n tool(\n 'store_cart_remove',\n 'Remove from Cart',\n 'Remove one line item from the cart.',\n { item: z.string().describe('Cart item ID (from store_cart_list)') },\n REMOVE_FROM_CART,\n ({ item }) => ({ cartItemId: item }),\n );\n\n tool(\n 'store_cart_checkout',\n 'Checkout Cart',\n 'Check out the current cart server-side and return the resulting order.',\n {\n billingAccountId: z.string().optional().describe('Billing account to charge'),\n paymentMethodId: z.string().optional().describe('Saved payment method'),\n shippingAddressId: z.string().optional().describe('Shipping address (physical items)'),\n shippingMethodId: z.string().optional().describe('Shipping method (physical items)'),\n notes: z.string().optional().describe('Order notes'),\n },\n CHECKOUT_CART,\n (args) => {\n const input: Variables = {};\n for (const [key, value] of Object.entries(args)) if (value !== undefined) input[key] = value;\n return { input };\n },\n );\n\n tool(\n 'store_cart_clear',\n 'Clear Cart',\n 'Remove every item from the cart.',\n {},\n CLEAR_CART,\n () => ({}),\n );\n\n // ── Orders ─────────────────────────────────────────────────────────────\n tool(\n 'store_orders_list',\n 'List Orders',\n 'List orders for the current user.',\n {\n status: z.enum(ORDER_STATUSES).optional().describe('Filter by order status'),\n limit: z.number().int().optional().describe('Page size'),\n offset: z.number().int().optional().describe('Skip results'),\n },\n GET_ORDERS,\n ({ status, limit, offset }) => ({ status, limit, offset }),\n );\n\n tool(\n 'store_orders_get',\n 'Get Order',\n 'Get an order by ID.',\n { id: z.string().describe('Order ID') },\n GET_ORDER,\n ({ id }) => ({ id }),\n );\n\n // ── Installed products / licenses ──────────────────────────────────────\n tool(\n 'store_installed_list',\n 'List Installed Products',\n 'List the caller’s store app installations, optionally for one workspace or product.',\n {\n workspace: z.string().optional().describe('Workspace ID filter'),\n product: z.string().optional().describe('Product ID filter'),\n status: z.enum(INSTALLATION_STATUSES).optional().describe('Installation status filter'),\n limit: z.number().int().optional().describe('Page size'),\n offset: z.number().int().optional().describe('Skip results'),\n },\n GET_INSTALLED_PRODUCTS,\n ({ workspace, product, status, limit, offset }) => {\n const filter: Variables = {};\n if (workspace !== undefined) filter.workspaceId = workspace;\n if (product !== undefined) filter.productId = product;\n if (status !== undefined) filter.status = status;\n return {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n limit,\n offset,\n };\n },\n );\n\n tool(\n 'store_installed_uninstall',\n 'Uninstall Product',\n 'Uninstall a store app by installation ID (from store_installed_list).',\n {\n installationId: z.string().describe('Installation ID'),\n reason: z.string().optional().describe('Why it is being uninstalled'),\n feedback: z.string().optional().describe('Free-text feedback for the publisher'),\n },\n UNINSTALL_PRODUCT,\n ({ installationId, reason, feedback }) => ({ id: installationId, reason, feedback }),\n (data) => ({ uninstalled: data.uninstallApp === true }),\n );\n\n tool(\n 'store_licenses_list',\n 'List Licenses',\n \"List the caller's product entitlements (licenses), including license keys and expiry.\",\n {\n limit: z.number().int().optional().describe('Page size'),\n offset: z.number().int().optional().describe('Skip results'),\n },\n GET_LICENSES,\n ({ limit, offset }) => ({ limit, offset }),\n );\n\n // ── Publisher ──────────────────────────────────────────────────────────\n tool(\n 'store_publisher_get',\n 'Get My Publisher',\n \"Get the caller's publisher profile (null when the caller is not a publisher).\",\n {},\n GET_MY_PUBLISHER,\n () => ({}),\n );\n\n tool(\n 'store_publisher_products',\n 'List My Publisher Products',\n 'List products published by the caller.',\n {},\n GET_MY_PUBLISHER_PRODUCTS,\n () => ({}),\n );\n}\n","/**\n * Store module — marketplace search/browse, cart, orders, installed apps,\n * licenses. Backend: ~/products/global/store/global-store-svc/.\n * Ported from cli-sdk/src/modules/store/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerStoreTools } from './tools.js';\n\nconst storeModule: McpModule = {\n id: 'store',\n version: '0.0.1',\n displayName: 'Store',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerStoreTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default storeModule;\n"]}
@@ -1,15 +1,15 @@
1
- export declare const BROWSE_STORE = "\n query BrowseStore($input: BrowseStoreInput!) {\n browseStore(input: $input) {\n products { id name description price currency type status }\n facets { categories types }\n totalCount hasMore\n }\n }\n";
2
- export declare const SEARCH_STORE = "\n query SearchStore($query: String!, $filters: StoreFiltersInput) {\n searchStore(query: $query, filters: $filters) {\n id name price currency type activeInstallCount\n }\n }\n";
3
- export declare const GET_STORE_PRODUCT = "\n query GetStoreProduct($id: ID!) {\n getProduct(id: $id) {\n id name description price currency type status\n publisher { name }\n }\n }\n";
4
- export declare const MY_CART = "\n query MyCart {\n myCart {\n id currency subtotal total itemCount isEmpty\n items { id productId quantity }\n }\n }\n";
5
- export declare const ADD_TO_CART = "\n mutation AddToCart($input: AddToCartInput!) {\n addToCart(input: $input) {\n id itemCount subtotal items { productId quantity }\n }\n }\n";
6
- export declare const REMOVE_FROM_CART = "\n mutation RemoveFromCart($cartId: ID!, $itemId: ID!) {\n removeFromCart(cartId: $cartId, itemId: $itemId) {\n id itemCount subtotal\n }\n }\n";
7
- export declare const CHECKOUT_CART = "\n mutation CheckoutCart($cartId: ID!) {\n checkoutCart(cartId: $cartId) {\n success order { id total status }\n }\n }\n";
8
- export declare const GET_ORDERS = "\n query GetOrders($limit: Int, $offset: Int) {\n getOrders(limit: $limit, offset: $offset) {\n id status total currency createdAt\n }\n }\n";
9
- export declare const GET_ORDER = "\n query GetOrder($id: ID!) {\n getOrder(id: $id) {\n id status total currency paidAt billingAccountId\n lineItems { productId quantity unitPrice }\n }\n }\n";
10
- export declare const GET_INSTALLED_PRODUCTS = "\n query GetInstalledProducts($workspaceId: ID!) {\n getInstalledProducts(workspaceId: $workspaceId) {\n id application { id name } status installedAt lastUsedAt\n }\n }\n";
11
- export declare const UNINSTALL_PRODUCT = "\n mutation UninstallProduct($installationId: ID!) {\n uninstallProduct(installationId: $installationId) { success }\n }\n";
12
- export declare const GET_LICENSES = "\n query GetLicenses($entitlementId: ID!) {\n getLicenses(entitlementId: $entitlementId) {\n id status validFrom expiresAt\n }\n }\n";
13
- export declare const CLEAR_CART = "\n mutation ClearCart {\n clearCart {\n cart {\n id currency subtotal total itemCount isEmpty\n items { id productId quantity }\n }\n errors { code field message }\n }\n }\n";
1
+ export declare const BROWSE_STORE = "\n query BrowseStore($input: BrowseStoreInput!) {\n browseStore(input: $input) {\n products { \n id name slug description price currency type status pricingModel\n rating reviewCount downloads purchaseCount featured\n }\n facets {\n categories { value count }\n types { value count }\n }\n totalCount hasMore nextCursor\n }\n }\n";
2
+ export declare const SEARCH_PRODUCTS = "\n query SearchProducts($query: String!, $limit: Int, $offset: Int) {\n searchProducts(query: $query, limit: $limit, offset: $offset) { \n id name slug description price currency type status pricingModel\n rating reviewCount downloads purchaseCount featured\n }\n }\n";
3
+ export declare const GET_STORE_PRODUCT = "\n query GetStoreProduct($id: ID!) {\n product(id: $id) {\n \n id name slug description price currency type status pricingModel\n rating reviewCount downloads purchaseCount featured\n\n longDescription category tags license\n publisher { id name isVerified }\n }\n }\n";
4
+ export declare const MY_CART = "\n query MyCart {\n myCart { \n id currency subtotal total itemCount isEmpty requiresShipping status\n items { id productId productName quantity unitPrice subtotal isAvailable }\n }\n }\n";
5
+ export declare const ADD_TO_CART = "\n mutation AddToCart($input: AddToCartInput!) {\n addToCart(input: $input) {\n cart { \n id currency subtotal total itemCount isEmpty requiresShipping status\n items { id productId productName quantity unitPrice subtotal isAvailable }\n }\n cartItem { id productId productName quantity unitPrice subtotal }\n errors { code field message }\n }\n }\n";
6
+ export declare const REMOVE_FROM_CART = "\n mutation RemoveFromCart($cartItemId: String!) {\n removeFromCart(cartItemId: $cartItemId) {\n cart { \n id currency subtotal total itemCount isEmpty requiresShipping status\n items { id productId productName quantity unitPrice subtotal isAvailable }\n }\n errors { code field message }\n }\n }\n";
7
+ export declare const CLEAR_CART = "\n mutation ClearCart {\n clearCart {\n cart { \n id currency subtotal total itemCount isEmpty requiresShipping status\n items { id productId productName quantity unitPrice subtotal isAvailable }\n }\n errors { code field message }\n }\n }\n";
8
+ export declare const CHECKOUT_CART = "\n mutation Checkout($input: CheckoutInput!) {\n checkout(input: $input) {\n success\n order { id status total currency createdAt }\n errors { code field message }\n }\n }\n";
9
+ export declare const GET_ORDERS = "\n query MyOrders($limit: Int, $offset: Int, $status: OrderStatus) {\n myOrders(limit: $limit, offset: $offset, status: $status) {\n id status total currency createdAt\n }\n }\n";
10
+ export declare const GET_ORDER = "\n query GetStoreOrder($id: ID!) {\n getStoreOrder(id: $id) {\n id status total currency createdAt processedAt billingAccountId\n lineItems\n }\n }\n";
11
+ export declare const GET_INSTALLED_PRODUCTS = "\n query MyStoreAppInstallations($filter: InstallationFilterInput, $limit: Int, $offset: Int) {\n myStoreAppInstallations(filter: $filter, limit: $limit, offset: $offset) {\n items {\n id productId productName productType status version\n workspaceId installedAt\n }\n total hasMore\n }\n }\n";
12
+ export declare const UNINSTALL_PRODUCT = "\n mutation UninstallApp($id: ID!, $reason: String, $feedback: String) {\n uninstallApp(id: $id, reason: $reason, feedback: $feedback)\n }\n";
13
+ export declare const GET_LICENSES = "\n query MyEntitlements($limit: Int, $offset: Int) {\n myEntitlements(limit: $limit, offset: $offset) {\n id productId status licenseKey workspaceId expiresAt createdAt\n product { id name }\n }\n }\n";
14
14
  export declare const GET_MY_PUBLISHER = "\n query MyPublisher {\n myPublisher {\n id name legalName email contactEmail websiteUrl\n bio logoUrl isVerified verificationStatus\n productCount totalSales totalEarnings tier\n createdAt updatedAt\n }\n }\n";
15
15
  export declare const GET_MY_PUBLISHER_PRODUCTS = "\n query MyPublisherProducts {\n myPublisher {\n id productCount\n products {\n id name slug description price currency type status downloads\n publisher { id name isVerified }\n }\n }\n }\n";
@@ -1,3 +1,3 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { type McpContext } from '../../core/index.js';
3
3
  export declare function registerStoreTools(server: McpServer, ctx: McpContext, track: (n: string) => string): void;
@@ -22,9 +22,9 @@ export declare const ModerationStatusEnum: z.ZodEnum<{
22
22
  }>;
23
23
  export declare const SourceTypeEnum: z.ZodEnum<{
24
24
  ARTIFACT: "ARTIFACT";
25
+ BOOK: "BOOK";
25
26
  ACADEMIC: "ACADEMIC";
26
27
  ARCHIVAL_RECORD: "ARCHIVAL_RECORD";
27
- BOOK: "BOOK";
28
28
  INTERVIEW: "INTERVIEW";
29
29
  PERIODICAL: "PERIODICAL";
30
30
  PRIMARY_DOCUMENT: "PRIMARY_DOCUMENT";