@kolbo/mcp 1.81.5 → 1.81.6
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
|
@@ -702,6 +702,11 @@ function handleBatchStatus(sc, st) {
|
|
|
702
702
|
resolved.model_name = r.model_name;
|
|
703
703
|
resolved.model_icon = r.model_icon;
|
|
704
704
|
}
|
|
705
|
+
// Same for the references actually used (reference_details from the
|
|
706
|
+
// server) — every id in the batch shares one reference set.
|
|
707
|
+
if (!resolved.reference_images && r.reference_images && r.reference_images.length) {
|
|
708
|
+
resolved.reference_images = r.reference_images;
|
|
709
|
+
}
|
|
705
710
|
scenes.push({
|
|
706
711
|
scene_number: i + 1,
|
|
707
712
|
title: (sc.prompts && sc.prompts[i]) || '',
|
package/src/tools/_shared.js
CHANGED
|
@@ -716,8 +716,11 @@ function mediaRefs(p) {
|
|
|
716
716
|
? p.reference_images.filter(Boolean)
|
|
717
717
|
: (p.reference_image ? [p.reference_image] : []);
|
|
718
718
|
return {
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
// Omitted when empty: a live card MERGES status payloads over its own
|
|
720
|
+
// state, so a present-but-empty reference_images (the single-id status
|
|
721
|
+
// path has no input refs of its own) wiped the submit-time thumbnails
|
|
722
|
+
// off the finished card.
|
|
723
|
+
...(images.length ? { reference_images: images, reference_image: p.reference_image || images[0] } : {}),
|
|
721
724
|
...(Array.isArray(p.reference_videos) && p.reference_videos.length
|
|
722
725
|
? { reference_videos: p.reference_videos.filter(Boolean) } : {}),
|
|
723
726
|
...(Array.isArray(p.reference_audio) && p.reference_audio.length
|
package/src/tools/generate.js
CHANGED
|
@@ -282,7 +282,10 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
282
282
|
return uiCompleted({
|
|
283
283
|
tool: 'generate_image', kind: 'image', gen, client, model, prompt,
|
|
284
284
|
count: num_images, settings: imageSettings(shared),
|
|
285
|
-
|
|
285
|
+
// The status result reports what the server ACTUALLY conditioned on
|
|
286
|
+
// (reference_details: DNA stills, merged sources, auto-routing) — the
|
|
287
|
+
// input arg is only what the caller happened to name.
|
|
288
|
+
reference_images: result.result.reference_images || reference_images,
|
|
286
289
|
urls: result.result.urls,
|
|
287
290
|
credits_used: creditFields(result).credits_used,
|
|
288
291
|
}, JSON.stringify({
|
|
@@ -371,7 +374,8 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
371
374
|
return uiCompleted({
|
|
372
375
|
tool: 'generate_image_edit', kind: 'image', gen, client, model, prompt,
|
|
373
376
|
count: num_images, settings: imageSettings(shared),
|
|
374
|
-
reference_images:
|
|
377
|
+
reference_images: result.result.reference_images
|
|
378
|
+
|| [...(source_images || []), ...(reference_images || [])],
|
|
375
379
|
urls: result.result.urls,
|
|
376
380
|
credits_used: creditFields(result).credits_used,
|
|
377
381
|
}, JSON.stringify({
|
|
@@ -1096,6 +1100,11 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
1096
1100
|
state: single.state,
|
|
1097
1101
|
urls: done ? urls : undefined,
|
|
1098
1102
|
thumbnail_url: res.thumbnail_url,
|
|
1103
|
+
// The refs the server actually conditioned on (reference_details) —
|
|
1104
|
+
// the live card merges this payload over its submit-time state, so
|
|
1105
|
+
// the finished card shows every reference, including server-side
|
|
1106
|
+
// additions (DNA stills, merged sources) the tool call never named.
|
|
1107
|
+
reference_images: res.reference_images,
|
|
1099
1108
|
prompt: res.prompt_used || res.prompt || undefined,
|
|
1100
1109
|
credits_used: creditFields(single).credits_used,
|
|
1101
1110
|
items: [{
|
|
@@ -1136,9 +1145,19 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
1136
1145
|
// moodboards.js / visual_dna.js / listResult(). uiResult always embeds
|
|
1137
1146
|
// both text and structuredContent, so hosts without a UI-app renderer
|
|
1138
1147
|
// are unaffected — only the fallback quality changes.
|
|
1148
|
+
// A live batch card (prompts[] fan-out) merges this payload over its
|
|
1149
|
+
// submit-time state, so a hardcoded 'Generations' model here painted
|
|
1150
|
+
// over the real model chip on every finished batch. When all results
|
|
1151
|
+
// ran the same model (the batch case), name it; only a genuinely mixed
|
|
1152
|
+
// multi-id check falls back to the generic label. Same for the
|
|
1153
|
+
// references actually used — one shared set per batch.
|
|
1154
|
+
const modelsRan = [...new Set(results.map(r => r.result && r.result.model).filter(Boolean))];
|
|
1155
|
+
const actualRefs = results
|
|
1156
|
+
.map(r => r.result && r.result.reference_images)
|
|
1157
|
+
.find(refs => Array.isArray(refs) && refs.length);
|
|
1139
1158
|
return uiCompleted({
|
|
1140
1159
|
tool: 'get_generation_status', kind: 'status', client,
|
|
1141
|
-
model: 'Generations',
|
|
1160
|
+
model: modelsRan.length === 1 ? modelsRan[0] : 'Generations',
|
|
1142
1161
|
gen: {
|
|
1143
1162
|
generation_id: ids[0],
|
|
1144
1163
|
session_id: results[0] && results[0].session_id,
|
|
@@ -1146,6 +1165,7 @@ function registerGenerateTools(server, client, options = {}) {
|
|
|
1146
1165
|
type: results[0] && results[0].type,
|
|
1147
1166
|
},
|
|
1148
1167
|
settings: {},
|
|
1168
|
+
reference_images: actualRefs,
|
|
1149
1169
|
items: results.map(r => {
|
|
1150
1170
|
const res = r.result || {};
|
|
1151
1171
|
return {
|