@carrierllc/mcp 0.13.11 → 0.13.12
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-ZLPXWOYO.js → chunk-IQDAU7WA.js} +43 -15
- package/dist/chunk-IQDAU7WA.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZLPXWOYO.js.map +0 -1
|
@@ -1820,7 +1820,7 @@ function storefrontScreen(input) {
|
|
|
1820
1820
|
// package.json
|
|
1821
1821
|
var package_default = {
|
|
1822
1822
|
name: "@carrierllc/mcp",
|
|
1823
|
-
version: "0.13.
|
|
1823
|
+
version: "0.13.12",
|
|
1824
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).",
|
|
1825
1825
|
license: "MIT",
|
|
1826
1826
|
author: "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -1901,7 +1901,7 @@ var package_default = {
|
|
|
1901
1901
|
// src/version.ts
|
|
1902
1902
|
var CARRIER_VERSION = package_default.version;
|
|
1903
1903
|
|
|
1904
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
1904
|
+
// ../../packages/ocs-client/dist/chunk-BOZG5AMY.js
|
|
1905
1905
|
var OCS_MAX_USAGE_WINDOW_DAYS = 7;
|
|
1906
1906
|
function clampUsagePeriod(start, end, maxDays = OCS_MAX_USAGE_WINDOW_DAYS) {
|
|
1907
1907
|
const endMs = Date.parse(`${end}T00:00:00Z`);
|
|
@@ -2143,27 +2143,48 @@ function addEsimStatusRow(acc, rec) {
|
|
|
2143
2143
|
}
|
|
2144
2144
|
function extractEsimStatusCounts(json) {
|
|
2145
2145
|
const acc = emptyEsimStatusCounts();
|
|
2146
|
+
for (const row of extractEsimStatusByAccount(json)) {
|
|
2147
|
+
acc.active += row.active;
|
|
2148
|
+
acc.suspended += row.suspended;
|
|
2149
|
+
acc.inventory += row.inventory;
|
|
2150
|
+
acc.other += row.other;
|
|
2151
|
+
}
|
|
2152
|
+
acc.total = acc.active + acc.suspended + acc.inventory + acc.other;
|
|
2153
|
+
return acc;
|
|
2154
|
+
}
|
|
2155
|
+
function accountRows(json) {
|
|
2146
2156
|
const root = json ?? {};
|
|
2147
2157
|
const payload = root.data ?? root.esimStatusPerAccount ?? root;
|
|
2148
|
-
|
|
2149
|
-
|
|
2158
|
+
if (Array.isArray(payload)) return payload;
|
|
2159
|
+
return Array.isArray(payload.account) ? payload.account : [];
|
|
2160
|
+
}
|
|
2161
|
+
function extractEsimStatusByAccount(json) {
|
|
2162
|
+
const out = [];
|
|
2163
|
+
for (const account of accountRows(json)) {
|
|
2150
2164
|
const rec = account ?? {};
|
|
2165
|
+
const row = emptyEsimStatusCounts();
|
|
2166
|
+
const id = Number(rec.id ?? rec.accountId);
|
|
2167
|
+
if (rec.id !== void 0 || rec.accountId !== void 0) {
|
|
2168
|
+
if (Number.isFinite(id)) row.id = id;
|
|
2169
|
+
}
|
|
2170
|
+
if (typeof rec.name === "string") row.name = rec.name;
|
|
2151
2171
|
const sponsors = Array.isArray(rec.sponsor) ? rec.sponsor : [];
|
|
2152
2172
|
if (sponsors.length > 0) {
|
|
2153
2173
|
for (const sp of sponsors) {
|
|
2154
2174
|
const esim = sp?.esim ?? {};
|
|
2155
2175
|
const statuses = Array.isArray(esim.status) ? esim.status : [];
|
|
2156
|
-
for (const
|
|
2176
|
+
for (const status of statuses) addEsimStatusRow(row, status ?? {});
|
|
2157
2177
|
}
|
|
2158
|
-
|
|
2178
|
+
} else {
|
|
2179
|
+
row.active += Number(rec.active ?? 0);
|
|
2180
|
+
row.suspended += Number(rec.suspended ?? 0);
|
|
2181
|
+
row.inventory += Number(rec.inventory ?? rec.notActivated ?? rec.free ?? 0);
|
|
2182
|
+
row.other += Number(rec.other ?? rec.terminated ?? 0);
|
|
2159
2183
|
}
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
acc.inventory += Number(rec.inventory ?? rec.notActivated ?? rec.free ?? 0);
|
|
2163
|
-
acc.other += Number(rec.other ?? rec.terminated ?? 0);
|
|
2184
|
+
row.total = row.active + row.suspended + row.inventory + row.other;
|
|
2185
|
+
out.push(row);
|
|
2164
2186
|
}
|
|
2165
|
-
|
|
2166
|
-
return acc;
|
|
2187
|
+
return out;
|
|
2167
2188
|
}
|
|
2168
2189
|
function esimStatusPerAccountParams(args) {
|
|
2169
2190
|
if (typeof args === "number") return { accountId: args };
|
|
@@ -2532,6 +2553,11 @@ function packageTemplateCreateParams(input) {
|
|
|
2532
2553
|
}
|
|
2533
2554
|
return out;
|
|
2534
2555
|
}
|
|
2556
|
+
async function withTemplateResellerId(params, resolveId) {
|
|
2557
|
+
const existing = params["resellerid"];
|
|
2558
|
+
if (typeof existing === "number" && Number.isFinite(existing)) return params;
|
|
2559
|
+
return { ...params, resellerid: await resolveId() };
|
|
2560
|
+
}
|
|
2535
2561
|
function packageTemplateCreateFromToolJson(template) {
|
|
2536
2562
|
let parsed;
|
|
2537
2563
|
try {
|
|
@@ -2679,7 +2705,7 @@ function packageTemplateModifyFromToolJson(changes, method) {
|
|
|
2679
2705
|
return packageTemplateModifyParams(body, method);
|
|
2680
2706
|
}
|
|
2681
2707
|
|
|
2682
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
2708
|
+
// ../../packages/ocs-client/dist/chunk-N2EPJJVN.js
|
|
2683
2709
|
import { z } from "zod";
|
|
2684
2710
|
var OCS_V1_METHODS = /* @__PURE__ */ new Set([
|
|
2685
2711
|
"getResellerInfo",
|
|
@@ -3024,7 +3050,7 @@ async function runWithBudget(method, attempt, budget = ocsBudgetFor(method)) {
|
|
|
3024
3050
|
throw lastTimeout ?? new OcsTimeoutError(method, budget.attemptMs, budget.totalMs, Math.max(attempts, 1));
|
|
3025
3051
|
}
|
|
3026
3052
|
|
|
3027
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
3053
|
+
// ../../packages/ocs-client/dist/chunk-KZB25Q7W.js
|
|
3028
3054
|
var RATE_LIMIT = 10;
|
|
3029
3055
|
var WINDOW_MS = 1e3;
|
|
3030
3056
|
var windows = /* @__PURE__ */ new Map();
|
|
@@ -4743,11 +4769,13 @@ export {
|
|
|
4743
4769
|
packageActivePeriodParams,
|
|
4744
4770
|
recurringIdForPackage,
|
|
4745
4771
|
extractEsimStatusCounts,
|
|
4772
|
+
extractEsimStatusByAccount,
|
|
4746
4773
|
esimStatusPerAccountParams,
|
|
4747
4774
|
ocsHlrBitrate,
|
|
4748
4775
|
ocsHlrBitrateFromBps,
|
|
4749
4776
|
ocsSimStatus,
|
|
4750
4777
|
locationZoneCreateParams,
|
|
4778
|
+
withTemplateResellerId,
|
|
4751
4779
|
packageTemplateCreateFromToolJson,
|
|
4752
4780
|
packageTemplateModifyFromToolJson,
|
|
4753
4781
|
getLimitForEndpoint,
|
|
@@ -4818,4 +4846,4 @@ export {
|
|
|
4818
4846
|
storefrontScreen,
|
|
4819
4847
|
CARRIER_VERSION
|
|
4820
4848
|
};
|
|
4821
|
-
//# sourceMappingURL=chunk-
|
|
4849
|
+
//# sourceMappingURL=chunk-IQDAU7WA.js.map
|