@yiyi_zhang/reactflow-ui 0.5.0-beta.0 → 1.0.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 +125 -117
- package/dist/AiWorkflowIDE.d.ts +2 -0
- package/dist/WorkflowIDE.d.ts +1 -2
- package/dist/ai.d.ts +5 -1
- package/dist/components/AICopilot/ParameterSuggester.d.ts +9 -0
- package/dist/components/AiNative/AgentTimeline.d.ts +11 -6
- package/dist/components/AiNative/InlineCanvasCopilot.d.ts +7 -0
- package/dist/components/AiNative/ProposalPreviewCard.d.ts +3 -3
- package/dist/components/BrandLogo.d.ts +13 -0
- package/dist/components/ExecutionWaterfallPanel.d.ts +3 -0
- package/dist/components/SandboxConfigModal.d.ts +7 -0
- package/dist/components/StructuredJsonViewer.d.ts +11 -0
- package/dist/components/nodes/NodeLayout.d.ts +3 -1
- package/dist/hooks/useNodeExecution.d.ts +5 -2
- package/dist/index.d.ts +4 -0
- package/dist/logo.svg +37 -0
- package/dist/product-launch.html +1400 -0
- package/dist/reactflow-ui-ai.es.js +21431 -10
- package/dist/reactflow-ui.css +1 -1
- package/dist/reactflow-ui.es.js +12224 -8310
- package/dist/reactflow-ui.umd.js +27 -20
- package/dist/services/ai/agentRunner.d.ts +23 -19
- package/dist/services/ai/draftPersistence.d.ts +3 -2
- package/dist/services/ai/systemPrompt.d.ts +1 -1
- package/dist/services/ai/toolExecutor.d.ts +15 -2
- package/dist/services/ai/workflowSynthesizer.d.ts +118 -0
- package/dist/services/wlsp/workflowLsp.d.ts +101 -0
- package/dist/store/aiStore.d.ts +34 -3
- package/dist/types/aiEvents.d.ts +3 -1
- package/dist/types/conductor.d.ts +6 -1
- package/dist/types/workflow.d.ts +32 -0
- package/dist/utils/localSandboxEngine.d.ts +49 -0
- package/package.json +7 -4
- package/dist/ai-BJwQZcGK.js +0 -15168
- package/dist/arc-BUGZGgtu.js +0 -83
- package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +0 -4692
- package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +0 -2418
- package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +0 -1577
- package/dist/channel-CURI9jmI.js +0 -5
- package/dist/chunk-2J33WTMH-D7gashNz.js +0 -19
- package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +0 -8
- package/dist/chunk-55IACEB6-GYZ_m2MY.js +0 -8
- package/dist/chunk-727SXJPM-D4WVyvOg.js +0 -1528
- package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +0 -1387
- package/dist/chunk-FMBD7UC4-B3CSVzS4.js +0 -19
- package/dist/chunk-ND2GUHAM-CNj_s1aK.js +0 -68
- package/dist/chunk-QZHKN3VN-DoV8iUKo.js +0 -15
- package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +0 -16
- package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +0 -16
- package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +0 -2609
- package/dist/cytoscape.esm-kVAWcYoG.js +0 -18755
- package/dist/dagre-BM42HDAG-CFMIuOmS.js +0 -445
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/diagram-2AECGRRQ-C5jZp2YX.js +0 -217
- package/dist/diagram-5GNKFQAL-DRUVcHpp.js +0 -123
- package/dist/diagram-KO2AKTUF-BOl4aaej.js +0 -461
- package/dist/diagram-LMA3HP47-ZeckPR2Q.js +0 -142
- package/dist/diagram-OG6HWLK6-qUWeLfa-.js +0 -528
- package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +0 -899
- package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +0 -1628
- package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +0 -2707
- package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +0 -815
- package/dist/graph-BRoPeNF3.js +0 -1545
- package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +0 -24
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +0 -621
- package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +0 -834
- package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +0 -724
- package/dist/katex-DoRnZ_sp.js +0 -11682
- package/dist/layout-D9EpM4Fg.js +0 -1728
- package/dist/linear-BA49eco4.js +0 -259
- package/dist/mermaid.core-XSpZEAKP.js +0 -16137
- package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +0 -827
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +0 -163
- package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +0 -1024
- package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +0 -882
- package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +0 -847
- package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +0 -2891
- package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +0 -263
- package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +0 -16
- package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +0 -1055
- package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +0 -1557
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +0 -22512
- package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +0 -675
- package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +0 -1342
package/README.md
CHANGED
|
@@ -1,62 +1,45 @@
|
|
|
1
|
-
# Conductor Workflow IDE (
|
|
2
|
-
|
|
3
|
-
基于 React 19、ReactFlow
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
- **`WorkflowIDE
|
|
7
|
-
- **`AiWorkflowIDE
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
- **✨ AI 参数填充(v0.4.0 新增)**:节点编辑面板一键调用 AI 生成完整 `inputParameters`,基于任务类型、上游任务列表和工作流入参自动推断,diff 预览后一键应用
|
|
44
|
-
|
|
45
|
-
### 🔬 执行验证闭环(v0.4.0 新增)
|
|
46
|
-
- **执行验证面板**:在 edit 模式下点击"▶ 执行验证"按钮,填写工作流入参(表单/JSON 双模式),一键触发真实 Conductor 执行
|
|
47
|
-
- **自动切换 run 模式**:执行触发后 IDE 自动切换到运行态,通过指数退避轮询实时更新执行状态
|
|
48
|
-
- **结构化入参声明**:`WorkflowSettingsPanel` 支持可视化编辑入参名称、类型、是否必填、描述和示例值
|
|
49
|
-
|
|
50
|
-
### 📊 执行结果分析(v0.4.0 新增)
|
|
51
|
-
- **执行概览面板**:run 模式下点击"📊 分析",展示总任务数/成功率/失败数/总耗时概览卡片
|
|
52
|
-
- **步骤时序表**:按 `startTime` 排序显示所有任务的执行状态、耗时和重试次数,点击行可高亮对应节点
|
|
53
|
-
- **智能故障诊断**:自动识别 10+ 种常见 Conductor 错误模式(JSONPath 失败、HTTP 错误码、超时、认证、脚本异常等),在诊断卡片中给出可操作的修复建议
|
|
54
|
-
- **"去修复"跳转**:点击诊断卡片的"去修复"按钮,一键切换到 edit 模式并选中问题任务
|
|
55
|
-
|
|
56
|
-
### 🏢 企业级能力
|
|
57
|
-
- TypeScript 全量类型定义(WorkflowDef、TaskDef、WorkflowInputParam、ExecutionActions…)
|
|
58
|
-
- 命令式 API(`ref`)支持程序化创建、保存、导出
|
|
59
|
-
- 强类型 Ref API:`getWorkflowDef()`、`save()`、`createBlankWorkflow()`
|
|
1
|
+
# Conductor Workflow IDE (`@yiyi_zhang/reactflow-ui` v1.0.0)
|
|
2
|
+
|
|
3
|
+
基于 **React 19、ReactFlow 与 Zustand** 构建的下一代企业级 [Netflix Conductor](https://conductor-oss.org/) 工作流可视化设计器与 AI 原生编排 IDE。
|
|
4
|
+
|
|
5
|
+
提供两个可独立按需集成的核心组件入口:
|
|
6
|
+
- **`WorkflowIDE`**(主入口 `@yiyi_zhang/reactflow-ui`)— 面向专业编排与研发人员的完整可视化 IDE
|
|
7
|
+
- **`AiWorkflowIDE`**(子路径 `@yiyi_zhang/reactflow-ui/ai`)— 对话优先、AI 驱动,支持多轮 Agentic 编排、子工作流库复用与混合交互
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🌟 v1.0.0 四大核心支柱架构 (Next-Gen Architecture)
|
|
12
|
+
|
|
13
|
+
### 🧬 支柱一:确定性工作流语言服务 (W-LSP) 与数据血缘图谱
|
|
14
|
+
- **0ms 确定性 JSONPath 补全**:在节点配置面板输入 `${` 时,W-LSP 引擎实时遍历当前节点的所有**合法上游祖先节点**,融合五类数据源(运行态真实 Output、人工 Mock Output、`TaskSchema` 注册表、节点配置自省、类型默认字段)弹出零延迟自动补全,并附带 `⚡ 实时值预览`。
|
|
15
|
+
- **Portal 视口自适应锚定**:补全浮层挂载至 `document.body` 并自动感知视口边界翻转,彻底解决侧边抽屉滚动截断问题。
|
|
16
|
+
- **🔗 数据流血缘图谱 (Data Lineage Graph)**:一键开启画布级蓝色虚线动画边,直观展示跨节点 `${taskRef.output.xxx}` 的参数引用依赖与字段流向。
|
|
17
|
+
- **跨节点安全重构 (Refactor Rename)**:修改任意节点的 `taskReferenceName` 时,自动扫描并重写全图所有下游节点的 `${oldRef.output...}` 表达式,杜绝断链。
|
|
18
|
+
|
|
19
|
+
### ⚡ 支柱二:浏览器本地沙箱试跑 (0ms Dry-Run) 与时间旅行调试器
|
|
20
|
+
- **无需后端的确定性沙箱引擎 (`localSandboxEngine`)**:支持 `SIMPLE`、`HTTP`、`INLINE`(安全沙箱求值)、`SWITCH`(真实计算 `caseValueParam` / `expression` 路由)、`FORK_JOIN`(并发波次耗时推演)、`DO_WHILE`(多轮循环迭代生成 `__1`、`__2`、`__3`)、`SET_VARIABLE`、`TERMINATE` 等全量控制流。
|
|
21
|
+
- **🧪 人工模拟数据配置台 (`SandboxConfigModal`)**:
|
|
22
|
+
- **Tab 1 — 全局入参 (`workflow.input`)**:自动提取工作流声明入参与全图 `${workflow.input.xxx}` 隐式引用,一键生成可编辑 JSON 模板。
|
|
23
|
+
- **Tab 2 — 节点 Mock、故障注入与分支路由**:按节点自定义 Mock Output JSON、模拟耗时 (`durationMs`)、为 `SWITCH` 强制指定命中分支,或注入 `FAILED` / `TIMED_OUT` 异常以验证高可用容错链路。
|
|
24
|
+
- **📊 并发甘特瀑布流与时间旅行回放 (`ExecutionWaterfallPanel`)**:
|
|
25
|
+
- 底部可展开并发执行甘特图,直观呈现并行分支耗时瓶颈。
|
|
26
|
+
- 拖动**时间旅行滑块 (`Time-Travel Scrubber`)** 或点击 `▶ 0.5x / 1x / 2x` 回放,画布节点与连线按毫秒级时间戳实时还原任意历史时刻的执行状态。
|
|
27
|
+
- **🔄 循环迭代切片器 (`LoopIterationPill`) & 结构化 JSON 树 (`StructuredJsonViewer`)**:
|
|
28
|
+
- `DO_WHILE` 节点内嵌 `[1] [2] [3]` 迭代切换胶囊,点击即可切换对应轮次的子任务快照。
|
|
29
|
+
- 运行态详情面板支持字段搜索高亮、折叠展开与**一键复制 JSONPath (`${taskRef.output.xxx}`)**。
|
|
30
|
+
|
|
31
|
+
### 🤖 支柱三:画布原生 AI Co-Pilot (`Cmd+K`) 与 Shadow Graph 视觉 Diff
|
|
32
|
+
- **画布内联微调指令栏 (`InlineCanvasCopilot`)**:选中任意节点或直接在画布按下 `Cmd+K` / `Ctrl+K`,原位唤起毛玻璃 AI 指令浮层,支持局部新增下游节点、包裹重试循环、插入条件分支与自动补全参数。
|
|
33
|
+
- **👻 Shadow Graph 架构级 Diff 预览**:AI 生成或修改工作流提案时,画布直接渲染虚拟变更预览图(`+新增` 翠绿高亮、`~修改` 琥珀高亮、`-移除` 绯红虚线),支持顶部胶囊栏一键采纳或按节点部分采纳 (`Partial Accept`)。
|
|
34
|
+
- **零外部运行时依赖的轻量级流程图渲染**:内置基于 Dagre 的原生 SVG 流程图渲染引擎,无需体积庞大的外部 Mermaid 运行时即可在对话流中极速渲染架构图。
|
|
35
|
+
|
|
36
|
+
### 🎛️ 支柱四:双向实时代码同步、语义级缩放 (Semantic LOD) 与统一工作台
|
|
37
|
+
- **双向实时分屏 JSON 编辑器 (`JsonPreviewPanel`)**:底部 Dock 栏点击 **`{ } JSON`** 即可展开左画布 + 右代码的双栏分屏视图,修改 JSON 经过 300ms 防抖与结构校验后实时驱动画布重绘,画布拖拽/增删节点亦实时同步至代码。
|
|
38
|
+
- **三级语义缩放 (Semantic Zoom LOD)**:
|
|
39
|
+
- **宏观鸟瞰 (`zoom < 0.55`)**:自动收起次要技术文本,渲染高对比度色块胶囊,百节点大图依然丝滑。
|
|
40
|
+
- **标准编排 (`0.55 <= zoom <= 1.15`)**:展示节点标题、类型徽章、引用名与运行耗时。
|
|
41
|
+
- **微距透视 (`zoom > 1.15`)**:节点卡片内直接透视展示核心入参摘要(如 `GET/POST URL`、`SWITCH` 路由表达式等),免去频繁开关抽屉。
|
|
42
|
+
- **统一毛玻璃胶囊工具栏 (`ActionBar`)**:将视图层级分段滑块(**📋 业务 / 🔧 标准 / 💻 全开发**)、**🔗 数据血缘**、**⌘K AI微调**、**↺/↻ 历史栈**、**🩺 诊断**、**⚙️ 配置**、**⚡ 沙箱试运行 | 🧪** 统一收纳于右上角流式 Dock。
|
|
60
43
|
|
|
61
44
|
---
|
|
62
45
|
|
|
@@ -66,121 +49,146 @@
|
|
|
66
49
|
npm install @yiyi_zhang/reactflow-ui reactflow react react-dom
|
|
67
50
|
```
|
|
68
51
|
|
|
52
|
+
> **环境要求**:`react >= 18.0.0`(完全兼容 React 18 与 React 19),`reactflow >= 11.11.0`。
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
69
56
|
## 🚀 快速开始
|
|
70
57
|
|
|
71
|
-
### WorkflowIDE
|
|
58
|
+
### 1. `WorkflowIDE`(面向专业编排与研发人员)
|
|
72
59
|
|
|
73
60
|
```tsx
|
|
74
61
|
import { useRef } from 'react';
|
|
75
62
|
import { WorkflowIDE, WorkflowIDERef } from '@yiyi_zhang/reactflow-ui';
|
|
76
63
|
import '@yiyi_zhang/reactflow-ui/style.css';
|
|
77
64
|
|
|
78
|
-
function App() {
|
|
65
|
+
export default function App() {
|
|
79
66
|
const ideRef = useRef<WorkflowIDERef>(null);
|
|
80
67
|
|
|
81
68
|
return (
|
|
82
|
-
<div style={{ height: '100vh' }}>
|
|
83
|
-
<button onClick={() => ideRef.current?.createBlankWorkflow('my_flow')}>新建</button>
|
|
69
|
+
<div style={{ height: '100vh', width: '100%' }}>
|
|
84
70
|
<WorkflowIDE
|
|
85
71
|
ref={ideRef}
|
|
86
72
|
theme="dark"
|
|
87
73
|
themeColor="blue"
|
|
88
|
-
onSave={(workflow) => console.log('
|
|
89
|
-
|
|
74
|
+
onSave={(workflow) => console.log('保存工作流:', workflow)}
|
|
75
|
+
onWorkflowChange={(workflow) => console.log('变更回调:', workflow)}
|
|
90
76
|
/>
|
|
91
77
|
</div>
|
|
92
78
|
);
|
|
93
79
|
}
|
|
94
80
|
```
|
|
95
81
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### AiWorkflowIDE(业务用户,AI 驱动)
|
|
82
|
+
### 2. `AiWorkflowIDE`(面向业务与架构人员,AI 原生双栏编排)
|
|
99
83
|
|
|
100
|
-
|
|
84
|
+
从独立子路径 `@yiyi_zhang/reactflow-ui/ai` 导入:
|
|
101
85
|
|
|
102
86
|
```tsx
|
|
103
87
|
import { AiWorkflowIDE } from '@yiyi_zhang/reactflow-ui/ai';
|
|
104
88
|
import '@yiyi_zhang/reactflow-ui/style.css';
|
|
105
89
|
|
|
106
|
-
function
|
|
90
|
+
export default function AiApp() {
|
|
107
91
|
return (
|
|
108
|
-
<div style={{ height: '100vh' }}>
|
|
109
|
-
<AiWorkflowIDE
|
|
92
|
+
<div style={{ height: '100vh', width: '100%' }}>
|
|
93
|
+
<AiWorkflowIDE
|
|
94
|
+
aiConfig={{
|
|
95
|
+
// 生产环境推荐使用后端代理模式,避免暴露模型 API Key
|
|
96
|
+
transport: { mode: 'endpoint', endpoint: '/api/ai/workflow-agent' },
|
|
97
|
+
}}
|
|
98
|
+
draftPersist={{ key: 'my-workflow-ide-draft' }}
|
|
99
|
+
onSave={(def) => console.log('保存:', def)}
|
|
100
|
+
/>
|
|
110
101
|
</div>
|
|
111
102
|
);
|
|
112
103
|
}
|
|
113
104
|
```
|
|
114
105
|
|
|
115
|
-
|
|
106
|
+
### 3. 编程式调用 W-LSP 与本地沙箱引擎 (v1.0.0 新增)
|
|
116
107
|
|
|
117
|
-
|
|
108
|
+
```tsx
|
|
109
|
+
import {
|
|
110
|
+
executeLocalSandboxDryRun,
|
|
111
|
+
buildDataFlowGraph,
|
|
112
|
+
getCompletionItems,
|
|
113
|
+
} from '@yiyi_zhang/reactflow-ui';
|
|
114
|
+
|
|
115
|
+
// 1. 0ms 浏览器本地确定性沙箱试跑(支持自定义入参与故障注入)
|
|
116
|
+
const { instance } = executeLocalSandboxDryRun(workflowDef, {
|
|
117
|
+
workflowInput: { orderId: 'ORD-2026', vipLevel: 3 },
|
|
118
|
+
taskOverrides: {
|
|
119
|
+
charge_card: { status: 'FAILED', errorMessage: '模拟支付网关 502 超时' },
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// 2. 构建工作流全局数据血缘图谱
|
|
124
|
+
const lineageGraph = buildDataFlowGraph(workflowDef);
|
|
125
|
+
```
|
|
118
126
|
|
|
119
127
|
---
|
|
120
128
|
|
|
121
|
-
## 🛠️
|
|
122
|
-
|
|
123
|
-
### 环境要求
|
|
124
|
-
- Node.js >= 18.0.0
|
|
125
|
-
- npm 或 yarn
|
|
126
|
-
|
|
127
|
-
### 本地开发
|
|
129
|
+
## 🛠️ 本地开发与验证
|
|
128
130
|
|
|
129
131
|
```bash
|
|
130
|
-
# 克隆仓库
|
|
131
|
-
git clone https://github.com/yiyisf/reactflow-ui.git
|
|
132
|
-
cd reactflow-ui
|
|
133
|
-
|
|
134
132
|
# 安装依赖
|
|
135
133
|
npm install
|
|
136
134
|
|
|
137
|
-
#
|
|
135
|
+
# 启动本地开发调试环境(含完整演示工作台)
|
|
138
136
|
npm run dev
|
|
139
|
-
# 访问 http://localhost:5173
|
|
140
|
-
```
|
|
141
137
|
|
|
142
|
-
|
|
138
|
+
# 运行单元测试(Vitest)
|
|
139
|
+
npm test
|
|
143
140
|
|
|
144
|
-
|
|
141
|
+
# 代码规范检查
|
|
142
|
+
npm run lint
|
|
143
|
+
|
|
144
|
+
# 构建 NPM 发布产物(dist/)
|
|
145
145
|
npm run build
|
|
146
|
-
# 产物生成在 dist/ 目录
|
|
147
146
|
```
|
|
148
147
|
|
|
149
|
-
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 📁 项目结构
|
|
150
151
|
|
|
151
152
|
```
|
|
152
153
|
src/
|
|
153
|
-
├── index.ts
|
|
154
|
-
├── ai.ts
|
|
155
|
-
├── WorkflowIDE.tsx
|
|
156
|
-
├── AiWorkflowIDE.tsx
|
|
157
|
-
├── components/
|
|
158
|
-
│ ├──
|
|
159
|
-
│ ├──
|
|
160
|
-
│ ├──
|
|
161
|
-
│ ├──
|
|
162
|
-
│ ├──
|
|
163
|
-
│
|
|
164
|
-
├──
|
|
165
|
-
├──
|
|
166
|
-
├──
|
|
167
|
-
├──
|
|
168
|
-
|
|
169
|
-
├──
|
|
170
|
-
├──
|
|
171
|
-
└──
|
|
154
|
+
├── index.ts # 主入口:WorkflowIDE + W-LSP + 沙箱引擎导出
|
|
155
|
+
├── ai.ts # AI 入口(/ai 子路径):AiWorkflowIDE + Agent 工具链导出
|
|
156
|
+
├── WorkflowIDE.tsx # 专业编排组件外壳
|
|
157
|
+
├── AiWorkflowIDE.tsx # AI 原生编排组件外壳
|
|
158
|
+
├── components/
|
|
159
|
+
│ ├── WorkflowDesigner.tsx # 核心画布(集成血缘连线、Shadow Graph、时间旅行)
|
|
160
|
+
│ ├── TaskDetailPanel.tsx # 节点属性抽屉(集成 W-LSP 补全与重构提示)
|
|
161
|
+
│ ├── ExecutionTaskPanel.tsx # 运行态详情抽屉(集成 StructuredJsonViewer)
|
|
162
|
+
│ ├── SandboxConfigModal.tsx # 🧪 沙箱人工模拟数据与故障注入配置台
|
|
163
|
+
│ ├── ExecutionWaterfallPanel.tsx # 📊 并发甘特瀑布流与时间旅行回放面板
|
|
164
|
+
│ ├── JsonPreviewPanel.tsx # { } 双向实时分屏 JSON 编辑器
|
|
165
|
+
│ ├── StructuredJsonViewer.tsx # 树形 JSON 检索与一键复制 JSONPath 组件
|
|
166
|
+
│ ├── nodes/ # 节点渲染层(含 Semantic LOD 三级语义缩放与 Loop 切片器)
|
|
167
|
+
│ ├── Controls/ # 统一毛玻璃胶囊工具栏 ActionBar、ModeSlider、ControlHub
|
|
168
|
+
│ ├── AICopilot/ # W-LSP ParameterSuggester 补全浮层与对话面板
|
|
169
|
+
│ └── AiNative/ # AiCommandCenter、InlineCanvasCopilot (Cmd+K)、MermaidBlock
|
|
170
|
+
├── services/
|
|
171
|
+
│ ├── wlsp/workflowLsp.ts # W-LSP 工作流语言服务(祖先推导、Schema 推断、血缘、重构)
|
|
172
|
+
│ └── ai/ # 多模型协议适配、Agent 循环、工具注册表、规则引擎
|
|
173
|
+
├── utils/
|
|
174
|
+
│ ├── localSandboxEngine.ts # 浏览器本地确定性沙箱执行引擎
|
|
175
|
+
│ ├── validator.ts # 静态拓扑与引用校验器
|
|
176
|
+
│ └── executionAnalyzer.ts # 运行态智能故障诊断引擎
|
|
177
|
+
├── store/ # Zustand 状态管理(workflowStore、aiStore、libraryStore)
|
|
178
|
+
├── parser/ # Conductor DSL ↔ ReactFlow 节点/边双向解析器
|
|
179
|
+
└── layout/ # Dagre 自动布局与超大流程蛇形布局引擎
|
|
172
180
|
```
|
|
173
181
|
|
|
174
182
|
---
|
|
175
183
|
|
|
176
|
-
## 📚
|
|
184
|
+
## 📚 文档导航
|
|
177
185
|
|
|
178
|
-
- [
|
|
179
|
-
- [
|
|
180
|
-
- [
|
|
181
|
-
- [
|
|
186
|
+
- **[🚀 v1.0.0 产品发布宣传首页 (Product Launch Showcase)](./docs/product-launch-v1.0.0.html)** — 100% 单文件零依赖 HTML,含首屏 Before/After 耗时对比、一行命令极速体验、可拖动双滑块团队 ROI 收益计算器与交互式沙箱演练
|
|
187
|
+
- **[集成指南 (INTEGRATION.md)](./INTEGRATION.md)** — Props 详解、运行态接入、AI 代理配置、W-LSP 与沙箱 API
|
|
188
|
+
- **[版本更新日志 (CHANGELOG.md)](./CHANGELOG.md)** — `v1.0.0` 及历次版本完整变更记录
|
|
189
|
+
- **[发展路线图 (ROADMAP.md)](./ROADMAP.md)** — 演进里程碑与未来规划
|
|
190
|
+
- **[最佳实践 (docs/best-practices.md)](./docs/best-practices.md)** — 常见业务拓扑建模规范
|
|
182
191
|
|
|
183
192
|
## 📄 许可证
|
|
184
193
|
|
|
185
194
|
MIT
|
|
186
|
-
|
package/dist/AiWorkflowIDE.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ import type { CustomValidationRule } from './services/ai/ruleEngine';
|
|
|
16
16
|
import type { TaskSchema } from './services/ai/schemaRegistry';
|
|
17
17
|
import type { AiEvent } from './types/aiEvents';
|
|
18
18
|
import type { IdeDraft } from './services/ai/draftPersistence';
|
|
19
|
+
import './styles/tokens.css';
|
|
20
|
+
import './styles/executionStyles.css';
|
|
19
21
|
import './components/AiNative/AiNative.css';
|
|
20
22
|
export interface AiWorkflowIDEProps {
|
|
21
23
|
/** 初始工作流定义(编辑态) */
|
package/dist/WorkflowIDE.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ThemeMode, ThemeColor, LayoutDirection, ValidationResults, ExecutionActions, ViewMode, WorkflowExecutionInput } from './types/workflow';
|
|
3
2
|
import { WorkflowDef, WorkflowInstance } from './types/conductor';
|
|
4
3
|
import { AIServiceConfig } from './services/aiService';
|
|
@@ -132,4 +131,4 @@ export interface WorkflowIDEProps {
|
|
|
132
131
|
* />
|
|
133
132
|
* ```
|
|
134
133
|
*/
|
|
135
|
-
export declare const WorkflowIDE:
|
|
134
|
+
export declare const WorkflowIDE: import("react").ForwardRefExoticComponent<WorkflowIDEProps & import("react").RefAttributes<WorkflowIDERef>>;
|
package/dist/ai.d.ts
CHANGED
|
@@ -27,4 +27,8 @@ export { applyPartialProposal, describeDiff, computeDiff } from './services/ai/t
|
|
|
27
27
|
export type { AiMetrics } from './store/aiStore';
|
|
28
28
|
export type { WorkflowDef, TaskDef, WorkflowInputParam, WorkflowInstance } from './types/conductor';
|
|
29
29
|
export { parseWorkflowInputParams } from './types/conductor';
|
|
30
|
-
export type { ExecutionActions, ThemeMode, ThemeColor, LayoutDirection, ViewMode, TaskExecutionData } from './types/workflow';
|
|
30
|
+
export type { ExecutionActions, ThemeMode, ThemeColor, LayoutDirection, ViewMode, TaskExecutionData, WorkflowExecutionInput } from './types/workflow';
|
|
31
|
+
export { getCompletionItems, buildDataFlowGraph, refactorTaskReferenceName, getUpstreamAncestors, inferTaskOutputSchema, } from './services/wlsp/workflowLsp';
|
|
32
|
+
export type { WlspCompletionItem, DataFlowGraph, DataFlowEdge, InferredField, UpstreamTaskInfo, } from './services/wlsp/workflowLsp';
|
|
33
|
+
export { executeLocalSandboxDryRun, buildDefaultWorkflowMockInput, generateDefaultTaskOutputPreview, } from './utils/localSandboxEngine';
|
|
34
|
+
export type { SandboxDryRunOptions, TaskMockOverride, } from './utils/localSandboxEngine';
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './ParameterSuggester.css';
|
|
3
|
+
import { WlspCompletionItem, ValueType } from '../../services/wlsp/workflowLsp';
|
|
3
4
|
export interface Suggestion {
|
|
4
5
|
label: string;
|
|
5
6
|
value: string;
|
|
6
7
|
description: string;
|
|
8
|
+
category?: 'upstream' | 'workflow_input' | 'variable' | 'system' | 'ai';
|
|
9
|
+
valueType?: ValueType;
|
|
10
|
+
sourceLabel?: string;
|
|
11
|
+
sampleValue?: string;
|
|
12
|
+
isConditional?: boolean;
|
|
7
13
|
}
|
|
8
14
|
interface ParameterSuggesterProps {
|
|
9
15
|
isOpen: boolean;
|
|
10
16
|
onClose: () => void;
|
|
11
17
|
onSelect: (value: string) => void;
|
|
12
18
|
suggestions: Suggestion[];
|
|
19
|
+
wlspItems?: WlspCompletionItem[];
|
|
13
20
|
anchorRect?: DOMRect;
|
|
21
|
+
onRequestAiHint?: () => void;
|
|
22
|
+
aiLoading?: boolean;
|
|
14
23
|
}
|
|
15
24
|
declare const ParameterSuggester: React.FC<ParameterSuggesterProps>;
|
|
16
25
|
export default ParameterSuggester;
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AgentTimeline — visible work-in-progress log for the current agent turn (M2.2)
|
|
2
|
+
* AgentTimeline — visible work-in-progress log for the current agent turn (M2.2 + PI Durable 4-Phase Stepper)
|
|
3
3
|
*
|
|
4
|
-
* Replaces the single toolStatus line with
|
|
5
|
-
* ("
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* mistakes rather than experiencing an unexplained pause.
|
|
4
|
+
* Replaces the single toolStatus line with:
|
|
5
|
+
* 1. A 4-Phase Synthesis Progress Bar ("① 蓝图定义 → ② 拓扑编排 → ③ 参数与数据流 → ④ 整体校验") when progressive synthesis is active
|
|
6
|
+
* 2. A growing list of completed steps ("✓ 已搜索工作流库", "✓ 阶段 2/4:已编排 5 个任务拓扑骨架")
|
|
7
|
+
* 3. The current in-flight step as a spinner row
|
|
9
8
|
*/
|
|
10
9
|
import React from 'react';
|
|
11
10
|
import type { TimelineEntry } from '../../store/aiStore';
|
|
11
|
+
import type { SynthesisPhase } from '../../services/ai/workflowSynthesizer';
|
|
12
|
+
import type { WorkflowDef } from '../../types/conductor';
|
|
12
13
|
interface AgentTimelineProps {
|
|
13
14
|
entries: TimelineEntry[];
|
|
14
15
|
/** Current in-flight step label, or '' when nothing is actively running */
|
|
15
16
|
activeLabel: string;
|
|
17
|
+
/** Optional current 4-phase synthesis stage */
|
|
18
|
+
synthesisPhase?: SynthesisPhase;
|
|
19
|
+
/** Optional in-progress working draft */
|
|
20
|
+
workingDraft?: WorkflowDef | null;
|
|
16
21
|
}
|
|
17
22
|
declare const AgentTimeline: React.FC<AgentTimelineProps>;
|
|
18
23
|
export default AgentTimeline;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AIServiceConfig } from '../../services/aiService';
|
|
3
|
+
interface InlineCanvasCopilotProps {
|
|
4
|
+
aiConfig?: Partial<AIServiceConfig>;
|
|
5
|
+
}
|
|
6
|
+
export declare const InlineCanvasCopilot: React.FC<InlineCanvasCopilotProps>;
|
|
7
|
+
export default InlineCanvasCopilot;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ProposalPreviewCard — business step preview for AI proposals (UX Phase A / M2.2)
|
|
2
|
+
* ProposalPreviewCard — business step preview for AI proposals (UX Phase A / M2.2 + Semantic Verification Badge)
|
|
3
3
|
*
|
|
4
4
|
* Replaces the old "+N 新增 ~N 修改" number-chip summary with an actual preview of
|
|
5
5
|
* what the workflow will look like: every step in business language, added steps
|
|
6
6
|
* highlighted green, modified steps yellow with a one-line change description,
|
|
7
|
-
* removed steps struck through in place
|
|
8
|
-
*
|
|
7
|
+
* removed steps struck through in place, plus a holistic semantic & data-flow
|
|
8
|
+
* verification badge.
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import type { ProposedChange } from '../../store/aiStore';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BrandLogoProps {
|
|
3
|
+
size?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Conductor Workflow IDE 极简几何品牌 Logo
|
|
9
|
+
*
|
|
10
|
+
* 设计语言:深空圆角矩形底座 + 贝塞尔双分支编排流向 + 三色确定性拓扑节点(靛紫起点 → 青蓝分支 / 翠绿沙箱通过节点)
|
|
11
|
+
*/
|
|
12
|
+
export declare const BrandLogo: React.FC<BrandLogoProps>;
|
|
13
|
+
export default BrandLogo;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface StructuredJsonViewerProps {
|
|
3
|
+
data: any;
|
|
4
|
+
/** Optional taskReferenceName to generate `${taskRef.output.xxx}` expressions on hover */
|
|
5
|
+
taskReferenceName?: string;
|
|
6
|
+
/** Either 'output' or 'input' (or 'workflow.input') for expression path generation */
|
|
7
|
+
expressionScope?: 'output' | 'input' | 'workflow.input';
|
|
8
|
+
maxHeight?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const StructuredJsonViewer: React.FC<StructuredJsonViewerProps>;
|
|
11
|
+
export default StructuredJsonViewer;
|
|
@@ -4,7 +4,9 @@ interface NodeLayoutProps {
|
|
|
4
4
|
icon: React.ElementType;
|
|
5
5
|
header: string;
|
|
6
6
|
title: string;
|
|
7
|
+
subTitle?: string;
|
|
7
8
|
meta?: string;
|
|
9
|
+
duration?: string;
|
|
8
10
|
color: string;
|
|
9
11
|
status?: ExecutionStatus;
|
|
10
12
|
isRunning?: boolean;
|
|
@@ -12,5 +14,5 @@ interface NodeLayoutProps {
|
|
|
12
14
|
width?: string | number;
|
|
13
15
|
border?: boolean;
|
|
14
16
|
}
|
|
15
|
-
declare const _default: React.MemoExoticComponent<({ icon: Icon, header, title, meta, color, status, isRunning, children, width,
|
|
17
|
+
declare const _default: React.MemoExoticComponent<({ icon: Icon, header, title, subTitle, meta, duration, color, status, isRunning, children, width, }: NodeLayoutProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
18
|
export default _default;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { TaskExecutionData } from '../types/workflow';
|
|
1
2
|
/**
|
|
2
|
-
* 获取节点的运行态信息(mode、executionData、retryCount
|
|
3
|
+
* 获取节点的运行态信息(mode、executionData、retryCount),
|
|
4
|
+
* 支持 DO_WHILE 循环迭代轮次切换与 Time-Travel 时间旅行状态投影。
|
|
3
5
|
*/
|
|
4
6
|
export declare const useNodeExecution: (taskReferenceName: string) => {
|
|
5
7
|
mode: import("../types/workflow").EditorMode;
|
|
6
|
-
execution:
|
|
8
|
+
execution: TaskExecutionData | null;
|
|
7
9
|
isRunning: boolean;
|
|
8
10
|
retryCount: number;
|
|
11
|
+
durationText: string | undefined;
|
|
9
12
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4,3 +4,7 @@ export type { WorkflowDef, TaskDef, WorkflowInputParam, WorkflowInstance } from
|
|
|
4
4
|
export { parseWorkflowInputParams } from './types/conductor';
|
|
5
5
|
export type { AIServiceConfig } from './services/aiService';
|
|
6
6
|
export type { ExecutionActions, RestartOptions, ViewMode, RunState, WorkflowExecutionInput } from './types/workflow';
|
|
7
|
+
export { getCompletionItems, buildDataFlowGraph, refactorTaskReferenceName, getUpstreamAncestors, inferTaskOutputSchema, } from './services/wlsp/workflowLsp';
|
|
8
|
+
export type { WlspCompletionItem, DataFlowGraph, DataFlowEdge, InferredField, UpstreamTaskInfo, } from './services/wlsp/workflowLsp';
|
|
9
|
+
export { executeLocalSandboxDryRun, buildDefaultWorkflowMockInput, generateDefaultTaskOutputPreview, } from './utils/localSandboxEngine';
|
|
10
|
+
export type { SandboxDryRunOptions, TaskMockOverride, } from './utils/localSandboxEngine';
|
package/dist/logo.svg
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg-grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0%" stop-color="#11172B" />
|
|
5
|
+
<stop offset="100%" stop-color="#090D18" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="border-grad" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse">
|
|
8
|
+
<stop offset="0%" stop-color="#6366F1" stop-opacity="0.75" />
|
|
9
|
+
<stop offset="100%" stop-color="#06B6D4" stop-opacity="0.45" />
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<linearGradient id="branch-top" x1="9" y1="16" x2="23" y2="10" gradientUnits="userSpaceOnUse">
|
|
12
|
+
<stop offset="0%" stop-color="#818CF8" />
|
|
13
|
+
<stop offset="100%" stop-color="#22D3EE" />
|
|
14
|
+
</linearGradient>
|
|
15
|
+
<linearGradient id="branch-bottom" x1="9" y1="16" x2="23" y2="22" gradientUnits="userSpaceOnUse">
|
|
16
|
+
<stop offset="0%" stop-color="#6366F1" />
|
|
17
|
+
<stop offset="100%" stop-color="#34D399" />
|
|
18
|
+
</linearGradient>
|
|
19
|
+
</defs>
|
|
20
|
+
|
|
21
|
+
<!-- Minimalist Squircle Base -->
|
|
22
|
+
<rect x="1.25" y="1.25" width="29.5" height="29.5" rx="8" fill="url(#bg-grad)" stroke="url(#border-grad)" stroke-width="1.5" />
|
|
23
|
+
|
|
24
|
+
<!-- Bifurcated DAG Flow Curves -->
|
|
25
|
+
<path d="M 9.5 16 C 15 16, 15.5 10, 22.5 10" stroke="url(#branch-top)" stroke-width="2.4" stroke-linecap="round" />
|
|
26
|
+
<path d="M 9.5 16 C 15 16, 15.5 22, 22.5 22" stroke="url(#branch-bottom)" stroke-width="2.4" stroke-linecap="round" />
|
|
27
|
+
|
|
28
|
+
<!-- Origin Root Node -->
|
|
29
|
+
<circle cx="9.5" cy="16" r="3.4" fill="#6366F1" />
|
|
30
|
+
<circle cx="9.5" cy="16" r="1.4" fill="#F8FAFC" />
|
|
31
|
+
|
|
32
|
+
<!-- Upper Branch Target Node -->
|
|
33
|
+
<circle cx="22.5" cy="10" r="2.7" fill="#22D3EE" />
|
|
34
|
+
|
|
35
|
+
<!-- Lower Branch Deterministic Pass Node -->
|
|
36
|
+
<circle cx="22.5" cy="22" r="2.7" fill="#34D399" />
|
|
37
|
+
</svg>
|