@geenius/ai-workflow 0.1.0 → 0.4.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/CHANGELOG.md +7 -0
- package/README.md +69 -1
- package/package.json +60 -27
- package/packages/convex/dist/index.d.ts +363 -0
- package/packages/convex/dist/index.js +200 -0
- package/packages/convex/dist/index.js.map +1 -0
- package/packages/react/dist/index.d.ts +466 -0
- package/packages/react/dist/index.js +13914 -0
- package/packages/react/dist/index.js.map +1 -0
- package/packages/react-css/{src/styles.css → dist/index.css} +107 -253
- package/packages/react-css/dist/index.css.map +1 -0
- package/packages/react-css/dist/index.d.ts +495 -0
- package/packages/react-css/dist/index.js +13901 -0
- package/packages/react-css/dist/index.js.map +1 -0
- package/packages/shared/dist/index.d.ts +1368 -0
- package/packages/shared/dist/index.js +1681 -0
- package/packages/shared/dist/index.js.map +1 -0
- package/packages/solidjs/dist/index.d.ts +452 -0
- package/packages/solidjs/dist/index.js +13830 -0
- package/packages/solidjs/dist/index.js.map +1 -0
- package/packages/solidjs-css/{src/styles.css → dist/index.css} +107 -253
- package/packages/solidjs-css/dist/index.css.map +1 -0
- package/packages/solidjs-css/dist/index.d.ts +471 -0
- package/packages/solidjs-css/dist/index.js +13774 -0
- package/packages/solidjs-css/dist/index.js.map +1 -0
- package/.changeset/config.json +0 -11
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -16
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -11
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -10
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/ci.yml +0 -23
- package/.github/workflows/release.yml +0 -29
- package/.nvmrc +0 -1
- package/.project/ACCOUNT.yaml +0 -4
- package/.project/IDEAS.yaml +0 -7
- package/.project/PROJECT.yaml +0 -11
- package/.project/ROADMAP.yaml +0 -15
- package/CODE_OF_CONDUCT.md +0 -16
- package/CONTRIBUTING.md +0 -26
- package/SECURITY.md +0 -15
- package/SUPPORT.md +0 -8
- package/packages/convex/README.md +0 -1
- package/packages/convex/package.json +0 -12
- package/packages/convex/src/convex.config.ts +0 -3
- package/packages/convex/src/index.ts +0 -3
- package/packages/convex/src/mutations.ts +0 -36
- package/packages/convex/src/queries.ts +0 -19
- package/packages/convex/src/schema.ts +0 -24
- package/packages/convex/tsconfig.json +0 -25
- package/packages/react/README.md +0 -1
- package/packages/react/package.json +0 -46
- package/packages/react/src/components/ApprovalModal.tsx +0 -47
- package/packages/react/src/components/StepConfigPanel.tsx +0 -67
- package/packages/react/src/components/StepConnector.tsx +0 -47
- package/packages/react/src/components/StepNode.tsx +0 -38
- package/packages/react/src/components/StepPalette.tsx +0 -48
- package/packages/react/src/components/WorkflowCanvas.tsx +0 -42
- package/packages/react/src/components/WorkflowRunPanel.tsx +0 -64
- package/packages/react/src/components/WorkflowToolbar.tsx +0 -43
- package/packages/react/src/components/index.ts +0 -9
- package/packages/react/src/hooks/index.ts +0 -10
- package/packages/react/src/hooks/useApprovalGate.ts +0 -59
- package/packages/react/src/hooks/useWorkflow.ts +0 -39
- package/packages/react/src/hooks/useWorkflowBuilder.ts +0 -121
- package/packages/react/src/hooks/useWorkflowRun.ts +0 -75
- package/packages/react/src/hooks/useWorkflowStep.ts +0 -52
- package/packages/react/src/hooks/useWorkflowTemplates.ts +0 -54
- package/packages/react/src/index.ts +0 -16
- package/packages/react/src/pages/WorkflowBuilderPage.tsx +0 -81
- package/packages/react/src/pages/WorkflowRunsPage.tsx +0 -59
- package/packages/react/src/pages/index.ts +0 -3
- package/packages/react/tsconfig.json +0 -1
- package/packages/react/tsup.config.ts +0 -7
- package/packages/react-css/README.md +0 -1
- package/packages/react-css/package.json +0 -44
- package/packages/react-css/src/components/ApprovalModal.tsx +0 -6
- package/packages/react-css/src/components/StepConfigPanel.tsx +0 -7
- package/packages/react-css/src/components/StepConnector.tsx +0 -6
- package/packages/react-css/src/components/StepNode.tsx +0 -7
- package/packages/react-css/src/components/StepPalette.tsx +0 -6
- package/packages/react-css/src/components/WorkflowCanvas.tsx +0 -6
- package/packages/react-css/src/components/WorkflowRunPanel.tsx +0 -9
- package/packages/react-css/src/components/WorkflowToolbar.tsx +0 -4
- package/packages/react-css/src/components/index.ts +0 -9
- package/packages/react-css/src/hooks/index.ts +0 -3
- package/packages/react-css/src/hooks/useWorkflow.ts +0 -39
- package/packages/react-css/src/hooks/useWorkflowBuilder.ts +0 -121
- package/packages/react-css/src/index.ts +0 -7
- package/packages/react-css/src/pages/WorkflowBuilderPage.tsx +0 -16
- package/packages/react-css/src/pages/WorkflowRunsPage.tsx +0 -6
- package/packages/react-css/src/pages/index.ts +0 -3
- package/packages/react-css/tsconfig.json +0 -26
- package/packages/react-css/tsup.config.ts +0 -2
- package/packages/shared/README.md +0 -1
- package/packages/shared/package.json +0 -56
- package/packages/shared/src/__tests__/ai-workflow.test.ts +0 -217
- package/packages/shared/src/config.ts +0 -49
- package/packages/shared/src/convex/index.ts +0 -2
- package/packages/shared/src/convex/schemas.ts +0 -42
- package/packages/shared/src/engine.test.ts +0 -1
- package/packages/shared/src/engine.ts +0 -295
- package/packages/shared/src/index.ts +0 -43
- package/packages/shared/src/steps.ts +0 -68
- package/packages/shared/src/templates.ts +0 -172
- package/packages/shared/src/types.ts +0 -237
- package/packages/shared/src/utils/cost.ts +0 -79
- package/packages/shared/src/utils/dag.ts +0 -133
- package/packages/shared/src/utils/index.ts +0 -5
- package/packages/shared/src/utils/interpolation.ts +0 -53
- package/packages/shared/src/validators.ts +0 -215
- package/packages/shared/tsconfig.json +0 -1
- package/packages/shared/tsup.config.ts +0 -5
- package/packages/shared/vitest.config.ts +0 -4
- package/packages/solidjs/README.md +0 -1
- package/packages/solidjs/package.json +0 -45
- package/packages/solidjs/src/components/ApprovalModal.tsx +0 -18
- package/packages/solidjs/src/components/StepConfigPanel.tsx +0 -14
- package/packages/solidjs/src/components/StepConnector.tsx +0 -11
- package/packages/solidjs/src/components/StepNode.tsx +0 -12
- package/packages/solidjs/src/components/StepPalette.tsx +0 -22
- package/packages/solidjs/src/components/WorkflowCanvas.tsx +0 -23
- package/packages/solidjs/src/components/WorkflowRunPanel.tsx +0 -18
- package/packages/solidjs/src/components/WorkflowToolbar.tsx +0 -13
- package/packages/solidjs/src/components/index.ts +0 -9
- package/packages/solidjs/src/index.ts +0 -7
- package/packages/solidjs/src/pages/WorkflowBuilderPage.tsx +0 -37
- package/packages/solidjs/src/pages/WorkflowRunsPage.tsx +0 -20
- package/packages/solidjs/src/pages/index.ts +0 -3
- package/packages/solidjs/src/primitives/createApprovalGate.ts +0 -29
- package/packages/solidjs/src/primitives/createWorkflow.ts +0 -28
- package/packages/solidjs/src/primitives/createWorkflowBuilder.ts +0 -56
- package/packages/solidjs/src/primitives/createWorkflowRun.ts +0 -32
- package/packages/solidjs/src/primitives/createWorkflowStep.ts +0 -23
- package/packages/solidjs/src/primitives/createWorkflowTemplates.ts +0 -28
- package/packages/solidjs/src/primitives/index.ts +0 -8
- package/packages/solidjs/tsconfig.json +0 -1
- package/packages/solidjs/tsup.config.ts +0 -7
- package/packages/solidjs-css/README.md +0 -1
- package/packages/solidjs-css/package.json +0 -43
- package/packages/solidjs-css/src/components/ApprovalModal.tsx +0 -6
- package/packages/solidjs-css/src/components/StepConfigPanel.tsx +0 -7
- package/packages/solidjs-css/src/components/StepConnector.tsx +0 -6
- package/packages/solidjs-css/src/components/StepNode.tsx +0 -7
- package/packages/solidjs-css/src/components/StepPalette.tsx +0 -7
- package/packages/solidjs-css/src/components/WorkflowCanvas.tsx +0 -7
- package/packages/solidjs-css/src/components/WorkflowRunPanel.tsx +0 -8
- package/packages/solidjs-css/src/components/WorkflowToolbar.tsx +0 -5
- package/packages/solidjs-css/src/components/index.ts +0 -9
- package/packages/solidjs-css/src/index.ts +0 -7
- package/packages/solidjs-css/src/pages/WorkflowBuilderPage.tsx +0 -2
- package/packages/solidjs-css/src/pages/WorkflowRunsPage.tsx +0 -7
- package/packages/solidjs-css/src/pages/index.ts +0 -3
- package/packages/solidjs-css/src/primitives/createWorkflow.ts +0 -28
- package/packages/solidjs-css/src/primitives/createWorkflowBuilder.ts +0 -56
- package/packages/solidjs-css/src/primitives/index.ts +0 -1
- package/packages/solidjs-css/tsconfig.json +0 -27
- package/packages/solidjs-css/tsup.config.ts +0 -2
- package/pnpm-workspace.yaml +0 -2
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
import { WorkflowEngineOptions, WorkflowDefinition, WorkflowRun, WorkflowError, StepResult, WorkflowBuilderState, WorkflowStepDef, StepConnection, RunStatus, StepStatus, WorkflowTemplate, StepType } from '@geenius/ai-workflow-shared';
|
|
2
|
+
export { RunStatus, StepConfig, StepResult, StepStatus, StepType, WORKFLOW_TEMPLATES, WorkflowBuilderState, WorkflowDefinition, WorkflowEngine, WorkflowRun, WorkflowStatus, WorkflowStepDef, validateWorkflow } from '@geenius/ai-workflow-shared';
|
|
3
|
+
import { JSX, JSXElement } from 'solid-js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @module CreateWorkflow
|
|
7
|
+
* @package @geenius/ai-workflow-solidjs
|
|
8
|
+
* @description SolidJS primitive for executing workflow definitions with the
|
|
9
|
+
* shared workflow engine. This file exposes run state, cancellation, and typed
|
|
10
|
+
* error handling through Solid signals.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Runtime integrations accepted by the SolidJS workflow primitive.
|
|
15
|
+
*/
|
|
16
|
+
interface CreateWorkflowOptions extends WorkflowEngineOptions {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Result returned by `createWorkflow`.
|
|
20
|
+
*
|
|
21
|
+
* @property execute Execute a workflow definition against optional input data.
|
|
22
|
+
* @property cancel Cancel the current in-flight workflow run.
|
|
23
|
+
* @property run Signal accessor for the latest workflow run snapshot.
|
|
24
|
+
* @property isRunning Signal accessor for the active-run state.
|
|
25
|
+
* @property error Signal accessor for the latest typed workflow error.
|
|
26
|
+
* @property stepResults Signal accessor for emitted step results.
|
|
27
|
+
* @property reset Clear local run, error, and step-result state.
|
|
28
|
+
*/
|
|
29
|
+
interface CreateWorkflowResult {
|
|
30
|
+
execute: (definition: WorkflowDefinition, input?: Record<string, unknown>) => Promise<WorkflowRun>;
|
|
31
|
+
cancel: () => void;
|
|
32
|
+
run: () => WorkflowRun | null;
|
|
33
|
+
isRunning: () => boolean;
|
|
34
|
+
error: () => WorkflowError | null;
|
|
35
|
+
stepResults: () => StepResult[];
|
|
36
|
+
reset: () => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Execute shared workflow definitions from SolidJS stateful primitives.
|
|
40
|
+
*
|
|
41
|
+
* @param options Runtime integrations and callbacks for the shared engine.
|
|
42
|
+
* @returns Run state, execution methods, and cancellation controls.
|
|
43
|
+
*/
|
|
44
|
+
declare function createWorkflow(options: CreateWorkflowOptions): CreateWorkflowResult;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @module CreateWorkflowBuilder
|
|
48
|
+
* @package @geenius/ai-workflow-solidjs
|
|
49
|
+
* @description Solid primitive for building and editing workflow definitions in
|
|
50
|
+
* the Tailwind workflow surface, including selection and undo/redo history.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Create Solid builder state and mutations for the workflow builder UI.
|
|
55
|
+
*
|
|
56
|
+
* @param initial Optional partial workflow definition used to seed the builder.
|
|
57
|
+
* @returns Builder state accessor plus workflow mutation callbacks.
|
|
58
|
+
*/
|
|
59
|
+
declare function createWorkflowBuilder(initial?: Partial<WorkflowDefinition>): {
|
|
60
|
+
state: () => WorkflowBuilderState;
|
|
61
|
+
addStep: (step: WorkflowStepDef) => void;
|
|
62
|
+
removeStep: (stepId: string) => void;
|
|
63
|
+
updateStep: (stepId: string, updates: Partial<WorkflowStepDef>) => void;
|
|
64
|
+
addConnection: (connection: StepConnection) => void;
|
|
65
|
+
removeConnection: (fromStepId: string, toStepId: string) => void;
|
|
66
|
+
selectStep: (stepId: string | null) => void;
|
|
67
|
+
undo: () => void;
|
|
68
|
+
redo: () => void;
|
|
69
|
+
setDefinition: (definition: WorkflowDefinition) => void;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @module CreateWorkflowRun
|
|
74
|
+
* @package @geenius/ai-workflow-solidjs
|
|
75
|
+
* @description Solid primitive for tracking workflow execution progress in the
|
|
76
|
+
* Tailwind workflow variant.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Create Solid signals for workflow run progress and step-level execution data.
|
|
81
|
+
*
|
|
82
|
+
* @returns Run state, derived flags, and update/reset helpers.
|
|
83
|
+
*/
|
|
84
|
+
declare function createWorkflowRun(): {
|
|
85
|
+
run: () => WorkflowRun | null;
|
|
86
|
+
status: () => RunStatus;
|
|
87
|
+
currentStepIndex: () => number;
|
|
88
|
+
completedSteps: () => StepResult[];
|
|
89
|
+
progress: () => number;
|
|
90
|
+
error: () => string | null;
|
|
91
|
+
trackRun: (workflowRun: WorkflowRun) => void;
|
|
92
|
+
updateStep: (result: StepResult) => void;
|
|
93
|
+
reset: () => void;
|
|
94
|
+
isRunning: () => boolean;
|
|
95
|
+
isComplete: () => boolean;
|
|
96
|
+
isFailed: () => boolean;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @module CreateWorkflowStep
|
|
101
|
+
* @package @geenius/ai-workflow-solidjs
|
|
102
|
+
* @description Solid primitive for tracking the state of a single workflow
|
|
103
|
+
* step in the Tailwind workflow surface.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Create Solid signals for an individual workflow step state.
|
|
108
|
+
*
|
|
109
|
+
* @param stepDef Shared workflow step definition to project into UI state.
|
|
110
|
+
* @returns Step execution metadata, derived badges, and reset/update actions.
|
|
111
|
+
*/
|
|
112
|
+
declare function createWorkflowStep(stepDef: WorkflowStepDef): {
|
|
113
|
+
stepDef: WorkflowStepDef;
|
|
114
|
+
status: () => StepStatus;
|
|
115
|
+
output: () => unknown;
|
|
116
|
+
error: () => string | null;
|
|
117
|
+
durationMs: () => number;
|
|
118
|
+
icon: () => string;
|
|
119
|
+
statusColor: () => string;
|
|
120
|
+
updateFromResult: (result: StepResult) => void;
|
|
121
|
+
reset: () => void;
|
|
122
|
+
isComplete: () => boolean;
|
|
123
|
+
isRunning: () => boolean;
|
|
124
|
+
isFailed: () => boolean;
|
|
125
|
+
isWaiting: () => boolean;
|
|
126
|
+
config: WorkflowStepDef["config"];
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @module CreateApprovalGate
|
|
131
|
+
* @package @geenius/ai-workflow-solidjs
|
|
132
|
+
* @description Solid primitive for managing human approval requests in the
|
|
133
|
+
* Tailwind workflow variant.
|
|
134
|
+
*/
|
|
135
|
+
/**
|
|
136
|
+
* Pending approval request exposed to the UI layer.
|
|
137
|
+
*/
|
|
138
|
+
interface ApprovalRequest {
|
|
139
|
+
id: string;
|
|
140
|
+
stepId: string;
|
|
141
|
+
message: string;
|
|
142
|
+
requestedAt: number;
|
|
143
|
+
approvers?: string[];
|
|
144
|
+
}
|
|
145
|
+
interface ApprovalHistoryEntry extends ApprovalRequest {
|
|
146
|
+
decision: "approved" | "rejected";
|
|
147
|
+
decidedAt: number;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Create Solid signals for pending approvals and approval history.
|
|
151
|
+
*
|
|
152
|
+
* @returns Approval state plus request, approve, reject, and reset helpers.
|
|
153
|
+
*/
|
|
154
|
+
declare function createApprovalGate(): {
|
|
155
|
+
pendingApprovals: () => ApprovalRequest[];
|
|
156
|
+
history: () => ApprovalHistoryEntry[];
|
|
157
|
+
hasPending: () => boolean;
|
|
158
|
+
requestApproval: (stepId: string, message: string, approvers?: string[]) => string;
|
|
159
|
+
approve: (approvalId: string) => void;
|
|
160
|
+
reject: (approvalId: string) => void;
|
|
161
|
+
clearHistory: () => void;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @module CreateWorkflowTemplates
|
|
166
|
+
* @package @geenius/ai-workflow-solidjs
|
|
167
|
+
* @description Solid primitive for filtering and instantiating shared
|
|
168
|
+
* workflow templates in the Tailwind workflow surface.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Create Solid signals for the template browser and instantiation flow.
|
|
173
|
+
*
|
|
174
|
+
* @param userId User identifier injected into cloned workflow templates.
|
|
175
|
+
* @returns Template filters, selections, and creation helpers for the builder UI.
|
|
176
|
+
*/
|
|
177
|
+
declare function createWorkflowTemplates(userId: string): {
|
|
178
|
+
templates: () => WorkflowTemplate[];
|
|
179
|
+
allTemplates: WorkflowTemplate[];
|
|
180
|
+
selectedTemplate: () => WorkflowTemplate | null;
|
|
181
|
+
selectedTemplateId: () => string | null;
|
|
182
|
+
categories: () => WorkflowTemplate["category"][];
|
|
183
|
+
filterCategory: () => WorkflowTemplate["category"] | "all";
|
|
184
|
+
searchQuery: () => string;
|
|
185
|
+
setSelectedTemplateId: (templateId: string | null) => void;
|
|
186
|
+
setFilterCategory: (category: WorkflowTemplate["category"] | "all") => void;
|
|
187
|
+
setSearchQuery: (query: string) => void;
|
|
188
|
+
createFromTemplate: (templateId: string) => WorkflowDefinition | null;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Props for the SolidJS workflow builder canvas.
|
|
193
|
+
*
|
|
194
|
+
* @property definition Shared workflow definition to render.
|
|
195
|
+
* @property selectedStepId Currently selected step identifier.
|
|
196
|
+
* @property onSelectStep Callback used to change the selected step.
|
|
197
|
+
*/
|
|
198
|
+
interface WorkflowCanvasProps {
|
|
199
|
+
definition: WorkflowDefinition;
|
|
200
|
+
selectedStepId: string | null;
|
|
201
|
+
onSelectStep: (id: string | null) => void;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Render a workflow canvas with connectors, nodes, and an empty state.
|
|
205
|
+
*
|
|
206
|
+
* @param props Canvas state and interaction callbacks.
|
|
207
|
+
* @returns The workflow canvas for the current definition.
|
|
208
|
+
*/
|
|
209
|
+
declare function WorkflowCanvas(props: WorkflowCanvasProps): JSX.Element;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Props for rendering one SolidJS workflow step node.
|
|
213
|
+
*
|
|
214
|
+
* @property step Shared workflow step definition to render.
|
|
215
|
+
* @property isSelected Whether the node is currently selected.
|
|
216
|
+
* @property status Visual execution status displayed on the node.
|
|
217
|
+
* @property onClick Optional selection callback invoked from mouse or keyboard.
|
|
218
|
+
* @property class Optional class name override for outer layout composition.
|
|
219
|
+
*/
|
|
220
|
+
interface StepNodeProps {
|
|
221
|
+
step: WorkflowStepDef;
|
|
222
|
+
isSelected?: boolean;
|
|
223
|
+
status?: "pending" | "running" | "success" | "error" | "skipped" | "default";
|
|
224
|
+
onClick?: () => void;
|
|
225
|
+
class?: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Render one selectable workflow step node inside the SolidJS builder canvas.
|
|
229
|
+
*
|
|
230
|
+
* @param props Step node rendering props.
|
|
231
|
+
* @returns A keyboard-accessible workflow step node.
|
|
232
|
+
*/
|
|
233
|
+
declare function StepNode(props: StepNodeProps): JSX.Element;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @module SolidWorkflowStepConnector
|
|
237
|
+
* @package @geenius/ai-workflow-solidjs
|
|
238
|
+
* @description SVG connector primitive for drawing directed edges between
|
|
239
|
+
* positioned workflow steps in the SolidJS builder canvas.
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Props for a workflow step connector path.
|
|
244
|
+
*/
|
|
245
|
+
interface StepConnectorProps {
|
|
246
|
+
from: {
|
|
247
|
+
x: number;
|
|
248
|
+
y: number;
|
|
249
|
+
};
|
|
250
|
+
to: {
|
|
251
|
+
x: number;
|
|
252
|
+
y: number;
|
|
253
|
+
};
|
|
254
|
+
label?: string;
|
|
255
|
+
isActive?: boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Render a curved connector between two step positions.
|
|
259
|
+
*
|
|
260
|
+
* @param props Connector endpoints and optional label/state metadata.
|
|
261
|
+
* @returns The SVG group that draws the workflow edge.
|
|
262
|
+
*/
|
|
263
|
+
declare function StepConnector(props: StepConnectorProps): JSX.Element;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @module SolidStepConfigPanel
|
|
267
|
+
* @package @geenius/ai-workflow-solidjs
|
|
268
|
+
* @description SolidJS step configuration panel for builder flows. This file
|
|
269
|
+
* exposes editable step metadata and configuration review for the canvas selection state.
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Props for the SolidJS step configuration panel.
|
|
274
|
+
*
|
|
275
|
+
* @property step Shared workflow step being edited.
|
|
276
|
+
* @property onUpdate Callback for partial step updates.
|
|
277
|
+
* @property onDelete Callback that removes the current step.
|
|
278
|
+
* @property onClose Callback that closes the panel.
|
|
279
|
+
*/
|
|
280
|
+
interface StepConfigPanelProps {
|
|
281
|
+
step: WorkflowStepDef;
|
|
282
|
+
onUpdate: (id: string, updates: Partial<WorkflowStepDef>) => void;
|
|
283
|
+
onDelete: (id: string) => void;
|
|
284
|
+
onClose: () => void;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Render the SolidJS step configuration panel.
|
|
288
|
+
*
|
|
289
|
+
* @param props Step editing callbacks and selected step data.
|
|
290
|
+
* @returns A complementary panel for reviewing and editing step metadata.
|
|
291
|
+
*/
|
|
292
|
+
declare function StepConfigPanel(props: StepConfigPanelProps): JSX.Element;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Props for the SolidJS workflow run panel.
|
|
296
|
+
*
|
|
297
|
+
* @property run Current workflow run snapshot or `null` when idle.
|
|
298
|
+
* @property isRunning Whether the run is still active.
|
|
299
|
+
* @property onCancel Optional callback that cancels the active run.
|
|
300
|
+
*/
|
|
301
|
+
interface WorkflowRunPanelProps {
|
|
302
|
+
run: WorkflowRun | null;
|
|
303
|
+
isRunning: boolean;
|
|
304
|
+
onCancel?: () => void;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Render execution progress and per-step status for a workflow run.
|
|
308
|
+
*
|
|
309
|
+
* @param props Run state and optional cancellation callback.
|
|
310
|
+
* @returns A run summary panel or idle placeholder.
|
|
311
|
+
*/
|
|
312
|
+
declare function WorkflowRunPanel(props: WorkflowRunPanelProps): JSX.Element;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @module SolidApprovalModal
|
|
316
|
+
* @package @geenius/ai-workflow-solidjs
|
|
317
|
+
* @description SolidJS approval dialog for human-gated workflow steps. This
|
|
318
|
+
* component preserves the dialog semantics and request metadata exposed by the React variant.
|
|
319
|
+
*/
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Props for the SolidJS approval dialog.
|
|
323
|
+
*/
|
|
324
|
+
interface ApprovalModalProps {
|
|
325
|
+
request: ApprovalRequest | null;
|
|
326
|
+
onApprove: (id: string) => void;
|
|
327
|
+
onReject: (id: string) => void;
|
|
328
|
+
onDismiss?: (id: string) => void;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Render the pending approval request as an accessible SolidJS dialog.
|
|
332
|
+
*
|
|
333
|
+
* @param props Approval dialog callbacks and the current pending request.
|
|
334
|
+
* @returns The animated approval dialog when an approval is pending.
|
|
335
|
+
*/
|
|
336
|
+
declare function ApprovalModal(props: ApprovalModalProps): JSX.Element;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @module SolidWorkflowToolbar
|
|
340
|
+
* @package @geenius/ai-workflow-solidjs
|
|
341
|
+
* @description SolidJS toolbar for workflow builder actions such as save, run,
|
|
342
|
+
* cancel, undo, redo, and export. This component owns the top-level command
|
|
343
|
+
* surface shared across the builder page.
|
|
344
|
+
*/
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Props for the workflow toolbar action surface.
|
|
348
|
+
*/
|
|
349
|
+
interface WorkflowToolbarProps {
|
|
350
|
+
workflowName: string;
|
|
351
|
+
isDirty: boolean;
|
|
352
|
+
isRunning: boolean;
|
|
353
|
+
canUndo: boolean;
|
|
354
|
+
canRedo: boolean;
|
|
355
|
+
onSave: () => void;
|
|
356
|
+
onRun: () => void;
|
|
357
|
+
onCancel?: () => void;
|
|
358
|
+
onUndo: () => void;
|
|
359
|
+
onRedo: () => void;
|
|
360
|
+
onExport?: () => void;
|
|
361
|
+
class?: string;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Render the builder command toolbar with run-state-aware actions.
|
|
365
|
+
*
|
|
366
|
+
* @param props Action callbacks and builder status flags for the toolbar.
|
|
367
|
+
* @returns The animated workflow toolbar.
|
|
368
|
+
*/
|
|
369
|
+
declare function WorkflowToolbar(props: WorkflowToolbarProps): JSX.Element;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Props for the SolidJS workflow step palette.
|
|
373
|
+
*
|
|
374
|
+
* @property onAddStep Callback invoked when a step type is selected.
|
|
375
|
+
*/
|
|
376
|
+
interface StepPaletteProps {
|
|
377
|
+
onAddStep: (type: StepType) => void;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Render the SolidJS workflow step palette.
|
|
381
|
+
*
|
|
382
|
+
* @param props Palette interaction props.
|
|
383
|
+
* @returns A list of available workflow step types.
|
|
384
|
+
*/
|
|
385
|
+
declare function StepPalette(props: StepPaletteProps): JSX.Element;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* @module SolidWorkflowBuilderPage
|
|
389
|
+
* @package @geenius/ai-workflow-solidjs
|
|
390
|
+
* @description SolidJS page for composing, editing, and running workflow
|
|
391
|
+
* definitions. This page coordinates the shared engine with the Solid
|
|
392
|
+
* primitives and component surface.
|
|
393
|
+
*/
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Props for the SolidJS workflow builder page.
|
|
397
|
+
*
|
|
398
|
+
* @property engineOptions Shared workflow engine integrations used for execution.
|
|
399
|
+
* @property onSave Optional callback that persists the edited definition.
|
|
400
|
+
* @property class Optional class name override for outer layout composition.
|
|
401
|
+
* @property workflows Optional list of stored workflows shown in the summary strip.
|
|
402
|
+
* @property workflowRuns Optional list of stored workflow runs shown in the summary strip.
|
|
403
|
+
*/
|
|
404
|
+
interface WorkflowBuilderPageProps {
|
|
405
|
+
engineOptions: WorkflowEngineOptions;
|
|
406
|
+
onSave?: (definition: WorkflowDefinition) => void;
|
|
407
|
+
class?: string;
|
|
408
|
+
workflows?: Array<{
|
|
409
|
+
_id: string;
|
|
410
|
+
name: string;
|
|
411
|
+
}>;
|
|
412
|
+
workflowRuns?: Array<{
|
|
413
|
+
_id: string;
|
|
414
|
+
workflowId: string;
|
|
415
|
+
}>;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Render the full workflow builder page for SolidJS consumers.
|
|
419
|
+
*
|
|
420
|
+
* @param props Builder dependencies, persistence callbacks, and optional summaries.
|
|
421
|
+
* @returns The composed workflow builder page.
|
|
422
|
+
*/
|
|
423
|
+
declare function WorkflowBuilderPage(props: WorkflowBuilderPageProps): JSXElement;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @module SolidWorkflowRunsPage
|
|
427
|
+
* @package @geenius/ai-workflow-solidjs
|
|
428
|
+
* @description SolidJS page for browsing stored workflow runs. This file keeps
|
|
429
|
+
* the run list keyboard-accessible while preserving the builder-facing status summary.
|
|
430
|
+
*/
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Props for the SolidJS workflow runs page.
|
|
434
|
+
*
|
|
435
|
+
* @property runs Workflow runs to display.
|
|
436
|
+
* @property onSelectRun Optional callback fired when a run card is selected.
|
|
437
|
+
* @property class Optional class name override for outer layout composition.
|
|
438
|
+
*/
|
|
439
|
+
interface WorkflowRunsPageProps {
|
|
440
|
+
runs: WorkflowRun[];
|
|
441
|
+
onSelectRun?: (id: string) => void;
|
|
442
|
+
class?: string;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Render a browsable list of stored workflow runs in the SolidJS surface.
|
|
446
|
+
*
|
|
447
|
+
* @param props Run collection and optional selection callback.
|
|
448
|
+
* @returns The workflow runs page.
|
|
449
|
+
*/
|
|
450
|
+
declare function WorkflowRunsPage(props: WorkflowRunsPageProps): JSX.Element;
|
|
451
|
+
|
|
452
|
+
export { ApprovalModal, type ApprovalModalProps, type ApprovalRequest, StepConfigPanel, type StepConfigPanelProps, StepConnector, StepNode, type StepNodeProps, StepPalette, type StepPaletteProps, WorkflowBuilderPage, type WorkflowBuilderPageProps, WorkflowCanvas, WorkflowRunPanel, type WorkflowRunPanelProps, WorkflowRunsPage, type WorkflowRunsPageProps, WorkflowToolbar, createApprovalGate, createWorkflow, createWorkflowBuilder, createWorkflowRun, createWorkflowStep, createWorkflowTemplates };
|