comfyui-mcp 0.49.3 → 0.49.4
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/dist/orchestrator/agent-backend.js +8 -0
- package/dist/orchestrator/agent-backend.js.map +1 -1
- package/dist/orchestrator/codex-backend.js +49 -0
- package/dist/orchestrator/codex-backend.js.map +1 -1
- package/dist/orchestrator/grok-backend.js +5 -0
- package/dist/orchestrator/grok-backend.js.map +1 -1
- package/dist/orchestrator/index.js +317 -22
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/panel-agent.js +591 -67
- package/dist/orchestrator/panel-agent.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +505 -65
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/orchestrator/run-completion-journal.js +914 -0
- package/dist/orchestrator/run-completion-journal.js.map +1 -0
- package/dist/orchestrator/session-store.js +11 -3
- package/dist/orchestrator/session-store.js.map +1 -1
- package/dist/services/download-jobs.js +178 -14
- package/dist/services/download-jobs.js.map +1 -1
- package/dist/services/download-progress.js +16 -18
- package/dist/services/download-progress.js.map +1 -1
- package/dist/services/extra-paths.js +61 -9
- package/dist/services/extra-paths.js.map +1 -1
- package/dist/services/hello-retarget.js +165 -0
- package/dist/services/hello-retarget.js.map +1 -0
- package/dist/services/manifest.js +92 -9
- package/dist/services/manifest.js.map +1 -1
- package/dist/services/model-resolver.js +616 -17
- package/dist/services/model-resolver.js.map +1 -1
- package/dist/services/output-dir.js +63 -15
- package/dist/services/output-dir.js.map +1 -1
- package/dist/services/panel-pin-guard.js +6 -62
- package/dist/services/panel-pin-guard.js.map +1 -1
- package/dist/services/ui-bridge.js +77 -8
- package/dist/services/ui-bridge.js.map +1 -1
- package/dist/services/workspace-env.js +179 -3
- package/dist/services/workspace-env.js.map +1 -1
- package/dist/tools/extra-paths.js +6 -4
- package/dist/tools/extra-paths.js.map +1 -1
- package/dist/tools/model-extras.js +26 -7
- package/dist/tools/model-extras.js.map +1 -1
- package/dist/tools/model-management.js +36 -8
- package/dist/tools/model-management.js.map +1 -1
- package/dist/tools/report-issue.js +12 -2
- package/dist/tools/report-issue.js.map +1 -1
- package/dist/tools/vocabulary.js +21 -0
- package/dist/tools/vocabulary.js.map +1 -1
- package/package.json +1 -1
- package/scripts/gen-tool-docs.ts +138 -4
- package/scripts/tool-doc-examples.ts +794 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/tools/vocabulary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW;IACX,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,iCAAiC;IACjC,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,OAAO;IACP,qBAAqB;IACrB,uBAAuB;IACvB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,qBAAqB;IACrB,UAAU;IACV,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,kBAAkB;IAClB,kBAAkB;IAClB,iBAAiB;IACjB,mBAAmB;IACnB,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,yBAAyB;IACzB,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,WAAW;IACX,cAAc;IACd,cAAc;IACd,cAAc;IACd,uBAAuB;IACvB,qBAAqB;IACrB,oBAAoB;IACpB,YA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iB,IAAI,OAAO,OAAO,UAAU,IAAI,CAAC,WAAW,WAAW,CAAC;AAClF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comfyui-mcp",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.4",
|
|
4
4
|
"mcpName": "io.github.artokun/comfyui-mcp",
|
|
5
5
|
"description": "Local-first, agent-native control plane for ComfyUI — MCP server + autonomous sidebar agent that drives your live graph in natural language on ANY LLM: Claude/ChatGPT/Gemini on your subscription (no API key), free local models via Ollama (fully offline), or any hosted model via an OpenAI-compatible endpoint (DeepSeek, GLM, MiMo, OpenRouter). Generate images, video & audio, author and run workflows, manage models and custom nodes; a compact tool-router mode keeps even 4B models effective, and a built-in LLM Arena benchmarks them on real ComfyUI tasks. Also a Claude Code plugin with skills, slash commands, and installer packs. Local, LAN, VPS, or Comfy Cloud.",
|
|
6
6
|
"homepage": "https://comfyui-mcp.artokun.io/docs",
|
package/scripts/gen-tool-docs.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { fileURLToPath } from "node:url";
|
|
|
25
25
|
import { z } from "zod";
|
|
26
26
|
// zod 4 ships JSON Schema conversion natively (z.toJSONSchema) — no zod-to-json-schema.
|
|
27
27
|
import { registerAllTools } from "../src/tools/index.js";
|
|
28
|
+
import { TOOL_DOC_EXAMPLES, type ToolDocEntry } from "./tool-doc-examples.js";
|
|
28
29
|
|
|
29
30
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
30
31
|
const repoRoot = join(__dirname, "..");
|
|
@@ -351,6 +352,116 @@ function firstSentence(desc: string): string {
|
|
|
351
352
|
return (m ? m[0] : desc).trim();
|
|
352
353
|
}
|
|
353
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Validate every curated example in scripts/tool-doc-examples.ts against the
|
|
357
|
+
* tool's REAL zod schema, and fail generation if any of them is wrong.
|
|
358
|
+
*
|
|
359
|
+
* This exists because a documented call that does not typecheck is worse than no
|
|
360
|
+
* example at all: a reader copies it, it 400s, and they conclude the tool is
|
|
361
|
+
* broken. Prose cannot be unit-tested, so this is where examples get tested.
|
|
362
|
+
*
|
|
363
|
+
* Three distinct failures, each caught deliberately:
|
|
364
|
+
*
|
|
365
|
+
* 1. A key for a tool that no longer exists. During the consolidation tools are
|
|
366
|
+
* being renamed and folded together; an example still keyed by a retired name
|
|
367
|
+
* must become a loud failure, not a silently-ignored map entry.
|
|
368
|
+
*
|
|
369
|
+
* 2. A field that is not in the schema. zod objects STRIP unknown keys by
|
|
370
|
+
* default, so `safeParse` alone happily accepts `{"filenmae": "x"}` and
|
|
371
|
+
* reports success — the misspelling would ship. Hence the explicit key check
|
|
372
|
+
* against the JSON Schema's properties, before parsing.
|
|
373
|
+
*
|
|
374
|
+
* 3. A field with the wrong type or a missing required one. That is what
|
|
375
|
+
* `safeParse` is for, run against the same shape the MCP SDK advertises.
|
|
376
|
+
*/
|
|
377
|
+
function validateExamples(byName: Map<string, CapturedTool>): void {
|
|
378
|
+
const problems: string[] = [];
|
|
379
|
+
|
|
380
|
+
for (const [toolName, entry] of Object.entries(TOOL_DOC_EXAMPLES)) {
|
|
381
|
+
const tool = byName.get(toolName);
|
|
382
|
+
if (!tool) {
|
|
383
|
+
problems.push(
|
|
384
|
+
`${toolName}: no such tool is registered — it was probably renamed or ` +
|
|
385
|
+
`consolidated. Update or remove its entry in scripts/tool-doc-examples.ts.`,
|
|
386
|
+
);
|
|
387
|
+
continue;
|
|
388
|
+
}
|
|
389
|
+
const schema = z.object(tool.shape);
|
|
390
|
+
const json = z.toJSONSchema(schema, { reused: "inline", io: "input" }) as unknown as JsonSchema;
|
|
391
|
+
const known = new Set(Object.keys(json.properties ?? {}));
|
|
392
|
+
|
|
393
|
+
entry.examples.forEach((ex, i) => {
|
|
394
|
+
const where = `${toolName} example #${i + 1} ("${ex.ask}")`;
|
|
395
|
+
const unknownKeys = Object.keys(ex.args).filter((k) => !known.has(k));
|
|
396
|
+
if (unknownKeys.length > 0) {
|
|
397
|
+
problems.push(
|
|
398
|
+
`${where}: field(s) ${unknownKeys.map((k) => `\`${k}\``).join(", ")} ` +
|
|
399
|
+
`do not exist on this tool. Known fields: ${[...known].join(", ") || "(none)"}.`,
|
|
400
|
+
);
|
|
401
|
+
// Still parse below: a typo'd key is stripped, so the parse would pass
|
|
402
|
+
// and hide any OTHER problem in the same example.
|
|
403
|
+
}
|
|
404
|
+
const parsed = schema.safeParse(ex.args);
|
|
405
|
+
if (!parsed.success) {
|
|
406
|
+
const detail = parsed.error.issues
|
|
407
|
+
.map((iss) => `${iss.path.join(".") || "(root)"}: ${iss.message}`)
|
|
408
|
+
.join("; ");
|
|
409
|
+
problems.push(`${where}: does not satisfy the tool's schema — ${detail}`);
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (problems.length > 0) {
|
|
415
|
+
throw new Error(
|
|
416
|
+
`[gen-tool-docs] ${problems.length} documented example(s) do not match the live tool ` +
|
|
417
|
+
`schemas:\n ${problems.join("\n ")}\n` +
|
|
418
|
+
`Fix the example in scripts/tool-doc-examples.ts — do NOT relax this check. ` +
|
|
419
|
+
`An example that does not typecheck will be copied by a reader and will fail.`,
|
|
420
|
+
);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** Render the curated examples for one tool, or the generated skeleton if it has none. */
|
|
425
|
+
function renderExamples(t: CapturedTool, json: JsonSchema, entry?: ToolDocEntry): string[] {
|
|
426
|
+
const lines: string[] = [];
|
|
427
|
+
|
|
428
|
+
if (!entry || entry.examples.length === 0) {
|
|
429
|
+
lines.push("### Example", "");
|
|
430
|
+
lines.push(
|
|
431
|
+
"<Note>No worked example yet — the call below is a skeleton generated from the " +
|
|
432
|
+
"required parameters. Real examples live in `scripts/tool-doc-examples.ts`; " +
|
|
433
|
+
"contributions welcome.</Note>",
|
|
434
|
+
"",
|
|
435
|
+
);
|
|
436
|
+
lines.push(
|
|
437
|
+
"```json",
|
|
438
|
+
JSON.stringify({ tool: t.name, arguments: exampleArgs(t.name, json) }, null, 2),
|
|
439
|
+
"```",
|
|
440
|
+
"",
|
|
441
|
+
);
|
|
442
|
+
return lines;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
lines.push(entry.examples.length === 1 ? "### Example" : "### Examples", "");
|
|
446
|
+
for (const ex of entry.examples) {
|
|
447
|
+
// The ASK comes first on purpose. The audience for this page mostly does not
|
|
448
|
+
// type JSON at anything — they say a sentence to an agent and it makes the
|
|
449
|
+
// call. Leading with the sentence shows which request reaches this tool;
|
|
450
|
+
// leading with the JSON implies a calling convention they will never use.
|
|
451
|
+
lines.push(`**You say:** ${esc(ex.ask)}`, "");
|
|
452
|
+
lines.push(
|
|
453
|
+
"```json",
|
|
454
|
+
JSON.stringify({ tool: t.name, arguments: ex.args }, null, 2),
|
|
455
|
+
"```",
|
|
456
|
+
"",
|
|
457
|
+
);
|
|
458
|
+
if (ex.argsNote) lines.push(`<Note>${esc(ex.argsNote)}</Note>`, "");
|
|
459
|
+
lines.push(`**You get back:** ${esc(ex.returns)}`, "");
|
|
460
|
+
if (ex.caution) lines.push(`<Warning>${esc(ex.caution)}</Warning>`, "");
|
|
461
|
+
}
|
|
462
|
+
return lines;
|
|
463
|
+
}
|
|
464
|
+
|
|
354
465
|
function renderTool(t: CapturedTool): string {
|
|
355
466
|
// `io: "input"` matches what the MCP SDK advertises to clients
|
|
356
467
|
// (sdk/server/zod-json-schema-compat.js defaults pipeStrategy to 'input').
|
|
@@ -371,10 +482,21 @@ function renderTool(t: CapturedTool): string {
|
|
|
371
482
|
const required = new Set(json.required ?? []);
|
|
372
483
|
const paramNames = Object.keys(props);
|
|
373
484
|
|
|
485
|
+
const entry = TOOL_DOC_EXAMPLES[t.name];
|
|
486
|
+
|
|
374
487
|
const lines: string[] = [];
|
|
375
488
|
lines.push(`## ${t.name}`, "");
|
|
376
489
|
lines.push(esc(t.description), "");
|
|
377
490
|
|
|
491
|
+
// The gloss is ADDITIVE. The description above is written for model dispatch —
|
|
492
|
+
// it disambiguates this tool from its neighbours in the terms a model needs,
|
|
493
|
+
// which is why it talks about context cost and about which tool NOT to pick.
|
|
494
|
+
// Rewriting it for readability measurably degrades tool choice (#557/#654), so
|
|
495
|
+
// a human-facing sentence goes here, next to it, instead of over it.
|
|
496
|
+
if (entry?.gloss) {
|
|
497
|
+
lines.push(`<Tip>**In plain terms:** ${esc(entry.gloss)}</Tip>`, "");
|
|
498
|
+
}
|
|
499
|
+
|
|
378
500
|
if (paramNames.length > 0) {
|
|
379
501
|
lines.push("### Parameters", "");
|
|
380
502
|
for (const name of paramNames) {
|
|
@@ -385,10 +507,7 @@ function renderTool(t: CapturedTool): string {
|
|
|
385
507
|
lines.push("<Note>This tool takes no parameters.</Note>", "");
|
|
386
508
|
}
|
|
387
509
|
|
|
388
|
-
lines.push(
|
|
389
|
-
lines.push("<Note>Example coming soon — the call below is a generated skeleton.</Note>", "");
|
|
390
|
-
const args = exampleArgs(t.name, json);
|
|
391
|
-
lines.push("```json", JSON.stringify({ tool: t.name, arguments: args }, null, 2), "```", "");
|
|
510
|
+
lines.push(...renderExamples(t, json, entry));
|
|
392
511
|
lines.push("---", "");
|
|
393
512
|
return lines.join("\n");
|
|
394
513
|
}
|
|
@@ -408,6 +527,11 @@ async function main() {
|
|
|
408
527
|
await registerAllTools(mockServer as never);
|
|
409
528
|
|
|
410
529
|
const byName = new Map(captured.map((t) => [t.name, t]));
|
|
530
|
+
|
|
531
|
+
// Before ANY page is rendered — a bad example must abort the run, not be
|
|
532
|
+
// written into 16 files and then reported.
|
|
533
|
+
validateExamples(byName);
|
|
534
|
+
|
|
411
535
|
const mapped = new Set<string>();
|
|
412
536
|
mkdirSync(toolsDir, { recursive: true });
|
|
413
537
|
|
|
@@ -433,6 +557,16 @@ async function main() {
|
|
|
433
557
|
page.push("");
|
|
434
558
|
page.push(`<Info>${present.length} tool${present.length === 1 ? "" : "s"}. Generated from the live MCP tool schemas — do not edit by hand; run \`npm run docs:gen\`.</Info>`);
|
|
435
559
|
page.push("");
|
|
560
|
+
// Every page carries this. The JSON below is what the AGENT sends; readers
|
|
561
|
+
// arriving from a search result were being shown a calling convention they
|
|
562
|
+
// will never type, with nothing on the page to say so.
|
|
563
|
+
page.push(
|
|
564
|
+
"<Tip>**You don't type these calls.** Ask your agent for what you want in " +
|
|
565
|
+
"ordinary English — it chooses the tool and fills in the arguments. The JSON " +
|
|
566
|
+
"on this page is what it sends. New here? Start with " +
|
|
567
|
+
"[Using the tools](/using-tools).</Tip>",
|
|
568
|
+
);
|
|
569
|
+
page.push("");
|
|
436
570
|
for (const name of present) page.push(renderTool(byName.get(name)!));
|
|
437
571
|
|
|
438
572
|
pending.push({ path: join(toolsDir, `${cat.slug}.mdx`), content: page.join("\n") });
|