@kolbo/mcp 1.93.7 → 1.94.1
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/README.md +1 -1
- package/package.json +1 -1
- package/skill/GENERATED.md +1 -1
- package/skill/SKILL.md +2 -2
- package/skill/VERSION +1 -1
- package/src/apps/index.js +9 -4
- package/src/apps/widgets/credits.js +63 -0
- package/src/tools/models.js +5 -6
package/README.md
CHANGED
|
@@ -324,7 +324,7 @@ Requires DaVinci Resolve Studio with the Kolbo plugin open (Workspace → Workfl
|
|
|
324
324
|
| `create_moodboard` / `update_moodboard` / `delete_moodboard` | Build/edit moodboards from image URLs (AI style analysis → master prompt) |
|
|
325
325
|
| `clone_voice` / `import_elevenlabs_voice` / `delete_voice` | Custom voices: clone from an audio sample, import by ElevenLabs ID, delete |
|
|
326
326
|
| `trim_video` | Frame-accurate server-side trim of a Kolbo-hosted video (async job, tool waits) |
|
|
327
|
-
| `check_credits` | Check credit balance |
|
|
327
|
+
| `check_credits` | Check credit balance; widget hosts show total and plan, credit-pack, and redemption breakdown, while text hosts retain the plain-text response |
|
|
328
328
|
| `get_generation_status` | Check one or many generations (`generation_ids`); `wait=true` blocks server-side until done — replaces client polling loops |
|
|
329
329
|
|
|
330
330
|
## Environment Variables
|
package/package.json
CHANGED
package/skill/GENERATED.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AUTO-GENERATED — do not edit
|
|
2
2
|
|
|
3
|
-
This tree is mirrored from kolbo-code@
|
|
3
|
+
This tree is mirrored from kolbo-code@d6af561, the single source of truth.
|
|
4
4
|
Canonical source: packages/opencode/skills/kolbo/
|
|
5
5
|
Distribution: .github/workflows/sync-skill-to-plugin.yml
|
|
6
6
|
|
package/skill/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: 0.9.
|
|
2
|
+
version: 0.9.18
|
|
3
3
|
name: kolbo
|
|
4
4
|
description: |
|
|
5
5
|
Generate, edit, analyze, and direct creative media through Kolbo AI: images,
|
|
@@ -58,7 +58,7 @@ Then generate **only** with the confirmed parameters. If the user changes an opt
|
|
|
58
58
|
- **Video/lipsync `credit` is per-SECOND, not per-clip**: normally `total = credit × output_duration`. If video references are attached and `video_input_credit` is present, use the alternate provider tariff instead: `video_input_credit × (sum ceil(each input video duration) + output seconds) × video_input_resolution_multiplier`. Dedicated Seedance Edit uses its selected source duration as output; Extend uses the requested added duration. The other carve-out is `flat_credit_by_resolution`.
|
|
59
59
|
- **Batch totalling 100+ credits**: run `check_credits` first.
|
|
60
60
|
- **Quote real cost**: when the user approves the result, log its actual `credits_used` (from the tool result) to `.kolbo/production.md` — never `base × count`.
|
|
61
|
-
- **Never state "credits remaining" from arithmetic** (opening balance − generation costs). Coding/chat usage deducts credits too, so the math is always wrong. Report cost only; if the user asks for their balance, call `check_credits` fresh at that moment.
|
|
61
|
+
- **Never state "credits remaining" from arithmetic** (opening balance − generation costs). Coding/chat usage deducts credits too, so the math is always wrong. Report cost only; if the user asks for their balance, call `check_credits` fresh at that moment. Widget hosts show the total and plan, credit-pack, and redemption breakdown from `structuredContent.credits`; this is a snapshot at check time. Text hosts receive the same breakdown as plain text.
|
|
62
62
|
- **Out of credits → `show_plans`.** A generation refused for credits already returns the upgrade card automatically — do NOT retry it, and do not re-run the tool "to be sure". Call `show_plans` yourself when the user asks about pricing, plans, upgrading, or how to get more credits. Prices are live and promo-adjusted; never quote them from memory. The user completes any purchase themselves on app.kolbo.ai/pricing — you cannot buy for them.
|
|
63
63
|
|
|
64
64
|
For multi-scene / batch work this pairs with `generate_creative_director` (see below) — still confirm the brief first.
|
package/skill/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.
|
|
1
|
+
0.9.18
|
package/src/apps/index.js
CHANGED
|
@@ -25,6 +25,7 @@ const { fontUploadWidgetHtml } = require('./widgets/fontUpload');
|
|
|
25
25
|
const { listWidgetHtml } = require('./widgets/list');
|
|
26
26
|
const { HOST_MAP } = require('../cdn');
|
|
27
27
|
const { plansWidgetHtml } = require('./widgets/plans');
|
|
28
|
+
const { creditsWidgetHtml } = require('./widgets/credits');
|
|
28
29
|
const { ResourceTemplate } = require('@modelcontextprotocol/sdk/server/mcp.js');
|
|
29
30
|
const { McpError, ErrorCode } = require('@modelcontextprotocol/sdk/types.js');
|
|
30
31
|
|
|
@@ -36,7 +37,8 @@ const UI = {
|
|
|
36
37
|
upload: 'ui://kolbo/upload.html',
|
|
37
38
|
fontUpload: 'ui://kolbo/font-upload.html',
|
|
38
39
|
list: 'ui://kolbo/list.html',
|
|
39
|
-
plans: 'ui://kolbo/plans.html',
|
|
40
|
+
plans: 'ui://kolbo/plans.html',
|
|
41
|
+
credits: 'ui://kolbo/credits.html',
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
const WIDGET_BUILDERS = {
|
|
@@ -47,7 +49,8 @@ const WIDGET_BUILDERS = {
|
|
|
47
49
|
[UI.upload]: uploadWidgetHtml,
|
|
48
50
|
[UI.fontUpload]: fontUploadWidgetHtml,
|
|
49
51
|
[UI.list]: listWidgetHtml,
|
|
50
|
-
[UI.plans]: plansWidgetHtml,
|
|
52
|
+
[UI.plans]: plansWidgetHtml,
|
|
53
|
+
[UI.credits]: creditsWidgetHtml,
|
|
51
54
|
};
|
|
52
55
|
|
|
53
56
|
// Widgets are pure functions of source — build once per process.
|
|
@@ -169,7 +172,8 @@ function registerApps(server) {
|
|
|
169
172
|
[UI.upload, 'Kolbo Upload Widget'],
|
|
170
173
|
[UI.fontUpload, 'Kolbo Font Upload Widget'],
|
|
171
174
|
[UI.list, 'Kolbo List Widget'],
|
|
172
|
-
[UI.plans, 'Kolbo Plans Widget'],
|
|
175
|
+
[UI.plans, 'Kolbo Plans Widget'],
|
|
176
|
+
[UI.credits, 'Kolbo Credit Balance Widget'],
|
|
173
177
|
]) {
|
|
174
178
|
for (const u of [versionedUri(uri), uri]) {
|
|
175
179
|
registerAppResource(
|
|
@@ -770,7 +774,8 @@ const TOOL_WIDGETS = {
|
|
|
770
774
|
list_docs: UI.list,
|
|
771
775
|
list_media_folders: UI.list,
|
|
772
776
|
list_visual_dna_folders: UI.list,
|
|
773
|
-
show_plans: UI.plans,
|
|
777
|
+
show_plans: UI.plans,
|
|
778
|
+
check_credits: UI.credits,
|
|
774
779
|
list_project_assets: UI.list,
|
|
775
780
|
};
|
|
776
781
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { widgetPage } = require('../html');
|
|
4
|
+
|
|
5
|
+
const BODY = `
|
|
6
|
+
<style>
|
|
7
|
+
#loading[hidden], #balance[hidden], #error[hidden] { display: none !important; }
|
|
8
|
+
.k-credit-total { font-size: clamp(30px, 8vw, 46px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.2; overflow-wrap: anywhere; }
|
|
9
|
+
.k-credit-label { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
|
|
10
|
+
.k-credit-breakdown { margin: 22px 0 0; padding: 0; }
|
|
11
|
+
.k-credit-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13px; }
|
|
12
|
+
.k-credit-row dt { color: var(--text-muted); }
|
|
13
|
+
.k-credit-row dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
|
|
14
|
+
</style>
|
|
15
|
+
<div class="k-card">
|
|
16
|
+
<div class="k-head"><span class="k-logo" id="logo"></span><span class="k-title">Credit balance</span></div>
|
|
17
|
+
<div class="k-body" aria-live="polite">
|
|
18
|
+
<div id="loading" class="k-skel" style="height:160px" aria-label="Loading credit balance"></div>
|
|
19
|
+
<div id="balance" hidden>
|
|
20
|
+
<div class="k-credit-total" id="total"></div>
|
|
21
|
+
<div class="k-credit-label">Available credits</div>
|
|
22
|
+
<dl class="k-credit-breakdown">
|
|
23
|
+
<div class="k-credit-row"><dt>Plan credits</dt><dd id="plan"></dd></div>
|
|
24
|
+
<div class="k-credit-row"><dt>Credit pack</dt><dd id="pack"></dd></div>
|
|
25
|
+
<div class="k-credit-row"><dt>Redemption</dt><dd id="redemption"></dd></div>
|
|
26
|
+
</dl>
|
|
27
|
+
<div class="k-credit-label">Balance at time of check</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div id="error" class="k-error" hidden>Credit balance unavailable. Please check again.</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>`;
|
|
32
|
+
|
|
33
|
+
const SCRIPT = `
|
|
34
|
+
el('logo').innerHTML = KOLBO_LOGO + '<span>Kolbo</span>';
|
|
35
|
+
function amount(value) {
|
|
36
|
+
if (value == null || value === '' || !Number.isFinite(Number(value))) return '\u2014';
|
|
37
|
+
return Number(value).toLocaleString('en-US', { maximumFractionDigits: 8 });
|
|
38
|
+
}
|
|
39
|
+
function render(result) {
|
|
40
|
+
var sc = result.structuredContent || structured(result);
|
|
41
|
+
var credits = sc && sc.credits;
|
|
42
|
+
el('loading').hidden = true;
|
|
43
|
+
el('error').hidden = !!credits && !result.isError;
|
|
44
|
+
el('balance').hidden = !credits || !!result.isError;
|
|
45
|
+
if (credits && !result.isError) {
|
|
46
|
+
el('total').textContent = amount(credits.total);
|
|
47
|
+
el('plan').textContent = amount(credits.plan_credits);
|
|
48
|
+
el('pack').textContent = amount(credits.credit_pack);
|
|
49
|
+
el('redemption').textContent = amount(credits.redemption);
|
|
50
|
+
}
|
|
51
|
+
window.kolbo.notifySize();
|
|
52
|
+
}
|
|
53
|
+
window.kolbo.onToolResult(render);
|
|
54
|
+
window.kolbo.ready(function (ctx) {
|
|
55
|
+
if (ctx && ctx.toolInfo && ctx.toolInfo.result) render(ctx.toolInfo.result);
|
|
56
|
+
});
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
function creditsWidgetHtml() {
|
|
60
|
+
return widgetPage({ title: 'Kolbo Credit Balance', body: BODY, script: SCRIPT });
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
module.exports = { creditsWidgetHtml };
|
package/src/tools/models.js
CHANGED
|
@@ -440,12 +440,11 @@ function registerModelTools(server, client, options = {}) {
|
|
|
440
440
|
async () => {
|
|
441
441
|
const result = await client.get('/v1/account/credits');
|
|
442
442
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
};
|
|
443
|
+
const text = `Credit Balance:\n- Total: ${result.credits.total}\n- Plan credits: ${result.credits.plan_credits}\n- Credit pack: ${result.credits.credit_pack}\n- Redemption: ${result.credits.redemption}`;
|
|
444
|
+
return ui() ? uiResult(UI.credits, text, {
|
|
445
|
+
widget: 'credits',
|
|
446
|
+
credits: result.credits,
|
|
447
|
+
}) : { content: [{ type: 'text', text }] };
|
|
449
448
|
}
|
|
450
449
|
);
|
|
451
450
|
|