@kolbo/mcp 1.120.0 → 1.120.2
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/index.js +5 -0
- package/src/progress.js +1 -1
- package/src/tools/generate.js +6 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -154,6 +154,11 @@ function createServer(opts = {}) {
|
|
|
154
154
|
const handler = args[index];
|
|
155
155
|
if (typeof handler !== 'function') return tool(...args);
|
|
156
156
|
args[index] = (params, extra) => progress.run(extra, async () => {
|
|
157
|
+
// Only Kolbo Code (client "kolbo") reads the generation_id progress
|
|
158
|
+
// message. Claude Code's MCP client rejected it as an unknown progress
|
|
159
|
+
// token and dropped the whole stdio connection mid-session, killing
|
|
160
|
+
// every live widget's polling (3/3 logged drops, 2026-10-21..22).
|
|
161
|
+
if (extra) extra.__kolboGenerationNotice = server.server?.getClientVersion?.()?.name === 'kolbo';
|
|
157
162
|
try {
|
|
158
163
|
return await handler(params, extra);
|
|
159
164
|
} catch (err) {
|
package/src/progress.js
CHANGED
|
@@ -93,7 +93,7 @@ function untrackGeneration(id) {
|
|
|
93
93
|
async function generation(id) {
|
|
94
94
|
const extra = storage.getStore();
|
|
95
95
|
const token = extra?._meta?.progressToken;
|
|
96
|
-
if (!id || token === undefined) return;
|
|
96
|
+
if (!id || token === undefined || !extra.__kolboGenerationNotice) return;
|
|
97
97
|
// A progress notification is a courtesy — the generation is already submitted
|
|
98
98
|
// and paid for. If the send fails (host cancelled the request, transport
|
|
99
99
|
// already closed), swallowing it is mandatory: letting it reject would turn a
|
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');
|