comfyui-mcp 0.46.0 → 0.48.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.
- package/README.md +3 -3
- package/dist/config.js +30 -9
- package/dist/config.js.map +1 -1
- package/dist/orchestrator/antigravity-backend.js +1 -1
- package/dist/orchestrator/codex-backend.js +240 -72
- package/dist/orchestrator/codex-backend.js.map +1 -1
- package/dist/orchestrator/index.js +53 -5
- package/dist/orchestrator/index.js.map +1 -1
- package/dist/orchestrator/panel-agent.js +43 -0
- package/dist/orchestrator/panel-agent.js.map +1 -1
- package/dist/orchestrator/panel-tools.js +2 -1
- package/dist/orchestrator/panel-tools.js.map +1 -1
- package/dist/services/ai-toolkit.js +11 -1
- package/dist/services/ai-toolkit.js.map +1 -1
- package/dist/services/api-nodes.js +9 -0
- package/dist/services/api-nodes.js.map +1 -1
- package/dist/services/batch-manager.js +266 -0
- package/dist/services/batch-manager.js.map +1 -0
- package/dist/services/download-jobs.js +92 -0
- package/dist/services/download-jobs.js.map +1 -0
- package/dist/services/download-progress.js +36 -0
- package/dist/services/download-progress.js.map +1 -1
- package/dist/services/env-capabilities.js +3 -2
- package/dist/services/env-capabilities.js.map +1 -1
- package/dist/services/generate-3d.js +246 -0
- package/dist/services/generate-3d.js.map +1 -0
- package/dist/services/generate-conditioned.js +1 -0
- package/dist/services/generate-conditioned.js.map +1 -1
- package/dist/services/queue-monitor.js +8 -2
- package/dist/services/queue-monitor.js.map +1 -1
- package/dist/services/runpod-client.js +146 -6
- package/dist/services/runpod-client.js.map +1 -1
- package/dist/services/runpod-ssh.js +3 -1
- package/dist/services/runpod-ssh.js.map +1 -1
- package/dist/services/runpod-watch.js +69 -10
- package/dist/services/runpod-watch.js.map +1 -1
- package/dist/services/secure-bridge.js +2 -11
- package/dist/services/secure-bridge.js.map +1 -1
- package/dist/services/train-caption.js +146 -0
- package/dist/services/train-caption.js.map +1 -0
- package/dist/services/training-datasets.js +252 -0
- package/dist/services/training-datasets.js.map +1 -0
- package/dist/services/training-jobs.js +55 -0
- package/dist/services/training-jobs.js.map +1 -1
- package/dist/services/workflow-composer.js +3 -0
- package/dist/services/workflow-composer.js.map +1 -1
- package/dist/services/workflow-converter.js +5 -2
- package/dist/services/workflow-converter.js.map +1 -1
- package/dist/tools/batches.js +74 -0
- package/dist/tools/batches.js.map +1 -0
- package/dist/tools/generate-3d.js +77 -0
- package/dist/tools/generate-3d.js.map +1 -0
- package/dist/tools/generate-conditioned.js +4 -0
- package/dist/tools/generate-conditioned.js.map +1 -1
- package/dist/tools/image-management.js +24 -0
- package/dist/tools/image-management.js.map +1 -1
- package/dist/tools/index.js +12 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/model-extras.js +73 -42
- package/dist/tools/model-extras.js.map +1 -1
- package/dist/tools/model-management.js +90 -4
- package/dist/tools/model-management.js.map +1 -1
- package/dist/tools/prompt-director.js +2 -1
- package/dist/tools/prompt-director.js.map +1 -1
- package/dist/tools/run-template.js +212 -0
- package/dist/tools/run-template.js.map +1 -0
- package/dist/tools/runpod.js +12 -3
- package/dist/tools/runpod.js.map +1 -1
- package/dist/tools/skills-access.js +4 -3
- package/dist/tools/skills-access.js.map +1 -1
- package/dist/tools/template-schema.js +426 -0
- package/dist/tools/template-schema.js.map +1 -0
- package/dist/tools/train.js +180 -11
- package/dist/tools/train.js.map +1 -1
- package/dist/tools/wait-job.js +156 -0
- package/dist/tools/wait-job.js.map +1 -0
- package/docker/runpod/Dockerfile +15 -2
- package/docker/runpod/README.md +23 -0
- package/docker/runpod/deadman_server.py +71 -0
- package/docker/runpod/deadman_watch.sh +106 -0
- package/docker/runpod/post_start.sh +17 -0
- package/docker/runpod/test_deadman_harness.py +206 -0
- package/package.json +2 -2
- package/scripts/asset-counts.mjs +129 -0
|
@@ -595,10 +595,21 @@ const CALL_TOOL_WHITELIST = new Set([
|
|
|
595
595
|
// Read-only.
|
|
596
596
|
"diagnose_run",
|
|
597
597
|
// Read-only training surface: flow/model discovery + progress polling +
|
|
598
|
-
// docker/GPU/image preflight for the panel/mobile Training tab
|
|
598
|
+
// docker/GPU/image preflight for the panel/mobile Training tab, and the
|
|
599
|
+
// dataset/job-config/file readers behind its Jobs/Datasets views.
|
|
599
600
|
"train_list_flows",
|
|
600
601
|
"train_status",
|
|
601
602
|
"train_doctor",
|
|
603
|
+
"train_list_datasets",
|
|
604
|
+
"train_dataset_detail",
|
|
605
|
+
"train_job_config",
|
|
606
|
+
"train_file",
|
|
607
|
+
"train_preview_config",
|
|
608
|
+
"train_dataset_update",
|
|
609
|
+
"train_dataset_delete",
|
|
610
|
+
"train_caption_image",
|
|
611
|
+
"train_caption_dataset",
|
|
612
|
+
"train_delete_job",
|
|
602
613
|
// User-initiated training ops (panel/mobile Training wizard): stage a dataset,
|
|
603
614
|
// launch a GPU-container training run, cancel one. All validation lives in the
|
|
604
615
|
// tools themselves (dataset checks, docker/image preflight, liveness-verified
|
|
@@ -638,6 +649,18 @@ const CALL_TOOL_WHITELIST = new Set([
|
|
|
638
649
|
// download_model (already whitelisted): writes a local app bundle, no
|
|
639
650
|
// model/system mutation. Deps install stays a separate consented action.
|
|
640
651
|
"apps_import",
|
|
652
|
+
// App dependency side-panel (Explore/detail): the ✓/download panel reads what
|
|
653
|
+
// an app needs vs what's installed and offers per-item fetches. Reads are safe
|
|
654
|
+
// (missing-model detection + candidate resolution, node-pack presence); model
|
|
655
|
+
// downloads reuse the already-whitelisted download_civitai_model/download_model.
|
|
656
|
+
// install_custom_node is a MUTATION that runs the pack's code on install —
|
|
657
|
+
// reachable for the panel's "install missing node" button, gated behind an
|
|
658
|
+
// explicit themed confirm client-side. (Revisit if a canvas-less/foreign tab
|
|
659
|
+
// must not be able to trigger a node install.)
|
|
660
|
+
"resolve_missing_models",
|
|
661
|
+
"extract_workflow_dependencies",
|
|
662
|
+
"list_installed_nodes",
|
|
663
|
+
"install_custom_node",
|
|
641
664
|
]);
|
|
642
665
|
/** Lazily build ONE in-process MCP client wired to the full comfyui tool surface,
|
|
643
666
|
* reused across call_tool requests. Reuses the exact tool implementations (same
|
|
@@ -946,7 +969,7 @@ export async function runPanelOrchestrator() {
|
|
|
946
969
|
const forceRemoteEnv = () => isForceRemoteFlagSet() || !isLoopbackUrl(comfyuiUrl)
|
|
947
970
|
? { COMFYUI_MCP_FORCE_REMOTE: "1" }
|
|
948
971
|
: {};
|
|
949
|
-
const model = process.env.COMFYUI_MCP_PANEL_MODEL ?? "claude-opus-
|
|
972
|
+
const model = process.env.COMFYUI_MCP_PANEL_MODEL ?? "claude-opus-5";
|
|
950
973
|
const envEffort = process.env.COMFYUI_MCP_PANEL_EFFORT;
|
|
951
974
|
const effort = isEffort(envEffort) ? envEffort : undefined;
|
|
952
975
|
// Single-port multi-provider: ONE orchestrator on ONE bridge port (default
|
|
@@ -1037,7 +1060,7 @@ export async function runPanelOrchestrator() {
|
|
|
1037
1060
|
// declared to the app-server alongside the headless comfyui (stdio) MCP. Claude
|
|
1038
1061
|
// keeps its in-process SDK panel server unchanged.
|
|
1039
1062
|
const backendId = (process.env.PANEL_AGENT_BACKEND ?? "claude").toLowerCase();
|
|
1040
|
-
// The panel's `model` is a Claude id (e.g. claude-opus-
|
|
1063
|
+
// The panel's `model` is a Claude id (e.g. claude-opus-5) and is NOT a valid
|
|
1041
1064
|
// Codex model — so for codex we only pass a model when COMFYUI_MCP_CODEX_MODEL
|
|
1042
1065
|
// is set explicitly; otherwise Codex uses the account's default (e.g. gpt-5.5).
|
|
1043
1066
|
const codexModel = process.env.COMFYUI_MCP_CODEX_MODEL;
|
|
@@ -2077,8 +2100,23 @@ export async function runPanelOrchestrator() {
|
|
|
2077
2100
|
if (event.type === "hello" && event.tab_id) {
|
|
2078
2101
|
const panelTab = event.tab_id;
|
|
2079
2102
|
// Retarget ComfyUI to the URL the browser was served from (window.location),
|
|
2080
|
-
// BEFORE the readiness probe so the "ready" ack reflects the right instance
|
|
2081
|
-
|
|
2103
|
+
// BEFORE the readiness probe so the "ready" ack reflects the right instance —
|
|
2104
|
+
// but a hello can arrive from a STALE browser tab on a DEAD instance (E2E
|
|
2105
|
+
// finding: a zombie :8189 tab kept retargeting the orchestrator to a corpse
|
|
2106
|
+
// and silently breaking every tool that probes the target). Probe
|
|
2107
|
+
// loopback/LAN hellos first; RunPod proxies skip the probe (booting pods
|
|
2108
|
+
// answer late — readiness is the connector's job).
|
|
2109
|
+
const helloUrl = event.comfyui_url;
|
|
2110
|
+
void (async () => {
|
|
2111
|
+
if (typeof helloUrl === "string" && !/\.proxy\.runpod\.net/i.test(helloUrl)) {
|
|
2112
|
+
const base = helloUrl.trim().replace(/\/+$/, "");
|
|
2113
|
+
if (base && !(await probeOk(`${base}/system_stats`, 3_000))) {
|
|
2114
|
+
logger.warn(`[panel-orchestrator] ignoring hello retarget to unreachable ${base} (stale tab on a dead instance?) — keeping ${comfyuiUrl}`);
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
applyComfyuiUrl(helloUrl);
|
|
2119
|
+
})();
|
|
2082
2120
|
// Re-advertise the secure bridge on EVERY hello, not just when the URL
|
|
2083
2121
|
// changes: advertiseBridge's own retries are short (~3s) and can race a
|
|
2084
2122
|
// pod-side ComfyUI restart, permanently leaving the pod's stored bridge
|
|
@@ -3525,6 +3563,16 @@ export async function runPanelOrchestrator() {
|
|
|
3525
3563
|
},
|
|
3526
3564
|
idleStopMinutes: runpodIdleStopMinutes,
|
|
3527
3565
|
});
|
|
3566
|
+
// Boot re-watch (#269 r2): a restart rebuilds the watcher EMPTY — a pod that
|
|
3567
|
+
// stayed the ACTIVE target across the restart (its proxy URL is still the
|
|
3568
|
+
// configured target) would otherwise get no more heartbeats and self-stop
|
|
3569
|
+
// ~20min later even though renders keep flowing. Re-watch it immediately:
|
|
3570
|
+
// beats + live status resume, and its dead-man watchdog stays fed.
|
|
3571
|
+
const bootPodMatch = getComfyUIBaseUrl().match(/^https:\/\/([a-z0-9]+)-\d+\.proxy\.runpod\.net/i);
|
|
3572
|
+
if (bootPodMatch) {
|
|
3573
|
+
logger.info(`[panel-orchestrator] re-watching active RunPod target ${bootPodMatch[1]} after restart`);
|
|
3574
|
+
getRunpodWatcher()?.watch(bootPodMatch[1]);
|
|
3575
|
+
}
|
|
3528
3576
|
// Money guard (codex #263): the idle predicate above trusts persisted
|
|
3529
3577
|
// training records blindly (hasActiveTrainingJob is a probe-free file scan),
|
|
3530
3578
|
// and owner-death reconciliation otherwise only runs via getJob/listJobs —
|