@kolbo/mcp 1.120.1 → 1.120.3
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
CHANGED
|
@@ -798,14 +798,16 @@ function schedulePoll(sc) {
|
|
|
798
798
|
if (cancelRequested) return;
|
|
799
799
|
if (!sc.generation_id && !(sc.generation_ids && sc.generation_ids.length) && !sc.status_args) return;
|
|
800
800
|
if (!seen) { whenSeenFns.push(function () { schedulePoll(sc); }); return; }
|
|
801
|
-
//
|
|
802
|
-
//
|
|
803
|
-
//
|
|
804
|
-
//
|
|
805
|
-
//
|
|
806
|
-
//
|
|
807
|
-
//
|
|
808
|
-
var
|
|
801
|
+
// Each poll is a QUICK status read (wait:false). Long server-side waits held
|
|
802
|
+
// one host slot per card for up to 45s, and a chat with a dozen-plus live
|
|
803
|
+
// cards (17 fired in one minute on 2026-10-22) left cards queued behind each
|
|
804
|
+
// other on Generating while their images were done. Quick reads cost the
|
|
805
|
+
// host nothing between polls whatever its concurrency. Cadence: 3s for the
|
|
806
|
+
// first minute, 6s to five minutes, then 12s, plus jitter so many cards do
|
|
807
|
+
// not fire in lockstep. Failures back off exponentially (capped at 30s).
|
|
808
|
+
var age = pollStart ? Date.now() - pollStart : 0;
|
|
809
|
+
var base = age < 60000 ? 3000 : age < 300000 ? 6000 : 12000;
|
|
810
|
+
var delay = pollStart ? Math.min(base * Math.pow(2, pollErrors), 30000) + Math.floor(Math.random() * 1000) : 0;
|
|
809
811
|
if (!pollStart) pollStart = Date.now();
|
|
810
812
|
clearTimeout(pollTimer);
|
|
811
813
|
pollTimer = setTimeout(function () { poll(sc); }, delay);
|
|
@@ -815,10 +817,8 @@ function poll(sc) {
|
|
|
815
817
|
if (pollStart && (Date.now() - pollStart) > MAX_POLL_MS) {
|
|
816
818
|
return renderTrackingIssue('This is still running longer than the tracking window. Do not retry it — any completed result will appear in your Kolbo library.');
|
|
817
819
|
}
|
|
818
|
-
var args = sc.status_args || { generation_id: sc.generation_id, wait:
|
|
819
|
-
|
|
820
|
-
// wait window inside the common 60s request timeout.
|
|
821
|
-
if (args.wait) args = Object.assign({}, args, { wait_seconds: 45 });
|
|
820
|
+
var args = Object.assign({}, sc.status_args || { generation_id: sc.generation_id }, { wait: false });
|
|
821
|
+
delete args.wait_seconds;
|
|
822
822
|
pollInFlight = true;
|
|
823
823
|
window.kolbo.callTool(sc.poll_tool || 'get_generation_status', args).then(function (res) {
|
|
824
824
|
pollInFlight = false;
|
|
@@ -93,9 +93,9 @@ function poll() {
|
|
|
93
93
|
if ((Date.now() - pollStart) > MAX_POLL_MS) {
|
|
94
94
|
return trackingIssue('This transcription is still running longer than the tracking window. Do not retry it — any completed result will appear in your Kolbo library.');
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
// Quick status read; see schedulePoll in the generation widget for why.
|
|
97
|
+
var args = Object.assign({}, state.status_args || { generation_id: state.generation_id }, { wait: false });
|
|
98
|
+
delete args.wait_seconds;
|
|
99
99
|
window.kolbo.callTool(state.poll_tool || 'get_generation_status', args)
|
|
100
100
|
.then(function (res) {
|
|
101
101
|
var st = structured(res) || {};
|
|
@@ -118,10 +118,9 @@ function poll() {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
function pollDelay() {
|
|
121
|
-
//
|
|
122
|
-
//
|
|
123
|
-
|
|
124
|
-
return Math.min(1500 * Math.pow(2, pollErrors), 30000);
|
|
121
|
+
// Quick reads every 5s (transcripts run minutes); failures back off
|
|
122
|
+
// exponentially, capped at 30s, plus jitter so cards don't fire in lockstep.
|
|
123
|
+
return Math.min(5000 * Math.pow(2, pollErrors), 30000) + Math.floor(Math.random() * 1000);
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
function trackingIssue(msg) {
|
package/src/tools/generate.js
CHANGED
|
@@ -1389,7 +1389,13 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
};
|
|
1391
1391
|
|
|
1392
|
+
const statusStarted = Date.now();
|
|
1392
1393
|
const results = await Promise.all(ids.map(checkOne));
|
|
1394
|
+
// One stderr line per status call. Hosts keep server stderr in their MCP
|
|
1395
|
+
// logs (Claude Code: mcp-logs-kolbo), and widget polls are otherwise
|
|
1396
|
+
// invisible there — only the model's own calls are logged. wait_seconds
|
|
1397
|
+
// marks a widget poll.
|
|
1398
|
+
process.stderr.write(`[kolbo] get_generation_status ids=${ids.length} wait=${wait ? (wait_seconds || WAIT_WINDOW_S) + 's' : 'no'}${wait_seconds ? ' (widget)' : ''} ${Date.now() - statusStarted}ms states=${results.map(r => r.state).join(',')}\n`);
|
|
1393
1399
|
await Promise.all(results.map(addDisplayNames));
|
|
1394
1400
|
|
|
1395
1401
|
const pending = results.filter(r => r.state !== 'completed' && r.state !== 'failed' && r.state !== 'cancelled');
|