@carrierllc/mcp 0.13.41 → 0.13.48
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-6OAZJBLA.js → chunk-H77A3SME.js} +71 -8
- package/dist/chunk-H77A3SME.js.map +1 -0
- package/dist/cli.js +128 -10
- package/dist/cli.js.map +1 -1
- package/dist/index.js +66 -15
- package/dist/index.js.map +1 -1
- package/package.json +6 -3
- package/templates/storefront/CLERK.md +23 -0
- package/templates/storefront/src/app/activate/[orderId]/ActivateClient.tsx +29 -22
- package/templates/storefront/src/app/activate/[orderId]/page.tsx +2 -2
- package/templates/storefront/src/app/api/checkout/claim/route.ts +7 -6
- package/templates/storefront/src/app/api/checkout/guest/route.ts +72 -17
- package/templates/storefront/src/app/api/orders/[orderId]/route.ts +2 -2
- package/templates/storefront/src/app/checkout/[templateId]/CheckoutClient.tsx +51 -25
- package/templates/storefront/src/app/checkout/success/CheckoutSuccessClient.tsx +165 -131
- package/templates/storefront/src/app/checkout/success/FocusHeading.tsx +20 -0
- package/templates/storefront/src/app/checkout/success/page.tsx +136 -15
- package/templates/storefront/src/app/dashboard/EsimControls.tsx +20 -24
- package/templates/storefront/src/app/dashboard/page.tsx +43 -23
- package/templates/storefront/src/app/globals.css +44 -5
- package/templates/storefront/src/app/help/page.tsx +2 -2
- package/templates/storefront/src/app/layout.tsx +5 -3
- package/templates/storefront/src/app/page.tsx +27 -7
- package/templates/storefront/src/app/shop/ShopClient.tsx +106 -72
- package/templates/storefront/src/app/shop/page.tsx +7 -2
- package/templates/storefront/src/app/sign-in/[[...sign-in]]/StorefrontSignInClient.tsx +297 -0
- package/templates/storefront/src/app/sign-in/[[...sign-in]]/page.tsx +13 -14
- package/templates/storefront/src/app/sign-up/[[...sign-up]]/StorefrontSignUpClient.tsx +31 -28
- package/templates/storefront/src/app/sign-up/[[...sign-up]]/page.tsx +5 -2
- package/templates/storefront/src/brand.config.ts +16 -0
- package/templates/storefront/src/components/Providers.tsx +20 -1
- package/templates/storefront/src/components/faq/FaqSection.tsx +2 -2
- package/templates/storefront/src/components/footer/StorefrontFooter.tsx +7 -7
- package/templates/storefront/src/components/landing/FinalCTA.tsx +4 -9
- package/templates/storefront/src/components/landing/HeroSection.tsx +4 -7
- package/templates/storefront/src/components/landing/HowItWorks.tsx +1 -1
- package/templates/storefront/src/components/landing/PlanCard.tsx +23 -13
- package/templates/storefront/src/components/landing/TierPlanBoard.tsx +237 -0
- package/templates/storefront/src/components/nav/StorefrontNav.tsx +8 -11
- package/templates/storefront/src/components/shop/CountrySearch.tsx +94 -0
- package/templates/storefront/src/components/theme/BrandStyles.tsx +2 -2
- package/templates/storefront/src/components/theme/ThemeToggle.tsx +1 -1
- package/templates/storefront/src/components/theme/brand-accent-css.ts +21 -0
- package/templates/storefront/src/components/theme/brand-style.ts +88 -0
- package/templates/storefront/src/components/theme/clerk-appearance.ts +18 -2
- package/templates/storefront/src/lib/buyer-auth-copy.ts +83 -0
- package/templates/storefront/src/lib/buyer-error.ts +32 -0
- package/templates/storefront/src/lib/buyer-session.ts +41 -0
- package/templates/storefront/src/lib/catalog-countries.ts +179 -0
- package/templates/storefront/src/lib/checkout-client-error.ts +28 -0
- package/templates/storefront/src/lib/checkout-copy.ts +89 -0
- package/templates/storefront/src/lib/checkout-order-claim.ts +8 -7
- package/templates/storefront/src/lib/checkout-return.ts +18 -0
- package/templates/storefront/src/lib/clerk-instance.ts +89 -0
- package/templates/storefront/src/lib/order-reference.ts +15 -0
- package/templates/storefront/src/lib/request-origin.ts +28 -0
- package/templates/storefront/src/lib/sanitize-auth-redirect.ts +20 -4
- package/templates/storefront/src/lib/tap-target.ts +17 -0
- package/templates/storefront/src/lib/verify-checkout-session.ts +118 -19
- package/templates/storefront/src/middleware.ts +11 -0
- package/templates/storefront/src/vendor/carrier/catalog-guard.ts +9 -5
- package/templates/storefront/src/vendor/carrier/client.ts +22 -4
- package/templates/storefront/src/vendor/carrier/country-offers.ts +106 -0
- package/templates/storefront/src/vendor/carrier/stripe-price.ts +134 -0
- package/templates/storefront/src/vendor/carrier/tiers.ts +161 -0
- package/templates/storefront/src/vendor/carrier/types.ts +22 -0
- package/templates/storefront/src/vendor/geo/index.ts +15 -4
- package/dist/chunk-6OAZJBLA.js.map +0 -1
|
@@ -536,6 +536,9 @@ function renderEnv(brand) {
|
|
|
536
536
|
`NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=`,
|
|
537
537
|
`# Optional. Scopes the catalog to one hosted shop. Empty keeps the unscoped template list.`,
|
|
538
538
|
`NEXT_PUBLIC_STOREFRONT_SLUG=`,
|
|
539
|
+
`# Optional. Set to 1 to show the Lightning tier. Empty keeps it hidden.`,
|
|
540
|
+
`# Real Stripe Price ids are still required. Fixture plans are never sold.`,
|
|
541
|
+
`NEXT_PUBLIC_LIGHTNING_TIER=`,
|
|
539
542
|
`# Optional. Sends the eSIM QR code by email once an order is ready.`,
|
|
540
543
|
`# \`carrier site email\` authenticates you at Resend in the browser and`,
|
|
541
544
|
`# fills this in. Without it the storefront still sells and activates; the`,
|
|
@@ -543,9 +546,24 @@ function renderEnv(brand) {
|
|
|
543
546
|
`# The from-address is composed from brand.config.ts (emailFromMailbox +`,
|
|
544
547
|
`# domain), so verify that domain at resend.com/domains first.`,
|
|
545
548
|
`RESEND_API_KEY=`,
|
|
546
|
-
`# Clerk
|
|
549
|
+
`# Clerk instance switch. dev is the default and the only instance this`,
|
|
550
|
+
`# template configures. production reads the *_PRODUCTION names and does`,
|
|
551
|
+
`# not create an application. Leave those empty until that instance exists.`,
|
|
552
|
+
`NEXT_PUBLIC_CLERK_INSTANCE=dev`,
|
|
553
|
+
`# Clerk \u2014 \`carrier site clerk\` fills the dev pair, or paste them from dashboard.clerk.com`,
|
|
547
554
|
`NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=`,
|
|
548
555
|
`CLERK_SECRET_KEY=`,
|
|
556
|
+
`NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY_PRODUCTION=`,
|
|
557
|
+
`CLERK_SECRET_KEY_PRODUCTION=`,
|
|
558
|
+
`# Buyer password reset. Empty shows Forgot password. false hides it.`,
|
|
559
|
+
`NEXT_PUBLIC_PASSWORD_RESET_ENABLED=`,
|
|
560
|
+
`# Buyers stay on this shop. These stop Clerk from sending them to its hosted pages.`,
|
|
561
|
+
`NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in`,
|
|
562
|
+
`NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up`,
|
|
563
|
+
`# Country list. Empty keeps each plan's own coverage.`,
|
|
564
|
+
`# Example for the eSIMMY shop: NEXT_PUBLIC_COUNTRY_CATALOG=esimmy`,
|
|
565
|
+
`# That value expands Europe, Schengen and Global to the countries that shop sells.`,
|
|
566
|
+
`NEXT_PUBLIC_COUNTRY_CATALOG=`,
|
|
549
567
|
``
|
|
550
568
|
].join("\n");
|
|
551
569
|
}
|
|
@@ -558,14 +576,29 @@ var TEMPLATE_ENV_KEYS = {
|
|
|
558
576
|
NEXT_PUBLIC_CARRIER_API_URL: "public",
|
|
559
577
|
NEXT_PUBLIC_APP_URL: "public",
|
|
560
578
|
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: "public",
|
|
579
|
+
// `dev` (default) or `production`. Production is a switch only: this
|
|
580
|
+
// template never creates a Clerk application. See templates/storefront/CLERK.md.
|
|
581
|
+
NEXT_PUBLIC_CLERK_INSTANCE: "public",
|
|
582
|
+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY_PRODUCTION: "public",
|
|
583
|
+
// Unset shows Forgot password. `false` hides it on this storefront.
|
|
584
|
+
NEXT_PUBLIC_PASSWORD_RESET_ENABLED: "public",
|
|
585
|
+
// Keep buyers on this shop. Clerk's hosted pages are not the buyer path.
|
|
586
|
+
NEXT_PUBLIC_CLERK_SIGN_IN_URL: "public",
|
|
587
|
+
NEXT_PUBLIC_CLERK_SIGN_UP_URL: "public",
|
|
588
|
+
// Empty keeps each plan's own coverage. `esimmy` expands Europe, Schengen and Global.
|
|
589
|
+
NEXT_PUBLIC_COUNTRY_CATALOG: "public",
|
|
561
590
|
// Optional. Present: checkout is embedded in the storefront's own page.
|
|
562
591
|
// Absent: checkout redirects to Stripe's hosted page, which still works.
|
|
563
592
|
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "public",
|
|
564
593
|
// Optional. Present: the scaffold catalog is scoped to one hosted shop.
|
|
565
594
|
// Absent: the catalog client calls the unscoped template list.
|
|
566
595
|
NEXT_PUBLIC_STOREFRONT_SLUG: "public",
|
|
596
|
+
// Optional. Off unless the value is exactly "1". Lightning still stays
|
|
597
|
+
// hidden until that tenant's plans carry real Stripe Price ids.
|
|
598
|
+
NEXT_PUBLIC_LIGHTNING_TIER: "public",
|
|
567
599
|
CARRIER_API_KEY: "secret",
|
|
568
600
|
CLERK_SECRET_KEY: "secret",
|
|
601
|
+
CLERK_SECRET_KEY_PRODUCTION: "secret",
|
|
569
602
|
STRIPE_SECRET_KEY: "secret",
|
|
570
603
|
// Optional. Present: the storefront emails the QR code to whoever paid.
|
|
571
604
|
// Absent: the activation page says email delivery is not set up, and every
|
|
@@ -1855,7 +1888,7 @@ function storefrontScreen(input) {
|
|
|
1855
1888
|
// package.json
|
|
1856
1889
|
var package_default = {
|
|
1857
1890
|
name: "@carrierllc/mcp",
|
|
1858
|
-
version: "0.13.
|
|
1891
|
+
version: "0.13.48",
|
|
1859
1892
|
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).",
|
|
1860
1893
|
license: "MIT",
|
|
1861
1894
|
author: "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -1863,7 +1896,10 @@ var package_default = {
|
|
|
1863
1896
|
type: "module",
|
|
1864
1897
|
carrierCompatibility: {
|
|
1865
1898
|
claudeOAuthOwnerVersion: "2.1.277",
|
|
1866
|
-
claudeOAuthOwnerVersions: [
|
|
1899
|
+
claudeOAuthOwnerVersions: [
|
|
1900
|
+
"2.1.277",
|
|
1901
|
+
"2.1.296"
|
|
1902
|
+
]
|
|
1867
1903
|
},
|
|
1868
1904
|
main: "./dist/index.js",
|
|
1869
1905
|
files: [
|
|
@@ -1944,7 +1980,7 @@ var package_default = {
|
|
|
1944
1980
|
// src/version.ts
|
|
1945
1981
|
var CARRIER_VERSION = package_default.version;
|
|
1946
1982
|
|
|
1947
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
1983
|
+
// ../../packages/ocs-client/dist/chunk-PYQ6XDVV.js
|
|
1948
1984
|
var OCS_MAX_USAGE_WINDOW_DAYS = 7;
|
|
1949
1985
|
function clampUsagePeriod(start, end, maxDays = OCS_MAX_USAGE_WINDOW_DAYS) {
|
|
1950
1986
|
const endMs = Date.parse(`${end}T00:00:00Z`);
|
|
@@ -1976,6 +2012,32 @@ function subscriberIdParams(iccid) {
|
|
|
1976
2012
|
function modifySubscriberStatusParams(iccid, newStatus) {
|
|
1977
2013
|
return { subscriber: { iccid }, newStatus };
|
|
1978
2014
|
}
|
|
2015
|
+
function modifySubscriberContactInfoParams(iccid, fields = {}) {
|
|
2016
|
+
const params = { subscriber: { iccid } };
|
|
2017
|
+
if (fields.name !== void 0) params.name = fields.name;
|
|
2018
|
+
if (fields.company !== void 0) params.company = fields.company;
|
|
2019
|
+
if (fields.phone !== void 0) params.phone = fields.phone;
|
|
2020
|
+
if (fields.mail !== void 0) params.mail = fields.mail;
|
|
2021
|
+
return params;
|
|
2022
|
+
}
|
|
2023
|
+
function modifySubscriberContactInfoFromTool(args) {
|
|
2024
|
+
const nameParts = [args.firstName, args.lastName].filter(
|
|
2025
|
+
(part) => typeof part === "string" && part.length > 0
|
|
2026
|
+
);
|
|
2027
|
+
return modifySubscriberContactInfoParams(args.iccid, {
|
|
2028
|
+
...nameParts.length > 0 ? { name: nameParts.join(" ") } : {},
|
|
2029
|
+
...args.company !== void 0 ? { company: args.company } : {},
|
|
2030
|
+
...args.phoneNumber !== void 0 ? { phone: args.phoneNumber } : {},
|
|
2031
|
+
...args.email !== void 0 ? { mail: args.email } : {}
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
var SUBSCRIBER_ID_OBJECT_METHODS = /* @__PURE__ */ new Set([
|
|
2035
|
+
"modifySubscriberStatus",
|
|
2036
|
+
"modifySubscriberContactInfo"
|
|
2037
|
+
]);
|
|
2038
|
+
function nestsSubscriberId(method) {
|
|
2039
|
+
return SUBSCRIBER_ID_OBJECT_METHODS.has(method);
|
|
2040
|
+
}
|
|
1979
2041
|
function nestSubscriberIdParam(params) {
|
|
1980
2042
|
if (!params || typeof params !== "object" || Array.isArray(params)) return params;
|
|
1981
2043
|
const record = params;
|
|
@@ -2748,7 +2810,7 @@ function packageTemplateModifyFromToolJson(changes, method) {
|
|
|
2748
2810
|
return packageTemplateModifyParams(body, method);
|
|
2749
2811
|
}
|
|
2750
2812
|
|
|
2751
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
2813
|
+
// ../../packages/ocs-client/dist/chunk-QGJDLVG3.js
|
|
2752
2814
|
import { z } from "zod";
|
|
2753
2815
|
var OCS_V1_METHODS = /* @__PURE__ */ new Set([
|
|
2754
2816
|
"getResellerInfo",
|
|
@@ -3097,7 +3159,7 @@ async function runWithBudget(method, attempt, budget = ocsBudgetFor(method)) {
|
|
|
3097
3159
|
throw lastTimeout ?? new OcsTimeoutError(method, budget.attemptMs, budget.totalMs, Math.max(attempts, 1));
|
|
3098
3160
|
}
|
|
3099
3161
|
|
|
3100
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
3162
|
+
// ../../packages/ocs-client/dist/chunk-VDRJZSQW.js
|
|
3101
3163
|
var RATE_LIMIT = 10;
|
|
3102
3164
|
var WINDOW_MS = 1e3;
|
|
3103
3165
|
var windows = /* @__PURE__ */ new Map();
|
|
@@ -3523,7 +3585,7 @@ var OcsClient = class {
|
|
|
3523
3585
|
const url = `${this.baseUrl}/v1?token=${tok}`;
|
|
3524
3586
|
assertBareIntParam(method, params);
|
|
3525
3587
|
const wireParams = applyParamRenames(method, params);
|
|
3526
|
-
const shapedParams = method
|
|
3588
|
+
const shapedParams = nestsSubscriberId(method) ? nestSubscriberIdParam(wireParams) : wireParams;
|
|
3527
3589
|
const body = JSON.stringify({ [method]: shapedParams });
|
|
3528
3590
|
const singleAttempt = SINGLE_ATTEMPT_METHODS.has(method);
|
|
3529
3591
|
const send = async () => {
|
|
@@ -5443,6 +5505,7 @@ export {
|
|
|
5443
5505
|
locationParams,
|
|
5444
5506
|
subscriberIdParams,
|
|
5445
5507
|
modifySubscriberStatusParams,
|
|
5508
|
+
modifySubscriberContactInfoFromTool,
|
|
5446
5509
|
recurringPackageParams,
|
|
5447
5510
|
networkEventsOverPeriodParams,
|
|
5448
5511
|
usageOverPeriodParams,
|
|
@@ -5541,4 +5604,4 @@ export {
|
|
|
5541
5604
|
package_default,
|
|
5542
5605
|
CARRIER_VERSION
|
|
5543
5606
|
};
|
|
5544
|
-
//# sourceMappingURL=chunk-
|
|
5607
|
+
//# sourceMappingURL=chunk-H77A3SME.js.map
|