@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.
package/dist/cli.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  verifyStorefront,
46
46
  walletScreen,
47
47
  which
48
- } from "./chunk-WCIQ6OYP.js";
48
+ } from "./chunk-2S75JA45.js";
49
49
  import {
50
50
  copyTree,
51
51
  exists,
package/dist/index.js CHANGED
@@ -85,12 +85,13 @@ import {
85
85
  subscriberListEnvelope,
86
86
  subscriberRows,
87
87
  subscriberSimId,
88
+ subscriberStatusVerdict,
88
89
  summarizeNetworkEvents,
89
90
  usageOverPeriodParams,
90
91
  verifyStorefront,
91
92
  withOcsListSummary,
92
93
  withTemplateResellerId
93
- } from "./chunk-WCIQ6OYP.js";
94
+ } from "./chunk-2S75JA45.js";
94
95
  import "./chunk-SHKKVIIA.js";
95
96
 
96
97
  // src/index.ts
@@ -4004,14 +4005,11 @@ function registerIntelligenceTools(server2, ctx) {
4004
4005
  if (!sub.data) return result2("Subscriber not found", true);
4005
4006
  const status = (extractSubscriberStatus(sub.data) ?? "").toUpperCase();
4006
4007
  const balance = Number(sub.data.balance ?? 0);
4007
- if (status === "") {
4008
- findings.push("OCS status could not be read from the subscriber record");
4009
- if (severity === "healthy") severity = "info";
4010
- } else if (status !== "ACTIVE") {
4011
- findings.push(`OCS status is ${status} (not ACTIVE)`);
4012
- actions.push(`Reactivate subscriber via modify_subscriber_status`);
4013
- severity = "critical";
4014
- }
4008
+ const verdict = subscriberStatusVerdict(status);
4009
+ if (verdict.finding) findings.push(verdict.finding);
4010
+ if (verdict.action) actions.push(verdict.action);
4011
+ if (verdict.severity === "critical") severity = "critical";
4012
+ else if (verdict.severity === "info" && severity === "healthy") severity = "info";
4015
4013
  const pkgs = await safeCall2(ctx.env, token2, "listSubscriberPrepaidPackages", { iccid });
4016
4014
  const allPkgs = prepaidPackageRows(pkgs.data);
4017
4015
  const activePkgs = allPkgs.filter((p) => isActivePackage(p));