@snowcone-app/mcp 0.7.2 → 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 +12 -0
- package/dist/index.js +28 -22
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 0.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#857](https://github.com/snowcone-app/snowcone-monorepo/pull/857) [`723efd3`](https://github.com/snowcone-app/snowcone-monorepo/commit/723efd37a0c9c15589403748e339348e29e08147) Thanks [@kevinsproles](https://github.com/kevinsproles)! - Update the public catalog key value (the Meilisearch master key was rotated, which re-derives every API key's value). Same read-only `search` + `documents.get` scope as before.
|
|
14
|
+
|
|
3
15
|
## 0.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var API_BASE = stripSlash(process.env.SNOWCONE_API_BASE ?? "https://api.snowcone
|
|
|
12
12
|
var IMG_BASE = stripSlash(process.env.SNOWCONE_IMG_BASE ?? "https://img.snowcone.app");
|
|
13
13
|
var BUY_BASE = stripSlash(process.env.SNOWCONE_BUY_BASE ?? "https://buy.snowcone.app");
|
|
14
14
|
var MEILI_HOST = stripSlash(process.env.SNOWCONE_MEILI_HOST ?? "https://search.snowcone.app");
|
|
15
|
-
var MEILI_KEY = process.env.SNOWCONE_MEILI_KEY ?? "
|
|
15
|
+
var MEILI_KEY = process.env.SNOWCONE_MEILI_KEY ?? "73f573ead9be75531c56ee89d104caa49d79154db387f119a013d33eccfe654b";
|
|
16
16
|
var MEILI_INDEX = process.env.SNOWCONE_MEILI_INDEX ?? "snowcone";
|
|
17
17
|
var MEILI_DESIGNS_INDEX = process.env.SNOWCONE_MEILI_DESIGNS_INDEX ?? "snowcone-designs";
|
|
18
18
|
var CHARACTER_LIMIT = 25e3;
|
|
@@ -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.
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
if (
|
|
429
|
-
parts.push(`${PARAM_PREFIX.
|
|
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(
|
|
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
|
-
"
|
|
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
|
+
"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",
|