@carrierllc/mcp 0.11.16 → 0.12.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.
- package/dist/{chunk-Y7D6FHHT.js → chunk-J52VP7E7.js} +14 -2
- package/dist/chunk-J52VP7E7.js.map +1 -0
- package/dist/cli.js +22 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin/carrier/agents/carrier-storefront-builder.md +3 -3
- package/plugin/carrier/skills/storefront/SKILL.md +2 -2
- package/templates/storefront/src/app/activate/[orderId]/ActivateClient.tsx +145 -14
- package/templates/storefront/src/app/activate/[orderId]/page.tsx +1 -1
- package/templates/storefront/src/app/api/checkout/guest/route.ts +72 -9
- package/templates/storefront/src/app/api/orders/[orderId]/cancel/route.ts +33 -0
- package/templates/storefront/src/app/api/orders/[orderId]/top-up-options/route.ts +28 -0
- package/templates/storefront/src/app/api/orders/[orderId]/usage/route.ts +25 -0
- package/templates/storefront/src/app/api/profile/phone/route.ts +1 -1
- package/templates/storefront/src/app/checkout/[templateId]/CheckoutClient.tsx +142 -39
- package/templates/storefront/src/app/checkout/success/CheckoutSuccessClient.tsx +1 -1
- package/templates/storefront/src/app/checkout/success/page.tsx +1 -1
- package/templates/storefront/src/app/dashboard/EsimControls.tsx +293 -0
- package/templates/storefront/src/app/dashboard/page.tsx +12 -1
- package/templates/storefront/src/app/shop/ShopClient.tsx +126 -5
- package/templates/storefront/src/app/sign-up/[[...sign-up]]/StorefrontSignUpClient.tsx +1 -1
- package/templates/storefront/src/app/sign-up/[[...sign-up]]/page.tsx +1 -1
- package/templates/storefront/src/brand.config.ts +19 -0
- package/templates/storefront/src/components/checkout/EmbeddedStripeCheckout.tsx +191 -0
- package/templates/storefront/src/components/landing/PlanCard.tsx +12 -4
- package/templates/storefront/src/lib/checkout-order-claim.ts +68 -4
- package/templates/storefront/src/lib/order-route-guard.ts +85 -0
- package/templates/storefront/src/middleware.ts +1 -1
- package/templates/storefront/src/vendor/carrier/client.ts +86 -1
- package/templates/storefront/src/vendor/carrier/types.ts +34 -0
- package/templates/storefront/src/vendor/geo/index.ts +45 -0
- package/templates/storefront/src/vendor/ui/brand.ts +8 -1
- package/dist/chunk-Y7D6FHHT.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
verifyStorefront,
|
|
40
40
|
walletScreen,
|
|
41
41
|
which
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-J52VP7E7.js";
|
|
43
43
|
import {
|
|
44
44
|
copyTree,
|
|
45
45
|
exists,
|
|
@@ -210,10 +210,8 @@ async function scaffoldStorefront(target, brand) {
|
|
|
210
210
|
await copyTree(template, target);
|
|
211
211
|
await pruneTree(template, target);
|
|
212
212
|
const subs = [
|
|
213
|
-
|
|
214
|
-
["\u{1F96D}", ""]
|
|
213
|
+
...deriveAccentPaletteSubs(brand.colors.accent, brand.colors.accentDark)
|
|
215
214
|
];
|
|
216
|
-
subs.push(...deriveAccentPaletteSubs(brand.colors.accent, brand.colors.accentDark));
|
|
217
215
|
if (brand.colors.bg.toUpperCase() !== "#080C16") subs.push(["#080C16", brand.colors.bg]);
|
|
218
216
|
if (brand.colors.text.toUpperCase() !== "#F5F1EA") subs.push(["#F5F1EA", brand.colors.text]);
|
|
219
217
|
await replaceInTree(target, subs);
|
|
@@ -236,6 +234,10 @@ async function patchBrandConfig(path, brand) {
|
|
|
236
234
|
setField("supportUrl", brand.supportUrl);
|
|
237
235
|
setField("supportEmail", brand.supportEmail);
|
|
238
236
|
setField("supportWhatsapp", brand.supportWhatsapp);
|
|
237
|
+
setField("description", brand.description);
|
|
238
|
+
setField("emailFromName", brand.emailFromName);
|
|
239
|
+
setField("emailFromMailbox", brand.emailFromMailbox);
|
|
240
|
+
setField("appUrl", brand.appUrl);
|
|
239
241
|
setField("accent", brand.colors.accent);
|
|
240
242
|
setField("accentDark", brand.colors.accentDark);
|
|
241
243
|
setField("accentLight", deriveAccentLight(brand.colors.accent));
|
|
@@ -2022,7 +2024,15 @@ var CLI_DOMAINS = [
|
|
|
2022
2024
|
name: "list",
|
|
2023
2025
|
tool: "list_package_templates",
|
|
2024
2026
|
summary: "Browse package templates available for assignment.",
|
|
2025
|
-
|
|
2027
|
+
// No --account-id. OCS's listPrepaidPackageTemplate rejects `accountId`
|
|
2028
|
+
// outright — "Unrecognized field \"accountId\" (5 known properties:
|
|
2029
|
+
// locationZoneId, templateId, destinationListId, resellerId, sponsorId)"
|
|
2030
|
+
// — so the only filter flag this command ever advertised was 100%
|
|
2031
|
+
// broken. Both tool surfaces already dropped it (see the note in
|
|
2032
|
+
// apps/mcp-server/src/tools.ts): accounts are a different id space from
|
|
2033
|
+
// resellers and sponsors, so mapping it onto one of those would turn a
|
|
2034
|
+
// loud error into another tenant's catalog returned silently.
|
|
2035
|
+
options: []
|
|
2026
2036
|
},
|
|
2027
2037
|
{
|
|
2028
2038
|
name: "create",
|
|
@@ -4258,10 +4268,13 @@ async function promptBrand(seed) {
|
|
|
4258
4268
|
name,
|
|
4259
4269
|
legalName: name,
|
|
4260
4270
|
tagline: isCarrier ? seed.tagline : `Mobile connectivity by ${name}.`,
|
|
4271
|
+
description: isCarrier ? seed.description : `Mobile data from ${name}. Instant QR activation, no contract.`,
|
|
4261
4272
|
domain,
|
|
4262
4273
|
supportEmail,
|
|
4263
4274
|
supportUrl: `https://${domain}/help`,
|
|
4264
4275
|
supportWhatsapp: isCarrier ? seed.supportWhatsapp : "",
|
|
4276
|
+
emailFromName: name,
|
|
4277
|
+
appUrl: `https://${domain}`,
|
|
4265
4278
|
social: isCarrier ? seed.social : {},
|
|
4266
4279
|
colors: { ...seed.colors, accent, accentDark }
|
|
4267
4280
|
};
|
|
@@ -5024,7 +5037,7 @@ program.command("dash [domain]").description(`Render a status screen in the term
|
|
|
5024
5037
|
);
|
|
5025
5038
|
});
|
|
5026
5039
|
var site = program.command("site").description("Scaffold and deploy a white-labeled storefront.");
|
|
5027
|
-
site.command("create [dir]").description("Scaffold a white-labeled storefront from the
|
|
5040
|
+
site.command("create [dir]").description("Scaffold a white-labeled storefront from the bundled template.").option("--name <name>", "Brand name").option("--domain <domain>", "Domain").option("--accent <hex>", "Accent color").option("--yes", "Carrier defaults, no prompts").action(async (dir, o) => {
|
|
5028
5041
|
header();
|
|
5029
5042
|
let brand = { ...CARRIER_BRAND };
|
|
5030
5043
|
if (o.name || o.domain || o.accent) {
|
|
@@ -5037,9 +5050,12 @@ site.command("create [dir]").description("Scaffold a white-labeled storefront fr
|
|
|
5037
5050
|
domain,
|
|
5038
5051
|
legalName: o.name ?? brand.legalName,
|
|
5039
5052
|
tagline: o.name ? `Mobile connectivity by ${o.name}.` : brand.tagline,
|
|
5053
|
+
description: o.name ? `Mobile data from ${o.name}. Instant QR activation, no contract.` : brand.description,
|
|
5040
5054
|
supportEmail: `support@${domain}`,
|
|
5041
5055
|
supportUrl: `https://${domain}/help`,
|
|
5042
5056
|
supportWhatsapp: isCarrier ? brand.supportWhatsapp : "",
|
|
5057
|
+
emailFromName: name,
|
|
5058
|
+
appUrl: `https://${domain}`,
|
|
5043
5059
|
social: isCarrier ? brand.social : {},
|
|
5044
5060
|
colors: {
|
|
5045
5061
|
...brand.colors,
|