32 lines
2.7 KiB
Markdown
32 lines
2.7 KiB
Markdown
# Change: Add Visual Business Orchestration
|
|
|
|
## Why
|
|
The current TrueGrowth workflow concept is not usable as a real business automation surface. Users need a visual editor where they can compose image generation, video generation, digital-human production, intelligent editing, publishing, and intelligence/news summarization into repeatable automated flows.
|
|
|
|
This also needs a scheduling layer: operators should be able to run workflows such as "every day at 09:00, summarize news, generate a digital-human video, edit it, and publish it to Douyin" with execution records, logs, progress, retries, and crash recovery.
|
|
|
|
## What Changes
|
|
- Rebuild the existing `/workflow` "流程编排" workbench module as a React Flow based visual DAG editor instead of adding a second workflow entry.
|
|
- Add draggable node types for intelligence/news input, AI image, AI video, digital human, intelligent editing, asset/material operations, publish center, conditions, transforms, webhooks/manual approval, and utility steps.
|
|
- Add a node configuration inspector with detailed provider, model, prompt, media, schedule, retry, timeout, concurrency, and output mapping settings.
|
|
- Add a lightweight TrueGrowth DAG execution engine instead of embedding a full third-party automation platform.
|
|
- Add workflow validation for cycles, missing inputs, incompatible media, unsupported publish targets, and schedule conflicts.
|
|
- Add a scheduled task center for cron-style recurring runs, one-off schedules, manual triggers, enable/disable controls, next-run preview, execution history, logs, and per-node progress.
|
|
- Connect execution to existing TrueGrowth providers, local runtime tasks, FunClip/FFmpeg/ASR sidecar, and social publishing adapters.
|
|
- Add persistence and recovery contracts so workflow definitions, schedules, runs, node events, logs, and artifacts survive refreshes and local runtime restarts.
|
|
- Add targeted unit, integration, and browser tests to prove the editor, validation, scheduling, and run tracking work end to end.
|
|
|
|
## Impact
|
|
- Affected specs: business-orchestration
|
|
- Affected code:
|
|
- `apps/web/src/workbench/WorkbenchShell.tsx`
|
|
- `apps/web/src/workbench/app-definitions.tsx`
|
|
- `apps/web/src/workbench/workbench.scss`
|
|
- `apps/web/src/workbench/truegrowth.types.ts`
|
|
- `apps/web/src/workbench/local-runtime-client.ts`
|
|
- new workbench orchestration components under `apps/web/src/workbench/`
|
|
- existing `/workflow` route implementation and `WORKFLOW_PRESETS` migration path
|
|
- local runtime orchestration endpoints under `scripts/truegrowth-local-api.mjs` or a split runtime module
|
|
- Electron runtime isolation under `apps/electron/` when packaging requires heavy sidecar isolation
|
|
- existing task, asset, provider, FunClip, ComfyUI/AIGCPanel, Agent-Reach, and social publishing bridge code
|