@kolbo/mcp 1.116.0 → 1.117.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/package.json +1 -1
- package/src/tools/models.js +13 -2
package/package.json
CHANGED
package/src/tools/models.js
CHANGED
|
@@ -115,6 +115,17 @@ const identifierRow = (m) => ({
|
|
|
115
115
|
...(m.new_model ? { new_model: true } : {}),
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
+
// upgrade_entry credits a purchase to the surface that sent the user (kolbo-map
|
|
119
|
+
// markUpgradeEntryFromUrl). Set server-side so the card AND the text link carry it;
|
|
120
|
+
// a tag already on the URL is kept.
|
|
121
|
+
function withUpgradeEntry(raw, entry) {
|
|
122
|
+
try {
|
|
123
|
+
const u = new URL(raw);
|
|
124
|
+
if (!u.searchParams.has('upgrade_entry')) u.searchParams.set('upgrade_entry', entry);
|
|
125
|
+
return u.toString();
|
|
126
|
+
} catch { return raw; }
|
|
127
|
+
}
|
|
128
|
+
|
|
118
129
|
function registerModelTools(server, client, options = {}) {
|
|
119
130
|
const ui = () => appsEnabled(server, options);
|
|
120
131
|
// ─── list_models ───────────────────────────────────────────
|
|
@@ -516,7 +527,7 @@ function registerModelTools(server, client, options = {}) {
|
|
|
516
527
|
current_plan: data?.current_plan || null,
|
|
517
528
|
plans: data?.plans || [],
|
|
518
529
|
credit_packs: data?.credit_packs || [],
|
|
519
|
-
pricing_url: data?.pricing_url || 'https://app.kolbo.ai/pricing',
|
|
530
|
+
pricing_url: withUpgradeEntry(data?.pricing_url || 'https://app.kolbo.ai/pricing', 'mcp_plans_card'),
|
|
520
531
|
};
|
|
521
532
|
// structuredContent SHADOWS the text on widget hosts, so everything the
|
|
522
533
|
// agent needs to talk about pricing has to live in the object above.
|
|
@@ -533,4 +544,4 @@ function registerModelTools(server, client, options = {}) {
|
|
|
533
544
|
);
|
|
534
545
|
}
|
|
535
546
|
|
|
536
|
-
module.exports = { registerModelTools };
|
|
547
|
+
module.exports = { registerModelTools, withUpgradeEntry };
|