@kernel.chat/kbot 2.11.0 → 2.12.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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +11 -0
  4. package/dist/agent.js.map +1 -1
  5. package/dist/agents/agents.test.d.ts +2 -0
  6. package/dist/agents/agents.test.d.ts.map +1 -0
  7. package/dist/agents/agents.test.js +127 -0
  8. package/dist/agents/agents.test.js.map +1 -0
  9. package/dist/cli.js +68 -1
  10. package/dist/cli.js.map +1 -1
  11. package/dist/evolution.d.ts +112 -0
  12. package/dist/evolution.d.ts.map +1 -0
  13. package/dist/evolution.js +642 -0
  14. package/dist/evolution.js.map +1 -0
  15. package/dist/evolution.test.d.ts +2 -0
  16. package/dist/evolution.test.d.ts.map +1 -0
  17. package/dist/evolution.test.js +160 -0
  18. package/dist/evolution.test.js.map +1 -0
  19. package/dist/ide/acp-server.js +2 -2
  20. package/dist/quality-diversity.d.ts +106 -0
  21. package/dist/quality-diversity.d.ts.map +1 -0
  22. package/dist/quality-diversity.js +296 -0
  23. package/dist/quality-diversity.js.map +1 -0
  24. package/dist/tools/comfyui-plugin.d.ts +2 -0
  25. package/dist/tools/comfyui-plugin.d.ts.map +1 -0
  26. package/dist/tools/comfyui-plugin.js +523 -0
  27. package/dist/tools/comfyui-plugin.js.map +1 -0
  28. package/dist/tools/creative.test.d.ts +2 -0
  29. package/dist/tools/creative.test.d.ts.map +1 -0
  30. package/dist/tools/creative.test.js +281 -0
  31. package/dist/tools/creative.test.js.map +1 -0
  32. package/dist/tools/index.d.ts.map +1 -1
  33. package/dist/tools/index.js +5 -1
  34. package/dist/tools/index.js.map +1 -1
  35. package/dist/tools/magenta-plugin.d.ts +2 -0
  36. package/dist/tools/magenta-plugin.d.ts.map +1 -0
  37. package/dist/tools/magenta-plugin.js +405 -0
  38. package/dist/tools/magenta-plugin.js.map +1 -0
  39. package/dist/ui.js +1 -1
  40. package/package.json +2 -2
