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.
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.
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.
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.
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.