beplus-mcp 0.17.3 → 0.18.0
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 +21 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -428,10 +428,21 @@ function compact(obj) {
|
|
|
428
428
|
}
|
|
429
429
|
return out;
|
|
430
430
|
}
|
|
431
|
+
var CHARGED_FROM_LABEL = {
|
|
432
|
+
budget: "do budget do projeto",
|
|
433
|
+
weekly_allowance: "do cr\xE9dito semanal da equipe",
|
|
434
|
+
unlimited: "sem consumo (limite livre)",
|
|
435
|
+
free: "sem custo (modo relaxed)"
|
|
436
|
+
};
|
|
431
437
|
function costFooter(start, cfg) {
|
|
432
438
|
const parts = [];
|
|
433
|
-
|
|
434
|
-
if (typeof start.
|
|
439
|
+
const paidElsewhere = CHARGED_FROM_LABEL[start.charged_from ?? ""];
|
|
440
|
+
if (typeof start.diamond_cost === "number") {
|
|
441
|
+
parts.push(`Custo: ${start.diamond_cost} \u{1F48E}${paidElsewhere ? ` (${paidElsewhere})` : ""}`);
|
|
442
|
+
}
|
|
443
|
+
if (!paidElsewhere && typeof start.new_balance === "number") {
|
|
444
|
+
parts.push(`Saldo: ${start.new_balance} \u{1F48E}`);
|
|
445
|
+
}
|
|
435
446
|
let footer = parts.join(" \xB7 ");
|
|
436
447
|
if (cfg.costWarnThreshold && typeof start.diamond_cost === "number" && start.diamond_cost > cfg.costWarnThreshold) {
|
|
437
448
|
footer = `\u26A0 Custo alto (${start.diamond_cost} \u{1F48E})
|
|
@@ -1361,7 +1372,10 @@ function registerAnalyzeTools(server, client, cfg) {
|
|
|
1361
1372
|
media_urls: z5.array(z5.string().min(1)).max(50).optional().describe(
|
|
1362
1373
|
"M\xEDdia (imagem/v\xEDdeo/\xE1udio/PDF): URLs p\xFAblicas OU caminhos de arquivo local (o MCP sobe pro R2 automaticamente). Pode misturar tipos. Opcional (prompt s\xF3-texto tamb\xE9m funciona)."
|
|
1363
1374
|
),
|
|
1364
|
-
model: z5.enum(["gemini-flash", "gemini-pro"]).default("gemini-flash").optional().describe("gemini-flash = r\xE1pido/barato (Gemini 3.5 Flash); gemini-pro = mais capaz (Gemini 3.1 Pro).")
|
|
1375
|
+
model: z5.enum(["gemini-flash", "gemini-pro"]).default("gemini-flash").optional().describe("gemini-flash = r\xE1pido/barato (Gemini 3.5 Flash); gemini-pro = mais capaz (Gemini 3.1 Pro)."),
|
|
1376
|
+
project: z5.string().optional().describe(
|
|
1377
|
+
'Projeto (uuid ou code curto, ex.: "ICONS") de cujo budget cobrar. Omitido \u2192 usa o projeto ativo da conta.'
|
|
1378
|
+
)
|
|
1365
1379
|
}
|
|
1366
1380
|
},
|
|
1367
1381
|
async (args) => {
|
|
@@ -1371,12 +1385,14 @@ function registerAnalyzeTools(server, client, cfg) {
|
|
|
1371
1385
|
compact({
|
|
1372
1386
|
prompt: args.prompt,
|
|
1373
1387
|
media_urls,
|
|
1374
|
-
model: args.model
|
|
1388
|
+
model: args.model,
|
|
1389
|
+
project: args.project
|
|
1375
1390
|
})
|
|
1376
1391
|
);
|
|
1392
|
+
const origem = res.chargedFrom === "budget" ? "restam no budget do projeto" : res.chargedFrom === "weekly_allowance" ? "restam no cr\xE9dito semanal" : res.chargedFrom === "unlimited" ? "limite livre" : "saldo pessoal";
|
|
1377
1393
|
const footer = `
|
|
1378
1394
|
|
|
1379
|
-
\u2014 ${res.diamondsUsed} \u{1F48E} (
|
|
1395
|
+
\u2014 ${res.diamondsUsed} \u{1F48E} (${res.newBalance} ${origem}) \xB7 ${res.model} \xB7 ${res.inputTokens}\u2192${res.outputTokens} tok`;
|
|
1380
1396
|
return textResult(`${res.text}${footer}`);
|
|
1381
1397
|
} catch (e) {
|
|
1382
1398
|
return errorResult(apiErrorToUserMessage(e));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beplus-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Conector MCP da equipe BePlus — gere imagens/vídeos/áudio e consulte calls, projetos e clientes pela sua conta BePlus (diamantes, limites e histórico aplicados pela plataforma).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|