@carrierllc/mcp 0.13.87 → 0.13.89

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/cli.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  verifyStorefront,
46
46
  walletScreen,
47
47
  which
48
- } from "./chunk-RCYBPELI.js";
48
+ } from "./chunk-5P7TAD2J.js";
49
49
  import {
50
50
  copyTree,
51
51
  exists,
@@ -1750,7 +1750,7 @@ function parseRouting(text3) {
1750
1750
  function readableAskError(result) {
1751
1751
  try {
1752
1752
  const body = JSON.parse(result.text);
1753
- const message = body.error ?? body.message;
1753
+ const message = body.message ?? body.error;
1754
1754
  if (typeof message === "string") return { ...result, text: message };
1755
1755
  } catch {
1756
1756
  }
@@ -1762,7 +1762,7 @@ async function carrierAsk(intent, opts = {}) {
1762
1762
  }
1763
1763
  async function routeAsk(intent, opts) {
1764
1764
  const routed = await callMcpTool("carrier_ask", { intent }, { errorHints: ASK_ERROR_HINTS });
1765
- if (!routed.ok) return routed;
1765
+ if (!routed.ok) return opts.json ? routed : readableAskError(routed);
1766
1766
  const routing = parseRouting(routed.text);
1767
1767
  if (!routing) return opts.json ? routed : { ...routed, text: formatAskAnswer(routed.text, "carrier_ask", routed.structured, intent) };
1768
1768
  if (!routing.resolved_tool) {
@@ -2025,7 +2025,7 @@ var ZERO_DECIMAL = /* @__PURE__ */ new Set([
2025
2025
  "XOF",
2026
2026
  "XPF"
2027
2027
  ]);
2028
- function majorToCents(input, currency = "EUR") {
2028
+ function majorToCents(input, currency = "USD") {
2029
2029
  const text3 = input.trim();
2030
2030
  if (ZERO_DECIMAL.has(currency.trim().toUpperCase())) {
2031
2031
  if (!/^\d+$/.test(text3)) return { ok: false, message: "Enter a whole number, such as 1000." };