@@ -0,0 +1,523 @@
1
+ // K:BOT ComfyUI Plugin — Local AI image generation via ComfyUI
2
+ // Connects to a locally-running ComfyUI instance at http://127.0.0.1:8188
3
+ // for txt2img, img2img, model listing, and queue management.
4
+ import { readFileSync } from 'node:fs';
5
+ import { basename } from 'node:path';
6
+ import { registerTool } from './index.js';
7
+ const COMFYUI_BASE = 'http://127.0.0.1:8188';
8
+ /** Build a minimal txt2img workflow for ComfyUI */
9
+ function buildTxt2ImgWorkflow(opts) {
10
+ return {
11
+ '3': {
12
+ class_type: 'KSampler',
13
+ inputs: {
14
+ seed: opts.seed,
15
+ steps: opts.steps,
16
+ cfg: opts.cfg_scale,
17
+ sampler_name: 'euler',
18
+ scheduler: 'normal',
19
+ denoise: 1.0,
20
+ model: ['4', 0],
21
+ positive: ['6', 0],
22
+ negative: ['7', 0],
23
+ latent_image: ['5', 0],
24
+ },
25
+ },
26
+ '4': {
27
+ class_type: 'CheckpointLoaderSimple',
28
+ inputs: {
29
+ ckpt_name: opts.model,
30
+ },
31
+ },
32
+ '5': {
33
+ class_type: 'EmptyLatentImage',
34
+ inputs: {
35
+ width: opts.width,
36
+ height: opts.height,
37
+ batch_size: 1,
38
+ },
39
+ },
40
+ '6': {
41
+ class_type: 'CLIPTextEncode',
42
+ inputs: {
43
+ text: opts.prompt,
44
+ clip: ['4', 1],
45
+ },
46
+ },
47
+ '7': {
48
+ class_type: 'CLIPTextEncode',
49
+ inputs: {
50
+ text: opts.negative_prompt,
51
+ clip: ['4', 1],
52
+ },
53
+ },
54
+ '8': {
55
+ class_type: 'VAEDecode',
56
+ inputs: {
57
+ samples: ['3', 0],
58
+ vae: ['4', 2],
59
+ },
60
+ },
61
+ '9': {
62
+ class_type: 'SaveImage',
63
+ inputs: {
64
+ filename_prefix: 'kbot',
65
+ images: ['8', 0],
66
+ },
67
+ },
68
+ };
69
+ }
70
+ /** Build an img2img workflow for ComfyUI */
71
+ function buildImg2ImgWorkflow(opts) {
72
+ return {
73
+ '3': {
74
+ class_type: 'KSampler',
75
+ inputs: {
76
+ seed: opts.seed,
77
+ steps: opts.steps,
78
+ cfg: opts.cfg_scale,
79
+ sampler_name: 'euler',
80
+ scheduler: 'normal',
81
+ denoise: opts.denoise,
82
+ model: ['4', 0],
83
+ positive: ['6', 0],
84
+ negative: ['7', 0],
85
+ latent_image: ['10', 0],
86
+ },
87
+ },
88
+ '4': {
89
+ class_type: 'CheckpointLoaderSimple',
90
+ inputs: {
91
+ ckpt_name: opts.model,
92
+ },
93
+ },
94
+ '6': {
95
+ class_type: 'CLIPTextEncode',
96
+ inputs: {
97
+ text: opts.prompt,
98
+ clip: ['4', 1],
99
+ },
100
+ },
101
+ '7': {
102
+ class_type: 'CLIPTextEncode',
103
+ inputs: {
104
+ text: opts.negative_prompt,
105
+ clip: ['4', 1],
106
+ },
107
+ },
108
+ '8': {
109
+ class_type: 'VAEDecode',
110
+ inputs: {
111
+ samples: ['3', 0],
112
+ vae: ['4', 2],
113
+ },
114
+ },
115
+ '9': {
116
+ class_type: 'SaveImage',
117
+ inputs: {
118
+ filename_prefix: 'kbot',
119
+ images: ['8', 0],
120
+ },
121
+ },
122
+ '10': {
123
+ class_type: 'VAEEncode',
124
+ inputs: {
125
+ pixels: ['11', 0],
126
+ vae: ['4', 2],
127
+ },
128
+ },
129
+ '11': {
130
+ class_type: 'LoadImage',
131
+ inputs: {
132
+ image: opts.image_name,
133
+ upload: 'image',
134
+ },
135
+ },
136
+ };
137
+ }
138
+ /** Poll ComfyUI history until a prompt completes or times out */
139
+ async function pollForCompletion(promptId, timeoutMs = 120_000) {
140
+ const start = Date.now();
141
+ while (Date.now() - start < timeoutMs) {
142
+ await new Promise(resolve => setTimeout(resolve, 1000));
143
+ try {
144
+ const res = await fetch(`${COMFYUI_BASE}/history/${promptId}`, {
145
+ signal: AbortSignal.timeout(5000),
146
+ });
147
+ if (!res.ok)
148
+ continue;
149
+ const history = await res.json();
150
+ const entry = history[promptId];
151
+ if (entry) {
152
+ return entry;
153
+ }
154
+ }
155
+ catch {
156
+ // Connection error or timeout — keep polling
157
+ }
158
+ }
159
+ throw new Error(`ComfyUI generation timed out after ${timeoutMs / 1000}s`);
160
+ }
161
+ /** Extract output filenames from a completed history entry */
162
+ function extractOutputFiles(historyEntry) {
163
+ const filenames = [];
164
+ try {
165
+ const outputs = historyEntry.outputs;
166
+ for (const nodeId of Object.keys(outputs || {})) {
167
+ const nodeOutput = outputs[nodeId];
168
+ if (nodeOutput?.images) {
169
+ for (const img of nodeOutput.images) {
170
+ if (img.filename) {
171
+ const subfolder = img.subfolder || '';
172
+ const type = img.type || 'output';
173
+ filenames.push(`${img.filename} (subfolder: ${subfolder}, type: ${type})`);
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+ catch {
180
+ // Malformed output — return empty
181
+ }
182
+ return filenames;
183
+ }
184
+ export function registerComfyUITools() {
185
+ // 1. comfyui_status — Check if ComfyUI is running
186
+ registerTool({
187
+ name: 'comfyui_status',
188
+ description: 'Check if a local ComfyUI instance is running and return system stats including GPU info and queue length. ComfyUI must be running at http://127.0.0.1:8188.',
189
+ parameters: {},
190
+ tier: 'free',
191
+ async execute() {
192
+ try {
193
+ const res = await fetch(`${COMFYUI_BASE}/system_stats`, {
194
+ signal: AbortSignal.timeout(5000),
195
+ });
196
+ if (!res.ok) {
197
+ return `Error: ComfyUI responded with HTTP ${res.status}`;
198
+ }
199
+ const stats = await res.json();
200
+ const parts = ['**ComfyUI is running**\n'];
201
+ // System info
202
+ const system = stats.system;
203
+ if (system) {
204
+ parts.push(`**System**: OS=${system.os || 'unknown'}, Python=${system.python_version || 'unknown'}`);
205
+ if (system.embedded_python !== undefined)
206
+ parts.push(`Embedded Python: ${system.embedded_python}`);
207
+ }
208
+ // GPU/device info
209
+ const devices = stats.devices;
210
+ if (devices && devices.length > 0) {
211
+ parts.push('\n**Devices:**');
212
+ for (const dev of devices) {
213
+ const name = dev.name || 'unknown';
214
+ const type = dev.type || 'unknown';
215
+ const vramTotal = typeof dev.vram_total === 'number' ? `${(dev.vram_total / (1024 * 1024 * 1024)).toFixed(1)}GB` : 'unknown';
216
+ const vramFree = typeof dev.vram_free === 'number' ? `${(dev.vram_free / (1024 * 1024 * 1024)).toFixed(1)}GB` : 'unknown';
217
+ parts.push(`- ${name} (${type}): VRAM ${vramFree} free / ${vramTotal} total`);
218
+ }
219
+ }
220
+ return parts.join('\n');
221
+ }
222
+ catch (err) {
223
+ return `Error: ComfyUI is not reachable at ${COMFYUI_BASE}. Make sure ComfyUI is running locally.\n${err instanceof Error ? err.message : String(err)}`;
224
+ }
225
+ },
226
+ });
227
+ // 2. comfyui_generate — Text-to-image generation
228
+ registerTool({
229
+ name: 'comfyui_generate',
230
+ description: 'Generate an image from a text prompt using ComfyUI (txt2img). Builds and queues a Stable Diffusion workflow, polls until completion, and returns the output filename. ComfyUI must be running locally.',
231
+ parameters: {
232
+ prompt: { type: 'string', description: 'The text prompt describing the image to generate', required: true },
233
+ negative_prompt: { type: 'string', description: 'Things to exclude from the image (default: empty)' },
234
+ width: { type: 'number', description: 'Image width in pixels (default: 512)' },
235
+ height: { type: 'number', description: 'Image height in pixels (default: 512)' },
236
+ steps: { type: 'number', description: 'Number of sampling steps (default: 20)' },
237
+ cfg_scale: { type: 'number', description: 'CFG scale / guidance strength (default: 7)' },
238
+ seed: { type: 'number', description: 'Random seed for reproducibility (default: random)' },
239
+ model: { type: 'string', description: 'Checkpoint model name (default: v1-5-pruned-emaonly.safetensors)' },
240
+ },
241
+ tier: 'free',
242
+ timeout: 180_000, // 3 min for generation
243
+ async execute(args) {
244
+ const prompt = String(args.prompt || '');
245
+ if (!prompt)
246
+ return 'Error: prompt is required';
247
+ const negative_prompt = String(args.negative_prompt || '');
248
+ const width = typeof args.width === 'number' ? args.width : 512;
249
+ const height = typeof args.height === 'number' ? args.height : 512;
250
+ const steps = typeof args.steps === 'number' ? args.steps : 20;
251
+ const cfg_scale = typeof args.cfg_scale === 'number' ? args.cfg_scale : 7;
252
+ const seed = typeof args.seed === 'number' ? args.seed : Math.floor(Math.random() * 2147483647);
253
+ const model = String(args.model || 'v1-5-pruned-emaonly.safetensors');
254
+ const workflow = buildTxt2ImgWorkflow({ prompt, negative_prompt, width, height, steps, cfg_scale, seed, model });
255
+ const clientId = crypto.randomUUID();
256
+ // Queue the prompt
257
+ let promptId;
258
+ try {
259
+ const res = await fetch(`${COMFYUI_BASE}/prompt`, {
260
+ method: 'POST',
261
+ headers: { 'Content-Type': 'application/json' },
262
+ body: JSON.stringify({ prompt: workflow, client_id: clientId }),
263
+ signal: AbortSignal.timeout(10000),
264
+ });
265
+ if (!res.ok) {
266
+ const errorText = await res.text();
267
+ return `Error: ComfyUI rejected the workflow (HTTP ${res.status}): ${errorText}`;
268
+ }
269
+ const data = await res.json();
270
+ promptId = String(data.prompt_id || '');
271
+ if (!promptId)
272
+ return 'Error: No prompt_id returned from ComfyUI';
273
+ }
274
+ catch (err) {
275
+ return `Error: Could not connect to ComfyUI at ${COMFYUI_BASE}.\n${err instanceof Error ? err.message : String(err)}`;
276
+ }
277
+ // Poll for completion
278
+ try {
279
+ const historyEntry = await pollForCompletion(promptId);
280
+ const files = extractOutputFiles(historyEntry);
281
+ if (files.length === 0) {
282
+ return `Generation completed (prompt_id: ${promptId}) but no output images were found. Check ComfyUI logs for errors.`;
283
+ }
284
+ const parts = [
285
+ '**Image generated successfully**\n',
286
+ `**Prompt ID**: ${promptId}`,
287
+ `**Seed**: ${seed}`,
288
+ `**Settings**: ${width}x${height}, ${steps} steps, CFG ${cfg_scale}`,
289
+ `**Model**: ${model}`,
290
+ `\n**Output files**:`,
291
+ ...files.map(f => `- ${f}`),
292
+ `\nView at: ${COMFYUI_BASE}/view?filename=<filename>&type=output`,
293
+ ];
294
+ return parts.join('\n');
295
+ }
296
+ catch (err) {
297
+ return `Error during generation: ${err instanceof Error ? err.message : String(err)}\nPrompt ID: ${promptId}`;
298
+ }
299
+ },
300
+ });
301
+ // 3. comfyui_img2img — Image-to-image generation
302
+ registerTool({
303
+ name: 'comfyui_img2img',
304
+ description: 'Generate an image from an existing source image and text prompt using ComfyUI (img2img). Uploads the source image to ComfyUI, then runs a Stable Diffusion workflow. ComfyUI must be running locally.',
305
+ parameters: {
306
+ image_path: { type: 'string', description: 'Absolute path to the source image file', required: true },
307
+ prompt: { type: 'string', description: 'The text prompt describing the desired output', required: true },
308
+ negative_prompt: { type: 'string', description: 'Things to exclude from the image (default: empty)' },
309
+ width: { type: 'number', description: 'Output image width in pixels (default: 512)' },
310
+ height: { type: 'number', description: 'Output image height in pixels (default: 512)' },
311
+ steps: { type: 'number', description: 'Number of sampling steps (default: 20)' },
312
+ cfg_scale: { type: 'number', description: 'CFG scale / guidance strength (default: 7)' },
313
+ denoise: { type: 'number', description: 'Denoise strength 0.0-1.0 — lower preserves more of original (default: 0.75)' },
314
+ seed: { type: 'number', description: 'Random seed for reproducibility (default: random)' },
315
+ model: { type: 'string', description: 'Checkpoint model name (default: v1-5-pruned-emaonly.safetensors)' },
316
+ },
317
+ tier: 'free',
318
+ timeout: 180_000,
319
+ async execute(args) {
320
+ const imagePath = String(args.image_path || '');
321
+ const prompt = String(args.prompt || '');
322
+ if (!imagePath)
323
+ return 'Error: image_path is required';
324
+ if (!prompt)
325
+ return 'Error: prompt is required';
326
+ const negative_prompt = String(args.negative_prompt || '');
327
+ const width = typeof args.width === 'number' ? args.width : 512;
328
+ const height = typeof args.height === 'number' ? args.height : 512;
329
+ const steps = typeof args.steps === 'number' ? args.steps : 20;
330
+ const cfg_scale = typeof args.cfg_scale === 'number' ? args.cfg_scale : 7;
331
+ const denoise = typeof args.denoise === 'number' ? args.denoise : 0.75;
332
+ const seed = typeof args.seed === 'number' ? args.seed : Math.floor(Math.random() * 2147483647);
333
+ const model = String(args.model || 'v1-5-pruned-emaonly.safetensors');
334
+ // Read and upload the source image
335
+ let imageData;
336
+ try {
337
+ imageData = readFileSync(imagePath);
338
+ }
339
+ catch (err) {
340
+ return `Error: Could not read image file: ${imagePath}\n${err instanceof Error ? err.message : String(err)}`;
341
+ }
342
+ const filename = basename(imagePath);
343
+ // Determine MIME type from extension
344
+ const ext = filename.split('.').pop()?.toLowerCase() || 'png';
345
+ const mimeMap = { png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', webp: 'image/webp', bmp: 'image/bmp', gif: 'image/gif' };
346
+ const mimeType = mimeMap[ext] || 'image/png';
347
+ // Build multipart form body manually (no FormData dependency issues)
348
+ const boundary = `----KBotBoundary${Date.now()}`;
349
+ const header = [
350
+ `--${boundary}`,
351
+ `Content-Disposition: form-data; name="image"; filename="${filename}"`,
352
+ `Content-Type: ${mimeType}`,
353
+ '',
354
+ '',
355
+ ].join('\r\n');
356
+ const footer = `\r\n--${boundary}--\r\n`;
357
+ const headerBuf = Buffer.from(header, 'utf-8');
358
+ const footerBuf = Buffer.from(footer, 'utf-8');
359
+ const body = Buffer.concat([headerBuf, imageData, footerBuf]);
360
+ let uploadedName;
361
+ try {
362
+ const res = await fetch(`${COMFYUI_BASE}/upload/image`, {
363
+ method: 'POST',
364
+ headers: {
365
+ 'Content-Type': `multipart/form-data; boundary=${boundary}`,
366
+ },
367
+ body,
368
+ signal: AbortSignal.timeout(30000),
369
+ });
370
+ if (!res.ok) {
371
+ const errorText = await res.text();
372
+ return `Error: Failed to upload image to ComfyUI (HTTP ${res.status}): ${errorText}`;
373
+ }
374
+ const data = await res.json();
375
+ uploadedName = String(data.name || filename);
376
+ }
377
+ catch (err) {
378
+ return `Error: Could not connect to ComfyUI for image upload.\n${err instanceof Error ? err.message : String(err)}`;
379
+ }
380
+ // Build and queue the img2img workflow
381
+ const workflow = buildImg2ImgWorkflow({
382
+ prompt, negative_prompt, width, height, steps, cfg_scale, seed, model,
383
+ image_name: uploadedName,
384
+ denoise,
385
+ });
386
+ const clientId = crypto.randomUUID();
387
+ let promptId;
388
+ try {
389
+ const res = await fetch(`${COMFYUI_BASE}/prompt`, {
390
+ method: 'POST',
391
+ headers: { 'Content-Type': 'application/json' },
392
+ body: JSON.stringify({ prompt: workflow, client_id: clientId }),
393
+ signal: AbortSignal.timeout(10000),
394
+ });
395
+ if (!res.ok) {
396
+ const errorText = await res.text();
397
+ return `Error: ComfyUI rejected the img2img workflow (HTTP ${res.status}): ${errorText}`;
398
+ }
399
+ const data = await res.json();
400
+ promptId = String(data.prompt_id || '');
401
+ if (!promptId)
402
+ return 'Error: No prompt_id returned from ComfyUI';
403
+ }
404
+ catch (err) {
405
+ return `Error: Could not connect to ComfyUI at ${COMFYUI_BASE}.\n${err instanceof Error ? err.message : String(err)}`;
406
+ }
407
+ // Poll for completion
408
+ try {
409
+ const historyEntry = await pollForCompletion(promptId);
410
+ const files = extractOutputFiles(historyEntry);
411
+ if (files.length === 0) {
412
+ return `Generation completed (prompt_id: ${promptId}) but no output images were found. Check ComfyUI logs.`;
413
+ }
414
+ const parts = [
415
+ '**Img2Img generated successfully**\n',
416
+ `**Prompt ID**: ${promptId}`,
417
+ `**Source**: ${filename} (uploaded as ${uploadedName})`,
418
+ `**Seed**: ${seed}`,
419
+ `**Settings**: ${width}x${height}, ${steps} steps, CFG ${cfg_scale}, denoise ${denoise}`,
420
+ `**Model**: ${model}`,
421
+ `\n**Output files**:`,
422
+ ...files.map(f => `- ${f}`),
423
+ `\nView at: ${COMFYUI_BASE}/view?filename=<filename>&type=output`,
424
+ ];
425
+ return parts.join('\n');
426
+ }
427
+ catch (err) {
428
+ return `Error during img2img generation: ${err instanceof Error ? err.message : String(err)}\nPrompt ID: ${promptId}`;
429
+ }
430
+ },
431
+ });
432
+ // 4. comfyui_list_models — List available checkpoint models
433
+ registerTool({
434
+ name: 'comfyui_list_models',
435
+ description: 'List all available Stable Diffusion checkpoint models installed in ComfyUI. Useful for choosing which model to use with comfyui_generate.',
436
+ parameters: {},
437
+ tier: 'free',
438
+ async execute() {
439
+ try {
440
+ const res = await fetch(`${COMFYUI_BASE}/object_info/CheckpointLoaderSimple`, {
441
+ signal: AbortSignal.timeout(10000),
442
+ });
443
+ if (!res.ok) {
444
+ return `Error: ComfyUI responded with HTTP ${res.status}`;
445
+ }
446
+ const data = await res.json();
447
+ // Navigate: CheckpointLoaderSimple → input → required → ckpt_name → [0] (list of model names)
448
+ const node = data.CheckpointLoaderSimple;
449
+ const input = node?.input;
450
+ const required = input?.required;
451
+ const ckptNameDef = required?.ckpt_name;
452
+ const modelList = ckptNameDef?.[0];
453
+ if (!modelList || modelList.length === 0) {
454
+ return 'No checkpoint models found. Make sure models are placed in ComfyUI\'s models/checkpoints/ directory.';
455
+ }
456
+ const parts = [`**Available Checkpoint Models** (${modelList.length}):\n`];
457
+ for (const m of modelList) {
458
+ parts.push(`- ${m}`);
459
+ }
460
+ return parts.join('\n');
461
+ }
462
+ catch (err) {
463
+ return `Error: Could not connect to ComfyUI at ${COMFYUI_BASE}.\n${err instanceof Error ? err.message : String(err)}`;
464
+ }
465
+ },
466
+ });
467
+ // 5. comfyui_queue — Show current queue status
468
+ registerTool({
469
+ name: 'comfyui_queue',
470
+ description: 'Show the current ComfyUI queue status — how many prompts are running and how many are pending.',
471
+ parameters: {},
472
+ tier: 'free',
473
+ async execute() {
474
+ try {
475
+ const res = await fetch(`${COMFYUI_BASE}/queue`, {
476
+ signal: AbortSignal.timeout(5000),
477
+ });
478
+ if (!res.ok) {
479
+ return `Error: ComfyUI responded with HTTP ${res.status}`;
480
+ }
481
+ const data = await res.json();
482
+ const running = data.queue_running;
483
+ const pending = data.queue_pending;
484
+ const runningCount = running?.length ?? 0;
485
+ const pendingCount = pending?.length ?? 0;
486
+ const parts = [
487
+ '**ComfyUI Queue Status**\n',
488
+ `**Running**: ${runningCount} prompt${runningCount !== 1 ? 's' : ''}`,
489
+ `**Pending**: ${pendingCount} prompt${pendingCount !== 1 ? 's' : ''}`,
490
+ ];
491
+ if (runningCount === 0 && pendingCount === 0) {
492
+ parts.push('\nQueue is empty — ready for new generations.');
493
+ }
494
+ // Show details for running prompts
495
+ if (running && running.length > 0) {
496
+ parts.push('\n**Currently running:**');
497
+ for (const item of running) {
498
+ if (Array.isArray(item) && item.length >= 2) {
499
+ parts.push(`- Prompt ID: ${item[1]}`);
500
+ }
501
+ }
502
+ }
503
+ // Show details for pending prompts
504
+ if (pending && pending.length > 0) {
505
+ parts.push('\n**Pending:**');
506
+ for (const item of pending.slice(0, 10)) {
507
+ if (Array.isArray(item) && item.length >= 2) {
508
+ parts.push(`- Prompt ID: ${item[1]}`);
509
+ }
510
+ }
511
+ if (pending.length > 10) {
512
+ parts.push(`- ... and ${pending.length - 10} more`);
513
+ }
514
+ }
515
+ return parts.join('\n');
516
+ }
517
+ catch (err) {
518
+ return `Error: Could not connect to ComfyUI at ${COMFYUI_BASE}.\n${err instanceof Error ? err.message : String(err)}`;
519
+ }
520
+ },
521
+ });
522
+ }
523
+ //# sourceMappingURL=comfyui-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comfyui-plugin.js","sourceRoot":"","sources":["../../src/tools/comfyui-plugin.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,0EAA0E;AAC1E,6DAA6D;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAE5C,mDAAmD;AACnD,SAAS,oBAAoB,CAAC,IAS7B;IACC,OAAO;QACL,GAAG,EAAE;YACH,UAAU,EAAE,UAAU;YACtB,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,GAAG,EAAE,IAAI,CAAC,SAAS;gBACnB,YAAY,EAAE,OAAO;gBACrB,SAAS,EAAE,QAAQ;gBACnB,OAAO,EAAE,GAAG;gBACZ,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;gBACf,QAAQ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mC;gBACnC,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAClC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;oBAC5B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;wBACxC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;4BAC5C,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;wBACvC,CAAC;oBACH,CAAC;oBACD,IAAI,OAAO,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;wBACxB,KAAK,CAAC,IAAI,CAAC,aAAa,OAAO,CAAC,MAAM,GAAG,EAAE,OAAO,CAAC,CAAA;oBACrD,CAAC;gBACH,CAAC;gBAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACzB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,0CAA0C,YAAY,MAAM,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAA;YACvH,CAAC;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=creative.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creative.test.d.ts","sourceRoot":"","sources":["../../src/tools/creative.test.ts"],"names":[],"mappings":""}