@yiyi_zhang/reactflow-ui 1.0.0 → 1.2.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.
Files changed (72) hide show
  1. package/README.md +28 -3
  2. package/dist/AiWorkflowIDE.d.ts +21 -0
  3. package/dist/WorkflowIDE.d.ts +34 -0
  4. package/dist/actions/builtin/common.d.ts +8 -0
  5. package/dist/actions/builtin/ecs.d.ts +12 -0
  6. package/dist/actions/fromDefinitions.d.ts +70 -0
  7. package/dist/actions/registry.d.ts +24 -0
  8. package/dist/actions/types.d.ts +71 -0
  9. package/dist/ai.d.ts +9 -0
  10. package/dist/components/AiNative/AiCommandCenter.d.ts +4 -0
  11. package/dist/components/business/ActionForm.d.ts +12 -0
  12. package/dist/components/business/ActionPickerModal.d.ts +25 -0
  13. package/dist/components/business/DataPillInput.d.ts +16 -0
  14. package/dist/components/business/DecisionBranchCard.d.ts +15 -0
  15. package/dist/components/business/ForkJoinCard.d.ts +15 -0
  16. package/dist/components/business/FriendlyErrorCard.d.ts +8 -0
  17. package/dist/components/business/LibraryVersionBadge.d.ts +29 -0
  18. package/dist/components/business/LoopDoWhileCard.d.ts +15 -0
  19. package/dist/components/business/NestedControlStep.d.ts +22 -0
  20. package/dist/components/business/PillPicker.d.ts +11 -0
  21. package/dist/components/business/RunStoryTimeline.d.ts +9 -0
  22. package/dist/components/business/StepFlowEditor.d.ts +20 -0
  23. package/dist/components/business/StepListEditor.d.ts +29 -0
  24. package/dist/components/template/TemplateExtractor.d.ts +10 -0
  25. package/dist/components/template/TemplateGallery.d.ts +10 -0
  26. package/dist/components/template/TemplateSetupWizard.d.ts +9 -0
  27. package/dist/index.d.ts +36 -1
  28. package/dist/library/catalog.d.ts +93 -0
  29. package/dist/library/conductorProvider.d.ts +41 -0
  30. package/dist/library/diff.d.ts +62 -0
  31. package/dist/library/index.d.ts +16 -0
  32. package/dist/library/level.d.ts +6 -0
  33. package/dist/library/naming.d.ts +28 -0
  34. package/dist/library/projections.d.ts +53 -0
  35. package/dist/library/types.d.ts +58 -0
  36. package/dist/library/useLibraryCatalog.d.ts +9 -0
  37. package/dist/library/version.d.ts +17 -0
  38. package/dist/library/versionStatus.d.ts +44 -0
  39. package/dist/product-launch.html +3 -3
  40. package/dist/reactflow-ui-ai.es.js +14330 -8509
  41. package/dist/reactflow-ui.css +1 -1
  42. package/dist/reactflow-ui.es.js +16707 -8202
  43. package/dist/reactflow-ui.umd.js +30 -24
  44. package/dist/sample-workflows/ecs-lifecycle-automation.json +74 -0
  45. package/dist/sample-workflows/library-capabilities-demo.json +66 -0
  46. package/dist/services/ai/agentRunner.d.ts +11 -0
  47. package/dist/services/ai/schemaRegistry.d.ts +7 -1
  48. package/dist/services/ai/systemPrompt.d.ts +11 -0
  49. package/dist/services/ai/toolExecutor.d.ts +12 -0
  50. package/dist/services/ai/workflowSynthesizer.d.ts +28 -3
  51. package/dist/stepmodel/compile.d.ts +11 -0
  52. package/dist/stepmodel/decompile.d.ts +10 -0
  53. package/dist/stepmodel/factory.d.ts +8 -0
  54. package/dist/stepmodel/types.d.ts +64 -0
  55. package/dist/store/ideStoresContext.d.ts +3 -0
  56. package/dist/store/workflowStore.d.ts +1 -0
  57. package/dist/template/applyTemplate.d.ts +10 -0
  58. package/dist/template/builtin/templates.d.ts +37 -0
  59. package/dist/template/sanitizer/anonymize.d.ts +5 -0
  60. package/dist/template/sanitizer/prune.d.ts +10 -0
  61. package/dist/template/sanitizer/rules.d.ts +10 -0
  62. package/dist/template/sanitizer/types.d.ts +55 -0
  63. package/dist/template/templateStore.d.ts +32 -0
  64. package/dist/template/types.d.ts +99 -0
  65. package/dist/types/conductor.d.ts +13 -8
  66. package/dist/types/workflow.d.ts +9 -0
  67. package/dist/types/workflowLibrary.d.ts +2 -0
  68. package/dist/utils/friendlyErrorTranslator.d.ts +26 -0
  69. package/dist/utils/taskTypeMeta.d.ts +3 -3
  70. package/package.json +1 -1
  71. package/dist/components/AiNative/BusinessCanvas.d.ts +0 -15
  72. package/dist/components/Controls/ModeSlider.d.ts +0 -2
