@carrierllc/mcp 0.11.14 → 0.11.15
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.15",
|
|
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)",
|
|
@@ -4183,18 +4183,6 @@ function gyCountryHistoryFromResponse(response) {
|
|
|
4183
4183
|
}
|
|
4184
4184
|
|
|
4185
4185
|
// src/lib/storefront-logo.ts
|
|
4186
|
-
var OPENAI_KEY_NAMES = [
|
|
4187
|
-
"OPENAI_API_KEY",
|
|
4188
|
-
"OPENAI_KEY",
|
|
4189
|
-
"CARRIER_OPENAI_API_KEY"
|
|
4190
|
-
];
|
|
4191
|
-
function firstImageKey(env = process.env) {
|
|
4192
|
-
for (const name of OPENAI_KEY_NAMES) {
|
|
4193
|
-
const v = env[name];
|
|
4194
|
-
if (v && v.trim() && !v.startsWith("__") && !v.includes("PLACEHOLD")) return v.trim();
|
|
4195
|
-
}
|
|
4196
|
-
return void 0;
|
|
4197
|
-
}
|
|
4198
4186
|
function clampHex(hex, fallback) {
|
|
4199
4187
|
const h = hex.trim();
|
|
4200
4188
|
return /^#[0-9a-fA-F]{6}$/.test(h) ? h.toUpperCase() : fallback;
|
|
@@ -4255,50 +4243,10 @@ function generateStorefrontLogoSvg(name, accent = "#FF6B35") {
|
|
|
4255
4243
|
function escapeXml(s) {
|
|
4256
4244
|
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
4257
4245
|
}
|
|
4258
|
-
function logoPrompt(name, accent, tagline) {
|
|
4259
|
-
return [
|
|
4260
|
-
`App icon / brand mark for "${name}", a travel eSIM storefront.`,
|
|
4261
|
-
tagline ? `Tagline: ${tagline}.` : "",
|
|
4262
|
-
`Flat vector, single centered symbol, no letters unless they are a refined monogram of "${name[0] ?? "C"}".`,
|
|
4263
|
-
`Color: ${accent} on warm cream #FAFAF7. Soft squircle icon, premium, simple, high contrast.`,
|
|
4264
|
-
`No photorealism, no mockups, no shadows of devices, no watermarks.`
|
|
4265
|
-
].filter(Boolean).join(" ");
|
|
4266
|
-
}
|
|
4267
|
-
async function tryOpenAiLogoPng(name, accent, apiKey, tagline) {
|
|
4268
|
-
try {
|
|
4269
|
-
const res = await fetch("https://api.openai.com/v1/images/generations", {
|
|
4270
|
-
method: "POST",
|
|
4271
|
-
headers: {
|
|
4272
|
-
Authorization: `Bearer ${apiKey}`,
|
|
4273
|
-
"Content-Type": "application/json"
|
|
4274
|
-
},
|
|
4275
|
-
body: JSON.stringify({
|
|
4276
|
-
model: "dall-e-3",
|
|
4277
|
-
prompt: logoPrompt(name, accent, tagline),
|
|
4278
|
-
size: "1024x1024",
|
|
4279
|
-
quality: "hd",
|
|
4280
|
-
response_format: "b64_json",
|
|
4281
|
-
n: 1
|
|
4282
|
-
})
|
|
4283
|
-
});
|
|
4284
|
-
if (!res.ok) return void 0;
|
|
4285
|
-
const json = await res.json();
|
|
4286
|
-
return json.data?.[0]?.b64_json;
|
|
4287
|
-
} catch {
|
|
4288
|
-
return void 0;
|
|
4289
|
-
}
|
|
4290
|
-
}
|
|
4291
4246
|
async function generateStorefrontLogo(input) {
|
|
4292
4247
|
const name = input.name.trim() || "Carrier";
|
|
4293
4248
|
const accent = clampHex(input.accent ?? "#FF6B35", "#FF6B35");
|
|
4294
4249
|
const svg = generateStorefrontLogoSvg(name, accent);
|
|
4295
|
-
const key = firstImageKey(input.env ?? (typeof process !== "undefined" ? process.env : {}));
|
|
4296
|
-
if (key) {
|
|
4297
|
-
const png = await tryOpenAiLogoPng(name, accent, key, input.tagline);
|
|
4298
|
-
if (png) {
|
|
4299
|
-
return { svg, filename: "logo.svg", source: "openai", pngBase64: png };
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
4250
|
return { svg, filename: "logo.svg", source: "svg" };
|
|
4303
4251
|
}
|
|
4304
4252
|
|
|
@@ -4388,4 +4336,4 @@ export {
|
|
|
4388
4336
|
storefrontScreen,
|
|
4389
4337
|
CARRIER_VERSION
|
|
4390
4338
|
};
|
|
4391
|
-
//# sourceMappingURL=chunk-
|
|
4339
|
+
//# sourceMappingURL=chunk-MLPMMUQ2.js.map
|