@carrierllc/mcp 0.13.63 → 0.13.65
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-WCIQ6OYP.js → chunk-NMTO5PCG.js} +54 -25
- package/dist/chunk-NMTO5PCG.js.map +1 -0
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-WCIQ6OYP.js.map +0 -1
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-
|
|
94
|
+
} from "./chunk-NMTO5PCG.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
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
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));
|
|
@@ -6326,10 +6324,11 @@ function registerCarrierApiTools(server2, ctx) {
|
|
|
6326
6324
|
"claim_benefit",
|
|
6327
6325
|
{
|
|
6328
6326
|
title: "Claim a benefit",
|
|
6329
|
-
description: "Claim one benefit from a campaign for an external reference, which places a hold on the sponsor wallet. Calls POST /v1/connectivity/benefit-campaigns/{id}/claims on api.carrier.llc with your own MCP access token. Needs write scope. Safe to repeat with the same external_ref: the same claim comes back (HTTP 200) and nothing is held twice. Results: 201 held, 200 replay of an existing claim, 202 funding outcome unknown (repeat the call), 402 wallet cannot fund the claim, 409 campaign paused, expired or full. Params: campaign_id (cbc_ plus 32 hex), external_ref (1 to 200 characters, your own reference for the person). Do NOT use this to issue the eSIM \u2014 that is issue_benefit_claim, called with the claim id from this result.",
|
|
6327
|
+
description: "Claim one benefit from a campaign for an external reference, which places a hold on the sponsor wallet. Calls POST /v1/connectivity/benefit-campaigns/{id}/claims on api.carrier.llc with your own MCP access token. Needs write scope. Safe to repeat with the same external_ref: the same claim comes back (HTTP 200) and nothing is held twice. Results: 201 held, 200 replay of an existing claim, 202 funding outcome unknown (repeat the call), 402 wallet cannot fund the claim, 409 campaign paused, expired or full. Params: campaign_id (cbc_ plus 32 hex), external_ref (1 to 200 characters, your own reference for the person), entitlement_token (optional, 1 to 200 characters: the right from create_benefit_entitlement for this external_ref, required when the campaign requires a right). Do NOT use this to issue the eSIM \u2014 that is issue_benefit_claim, called with the claim id from this result.",
|
|
6330
6328
|
inputSchema: {
|
|
6331
6329
|
campaign_id: z7.string().regex(CAMPAIGN_ID_PATTERN).describe("Campaign id, cbc_ followed by 32 hex characters."),
|
|
6332
|
-
external_ref: z7.string().min(1).max(200).describe("Your own reference for the claimant, 1 to 200 characters.")
|
|
6330
|
+
external_ref: z7.string().min(1).max(200).describe("Your own reference for the claimant, 1 to 200 characters."),
|
|
6331
|
+
entitlement_token: z7.string().min(1).max(200).optional().describe("The right issued for this external_ref by create_benefit_entitlement, 1 to 200 characters. Required when the campaign requires a right.")
|
|
6333
6332
|
},
|
|
6334
6333
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
|
|
6335
6334
|
},
|
|
@@ -6343,7 +6342,10 @@ function registerCarrierApiTools(server2, ctx) {
|
|
|
6343
6342
|
return carrierApiRequest(ctx, extra, {
|
|
6344
6343
|
method: "POST",
|
|
6345
6344
|
path: `/v1/connectivity/benefit-campaigns/${args.campaign_id}/claims`,
|
|
6346
|
-
body: {
|
|
6345
|
+
body: {
|
|
6346
|
+
external_ref: args.external_ref,
|
|
6347
|
+
...args.entitlement_token !== void 0 ? { entitlement_token: args.entitlement_token } : {}
|
|
6348
|
+
}
|
|
6347
6349
|
});
|
|
6348
6350
|
},
|
|
6349
6351
|
{ skipUserToken: true }
|