comfyui-mcp 0.52.13 → 0.52.15
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/README.md +3 -2
- package/dist/boot.js +6 -0
- package/dist/boot.js.map +1 -1
- package/dist/handshake-instructions.js +68 -0
- package/dist/handshake-instructions.js.map +1 -0
- package/dist/orchestrator/agent-backend.js +17 -0
- package/dist/orchestrator/agent-backend.js.map +1 -1
- package/dist/orchestrator/backend-readiness.js +43 -0
- package/dist/orchestrator/backend-readiness.js.map +1 -1
- package/dist/orchestrator/index.js +62 -38
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/panel-mcp-http.js +5 -1
- package/dist/orchestrator/panel-mcp-http.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +105 -5
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/orchestrator/qwen-backend.js +1029 -0
- package/dist/orchestrator/qwen-backend.js.map +1 -0
- package/dist/orchestrator/rgthree-fast-groups-property.js +53 -0
- package/dist/orchestrator/rgthree-fast-groups-property.js.map +1 -0
- package/dist/services/comfy-view-ref.js +236 -4
- package/dist/services/comfy-view-ref.js.map +1 -1
- package/dist/services/panel-launcher.js +5 -1
- package/dist/services/panel-launcher.js.map +1 -1
- package/dist/services/ui-bridge.js +5 -0
- package/dist/services/ui-bridge.js.map +1 -1
- package/dist/tools/vocabulary.js +1 -1
- package/docs/design/panel-surface.txt +1 -0
- package/locales/ar/main.json +2 -1
- package/locales/en/main.json +2 -1
- package/locales/es/main.json +2 -1
- package/locales/fa/main.json +2 -1
- package/locales/fr/main.json +2 -1
- package/locales/ja/main.json +2 -1
- package/locales/ko/main.json +2 -1
- package/locales/pt-BR/main.json +2 -1
- package/locales/ru/main.json +2 -1
- package/locales/tr/main.json +2 -1
- package/locales/zh/main.json +2 -1
- package/locales/zh-TW/main.json +2 -1
- package/package.json +1 -1
- package/plugin/.mcp.json +2 -3
- package/plugin/scripts/launch-server.mjs +130 -0
- package/plugin/skills/minimax-h3-video/SKILL.md +270 -0
- package/plugin/skills/model-registry/SKILL.md +16 -0
- package/plugin/skills/rgthree/SKILL.md +26 -1
|
@@ -21,6 +21,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
21
21
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
22
22
|
import { isInitializeRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
23
23
|
import { makePanelToolCtx, registerPanelTools } from "./panel-tools.js";
|
|
24
|
+
import { PANEL_HANDSHAKE_INSTRUCTIONS } from "../handshake-instructions.js";
|
|
24
25
|
import { logger } from "../utils/logger.js";
|
|
25
26
|
/** Read the raw request body (Codex POSTs JSON-RPC). The transport wants the
|
|
26
27
|
* parsed body passed alongside the req/res. */
|
|
@@ -67,7 +68,10 @@ export function startPanelMcpHttpServer(bridge, port, host = "127.0.0.1", workfl
|
|
|
67
68
|
// arrive. Kept in sync at `listen`, before any of those readers can run.
|
|
68
69
|
let boundPort = port;
|
|
69
70
|
const newSession = async (tabId) => {
|
|
70
|
-
const server = new McpServer({ name: "comfyui-panel", version: "1.0.0" }
|
|
71
|
+
const server = new McpServer({ name: "comfyui-panel", version: "1.0.0" },
|
|
72
|
+
// #1747 — live-canvas flows only. Different audience from the stdio
|
|
73
|
+
// server; do not recap that catalog here.
|
|
74
|
+
{ instructions: PANEL_HANDSHAKE_INSTRUCTIONS });
|
|
71
75
|
// Tab-bound context: every tool forwards to the bridge for THIS tab — the
|
|
72
76
|
// same surface the Claude in-process server exposes (shared defs).
|
|
73
77
|
registerPanelTools(server, makePanelToolCtx(bridge, tabId, workflowTargets));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel-mcp-http.js","sourceRoot":"","sources":["../../src/orchestrator/panel-mcp-http.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,iFAAiF;AACj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M,EAAE,EAAE,CAAC;wBACxC,KAAK,MAAM,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;4BACrC,IAAI,CAAC;gCACH,MAAM,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;4BAC5B,CAAC;4BAAC,MAAM,CAAC;gCACP,8BAA8B;4BAChC,CAAC;wBACH,CAAC;oBACH,CAAC;oBACD,IAAI,CAAC,KAAK,EAAE,CAAC;oBACb,MAAM,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9D,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -28,7 +28,7 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
28
28
|
import { resolveToolSurfacePolicy, toolActionPolicyError, toolAllowed, } from "../tools/tool-surface-filter.js";
|
|
29
29
|
import { logger as toolPolicyLogger } from "../utils/logger.js";
|
|
30
30
|
import { existsSync, readdirSync, readFileSync, realpathSync, statSync } from "node:fs";
|
|
31
|
-
import { forwardedByReferenceNote, oversizedInlineRefusal, resolveServableViewRef, unverifiedViewRefNote, } from "../services/comfy-view-ref.js";
|
|
31
|
+
import { forwardedByReferenceNote, oversizedInlineRefusal, resolveServableViewRef, stageFileIntoServedDir, stagedForDisplayNote, unverifiedViewRefNote, } from "../services/comfy-view-ref.js";
|
|
32
32
|
import { extname, isAbsolute, join, resolve, sep } from "node:path";
|
|
33
33
|
import { fileURLToPath } from "node:url";
|
|
34
34
|
import { comfyuiFetch } from "../comfyui/fetch.js";
|
|
@@ -46,6 +46,7 @@ import { primePanelBase, verifiedPanelDiskVersion, } from "../services/panel-wor
|
|
|
46
46
|
import { conversationOfScopeAddress, isScopeAddress, shortTabId } from "../services/session-scope.js";
|
|
47
47
|
import { NODE_ID_MESSAGE, NODE_ID_PATTERN, normalizeNodeId } from "./node-id.js";
|
|
48
48
|
import { parseContradictoryPromotedWidgetRefusal, resolveInnerPromotedTarget, } from "./promoted-widget.js";
|
|
49
|
+
import { fastGroupsFilterPropertyNote, isFastGroupsFilterProperty, } from "./rgthree-fast-groups-property.js";
|
|
49
50
|
import { isPlainObject, isStampMismatchSaveRefusal, patchOpenIdentity, shouldRebindOpenIdentity, workflowFromSerializeReply, } from "./open-identity-normalization.js";
|
|
50
51
|
import { clearSwitchHold, describeSwitchHold, recordSwitchHold, successProvesSwitchCleared, } from "./switch-hold.js";
|
|
51
52
|
import { NO_ORIGIN_REMEDY } from "./fence-refusal.js";
|
|
@@ -8810,6 +8811,9 @@ export const RETRY_TOKEN_CMD_BY_TOOL = {
|
|
|
8810
8811
|
panel_load_workflow: "graph_load",
|
|
8811
8812
|
panel_connect: "graph_connect",
|
|
8812
8813
|
panel_disconnect: "graph_disconnect",
|
|
8814
|
+
// Idempotent: inputs/outputs/default_mode are absolute values, so a deduped
|
|
8815
|
+
// retry writes the same metadata again rather than doubling anything.
|
|
8816
|
+
panel_configure_app_mode: "graph_configure_app_mode",
|
|
8813
8817
|
panel_set_widget: "graph_set_widget",
|
|
8814
8818
|
panel_remove_widget: "graph_remove_widget",
|
|
8815
8819
|
panel_set_property: "graph_set_node_property",
|
|
@@ -9799,7 +9803,7 @@ export function buildPanelToolDefs() {
|
|
|
9799
9803
|
// 6000 ms default ack on a large install (#599) — a false timeout here would read
|
|
9800
9804
|
// as "the removal failed" for a removal that succeeded.
|
|
9801
9805
|
ctx.call({ cmd: "graph_remove_widget", node_id: args.node_id, widget: args.widget }, OBJECT_INFO_REFRESH_ACK_TIMEOUT_MS)),
|
|
9802
|
-
def("panel_set_property", "Set a node's LiteGraph PROPERTY (the right-click → Properties panel), NOT a widget — the counterpart to panel_set_widget, which only reaches `widgets`. Many custom nodes are configured entirely through node properties: e.g. the rgthree Fast Groups Bypasser's filters `matchTitle`, `matchColors`, `sort`, and `toggleRestriction` are node properties, and without `matchTitle` the node enumerates EVERY group in the workflow (a footgun). Sets node.properties[name] and, when the node defines an onPropertyChanged callback (
|
|
9806
|
+
def("panel_set_property", "Set a node's LiteGraph PROPERTY (the right-click → Properties panel), NOT a widget — the counterpart to panel_set_widget, which only reaches `widgets`. Many custom nodes are configured entirely through node properties: e.g. the rgthree Fast Groups Bypasser's filters `matchTitle`, `matchColors`, `sort`, and `toggleRestriction` are node properties, and without `matchTitle` the node enumerates EVERY group in the workflow (a footgun). Sets node.properties[name] and, when the node defines an onPropertyChanged callback (many LiteGraph nodes do), invokes it. Fast Groups Bypasser/Muter do NOT implement onPropertyChanged — their toggle list is rebuilt by rgthree's own refreshWidgets on a service tick, which can leave leftover Enable rows or an empty widgets:{} (the list has not been built yet, not 'no matches'). After setting matchTitle/matchColors, re-read the node with panel_query_graph; if the canvas still shows groups that do not match, set the property again. Do not delete and re-add the node. Returns the previous and new value. Undoable with Ctrl+Z.", {
|
|
9803
9807
|
node_id: nodeId().describe("Node id from panel_graph_outline / panel_query_graph."),
|
|
9804
9808
|
name: z
|
|
9805
9809
|
.string()
|
|
@@ -9807,7 +9811,52 @@ export function buildPanelToolDefs() {
|
|
|
9807
9811
|
value: z
|
|
9808
9812
|
.union([z.string(), z.number(), z.boolean(), z.null()])
|
|
9809
9813
|
.describe("New property value (string/number/boolean/null). For the rgthree Fast Groups Bypasser, matchTitle is a title substring/regex filter."),
|
|
9810
|
-
}, async (args, ctx) =>
|
|
9814
|
+
}, async (args, ctx) => {
|
|
9815
|
+
const res = await ctx.call({
|
|
9816
|
+
cmd: "graph_set_node_property",
|
|
9817
|
+
node_id: args.node_id,
|
|
9818
|
+
name: args.name,
|
|
9819
|
+
value: args.value,
|
|
9820
|
+
});
|
|
9821
|
+
if (res.isError || !isFastGroupsFilterProperty(args.name))
|
|
9822
|
+
return res;
|
|
9823
|
+
return appendToolResultText(res, fastGroupsFilterPropertyNote());
|
|
9824
|
+
}),
|
|
9825
|
+
def("panel_configure_app_mode", "Configure ComfyUI App Mode (the frontend's linear app view) for the OPEN workflow: which node widgets are the app's inputs, which nodes are its outputs, and whether it opens as an app or a graph by default. Writes extra.linearData / extra.linearMode on the live graph, MERGING into the existing workflow metadata — the workflow identity stamp and any other extra keys are preserved, never replaced. inputs and outputs each REPLACE the whole list (pass the full selection, not a delta — an empty array clears that list); omit a field to leave it unchanged. Every node id and widget name is validated against the open graph before anything is written, and unknown ones are refused by name, listing the widgets the node actually has. One Ctrl+Z step, and the App builder view updates without a reload. Requires a panel new enough to implement the command — an older panel answers that it does not implement it (update via ComfyUI Manager → update comfyui-mcp panel).", {
|
|
9826
|
+
inputs: z
|
|
9827
|
+
.array(z.object({
|
|
9828
|
+
node_id: nodeId().describe("Node id from panel_graph_outline / panel_query_graph."),
|
|
9829
|
+
widget: z.string().describe("Exact widget name on that node, as shown by panel_query_graph {fields:'detail'} (e.g. 'seed', 'text')."),
|
|
9830
|
+
config: z
|
|
9831
|
+
.object({ height: z.number(), description: z.string() })
|
|
9832
|
+
.partial()
|
|
9833
|
+
.optional()
|
|
9834
|
+
.describe("Optional per-input app presentation: row height in px and/or the label/description shown in the app."),
|
|
9835
|
+
}))
|
|
9836
|
+
.optional()
|
|
9837
|
+
.describe("The App Mode input list — one entry per widget control the app exposes. REPLACES the current list; [] clears it; omit to leave unchanged."),
|
|
9838
|
+
outputs: z
|
|
9839
|
+
.array(nodeId())
|
|
9840
|
+
.optional()
|
|
9841
|
+
.describe("Node ids whose outputs the app shows (e.g. the Save Image / preview node). REPLACES the current list; [] clears it; omit to leave unchanged."),
|
|
9842
|
+
default_mode: z
|
|
9843
|
+
.enum(["graph", "app"])
|
|
9844
|
+
.optional()
|
|
9845
|
+
.describe("How the workflow opens by default: 'app' opens the linear App Mode view, 'graph' the node canvas. Omit to leave unchanged."),
|
|
9846
|
+
}, async (args, ctx) => {
|
|
9847
|
+
// The panel refuses an empty call too — but fail BEFORE the round-trip so
|
|
9848
|
+
// the refusal does not depend on the panel build being new enough to have
|
|
9849
|
+
// the command at all.
|
|
9850
|
+
if (args.inputs === undefined && args.outputs === undefined && args.default_mode === undefined) {
|
|
9851
|
+
return fail('panel_configure_app_mode: provide inputs, outputs, and/or default_mode ("graph" | "app") — nothing to change.');
|
|
9852
|
+
}
|
|
9853
|
+
return ctx.call({
|
|
9854
|
+
cmd: "graph_configure_app_mode",
|
|
9855
|
+
inputs: args.inputs,
|
|
9856
|
+
outputs: args.outputs,
|
|
9857
|
+
default_mode: args.default_mode,
|
|
9858
|
+
});
|
|
9859
|
+
}),
|
|
9811
9860
|
def("panel_edit_node", "Atomically edit one node, or apply the same edit to several nodes. Pass exactly one of node_id or node_ids, plus at least one field. In one Ctrl+Z step you can move (pos), resize (size — including Note/MarkdownNote), retitle, recolor, change shape, collapse, pin, or set execution mode. Widget values, LiteGraph properties, links, and slot order stay on their dedicated tools. For a multi-node call, position/size/title/mode apply the same value to every target. Color fields accept #RGB, #RGBA, #RRGGBB, or #RRGGBBAA; null clears a color. Bypassing a subgraph retains panel_set_node_mode's unsafe-boundary guard; force:true is required to override it. Undoable with Ctrl+Z.", {
|
|
9812
9861
|
node_id: nodeId().optional().describe("One node id from panel_graph_outline / panel_query_graph. Provide this OR node_ids, not both."),
|
|
9813
9862
|
node_ids: z.array(nodeId()).min(1).optional().describe("Several node ids that receive the same presentation edit. Provide this OR node_id, not both."),
|
|
@@ -13340,12 +13389,18 @@ CHECKED FOR YOU: the graph read this message prescribes was just run, and it ` +
|
|
|
13340
13389
|
return res;
|
|
13341
13390
|
return settleFreeVramAfterAckTimeout(ctx, res);
|
|
13342
13391
|
}),
|
|
13343
|
-
def("panel_show_media", "Display one or more images or videos directly in the panel chat. Use this whenever the user asks to SEE or SHOW a file — a disk path you composited/downloaded/generated (absolute path on the orchestrator host) OR a ComfyUI output ref ({ filename, subfolder?, type? }). Items are rendered as media cards in the agent chat area; supply optional captions. Max 8 items per call. NEVER describe an image with emoji or text placeholders — call this tool instead.", {
|
|
13392
|
+
def("panel_show_media", "Display one or more images or videos directly in the panel chat. Use this whenever the user asks to SEE or SHOW a file — a disk path you composited/downloaded/generated (absolute path on the orchestrator host) OR a ComfyUI output ref ({ filename, subfolder?, type? }). Items are rendered as media cards in the agent chat area; supply optional captions. Max 8 items per call. A path item OVER the 20 MB inline cap that is not under any directory ComfyUI serves can still be shown by passing stage:true on that item — the orchestrator COPIES it into <output>/_panel_staged (an opt-in, persistent disk write; 512 MB per-file and 2 GB total caps) and displays the copy by reference. NEVER describe an image with emoji or text placeholders — call this tool instead.", {
|
|
13344
13393
|
items: z
|
|
13345
13394
|
.array(z.object({
|
|
13346
13395
|
source: z.union([
|
|
13347
13396
|
// Absolute file path on the orchestrator host
|
|
13348
|
-
z.object({
|
|
13397
|
+
z.object({
|
|
13398
|
+
path: z.string().min(1),
|
|
13399
|
+
stage: z
|
|
13400
|
+
.boolean()
|
|
13401
|
+
.optional()
|
|
13402
|
+
.describe("OPT-IN for a file over the 20 MB inline cap that is NOT under any directory ComfyUI serves: the orchestrator COPIES it into <output>/_panel_staged (a real disk write — caps 512 MB per file, 2 GB total staged; the copy persists until someone deletes it) and displays the copy by reference. Ignored for files already servable or small enough to inline."),
|
|
13403
|
+
}),
|
|
13349
13404
|
// ComfyUI /view ref
|
|
13350
13405
|
z.object({
|
|
13351
13406
|
filename: z.string().min(1),
|
|
@@ -13397,6 +13452,8 @@ CHECKED FOR YOU: the graph read this message prescribes was just run, and it ` +
|
|
|
13397
13452
|
const resolved = [];
|
|
13398
13453
|
/** Oversized items that took the /view reference route instead (#648). */
|
|
13399
13454
|
const forwarded = [];
|
|
13455
|
+
/** Oversized items the caller opted into staging into a served dir (#802). */
|
|
13456
|
+
const stagedItems = [];
|
|
13400
13457
|
// #941 — /view references handed to a BROWSER panel, whose rendering this
|
|
13401
13458
|
// process never observes. Collected so the reply can say what "painted"
|
|
13402
13459
|
// does and does not establish.
|
|
@@ -13470,6 +13527,40 @@ CHECKED FOR YOU: the graph read this message prescribes was just run, and it ` +
|
|
|
13470
13527
|
forwarded.push({ path: p, sizeBytes: stat.size, kind, ref: servable.ref });
|
|
13471
13528
|
continue;
|
|
13472
13529
|
}
|
|
13530
|
+
// #802 — the reference route needs the file to ALREADY sit under a
|
|
13531
|
+
// served directory. With stage:true the caller has opted into the
|
|
13532
|
+
// one remaining move: the orchestrator copies it into
|
|
13533
|
+
// <output>/_panel_staged and forwards a ref to the COPY. Opt-in
|
|
13534
|
+
// because it is a real disk write; the copy and its persistence
|
|
13535
|
+
// are disclosed in the reply, and any staging failure falls
|
|
13536
|
+
// through to the ordinary refusal with the reason attached.
|
|
13537
|
+
if (src.stage === true) {
|
|
13538
|
+
const staged = await stageFileIntoServedDir(p);
|
|
13539
|
+
if (staged.status === "staged") {
|
|
13540
|
+
resolved.push({
|
|
13541
|
+
kind: "viewRef",
|
|
13542
|
+
viewRef: staged.ref,
|
|
13543
|
+
filename: staged.ref.filename,
|
|
13544
|
+
caption: item.caption,
|
|
13545
|
+
});
|
|
13546
|
+
stagedItems.push({
|
|
13547
|
+
path: p,
|
|
13548
|
+
stagedPath: staged.stagedPath,
|
|
13549
|
+
sizeBytes: stat.size,
|
|
13550
|
+
kind,
|
|
13551
|
+
ref: staged.ref,
|
|
13552
|
+
});
|
|
13553
|
+
continue;
|
|
13554
|
+
}
|
|
13555
|
+
return fail(oversizedInlineRefusal({
|
|
13556
|
+
path: p,
|
|
13557
|
+
sizeBytes: stat.size,
|
|
13558
|
+
capBytes: MAX_BYTES,
|
|
13559
|
+
kind,
|
|
13560
|
+
resolution: servable,
|
|
13561
|
+
}) +
|
|
13562
|
+
`\nStaging WAS requested (stage:true) but could not be done: ${staged.reason}`);
|
|
13563
|
+
}
|
|
13473
13564
|
return fail(oversizedInlineRefusal({
|
|
13474
13565
|
path: p,
|
|
13475
13566
|
sizeBytes: stat.size,
|
|
@@ -13571,6 +13662,15 @@ CHECKED FOR YOU: the graph read this message prescribes was just run, and it ` +
|
|
|
13571
13662
|
text: forwardedByReferenceNote(forwarded, MAX_BYTES),
|
|
13572
13663
|
});
|
|
13573
13664
|
}
|
|
13665
|
+
// #802 — staged items took the same reference route, but the reference
|
|
13666
|
+
// points at a COPY this process wrote into the user's output directory.
|
|
13667
|
+
// That write, its location, and its persistence must be disclosed.
|
|
13668
|
+
if (stagedItems.length > 0 && !res.isError) {
|
|
13669
|
+
res.content.push({
|
|
13670
|
+
type: "text",
|
|
13671
|
+
text: stagedForDisplayNote(stagedItems, MAX_BYTES),
|
|
13672
|
+
});
|
|
13673
|
+
}
|
|
13574
13674
|
// #941 — a forwarded /view reference is DISPATCHED, not displayed. Probe a
|
|
13575
13675
|
// bounded sample from here so the note can carry evidence instead of only
|
|
13576
13676
|
// a caveat; the probe is best-effort and never affects the result.
|