@carrierllc/mcp 0.13.63 → 0.13.64
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.
|
@@ -1913,7 +1913,7 @@ function storefrontScreen(input) {
|
|
|
1913
1913
|
// package.json
|
|
1914
1914
|
var package_default = {
|
|
1915
1915
|
name: "@carrierllc/mcp",
|
|
1916
|
-
version: "0.13.
|
|
1916
|
+
version: "0.13.64",
|
|
1917
1917
|
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).",
|
|
1918
1918
|
license: "MIT",
|
|
1919
1919
|
author: "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -3885,7 +3885,7 @@ var OcsClient = class {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
};
|
|
3887
3887
|
|
|
3888
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
3888
|
+
// ../../packages/ocs-client/dist/chunk-QYXJUFOW.js
|
|
3889
3889
|
function buildListSubscriberParams(args) {
|
|
3890
3890
|
const params = {};
|
|
3891
3891
|
if (args.imsi) params.imsiPrefix = args.imsi;
|
|
@@ -3895,23 +3895,48 @@ function buildListSubscriberParams(args) {
|
|
|
3895
3895
|
if (args.msisdn) params.msisdnPrefix = args.msisdn;
|
|
3896
3896
|
return params;
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3899
|
-
if (
|
|
3900
|
-
const
|
|
3898
|
+
function periodFrom(entry) {
|
|
3899
|
+
if (!entry || typeof entry !== "object") return null;
|
|
3900
|
+
const rec = entry;
|
|
3901
|
+
const name = rec.status;
|
|
3902
|
+
if (typeof name !== "string" || name.length === 0) return null;
|
|
3903
|
+
const endDate = rec.endDate;
|
|
3904
|
+
const open = endDate === void 0 || endDate === null || endDate === "";
|
|
3905
|
+
return { name, start: typeof rec.startDate === "string" ? rec.startDate : "", open };
|
|
3906
|
+
}
|
|
3907
|
+
function currentSubscriberStatus(raw) {
|
|
3901
3908
|
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
3902
|
-
if (!Array.isArray(raw)) return
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3909
|
+
if (!Array.isArray(raw)) return void 0;
|
|
3910
|
+
const periods = raw.map(periodFrom).filter((period) => period !== null);
|
|
3911
|
+
const open = periods.find((period) => period.open);
|
|
3912
|
+
if (open) return open.name;
|
|
3913
|
+
const latest = [...periods].sort((a, b) => b.start.localeCompare(a.start))[0];
|
|
3914
|
+
return latest?.name;
|
|
3915
|
+
}
|
|
3916
|
+
function isActiveStatus(status) {
|
|
3917
|
+
if (typeof status !== "string") return false;
|
|
3918
|
+
const name = status.trim().toLowerCase();
|
|
3919
|
+
return name === "active" || name === "1";
|
|
3920
|
+
}
|
|
3921
|
+
function subscriberStatusVerdict(status) {
|
|
3922
|
+
if (status === "") {
|
|
3923
|
+
return { severity: "info", finding: "OCS status could not be read from the subscriber record" };
|
|
3924
|
+
}
|
|
3925
|
+
if (!isActiveStatus(status)) {
|
|
3926
|
+
return {
|
|
3927
|
+
severity: "critical",
|
|
3928
|
+
finding: `OCS status is ${status} (not ACTIVE)`,
|
|
3929
|
+
action: "Reactivate subscriber via modify_subscriber_status"
|
|
3930
|
+
};
|
|
3913
3931
|
}
|
|
3914
|
-
return
|
|
3932
|
+
return { severity: "healthy" };
|
|
3933
|
+
}
|
|
3934
|
+
function extractSubscriberStatus(row) {
|
|
3935
|
+
if (row === null || typeof row !== "object") return null;
|
|
3936
|
+
const rec = row;
|
|
3937
|
+
const current = rec.currentStatus;
|
|
3938
|
+
if (typeof current === "string" && current.length > 0) return current;
|
|
3939
|
+
return currentSubscriberStatus(rec.status) ?? null;
|
|
3915
3940
|
}
|
|
3916
3941
|
function subscriberListEnvelope(raw) {
|
|
3917
3942
|
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
@@ -4817,7 +4842,7 @@ function formatBytes(bytes) {
|
|
|
4817
4842
|
return `${(bytes / Math.pow(1024, i)).toFixed(2)} ${units[i]}`;
|
|
4818
4843
|
}
|
|
4819
4844
|
function isActiveSubscriber(row) {
|
|
4820
|
-
return (extractSubscriberStatus(row)
|
|
4845
|
+
return isActiveStatus(extractSubscriberStatus(row));
|
|
4821
4846
|
}
|
|
4822
4847
|
function filterActiveSubscribers(rows) {
|
|
4823
4848
|
return rows.filter((row) => isActiveSubscriber(row));
|
|
@@ -6038,6 +6063,7 @@ export {
|
|
|
6038
6063
|
OcsApiError,
|
|
6039
6064
|
OcsClient,
|
|
6040
6065
|
buildListSubscriberParams,
|
|
6066
|
+
subscriberStatusVerdict,
|
|
6041
6067
|
extractSubscriberStatus,
|
|
6042
6068
|
subscriberListEnvelope,
|
|
6043
6069
|
applySubscriberFilters,
|
|
@@ -6120,4 +6146,4 @@ export {
|
|
|
6120
6146
|
package_default,
|
|
6121
6147
|
CARRIER_VERSION
|
|
6122
6148
|
};
|
|
6123
|
-
//# sourceMappingURL=chunk-
|
|
6149
|
+
//# sourceMappingURL=chunk-2S75JA45.js.map
|