Commit Graph
37 Commits
Author SHA1 Message Date
HuangYuChuh a431561dfb refactor: remove legacy Python scripts replaced by CLI
Remove scripts that are now fully replaced by comfyui-skill-cli:
- scripts/registry.py → comfyui-skill list/info
- scripts/comfyui_client.py → comfyui-skill run/submit/status/deps
- scripts/server_manager.py → comfyui-skill server add/enable/disable/remove
- scripts/transfer_manager.py → comfyui-skill config export/import

Keep scripts/shared/ (still used by Web UI backend) and shell scripts.
Update README to replace all Python script references with CLI commands.
2026-04-01 11:17:14 +08:00
196ae0bf19 feat: support ComfyUI API Key for cloud nodes (#78) (#81)
Add comfy_api_key server config field to enable cloud API nodes
(Kling, Sora, Nano Banana, etc.) when calling ComfyUI via API.
The key is passed through extra_data.api_key_comfy_org in the
/prompt request, following ComfyUI's official API key integration.

Closes #78

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-30 10:27:47 +08:00
d883e0ab0c feat: add workflow dependency checker and installer (#76)
Add a three-tier dependency detection system for ComfyUI workflows:
1. ComfyUI Manager API — node status + import-fail diagnostics
2. ComfyUI Registry API — cloud search for unknown nodes
3. extension-node-map.json — offline fallback

Features:
- Detect missing custom nodes (not_installed / import_fail / unknown)
- Detect missing model files with auto-download support via Manager
- i18n text report formatting (zh/en) with UNIX-style layout
- Three-strategy node installer (Manager queue → cm-cli → git clone)
- Model download via Manager /manager/queue/install_model
- CLI command `check-deps` for Agent integration
- REST API endpoints with locale parameter
- 28 unit tests covering all detection and formatting logic

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-30 00:27:00 +08:00
cdfb9476c5 fix(client): fallback to ui_parameters when agent-supplied params are not in exposed parameters (#75)
Workflows imported via UI store all parameter mappings in ui_parameters,
but only explicitly "exposed" ones go into parameters. When users pass
values (prompt, seed, width, etc.) through the agent conversation, those
values were silently ignored because they weren't in the exposed set,
causing workflows to always run with hardcoded defaults.

Now the runtime merges ui_parameters as a fallback lookup so user-supplied
values reach the correct workflow nodes without requiring manual exposure
in the UI. Explicit parameters still take precedence.

Closes community-reported issue: params passed in chat ignored by workflow.

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-29 23:35:45 +08:00
Kelin 6081c4f293 fix(client): warn when agent passes parameter names not in workflow schema
Previously, parameters not matching any schema key were silently
dropped, making it hard to diagnose why a workflow used stale defaults.
Now the response includes a warnings array listing each unmatched
parameter and the available schema keys.
2026-03-25 13:38:33 +08:00
Kelin 5ab3320c6e feat(client): add non-blocking submit/status commands for real-time progress feedback
Add `submit` and `status` subcommands to comfyui_client.py so agents in
interactive environments (chat, messaging) can relay generation progress
to users between tool calls instead of blocking silently for 30+ seconds.

- `submit`: validates params, queues prompt, returns run_id immediately
- `status`: checks queue position / running state / completion, downloads
  images when done
- Original `--workflow --args` blocking mode is fully preserved
- SKILL.md updated with interactive vs non-blocking guidance
- Synced frontend assets with URL param cleanup fix
2026-03-25 12:01:32 +08:00
Kelin 6aaf17c3dc feat(api): add image upload support and fix error handling
- Mark LoadImage node's image field as type "image" in schema extraction
- Add POST /api/servers/{server_id}/upload/image proxy endpoint
- Auto-migrate legacy schemas with string type to image type at read time
- Fix ComfyUI error dict handling in comfyui_client.py (TypeError on dict += str)
- Add python-multipart dependency for file upload support
2026-03-24 16:41:51 +08:00
ChroniCat 9042b0e86e fix(client): finalize history when queued job disappears 2026-03-23 15:08:07 +08:00
Kelin dd480d560e chore(scripts): auto-clean generated ui assets before update 2026-03-22 19:31:03 +08:00
Kelin 281c1a1e14 feat(update): return explicit success summary 2026-03-20 23:14:06 +08:00
e948ab84c2 Add workflow execution history backend (#43)
* feat: add workflow execution history backend

* build: refresh bundled workflow history UI assets

* fix: simplify common workflow parameter aliases

* fix: resolve output_dir symlinks and allow workflows with no image output

---------

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
2026-03-20 07:16:40 +08:00
ffbdd76b52 fix: surface schema load errors and normalize update_server inputs (#41)
- registry.py: replace bare `except Exception: pass` with specific
  exception handling and a warning log, so corrupted schema.json files
  are visible instead of silently disappearing from workflow list
- services.py: apply the same input normalization in update_server as
  add_server (strip whitespace, coerce types, apply fallback defaults)
  to prevent dirty data from entering config

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 14:43:00 +08:00
ca27560ed7 fix: add 30-minute timeout to job polling loop (#40)
* fix: add 30-minute timeout to job polling loop

Prevent infinite blocking when ComfyUI server hangs or a job gets stuck.
Returns a clear timeout error instead of waiting indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: replace fixed timeout with queue-based job liveness check

Instead of a hardcoded 30-minute timeout, poll the /queue endpoint to
determine if the job is still pending or running. Only report an error
when the job disappears from both history and queue, allowing
arbitrarily long tasks to complete naturally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:12:34 +08:00
Kelin 9ab1ed038e fix: align update fallback with frontend release flow 2026-03-18 15:04:39 +08:00
Kelin a541a35d5d feat: validate schema parameters before queueing to ComfyUI
Add validate_and_coerce_params() that checks required parameters,
safely coerces types with error handling, and applies default values.
All validation errors are collected and returned at once instead of
crashing on the first bad value.
2026-03-17 23:49:53 +08:00
Kelin 4800fa1d87 fix: surface ComfyUI node-level error details in client output
Previously queue failures and execution errors returned generic messages
like "Failed to queue prompt to ComfyUI.", losing the specific node error
info ComfyUI provides. Now HTTPError response bodies are parsed for
node_errors, and history status is checked for execution_error messages,
giving agents and users actionable diagnostics.
2026-03-17 23:36:06 +08:00
0d4bcfee27 fix(updater): use explicit branch ref to avoid tracking config issues (#24)
* build(ui): rebuild frontend — remove server URL help text

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(updater): use explicit branch ref to avoid tracking config issues

git pull --ff-only fails when local branch tracks a deleted remote
branch. Use git fetch origin main:main instead, which always updates
local main regardless of current branch or tracking configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 14:39:00 +08:00
KelinandClaude Sonnet 4.6 d1918bfa77 feat: git-based update detection and one-click restart
Add GitUpdateProvider to detect and apply updates without GitHub API:
- scripts/shared/updater.py: check via `git ls-remote`, update via `git pull --ff-only`, restart via os.execv
- ui/app.py: replace frontend_update with three new endpoints:
  GET /api/system/check-update, POST /api/system/update, POST /api/system/restart
- ui/app.py: add POST /api/servers/test-connection for testing server connectivity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 13:32:31 +08:00
KelinandClaude Opus 4.6 d021177c65 fix: persist auth field and show detailed connection errors
- Fix auth field not being saved in add_server/update_server/serialize
- Add test-connection endpoint with detailed error messages
- Return specific errors: 401 Unauthorized, 403 Forbidden, timeout, etc.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:59:43 +08:00
KelinandClaude Opus 4.6 3eaf82b692 feat: add authentication support for remote ComfyUI servers
Add optional auth field to server config. All HTTP requests to
ComfyUI (prompt, history, view, health check) now pass the
Authorization header when configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 07:09:26 +08:00
KelinandClaude Opus 4.6 c733321dcb feat: add frontend update check API and improve update script
- Add /api/frontend/check-update endpoint that compares local
  version.json against the latest rolling release on GitHub
- Update scripts/update_frontend.sh to default to the "latest"
  release tag, with optional version argument
- Results are cached for 10 minutes to respect GitHub API limits

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 00:42:19 +08:00
KelinandClaude Opus 4.6 471d6dd35d refactor: separate frontend source into independent repository
Move frontend source code to HuangYuChuh/ComfyUI_Skills_OpenClaw-frontend
so that cloning the main repo no longer downloads 1.4M of frontend source.
Users only need the pre-built assets in ui/static/.

- Remove frontend/ directory (now lives in its own repo)
- Add scripts/update_frontend.sh to pull latest release assets
- Remove frontend CI job (handled by frontend repo)
- Move Gemfile/Gemfile.lock to docs/ and update serve_pages.sh
- Clean up .gitignore (remove stale paths and Manus files section)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 21:29:34 +08:00
科林_Cyril Pilgrim c3dc305849 feat: add server health status API and UI status indicator 2026-03-16 17:21:12 +08:00
xufengandGitHub d2e80d4f86 feat(docs): refresh GitHub Pages content and local preview (#9) 2026-03-14 12:36:42 +08:00
科林_Cyril Pilgrim f84b25f700 feat(client): improve output filename readability and stability
Motivation:
Traditional UUID-based filenames for images are difficult for users to organize. Providing human-readable prefixes based on user intent or workflow context, combined with stable timestamps, enhances asset management.

Implementation:
Introduced sanitize_filename_part for safety, and get_output_prefix to prioritize the 'filename_prefix' argument. Used a detailed timestamp (%Y%m%d-%H%M%S-%3f) and index suffix for generated files.
2026-03-13 13:56:11 +08:00
lgldlk de4c48d5b8 refactor(ui): replace static frontend with modular react app 2026-03-12 23:41:39 +08:00
科林_Cyril Pilgrim 8a274ad02a refactor(core): simplify workflow identification and update default ui port
Motivation:
1. Maintaining a redundant 'workflow_id' in schema.json was error-prone and confusing for users.
2. The previous default port 8189 frequently collided with other AI services or ComfyUI instances during multi-server deployment.

Implementation:
1. Revoked 'workflow_id' reliance in schema logic; the system now strictly uses the directory name as the unique identifier.
2. Updated default web UI port to 18189 and added support for the 'OPENCLAW_UI_PORT' environment variable across scripts and settings.
3. Synchronized documentation and UI launcher scripts to reflect these changes.
2026-03-12 15:39:17 +08:00
科林_Cyril Pilgrim 425cdd0db4 feat(ui): refactor data structure and enhance configuration migration
Motivation:
The previous data structure for workflows and schemas lacked cohesion and was difficult to maintain manually. Additionally, a more robust and flexible migration system was needed to transfer skill configurations across different environments.

Implementation:
1. Unified the data hierarchy into a directory-based structure: 'data/<server>/<workflow>/'.
2. Enhanced 'transfer_manager.py' and 'transfer_bundle.py' for environmental-aware configuration migration.
3. Updated frontend JS/CSS and Flask routes to support the new directory-centric asset management.
4. Revamped English and Chinese READMEs to prioritize safe installation and clear configuration workflows.
2026-03-12 15:05:40 +08:00
科林_Cyril Pilgrim f3a9919814 feat(ui): add configuration export and import flow
Motivation:
Allows users to easily migrate or back up their skill configurations, server settings, and workflow mappings across different environments, improving setup mobility.

Implementation:
Developed a bundle system in scripts/shared/transfer_bundle.py and scripts/transfer_manager.py for state serialization. Integrated this into the Flask backend and frontend UI, adding components for export/import actions with pre-check validation. Refactored README files to document the migration path and refined the installation guide.
2026-03-12 12:05:59 +08:00
科林_Cyril Pilgrim d4388a5b41 fix(core): improve multi-server configuration and security
Motivation:
To prevent path traversal via server/workflow identifiers and ensure relative path consistency for output directories across different server environments.

Implementation:
- Added is_valid_identifier validation to comfyui_client and server_manager.
- Standardized default output_dir to relative './outputs' in config and settings.
2026-03-08 23:28:14 +08:00
科林_Cyril Pilgrim bc4097ac2d refactor(backend): support multi-server workflow isolation and registry mapping
Motivation:
The backend previously assumed a single global ComfyUI server, making it impossible to switch between environments or add remote nodes.

Implementation:
Refactored UIStorageService and scripts to organize workflows into server-specific subdirectories. Introduced ServerModel and runtime configuration loader to handle multi-server routing.
2026-03-08 17:40:03 +08:00
lgldlk 3f11d2efd0 refactor: update ComfyUI client 2026-03-08 01:31:54 +08:00
lgldlk 9dfd8b6646 feat: add shared utility modules 2026-03-08 01:31:26 +08:00
科林_Cyril Pilgrim 357001d082 docs: update registry list command instructions to include --agent flag
Motivation:
配合 registry.py 的输出模式重构,显式要求大模型/集成节点侧使用附加参数以获取深层暴露参数,避免参数解析丢失。

Implementation:
- 分别在 SKILL.md、README.md 以及 README.zh.md 的集成和指引区块中追加了 --agent 标签声明。
2026-03-07 23:59:50 +08:00
科林_Cyril Pilgrim 5b190f7f53 feat(scripts): format registry list command output with JSON indentation
Motivation:
原先 registry.py 输出的均为一行未经格式化的压缩 JSON,对于在终端直接调用命令的人类用户而言缺乏可读性且难以审查工作流结构。

Implementation:
- 在脚本 scripts/registry.py 打印输出的 json.dumps 方法中追加 indent=2 参数,以保证在终端呈现出优美的嵌套层级和换行,同时不会影响大模型将结果作为标准 JSON 进行解析。
2026-03-07 23:56:12 +08:00
科林_Cyril Pilgrim 8aae5ad119 feat(ui/registry): implement native UI, i18n system and workflow toggle control
Motivation:
消除对繁重前端框架及外部 CDN 依赖的诉求,以大幅减少构建体积并提升原生性能;同时通过纯原生的中英双语切换和配置面板层级的工作流开关,增强 Agent 调度能力的安全过滤与本地化体验。

Implementation:
- 移除 Vite 静态资产库,全面起用零依赖的原生 HTML、基于 CSS 关键帧的 Toast 及 JS DOM 控制重构面板逻辑。
- 加入基于 localStorage 数据缓存、无侵入更新的纯原生即时多语言字典。
- 后端 (app.py) 增设对于工作流配置的 'enabled' 判断及支持热插拔修改的 API '/toggle' 接口。
- 基础侧 (registry.py) 修改字典表遍历条件,实现对无效/弃用配置在大模型面前的物理隔离。
- 重构全量技能模板 (SKILL.md) 为英文并替换绝对路径为相对路径以利于发布。
2026-03-07 23:26:59 +08:00
科林_Cyril Pilgrim 33beec15d9 feat: scaffold ComfyUI OpenClaw skill and document workflow requirements
- add runnable local bridge (registry/client/ui scaffold)\n- add sample workflow/schema structure and dependencies\n- document API-format export requirement\n- document Save Image end-node requirement for stable outputs
2026-03-07 14:24:35 +08:00