@carrierllc/mcp 0.13.15 → 0.13.17
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/dist/{chunk-QXIY42R6.js → chunk-SAZFMURF.js} +2 -2
- package/dist/{chunk-QXIY42R6.js.map → chunk-SAZFMURF.js.map} +1 -1
- package/dist/cli.js +14 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +264 -168
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin/carrier/skills/publish-storefront/SKILL.md +10 -0
- package/templates/storefront/src/vendor/carrier/client.ts +14 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carrierllc/mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.17",
|
|
4
4
|
"description": "Carrier MCP \u2014 natural-language control of MVNO/eSIM fleets via eSIMVault OCS. Stdio mode for direct integration with Claude Desktop, Cursor, Windsurf, and MCP-compatible clients. Ships the `carrier` CLI (plugin install + white-label eSIM storefront scaffold).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -78,6 +78,16 @@ This is the standard route: to copy a connectivity plan the org already created,
|
|
|
78
78
|
{ "product_id": "cnp_abcdef0123456789abcdef0123456789", "price_cents": 1200 }
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
To change a plan that is already on the shop, do not send the template fields again. PATCH the plan by its slug. A price of zero or less is refused, and a plan that belongs to another shop is not found and stays as it was.
|
|
82
|
+
|
|
83
|
+
`PATCH https://api.carrier.llc/v1/storefronts/{id}/plans/{slug}`
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{ "price_cents": 1400, "active": false }
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
`price_cents` is the retail price in minor units. `active` is whether the plan is for sale. `sort_order` is the display order. Leave a field out and the stored value stays. The same change is the MCP tool `update_storefront_plan`.
|
|
90
|
+
|
|
81
91
|
A color or legal-name patch merges onto the stored shop, so the logo and hero stay. Send only the fields you want to change:
|
|
82
92
|
|
|
83
93
|
`PATCH https://api.carrier.llc/v1/storefronts/{id}`
|
|
@@ -72,6 +72,18 @@ const MOCK_TEMPLATES: SkuTemplate[] = [
|
|
|
72
72
|
},
|
|
73
73
|
];
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* How long the storefront may keep serving a catalog it already fetched.
|
|
77
|
+
*
|
|
78
|
+
* A price or bundle change made in Carrier must be visible within the agreed
|
|
79
|
+
* ceiling (CAR-281: 3600s ISR). The unscoped `/api/templates` answer also
|
|
80
|
+
* carries `public, max-age=60` upstream, so revalidate + 60s is the real
|
|
81
|
+
* worst case. It used to be 3600 for the unscoped read, which put the worst
|
|
82
|
+
* case at 3660s. Keep one value for both reads and keep it well under the
|
|
83
|
+
* ceiling; the scoped read is also busted by tag on save.
|
|
84
|
+
*/
|
|
85
|
+
export const CATALOG_REVALIDATE_SECONDS = 60;
|
|
86
|
+
|
|
75
87
|
/** Why the catalog is not live. Absent when `source` is "live". */
|
|
76
88
|
export type CatalogDegradedReason = "unconfigured" | "upstream-error" | "network-error";
|
|
77
89
|
|
|
@@ -109,8 +121,8 @@ export async function fetchTemplateCatalog(): Promise<TemplateCatalog> {
|
|
|
109
121
|
: "/api/templates";
|
|
110
122
|
const res = await fetch(`${base}${templatesPath}`, {
|
|
111
123
|
next: slug
|
|
112
|
-
? { revalidate:
|
|
113
|
-
: { revalidate:
|
|
124
|
+
? { revalidate: CATALOG_REVALIDATE_SECONDS, tags: [`storefront:${slug}`] }
|
|
125
|
+
: { revalidate: CATALOG_REVALIDATE_SECONDS },
|
|
114
126
|
});
|
|
115
127
|
if (!res.ok) return sampleCatalog("upstream-error");
|
|
116
128
|
const templates = (await res.json()) as SkuTemplate[];
|