comfyui-mcp 0.13.0 → 0.14.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/.beads/hooks/post-checkout +24 -0
- package/.beads/hooks/post-merge +24 -0
- package/.beads/hooks/pre-commit +24 -0
- package/.beads/hooks/pre-push +24 -0
- package/.beads/hooks/prepare-commit-msg +24 -0
- package/.gitattributes +4 -0
- package/CHANGELOG.md +90 -0
- package/README.md +6 -4
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/orchestrator/index.js +132 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/panel-agent.js +227 -0
- package/dist/orchestrator/panel-agent.js.map +1 -0
- package/dist/services/ui-bridge.js +137 -76
- package/dist/services/ui-bridge.js.map +1 -1
- package/dist/tools/workflow-compose.js +4 -4
- package/dist/tools/workflow-compose.js.map +1 -1
- package/dist/tools/workflow-deps.js +2 -2
- package/dist/tools/workflow-deps.js.map +1 -1
- package/dist/tools/workflow-library.js +1 -1
- package/dist/tools/workflow-library.js.map +1 -1
- package/dist/tools/workflow-validate.js +1 -1
- package/dist/tools/workflow-validate.js.map +1 -1
- package/dist/tools/workflow-visualize.js +2 -2
- package/dist/tools/workflow-visualize.js.map +1 -1
- package/dist/transport/cli.js +6 -1
- package/dist/transport/cli.js.map +1 -1
- package/package.json +8 -4
- package/packs/README.md +65 -0
- package/packs/anima/install-runpod.sh +49 -0
- package/packs/anima/install-windows.bat +55 -0
- package/packs/anima/manifest.yaml +72 -0
- package/packs/anima/pack.yaml +25 -0
- package/packs/anima/workflow.json +16026 -0
- package/packs/cozy-flow/install-runpod.sh +35 -0
- package/packs/cozy-flow/install-windows.bat +41 -0
- package/packs/cozy-flow/manifest.yaml +60 -0
- package/packs/cozy-flow/pack.yaml +69 -0
- package/packs/cozy-flow/workflow.json +2552 -0
- package/packs/ernie/install-runpod.sh +35 -0
- package/packs/ernie/install-windows.bat +41 -0
- package/packs/ernie/manifest.yaml +47 -0
- package/packs/ernie/pack.yaml +46 -0
- package/packs/ernie/workflow.json +16050 -0
- package/packs/ideogram/install-runpod.sh +29 -0
- package/packs/ideogram/install-windows.bat +35 -0
- package/packs/ideogram/manifest.yaml +29 -0
- package/packs/ideogram/pack.yaml +38 -0
- package/packs/ideogram/templates/01_Film_Poster.json +71 -0
- package/packs/ideogram/templates/02_TShirt_Graphic_Print.json +34 -0
- package/packs/ideogram/templates/03_Fantasy_Book_Cover.json +69 -0
- package/packs/ideogram/templates/04_Event_Flyer_Poster.json +82 -0
- package/packs/ideogram/templates/05_Comic_Book_Cover.json +84 -0
- package/packs/ideogram/templates/06_Company_Logo_Concept_Board.json +114 -0
- package/packs/ideogram/templates/07_Personal_Branding_Sheet.json +75 -0
- package/packs/ideogram/templates/08_Social_Media_Branding_Kit.json +92 -0
- package/packs/ideogram/templates/09_Mascot_Brand_Kit.json +89 -0
- package/packs/ideogram/templates/10_Luxury_Brand_Identity.json +120 -0
- package/packs/ideogram/templates/11_Food_Promo_Poster.json +156 -0
- package/packs/ideogram/templates/12_Real_Estate_Promotion.json +117 -0
- package/packs/ideogram/templates/13_Restaurant_Fast_Food_Menu.json +123 -0
- package/packs/ideogram/templates/14_Product_Advertisement.json +114 -0
- package/packs/ideogram/templates/15_Tech_Service_Promotion.json +132 -0
- package/packs/ideogram/templates/16_2D_Character_Sheet.json +71 -0
- package/packs/ideogram/templates/17_3D_Character_Sheet.json +63 -0
- package/packs/ideogram/templates/18_Game_Item_Asset_Sheet.json +135 -0
- package/packs/ideogram/templates/19_Magazine_Cover_Design.json +108 -0
- package/packs/ideogram/templates/20_Trading_Card_Design.json +108 -0
- package/packs/ideogram/templates/21_Painting_Style_Scene.json +51 -0
- package/packs/ideogram/templates/22_Anime_Magazine_Cover.json +114 -0
- package/packs/ideogram/templates/23_Anime_Poster.json +127 -0
- package/packs/ideogram/templates/24_Realistic_Photoshoot_Scene.json +18 -0
- package/packs/ideogram/templates/25_Cross_Style_Group_Photo.json +28 -0
- package/packs/ideogram/templates/README_IDEOGRAM4_TEMPLATE_PACK.txt +470 -0
- package/packs/ideogram/workflow.json +6472 -0
- package/packs/ltx-2.3/fix-ltxvideo-kornia.bat +122 -0
- package/packs/ltx-2.3/fix-ltxvideo-kornia.sh +91 -0
- package/packs/ltx-2.3/install-runpod.sh +44 -0
- package/packs/ltx-2.3/install-windows.bat +50 -0
- package/packs/ltx-2.3/manifest.yaml +58 -0
- package/packs/ltx-2.3/pack.yaml +48 -0
- package/packs/qwen-image/install-runpod.sh +42 -0
- package/packs/qwen-image/install-windows.bat +48 -0
- package/packs/qwen-image/manifest.yaml +77 -0
- package/packs/qwen-image/pack.yaml +45 -0
- package/packs/qwen-image-edit/install-runpod.sh +39 -0
- package/packs/qwen-image-edit/install-windows.bat +45 -0
- package/packs/qwen-image-edit/manifest.yaml +74 -0
- package/packs/qwen-image-edit/pack.yaml +45 -0
- package/packs/qwen-image-edit/workflow-inpainting.json +2351 -0
- package/packs/qwen-image-edit/workflow.json +2089 -0
- package/packs/wan-animate/install-runpod.sh +39 -0
- package/packs/wan-animate/install-windows.bat +45 -0
- package/packs/wan-animate/manifest.yaml +57 -0
- package/packs/wan-animate/pack.yaml +49 -0
- package/packs/wan-animate/workflow.json +6993 -0
- package/packs/wan-longer-videos/install-runpod.sh +39 -0
- package/packs/wan-longer-videos/install-windows.bat +45 -0
- package/packs/wan-longer-videos/manifest.yaml +71 -0
- package/packs/wan-longer-videos/pack.yaml +42 -0
- package/packs/wan-longer-videos/workflow.json +22538 -0
- package/packs/wan-transparent/expression-renamer.bat +21 -0
- package/packs/wan-transparent/install-runpod.sh +35 -0
- package/packs/wan-transparent/install-windows.bat +41 -0
- package/packs/wan-transparent/manifest.yaml +49 -0
- package/packs/wan-transparent/pack.yaml +49 -0
- package/packs/wan-transparent/workflow.json +2194 -0
- package/packs/z-image-base/install-runpod.sh +40 -0
- package/packs/z-image-base/install-windows.bat +46 -0
- package/packs/z-image-base/manifest.yaml +75 -0
- package/packs/z-image-base/pack.yaml +39 -0
- package/packs/z-image-base/workflow.json +15198 -0
- package/packs/z-image-turbo/install-runpod.sh +39 -0
- package/packs/z-image-turbo/install-windows.bat +45 -0
- package/packs/z-image-turbo/manifest.yaml +61 -0
- package/packs/z-image-turbo/pack.yaml +40 -0
- package/packs/z-image-turbo/workflow.json +12120 -0
- package/packs/z-image-xy-plot/install-runpod.sh +33 -0
- package/packs/z-image-xy-plot/install-windows.bat +39 -0
- package/packs/z-image-xy-plot/manifest.yaml +61 -0
- package/packs/z-image-xy-plot/pack.yaml +49 -0
- package/packs/z-image-xy-plot/workflow.json +5302 -0
- package/plugin/.claude-plugin/plugin.json +10 -0
- package/plugin/agents/debugger.md +171 -0
- package/plugin/agents/explorer.md +65 -0
- package/plugin/agents/optimizer.md +196 -0
- package/plugin/agents/researcher.md +56 -0
- package/plugin/commands/batch.md +90 -0
- package/plugin/commands/compare.md +83 -0
- package/plugin/commands/convert.md +78 -0
- package/plugin/commands/debug.md +72 -0
- package/plugin/commands/director.md +134 -0
- package/plugin/commands/gallery.md +61 -0
- package/plugin/commands/gen.md +110 -0
- package/plugin/commands/install.md +68 -0
- package/plugin/commands/node-skill.md +39 -0
- package/plugin/commands/recipe.md +125 -0
- package/plugin/commands/viz.md +39 -0
- package/plugin/hooks/hooks.json +36 -0
- package/plugin/hooks/job-complete-notify.mjs +110 -0
- package/plugin/hooks/open-latest-image.mjs +82 -0
- package/plugin/hooks/save-warning.mjs +21 -0
- package/plugin/hooks/vram-check.mjs +72 -0
- package/plugin/skills/ai-toolkit-trainer/SKILL.md +145 -0
- package/plugin/skills/anima-base/SKILL.md +240 -0
- package/plugin/skills/anima-lora-trainer/SKILL.md +162 -0
- package/plugin/skills/civitai/SKILL.md +107 -0
- package/plugin/skills/comfyui-core/SKILL.md +264 -0
- package/plugin/skills/comfyui-core/references/common-nodes.md +149 -0
- package/plugin/skills/comfyui-frontend-extensions/SKILL.md +502 -0
- package/plugin/skills/comfyui-frontend-extensions/references/migrate-v1-to-v2.md +222 -0
- package/plugin/skills/comfyui-node-registry/SKILL.md +218 -0
- package/plugin/skills/comfyui-node-registry/references/pyproject.toml +65 -0
- package/plugin/skills/director/SKILL.md +321 -0
- package/plugin/skills/ernie-image/SKILL.md +225 -0
- package/plugin/skills/flux-txt2img/SKILL.md +285 -0
- package/plugin/skills/ideogram-ultra/SKILL.md +337 -0
- package/plugin/skills/installer-packs/SKILL.md +74 -0
- package/plugin/skills/ltxv2-video/SKILL.md +515 -0
- package/plugin/skills/model-compatibility/SKILL.md +434 -0
- package/plugin/skills/model-registry/SKILL.md +101 -0
- package/plugin/skills/prompt-engineering/SKILL.md +304 -0
- package/plugin/skills/qwen-image-edit/SKILL.md +282 -0
- package/plugin/skills/qwen-txt2img/SKILL.md +332 -0
- package/plugin/skills/troubleshooting/SKILL.md +424 -0
- package/plugin/skills/wan-flf-video/SKILL.md +514 -0
- package/plugin/skills/wan-t2v-video/SKILL.md +322 -0
- package/plugin/skills/z-image-txt2img/SKILL.md +294 -0
- package/scripts/check-model-urls.mjs +160 -0
- package/scripts/gen-pack-installers.mjs +133 -0
- package/scripts/gen-tool-docs.ts +4 -8
- package/scripts/panel-sim.mjs +56 -0
- package/scripts/test-packs.sh +87 -0
- package/scripts/validate-manifests.mjs +29 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# --- BEGIN BEADS INTEGRATION v1.0.0 ---
|
|
3
|
+
# This section is managed by beads. Do not remove these markers.
|
|
4
|
+
if command -v bd >/dev/null 2>&1; then
|
|
5
|
+
export BD_GIT_HOOK=1
|
|
6
|
+
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
7
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
8
|
+
timeout "$_bd_timeout" bd hooks run post-checkout "$@"
|
|
9
|
+
_bd_exit=$?
|
|
10
|
+
if [ $_bd_exit -eq 124 ]; then
|
|
11
|
+
echo >&2 "beads: hook 'post-checkout' timed out after ${_bd_timeout}s — continuing without beads"
|
|
12
|
+
_bd_exit=0
|
|
13
|
+
fi
|
|
14
|
+
else
|
|
15
|
+
bd hooks run post-checkout "$@"
|
|
16
|
+
_bd_exit=$?
|
|
17
|
+
fi
|
|
18
|
+
if [ $_bd_exit -eq 3 ]; then
|
|
19
|
+
echo >&2 "beads: database not initialized — skipping hook 'post-checkout'"
|
|
20
|
+
_bd_exit=0
|
|
21
|
+
fi
|
|
22
|
+
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
23
|
+
fi
|
|
24
|
+
# --- END BEADS INTEGRATION v1.0.0 ---
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# --- BEGIN BEADS INTEGRATION v1.0.0 ---
|
|
3
|
+
# This section is managed by beads. Do not remove these markers.
|
|
4
|
+
if command -v bd >/dev/null 2>&1; then
|
|
5
|
+
export BD_GIT_HOOK=1
|
|
6
|
+
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
7
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
8
|
+
timeout "$_bd_timeout" bd hooks run post-merge "$@"
|
|
9
|
+
_bd_exit=$?
|
|
10
|
+
if [ $_bd_exit -eq 124 ]; then
|
|
11
|
+
echo >&2 "beads: hook 'post-merge' timed out after ${_bd_timeout}s — continuing without beads"
|
|
12
|
+
_bd_exit=0
|
|
13
|
+
fi
|
|
14
|
+
else
|
|
15
|
+
bd hooks run post-merge "$@"
|
|
16
|
+
_bd_exit=$?
|
|
17
|
+
fi
|
|
18
|
+
if [ $_bd_exit -eq 3 ]; then
|
|
19
|
+
echo >&2 "beads: database not initialized — skipping hook 'post-merge'"
|
|
20
|
+
_bd_exit=0
|
|
21
|
+
fi
|
|
22
|
+
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
23
|
+
fi
|
|
24
|
+
# --- END BEADS INTEGRATION v1.0.0 ---
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# --- BEGIN BEADS INTEGRATION v1.0.0 ---
|
|
3
|
+
# This section is managed by beads. Do not remove these markers.
|
|
4
|
+
if command -v bd >/dev/null 2>&1; then
|
|
5
|
+
export BD_GIT_HOOK=1
|
|
6
|
+
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
7
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
8
|
+
timeout "$_bd_timeout" bd hooks run pre-commit "$@"
|
|
9
|
+
_bd_exit=$?
|
|
10
|
+
if [ $_bd_exit -eq 124 ]; then
|
|
11
|
+
echo >&2 "beads: hook 'pre-commit' timed out after ${_bd_timeout}s — continuing without beads"
|
|
12
|
+
_bd_exit=0
|
|
13
|
+
fi
|
|
14
|
+
else
|
|
15
|
+
bd hooks run pre-commit "$@"
|
|
16
|
+
_bd_exit=$?
|
|
17
|
+
fi
|
|
18
|
+
if [ $_bd_exit -eq 3 ]; then
|
|
19
|
+
echo >&2 "beads: database not initialized — skipping hook 'pre-commit'"
|
|
20
|
+
_bd_exit=0
|
|
21
|
+
fi
|
|
22
|
+
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
23
|
+
fi
|
|
24
|
+
# --- END BEADS INTEGRATION v1.0.0 ---
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# --- BEGIN BEADS INTEGRATION v1.0.0 ---
|
|
3
|
+
# This section is managed by beads. Do not remove these markers.
|
|
4
|
+
if command -v bd >/dev/null 2>&1; then
|
|
5
|
+
export BD_GIT_HOOK=1
|
|
6
|
+
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
7
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
8
|
+
timeout "$_bd_timeout" bd hooks run pre-push "$@"
|
|
9
|
+
_bd_exit=$?
|
|
10
|
+
if [ $_bd_exit -eq 124 ]; then
|
|
11
|
+
echo >&2 "beads: hook 'pre-push' timed out after ${_bd_timeout}s — continuing without beads"
|
|
12
|
+
_bd_exit=0
|
|
13
|
+
fi
|
|
14
|
+
else
|
|
15
|
+
bd hooks run pre-push "$@"
|
|
16
|
+
_bd_exit=$?
|
|
17
|
+
fi
|
|
18
|
+
if [ $_bd_exit -eq 3 ]; then
|
|
19
|
+
echo >&2 "beads: database not initialized — skipping hook 'pre-push'"
|
|
20
|
+
_bd_exit=0
|
|
21
|
+
fi
|
|
22
|
+
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
23
|
+
fi
|
|
24
|
+
# --- END BEADS INTEGRATION v1.0.0 ---
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
# --- BEGIN BEADS INTEGRATION v1.0.0 ---
|
|
3
|
+
# This section is managed by beads. Do not remove these markers.
|
|
4
|
+
if command -v bd >/dev/null 2>&1; then
|
|
5
|
+
export BD_GIT_HOOK=1
|
|
6
|
+
_bd_timeout=${BEADS_HOOK_TIMEOUT:-300}
|
|
7
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
8
|
+
timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
|
|
9
|
+
_bd_exit=$?
|
|
10
|
+
if [ $_bd_exit -eq 124 ]; then
|
|
11
|
+
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
|
|
12
|
+
_bd_exit=0
|
|
13
|
+
fi
|
|
14
|
+
else
|
|
15
|
+
bd hooks run prepare-commit-msg "$@"
|
|
16
|
+
_bd_exit=$?
|
|
17
|
+
fi
|
|
18
|
+
if [ $_bd_exit -eq 3 ]; then
|
|
19
|
+
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
|
|
20
|
+
_bd_exit=0
|
|
21
|
+
fi
|
|
22
|
+
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
|
23
|
+
fi
|
|
24
|
+
# --- END BEADS INTEGRATION v1.0.0 ---
|
package/.gitattributes
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,96 @@ All notable changes to this project are documented here. This project adheres to
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## [0.14.0] - 2026-06-17
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Autonomous panel orchestrator — drive the ComfyUI sidebar with a background
|
|
14
|
+
agent on your Claude subscription (no API key).** `comfyui-mcp --panel-orchestrator`
|
|
15
|
+
owns the loopback bridge and spawns one persistent Claude Agent SDK session per
|
|
16
|
+
panel tab, so the sidebar works on its own and your interactive Claude session
|
|
17
|
+
stays free. Agents authenticate via the on-disk Claude login (`apiKeySource=none`)
|
|
18
|
+
and load the bundled plugin's skills, so they're ComfyUI experts out of the box.
|
|
19
|
+
Replaces the unshippable `--sdk-url`/CCR-v2 path (guarded on current Claude
|
|
20
|
+
Code). The panel pack auto-starts the orchestrator on ComfyUI load, and a
|
|
21
|
+
parent-PID beacon shuts it down when ComfyUI exits. See
|
|
22
|
+
`docs/blog/panel-agent-subscription`.
|
|
23
|
+
|
|
24
|
+
- **`installer-packs` skill.** Teaches agents how to use, build, and derive
|
|
25
|
+
packs (manifest → generated install scripts) and to **proactively invite users
|
|
26
|
+
to contribute new packs upstream** — an issue/PR with `manifest.yaml` +
|
|
27
|
+
`pack.yaml` + `workflow.json`, reviewed for safety and CI-validated on merge.
|
|
28
|
+
|
|
29
|
+
- **`ai-toolkit-trainer` skill (renamed from `wan-lora-trainer`).** Generalized
|
|
30
|
+
the ostris AI-Toolkit trainer skill to cover **Z-Image** (Turbo & Base, low-VRAM
|
|
31
|
+
image LoRAs) alongside WAN 2.2 — Z-Image is single-stream (no hi/lo multi-stage),
|
|
32
|
+
plus the V2 embedded-Python installer and the `No module named 'torchaudio'` fix.
|
|
33
|
+
|
|
34
|
+
- **Eight more installer packs + a WAN LoRA-trainer skill.** New `packs/`: WAN
|
|
35
|
+
(`wan-animate`, `wan-longer-videos`, `wan-transparent`), Qwen (`qwen-image`,
|
|
36
|
+
`qwen-image-edit`) and Z-Image (`z-image-turbo`, `z-image-base`,
|
|
37
|
+
`z-image-xy-plot`), plus `cozy-flow` (AI-influencer image+video, derived from
|
|
38
|
+
its workflow with no upstream installer) — bringing the catalog to **13 packs**, each manifest-driven
|
|
39
|
+
with generated `install-windows.bat` / `install-runpod.sh` and CI URL+size
|
|
40
|
+
validation. New `wan-lora-trainer` skill (ostris AI-Toolkit) for training WAN
|
|
41
|
+
2.2 LoRAs. The LTX pack ships its kornia import fix as both `.bat` and `.sh`.
|
|
42
|
+
|
|
43
|
+
- **Blog — "Installer packs that can't rot."** Why the packs are a single
|
|
44
|
+
manifest driving both the double-click scripts and an MCP-native install, with
|
|
45
|
+
CI that fails the build the moment a model link dies
|
|
46
|
+
(`docs/blog/installer-packs-that-cant-rot`).
|
|
47
|
+
|
|
48
|
+
- **Five new model-family skills.** `ideogram-ultra` (Ideogram 4 — open-weight
|
|
49
|
+
text-to-image with area prompting, logos, posters, readable text),
|
|
50
|
+
`ernie-image` (ERNIE-Image — fast text-to-image with precise multilingual text
|
|
51
|
+
rendering, runs on <8GB VRAM), `anima-base` (ANIMA 1.0 — ~2B anime/illustration
|
|
52
|
+
model, Danbooru tags + natural language, anime inpainting, <6GB VRAM), and
|
|
53
|
+
`anima-lora-trainer` (kohya `sd-scripts` Gradio trainer for custom anime
|
|
54
|
+
LoRAs). Each frontmatter `description` is tuned as an agent routing signal so
|
|
55
|
+
Claude picks the right model per task (anime → ANIMA, typography/control →
|
|
56
|
+
Ideogram, fast text-render → ERNIE, editing → Qwen-Edit, video → LTX).
|
|
57
|
+
|
|
58
|
+
- **Installer packs (`packs/`) — manifest-driven, one-command ComfyUI setups.**
|
|
59
|
+
Each pack (`anima`, `ideogram`, `ltx-2.3`, `ernie`) is a `manifest.yaml` (a
|
|
60
|
+
pure `ComfyManifest` consumable by `apply_manifest`) plus `pack.yaml` metadata
|
|
61
|
+
and the workflow, with cross-platform `install-windows.bat` /
|
|
62
|
+
`install-runpod.sh` generated from the manifest by
|
|
63
|
+
`scripts/gen-pack-installers.mjs` (`npm run packs:gen`). Validation tooling:
|
|
64
|
+
`npm run packs:validate` (schema), `packs:test` (offline idempotency dry-run
|
|
65
|
+
with `git`/`curl` stubbed), and `packs:check-urls` (HEAD/range check that every
|
|
66
|
+
model URL resolves and its payload size is sane for the model type — no full
|
|
67
|
+
downloads). A `.github/workflows/packs.yml` CI job runs all of these on
|
|
68
|
+
`ubuntu-latest`.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- **Migrated to zod 4.** Lets the Claude Agent SDK be a clean optional
|
|
73
|
+
dependency (its zod 4 peer is now satisfied); `gen-tool-docs` uses zod's native
|
|
74
|
+
`toJSONSchema`, and tool schemas use the two-arg `z.record(key, value)` form.
|
|
75
|
+
|
|
76
|
+
- **The plugin now ships in the npm package.** A stale `.npmignore` rule was
|
|
77
|
+
excluding `plugin/` (skills, agents, commands, hooks); anchored those patterns
|
|
78
|
+
to repo root so the bundled plugin is published — which is what lets the
|
|
79
|
+
orchestrator's agents load skills and be experts out of the box.
|
|
80
|
+
|
|
81
|
+
- **`ltxv2-video` skill upgraded to LTX-2.3.** GGUF UNet via `UnetLoaderGGUF`,
|
|
82
|
+
separate video/audio VAEs + text-projection, the spatial upscaler and new
|
|
83
|
+
LoRAs, the kornia 0.8.3+ import fix (`fix-ltxvideo-kornia.{bat,sh}`), and
|
|
84
|
+
guidance for swapping in alternate / GGUF base models (incl. the community
|
|
85
|
+
"sulphur" LTX-2.3 finetune).
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
- **Windows dev: the full test suite is green.** Fixed 27 tests that assumed
|
|
90
|
+
POSIX paths/commands (`/fake` separators, `which` vs `where`) — test-only
|
|
91
|
+
changes; the product itself was already cross-platform.
|
|
92
|
+
|
|
93
|
+
- **UI bridge survives fast `/mcp` reconnects.** The `--channels` WebSocket
|
|
94
|
+
bridge now retries binding `127.0.0.1:9101` with exponential backoff
|
|
95
|
+
(5 attempts, ~6s) when a previous session hasn't released the port yet,
|
|
96
|
+
instead of failing with `-32000`. It logs "listening" only once truly bound,
|
|
97
|
+
uses a cross-platform port-in-use hint, and clears the retry timer on `stop()`.
|
|
98
|
+
|
|
9
99
|
## [0.13.0] - 2026-06-15
|
|
10
100
|
|
|
11
101
|
### Added
|
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
Works on **macOS**, **Linux**, and **Windows**. Auto-detects your ComfyUI installation and port.
|
|
14
14
|
|
|
15
|
-
**89 MCP tools** | **
|
|
15
|
+
**89 MCP tools** | **22 AI skills** (Flux · WAN · LTX 2.3 video · Qwen · Z-Image · Ideogram 4 · ERNIE · ANIMA · model registry · Civitai · node authoring) | **13 installer packs** | **11 slash commands** | **4 autonomous agents** | **4 hooks**
|
|
16
16
|
|
|
17
17
|
The plugin ships **expert skills that grow with every release** — model-specific generation guides with curated download URLs, workflow recipes, troubleshooting, and custom-node authoring — so Claude knows the right sampler, CFG, resolution, and model files for each architecture without trial and error.
|
|
18
18
|
|
|
19
|
-
> ###
|
|
19
|
+
> ### ✅ Now available: the [ComfyUI MCP Panel](https://registry.comfy.org/nodes/comfyui-mcp-panel) on ComfyUI-Manager & the Comfy Registry
|
|
20
20
|
> Claude in your ComfyUI sidebar — live graph edits, activity cards, multi-tab, zero API keys.
|
|
21
|
-
> v0.3 is in
|
|
21
|
+
> v0.3 is live — search **`comfyui-mcp-panel`** in ComfyUI-Manager to install. [Read more →](https://comfyui-mcp.artokun.io/docs/panel)
|
|
22
22
|
|
|
23
23
|
📖 **Full documentation: [comfyui-mcp.artokun.io/docs](https://comfyui-mcp.artokun.io/docs)**
|
|
24
24
|
|
|
@@ -91,7 +91,9 @@ This package also ships as a **Claude Code plugin**, providing slash commands, s
|
|
|
91
91
|
|
|
92
92
|
### Built-in skills
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
22 skills total — model-family guides (Flux, WAN, LTX 2.3, Qwen, Z-Image, Ideogram 4, ERNIE, ANIMA + anime / WAN / Z-Image LoRA training), the **model-registry** (curated download URLs), the **civitai** pairing skill, node authoring, and the core four below. Full list on the [plugin docs page](https://comfyui-mcp.artokun.io/docs/plugin).
|
|
95
|
+
|
|
96
|
+
> **Installer packs.** [`packs/`](packs/) bundles 13 one-command ComfyUI setups — ANIMA, Ideogram 4, LTX-2.3, ERNIE, WAN (animate / longer-videos / transparent), Qwen (image / image-edit), Z-Image (turbo / base / xy-plot) and cozy-flow (AI-influencer video). Each is a manifest of custom nodes + model URLs + workflow that drives both `apply_manifest` and generated `install-windows.bat` / `install-runpod.sh`, with CI that validates every model link + payload size. See [`packs/README.md`](packs/README.md).
|
|
95
97
|
|
|
96
98
|
| Skill | Description |
|
|
97
99
|
|-------|-------------|
|
package/dist/index.js
CHANGED
|
@@ -99,6 +99,13 @@ async function createConfiguredServer(channels = false) {
|
|
|
99
99
|
}
|
|
100
100
|
async function main() {
|
|
101
101
|
const cli = parseCliArgs(process.argv);
|
|
102
|
+
// Standalone background orchestrator: owns the UI bridge and drives the panel
|
|
103
|
+
// with autonomous Agent SDK sessions. Not an MCP server — it never returns.
|
|
104
|
+
if (cli.panelOrchestrator) {
|
|
105
|
+
const { runPanelOrchestrator } = await import("./orchestrator/index.js");
|
|
106
|
+
await runPanelOrchestrator();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
102
109
|
await JobWatcher.cleanupOldFiles();
|
|
103
110
|
if (cli.transport === "http") {
|
|
104
111
|
await startHttpServer({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,wBAAwB,EACxB,0BA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,QAAQ,CAAC;SACzD,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,wCAAwC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC;IAClF,CAAC;SAAM,CAAC;QACN,MAAM,MAAM,GAAG,MAAM,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC1D,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// Panel orchestrator — a standalone, long-lived process that drives the ComfyUI
|
|
2
|
+
// sidebar panel with autonomous BACKGROUND agents, so the user's interactive
|
|
3
|
+
// Claude session stays free. Launch with `comfyui-mcp --panel-orchestrator`
|
|
4
|
+
// (or COMFYUI_MCP_PANEL_ORCHESTRATOR=1).
|
|
5
|
+
//
|
|
6
|
+
// It owns the UI bridge (port 9101) directly — so it SEES panel messages instead
|
|
7
|
+
// of relying on an idle interactive session to notice a channel push — and spawns
|
|
8
|
+
// one Claude Agent SDK streaming session per panel tab (src/orchestrator/
|
|
9
|
+
// panel-agent.ts). Each agent runs on the user's Claude SUBSCRIPTION with no API
|
|
10
|
+
// key. See docs/design/panel-orchestrator.md.
|
|
11
|
+
import { existsSync } from "node:fs";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
import { startUiBridge } from "../services/ui-bridge.js";
|
|
14
|
+
import { logger } from "../utils/logger.js";
|
|
15
|
+
import { PanelAgentManager } from "./panel-agent.js";
|
|
16
|
+
const PANEL_SYSTEM_APPEND = `You are the autonomous assistant embedded directly in a ComfyUI sidebar panel. The person is working in ComfyUI and talks to you through that panel: their messages arrive as your prompts, and everything you write is shown to them in the panel chat. Write for that reader — lead with the result, keep replies short and concrete, and don't narrate routine internal steps.
|
|
17
|
+
|
|
18
|
+
You have the comfyui MCP tools to generate images, video, and audio and to inspect and manage their ComfyUI instance. Use them to actually do what's asked, then tell them what you did and name or link any output. If a request is ambiguous, make a sensible choice and say what you chose rather than stalling.
|
|
19
|
+
|
|
20
|
+
You are running in the background on the user's own machine. For routine, reversible actions that follow from the request, act without asking permission.`;
|
|
21
|
+
/**
|
|
22
|
+
* Tie the orchestrator's lifetime to ComfyUI's. The launcher (the panel pack)
|
|
23
|
+
* passes its own PID as COMFYUI_MCP_PARENT_PID; we poll whether that process is
|
|
24
|
+
* still alive and shut down when it's gone. Unlike an atexit/signal handler on
|
|
25
|
+
* the parent, this also covers a ComfyUI crash or hard kill — the child notices
|
|
26
|
+
* the parent disappeared and exits on its own. No-op when no parent PID is set
|
|
27
|
+
* (e.g. when run manually from a terminal).
|
|
28
|
+
*/
|
|
29
|
+
function startParentWatchdog(onParentGone) {
|
|
30
|
+
const raw = process.env.COMFYUI_MCP_PARENT_PID;
|
|
31
|
+
const ppid = raw ? Number(raw) : NaN;
|
|
32
|
+
if (!Number.isInteger(ppid) || ppid <= 0)
|
|
33
|
+
return;
|
|
34
|
+
const timer = setInterval(() => {
|
|
35
|
+
let alive = true;
|
|
36
|
+
try {
|
|
37
|
+
process.kill(ppid, 0); // signal 0 = existence probe, doesn't actually signal
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
// ESRCH = gone; EPERM = exists but not ours to signal (treat as alive).
|
|
41
|
+
alive = err.code === "EPERM";
|
|
42
|
+
}
|
|
43
|
+
if (!alive) {
|
|
44
|
+
clearInterval(timer);
|
|
45
|
+
onParentGone();
|
|
46
|
+
}
|
|
47
|
+
}, 5000);
|
|
48
|
+
// Don't let the watchdog alone keep the process alive — the bridge does that.
|
|
49
|
+
timer.unref?.();
|
|
50
|
+
logger.info(`[panel-orchestrator] watching parent process ${ppid}; will shut down when it exits`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Run the panel orchestrator. Never resolves — the bridge and agents keep the
|
|
54
|
+
* process alive until SIGINT/SIGTERM or the parent (ComfyUI) exits.
|
|
55
|
+
*/
|
|
56
|
+
export async function runPanelOrchestrator() {
|
|
57
|
+
// Subscription lane: the background agent must authenticate against the user's
|
|
58
|
+
// claude.ai login, never an API key. Unset the key for the SDK subprocess.
|
|
59
|
+
delete process.env.ANTHROPIC_API_KEY;
|
|
60
|
+
const bridge = startUiBridge();
|
|
61
|
+
// Owning the bridge port is the orchestrator's whole job — if another process
|
|
62
|
+
// holds it (e.g. an interactive comfyui-mcp running with --channels), fail
|
|
63
|
+
// loudly instead of running uselessly. (This also avoids the case where a
|
|
64
|
+
// failed bind leaves the process with no live handles and it exits silently.)
|
|
65
|
+
const bound = await bridge.whenReady();
|
|
66
|
+
if (!bound) {
|
|
67
|
+
logger.error(`[panel-orchestrator] could not bind the panel bridge port — another process owns it (often an interactive comfyui-mcp started with --channels). Free that port (or stop the --channels session) and restart the orchestrator. Override the port with COMFYUI_MCP_BRIDGE_PORT.`);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
// The spawned agent runs THIS comfyui-mcp build as its MCP server, in normal
|
|
71
|
+
// (non-channels) mode — so it generates against the live ComfyUI over
|
|
72
|
+
// COMFYUI_URL and never tries to bind the bridge port we own here.
|
|
73
|
+
const mcpEntry = fileURLToPath(new URL("../index.js", import.meta.url));
|
|
74
|
+
const comfyuiUrl = process.env.COMFYUI_URL ?? "http://127.0.0.1:8188";
|
|
75
|
+
const model = process.env.COMFYUI_MCP_PANEL_MODEL ?? "claude-opus-4-8";
|
|
76
|
+
// The bundled plugin (skills) ships alongside dist/ in the package root. Load
|
|
77
|
+
// it so the background agents are ComfyUI experts out of the box.
|
|
78
|
+
const pluginPath = fileURLToPath(new URL("../../plugin", import.meta.url));
|
|
79
|
+
const pluginAvailable = existsSync(pluginPath);
|
|
80
|
+
if (!pluginAvailable) {
|
|
81
|
+
logger.warn(`[panel-orchestrator] bundled plugin not found at ${pluginPath} — agents run without model-expertise skills.`);
|
|
82
|
+
}
|
|
83
|
+
const manager = new PanelAgentManager({
|
|
84
|
+
model,
|
|
85
|
+
systemAppend: PANEL_SYSTEM_APPEND,
|
|
86
|
+
pluginPath: pluginAvailable ? pluginPath : undefined,
|
|
87
|
+
mcpServers: {
|
|
88
|
+
comfyui: {
|
|
89
|
+
type: "stdio",
|
|
90
|
+
command: process.execPath, // node
|
|
91
|
+
args: [mcpEntry], // dist/index.js, no --channels
|
|
92
|
+
env: { COMFYUI_URL: comfyuiUrl },
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
onSay: (tabId, text) => {
|
|
96
|
+
bridge.push({ type: "say", text }, tabId);
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
bridge.onPanelMessage = (event) => {
|
|
100
|
+
if (event.type !== "user_message" ||
|
|
101
|
+
typeof event.text !== "string" ||
|
|
102
|
+
!event.tab_id) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
// Echo so the user immediately sees their own message land in the chat.
|
|
106
|
+
bridge.push({ type: "echo", text: event.text }, event.tab_id);
|
|
107
|
+
logger.info(`[panel-orchestrator] tab ${event.tab_id.slice(0, 8)} → agent: ${event.text.slice(0, 80)}`);
|
|
108
|
+
manager.send(event.tab_id, event.text, { title: event.title });
|
|
109
|
+
};
|
|
110
|
+
logger.info(`[panel-orchestrator] ready — bridge on ws://127.0.0.1:9101; an agent spawns per ComfyUI tab on its first message (model=${model}, comfyui=${comfyuiUrl})`);
|
|
111
|
+
let shuttingDown = false;
|
|
112
|
+
const shutdown = async () => {
|
|
113
|
+
if (shuttingDown)
|
|
114
|
+
return;
|
|
115
|
+
shuttingDown = true;
|
|
116
|
+
logger.info("[panel-orchestrator] shutting down — stopping agents…");
|
|
117
|
+
await manager.stopAll();
|
|
118
|
+
await bridge.stop();
|
|
119
|
+
process.exit(0);
|
|
120
|
+
};
|
|
121
|
+
process.on("SIGINT", shutdown);
|
|
122
|
+
process.on("SIGTERM", shutdown);
|
|
123
|
+
// Beacon: when ComfyUI (the launcher) exits — cleanly or by crash/kill —
|
|
124
|
+
// shut down rather than linger as an orphan holding the bridge port.
|
|
125
|
+
startParentWatchdog(() => {
|
|
126
|
+
logger.info("[panel-orchestrator] parent (ComfyUI) process exited — shutting down.");
|
|
127
|
+
void shutdown();
|
|
128
|
+
});
|
|
129
|
+
// Keep the process alive; the bridge + agents drive everything from here.
|
|
130
|
+
await new Promise(() => { });
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/orchestrator/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,6EAA6E;AAC7E,4EAA4E;AAC5E,yCAAyC;AACzC,EAAE;AACF,iFAAiF;AACjF,kFAAkF;AAClF,0EAA0E;AAC1E,iFAAiF;AACjF,8CAA8C;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,mBAAmB,GAAG;;;;0JAI8H,CAAC;AAE3J;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,YAAwB;IACnD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC/C,MAAM,IAAI,GAAG,GAAG,CAAC,CAA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