comfyui-mcp 0.50.93 → 0.50.95
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/boot.js +392 -0
- package/dist/boot.js.map +1 -0
- package/dist/experimental/run.js +1 -1
- package/dist/experimental/run.js.map +1 -1
- package/dist/index.js +25 -388
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +61 -8
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/tools/introspect.js +1 -1
- package/dist/utils/broken-install.js +115 -0
- package/dist/utils/broken-install.js.map +1 -0
- package/dist/utils/origin.js +16 -5
- package/dist/utils/origin.js.map +1 -1
- package/package.json +1 -1
package/dist/boot.js
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
import { ListPromptsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
import { collectToolCatalog, registerFullTools } from "./tools/index.js";
|
|
7
|
+
import { registerCompactTools } from "./tools/compact.js";
|
|
8
|
+
import { tryInstallRetiredNameRedirect } from "./tools/retired-redirect.js";
|
|
9
|
+
import { logger } from "./utils/logger.js";
|
|
10
|
+
import { JobWatcher } from "./services/job-watcher.js";
|
|
11
|
+
import { parseCliArgs, validateConnectUrl, exportExplicitToolMode } from "./transport/cli.js";
|
|
12
|
+
import { startHttpServer } from "./transport/http.js";
|
|
13
|
+
import { isLocalMode } from "./config.js";
|
|
14
|
+
import { ensurePanelInstalled } from "./services/panel-installer.js";
|
|
15
|
+
import { checkAndSelfUpdate } from "./services/self-update.js";
|
|
16
|
+
/**
|
|
17
|
+
* Fire-and-forget: ensure the ComfyUI sidebar panel is installed (install-if-
|
|
18
|
+
* missing) on MCP load. LOCAL-only, hard-timed-out, and never throws — it must
|
|
19
|
+
* never block or crash startup. Opt out with COMFYUI_MCP_PANEL_AUTOINSTALL=0.
|
|
20
|
+
* The explicit `install_comfyui(action:'panel', panel_action:'update')` tool refreshes nightly on demand.
|
|
21
|
+
*/
|
|
22
|
+
function ensurePanelOnLoad() {
|
|
23
|
+
if (!isLocalMode())
|
|
24
|
+
return;
|
|
25
|
+
void ensurePanelInstalled()
|
|
26
|
+
.then((res) => {
|
|
27
|
+
switch (res.action) {
|
|
28
|
+
case "installed":
|
|
29
|
+
logger.info("Panel auto-install: installed the sidebar panel (nightly). RESTART ComfyUI to load it.", res);
|
|
30
|
+
break;
|
|
31
|
+
// #806 — "already present" is the whole claim. The line used to be paired
|
|
32
|
+
// with `action: "up-to-date"`, and users read the pair as "you are on the
|
|
33
|
+
// newest panel"; nothing on this path compares versions.
|
|
34
|
+
case "present":
|
|
35
|
+
logger.info("Panel auto-install: panel already present — NOT a version check. " +
|
|
36
|
+
"Run install_comfyui(action:'panel', panel_action:'status') to compare it against what this build needs.", res);
|
|
37
|
+
break;
|
|
38
|
+
case "skipped-dev":
|
|
39
|
+
logger.info("Panel auto-install: skipped — dev install (symlink), managed manually.", res);
|
|
40
|
+
break;
|
|
41
|
+
case "skipped":
|
|
42
|
+
logger.debug("Panel auto-install: disabled via COMFYUI_MCP_PANEL_AUTOINSTALL.", res);
|
|
43
|
+
break;
|
|
44
|
+
case "shadowed":
|
|
45
|
+
logger.warn("Panel auto-install: a SHADOW copy in custom_nodes may be served instead of the real panel (#641). " +
|
|
46
|
+
"Move the backup dir OUT of custom_nodes and hard-refresh the ComfyUI tab.", res);
|
|
47
|
+
break;
|
|
48
|
+
default:
|
|
49
|
+
logger.debug("Panel auto-install: unavailable.", res);
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch(() => { });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Fire-and-forget: on MCP load, check the npm registry and (for global/local
|
|
56
|
+
* installs) auto-update the package on disk, then surface a "reconnect to load
|
|
57
|
+
* vX" note — the running process can't hot-swap its own code. NEVER updates a
|
|
58
|
+
* dev (npm link) install, hard-timed-out, and never throws. Opt out with
|
|
59
|
+
* COMFYUI_MCP_AUTOUPDATE=0. Mirrors the panel auto-install ensure pattern.
|
|
60
|
+
*/
|
|
61
|
+
function selfUpdateOnLoad() {
|
|
62
|
+
void checkAndSelfUpdate()
|
|
63
|
+
.then((res) => {
|
|
64
|
+
switch (res.action) {
|
|
65
|
+
case "updated":
|
|
66
|
+
logger.info(`Self-update: updated comfyui-mcp ${res.from} → ${res.to} (${res.mode}). ${res.note ?? ""}`, res);
|
|
67
|
+
break;
|
|
68
|
+
case "notify":
|
|
69
|
+
logger.info(`Self-update: ${res.note ?? `v${res.to} available.`}`, res);
|
|
70
|
+
break;
|
|
71
|
+
case "up-to-date":
|
|
72
|
+
logger.debug("Self-update: already on the latest version.", res);
|
|
73
|
+
break;
|
|
74
|
+
case "skipped-dev":
|
|
75
|
+
logger.info("Self-update: skipped — dev install (npm link / checkout).", res);
|
|
76
|
+
break;
|
|
77
|
+
case "skipped-disabled":
|
|
78
|
+
logger.debug("Self-update: disabled via COMFYUI_MCP_AUTOUPDATE.", res);
|
|
79
|
+
break;
|
|
80
|
+
default:
|
|
81
|
+
logger.debug("Self-update: unavailable.", res);
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
.catch(() => { });
|
|
85
|
+
}
|
|
86
|
+
async function createConfiguredServer(toolMode = "compact") {
|
|
87
|
+
const server = new McpServer({
|
|
88
|
+
name: "comfyui-mcp",
|
|
89
|
+
version: "0.1.0",
|
|
90
|
+
}, {
|
|
91
|
+
// We declare `resources` and `prompts` (with noop list handlers below)
|
|
92
|
+
// so federating clients like LiteLLM's MCP gateway, which probe every
|
|
93
|
+
// standard list endpoint on initialize fan-out, get a fast empty list
|
|
94
|
+
// instead of a per-server timeout from "Method not found". We don't
|
|
95
|
+
// expose resources or prompts today; advertising them is spec-correct
|
|
96
|
+
// when paired with a list handler that returns the empty set.
|
|
97
|
+
// Reported by @ductiletoaster in #29.
|
|
98
|
+
capabilities: {
|
|
99
|
+
tools: {},
|
|
100
|
+
resources: {},
|
|
101
|
+
prompts: {},
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
if (toolMode === "compact") {
|
|
105
|
+
// Compact tool mode (DEFAULT since #667): capture the whole tool surface
|
|
106
|
+
// into a catalog and expose only the list_tools/describe_tool/call_tool
|
|
107
|
+
// meta-tools, keeping the client's context cost near-zero until a tool is
|
|
108
|
+
// actually needed. Built for small/local LLMs (Hermes Agent, Ollama —
|
|
109
|
+
// issue #97), and the DEFAULT from #667 until 0.50.0, when it became the
|
|
110
|
+
// OPT-IN: the reason it was default was that the direct surface cost
|
|
111
|
+
// ~200KB (~50k tokens) per tools/list at 154 tools, and consolidation took
|
|
112
|
+
// that to 37. Reach for `--compact` when the client's context is the
|
|
113
|
+
// binding constraint — a small local model, or a harness that re-injects
|
|
114
|
+
// tools/list on every read.
|
|
115
|
+
const catalog = await collectToolCatalog();
|
|
116
|
+
registerCompactTools(server, catalog);
|
|
117
|
+
logger.info(`Compact tool mode: ${catalog.tools.size} tools available via list_tools/describe_tool/call_tool`);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
// Full direct surface (opt-in via --full) PLUS the compact facade
|
|
121
|
+
// (list_tools/describe_tool/call_tool) as a stable reconnect escape hatch —
|
|
122
|
+
// see registerFullTools and issue #616. One atomic registration pass,
|
|
123
|
+
// completed before the transport connects below. Opt out of the facade
|
|
124
|
+
// with COMFYUI_MCP_NO_FACADE=1.
|
|
125
|
+
await registerFullTools(server);
|
|
126
|
+
}
|
|
127
|
+
// Serve the retirement ledger on the DIRECT tools/call path too, not only through
|
|
128
|
+
// the call_tool facade — see src/tools/retired-redirect.ts. Installed here, after
|
|
129
|
+
// BOTH branches, because both need it and for different reasons:
|
|
130
|
+
//
|
|
131
|
+
// - full mode is the one the 0.50.0 flip (#726) makes the default, where 121
|
|
132
|
+
// retired names would otherwise answer with a bare "Tool X not found";
|
|
133
|
+
// - compact mode advertises only the 3 meta-tools, so a client calling a retired
|
|
134
|
+
// name DIRECTLY is exactly the stale-snapshot client the facade exists for (#616)
|
|
135
|
+
// — it holds a cached binding for a name this surface no longer lists, and the
|
|
136
|
+
// ledger is the only thing that can tell it where the capability went.
|
|
137
|
+
//
|
|
138
|
+
// Additive: a registered name, and any name the ledger does not know, dispatches
|
|
139
|
+
// through the SDK unchanged. Deliberately BEFORE server.connect() (the callers
|
|
140
|
+
// below connect the returned server), so no request can arrive mid-swap.
|
|
141
|
+
//
|
|
142
|
+
// The result is REPORTED rather than discarded. If it is false the server still
|
|
143
|
+
// boots (see tryInstallRetiredNameRedirect for why bricking startup is the worse
|
|
144
|
+
// failure), but "boots normally while silently answering 121 retired names with a
|
|
145
|
+
// bare 404" is exactly the shape of failure this whole change exists to remove — so
|
|
146
|
+
// it is stated on the same startup line an operator already reads to confirm the
|
|
147
|
+
// surface came up, not left as one error line among registration noise.
|
|
148
|
+
//
|
|
149
|
+
// Residual risk, stated plainly rather than papered over: nothing here can make the
|
|
150
|
+
// degraded state visible to the CALLER, because the wrapper is the only thing that
|
|
151
|
+
// could have changed what the caller sees. What actually holds the guarantee is the
|
|
152
|
+
// `~1.29.0` cap on `@modelcontextprotocol/sdk` in package.json — this is normally run
|
|
153
|
+
// as `npx comfyui-mcp`, which resolves fresh, so an open range would have let a user
|
|
154
|
+
// silently pick up internals nothing ever ran against.
|
|
155
|
+
const redirects = await tryInstallRetiredNameRedirect(server);
|
|
156
|
+
logger.info(`Tool mode: ${toolMode}. Retired-name redirects on direct tools/call: ` +
|
|
157
|
+
(redirects
|
|
158
|
+
? "active"
|
|
159
|
+
: "INACTIVE — a call to a name removed in an earlier release will 404 without naming its replacement"));
|
|
160
|
+
server.server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
161
|
+
resources: [],
|
|
162
|
+
}));
|
|
163
|
+
server.server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({ resourceTemplates: [] }));
|
|
164
|
+
server.server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
165
|
+
prompts: [],
|
|
166
|
+
}));
|
|
167
|
+
return server;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Open a cloudflared quick tunnel to the local HTTP MCP port and print a clear,
|
|
171
|
+
* ready-to-paste Claude Desktop Custom Connector block (public https://…/mcp
|
|
172
|
+
* URL + token + headless X-API-Key usage). Resilient: a missing cloudflared
|
|
173
|
+
* binary (or any tunnel error) surfaces install guidance and leaves the local
|
|
174
|
+
* server running instead of crashing.
|
|
175
|
+
*/
|
|
176
|
+
async function openTunnelAndAnnounce(host, port, token) {
|
|
177
|
+
const { startQuickTunnel } = await import("./services/tunnel.js");
|
|
178
|
+
logger.info("[tunnel] starting cloudflared quick tunnel…");
|
|
179
|
+
let publicUrl;
|
|
180
|
+
try {
|
|
181
|
+
const tunnel = await startQuickTunnel(port);
|
|
182
|
+
publicUrl = tunnel.url;
|
|
183
|
+
}
|
|
184
|
+
catch (err) {
|
|
185
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
186
|
+
logger.error(`[tunnel] could not start cloudflared: ${message}\n` +
|
|
187
|
+
` Install it, then re-run with --tunnel:\n` +
|
|
188
|
+
` npm install -g cloudflared # or: brew install cloudflared / winget install cloudflare.cloudflared\n` +
|
|
189
|
+
` The local server is still running at http://${host}:${port}/mcp (token auth active).`);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const mcpUrl = `${publicUrl}/mcp`;
|
|
193
|
+
const snippet = JSON.stringify({
|
|
194
|
+
mcpServers: {
|
|
195
|
+
comfyui: {
|
|
196
|
+
url: mcpUrl,
|
|
197
|
+
headers: { "X-API-Key": token },
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
}, null, 2);
|
|
201
|
+
// Single multi-line block to stderr so it survives MCP stdio framing and is
|
|
202
|
+
// easy to copy from the terminal.
|
|
203
|
+
process.stderr.write([
|
|
204
|
+
"",
|
|
205
|
+
"════════════════════════════════════════════════════════════════════",
|
|
206
|
+
" ComfyUI MCP — Remote / Hosted Connector is LIVE",
|
|
207
|
+
"════════════════════════════════════════════════════════════════════",
|
|
208
|
+
` Public MCP URL : ${mcpUrl}`,
|
|
209
|
+
` Auth token : ${token}`,
|
|
210
|
+
"",
|
|
211
|
+
" Claude Desktop → Settings → Connectors → Add custom connector:",
|
|
212
|
+
` • Name : ComfyUI`,
|
|
213
|
+
` • URL : ${mcpUrl}`,
|
|
214
|
+
` • Header: X-API-Key: ${token} (or Authorization: Bearer ${token})`,
|
|
215
|
+
"",
|
|
216
|
+
" Headless / programmatic config snippet:",
|
|
217
|
+
snippet,
|
|
218
|
+
"",
|
|
219
|
+
" Keep this terminal open — the tunnel closes when the process exits.",
|
|
220
|
+
"════════════════════════════════════════════════════════════════════",
|
|
221
|
+
"",
|
|
222
|
+
].join("\n"));
|
|
223
|
+
}
|
|
224
|
+
/** A remote (non-loopback) ComfyUI served over https — the case where the pod's
|
|
225
|
+
* browser panel needs the secure wss:// bridge instead of plain ws://. */
|
|
226
|
+
function isRemoteHttpsPod(u) {
|
|
227
|
+
try {
|
|
228
|
+
const url = new URL(u);
|
|
229
|
+
const h = url.hostname.toLowerCase();
|
|
230
|
+
return (url.protocol === "https:" &&
|
|
231
|
+
!["127.0.0.1", "localhost", "::1", "0.0.0.0", ""].includes(h));
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
async function main() {
|
|
238
|
+
const cli = parseCliArgs(process.argv);
|
|
239
|
+
// `--help` / `-h`: print usage and exit BEFORE anything else. It must precede
|
|
240
|
+
// every other branch — including `setup` and `connect` — because a user who
|
|
241
|
+
// asks for help has by definition not decided what to run yet, and starting a
|
|
242
|
+
// server or writing a harness config in response to a help request is doing
|
|
243
|
+
// something they did not ask for. Exits 0: asking for help is not an error.
|
|
244
|
+
//
|
|
245
|
+
// stdout, not stderr: this is the requested output, and a user piping it to a
|
|
246
|
+
// pager or grep should get it on the stream that carries results.
|
|
247
|
+
if (cli.help) {
|
|
248
|
+
const { renderCliHelp } = await import("./transport/cli.js");
|
|
249
|
+
process.stdout.write(renderCliHelp());
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// `setup <agent>`: write the comfyui MCP entry into a non-Claude harness's
|
|
253
|
+
// config (Hermes Agent / OpenClaw / Copilot CLI — issue #97), print next
|
|
254
|
+
// steps, and exit. Never starts the MCP server.
|
|
255
|
+
if (cli.setupAgent !== undefined) {
|
|
256
|
+
const { setupAgent, AGENT_NAMES } = await import("./services/agent-setup.js");
|
|
257
|
+
const agent = cli.setupAgent;
|
|
258
|
+
if (!AGENT_NAMES.includes(agent)) {
|
|
259
|
+
process.stderr.write(`\nUsage: comfyui-mcp setup <${AGENT_NAMES.join("|")}> [--compact|--full] [--comfyui-url <url>] [--dry-run]\n` +
|
|
260
|
+
(cli.setupAgent ? `\nUnknown agent "${cli.setupAgent}".\n` : "") +
|
|
261
|
+
`\nWrites the comfyui MCP server entry into the agent's own config file.\n`);
|
|
262
|
+
process.exit(1);
|
|
263
|
+
}
|
|
264
|
+
try {
|
|
265
|
+
const result = await setupAgent({
|
|
266
|
+
agent,
|
|
267
|
+
compact: cli.toolModeExplicit ? cli.toolMode === "compact" : undefined,
|
|
268
|
+
comfyuiUrl: cli.comfyuiUrl,
|
|
269
|
+
dryRun: cli.setupDryRun,
|
|
270
|
+
});
|
|
271
|
+
const lines = [
|
|
272
|
+
"",
|
|
273
|
+
result.wrote
|
|
274
|
+
? `✓ Added the "comfyui" MCP server to ${result.configPath}`
|
|
275
|
+
: `— dry run: would write ${result.configPath} as —`,
|
|
276
|
+
...(result.wrote ? [] : ["", result.content.trimEnd()]),
|
|
277
|
+
"",
|
|
278
|
+
"Next steps:",
|
|
279
|
+
...result.nextSteps.map((s) => ` • ${s}`),
|
|
280
|
+
"",
|
|
281
|
+
];
|
|
282
|
+
process.stdout.write(lines.join("\n"));
|
|
283
|
+
process.exit(0);
|
|
284
|
+
}
|
|
285
|
+
catch (err) {
|
|
286
|
+
process.stderr.write(`\ncomfyui-mcp setup failed: ${err instanceof Error ? err.message : err}\n`);
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// Standalone background orchestrator: owns the UI bridge and drives the panel
|
|
291
|
+
// with autonomous Agent SDK sessions. Not an MCP server — it never returns.
|
|
292
|
+
if (cli.panelOrchestrator) {
|
|
293
|
+
// `connect <comfyui-url>`: drive a (possibly REMOTE) ComfyUI from an agent on
|
|
294
|
+
// THIS machine. Export the URL as COMFYUI_URL so the orchestrator and the
|
|
295
|
+
// comfyui MCP it spawns target that server — the same remote-URL mechanism the
|
|
296
|
+
// panel's "Remote ComfyUI URL" setting uses, just from the CLI. For a REMOTE
|
|
297
|
+
// https pod the orchestrator auto-opens a secure wss:// Cloudflare tunnel so
|
|
298
|
+
// the pod's HTTPS panel can reach the bridge (a plain ws:// from https is
|
|
299
|
+
// browser-blocked); --insecure-bridge forces the plain loopback bridge.
|
|
300
|
+
if (cli.insecureBridge)
|
|
301
|
+
process.env.COMFYUI_MCP_INSECURE_BRIDGE = "1";
|
|
302
|
+
// #667: an explicit --full/--compact must reach the orchestrator's spawned
|
|
303
|
+
// MCP children, which read the mode from the ENV — the flag alone never
|
|
304
|
+
// made it downstream, silently running compact when full was requested.
|
|
305
|
+
exportExplicitToolMode(cli);
|
|
306
|
+
if (cli.comfyuiUrl) {
|
|
307
|
+
// Hard-fail on a bad `connect <url>` instead of silently falling back to the
|
|
308
|
+
// local ComfyUI (which would make the banner below lie about what it drives).
|
|
309
|
+
const urlError = validateConnectUrl(cli.comfyuiUrl);
|
|
310
|
+
if (urlError) {
|
|
311
|
+
process.stderr.write(`\nComfyUI MCP — cannot start: ${urlError}\n\n`);
|
|
312
|
+
process.exit(1);
|
|
313
|
+
}
|
|
314
|
+
process.env.COMFYUI_URL = cli.comfyuiUrl;
|
|
315
|
+
// Default panel bridge port is 9180 (one port shared by all providers);
|
|
316
|
+
// COMFYUI_MCP_BRIDGE_PORT overrides.
|
|
317
|
+
const bridgePort = Number(process.env.COMFYUI_MCP_BRIDGE_PORT) || 9180;
|
|
318
|
+
// Remote https pod → secure wss:// tunnel (auto); local/http or
|
|
319
|
+
// --insecure-bridge → plain loopback ws://. Informational only here.
|
|
320
|
+
const secureBridge = !cli.insecureBridge && isRemoteHttpsPod(cli.comfyuiUrl);
|
|
321
|
+
const bridgeLine = secureBridge
|
|
322
|
+
? " Agent bridge : wss:// secure Cloudflare tunnel (auto — nothing to copy)"
|
|
323
|
+
: ` Agent bridge : ws://127.0.0.1:${bridgePort}`;
|
|
324
|
+
process.stderr.write([
|
|
325
|
+
"",
|
|
326
|
+
"════════════════════════════════════════════════════════════════════",
|
|
327
|
+
" ComfyUI MCP — local agent bridge is starting",
|
|
328
|
+
"════════════════════════════════════════════════════════════════════",
|
|
329
|
+
bridgeLine,
|
|
330
|
+
` Driving : ${cli.comfyuiUrl}`,
|
|
331
|
+
secureBridge
|
|
332
|
+
? " Secure : the pod's HTTPS panel connects automatically over an\n encrypted tunnel — no URL to paste, works in any browser."
|
|
333
|
+
: null,
|
|
334
|
+
"",
|
|
335
|
+
" Next steps:",
|
|
336
|
+
` 1. Open that ComfyUI in your browser: ${cli.comfyuiUrl}`,
|
|
337
|
+
" 2. In the Agent panel's Settings → General, turn ON",
|
|
338
|
+
" 'Use external/local orchestrator (advanced)'.",
|
|
339
|
+
" 3. Click Connect in the panel (the Agent panel's Connect dropdown).",
|
|
340
|
+
"",
|
|
341
|
+
" Until you click Connect this window stays quiet — that's expected, not",
|
|
342
|
+
" a hang. The agent runs HERE on your Claude/Codex login; nothing is",
|
|
343
|
+
" installed on the ComfyUI box. Keep this terminal open.",
|
|
344
|
+
"════════════════════════════════════════════════════════════════════",
|
|
345
|
+
"",
|
|
346
|
+
]
|
|
347
|
+
.filter((l) => l !== null)
|
|
348
|
+
.join("\n"));
|
|
349
|
+
}
|
|
350
|
+
const { runPanelOrchestrator } = await import("./orchestrator/index.js");
|
|
351
|
+
await runPanelOrchestrator();
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
await JobWatcher.cleanupOldFiles();
|
|
355
|
+
if (cli.transport === "http") {
|
|
356
|
+
// In tunnel mode, require a token even if none was configured: the endpoint
|
|
357
|
+
// is about to be exposed publicly, so generate a strong one on the fly.
|
|
358
|
+
const token = cli.token ?? (cli.tunnel ? randomBytes(24).toString("hex") : undefined);
|
|
359
|
+
await startHttpServer({
|
|
360
|
+
host: cli.host,
|
|
361
|
+
port: cli.port,
|
|
362
|
+
token,
|
|
363
|
+
allowUnauthenticated: cli.allowUnauthenticated,
|
|
364
|
+
createServer: () => createConfiguredServer(cli.toolMode),
|
|
365
|
+
});
|
|
366
|
+
logger.info(`ComfyUI MCP server running on http://${cli.host}:${cli.port}/mcp`);
|
|
367
|
+
if (token) {
|
|
368
|
+
logger.info(`HTTP MCP auth ENABLED — send 'Authorization: Bearer <token>' or 'X-API-Key: <token>'.`);
|
|
369
|
+
}
|
|
370
|
+
if (cli.tunnel) {
|
|
371
|
+
await openTunnelAndAnnounce(cli.host, cli.port, token);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
const server = await createConfiguredServer(cli.toolMode);
|
|
376
|
+
const transport = new StdioServerTransport();
|
|
377
|
+
await server.connect(transport);
|
|
378
|
+
logger.info("ComfyUI MCP server running on stdio");
|
|
379
|
+
}
|
|
380
|
+
// After the server is up: auto-ensure the sidebar panel (non-blocking).
|
|
381
|
+
ensurePanelOnLoad();
|
|
382
|
+
// ...and self-check the npm registry for a newer published version (non-blocking).
|
|
383
|
+
selfUpdateOnLoad();
|
|
384
|
+
}
|
|
385
|
+
main().catch((err) => {
|
|
386
|
+
// Error instances JSON-serialize to {} — log the message/stack explicitly so
|
|
387
|
+
// a startup failure (e.g. the unauthenticated-non-loopback guard in Docker)
|
|
388
|
+
// is actually debuggable from the console output.
|
|
389
|
+
logger.error(`Fatal error: ${err instanceof Error ? (err.stack ?? err.message) : String(err)}`);
|
|
390
|
+
process.exit(1);
|
|
391
|
+
});
|
|
392
|
+
//# sourceMappingURL=boot.js.map
|
package/dist/boot.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../src/boot.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAiB,MAAM,oBAAoB,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,SAAS,iBAAiB;IACxB,IAAI,CAAC,WAAW,EAAE;QAAE,OAAO;IAC3B,KAAK,oBAAoB,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
4
4
|
// ---------------------------------------------------------------------------
|
|
5
5
|
// Standalone runner for the experimental embedded-agent-panel POC.
|
|
6
6
|
//
|
|
7
|
-
// This is intentionally NOT imported by src/
|
|
7
|
+
// This is intentionally NOT imported by src/boot.ts — the default MCP server
|
|
8
8
|
// (stdio / HTTP) never touches the POC. Run it explicitly, e.g.:
|
|
9
9
|
//
|
|
10
10
|
// COMFYUI_MCP_AGENT_POC=1 ANTHROPIC_API_KEY=... npx tsx src/experimental/run.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/experimental/run.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,8EAA8E;AAC9E,mEAAmE;AACnE,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/experimental/run.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,8EAA8E;AAC9E,mEAAmE;AACnE,EAAE;AACF,6EAA6E;AAC7E,iEAAiE;AACjE,EAAE;AACF,kFAAkF;AAClF,yFAAyF;AACzF,8EAA8E;AAE9E,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CACT,8FAA8F,CAC/F,CAAC;QACF,OAAO;IACT,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,wBAAwB,MAAM,CAAC,QAAQ,WAAW,CAAC,CAAC;IAChE,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,MAAM,CAAC,IAAI,CAAC,2BAA2B,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC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