@carrierllc/mcp 0.13.65 → 0.13.67
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-NMTO5PCG.js → chunk-JSAROE5Z.js} +6 -7
- package/dist/chunk-JSAROE5Z.js.map +1 -0
- package/dist/cli.js +10 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.js +27 -18
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/dist/chunk-NMTO5PCG.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
verifyStorefront,
|
|
92
92
|
withOcsListSummary,
|
|
93
93
|
withTemplateResellerId
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-JSAROE5Z.js";
|
|
95
95
|
import "./chunk-SHKKVIIA.js";
|
|
96
96
|
|
|
97
97
|
// src/index.ts
|
|
@@ -1291,7 +1291,9 @@ var TOOL_SCOPES = {
|
|
|
1291
1291
|
modify_template_core: "admin",
|
|
1292
1292
|
modify_template_recurring: "admin",
|
|
1293
1293
|
modify_template_throttling: "admin",
|
|
1294
|
-
|
|
1294
|
+
// One message per call to one of the caller's own subscribers; tenant
|
|
1295
|
+
// isolation is enforced by the OCS preflight, so write scope is enough.
|
|
1296
|
+
send_sms: "write"
|
|
1295
1297
|
};
|
|
1296
1298
|
var DESTRUCTIVE_TOOLS = /* @__PURE__ */ new Set([
|
|
1297
1299
|
"modify_account_balance",
|
|
@@ -1925,7 +1927,7 @@ function registerAllTools(server2, ctx) {
|
|
|
1925
1927
|
"modify_subscriber_steering_list",
|
|
1926
1928
|
{
|
|
1927
1929
|
title: "Modify Subscriber Steering List",
|
|
1928
|
-
description: "Use this to assign or remove a network steering list on a specific subscriber, controlling which mobile operators the subscriber's eSIM prefers to connect to. Steering lists are managed separately \u2014 call `list_steering_lists` to get valid IDs. This operates at the SUBSCRIBER level only. After assigning, call `push_steering_to_subscriber` to push the change to the physical device immediately; without that call the device continues using the old operator preference list until next re-registration. Params: `iccid` (subscriber identifier), `steeringListId` (integer from `list_steering_lists`, or null/0 to remove the current steering list). Returns: updated subscriber record confirming the new steeringListId. Do NOT use this for account-level steering (no MCP tool yet \u2014 gap G-03, awaiting
|
|
1930
|
+
description: "Use this to assign or remove a network steering list on a specific subscriber, controlling which mobile operators the subscriber's eSIM prefers to connect to. Steering lists are managed separately \u2014 call `list_steering_lists` to get valid IDs. This operates at the SUBSCRIBER level only. After assigning, call `push_steering_to_subscriber` to push the change to the physical device immediately; without that call the device continues using the old operator preference list until next re-registration. Params: `iccid` (subscriber identifier), `steeringListId` (integer from `list_steering_lists`, or null/0 to remove the current steering list). Returns: updated subscriber record confirming the new steeringListId. Do NOT use this for account-level steering (no MCP tool yet \u2014 gap G-03, awaiting network provider input).",
|
|
1929
1931
|
inputSchema: {
|
|
1930
1932
|
iccid: z.string().describe("The subscriber ICCID"),
|
|
1931
1933
|
steeringListId: z.number().describe("The steering list ID to assign"),
|
|
@@ -2581,7 +2583,7 @@ function registerAllTools(server2, ctx) {
|
|
|
2581
2583
|
"create_location_zone",
|
|
2582
2584
|
{
|
|
2583
2585
|
title: "Create Location Zone",
|
|
2584
|
-
description: "Use this to create a new location zone \u2014 a named collection of countries and operators that defines where a package can be used. Location zones are required when creating package templates. OCS accepts locationZoneName, tadigList (TADIG codes), and networkProfileId. Params: `zone` (JSON string). `name` is an alias of locationZoneName and `tadigs` is an alias of tadigList. ISO country codes and MCC-MNC operator ids are not TADIG codes and are refused. Use `list_network_profiles` for a networkProfileId. Returns: created zone record with the new `locationZoneId`. Do NOT use this to modify an existing zone \u2014 no edit tool exists yet (gap G-19, pending
|
|
2586
|
+
description: "Use this to create a new location zone \u2014 a named collection of countries and operators that defines where a package can be used. Location zones are required when creating package templates. OCS accepts locationZoneName, tadigList (TADIG codes), and networkProfileId. Params: `zone` (JSON string). `name` is an alias of locationZoneName and `tadigs` is an alias of tadigList. ISO country codes and MCC-MNC operator ids are not TADIG codes and are refused. Use `list_network_profiles` for a networkProfileId. Returns: created zone record with the new `locationZoneId`. Do NOT use this to modify an existing zone \u2014 no edit tool exists yet (gap G-19, pending network provider). After creation, verify with `list_detailed_location_zones`.",
|
|
2585
2587
|
inputSchema: {
|
|
2586
2588
|
zone: z.string().describe("Zone configuration as JSON string"),
|
|
2587
2589
|
...DRY_RUN_FIELD
|
|
@@ -2709,7 +2711,7 @@ function registerAllTools(server2, ctx) {
|
|
|
2709
2711
|
"send_sms",
|
|
2710
2712
|
{
|
|
2711
2713
|
title: "Send MT SMS",
|
|
2712
|
-
description: "Use this to send a mobile-terminated (MT) SMS to a subscriber. Useful for service notifications, package expiry alerts, and support messages sent programmatically from the platform. Internally resolves ICCID \u2192 IMSI via a getSingleSubscriber lookup before forwarding to OCS. Params: `iccid` (subscriber identifier), `msisdn` (E.164 phone number of the subscriber), `message` (SMS text content, max 160 chars for single SMS in GSM-7 encoding), `sender` (optional sender ID or phone number displayed on the device). \u26A0 Messages containing non-GSM-7 characters (any emoji, \xE9, \xF1, Chinese, Arabic, Hebrew, etc.) trigger UCS-2 encoding which limits a single SMS to 70 characters instead of 160. Plan for multi-part splits accordingly. Returns: OCS delivery confirmation. Do NOT use this for bulk SMS campaigns \u2014 this sends one message per call and is rate-limited. Requires
|
|
2714
|
+
description: "Use this to send a mobile-terminated (MT) SMS to a subscriber. Useful for service notifications, package expiry alerts, and support messages sent programmatically from the platform. Internally resolves ICCID \u2192 IMSI via a getSingleSubscriber lookup before forwarding to OCS. Params: `iccid` (subscriber identifier), `msisdn` (E.164 phone number of the subscriber), `message` (SMS text content, max 160 chars for single SMS in GSM-7 encoding), `sender` (optional sender ID or phone number displayed on the device). \u26A0 Messages containing non-GSM-7 characters (any emoji, \xE9, \xF1, Chinese, Arabic, Hebrew, etc.) trigger UCS-2 encoding which limits a single SMS to 70 characters instead of 160. Plan for multi-part splits accordingly. Returns: OCS delivery confirmation. Do NOT use this for bulk SMS campaigns \u2014 this sends one message per call and is rate-limited. Requires write scope.",
|
|
2713
2715
|
inputSchema: {
|
|
2714
2716
|
iccid: z.string().describe("The target subscriber ICCID"),
|
|
2715
2717
|
msisdn: z.string().describe("The target MSISDN"),
|
|
@@ -9730,7 +9732,7 @@ var PROJECTS_TOOLS = [
|
|
|
9730
9732
|
// -------------------------------------------------------------------------
|
|
9731
9733
|
{
|
|
9732
9734
|
name: "credential_status",
|
|
9733
|
-
description: "Check the health and status of your Carrier credentials \u2014 API token validity, encryption status, last rotation date, and expiry warnings. Similar to `stripe projects env --pull` status check.",
|
|
9735
|
+
description: "Check the health and status of your Carrier credentials \u2014 API token validity, encryption status, last rotation date, and expiry warnings. Similar to `stripe projects env --pull` status check. Returns credentials.provider_token; esimvault_token is a deprecated alias.",
|
|
9734
9736
|
scope: "read",
|
|
9735
9737
|
inputSchema: {
|
|
9736
9738
|
type: "object",
|
|
@@ -9741,9 +9743,9 @@ var PROJECTS_TOOLS = [
|
|
|
9741
9743
|
const sub = props2.sub;
|
|
9742
9744
|
const orgId = props2.org_id;
|
|
9743
9745
|
if (!env.CARRIER_USERS) {
|
|
9744
|
-
|
|
9746
|
+
const stdio = {
|
|
9745
9747
|
credentials: {
|
|
9746
|
-
|
|
9748
|
+
provider_token: {
|
|
9747
9749
|
present: true,
|
|
9748
9750
|
encrypted: false,
|
|
9749
9751
|
last_updated: null,
|
|
@@ -9758,8 +9760,10 @@ var PROJECTS_TOOLS = [
|
|
|
9758
9760
|
reseller_id: props2.reseller_id,
|
|
9759
9761
|
reseller_name: props2.reseller_name
|
|
9760
9762
|
},
|
|
9761
|
-
recommendations: ["stdio mode \u2014 token managed via
|
|
9763
|
+
recommendations: ["stdio mode \u2014 token managed via CARRIER_OCS_API_TOKEN env var, no rotation tracking"]
|
|
9762
9764
|
};
|
|
9765
|
+
stdio.credentials.esimvault_token = stdio.credentials.provider_token;
|
|
9766
|
+
return stdio;
|
|
9763
9767
|
}
|
|
9764
9768
|
const primaryKey = orgId ? `org:${orgId}` : `user:clerk_${sub}`;
|
|
9765
9769
|
const legacyKey = orgId ? null : `user:${sub}`;
|
|
@@ -9776,9 +9780,9 @@ var PROJECTS_TOOLS = [
|
|
|
9776
9780
|
const updated = new Date(updatedAt);
|
|
9777
9781
|
tokenAgeDays = Math.floor((Date.now() - updated.getTime()) / (1e3 * 60 * 60 * 24));
|
|
9778
9782
|
}
|
|
9779
|
-
|
|
9783
|
+
const result3 = {
|
|
9780
9784
|
credentials: {
|
|
9781
|
-
|
|
9785
|
+
provider_token: {
|
|
9782
9786
|
present: hasToken,
|
|
9783
9787
|
encrypted: hasToken,
|
|
9784
9788
|
// All tokens are AES-256-GCM encrypted
|
|
@@ -9798,6 +9802,8 @@ var PROJECTS_TOOLS = [
|
|
|
9798
9802
|
},
|
|
9799
9803
|
recommendations: generateCredentialRecommendations(hasToken, tokenAgeDays)
|
|
9800
9804
|
};
|
|
9805
|
+
result3.credentials.esimvault_token = result3.credentials.provider_token;
|
|
9806
|
+
return result3;
|
|
9801
9807
|
}
|
|
9802
9808
|
},
|
|
9803
9809
|
// -------------------------------------------------------------------------
|
|
@@ -9805,14 +9811,14 @@ var PROJECTS_TOOLS = [
|
|
|
9805
9811
|
// -------------------------------------------------------------------------
|
|
9806
9812
|
{
|
|
9807
9813
|
name: "rotate_credentials",
|
|
9808
|
-
description: "Initiate rotation of your
|
|
9814
|
+
description: "Initiate rotation of your network API credentials. Generates a new encrypted token and invalidates the old one. Requires write scope. Similar to `stripe projects rotate <service>`.",
|
|
9809
9815
|
scope: "write",
|
|
9810
9816
|
inputSchema: {
|
|
9811
9817
|
type: "object",
|
|
9812
9818
|
properties: {
|
|
9813
9819
|
new_token: {
|
|
9814
9820
|
type: "string",
|
|
9815
|
-
description: "New
|
|
9821
|
+
description: "New network API token to encrypt and store. Get from the network dashboard."
|
|
9816
9822
|
},
|
|
9817
9823
|
confirm: {
|
|
9818
9824
|
type: "boolean",
|
|
@@ -10015,8 +10021,8 @@ var PROJECTS_TOOLS = [
|
|
|
10015
10021
|
auth_method: props2.auth_method ?? "oauth"
|
|
10016
10022
|
},
|
|
10017
10023
|
connected_services: {
|
|
10018
|
-
|
|
10019
|
-
//
|
|
10024
|
+
provider: true,
|
|
10025
|
+
// The BYOT provider in use; eSIMVault is the first one
|
|
10020
10026
|
stripe_billing: hasStripe,
|
|
10021
10027
|
webhooks: hasWebhook,
|
|
10022
10028
|
carrier_console: true,
|
|
@@ -10029,7 +10035,7 @@ var PROJECTS_TOOLS = [
|
|
|
10029
10035
|
billing_portal: "https://accounts.carrier.llc/user/billing"
|
|
10030
10036
|
},
|
|
10031
10037
|
configuration: {
|
|
10032
|
-
|
|
10038
|
+
provider_base_url: env.CARRIER_OCS_BASE_URL,
|
|
10033
10039
|
admin_enabled: props2.scope.includes("admin"),
|
|
10034
10040
|
intelligence_enabled: props2.tier !== "free"
|
|
10035
10041
|
}
|
|
@@ -10041,7 +10047,7 @@ function generateCredentialRecommendations(hasToken, tokenAgeDays) {
|
|
|
10041
10047
|
const recommendations = [];
|
|
10042
10048
|
if (!hasToken) {
|
|
10043
10049
|
recommendations.push(
|
|
10044
|
-
"No
|
|
10050
|
+
"No network token configured. Complete setup at https://app.carrier.llc/onboarding"
|
|
10045
10051
|
);
|
|
10046
10052
|
}
|
|
10047
10053
|
if (tokenAgeDays !== null && tokenAgeDays > 90) {
|
|
@@ -10263,7 +10269,10 @@ var HARD_BLOCK_TOOLS = /* @__PURE__ */ new Set([
|
|
|
10263
10269
|
"modify_account_balance",
|
|
10264
10270
|
"modify_subscriber_status",
|
|
10265
10271
|
"change_sim_status",
|
|
10266
|
-
"reset_subscriber_gz_counter"
|
|
10272
|
+
"reset_subscriber_gz_counter",
|
|
10273
|
+
// A real message to a real handset: cannot be recalled, so a natural-language
|
|
10274
|
+
// intent must round-trip a confirm_token like the other irreversible tools.
|
|
10275
|
+
"send_sms"
|
|
10267
10276
|
]);
|
|
10268
10277
|
var CONFIRM_TOKEN_TTL_SECONDS = 120;
|
|
10269
10278
|
var CONFIRM_TOKEN_PREFIX = "carrier_ask_confirm:";
|