@carrierllc/mcp 0.13.64 → 0.13.66

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/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  verifyStorefront,
92
92
  withOcsListSummary,
93
93
  withTemplateResellerId
94
- } from "./chunk-2S75JA45.js";
94
+ } from "./chunk-WNEXPJJY.js";
95
95
  import "./chunk-SHKKVIIA.js";
96
96
 
97
97
  // src/index.ts
@@ -1925,7 +1925,7 @@ function registerAllTools(server2, ctx) {
1925
1925
  "modify_subscriber_steering_list",
1926
1926
  {
1927
1927
  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 eSIMVault input).",
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 network provider input).",
1929
1929
  inputSchema: {
1930
1930
  iccid: z.string().describe("The subscriber ICCID"),
1931
1931
  steeringListId: z.number().describe("The steering list ID to assign"),
@@ -2581,7 +2581,7 @@ function registerAllTools(server2, ctx) {
2581
2581
  "create_location_zone",
2582
2582
  {
2583
2583
  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 eSIMVault). After creation, verify with `list_detailed_location_zones`.",
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 network provider). After creation, verify with `list_detailed_location_zones`.",
2585
2585
  inputSchema: {
2586
2586
  zone: z.string().describe("Zone configuration as JSON string"),
2587
2587
  ...DRY_RUN_FIELD
@@ -6324,10 +6324,11 @@ function registerCarrierApiTools(server2, ctx) {
6324
6324
  "claim_benefit",
6325
6325
  {
6326
6326
  title: "Claim a benefit",
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). 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.",
6328
6328
  inputSchema: {
6329
6329
  campaign_id: z7.string().regex(CAMPAIGN_ID_PATTERN).describe("Campaign id, cbc_ followed by 32 hex characters."),
6330
- 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.")
6331
6332
  },
6332
6333
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
6333
6334
  },
@@ -6341,7 +6342,10 @@ function registerCarrierApiTools(server2, ctx) {
6341
6342
  return carrierApiRequest(ctx, extra, {
6342
6343
  method: "POST",
6343
6344
  path: `/v1/connectivity/benefit-campaigns/${args.campaign_id}/claims`,
6344
- body: { external_ref: args.external_ref }
6345
+ body: {
6346
+ external_ref: args.external_ref,
6347
+ ...args.entitlement_token !== void 0 ? { entitlement_token: args.entitlement_token } : {}
6348
+ }
6345
6349
  });
6346
6350
  },
6347
6351
  { skipUserToken: true }
@@ -9726,7 +9730,7 @@ var PROJECTS_TOOLS = [
9726
9730
  // -------------------------------------------------------------------------
9727
9731
  {
9728
9732
  name: "credential_status",
9729
- 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.",
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. Returns credentials.provider_token; esimvault_token is a deprecated alias.",
9730
9734
  scope: "read",
9731
9735
  inputSchema: {
9732
9736
  type: "object",
@@ -9737,9 +9741,9 @@ var PROJECTS_TOOLS = [
9737
9741
  const sub = props2.sub;
9738
9742
  const orgId = props2.org_id;
9739
9743
  if (!env.CARRIER_USERS) {
9740
- return {
9744
+ const stdio = {
9741
9745
  credentials: {
9742
- esimvault_token: {
9746
+ provider_token: {
9743
9747
  present: true,
9744
9748
  encrypted: false,
9745
9749
  last_updated: null,
@@ -9754,8 +9758,10 @@ var PROJECTS_TOOLS = [
9754
9758
  reseller_id: props2.reseller_id,
9755
9759
  reseller_name: props2.reseller_name
9756
9760
  },
9757
- recommendations: ["stdio mode \u2014 token managed via ESIMVAULT_API_TOKEN env var, no rotation tracking"]
9761
+ recommendations: ["stdio mode \u2014 token managed via CARRIER_OCS_API_TOKEN env var, no rotation tracking"]
9758
9762
  };
9763
+ stdio.credentials.esimvault_token = stdio.credentials.provider_token;
9764
+ return stdio;
9759
9765
  }
9760
9766
  const primaryKey = orgId ? `org:${orgId}` : `user:clerk_${sub}`;
9761
9767
  const legacyKey = orgId ? null : `user:${sub}`;
@@ -9772,9 +9778,9 @@ var PROJECTS_TOOLS = [
9772
9778
  const updated = new Date(updatedAt);
9773
9779
  tokenAgeDays = Math.floor((Date.now() - updated.getTime()) / (1e3 * 60 * 60 * 24));
9774
9780
  }
9775
- return {
9781
+ const result3 = {
9776
9782
  credentials: {
9777
- esimvault_token: {
9783
+ provider_token: {
9778
9784
  present: hasToken,
9779
9785
  encrypted: hasToken,
9780
9786
  // All tokens are AES-256-GCM encrypted
@@ -9794,6 +9800,8 @@ var PROJECTS_TOOLS = [
9794
9800
  },
9795
9801
  recommendations: generateCredentialRecommendations(hasToken, tokenAgeDays)
9796
9802
  };
9803
+ result3.credentials.esimvault_token = result3.credentials.provider_token;
9804
+ return result3;
9797
9805
  }
9798
9806
  },
9799
9807
  // -------------------------------------------------------------------------
@@ -9801,14 +9809,14 @@ var PROJECTS_TOOLS = [
9801
9809
  // -------------------------------------------------------------------------
9802
9810
  {
9803
9811
  name: "rotate_credentials",
9804
- description: "Initiate rotation of your eSIMVault API credentials. Generates a new encrypted token and invalidates the old one. Requires write scope. Similar to `stripe projects rotate <service>`.",
9812
+ 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>`.",
9805
9813
  scope: "write",
9806
9814
  inputSchema: {
9807
9815
  type: "object",
9808
9816
  properties: {
9809
9817
  new_token: {
9810
9818
  type: "string",
9811
- description: "New eSIMVault API token to encrypt and store. Get from eSIMVault dashboard."
9819
+ description: "New network API token to encrypt and store. Get from the network dashboard."
9812
9820
  },
9813
9821
  confirm: {
9814
9822
  type: "boolean",
@@ -10011,8 +10019,8 @@ var PROJECTS_TOOLS = [
10011
10019
  auth_method: props2.auth_method ?? "oauth"
10012
10020
  },
10013
10021
  connected_services: {
10014
- esimvault: true,
10015
- // Always connected (required for operation)
10022
+ provider: true,
10023
+ // The BYOT provider in use; eSIMVault is the first one
10016
10024
  stripe_billing: hasStripe,
10017
10025
  webhooks: hasWebhook,
10018
10026
  carrier_console: true,
@@ -10025,7 +10033,7 @@ var PROJECTS_TOOLS = [
10025
10033
  billing_portal: "https://accounts.carrier.llc/user/billing"
10026
10034
  },
10027
10035
  configuration: {
10028
- ocs_base_url: "https://ocs.esimvault.cloud",
10036
+ provider_base_url: env.CARRIER_OCS_BASE_URL,
10029
10037
  admin_enabled: props2.scope.includes("admin"),
10030
10038
  intelligence_enabled: props2.tier !== "free"
10031
10039
  }
@@ -10037,7 +10045,7 @@ function generateCredentialRecommendations(hasToken, tokenAgeDays) {
10037
10045
  const recommendations = [];
10038
10046
  if (!hasToken) {
10039
10047
  recommendations.push(
10040
- "No eSIMVault token configured. Complete setup at https://app.carrier.llc/onboarding"
10048
+ "No network token configured. Complete setup at https://app.carrier.llc/onboarding"
10041
10049
  );
10042
10050
  }
10043
10051
  if (tokenAgeDays !== null && tokenAgeDays > 90) {