@yiyi_zhang/reactflow-ui 0.3.0 → 0.5.0-beta.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 +61 -22
- package/dist/AiWorkflowIDE.d.ts +217 -0
- package/dist/WorkflowIDE.d.ts +22 -3
- package/dist/ai-BJwQZcGK.js +15168 -0
- package/dist/ai.d.ts +30 -0
- package/dist/arc-BUGZGgtu.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-ZcgvTwSO.js +4692 -0
- package/dist/blockDiagram-GPEHLZMM-DtVtOBbH.js +2418 -0
- package/dist/c4Diagram-AAUBKEIU-tBS5Rcvm.js +1577 -0
- package/dist/channel-CURI9jmI.js +5 -0
- package/dist/chunk-2J33WTMH-D7gashNz.js +19 -0
- package/dist/chunk-4BX2VUAB-DE3VjyiZ.js +8 -0
- package/dist/chunk-55IACEB6-GYZ_m2MY.js +8 -0
- package/dist/chunk-727SXJPM-D4WVyvOg.js +1528 -0
- package/dist/chunk-AQP2D5EJ-Os2Uwqya.js +1387 -0
- package/dist/chunk-FMBD7UC4-B3CSVzS4.js +19 -0
- package/dist/chunk-ND2GUHAM-CNj_s1aK.js +68 -0
- package/dist/chunk-QZHKN3VN-DoV8iUKo.js +15 -0
- package/dist/classDiagram-4FO5ZUOK-Dr9C18x4.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Dr9C18x4.js +16 -0
- package/dist/components/AiNative/AgentTimeline.d.ts +18 -0
- package/dist/components/AiNative/AiCommandCenter.d.ts +40 -0
- package/dist/components/AiNative/AiConfigPanel.d.ts +9 -0
- package/dist/components/AiNative/BusinessCanvas.d.ts +15 -0
- package/dist/components/AiNative/CanvasPreview.d.ts +16 -0
- package/dist/components/AiNative/ClarificationCard.d.ts +9 -0
- package/dist/components/AiNative/FailureSummaryCard.d.ts +20 -0
- package/dist/components/AiNative/LibraryPanel.d.ts +9 -0
- package/dist/components/AiNative/MermaidBlock.d.ts +6 -0
- package/dist/components/AiNative/PlanCard.d.ts +15 -0
- package/dist/components/AiNative/ProposalPreviewCard.d.ts +21 -0
- package/dist/components/AiNative/RecommendationCard.d.ts +10 -0
- package/dist/components/AiNative/RepairCard.d.ts +17 -0
- package/dist/components/AiNative/ReviewBar.d.ts +21 -0
- package/dist/components/AiNative/WorkflowRunCard.d.ts +14 -0
- package/dist/components/Controls/ModeSlider.d.ts +2 -0
- package/dist/components/ExecutionSummaryPanel.d.ts +4 -0
- package/dist/components/WorkflowRunPanel.d.ts +12 -0
- package/dist/components/nodes/NodeWrapper.d.ts +2 -1
- package/dist/cose-bilkent-S5V4N54A-CgQlI-io.js +2609 -0
- package/dist/cytoscape.esm-kVAWcYoG.js +18755 -0
- package/dist/dagre-BM42HDAG-CFMIuOmS.js +445 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/diagram-2AECGRRQ-C5jZp2YX.js +217 -0
- package/dist/diagram-5GNKFQAL-DRUVcHpp.js +123 -0
- package/dist/diagram-KO2AKTUF-BOl4aaej.js +461 -0
- package/dist/diagram-LMA3HP47-ZeckPR2Q.js +142 -0
- package/dist/diagram-OG6HWLK6-qUWeLfa-.js +528 -0
- package/dist/erDiagram-TEJ5UH35-Bw_CWS13.js +899 -0
- package/dist/flowDiagram-I6XJVG4X-D3xEvQA-.js +1628 -0
- package/dist/ganttDiagram-6RSMTGT7-D8GvenY3.js +2707 -0
- package/dist/gitGraphDiagram-PVQCEYII-BWrN_HOm.js +815 -0
- package/dist/graph-BRoPeNF3.js +1545 -0
- package/dist/hooks/useNodeExecution.d.ts +1 -1
- package/dist/hooks/useNodeLayout.d.ts +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/infoDiagram-5YYISTIA-Da8FG5tB.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Bg2_mKEc.js +621 -0
- package/dist/journeyDiagram-JHISSGLW-sFIxGfua.js +834 -0
- package/dist/kanban-definition-UN3LZRKU-CGmopzHd.js +724 -0
- package/dist/katex-DoRnZ_sp.js +11682 -0
- package/dist/layout-D9EpM4Fg.js +1728 -0
- package/dist/linear-BA49eco4.js +259 -0
- package/dist/mermaid.core-XSpZEAKP.js +16137 -0
- package/dist/mindmap-definition-RKZ34NQL-Bqf76QGB.js +827 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/pieDiagram-4H26LBE5-hHiP8HzL.js +163 -0
- package/dist/quadrantDiagram-W4KKPZXB-DSccwH8B.js +1024 -0
- package/dist/reactflow-ui-ai.es.js +12 -0
- package/dist/reactflow-ui.css +1 -1
- package/dist/reactflow-ui.es.js +8198 -7039
- package/dist/reactflow-ui.umd.js +52 -17
- package/dist/requirementDiagram-4Y6WPE33-DIpyoYZ_.js +882 -0
- package/dist/sankeyDiagram-5OEKKPKP-DsaPqq8D.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-BNg7orie.js +2891 -0
- package/dist/services/ai/agentRunner.d.ts +51 -0
- package/dist/services/ai/contextEngine.d.ts +83 -0
- package/dist/services/ai/draftPersistence.d.ts +22 -0
- package/dist/services/ai/errorMessages.d.ts +16 -0
- package/dist/services/ai/intentClassifier.d.ts +17 -0
- package/dist/services/ai/protocolAdapter.d.ts +114 -0
- package/dist/services/ai/ruleEngine.d.ts +57 -0
- package/dist/services/ai/schemaRegistry.d.ts +51 -0
- package/dist/services/ai/systemPrompt.d.ts +30 -0
- package/dist/services/ai/toolDefs.d.ts +9 -0
- package/dist/services/ai/toolExecutor.d.ts +83 -0
- package/dist/services/ai/toolRegistry.d.ts +38 -0
- package/dist/services/ai/transport.d.ts +58 -0
- package/dist/services/aiService.d.ts +27 -5
- package/dist/stateDiagram-AJRCARHV-Rv1mSmnJ.js +263 -0
- package/dist/stateDiagram-v2-BHNVJYJU-BME16k02.js +16 -0
- package/dist/store/aiStore.d.ts +199 -0
- package/dist/store/ideStoresContext.d.ts +39 -0
- package/dist/store/libraryStore.d.ts +25 -0
- package/dist/timeline-definition-PNZ67QCA-CmmzdVk-.js +1055 -0
- package/dist/types/aiEvents.d.ts +38 -0
- package/dist/types/conductor.d.ts +23 -2
- package/dist/types/workflow.d.ts +36 -0
- package/dist/types/workflowLibrary.d.ts +27 -0
- package/dist/utils/executionAnalyzer.d.ts +32 -0
- package/dist/utils/nodeMeta.d.ts +6 -0
- package/dist/utils/proposalPreview.d.ts +19 -0
- package/dist/utils/taskTypeMeta.d.ts +18 -0
- package/dist/utils/workflowToMermaid.d.ts +7 -0
- package/dist/vennDiagram-CIIHVFJN-BQt00w9Q.js +1557 -0
- package/dist/wardley-L42UT6IY-D7b2ujEZ.js +22512 -0
- package/dist/wardleyDiagram-YWT4CUSO-LZpiODGN.js +675 -0
- package/dist/xychartDiagram-2RQKCTM6-BpJlv_mc.js +1342 -0
- package/package.json +14 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Event types for audit logging and analytics.
|
|
3
|
+
*
|
|
4
|
+
* Pass an `onAiEvent` callback to <AiWorkflowIDE> to receive all AI lifecycle events.
|
|
5
|
+
*
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <AiWorkflowIDE
|
|
8
|
+
* onAiEvent={(event) => auditLog.record(event)}
|
|
9
|
+
* />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export type AiEventType = 'proposal:created' | 'proposal:accepted' | 'proposal:accepted:partial' | 'proposal:rejected' | 'plan:created' | 'plan:executed' | 'plan:cancelled' | 'repair:proposed'
|
|
13
|
+
/** User clicked the inline second-click confirmation before a runtime-mutating repair action fires */
|
|
14
|
+
| 'repair:confirmed' | 'repair:executed' | 'repair:dismissed' | 'tool:called' | 'undo:applied'
|
|
15
|
+
/** AI request failed (network/HTTP/provider error). The user only ever sees a humanized
|
|
16
|
+
* message — the raw diagnostic text is only available here, via `rawMessage`. */
|
|
17
|
+
| 'ai:error';
|
|
18
|
+
export interface AiEvent {
|
|
19
|
+
type: AiEventType;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
/** For tool:called events */
|
|
22
|
+
tool?: string;
|
|
23
|
+
/** For repair:executed / repair:confirmed events */
|
|
24
|
+
repairActionType?: string;
|
|
25
|
+
/** For proposal events: change counts */
|
|
26
|
+
diff?: {
|
|
27
|
+
added: number;
|
|
28
|
+
modified: number;
|
|
29
|
+
removed: number;
|
|
30
|
+
};
|
|
31
|
+
/** For proposal:accepted:partial: selected vs total change count */
|
|
32
|
+
selectedCount?: number;
|
|
33
|
+
totalCount?: number;
|
|
34
|
+
/** Inferred workflow level (L1/L2/L3) for proposal events */
|
|
35
|
+
inferredLevel?: string;
|
|
36
|
+
/** For ai:error events: the raw underlying error text (HTTP status, provider message, etc.) — not shown to the user */
|
|
37
|
+
rawMessage?: string;
|
|
38
|
+
}
|
|
@@ -72,6 +72,27 @@ export interface TaskDef {
|
|
|
72
72
|
timeoutSeconds?: number;
|
|
73
73
|
timeoutPolicy?: 'RETRY' | 'TIME_OUT_WF' | 'ALERT_ONLY' | 'FAIL_WORKFLOW';
|
|
74
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* 工作流入参定义(结构化,向后兼容 string[] 旧格式)
|
|
77
|
+
*/
|
|
78
|
+
export interface WorkflowInputParam {
|
|
79
|
+
/** 参数名 */
|
|
80
|
+
name: string;
|
|
81
|
+
/** 参数类型 */
|
|
82
|
+
type?: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
83
|
+
/** 用途说明 */
|
|
84
|
+
description?: string;
|
|
85
|
+
/** 是否必填 */
|
|
86
|
+
required?: boolean;
|
|
87
|
+
/** 默认值 */
|
|
88
|
+
defaultValue?: any;
|
|
89
|
+
/** 示例值(在执行验证表单中展示) */
|
|
90
|
+
example?: any;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* 解析工作流入参声明:兼容 string[] 旧格式与 WorkflowInputParam[] 新格式
|
|
94
|
+
*/
|
|
95
|
+
export declare function parseWorkflowInputParams(raw: any[] | undefined): WorkflowInputParam[];
|
|
75
96
|
/**
|
|
76
97
|
* Conductor 工作流定义
|
|
77
98
|
*/
|
|
@@ -87,8 +108,8 @@ export interface WorkflowDef {
|
|
|
87
108
|
version?: number;
|
|
88
109
|
/** 任务列表 (DAG 定义) */
|
|
89
110
|
tasks: TaskDef[];
|
|
90
|
-
/**
|
|
91
|
-
inputParameters?:
|
|
111
|
+
/** 输入参数定义:支持 string[](旧格式)或 WorkflowInputParam[](结构化新格式) */
|
|
112
|
+
inputParameters?: string[] | WorkflowInputParam[];
|
|
92
113
|
/** 输出参数映射 */
|
|
93
114
|
outputParameters?: Record<string, any>;
|
|
94
115
|
schemaVersion?: number;
|
package/dist/types/workflow.d.ts
CHANGED
|
@@ -7,6 +7,11 @@ import { WorkflowDef, TaskDef, WorkflowInstance, TaskInstance } from './conducto
|
|
|
7
7
|
* - `developer`:全部节点(含数据转换等)
|
|
8
8
|
*/
|
|
9
9
|
export type ViewMode = 'business' | 'standard' | 'developer';
|
|
10
|
+
/**
|
|
11
|
+
* `workflowExecution` prop 的公共类型(WorkflowIDE 与 AiWorkflowIDE 共用)。
|
|
12
|
+
* 兼容两种形态:完整 Conductor Workflow 实例,或裸的任务实例数组(旧兼容模式)。
|
|
13
|
+
*/
|
|
14
|
+
export type WorkflowExecutionInput = WorkflowInstance | TaskInstance[];
|
|
10
15
|
export interface WorkflowDiffRow {
|
|
11
16
|
kind: 'add' | 'mod' | 'del';
|
|
12
17
|
desc: string;
|
|
@@ -64,6 +69,8 @@ export interface AIChatMessage {
|
|
|
64
69
|
diff?: WorkflowDiff;
|
|
65
70
|
applied?: boolean;
|
|
66
71
|
inverse?: WorkflowDiff;
|
|
72
|
+
/** Special card types rendered inline in the chat stream */
|
|
73
|
+
cardType?: 'run_card';
|
|
67
74
|
}
|
|
68
75
|
/**
|
|
69
76
|
* 布局方向
|
|
@@ -141,6 +148,8 @@ export interface WorkflowNodeData {
|
|
|
141
148
|
isDynamicRuntime?: boolean;
|
|
142
149
|
simRunning?: boolean;
|
|
143
150
|
simDone?: boolean;
|
|
151
|
+
/** AI diff overlay: which change category this node belongs to in the pending proposal */
|
|
152
|
+
proposalStatus?: 'added' | 'modified' | 'removed';
|
|
144
153
|
_layoutWidth?: number;
|
|
145
154
|
_layoutHeight?: number;
|
|
146
155
|
}
|
|
@@ -160,6 +169,15 @@ export type ThemeMode = 'dark' | 'light';
|
|
|
160
169
|
* - `orange`: 活力橙
|
|
161
170
|
*/
|
|
162
171
|
export type ThemeColor = 'blue' | 'orange';
|
|
172
|
+
/**
|
|
173
|
+
* 执行触发状态机
|
|
174
|
+
* - `idle`: 未触发
|
|
175
|
+
* - `triggering`: 正在调用 onTriggerExecution
|
|
176
|
+
* - `polling`: 已获得 workflowId,正在轮询执行结果
|
|
177
|
+
* - `done`: 执行到达终态(COMPLETED/FAILED/TIMED_OUT/TERMINATED)
|
|
178
|
+
* - `error`: 触发或轮询过程中发生错误
|
|
179
|
+
*/
|
|
180
|
+
export type RunState = 'idle' | 'triggering' | 'polling' | 'done' | 'error';
|
|
163
181
|
/**
|
|
164
182
|
* 工作流存储状态
|
|
165
183
|
*/
|
|
@@ -187,6 +205,14 @@ export interface WorkflowState {
|
|
|
187
205
|
isSimRunning: boolean;
|
|
188
206
|
/** 每次 setWorkflow() 调用时递增,用于触发 WorkflowDesigner 的 fitView */
|
|
189
207
|
workflowLoadKey: number;
|
|
208
|
+
/** P4.2 执行触发状态 */
|
|
209
|
+
runState: RunState;
|
|
210
|
+
pendingExecutionId: string | null;
|
|
211
|
+
executionError: string | null;
|
|
212
|
+
showRunPanel: boolean;
|
|
213
|
+
showAnalysisPanel: boolean;
|
|
214
|
+
/** P4.1 聚焦参数字段("去修复"跳转时使用) */
|
|
215
|
+
focusedParamKey: string | null;
|
|
190
216
|
}
|
|
191
217
|
/**
|
|
192
218
|
* 工作流操作接口
|
|
@@ -228,6 +254,16 @@ export interface WorkflowActions {
|
|
|
228
254
|
setViewMode: (viewMode: ViewMode) => void;
|
|
229
255
|
startSimulation: () => void;
|
|
230
256
|
stopSimulation: () => void;
|
|
257
|
+
/** 短暂高亮指定节点(如 AI 提案接受后标记新增/修改的节点),到时自动恢复原选中态 */
|
|
258
|
+
flashNodes: (refs: string[]) => void;
|
|
259
|
+
/** P4.2: 显示/隐藏执行触发面板 */
|
|
260
|
+
setShowRunPanel: (show: boolean) => void;
|
|
261
|
+
/** P4.2: 显示/隐藏执行分析面板 */
|
|
262
|
+
setShowAnalysisPanel: (show: boolean) => void;
|
|
263
|
+
/** P4.2: 更新执行触发状态 */
|
|
264
|
+
setRunState: (state: RunState, execId?: string | null, error?: string | null) => void;
|
|
265
|
+
/** P4.3: 切回 edit 模式并聚焦到指定任务的指定参数字段 */
|
|
266
|
+
switchToEditAndFocusParam: (taskRef: string, paramKey?: string) => void;
|
|
231
267
|
}
|
|
232
268
|
/**
|
|
233
269
|
* 重启选项
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Library types — L1/L2/L3 sub-workflow catalog
|
|
3
|
+
*
|
|
4
|
+
* L1: 原子操作(单一功能,不依赖其他业务流程)
|
|
5
|
+
* L2: 业务场景(完整的单一业务功能,可由 L1 组合而成)
|
|
6
|
+
* L3: 端到端编排(跨系统复杂场景,可由 L2/L1 组合而成)
|
|
7
|
+
*
|
|
8
|
+
* 调用规则:高层可调用低层及同层,禁止反向跨层调用
|
|
9
|
+
* L3 → L2/L1/L3(同层) ✅
|
|
10
|
+
* L2 → L1/L2(同层) ✅
|
|
11
|
+
* L1 → L1(同层) ✅
|
|
12
|
+
* L1 → L2/L3 ❌
|
|
13
|
+
* L2 → L3 ❌
|
|
14
|
+
*/
|
|
15
|
+
export type WorkflowLevel = 'L1' | 'L2' | 'L3';
|
|
16
|
+
/** 工作流库元数据(列表/搜索返回) */
|
|
17
|
+
export interface WorkflowLibraryItem {
|
|
18
|
+
workflowName: string;
|
|
19
|
+
workflowLevel: WorkflowLevel;
|
|
20
|
+
version: string;
|
|
21
|
+
description: string;
|
|
22
|
+
tags: string[];
|
|
23
|
+
}
|
|
24
|
+
/** 工作流库详情(包含完整 WorkflowDef) */
|
|
25
|
+
export interface WorkflowLibraryDetail extends WorkflowLibraryItem {
|
|
26
|
+
workflowDef: Record<string, any>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TaskExecutionData, ExecutionStatus } from '../types/workflow';
|
|
2
|
+
import { WorkflowInstance } from '../types/conductor';
|
|
3
|
+
export interface DiagnosticResult {
|
|
4
|
+
category: 'parameter' | 'timeout' | 'auth' | 'network' | 'logic';
|
|
5
|
+
title: string;
|
|
6
|
+
explanation: string;
|
|
7
|
+
suggestEditParam?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface StepInfo {
|
|
10
|
+
taskRef: string;
|
|
11
|
+
status: ExecutionStatus;
|
|
12
|
+
startTime?: number;
|
|
13
|
+
endTime?: number;
|
|
14
|
+
durationMs?: number;
|
|
15
|
+
retryCount: number;
|
|
16
|
+
reasonForIncompletion?: string;
|
|
17
|
+
diagnostics: DiagnosticResult[];
|
|
18
|
+
}
|
|
19
|
+
export interface ExecutionSummary {
|
|
20
|
+
totalTasks: number;
|
|
21
|
+
completedTasks: number;
|
|
22
|
+
failedTasks: number;
|
|
23
|
+
skippedTasks: number;
|
|
24
|
+
totalDurationMs: number;
|
|
25
|
+
steps: StepInfo[];
|
|
26
|
+
hasFailed: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function diagnoseTask(taskRef: string, executionData: Record<string, TaskExecutionData>): DiagnosticResult[];
|
|
29
|
+
export declare function analyzeExecution(executionData: Record<string, TaskExecutionData>, workflowInstance: WorkflowInstance | null): ExecutionSummary;
|
|
30
|
+
export declare function formatDuration(ms?: number): string;
|
|
31
|
+
export declare function getCategoryIcon(category: DiagnosticResult['category']): string;
|
|
32
|
+
export declare function getCategoryColor(category: DiagnosticResult['category']): string;
|
package/dist/utils/nodeMeta.d.ts
CHANGED
|
@@ -7,5 +7,11 @@ declare function truncate(s: string, max: number): string;
|
|
|
7
7
|
* - developer: key config field for the task type
|
|
8
8
|
*/
|
|
9
9
|
export declare function getNodeMeta(taskType: string, data: WorkflowNodeData, viewMode: ViewMode, fallback: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the header label for a node based on the current viewMode.
|
|
12
|
+
* - business: Chinese label without the English technical suffix (e.g. "条件分支")
|
|
13
|
+
* - standard/developer: raw task type string (e.g. "SWITCH")
|
|
14
|
+
*/
|
|
15
|
+
export declare function getNodeHeader(taskType: string, viewMode: ViewMode): string;
|
|
10
16
|
/** Truncate helper exported for use in node components (e.g. DecisionNode). */
|
|
11
17
|
export { truncate };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proposal Preview — builds a business-readable step list for an AI proposal (M2.2)
|
|
3
|
+
*
|
|
4
|
+
* Merges the current canvas def with the proposed def + diff into a single ordered
|
|
5
|
+
* list the ProposalPreviewCard renders directly, so users can see what changed
|
|
6
|
+
* without opening the canvas. Removed tasks are spliced back in at their original
|
|
7
|
+
* position (struck through) rather than silently disappearing.
|
|
8
|
+
*/
|
|
9
|
+
import type { WorkflowDef, TaskDef } from '../types/conductor';
|
|
10
|
+
import type { DiffSummary } from '../services/ai/toolExecutor';
|
|
11
|
+
export type ProposalStepStatus = 'unchanged' | 'added' | 'modified' | 'removed';
|
|
12
|
+
export interface ProposalStep {
|
|
13
|
+
ref: string;
|
|
14
|
+
task: TaskDef;
|
|
15
|
+
status: ProposalStepStatus;
|
|
16
|
+
/** Only present for 'modified' steps — field-level change descriptions */
|
|
17
|
+
changes?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare function buildProposalSteps(currentDef: WorkflowDef | null, proposedDef: WorkflowDef, diff: DiffSummary): ProposalStep[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Type Meta — business-friendly labels for Conductor task types
|
|
3
|
+
*
|
|
4
|
+
* Shared by BusinessCanvas and ProposalPreviewCard so both surfaces speak the
|
|
5
|
+
* same business language for the same task type (extracted from BusinessCanvas
|
|
6
|
+
* during the UX Phase A proposal-preview work).
|
|
7
|
+
*/
|
|
8
|
+
export interface TaskTypeMeta {
|
|
9
|
+
label: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
who: string;
|
|
12
|
+
color: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TASK_TYPE_LABELS: Record<string, TaskTypeMeta>;
|
|
15
|
+
/** Looks up business-friendly metadata for a task type, falling back to the type name itself as the label. */
|
|
16
|
+
export declare function getTaskTypeMeta(taskType: string): TaskTypeMeta;
|
|
17
|
+
/** Converts a taskReferenceName (e.g. "send_email") into a human-readable name ("Send Email"). */
|
|
18
|
+
export declare function toBusinessName(ref: string): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkflowDef } from '../types/conductor';
|
|
2
|
+
/**
|
|
3
|
+
* Generate a Mermaid flowchart from a WorkflowDef.
|
|
4
|
+
* Technical nodes (SET_VARIABLE, INLINE, etc.) are filtered out.
|
|
5
|
+
* Node labels use the task `name` field; business language is preserved.
|
|
6
|
+
*/
|
|
7
|
+
export declare function workflowToMermaid(def: WorkflowDef): string;
|