@yiyi_zhang/reactflow-ui 1.3.0 → 1.3.2

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 (91) hide show
  1. package/README.md +8 -6
  2. package/dist/AiWorkflowIDE.d.ts +23 -3
  3. package/dist/WorkflowIDE.d.ts +14 -1
  4. package/dist/actions/builtin/coerce.d.ts +9 -0
  5. package/dist/actions/types.d.ts +1 -0
  6. package/dist/ai.d.ts +5 -2
  7. package/dist/components/AiNative/AgentTimeline.d.ts +1 -1
  8. package/dist/components/AiNative/ClarificationCard.d.ts +3 -2
  9. package/dist/components/AiNative/InlineCanvasCopilot.d.ts +2 -1
  10. package/dist/components/AiNative/RepairCard.d.ts +3 -2
  11. package/dist/components/AiNative/mermaidParser.d.ts +31 -0
  12. package/dist/components/AiNative/repairActions.d.ts +16 -0
  13. package/dist/components/AiNative/runInputs.d.ts +13 -0
  14. package/dist/components/BrandLogo.d.ts +2 -3
  15. package/dist/components/ConfirmDialog.d.ts +3 -1
  16. package/dist/components/DraftCodeField.d.ts +26 -0
  17. package/dist/components/PromptDialog.d.ts +3 -1
  18. package/dist/components/UnsavedRunNotice.d.ts +16 -0
  19. package/dist/components/business/ActionPickerModal.d.ts +2 -0
  20. package/dist/components/business/BusinessEditorContext.d.ts +38 -0
  21. package/dist/components/business/DataPillInput.d.ts +10 -0
  22. package/dist/components/business/DecisionBranchCard.d.ts +2 -1
  23. package/dist/components/business/ForkJoinCard.d.ts +2 -1
  24. package/dist/components/business/LibraryVersionBadge.d.ts +1 -1
  25. package/dist/components/business/LoopDoWhileCard.d.ts +2 -1
  26. package/dist/components/business/NestedControlStep.d.ts +7 -1
  27. package/dist/components/business/RunStoryTimeline.d.ts +7 -0
  28. package/dist/components/business/StepCardParts.d.ts +73 -0
  29. package/dist/components/business/StepFlowEditor.d.ts +12 -1
  30. package/dist/components/business/StepListEditor.d.ts +6 -2
  31. package/dist/components/business/deleteMessage.d.ts +6 -0
  32. package/dist/components/business/runStatus.d.ts +11 -0
  33. package/dist/components/icons/CmIcon.d.ts +17 -0
  34. package/dist/components/icons/iconRegistry.d.ts +80 -0
  35. package/dist/components/onboarding/OnboardingController.d.ts +7 -0
  36. package/dist/components/onboarding/PromotionPanel.d.ts +9 -1
  37. package/dist/components/template/quickRunNotice.d.ts +13 -0
  38. package/dist/hooks/useConfirm.d.ts +3 -1
  39. package/dist/hooks/useShortcuts.d.ts +1 -1
  40. package/dist/import/common.d.ts +7 -1
  41. package/dist/import/selection.d.ts +17 -0
  42. package/dist/index.d.ts +5 -2
  43. package/dist/library/versionStatus.d.ts +2 -2
  44. package/dist/logo.svg +9 -36
  45. package/dist/onboarding/naming.d.ts +5 -0
  46. package/dist/onboarding/poll.d.ts +6 -3
  47. package/dist/parser/conductorGenerator.d.ts +17 -2
  48. package/dist/product-launch.html +10 -1394
  49. package/dist/providers/types.d.ts +2 -0
  50. package/dist/reactflow-ui-ai.es.js +18497 -14329
  51. package/dist/reactflow-ui.css +1 -1
  52. package/dist/reactflow-ui.es.js +21578 -15400
  53. package/dist/reactflow-ui.umd.js +183 -41
  54. package/dist/sample-workflows/complex-workflow.json +8 -4
  55. package/dist/sample-workflows/decision-workflow.json +1 -0
  56. package/dist/sample-workflows/ecs-lifecycle-automation.json +37 -4
  57. package/dist/services/ai/agentRunner.d.ts +46 -1
  58. package/dist/services/ai/errorMessages.d.ts +9 -1
  59. package/dist/services/ai/protocolAdapter.d.ts +5 -0
  60. package/dist/services/ai/systemPrompt.d.ts +1 -1
  61. package/dist/services/ai/toolExecutor.d.ts +26 -0
  62. package/dist/services/ai/workflowSynthesizer.d.ts +4 -4
  63. package/dist/services/aiService.d.ts +5 -1
  64. package/dist/stepmodel/compile.d.ts +2 -1
  65. package/dist/stepmodel/factory.d.ts +5 -0
  66. package/dist/stepmodel/pills.d.ts +32 -0
  67. package/dist/stepmodel/types.d.ts +10 -0
  68. package/dist/stepmodel/validate.d.ts +20 -0
  69. package/dist/store/aiStore.d.ts +30 -5
  70. package/dist/store/sandboxRunObserver.d.ts +2 -1
  71. package/dist/store/workflowStore.d.ts +8 -9
  72. package/dist/template/templateStore.d.ts +6 -0
  73. package/dist/template/types.d.ts +1 -0
  74. package/dist/types/conductor.d.ts +25 -1
  75. package/dist/types/workflow.d.ts +38 -3
  76. package/dist/types/workflowLibrary.d.ts +5 -5
  77. package/dist/utils/executionAnalyzer.d.ts +5 -0
  78. package/dist/utils/executionImport.d.ts +52 -0
  79. package/dist/utils/executionPoller.d.ts +37 -0
  80. package/dist/utils/hostSave.d.ts +10 -0
  81. package/dist/utils/localSandboxEngine.d.ts +51 -6
  82. package/dist/utils/runStory.d.ts +20 -0
  83. package/dist/utils/sameWorkflow.d.ts +6 -0
  84. package/dist/utils/sandbox/jq.d.ts +13 -0
  85. package/dist/utils/sandbox/scriptRunner.d.ts +38 -0
  86. package/dist/utils/sandbox/switchHints.d.ts +17 -0
  87. package/dist/utils/statusMeta.d.ts +35 -0
  88. package/dist/utils/taskEditing.d.ts +59 -0
  89. package/dist/utils/taskTypeMeta.d.ts +1 -0
  90. package/dist/utils/validationRules.d.ts +29 -4
  91. package/package.json +6 -2
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { WorkflowDef, WorkflowInstance } from '../../types/conductor';
3
+ import type { ValidationResults } from '../../types/workflow';
3
4
  import type { BusinessStep } from '../../stepmodel/types';
