@carrierllc/mcp 0.13.7 → 0.13.10

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.
@@ -523,6 +523,8 @@ function renderEnv(brand) {
523
523
  `# hosted page and back. Both take money \u2014 the embedded one loses fewer`,
524
524
  `# people on the way.`,
525
525
  `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=`,
526
+ `# Optional. Scopes the catalog to one hosted shop. Empty keeps the unscoped template list.`,
527
+ `NEXT_PUBLIC_STOREFRONT_SLUG=`,
526
528
  `# Optional. Sends the eSIM QR code by email once an order is ready.`,
527
529
  `# \`carrier site email\` authenticates you at Resend in the browser and`,
528
530
  `# fills this in. Without it the storefront still sells and activates; the`,
@@ -548,6 +550,9 @@ var TEMPLATE_ENV_KEYS = {
548
550
  // Optional. Present: checkout is embedded in the storefront's own page.
549
551
  // Absent: checkout redirects to Stripe's hosted page, which still works.
550
552
  NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: "public",
553
+ // Optional. Present: the scaffold catalog is scoped to one hosted shop.
554
+ // Absent: the catalog client calls the unscoped template list.
555
+ NEXT_PUBLIC_STOREFRONT_SLUG: "public",
551
556
  CARRIER_API_KEY: "secret",
552
557
  CLERK_SECRET_KEY: "secret",
553
558
  STRIPE_SECRET_KEY: "secret",
@@ -1815,7 +1820,7 @@ function storefrontScreen(input) {
1815
1820
  // package.json
1816
1821
  var package_default = {
1817
1822
  name: "@carrierllc/mcp",
1818
- version: "0.13.7",
1823
+ version: "0.13.10",
1819
1824
  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).",
1820
1825
  license: "MIT",
1821
1826
  author: "Carrier (Lifecycle Innovations Limited)",
@@ -1866,6 +1871,7 @@ var package_default = {
1866
1871
  eslint: "^10.9.1",
1867
1872
  tsup: "^8.5.1",
1868
1873
  typescript: "^5.9.3",
1874
+ "@carrierllc/sdk": "workspace:*",
1869
1875
  "@carrier/ai": "workspace:*",
1870
1876
  "@carrier/ocs-client": "workspace:*",
1871
1877
  "@carrier/ocs-spec": "workspace:*",
@@ -1895,7 +1901,7 @@ var package_default = {
1895
1901
  // src/version.ts
1896
1902
  var CARRIER_VERSION = package_default.version;
1897
1903
 
1898
- // ../../packages/ocs-client/dist/chunk-LLQXWRFM.js
1904
+ // ../../packages/ocs-client/dist/chunk-66I2ZRZF.js
1899
1905
  var OCS_MAX_USAGE_WINDOW_DAYS = 7;
1900
1906
  function clampUsagePeriod(start, end, maxDays = OCS_MAX_USAGE_WINDOW_DAYS) {
1901
1907
  const endMs = Date.parse(`${end}T00:00:00Z`);
@@ -1924,6 +1930,35 @@ function locationParams(iccid) {
1924
1930
  function subscriberIdParams(iccid) {
1925
1931
  return { iccid };
1926
1932
  }
1933
+ function modifySubscriberStatusParams(iccid, newStatus) {
1934
+ return { subscriber: { iccid }, newStatus };
1935
+ }
1936
+ function nestSubscriberIdParam(params) {
1937
+ if (!params || typeof params !== "object" || Array.isArray(params)) return params;
1938
+ const record = params;
1939
+ if (typeof record["subscriber"] !== "string") return params;
1940
+ return { ...record, subscriber: { iccid: record["subscriber"] } };
1941
+ }
1942
+ function packageStatusConfirmation(params) {
1943
+ const confirmation = { updated: true };
1944
+ if (!params || typeof params !== "object" || Array.isArray(params)) return confirmation;
1945
+ const record = params;
1946
+ const id = record["subsPrepaidPackageId"];
1947
+ if (typeof id === "number" && Number.isFinite(id)) confirmation.subsPrepaidPackageId = id;
1948
+ if (typeof record["active"] === "boolean") {
1949
+ confirmation.active = record["active"];
1950
+ confirmation.status = record["active"] ? "ACTIVE" : "INACTIVE";
1951
+ }
1952
+ return confirmation;
1953
+ }
1954
+ function normaliseAbsentOcsPayload(method, payload, params) {
1955
+ if (payload !== null && payload !== void 0) return payload;
1956
+ if (method === "listSteeringList") return [];
1957
+ if (method === "modifySubscriberPrepaidPackageStatus") {
1958
+ return packageStatusConfirmation(params);
1959
+ }
1960
+ return payload;
1961
+ }
1927
1962
  function recurringPackageParams(iccid, packageTemplateId, options = {}) {
1928
1963
  if (options.activationAtFirstUse !== void 0 && options.startTimeUTC !== void 0) {
1929
1964
  throw new Error("activationAtFirstUse cannot be combined with startTimeUTC");
@@ -2644,7 +2679,7 @@ function packageTemplateModifyFromToolJson(changes, method) {
2644
2679
  return packageTemplateModifyParams(body, method);
2645
2680
  }
2646
2681
 
2647
- // ../../packages/ocs-client/dist/chunk-SFPWPYGO.js
2682
+ // ../../packages/ocs-client/dist/chunk-L4DSDLRS.js
2648
2683
  import { z } from "zod";
2649
2684
  var OCS_V1_METHODS = /* @__PURE__ */ new Set([
2650
2685
  "getResellerInfo",
@@ -2989,7 +3024,7 @@ async function runWithBudget(method, attempt, budget = ocsBudgetFor(method)) {
2989
3024
  throw lastTimeout ?? new OcsTimeoutError(method, budget.attemptMs, budget.totalMs, Math.max(attempts, 1));
2990
3025
  }
2991
3026
 
2992
- // ../../packages/ocs-client/dist/chunk-WYFBYNKX.js
3027
+ // ../../packages/ocs-client/dist/chunk-XP62UVUD.js
2993
3028
  var RATE_LIMIT = 10;
2994
3029
  var WINDOW_MS = 1e3;
2995
3030
  var windows = /* @__PURE__ */ new Map();
@@ -3411,7 +3446,8 @@ var OcsClient = class {
3411
3446
  const url = `${this.baseUrl}/v1?token=${tok}`;
3412
3447
  assertBareIntParam(method, params);
3413
3448
  const wireParams = applyParamRenames(method, params);
3414
- const body = JSON.stringify({ [method]: wireParams });
3449
+ const shapedParams = method === "modifySubscriberStatus" ? nestSubscriberIdParam(wireParams) : wireParams;
3450
+ const body = JSON.stringify({ [method]: shapedParams });
3415
3451
  return retryWithBackoff(async () => {
3416
3452
  await acquireToken(tok);
3417
3453
  await acquireEndpointSlot(tok, method, this._priority);
@@ -3475,6 +3511,7 @@ var OcsClient = class {
3475
3511
  } else {
3476
3512
  payload = null;
3477
3513
  }
3514
+ payload = normaliseAbsentOcsPayload(method, payload, shapedParams);
3478
3515
  if (this._validateResponses) {
3479
3516
  const schema = RESPONSE_SCHEMAS[method];
3480
3517
  if (schema) {
@@ -4670,6 +4707,7 @@ export {
4670
4707
  lastNDaysPeriod,
4671
4708
  locationParams,
4672
4709
  subscriberIdParams,
4710
+ modifySubscriberStatusParams,
4673
4711
  recurringPackageParams,
4674
4712
  networkEventsOverPeriodParams,
4675
4713
  usageOverPeriodParams,
@@ -4754,4 +4792,4 @@ export {
4754
4792
  storefrontScreen,
4755
4793
  CARRIER_VERSION
4756
4794
  };
4757
- //# sourceMappingURL=chunk-U2UVUM3D.js.map
4795
+ //# sourceMappingURL=chunk-AUOGFI2I.js.map