@snowcone-app/mcp 0.7.3 → 0.7.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @snowcone-app/mcp
2
2
 
3
+ ## 0.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#890](https://github.com/snowcone-app/snowcone-monorepo/pull/890) [`17cfeb6`](https://github.com/snowcone-app/snowcone-monorepo/commit/17cfeb62dc1ee762e8d5708b3d4e2e2535505454) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Update the `render_mockup`/`buy_url` tool descriptions for the ADR-0089 base+override placement model: `asset` is documented as the base painted on every placement by default, `design` as per-placement overrides on top of it, and the unknown-key error as the typed `E_PLACEMENT_NOT_FOUND` (listing valid keys) instead of a generic 400. Keeps the agent-facing surface in sync with the live behavior.
8
+
3
9
  ## 0.7.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -412,28 +412,32 @@ function buildPublicMockupUrl(options, cfg = {}) {
412
412
  const enc = encodeURIComponent;
413
413
  const parts = [];
414
414
  parts.push(`${PARAMS.shop}=${enc(options.shop)}`);
415
- if (options.design) {
416
- for (const key of Object.keys(options.design).sort()) {
417
- const fill = options.design[key];
418
- const k = enc(key);
419
- if (typeof fill === "string") {
420
- parts.push(`${PARAM_PREFIX.asset}${k}=${enc(fill)}`);
421
- } else if ("color" in fill) {
422
- parts.push(`${PARAM_PREFIX.color}${k}=${enc(fill.color)}`);
423
- } else {
424
- parts.push(`${PARAM_PREFIX.asset}${k}=${enc(fill.src)}`);
425
- if (fill.tile !== void 0) {
426
- parts.push(`${PARAM_PREFIX.tile}${k}=${fill.tile}`);
427
- }
428
- if (fill.align !== void 0) {
429
- parts.push(`${PARAM_PREFIX.align}${k}=${enc(fill.align)}`);
415
+ if (options.designRef !== void 0) {
416
+ parts.push(`${PARAMS.design}=${enc(options.designRef)}`);
417
+ } else {
418
+ if (options.assetUrl !== void 0) {
419
+ parts.push(`${PARAMS.asset}=${enc(options.assetUrl)}`);
420
+ }
421
+ const overrides = options.design || options.placements ? { ...options.design ?? {}, ...options.placements ?? {} } : void 0;
422
+ if (overrides) {
423
+ for (const key of Object.keys(overrides).sort()) {
424
+ const fill = overrides[key];
425
+ const k = enc(key);
426
+ if (typeof fill === "string") {
427
+ parts.push(`${PARAM_PREFIX.asset}${k}=${enc(fill)}`);
428
+ } else if ("color" in fill) {
429
+ parts.push(`${PARAM_PREFIX.color}${k}=${enc(fill.color)}`);
430
+ } else {
431
+ parts.push(`${PARAM_PREFIX.asset}${k}=${enc(fill.src)}`);
432
+ if (fill.tile !== void 0) {
433
+ parts.push(`${PARAM_PREFIX.tile}${k}=${fill.tile}`);
434
+ }
435
+ if (fill.align !== void 0) {
436
+ parts.push(`${PARAM_PREFIX.align}${k}=${enc(fill.align)}`);
437
+ }
430
438
  }
431
439
  }
432
440
  }
433
- } else if (options.assetUrl !== void 0) {
434
- parts.push(`${PARAMS.asset}=${enc(options.assetUrl)}`);
435
- } else if (options.designRef !== void 0) {
436
- parts.push(`${PARAMS.design}=${enc(options.designRef)}`);
437
441
  }
438
442
  if (options.placement !== void 0) {
439
443
  parts.push(`${PARAMS.placement}=${enc(options.placement)}`);
@@ -558,9 +562,11 @@ var fillSchema = z.union([
558
562
  var urlShape = {
559
563
  product: z.string().min(1).describe("Product code (the catalog document id), e.g. 'BEEB77'."),
560
564
  shop: z.string().min(1).describe("Your public Shop ID from snowcone_mint_shop."),
561
- asset: z.string().optional().describe("A single publicly-fetchable image URL for the default placement. Use this OR 'design'."),
565
+ asset: z.string().optional().describe(
566
+ "A single publicly-fetchable image URL. This is the BASE design \u2014 it is painted on EVERY placement of the product by default (front, back, sleeves, \u2026), so one image covers the whole product with no extra work. Add 'design' to override specific placements; omit it for the same image everywhere."
567
+ ),
562
568
  design: z.record(fillSchema).optional().describe(
563
- "Multi-placement design: placement KEY \u2192 image URL / { src, align, tile } / { color }. Use placement.key from snowcone_get_product (e.g. 'front', 'left_sleeve'), NOT the human label ('Front') \u2014 the wrong key 400s 'Unknown placement'."
569
+ "Per-placement OVERRIDES on top of the 'asset' base: placement KEY \u2192 image URL / { src, align, tile } / { color }. Each entry replaces the base on just that placement; placements you don't list keep the 'asset' base. Use 'design' alone (no 'asset') to fill only the listed placements. Use placement.key from snowcone_get_product (e.g. 'front', 'left_sleeve'), NOT the human label ('Front') \u2014 an unknown key throws E_PLACEMENT_NOT_FOUND listing the product's valid placement keys."
564
570
  ),
565
571
  options: z.record(z.string()).optional().describe("Variant option picks: attribute \u2192 choice, e.g. { size: 'M', color: 'black' }."),
566
572
  variant: z.string().optional().describe("Explicit variant id (gvid), if the product needs one."),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowcone-app/mcp",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Snowcone MCP server — the agent-native quickstart. Mint a sandbox shop, browse the catalog, and turn any image into a buyable printed-merch mockup URL, all as callable tools.",
5
5
  "keywords": [
6
6
  "mcp",