4
5
  import { ActionRegistry } from '../../actions/registry';
5
6
  import type { LibraryCatalog } from '../../library/catalog';
@@ -14,7 +15,7 @@ export interface StepFlowEditorProps {
14
15
  libraryCatalog?: LibraryCatalog;
15
16
  /** 当前正在编辑的工作流层级:提供时选择器隐藏违反分层调用规则的流程库动作 */
16
17
  currentWorkflowLevel?: WorkflowLevel;
17
- /** 提供时,步骤头部显示「🤖」按钮,点击请 AI 介绍该步骤(AI IDE 中使用) */
18
+ /** 提供时,步骤头部显示「AI 介绍」按钮,点击请 AI 介绍该步骤(AI IDE 中使用) */
18
19
  onAskAi?: (step: BusinessStep) => void;
19
20
  /** 通过动作选择器新增步骤后回调(埋点用):source = library(流程库能力)/ builtin(内置或宿主动作) */
20
21
  onStepAdded?: (info: {
@@ -22,5 +23,15 @@ export interface StepFlowEditorProps {
22
23
  }) => void;
23
24
  /** 本地沙箱试跑结束后回调(埋点用):result 为执行状态,或 'error'(试跑抛错) */
24
25
  onSandboxRun?: (result: string) => void;
26
+ /** Ctrl/Cmd+S 时回调(保存当前定义);不提供时不拦截浏览器的保存快捷键 */
27
+ onSave?: (def: WorkflowDef) => void;
28
+ /**
29
+ * Ctrl/Cmd+Z 撤销、Ctrl/Cmd+Shift+Z 或 Ctrl/Cmd+Y 重做。
30
+ * 宿主有自己的撤销历史(如 WorkflowIDE 的 store)时传入;不传时卡片视图使用内置的撤销历史。
31
+ */
32
+ onUndo?: () => void;
33
+ onRedo?: () => void;
34
+ /** 工作流校验结果(按任务引用名显示在卡片上);不传时按当前定义自动计算 */
35
+ validationResults?: ValidationResults;
25
36
  }
26
37
  export declare const StepFlowEditor: React.FC<StepFlowEditorProps>;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { BusinessStep } from '../../stepmodel/types';
3
3
  import { ActionRegistry } from '../../actions/registry';
4
4
  import type { ActionDefinition } from '../../actions/types';
5
+ import { type InsertPickerInfo } from './BusinessEditorContext';
5
6
  export interface StepListEditorProps {
6
7
  steps: BusinessStep[];
7
8
  onStepsChange: (next: BusinessStep[]) => void;
@@ -11,7 +12,7 @@ export interface StepListEditorProps {
11
12
  disabled?: boolean;
12
13
  /** 本列表所在容器的嵌套深度(顶层容器为 0) */
13
14
  depth: number;
14
- onOpenInsertModal: (callback: (action: ActionDefinition) => void) => void;
15
+ onOpenInsertModal: (callback: (action: ActionDefinition) => void, info?: InsertPickerInfo) => void;
15
16
  /** regular:分支 / 循环体内的宽松行;compact:并行泳道内的窄列行 */
16
17
  variant?: 'regular' | 'compact';
17
18
  /** 行背景色调;展开区域使用相反色调,保持层次 */
@@ -20,10 +21,13 @@ export interface StepListEditorProps {
20
21
  indexPrefix?: string;
21
22
  /** 序号徽标是否使用强调色(默认为中性底色) */
22
23
  accentIndexBadge?: boolean;
24
+ /** 动作选择器标题中的位置说明前缀,如"分支 VIP" */
25
+ insertLabel?: string;
23
26
  }
24
27
  /**
25
28
  * 分支 / 并行泳道 / 循环体共用的"子步骤列表":
26
- * - 普通动作渲染为可展开的表单行
29
+ * - 普通动作渲染为可展开的表单行,头部与顶层卡片相同(改名、排序、版本徽标、敏感标记、校验与试跑状态)
30
+ * - 步骤之间可插入新步骤
27
31
  * - 控制流步骤(分支 / 并行 / 循环)交给 NestedControlStep 递归渲染,因此可任意层级嵌套
28
32
  */
29
33
  export declare const StepListEditor: React.FC<StepListEditorProps>;
@@ -0,0 +1,6 @@
1
+ import type { BusinessStep } from '../../stepmodel/types';
2
+ import type { ActionRegistry } from '../../actions/registry';
3
+ /** 统计控制流内部(任意层级)的步骤数 */
4
+ export declare function countNestedSteps(step: BusinessStep): number;
5
+ /** 删除步骤前的确认文案:说清删的是什么、连带删除多少内部步骤、如何恢复 */
6
+ export declare function confirmDeleteMessage(step: BusinessStep, registry: ActionRegistry): string;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 试跑 / 运行状态 → 业务卡片徽标(CMASTER 规则 5:颜色 + 图标 + 中文词,不能只靠颜色)。
3
+ * icon 为 lucide 图标名,由组件映射为具体图标。
4
+ */
5
+ export interface RunStatusBadge {
6
+ label: string;
7
+ /** 颜色 token(var(--cm-status-*)) */
8
+ color: string;
9
+ icon: 'check' | 'x' | 'timer' | 'skip' | 'loader' | 'circle' | 'ban' | 'alert';
10
+ }
11
+ export declare function runStatusBadge(status: string | undefined | null): RunStatusBadge;
@@ -0,0 +1,17 @@
1
+ import type { CSSProperties } from 'react';
2
+ import { CM_ICONS } from './iconRegistry';
3
+ interface CmIconProps {
4
+ /** Icon name from CM_ICONS (preferred) or a legacy emoji from host data. */
5
+ name: string | undefined | null;
6
+ size?: number;
7
+ /** Name to use when `name` is empty or unknown. */
8
+ fallback?: keyof typeof CM_ICONS;
9
+ style?: CSSProperties;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * Renders a CMASTER data icon as a Lucide icon (stroke 1.75). Unknown non-empty values fall back to `fallback`,
14
+ * so host-supplied emoji or typos never reach the UI as raw glyphs.
15
+ */
16
+ export declare function CmIcon({ name, size, fallback, style, className }: CmIconProps): import("react/jsx-runtime").JSX.Element;
17
+ export default CmIcon;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * CMASTER icon names → Lucide icons. Data (actions, templates, task types, library extensions) stores an icon as one
3
+ * of these kebab-case names, never as an emoji (design/guidelines/brand.md · 图标).
4
+ */
5
+ export declare const CM_ICONS: {
6
+ activity: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
7
+ alert: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
8
+ book: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
9
+ flag: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
+ flame: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
11
+ library: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
12
+ lightbulb: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
13
+ lock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
14
+ map: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
15
+ pause: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
16
+ undo: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
17
+ wrench: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
18
+ approval: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
19
+ clipboard: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
20
+ mail: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
21
+ pointer: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
22
+ x: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
23
+ ban: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
24
+ bell: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
25
+ 'bell-ring': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
26
+ braces: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
27
+ chart: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
28
+ circle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
29
+ clock: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
30
+ cloud: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
31
+ code: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
32
+ database: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
33
+ 'file-text': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
34
+ folder: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
35
+ branch: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
36
+ merge: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
37
+ globe: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
38
+ 'hard-drive': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
39
+ hourglass: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
40
+ key: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
41
+ megaphone: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
42
+ message: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
43
+ monitor: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
44
+ moon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
45
+ package: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
46
+ pencil: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
47
+ play: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
48
+ plug: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
49
+ puzzle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
50
+ radio: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
51
+ refresh: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
52
+ repeat: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
53
+ rocket: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
54
+ save: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
55
+ scale: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
56
+ search: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
57
+ send: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
58
+ server: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
59
+ settings: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
60
+ shield: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
61
+ shuffle: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
62
+ smartphone: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
63
+ sparkles: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
64
+ stop: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
65
+ 'stop-circle': import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
66
+ sunrise: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
67
+ terminal: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
68
+ trash: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
69
+ upload: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
70
+ user: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
71
+ zap: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
72
+ };
73
+ export type CmIconName = keyof typeof CM_ICONS;
74
+ /**
75
+ * Legacy emoji → icon name. Older hosts and the governance service may still send emoji as `icon`; they render as the
76
+ * matching Lucide icon instead. Keys are compared after stripping the emoji variation selector (U+FE0F).
77
+ */
78
+ export declare const EMOJI_ALIASES: Record<string, CmIconName>;
79
+ /** Resolves an icon value (icon name or legacy emoji) to a registered icon name; null when unknown. */
80
+ export declare function resolveIconName(icon: string | undefined | null): CmIconName | null;
@@ -2,6 +2,7 @@ import type { OnboardingProvider, ProductInfo } from '../../providers/types';
2
2
  import type { WorkflowLevel } from '../../types/workflowLibrary';
3
3
  import type { IdeEventName } from '../../telemetry/types';
4
4
  import type { OnboardingCreateResult } from './OnboardingWizard';
5
+ import type { PendingPromotion } from './PromotionPanel';
5
6
  import type { OnboardingData } from './useOnboardingData';
6
7
  /** 向导创建骨架后、选择了模板 / 导入时暂存的流程身份,供宿主在后续步骤里保留名称 */
7
8
  export interface PendingIdentity {
@@ -29,6 +30,9 @@ export interface OnboardingController {
29
30
  level: WorkflowLevel | undefined;
30
31
  wizardOpen: boolean;
31
32
  promoOpen: boolean;
33
+ /** 「新建流程」会替换画布上的流程,正在请用户确认 */
34
+ confirmReplace: boolean;
35
+ resolveConfirmReplace: (proceed: boolean) => void;
32
36
  openWizard: () => void;
33
37
  openPromotion: () => void;
34
38
  /** 当前流程是否可申请上线(名称可解析且类型为 tmp) */
@@ -47,6 +51,9 @@ export interface OnboardingController {
47
51
  onImportApi?: () => void;
48
52
  ownerEmail?: string;
49
53
  track: OnboardingControllerOptions['track'];
54
+ /** 已提交、未到终态的上线申请(按流程名称与版本) */
55
+ getPendingPromotion: (name: string, version: number) => PendingPromotion | null;
56
+ setPendingPromotion: (name: string, version: number, request: PendingPromotion | null) => void;
50
57
  }
51
58
  /**
52
59
  * IDE 内部使用:把自助接入的状态与动作集中在一处,IDE 只需渲染
@@ -12,9 +12,17 @@ export interface PromotionPanelProps {
12
12
  onRequested?: (targetType: PromotionTargetType) => void;
13
13
  /** 状态变化(埋点:promotion_state),同一状态只回调一次 */
14
14
  onStateChange?: (state: PromotionStatus['state']) => void;
15
+ /** 关闭前已提交、尚未到终态的申请:重新打开时接着轮询,不会重复提交(R12) */
16
+ resumeRequest?: PendingPromotion | null;
17
+ /** 提交成功时传入申请;到达终态(SYNCED / REJECTED)时传 null。宿主据此保存 / 清除 resumeRequest */
18
+ onRequestChange?: (request: PendingPromotion | null) => void;
19
+ }
20
+ export interface PendingPromotion {
21
+ requestId: string;
22
+ targetType: PromotionTargetType;
15
23
  }
16
24
  /**
17
25
  * 申请上线面板:选择目标类型 → 预览正式名称 → 提交 → 轮询进度(指数退避,30 秒封顶)。
18
26
  * 轮询在关闭面板 / 卸载时中止。
19
27
  */
20
- export declare function PromotionPanel({ provider, workflowName, version, onClose, onRequested, onStateChange }: PromotionPanelProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function PromotionPanel({ provider, workflowName, version, onClose, onRequested, onStateChange, resumeRequest, onRequestChange }: PromotionPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { WorkflowInstance } from '../../types/conductor';
2
+ export interface QuickRunNotice {
3
+ /** 用于取「图标 + 中文 + 颜色」的状态(statusMeta) */
4
+ status: string;
5
+ text: string;
6
+ }
7
+ /**
8
+ * U1:模板中心「试跑演示」的结果提示,按真实状态写,失败时说明哪个任务、为什么。
9
+ * 原来不管结果都写「试跑通过!」并用成功色。
10
+ */
11
+ export declare function describeQuickRun(title: string, instance: Pick<WorkflowInstance, 'status' | 'tasks' | 'reasonForIncompletion'>): QuickRunNotice;
12
+ /** 试跑本身出错(没有得到实例) */
13
+ export declare function describeQuickRunError(title: string, err: unknown): QuickRunNotice;
@@ -1,12 +1,14 @@
1
1
  interface ConfirmState {
2
2
  message: string;
3
+ /** 确认按钮文案(动词开头,如"删除");缺省为"继续" */
4
+ confirmLabel?: string;
3
5
  resolve: (value: boolean) => void;
4
6
  }
5
7
  /**
6
8
  * 提供 Promise-based confirm 对话框替代 window.confirm
7
9
  */
8
10
  export declare const useConfirm: () => {
9
- confirm: (message: string) => Promise<boolean>;
11
+ confirm: (message: string, confirmLabel?: string) => Promise<boolean>;
10
12
  confirmState: ConfirmState | null;
11
13
  handleConfirm: () => void;
12
14
  handleCancel: () => void;
@@ -1,5 +1,5 @@
1
1
  interface ShortcutCallbacks {
2
- confirm?: (message: string) => Promise<boolean>;
2
+ confirm?: (message: string, confirmLabel?: string) => Promise<boolean>;
3
3
  showToast?: (text: string, type?: 'success' | 'error' | 'info') => void;
4
4
  onSave?: (def: any) => void;
5
5
  }
@@ -7,8 +7,14 @@ export declare function finishOperation(op: ImportedOperation): ImportedOperatio
7
7
  export declare function operationLabel(op: Pick<ImportedOperation, 'method' | 'path'>): string;
8
8
  /** 汇总所有接口的提示(带接口前缀,去重) */
9
9
  export declare function collectWarnings(ops: ImportedOperation[], extra?: string[]): string[];
10
- /** 把 JSON 示例的顶层属性作为默认值写入 schema;敏感字段名的默认值换成占位 */
10
+ /**
11
+ * 把 JSON 示例的顶层属性作为默认值写入 schema;敏感字段(任意层级,R7)的默认值换成占位。
12
+ * 嵌套字段的占位名取路径(`credentials.password` → `${workflow.input.credentialsPassword}`);
13
+ * 敏感名下面的所有标量值都视为敏感(如 `credentials: { user, pass }`)。
14
+ */
11
15
  export declare function schemaWithDefaults(example: unknown, warnings: string[]): Record<string, any>;
16
+ /** 递归替换敏感值;返回新值,不修改入参 */
17
+ export declare function redactSensitive(value: unknown, path: string[], underSensitive: boolean, warnings: string[]): unknown;
12
18
  /** 把查询串解析为 query 参数(字面量作为默认值;敏感参数名的值替换为占位) */
13
19
  export declare function queryParamsFromString(query: string, warnings: string[]): ImportedParam[];
14
20
  /** Content-Type / Accept 由 body.contentType 与 accept 统一输出,不再作为固定头 */
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Import dialog selection rules (R16): the dialog renders at most `limit` rows, so nothing outside what the user can
3
+ * see is ever selected implicitly.
4
+ */
5
+ /** Default selection: every operation when all of them are shown, otherwise none. */
6
+ export declare function initialSelection<T extends {
7
+ id: string;
8
+ }>(operations: T[], limit: number): Set<string>;
9
+ /** The rows shown and how many matching rows are hidden by the limit. */
10
+ export declare function visibleSlice<T>(filtered: T[], limit: number): {
11
+ visible: T[];
12
+ hiddenCount: number;
13
+ };
14
+ /** Select-all / select-none applied to the visible rows only. */
15
+ export declare function applyToVisible<T extends {
16
+ id: string;
17
+ }>(selected: Set<string>, visible: T[], on: boolean): Set<string>;
package/dist/index.d.ts CHANGED
@@ -6,8 +6,11 @@ export type { AIServiceConfig } from './services/aiService';
6
6
  export type { ExecutionActions, RestartOptions, ViewMode, RunState, WorkflowExecutionInput } from './types/workflow';
7
7
  export { getCompletionItems, buildDataFlowGraph, refactorTaskReferenceName, getUpstreamAncestors, inferTaskOutputSchema, } from './services/wlsp/workflowLsp';
8
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';
9
+ export { executeLocalSandboxDryRun, executeLocalSandboxDryRunAsync, buildDefaultWorkflowMockInput, generateDefaultTaskOutputPreview, } from './utils/localSandboxEngine';
10
+ export type { SandboxDryRunOptions, SandboxAsyncOptions, TaskMockOverride, } from './utils/localSandboxEngine';
11
+ export { runJq, JqError } from './utils/sandbox/jq';
12
+ export { createWorkerScriptEvaluator } from './utils/sandbox/scriptRunner';
13
+ export type { ScriptEvaluator, ScriptResult, WorkerScriptEvaluator } from './utils/sandbox/scriptRunner';
11
14
  export * from './actions/types';
12
15
  export { ActionRegistry, defaultActionRegistry } from './actions/registry';
13
16
  export { BUILTIN_ECS_ACTIONS } from './actions/builtin/ecs';
@@ -5,8 +5,8 @@ import type { LibraryLoadStatus } from './types';
5
5
  * | 场景 | 状态 |
6
6
  * |---|---|
7
7
  * | 步骤未记录版本 | unpinned:沿用原定义,不显示任何提示 |
8
- * | 库中有更高版本 | upgradable:「⬆ 有新版本 vN」,由用户确认差异后手动升级 |
9
- * | 固定版本在库中不存在 / 已下线 | unavailable:「⚠ 版本不可用」,保持原样编译,不自动改版本 |
8
+ * | 库中有更高版本 | upgradable:「有新版本 vN」,由用户确认差异后手动升级 |
9
+ * | 固定版本在库中不存在 / 已下线 | unavailable:「版本不可用」,保持原样编译,不自动改版本 |
10
10
  * | 目录加载中 / 加载失败 | pinned:不显示新版本提示,不影响编辑与编译 |
11
11
  */
12
12
  export type LibraryBadgeState = {
package/dist/logo.svg CHANGED
@@ -1,37 +1,10 @@
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" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128">
2
+ <rect width="128" height="128" rx="28" fill="#161311"/>
3
+ <rect x="1" y="1" width="126" height="126" rx="27" fill="none" stroke="#ff6a13" stroke-opacity="0.35" stroke-width="2"/>
4
+ <g transform="translate(18 18) scale(0.92)">
5
+ <g stroke="#ff6a13" stroke-width="3" opacity="0.7"><line x1="50" y1="50" x2="75.5" y2="24.5"/><line x1="50" y1="50" x2="14" y2="50"/><line x1="50" y1="50" x2="75.5" y2="75.5"/></g>
6
+ <path d="M75.46 24.54A36 36 0 1 0 75.46 75.46" fill="none" stroke="#ff6a13" stroke-width="9" stroke-linecap="round"/>
7
+ <g fill="#161311" stroke="#ff6a13" stroke-width="5"><circle cx="75.46" cy="24.54" r="7"/><circle cx="14" cy="50" r="7"/><circle cx="75.46" cy="75.46" r="7"/></g>
8
+ <circle cx="50" cy="50" r="10" fill="#ff6a13"/>
9
+ </g>
37
10
  </svg>
@@ -39,3 +39,8 @@ export interface SkeletonInput {
39
39
  }
40
40
  /** 向导生成的骨架定义:version 1 / schemaVersion 2,空任务 */
41
41
  export declare function buildSkeletonWorkflow(input: SkeletonInput): WorkflowDef;
42
+ /**
43
+ * 保存前的命名提示(设计 3.3,R15):名称不符合五段规范时返回一句提示,符合时返回 null。
44
+ * 只提示、不阻断保存;服务端做权威校验。
45
+ */
46
+ export declare function saveNameHint(name: string | undefined | null, allowedDomains?: string[]): string | null;
@@ -5,7 +5,10 @@ export declare const POLL_MAX_MS = 30000;
5
5
  /** 第 attempt 次(从 0 开始)等待的时长:指数退避 2s → 4s → 8s … 封顶 30s */
6
6
  export declare function nextPollDelay(attempt: number): number;
7
7
  export type PromotionState = PromotionStatus['state'];
8
- /** 终态:不会再变化,轮询据此停止 */
8
+ /**
9
+ * 终态:不会再变化,轮询据此停止。只有 SYNCED(已同步到生产)与 REJECTED(已驳回)是终态;
10
+ * APPROVED 之后还要同步,轮询继续(R12)。
11
+ */
9
12
  export declare function isTerminalPromotionState(state: PromotionState): boolean;
10
13
  export interface TimelineItem {
11
14
  state: PromotionState;
@@ -32,8 +35,8 @@ export interface PollOptions {
32
35
  sleep?: (ms: number, signal?: AbortSignal) => Promise<void>;
33
36
  }
34
37
  /**
35
- * 轮询上线申请直到终态(APPROVED / REJECTED / SYNCED):先立即查一次,之后按 nextPollDelay 退避。
36
- * APPROVED 视为终态(审批已有结论),轮询随之停止。
38
+ * 轮询上线申请直到终态(SYNCED / REJECTED):先立即查一次,之后按 nextPollDelay 退避。
39
+ * APPROVED 不是终态:审批通过后继续轮询,直到同步到生产(SYNCED)。
37
40
  * 请求失败直接抛出(由界面显示「重试」);signal 中止时抛 AbortError。
38
41
  */
39
42
  export declare function pollPromotion(opts: PollOptions): Promise<PromotionStatus>;
@@ -30,7 +30,22 @@ export declare function insertFirstTaskIntoBranch(tasks: TaskDef[] | undefined,
30
30
  branchCase?: string;
31
31
  forkIndex?: number;
32
32
  }, newTask: TaskDef): boolean;
33
+ /** 收集任务树中所有 taskReferenceName */
34
+ export declare function collectTaskRefs(tasks: TaskDef[] | undefined, acc?: Set<string>): Set<string>;
33
35
  /**
34
- * 同步 FORK_JOIN 与配套 JOIN 任务的 joinOn 字段
36
+ * 同步 FORK_JOIN 与配套 JOIN 任务的 joinOn 字段(E5)
37
+ *
38
+ * - 不传 `previousTasks`(加载 / 导入):只给缺失或为空的 joinOn 补齐"各分支最后一个任务",已有 joinOn 原样保留。
39
+ * - 传入 `previousTasks`(编辑操作前的任务树):只更新被结构性编辑影响的那几项——
40
+ * 分支最后一个任务变了就替换对应项、新增 / 原本为空的分支追加其末尾任务、分支变空或任务被删除则移除该项;
41
+ * 用户原本没有 join 的分支保持不 join,其余条目(例如 join 分支中间的任务)不动。
42
+ * 分支结构没有变化时 joinOn 完全不改写。
35
43
  */
36
- export declare function syncForkJoinOn(tasks: TaskDef[] | undefined): void;
44
+ export declare function syncForkJoinOn(tasks: TaskDef[] | undefined, previousTasks?: TaskDef[] | null): void;
45
+ /**
46
+ * 迁移旧版本编辑器写在 WorkflowTask 顶层、Conductor 实际从 inputParameters 读取的字段(E2 / E20)。
47
+ * 只在 inputParameters 中没有同名键时迁移,原地修改。
48
+ */
49
+ export declare function normalizeLegacyTaskFields(tasks: TaskDef[] | undefined): void;
50
+ /** 找到 FORK_JOIN / FORK_JOIN_DYNAMIC 在同层紧随其后的配对 JOIN 引用名(E8) */
51
+ export declare function findPairedJoinRef(tasks: TaskDef[] | undefined, forkRef: string): string | null;