comfyui-mcp 0.48.25 → 0.48.26
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/http-backend-tools.js +26 -0
- package/dist/orchestrator/http-backend-tools.js.map +1 -0
- package/dist/orchestrator/index.js +6 -0
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +65 -15
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/services/ui-bridge.js +27 -1
- package/dist/services/ui-bridge.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The comfyui tool-server TOOL MODE to spawn for the NON-Claude HTTP backends
|
|
3
|
+
* (Codex / Gemini / Grok / Copilot / …), which reach panel_* over the loopback
|
|
4
|
+
* HTTP MCP.
|
|
5
|
+
*
|
|
6
|
+
* #291: the headless comfyui MCP exposes ~250 tools. A Codex session adds those
|
|
7
|
+
* on top of its OWN large built-in + user-configured tool surface, and once the
|
|
8
|
+
* total tool budget is saturated codex SILENTLY DROPS the panel HTTP-MCP server's
|
|
9
|
+
* tools — so the live-canvas `panel_*` graph tools became invisible to a Codex
|
|
10
|
+
* session even though the HTTP MCP was wired correctly. (Verified live: with the
|
|
11
|
+
* comfyui surface trimmed, `panel_*` reappears and is callable; with it full,
|
|
12
|
+
* `panel_*` is dropped.)
|
|
13
|
+
*
|
|
14
|
+
* So default these backends' comfyui server to COMPACT mode — the 3 meta-tools
|
|
15
|
+
* (list_tools / describe_tool / call_tool, issue #97) — instead of the full
|
|
16
|
+
* ~250-schema surface. That leaves ample tool budget for `panel_*` while keeping
|
|
17
|
+
* every comfyui tool reachable via `call_tool`. Claude is unaffected: it hosts
|
|
18
|
+
* panel_* via an in-process SDK server, not this HTTP path.
|
|
19
|
+
*
|
|
20
|
+
* An explicit `COMFYUI_MCP_TOOL_MODE=full` in the orchestrator env opts back into
|
|
21
|
+
* the full surface (accepting the panel_* crowd-out) for a user who wants it.
|
|
22
|
+
*/
|
|
23
|
+
export function resolveHttpLaneComfyToolMode(env = process.env) {
|
|
24
|
+
return env.COMFYUI_MCP_TOOL_MODE === "full" ? "full" : "compact";
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=http-backend-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-backend-tools.js","sourceRoot":"","sources":["../../src/orchestrator/http-backend-tools.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAAyB,OAAO,CAAC,GAAG;IAEpC,OAAO,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AACnE,CAAC"}
|
|
@@ -53,6 +53,7 @@ import { buildStartFailureNotice } from "./start-failure-notice.js";
|
|
|
53
53
|
import { readyBannerText, bannerCorrection } from "./ready-banner.js";
|
|
54
54
|
import { OAUTH_PROVIDERS } from "../services/oauth-flow.js";
|
|
55
55
|
import { startPanelMcpHttpServer } from "./panel-mcp-http.js";
|
|
56
|
+
import { resolveHttpLaneComfyToolMode } from "./http-backend-tools.js";
|
|
56
57
|
import { startPanelConsoleHttpServer } from "./panel-console-http.js";
|
|
57
58
|
import { readComfyuiCrashLog, formatCrashNote } from "../services/crash-log.js";
|
|
58
59
|
import { QueueMonitor } from "../services/queue-monitor.js";
|
|
@@ -1431,6 +1432,10 @@ export async function runPanelOrchestrator() {
|
|
|
1431
1432
|
// Shared MCP server config for BOTH the Codex and Gemini backends — they take an
|
|
1432
1433
|
// identical { transport } spec (the headless comfyui stdio MCP + the panel HTTP
|
|
1433
1434
|
// MCP for this tab). Claude keeps its own in-process server set unchanged.
|
|
1435
|
+
// #291: spawn comfyui COMPACT for these non-Claude HTTP backends so its ~250
|
|
1436
|
+
// tools don't saturate the backend's tool budget and make codex silently drop
|
|
1437
|
+
// the panel_* HTTP-MCP tools (overridable via COMFYUI_MCP_TOOL_MODE=full).
|
|
1438
|
+
const httpLaneComfyToolMode = resolveHttpLaneComfyToolMode();
|
|
1434
1439
|
const makeHttpBackendMcpServers = (tabId) => ({
|
|
1435
1440
|
// Headless comfyui MCP (this build) over stdio — same as Claude.
|
|
1436
1441
|
comfyui: {
|
|
@@ -1443,6 +1448,7 @@ export async function runPanelOrchestrator() {
|
|
|
1443
1448
|
// withholds image pixels from the model.
|
|
1444
1449
|
env: buildComfyuiMcpEnv({
|
|
1445
1450
|
...comfyuiBaseEnv(),
|
|
1451
|
+
COMFYUI_MCP_TOOL_MODE: httpLaneComfyToolMode,
|
|
1446
1452
|
...(blindTabs.has(tabId) ? { COMFYUI_MCP_BLIND: "1" } : {}),
|
|
1447
1453
|
}),
|
|
1448
1454
|
},
|