@carrierllc/mcp 0.11.13 → 0.11.14
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.
|
@@ -1792,7 +1792,7 @@ function storefrontScreen(input) {
|
|
|
1792
1792
|
// package.json
|
|
1793
1793
|
var package_default = {
|
|
1794
1794
|
name: "@carrierllc/mcp",
|
|
1795
|
-
version: "0.11.
|
|
1795
|
+
version: "0.11.14",
|
|
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)",
|
|
@@ -2219,7 +2219,7 @@ async function runWithBudget(method, attempt, budget = ocsBudgetFor(method)) {
|
|
|
2219
2219
|
throw lastTimeout ?? new OcsTimeoutError(method, budget.attemptMs, budget.totalMs, Math.max(attempts, 1));
|
|
2220
2220
|
}
|
|
2221
2221
|
|
|
2222
|
-
// ../../packages/ocs-client/dist/chunk-
|
|
2222
|
+
// ../../packages/ocs-client/dist/chunk-KELMML73.js
|
|
2223
2223
|
var RATE_LIMIT = 10;
|
|
2224
2224
|
var WINDOW_MS = 1e3;
|
|
2225
2225
|
var windows = /* @__PURE__ */ new Map();
|
|
@@ -2557,12 +2557,18 @@ function ocsErrorMessage(code, rawMsg, rawBody) {
|
|
|
2557
2557
|
var BACKOFF_BASE_MS2 = 500;
|
|
2558
2558
|
var BACKOFF_MAX_MS = 4e3;
|
|
2559
2559
|
var BACKOFF_MAX_RETRIES = 3;
|
|
2560
|
+
var TRAFFIC_CONTROL_BACKOFF_BASE_MS = 1e3;
|
|
2561
|
+
var TRAFFIC_CONTROL_BACKOFF_MAX_MS = 16e3;
|
|
2562
|
+
var TRAFFIC_CONTROL_MAX_RETRIES = 6;
|
|
2560
2563
|
var BACKOFF_JITTER = 0.25;
|
|
2561
2564
|
async function retryWithBackoff(fn) {
|
|
2562
2565
|
let lastError;
|
|
2563
|
-
|
|
2566
|
+
let maxRetries = BACKOFF_MAX_RETRIES;
|
|
2567
|
+
let backoffBaseMs = BACKOFF_BASE_MS2;
|
|
2568
|
+
let backoffMaxMs = BACKOFF_MAX_MS;
|
|
2569
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
2564
2570
|
if (attempt > 0) {
|
|
2565
|
-
const base = Math.min(
|
|
2571
|
+
const base = Math.min(backoffBaseMs * Math.pow(2, attempt - 1), backoffMaxMs);
|
|
2566
2572
|
const jitter = base * BACKOFF_JITTER * (2 * Math.random() - 1);
|
|
2567
2573
|
const delay = Math.max(0, Math.round(base + jitter));
|
|
2568
2574
|
await new Promise((r) => setTimeout(r, delay));
|
|
@@ -2571,8 +2577,11 @@ async function retryWithBackoff(fn) {
|
|
|
2571
2577
|
return await fn();
|
|
2572
2578
|
} catch (err) {
|
|
2573
2579
|
lastError = err;
|
|
2574
|
-
if (err instanceof OcsApiError
|
|
2575
|
-
throw err;
|
|
2580
|
+
if (err instanceof OcsApiError) {
|
|
2581
|
+
if (err.code !== 100) throw err;
|
|
2582
|
+
maxRetries = TRAFFIC_CONTROL_MAX_RETRIES;
|
|
2583
|
+
backoffBaseMs = TRAFFIC_CONTROL_BACKOFF_BASE_MS;
|
|
2584
|
+
backoffMaxMs = TRAFFIC_CONTROL_BACKOFF_MAX_MS;
|
|
2576
2585
|
}
|
|
2577
2586
|
if (err instanceof OcsContractError) {
|
|
2578
2587
|
throw err;
|
|
@@ -4379,4 +4388,4 @@ export {
|
|
|
4379
4388
|
storefrontScreen,
|
|
4380
4389
|
CARRIER_VERSION
|
|
4381
4390
|
};
|
|
4382
|
-
//# sourceMappingURL=chunk-
|
|
4391
|
+
//# sourceMappingURL=chunk-B74Z2COO.js.map
|