@carrierllc/mcp 0.5.0 → 0.6.0
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-QZBALDKD.js → chunk-Y4JEN7M4.js} +77 -3
- package/dist/chunk-Y4JEN7M4.js.map +1 -0
- package/dist/cli.js +1647 -245
- package/dist/cli.js.map +1 -1
- package/dist/index.js +5 -11
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-QZBALDKD.js.map +0 -1
|
@@ -1792,7 +1792,7 @@ function repairPlanFor(diagnosis) {
|
|
|
1792
1792
|
// package.json
|
|
1793
1793
|
var package_default = {
|
|
1794
1794
|
name: "@carrierllc/mcp",
|
|
1795
|
-
version: "0.
|
|
1795
|
+
version: "0.6.0",
|
|
1796
1796
|
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).",
|
|
1797
1797
|
license: "MIT",
|
|
1798
1798
|
author: "Carrier (Lifecycle Innovations Limited)",
|
|
@@ -1823,7 +1823,8 @@ var package_default = {
|
|
|
1823
1823
|
lint: "eslint src",
|
|
1824
1824
|
prepublishOnly: "pnpm run build",
|
|
1825
1825
|
test: "pnpm run build && node --test test/*.test.js",
|
|
1826
|
-
"check:pack": "node scripts/check-pack-size.mjs"
|
|
1826
|
+
"check:pack": "node scripts/check-pack-size.mjs",
|
|
1827
|
+
"generate:domains": "node scripts/generate-domains.mjs"
|
|
1827
1828
|
},
|
|
1828
1829
|
dependencies: {
|
|
1829
1830
|
"@clack/prompts": "^0.7.0",
|
|
@@ -2274,6 +2275,77 @@ function normalizePackageTemplateChanges(changes) {
|
|
|
2274
2275
|
return out;
|
|
2275
2276
|
}
|
|
2276
2277
|
|
|
2278
|
+
// ../../packages/ocs-client/dist/index.js
|
|
2279
|
+
function buildListSubscriberParams(args) {
|
|
2280
|
+
const params = {};
|
|
2281
|
+
if (args.imsi) params.imsiPrefix = args.imsi;
|
|
2282
|
+
if (args.iccid) params.iccidPrefix = args.iccid;
|
|
2283
|
+
if (args.activationCode) params.activationCode = args.activationCode;
|
|
2284
|
+
if (args.accountId !== void 0) params.accountId = args.accountId;
|
|
2285
|
+
if (args.msisdn) params.msisdnPrefix = args.msisdn;
|
|
2286
|
+
return params;
|
|
2287
|
+
}
|
|
2288
|
+
function extractSubscriberStatus(row) {
|
|
2289
|
+
if (row === null || typeof row !== "object") return null;
|
|
2290
|
+
const raw = row.status;
|
|
2291
|
+
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
2292
|
+
if (Array.isArray(raw)) {
|
|
2293
|
+
for (const entry of raw) {
|
|
2294
|
+
if (entry && typeof entry === "object") {
|
|
2295
|
+
const name = entry.status;
|
|
2296
|
+
if (typeof name === "string" && name.length > 0) return name;
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
return null;
|
|
2301
|
+
}
|
|
2302
|
+
function unwrapSubscriberList(raw) {
|
|
2303
|
+
if (Array.isArray(raw)) return { rows: raw, envelope: null };
|
|
2304
|
+
if (raw !== null && typeof raw === "object") {
|
|
2305
|
+
const obj = raw;
|
|
2306
|
+
if (Array.isArray(obj.subscriberList)) {
|
|
2307
|
+
return { rows: obj.subscriberList, envelope: obj };
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
return { rows: null, envelope: null };
|
|
2311
|
+
}
|
|
2312
|
+
function rewrapSubscriberList(raw, envelope, rows, filtered, matched) {
|
|
2313
|
+
if (rows === null || filtered === null) return raw;
|
|
2314
|
+
const total = matched ?? filtered.length;
|
|
2315
|
+
const dropped = total - filtered.length;
|
|
2316
|
+
if (envelope === null) return filtered;
|
|
2317
|
+
const out = {
|
|
2318
|
+
...envelope,
|
|
2319
|
+
subscriberList: filtered,
|
|
2320
|
+
nbFound: total,
|
|
2321
|
+
hasMore: filtered.length < total
|
|
2322
|
+
};
|
|
2323
|
+
if (dropped > 0) {
|
|
2324
|
+
out.truncated = true;
|
|
2325
|
+
out.note = `${dropped} of ${total} matching subscribers omitted by offset/limit. Narrow with \`status\`, \`accountId\` or \`iccid\`, or page with \`offset\`.`;
|
|
2326
|
+
}
|
|
2327
|
+
return out;
|
|
2328
|
+
}
|
|
2329
|
+
function applySubscriberFilters(raw, args) {
|
|
2330
|
+
const { rows, envelope } = unwrapSubscriberList(raw);
|
|
2331
|
+
let filtered = rows;
|
|
2332
|
+
if (filtered && args.status) {
|
|
2333
|
+
const wanted = String(args.status).trim().toLowerCase();
|
|
2334
|
+
filtered = filtered.filter((row) => {
|
|
2335
|
+
const status = extractSubscriberStatus(row);
|
|
2336
|
+
return status !== null && status.toLowerCase() === wanted;
|
|
2337
|
+
});
|
|
2338
|
+
}
|
|
2339
|
+
const matched = filtered?.length;
|
|
2340
|
+
if (filtered && typeof args.offset === "number" && args.offset > 0) {
|
|
2341
|
+
filtered = filtered.slice(args.offset);
|
|
2342
|
+
}
|
|
2343
|
+
if (filtered && typeof args.limit === "number" && args.limit >= 0) {
|
|
2344
|
+
filtered = filtered.slice(0, args.limit);
|
|
2345
|
+
}
|
|
2346
|
+
return rewrapSubscriberList(raw, envelope, rows, filtered, matched);
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2277
2349
|
// src/lib/storefront-logo.ts
|
|
2278
2350
|
var OPENAI_KEY_NAMES = [
|
|
2279
2351
|
"OPENAI_API_KEY",
|
|
@@ -2411,6 +2483,8 @@ export {
|
|
|
2411
2483
|
esimStatusPerAccountParams,
|
|
2412
2484
|
normalizePackageTemplate,
|
|
2413
2485
|
normalizePackageTemplateChanges,
|
|
2486
|
+
buildListSubscriberParams,
|
|
2487
|
+
applySubscriberFilters,
|
|
2414
2488
|
renderHtml,
|
|
2415
2489
|
renderTui,
|
|
2416
2490
|
fleetScreen,
|
|
@@ -2449,4 +2523,4 @@ export {
|
|
|
2449
2523
|
repairPlanFor,
|
|
2450
2524
|
CARRIER_VERSION
|
|
2451
2525
|
};
|
|
2452
|
-
//# sourceMappingURL=chunk-
|
|
2526
|
+
//# sourceMappingURL=chunk-Y4JEN7M4.js.map
|