package/README.md CHANGED
@@ -1,14 +1,39 @@
1
- # Conductor Workflow IDE (`@yiyi_zhang/reactflow-ui` v1.0.0)
1
+ # Conductor Workflow IDE (`@yiyi_zhang/reactflow-ui` v1.1.0)
2
2
 
3
3
  基于 **React 19、ReactFlow 与 Zustand** 构建的下一代企业级 [Netflix Conductor](https://conductor-oss.org/) 工作流可视化设计器与 AI 原生编排 IDE。
4
4
 
5
5
  提供两个可独立按需集成的核心组件入口:
6
- - **`WorkflowIDE`**(主入口 `@yiyi_zhang/reactflow-ui`)— 面向专业编排与研发人员的完整可视化 IDE
6
+ - **`WorkflowIDE`**(主入口 `@yiyi_zhang/reactflow-ui`)— 双模全融合,支持面向业务与运维的**业务卡片流 (StepFlow)**,以及面向架构研发的**专业开发者 DAG 拓扑**同屏热切换
7
7
  - **`AiWorkflowIDE`**(子路径 `@yiyi_zhang/reactflow-ui/ai`)— 对话优先、AI 驱动,支持多轮 Agentic 编排、子工作流库复用与混合交互
8
8
 
9
9
  ---
10
10
 
11
- ## 🌟 v1.0.0 四大核心支柱架构 (Next-Gen Architecture)
11
+ ## ⚡ v1.1.0 业务与技术全融合核心新特性 (New in v1.1.0)
12
+
13
+ ### 👔 支柱一:业务卡片流设计器 (Business StepFlow) 与双模同屏无损热切换
14
+ - **双模毫秒级热切换**:工具栏一键切换 `👔 业务模式` ⇄ `💻 开发者模式`。业务模式下将复杂的微服务连线拓扑解构为清晰直观的业务卡片流,支持任意位置插入步骤、上下重排与内联表单配置。
15
+ - **StepModel 双向无损编译引擎**:提供递归编译器与反编译器,保证卡片流与原生 Conductor DAG 之间 100% 状态保真转换,非标任务通过 `isProFallback` 严格兜底。
16
+
17
+ ### ☁️ 支柱二:内置云平台动作库与动态参数胶囊
18
+ - **首发生态对接类阿里云云主机 (ECS) 全生命周期动作**:创建云主机、启停机、磁盘快照备份、平滑升降规格、释放实例等。
19
+ - **动态参数胶囊与智能上游引用**:表单输入项胶囊化呈现,一键联想并安全绑定上游步骤产出的参数引用。
20
+
21
+ ### 🔀 支柱三:业务容器化高级控制流卡片
22
+ - **分支路由卡片 (`DecisionBranchCard`)**:分支 Tabs 导航、条件参数配置、分支内多步骤嵌套编排。
23
+ - **并行任务泳道卡片 (`ForkJoinCard`)**:多泳道并发设计器,动态增删泳道。
24
+ - **循环迭代容器卡片 (`LoopDoWhileCard`)**:循环体内嵌任务序列、继续条件表达式与防死循环熔断保护。
25
+
26
+ ### 🪄 支柱四:生产实例一键脱敏提炼为模板工具链 (Template Extractor)
27
+ - **生产资产一键沉淀**:将生产环境或演练场调试好的工作流一键提炼为公共模板,智能隐私脱敏引擎自动擦除内网 IP、密钥、密码与机密 ID。
28
+ - **8 大开箱即用场景模板中心**:覆盖云主机自动化、扩容容灾、定时省电关机等高频场景,支持全流程浏览器沙箱试跑验证。
29
+
30
+ ### 📖 支柱五:运行故事线时间轴与生活化诊断自愈建议
31
+ - **流水账故事线展开 (`RunStoryTimeline`)**:运行态以自然语言叙述工作流执行过程,直观呈现每一步耗时与数据快照。
32
+ - **生活化故障诊断自愈**:告别晦涩堆栈报错,提供通俗易懂的根因诊断与可直接操作的自愈行动建议。
33
+
34
+ ---
35
+
36
+ ## 🌟 v1.0.0 四大确定性工程底座 (Foundation)
12
37
 
13
38
  ### 🧬 支柱一:确定性工作流语言服务 (W-LSP) 与数据血缘图谱
14
39
  - **0ms 确定性 JSONPath 补全**:在节点配置面板输入 `${` 时,W-LSP 引擎实时遍历当前节点的所有**合法上游祖先节点**,融合五类数据源(运行态真实 Output、人工 Mock Output、`TaskSchema` 注册表、节点配置自省、类型默认字段)弹出零延迟自动补全,并附带 `⚡ 实时值预览`。
@@ -10,6 +10,7 @@ import type { WorkflowDef, WorkflowInstance } from './types/conductor';
10
10
  import type { AiConfig } from './services/ai/protocolAdapter';
11
11
  import type { AiMetrics } from './store/aiStore';
12
12
  import type { WorkflowLibraryItem } from './types/workflowLibrary';
13
+ import type { LibraryProvider } from './library/types';
13
14
  import type { ExecutionActions, ThemeMode, ThemeColor, LayoutDirection, ViewMode, WorkflowExecutionInput } from './types/workflow';
14
15
  import type { CustomTool } from './services/ai/toolRegistry';
15
16
  import type { CustomValidationRule } from './services/ai/ruleEngine';
@@ -42,6 +43,26 @@ export interface AiWorkflowIDEProps {
42
43
  * ```
43
44
  */
44
45
  workflowLibrary?: WorkflowLibraryItem[];
46
+ /**
47
+ * 流程库数据源(LibraryProvider)。提供后,库内流程 / 任务定义经规范化后同时投影为
48
+ * AI 目录(`workflowLibrary`)、任务 Schema(`taskSchemas`)与检索工具的数据来源;
49
+ * 同名条目 Provider 优先于静态 prop,静态 prop 仍可单独使用。
50
+ *
51
+ * `libraryProvider` 引用变化时重新加载,组件卸载时中止进行中的请求。
52
+ * AI 新建的 SUB_WORKFLOW 会固定为目录当前最新版本,已有版本号不会被自动改变。
53
+ *
54
+ * ```tsx
55
+ * const provider = createConductorLibraryProvider({ baseUrl, headers });
56
+ * <AiWorkflowIDE libraryProvider={provider} />
57
+ * ```
58
+ */
59
+ libraryProvider?: LibraryProvider;
60
+ /**
61
+ * 流程库目录注入系统提示词的条数上限,默认 50(按层级 L3 -> L1 截断)。
62
+ * 超出部分会提示 AI 改用 `search_workflow_library` 检索。
63
+ * 提供 `libraryProvider` 时,任务 Schema 段落同样受此上限约束。
64
+ */
65
+ promptCatalogLimit?: number;
45
66
  /**
46
67
  * AI 模型配置(集成方提供)。
47
68
  *
@@ -1,6 +1,9 @@
1
1
  import { ThemeMode, ThemeColor, LayoutDirection, ValidationResults, ExecutionActions, ViewMode, WorkflowExecutionInput } from './types/workflow';
2
2
  import { WorkflowDef, WorkflowInstance } from './types/conductor';
3
3
  import { AIServiceConfig } from './services/aiService';
4
+ import { ActionDefinition } from './actions/types';
5
+ import type { WorkflowLevel } from './types/workflowLibrary';
6
+ import type { LibraryProvider } from './library/types';
4
7
  import './styles/tokens.css';
5
8
  import './styles/executionStyles.css';
6
9
  /**
@@ -92,6 +95,37 @@ export interface WorkflowIDEProps {
92
95
  * AI 配置。通过 Props 注入优先于 localStorage 配置。
93
96
  */
94
97
  aiConfig?: Partial<AIServiceConfig>;
98
+ /**
99
+ * UI 体验模式:
100
+ * - `pro` (默认): 专业开发者模式,展示完整 DAG 画布、底层参数、Monaco JSON
101
+ * - `business`: 面向普通使用者的业务模式,提供卡片步骤流、业务动作与数据胶囊
102
+ * @default 'pro'
103
+ */
104
+ uiMode?: 'pro' | 'business';
105
+ /**
106
+ * 自定义扩展的业务动作定义列表。
107
+ * 宿主可传入自定义业务动作(如私有云/特定系统连接器)。
108
+ */
109
+ actions?: ActionDefinition[];
110
+ /**
111
+ * 流程库数据源(LibraryProvider)。提供后,库内流程 / 任务定义会生成业务动作并注册到本实例的动作库:
112
+ * 流程库能力编译为 `SUB_WORKFLOW`,步骤在首次引用时固定为目录当前最新版本,
113
+ * 库发布新版本后步骤不会自动跟随,徽标提示「有新版本」,由用户确认差异后手动升级。
114
+ *
115
+ * 同名动作 Provider 优先于 `actions`;不传时 `actions` 的行为完全不变。
116
+ * `libraryProvider` 引用变化时重新加载,组件卸载时中止进行中的请求。
117
+ *
118
+ * ```tsx
119
+ * const provider = createConductorLibraryProvider({ baseUrl, headers });
120
+ * <WorkflowIDE uiMode="business" libraryProvider={provider} />
121
+ * ```
122
+ */
123
+ libraryProvider?: LibraryProvider;
124
+ /**
125
+ * 当前正在编辑的工作流层级(L1 / L2 / L3)。
126
+ * 提供时,动作选择器隐藏违反分层调用规则的流程库动作(L1 不显示 L2/L3,L2 不显示 L3);未提供则不过滤。
127
+ */
128
+ currentWorkflowLevel?: WorkflowLevel;
95
129
  /**
96
130
  * 组件容器高度。
97
131
  * @default '100%'
@@ -0,0 +1,8 @@
1
+ import type { ActionDefinition } from '../types';
2
+ export declare const notifySendMessageAction: ActionDefinition;
3
+ export declare const humanApprovalAction: ActionDefinition;
4
+ export declare const controlWaitAction: ActionDefinition;
5
+ export declare const controlDecisionAction: ActionDefinition;
6
+ export declare const controlForkAction: ActionDefinition;
7
+ export declare const controlLoopAction: ActionDefinition;
8
+ export declare const BUILTIN_COMMON_ACTIONS: ActionDefinition[];
@@ -0,0 +1,12 @@
1
+ import type { ActionDefinition } from '../types';
2
+ export declare const ecsCreateInstanceAction: ActionDefinition;
3
+ export declare const ecsQueryInstanceAction: ActionDefinition;
4
+ export declare const ecsStartInstanceAction: ActionDefinition;
5
+ export declare const ecsStopInstanceAction: ActionDefinition;
6
+ export declare const ecsRestartInstanceAction: ActionDefinition;
7
+ export declare const ecsModifySpecAction: ActionDefinition;
8
+ export declare const ecsCreateSnapshotAction: ActionDefinition;
9
+ export declare const ecsRunCommandAction: ActionDefinition;
10
+ export declare const ecsGetMonitorMetricsAction: ActionDefinition;
11
+ export declare const ecsReleaseInstanceAction: ActionDefinition;
12
+ export declare const BUILTIN_ECS_ACTIONS: ActionDefinition[];
@@ -0,0 +1,70 @@
1
+ import type { SchemaDef, WorkflowDef } from '../types/conductor';
2
+ import type { ActionCategory, ActionDefinition, ActionField, ActionOutputField } from './types';
3
+ import type { WorkflowLevel } from '../types/workflowLibrary';
4
+ /**
5
+ * 从 Conductor OSS 标准定义(WorkflowDef / 已注册 TaskDef)生成业务动作。
6
+ *
7
+ * 设计原则:
8
+ * - 库本身不发请求:定义数据由接入方从治理层取得(权限过滤也在治理层完成)。
9
+ * - 标准结构给不了的信息(中文名、分类、图标、风险等级、特殊控件、层级、标签)
10
+ * 通过可选的 ActionExtension 补充;缺省时按合理默认值降级,保证任何定义都能出现在动作库里。
11
+ */
12
+ /** 治理层/接入方提供的补充字段(均可选,按名称一一对应) */
13
+ export interface ActionExtension {
14
+ /** 业务展示名(缺省使用定义名称) */
15
+ label?: string;
16
+ description?: string;
17
+ category?: ActionCategory;
18
+ icon?: string;
19
+ riskLevel?: 'safe' | 'sensitive';
20
+ connector?: string;
21
+ level?: WorkflowLevel;
22
+ /** 业务域展示名 */
23
+ domain?: string;
24
+ tags?: string[];
25
+ /** 为 true 时不进入动作库(例如用户无权限、已下线) */
26
+ hidden?: boolean;
27
+ /** 按入参 key 覆盖表单字段属性(中文标签、控件类型、下拉选项等) */
28
+ fieldOverrides?: Record<string, Partial<ActionField>>;
29
+ /** 按出参 key 覆盖出参说明(中文标签、示例值) */
30
+ outputOverrides?: Record<string, Partial<ActionOutputField>>;
31
+ }
32
+ /** Conductor `/metadata/taskdefs` 返回的已注册任务定义(只列本模块用到的标准字段) */
33
+ export interface RegisteredTaskDef {
34
+ name: string;
35
+ description?: string;
36
+ /** 仅文档用途,不强制 */
37
+ inputKeys?: string[];
38
+ outputKeys?: string[];
39
+ inputTemplate?: Record<string, any>;
40
+ inputSchema?: SchemaDef;
41
+ outputSchema?: SchemaDef;
42
+ ownerEmail?: string;
43
+ }
44
+ /**
45
+ * 将 JSON Schema 的 properties 转为表单字段;没有 schema 时退化为仅有 key 列表
46
+ * (Conductor 的 inputKeys / inputParameters 只有名称),类型一律按文本处理。
47
+ */
48
+ export declare function buildFields(schema: SchemaDef | undefined, fallbackKeys: string[], inputTemplate?: Record<string, any>): ActionField[];
49
+ /** 出参:优先 outputSchema;其次 outputKeys / outputParameters 的 key(后者是输出模板,其 key 即对外接口) */
50
+ export declare function buildOutputs(schema: SchemaDef | undefined, fallbackKeys: string[], outputTemplate?: Record<string, any>): ActionOutputField[];
51
+ /**
52
+ * 把流程库中的一个工作流定义生成为动作:业务用户只面对入参表单与出参,
53
+ * 编译为 SUB_WORKFLOW 引用。版本由步骤上的 libraryRef 决定(首次引用时固定)。
54
+ * 被 extension.hidden 标记时返回 null。
55
+ */
56
+ export declare function buildActionFromWorkflowDef(def: WorkflowDef, ext?: ActionExtension): ActionDefinition | null;
57
+ /** 已注册任务定义生成原子动作,编译为同名 SIMPLE 任务。 */
58
+ export declare function buildActionFromTaskDef(def: RegisteredTaskDef, ext?: ActionExtension): ActionDefinition | null;
59
+ export interface LibraryWorkflowEntry {
60
+ workflowDef: WorkflowDef;
61
+ extension?: ActionExtension;
62
+ }
63
+ export interface RegisteredTaskEntry {
64
+ taskDef: RegisteredTaskDef;
65
+ extension?: ActionExtension;
66
+ }
67
+ /** 批量生成流程库动作(自动跳过 hidden) */
68
+ export declare function buildActionsFromLibrary(entries: LibraryWorkflowEntry[]): ActionDefinition[];
69
+ /** 批量生成原子任务动作(自动跳过 hidden) */
70
+ export declare function buildActionsFromTaskDefs(entries: RegisteredTaskEntry[]): ActionDefinition[];
@@ -0,0 +1,24 @@
1
+ import type { ActionDefinition, ActionCategory } from './types';
2
+ import type { TaskDef } from '../types/conductor';
3
+ export declare class ActionRegistry {
4
+ private actions;
5
+ constructor(initialActions?: ActionDefinition[]);
6
+ register(action: ActionDefinition): void;
7
+ registerAll(actions: ActionDefinition[]): void;
8
+ unregister(id: string): void;
9
+ getAction(id: string): ActionDefinition | undefined;
10
+ getAllActions(): ActionDefinition[];
11
+ getActionsByCategory(category?: ActionCategory): ActionDefinition[];
12
+ /**
13
+ * Given a Conductor TaskDef, attempt to find a matching ActionDefinition
14
+ * and decompile it into friendly form values.
15
+ */
16
+ findActionForTask(task: TaskDef): {
17
+ action: ActionDefinition;
18
+ values: Record<string, any>;
19
+ } | null;
20
+ }
21
+ /**
22
+ * Global default ActionRegistry pre-populated with Cloud Host (ECS) and Common actions
23
+ */
24
+ export declare const defaultActionRegistry: ActionRegistry;
@@ -0,0 +1,71 @@
1
+ import type { TaskDef } from '../types/conductor';
2
+ import type { WorkflowLevel } from '../types/workflowLibrary';
3
+ export type ActionCategory = 'compute' | 'storage' | 'network' | 'monitor' | 'notify' | 'logic' | 'human' | 'custom';
4
+ export type ActionFieldType = 'text' | 'textarea' | 'number' | 'select' | 'boolean' | 'account' | 'cron-friendly';
5
+ export interface ActionFieldOption {
6
+ label: string;
7
+ value: any;
8
+ description?: string;
9
+ }
10
+ export interface ActionField {
11
+ key: string;
12
+ label: string;
13
+ type: ActionFieldType;
14
+ help?: string;
15
+ placeholder?: string;
16
+ required?: boolean;
17
+ defaultValue?: any;
18
+ options?: ActionFieldOption[];
19
+ acceptsPills?: boolean;
20
+ }
21
+ export interface ActionOutputField {
22
+ key: string;
23
+ label: string;
24
+ type: 'string' | 'number' | 'boolean' | 'object' | 'array';
25
+ example?: any;
26
+ description?: string;
27
+ }
28
+ export interface CompileCtx {
29
+ taskReferenceName: string;
30
+ stepIndex: number;
31
+ workflowName?: string;
32
+ /**
33
+ * 该步骤引用流程库能力时记录的 {名称, 版本}。
34
+ * 版本在首次引用时固定,库升级后不会自动跟随;version 缺省表示沿用原定义(不显式指定版本)。
35
+ */
36
+ libraryRef?: LibraryRef;
37
+ }
38
+ /** 步骤对流程库能力(SUB_WORKFLOW)的引用记录 */
39
+ export interface LibraryRef {
40
+ name: string;
41
+ version?: number;
42
+ }
43
+ export interface ActionDefinition {
44
+ id: string;
45
+ name: string;
46
+ category: ActionCategory;
47
+ icon: string;
48
+ description: string;
49
+ connector?: string;
50
+ /** 动作来源:task = 原子任务(默认),workflow = 流程库能力(以 SUB_WORKFLOW 引用) */
51
+ kind?: 'task' | 'workflow';
52
+ /** kind = workflow 时:库中该能力的当前最新版本,用于提示“有新版本可升级” */
53
+ workflowRef?: {
54
+ name: string;
55
+ version: number;
56
+ };
57
+ /** 流程库层级 L1 / L2 / L3(调用方向规则见 workflowLibrary) */
58
+ level?: WorkflowLevel;
59
+ /** 业务域展示名(流程库动作);动作选择器据此分组,缺省归入「其他」 */
60
+ domain?: string;
61
+ /** 已下线 / 不建议新引用:动作选择器隐藏,但已引用的步骤照常显示与编译 */
62
+ deprecated?: boolean;
63
+ tags?: string[];
64
+ ownerEmail?: string;
65
+ riskLevel: 'safe' | 'sensitive';
66
+ fields: ActionField[];
67
+ outputs: ActionOutputField[];
68
+ compile: (values: Record<string, any>, ctx: CompileCtx) => TaskDef;
69
+ decompile?: (task: TaskDef) => Record<string, any> | null;
70
+ mockOutput?: (values: Record<string, any>) => Record<string, any>;
71
+ }
package/dist/ai.d.ts CHANGED
@@ -21,6 +21,15 @@ export type { CustomTool } from './services/ai/toolRegistry';
21
21
  export type { CustomValidationRule } from './services/ai/ruleEngine';
22
22
  export type { TaskSchema } from './services/ai/schemaRegistry';
23
23
  export type { WorkflowLevel, WorkflowLibraryItem, WorkflowLibraryDetail } from './types/workflowLibrary';
24
+ export type { LibraryProvider, LibraryExtension, LibraryWorkflowRecord, LibraryTaskRecord, LibraryListResult, LibrarySearchOptions, LibraryLoadStatus, } from './library/types';
25
+ export { LibraryCatalog } from './library/catalog';
26
+ export type { LibraryEntry, LibraryCatalogSnapshot, LibraryCatalogOptions } from './library/catalog';
27
+ export { toActions, toTaskSchemas, toLibraryItems } from './library/projections';
28
+ export { parseWorkflowName, validateWorkflowName } from './library/naming';
29
+ export type { ParsedWorkflowName, WorkflowNameType } from './library/naming';
30
+ export { createConductorLibraryProvider } from './library/conductorProvider';
31
+ export type { ConductorLibraryProviderOptions } from './library/conductorProvider';
32
+ export { DEFAULT_PROMPT_CATALOG_LIMIT } from './services/ai/systemPrompt';
24
33
  export type { AiEvent, AiEventType } from './types/aiEvents';
25
34
  export type { DiffSummary, PartialAcceptSelection, PatchOp } from './services/ai/toolExecutor';
26
35
  export { applyPartialProposal, describeDiff, computeDiff } from './services/ai/toolExecutor';
@@ -12,6 +12,10 @@ import type { AiEvent } from '../../types/aiEvents';
12
12
  interface AiCommandCenterProps {
13
13
  systemPrompt?: string;
14
14
  systemPromptExtra?: string;
15
+ /** 流程库目录注入提示词的条数上限(缺省 50) */
16
+ promptCatalogLimit?: number;
17
+ /** 任务 Schema 注入提示词的条数上限(缺省不限制) */
18
+ promptSchemaLimit?: number;
15
19
  showConfigButton?: boolean;
16
20
  onShowConfig: () => void;
17
21
  executionActions?: ExecutionActions;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface ActionFormProps {
5
+ step: BusinessStep;
6
+ upstreamSteps: BusinessStep[];
7
+ workflowInputParams?: any[];
8
+ registry?: ActionRegistry;
9
+ onChange: (updatedStep: BusinessStep) => void;
10
+ disabled?: boolean;
11
+ }
12
+ export declare const ActionForm: React.FC<ActionFormProps>;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { ActionRegistry } from '../../actions/registry';
3
+ import type { ActionDefinition } from '../../actions/types';
4
+ import type { WorkflowLevel } from '../../types/workflowLibrary';
5
+ import type { LibraryCatalog } from '../../library/catalog';
6
+ export interface ActionPickerModalProps {
7
+ registry: ActionRegistry;
8
+ /** 展示用的步骤序号(从 1 开始) */
9
+ stepNumber: number;
10
+ onClose: () => void;
11
+ onSelect: (action: ActionDefinition) => void;
12
+ /**
13
+ * 当前正在编辑的工作流层级。提供时隐藏违反分层调用规则的流程库动作
14
+ * (L1 不显示 L2/L3,L2 不显示 L3);未提供则不按层级过滤。
15
+ */
16
+ currentWorkflowLevel?: WorkflowLevel;
17
+ /** 流程库目录:用于显示「加载中 / 加载失败,点击重试」状态 */
18
+ libraryCatalog?: LibraryCatalog;
19
+ }
20
+ /**
21
+ * 业务动作选择弹窗:分类筛选 + 关键字搜索。
22
+ * 筛选状态与过滤计算都放在弹窗内部:仅在弹窗打开时才会随输入重新计算,
23
+ * 不再拖累编辑器每次渲染(动作库可能有成百上千项)。
24
+ */
25
+ export declare const ActionPickerModal: React.FC<ActionPickerModalProps>;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface DataPillInputProps {
5
+ value: any;
6
+ onChange: (val: any) => void;
7
+ placeholder?: string;
8
+ multiline?: boolean;
9
+ upstreamSteps: BusinessStep[];
10
+ registry?: ActionRegistry;
11
+ workflowInputParams?: any[];
12
+ disabled?: boolean;
13
+ /** 初始即展开「插入数据」选择面板(例如下拉字段刚切换为动态取值时) */
14
+ defaultShowPicker?: boolean;
15
+ }
16
+ export declare const DataPillInput: React.FC<DataPillInputProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface DecisionBranchCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ /** 嵌套深度:顶层卡片为 0,其内部子控制流依次 +1 */
13
+ depth?: number;
14
+ }
15
+ export declare const DecisionBranchCard: React.FC<DecisionBranchCardProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface ForkJoinCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ /** 嵌套深度:顶层卡片为 0,其内部子控制流依次 +1 */
13
+ depth?: number;
14
+ }
15
+ export declare const ForkJoinCard: React.FC<ForkJoinCardProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface FriendlyErrorCardProps {
3
+ rawError?: string;
4
+ statusCode?: number;
5
+ taskName?: string;
6
+ onActionClick?: (actionKey?: string) => void;
7
+ }
8
+ export declare const FriendlyErrorCard: React.FC<FriendlyErrorCardProps>;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import type { ActionDefinition } from '../../actions/types';
4
+ import type { LibraryCatalog } from '../../library/catalog';
5
+ import { type WorkflowVersionDiff } from '../../library/diff';
6
+ export interface LibraryVersionBadgeProps {
7
+ step: BusinessStep;
8
+ action?: ActionDefinition;
9
+ disabled?: boolean;
10
+ /**
11
+ * 流程库目录。提供后:
12
+ * - 升级前取旧、新两个版本的定义,展示入参 / 出参差异再确认
13
+ * - 固定版本在库中不存在 / 已下线时显示「⚠ 版本不可用」
14
+ * 未提供时沿用旧行为(只按动作上记录的最新版本提示升级)。
15
+ */
16
+ catalog?: LibraryCatalog;
17
+ /** 其它步骤中引用了本步骤哪些出参 key(用于差异里的「下游引用将失效」提示) */
18
+ getReferencedOutputs?: () => Iterable<string>;
19
+ /** 用户确认升级后回调:库中最新版本号,以及(能取到两个版本定义时的)升级差异 */
20
+ onUpgrade: (latestVersion: number, diff?: WorkflowVersionDiff) => void;
21
+ }
22
+ /**
23
+ * 流程库能力的版本标记:
24
+ * - 显示步骤引用时固定的版本(库升级后不会自动跟随)
25
+ * - 库中有更新版本时,提示并允许用户在看过升级差异后手动升级
26
+ * - 固定版本不可用(不存在 / 已下线)时给出警示,保持原样编译,不自动改版本
27
+ * - 目录加载失败时不显示新版本提示,不影响编辑与编译
28
+ */
29
+ export declare const LibraryVersionBadge: React.FC<LibraryVersionBadgeProps>;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface LoopDoWhileCardProps {
6
+ step: BusinessStep;
7
+ upstreamSteps: BusinessStep[];
8
+ registry?: ActionRegistry;
9
+ disabled?: boolean;
10
+ onChange: (updated: BusinessStep) => void;
11
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
12
+ /** 嵌套深度:顶层卡片为 0,其内部子控制流依次 +1 */
13
+ depth?: number;
14
+ }
15
+ export declare const LoopDoWhileCard: React.FC<LoopDoWhileCardProps>;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface NestedControlStepProps {
6
+ step: BusinessStep;
7
+ index: number;
8
+ /** 当前嵌套层级(顶层卡片内的第一层子控制流为 1),用于缩进与视觉区分 */
9
+ depth?: number;
10
+ upstreamSteps: BusinessStep[];
11
+ registry?: ActionRegistry;
12
+ disabled?: boolean;
13
+ onChange: (updated: BusinessStep) => void;
14
+ onDelete: () => void;
15
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
16
+ }
17
+ /**
18
+ * 分支 / 并行泳道 / 循环体内部的"子控制流"渲染器。
19
+ * 通过它,DecisionBranchCard / ForkJoinCard / LoopDoWhileCard 可以互相递归嵌套,
20
+ * 支持例如「分支 A 内再包含一个分支」「泳道内再有并行或循环」等任意层级。
21
+ */
22
+ export declare const NestedControlStep: React.FC<NestedControlStepProps>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { BusinessStep, PillToken } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface PillPickerProps {
5
+ upstreamSteps: BusinessStep[];
6
+ onSelect: (pill: PillToken) => void;
7
+ onClose: () => void;
8
+ registry?: ActionRegistry;
9
+ workflowInputParams?: any[];
10
+ }
11
+ export declare const PillPicker: React.FC<PillPickerProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WorkflowInstance } from '../../types/conductor';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ export interface RunStoryTimelineProps {
5
+ instance: WorkflowInstance;
6
+ registry?: ActionRegistry;
7
+ onInspectStep?: (taskRef: string) => void;
8
+ }
9
+ export declare const RunStoryTimeline: React.FC<RunStoryTimelineProps>;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef, WorkflowInstance } from '../../types/conductor';
3
+ import type { BusinessStep } from '../../stepmodel/types';
4
+ import { ActionRegistry } from '../../actions/registry';
5
+ import type { LibraryCatalog } from '../../library/catalog';
6
+ import type { WorkflowLevel } from '../../types/workflowLibrary';
7
+ export interface StepFlowEditorProps {
8
+ workflowDef: WorkflowDef | null;
9
+ onChange: (def: WorkflowDef) => void;
10
+ registry?: ActionRegistry;
11
+ readOnly?: boolean;
12
+ workflowExecution?: WorkflowInstance;
13
+ /** 流程库目录(由 WorkflowIDE 按 libraryProvider 创建):用于动作选择器状态与版本徽标 */
14
+ libraryCatalog?: LibraryCatalog;
15
+ /** 当前正在编辑的工作流层级:提供时选择器隐藏违反分层调用规则的流程库动作 */
16
+ currentWorkflowLevel?: WorkflowLevel;
17
+ /** 提供时,步骤头部显示「🤖」按钮,点击请 AI 介绍该步骤(AI IDE 中使用) */
18
+ onAskAi?: (step: BusinessStep) => void;
19
+ }
20
+ export declare const StepFlowEditor: React.FC<StepFlowEditorProps>;
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { BusinessStep } from '../../stepmodel/types';
3
+ import { ActionRegistry } from '../../actions/registry';
4
+ import type { ActionDefinition } from '../../actions/types';
5
+ export interface StepListEditorProps {
6
+ steps: BusinessStep[];
7
+ onStepsChange: (next: BusinessStep[]) => void;
8
+ /** 本列表之前的所有上游步骤(用于参数胶囊联想);列表内前序步骤会自动追加 */
9
+ upstreamSteps: BusinessStep[];
10
+ registry?: ActionRegistry;
11
+ disabled?: boolean;
12
+ /** 本列表所在容器的嵌套深度(顶层容器为 0) */
13
+ depth: number;
14
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
15
+ /** regular:分支 / 循环体内的宽松行;compact:并行泳道内的窄列行 */
16
+ variant?: 'regular' | 'compact';
17
+ /** 行背景色调;展开区域使用相反色调,保持层次 */
18
+ rowTone?: 'primary' | 'secondary';
19
+ /** 序号徽标前缀,如「轮内 」 */
20
+ indexPrefix?: string;
21
+ /** 序号徽标是否使用强调色(默认为中性底色) */
22
+ accentIndexBadge?: boolean;
23
+ }
24
+ /**
25
+ * 分支 / 并行泳道 / 循环体共用的"子步骤列表":
26
+ * - 普通动作渲染为可展开的表单行
27
+ * - 控制流步骤(分支 / 并行 / 循环)交给 NestedControlStep 递归渲染,因此可任意层级嵌套
28
+ */
29
+ export declare const StepListEditor: React.FC<StepListEditorProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { WorkflowInstance } from '../../types/conductor';
3
+ import type { WorkflowTemplate } from '../../template/types';
4
+ export interface TemplateExtractorProps {
5
+ isOpen: boolean;
6
+ instance: WorkflowInstance;
7
+ onClose: () => void;
8
+ onPublished?: (template: WorkflowTemplate) => void;
9
+ }
10
+ export declare const TemplateExtractor: React.FC<TemplateExtractorProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef } from '../../types/conductor';
3
+ import { TemplateStore } from '../../template/templateStore';
4
+ export interface TemplateGalleryProps {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ onSelectTemplate: (configuredDef: WorkflowDef) => void;
8
+ templateStore?: TemplateStore;
9
+ }
10
+ export declare const TemplateGallery: React.FC<TemplateGalleryProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WorkflowDef } from '../../types/conductor';
3
+ import type { WorkflowTemplate } from '../../template/types';
4
+ export interface TemplateSetupWizardProps {
5
+ template: WorkflowTemplate;
6
+ onApply: (configuredDef: WorkflowDef) => void;
7
+ onClose: () => void;
8
+ }
9
+ export declare const TemplateSetupWizard: React.FC<TemplateSetupWizardProps>;