@marktoflow/gui 2.0.0-alpha.13 → 2.0.0-alpha.15

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.
@@ -0,0 +1,428 @@
1
+ /**
2
+ * ExecutionManager service for managing workflow executions in the GUI
3
+ *
4
+ * Tracks active executions, provides cancellation support, and integrates
5
+ * with StateStore for persistence and Socket.IO for real-time updates.
6
+ */
7
+ import { parseFile, WorkflowEngine, SDKRegistry, createSDKStepExecutor, WorkflowStatus, StepStatus, CoreInitializer, WorkflowInitializer, } from '@marktoflow/core';
8
+ // ============================================================================
9
+ // ExecutionManager Implementation
10
+ // ============================================================================
11
+ export class ExecutionManager {
12
+ activeExecutions = new Map();
13
+ stateStore;
14
+ wsEmitter;
15
+ constructor(stateStore, wsEmitter = null, _workflowDir = process.cwd() // eslint-disable-line @typescript-eslint/no-unused-vars
16
+ ) {
17
+ this.stateStore = stateStore;
18
+ this.wsEmitter = wsEmitter;
19
+ }
20
+ /**
21
+ * Start a new workflow execution
22
+ */
23
+ async startExecution(workflowPath, inputs = {}) {
24
+ const runId = `run-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
25
+ const abortController = new AbortController();
26
+ // Parse the workflow
27
+ const { workflow } = await parseFile(workflowPath);
28
+ // Create execution record in state store
29
+ this.stateStore.createExecution({
30
+ runId,
31
+ workflowId: workflow.metadata.id,
32
+ workflowPath,
33
+ status: WorkflowStatus.RUNNING,
34
+ startedAt: new Date(),
35
+ completedAt: null,
36
+ currentStep: 0,
37
+ totalSteps: workflow.steps.length,
38
+ inputs,
39
+ outputs: null,
40
+ error: null,
41
+ metadata: null,
42
+ });
43
+ // Create workflow engine with callbacks
44
+ const engine = new WorkflowEngine({}, {
45
+ onStepStart: (step) => {
46
+ const active = this.activeExecutions.get(runId);
47
+ if (active) {
48
+ const stepIndex = workflow.steps.findIndex(s => s.id === step.id);
49
+ active.currentStep = stepIndex + 1;
50
+ // Update state store (protected in case db is closed during cleanup)
51
+ try {
52
+ this.stateStore.updateExecution(runId, {
53
+ currentStep: stepIndex + 1,
54
+ });
55
+ // Save checkpoint
56
+ this.stateStore.saveCheckpoint({
57
+ runId,
58
+ stepIndex,
59
+ stepName: step.id,
60
+ status: StepStatus.RUNNING,
61
+ startedAt: new Date(),
62
+ completedAt: null,
63
+ inputs: step.inputs,
64
+ outputs: null,
65
+ error: null,
66
+ retryCount: 0,
67
+ });
68
+ }
69
+ catch {
70
+ // Database may be closed during test cleanup, ignore
71
+ }
72
+ // Emit via WebSocket
73
+ if (this.wsEmitter) {
74
+ this.wsEmitter.emitExecutionStep(runId, {
75
+ stepId: step.id,
76
+ stepIndex,
77
+ status: 'running',
78
+ action: step.action,
79
+ });
80
+ }
81
+ }
82
+ },
83
+ onStepComplete: (step, result) => {
84
+ const active = this.activeExecutions.get(runId);
85
+ if (active) {
86
+ const stepIndex = workflow.steps.findIndex(s => s.id === step.id);
87
+ // Update checkpoint (protected in case db is closed during cleanup)
88
+ try {
89
+ this.stateStore.saveCheckpoint({
90
+ runId,
91
+ stepIndex,
92
+ stepName: step.id,
93
+ status: result.status,
94
+ startedAt: new Date(Date.now() - (result.duration || 0)),
95
+ completedAt: new Date(),
96
+ inputs: step.inputs,
97
+ outputs: result.output,
98
+ error: result.error ? String(result.error) : null,
99
+ retryCount: result.retryCount || 0,
100
+ });
101
+ }
102
+ catch {
103
+ // Database may be closed during test cleanup, ignore
104
+ }
105
+ // Emit via WebSocket
106
+ if (this.wsEmitter) {
107
+ this.wsEmitter.emitExecutionStep(runId, {
108
+ stepId: step.id,
109
+ stepIndex,
110
+ status: result.status,
111
+ duration: result.duration,
112
+ output: result.output,
113
+ error: result.error,
114
+ });
115
+ }
116
+ }
117
+ },
118
+ });
119
+ // Track active execution
120
+ const activeExecution = {
121
+ runId,
122
+ workflowPath,
123
+ workflowId: workflow.metadata.id,
124
+ startedAt: new Date(),
125
+ status: 'running',
126
+ currentStep: 0,
127
+ totalSteps: workflow.steps.length,
128
+ abortController,
129
+ engine,
130
+ };
131
+ this.activeExecutions.set(runId, activeExecution);
132
+ // Emit execution started
133
+ if (this.wsEmitter) {
134
+ this.wsEmitter.emitExecutionStarted(runId, {
135
+ workflowPath,
136
+ workflowId: workflow.metadata.id,
137
+ workflowName: workflow.metadata.name,
138
+ totalSteps: workflow.steps.length,
139
+ inputs,
140
+ });
141
+ }
142
+ // Execute workflow asynchronously
143
+ this.executeWorkflowAsync(runId, workflow, inputs, engine);
144
+ return runId;
145
+ }
146
+ /**
147
+ * Execute workflow asynchronously (non-blocking)
148
+ */
149
+ async executeWorkflowAsync(runId, workflow, inputs, engine) {
150
+ try {
151
+ // Set up SDK registry
152
+ const registry = new SDKRegistry();
153
+ // Always register core built-in tools (they don't require external dependencies)
154
+ registry.registerInitializer('core', CoreInitializer);
155
+ registry.registerInitializer('workflow', WorkflowInitializer);
156
+ // Dynamically import and register integrations
157
+ try {
158
+ // Use dynamic import with a variable to avoid TypeScript checking the module
159
+ const moduleName = '@marktoflow/integrations';
160
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
161
+ const integrationsModule = await Function('moduleName', 'return import(moduleName)')(moduleName);
162
+ if (integrationsModule.registerIntegrations) {
163
+ integrationsModule.registerIntegrations(registry);
164
+ }
165
+ }
166
+ catch {
167
+ // @marktoflow/integrations may not be available in all environments
168
+ // Continue without it - core tools will still work
169
+ }
170
+ registry.registerTools(workflow.tools);
171
+ // Execute workflow
172
+ const result = await engine.execute(workflow, inputs, registry, createSDKStepExecutor());
173
+ // Update state store first (before marking as complete, to avoid race condition with waitForAll)
174
+ try {
175
+ this.stateStore.updateExecution(runId, {
176
+ status: result.status,
177
+ completedAt: new Date(),
178
+ outputs: result.output || null,
179
+ error: result.error || null,
180
+ });
181
+ }
182
+ catch {
183
+ // Database may be closed during test cleanup, ignore
184
+ }
185
+ // Update active execution status (this signals waitForAll that we're done)
186
+ const active = this.activeExecutions.get(runId);
187
+ if (active) {
188
+ active.status = result.status === WorkflowStatus.COMPLETED ? 'completed' : 'failed';
189
+ }
190
+ // Emit completion via WebSocket
191
+ if (this.wsEmitter) {
192
+ this.wsEmitter.emitExecutionCompleted(runId, {
193
+ status: result.status,
194
+ duration: result.duration,
195
+ stepResults: result.stepResults,
196
+ outputs: result.output,
197
+ error: result.error,
198
+ });
199
+ }
200
+ }
201
+ catch (error) {
202
+ const errorMessage = error instanceof Error ? error.message : String(error);
203
+ // Update state store first (before marking as failed, to avoid race condition with waitForAll)
204
+ try {
205
+ this.stateStore.updateExecution(runId, {
206
+ status: WorkflowStatus.FAILED,
207
+ completedAt: new Date(),
208
+ error: errorMessage,
209
+ });
210
+ }
211
+ catch {
212
+ // Database may be closed during test cleanup, ignore
213
+ }
214
+ // Update active execution status (this signals waitForAll that we're done)
215
+ const active = this.activeExecutions.get(runId);
216
+ if (active) {
217
+ active.status = 'failed';
218
+ }
219
+ // Emit failure via WebSocket
220
+ if (this.wsEmitter) {
221
+ this.wsEmitter.emitExecutionCompleted(runId, {
222
+ status: 'failed',
223
+ error: errorMessage,
224
+ });
225
+ }
226
+ }
227
+ finally {
228
+ // Clean up active execution after a delay (keep for status queries)
229
+ setTimeout(() => {
230
+ this.activeExecutions.delete(runId);
231
+ }, 60000); // Keep for 1 minute after completion
232
+ }
233
+ }
234
+ /**
235
+ * Cancel an active execution
236
+ */
237
+ async cancelExecution(runId) {
238
+ const active = this.activeExecutions.get(runId);
239
+ if (!active) {
240
+ // Check if it exists in state store
241
+ const execution = this.stateStore.getExecution(runId);
242
+ if (!execution) {
243
+ return false;
244
+ }
245
+ // Already completed
246
+ if (execution.status !== WorkflowStatus.RUNNING) {
247
+ return false;
248
+ }
249
+ // Update as cancelled (execution might be orphaned)
250
+ this.stateStore.updateExecution(runId, {
251
+ status: WorkflowStatus.CANCELLED,
252
+ completedAt: new Date(),
253
+ error: 'Execution cancelled by user',
254
+ });
255
+ return true;
256
+ }
257
+ // Abort the execution
258
+ active.abortController.abort();
259
+ active.status = 'cancelled';
260
+ // Update state store
261
+ this.stateStore.updateExecution(runId, {
262
+ status: WorkflowStatus.CANCELLED,
263
+ completedAt: new Date(),
264
+ error: 'Execution cancelled by user',
265
+ });
266
+ // Emit cancellation via WebSocket
267
+ if (this.wsEmitter) {
268
+ this.wsEmitter.emitExecutionCompleted(runId, {
269
+ status: 'cancelled',
270
+ error: 'Execution cancelled by user',
271
+ });
272
+ }
273
+ return true;
274
+ }
275
+ /**
276
+ * Get execution status
277
+ */
278
+ getExecutionStatus(runId) {
279
+ // Check active executions first
280
+ const active = this.activeExecutions.get(runId);
281
+ if (active) {
282
+ return {
283
+ runId: active.runId,
284
+ workflowPath: active.workflowPath,
285
+ workflowId: active.workflowId,
286
+ status: active.status,
287
+ currentStep: active.currentStep,
288
+ totalSteps: active.totalSteps,
289
+ startedAt: active.startedAt,
290
+ completedAt: null,
291
+ error: null,
292
+ stepResults: this.getStepResults(runId),
293
+ };
294
+ }
295
+ // Check state store
296
+ const execution = this.stateStore.getExecution(runId);
297
+ if (!execution) {
298
+ return null;
299
+ }
300
+ // Map WorkflowStatus to our status type
301
+ let status;
302
+ switch (execution.status) {
303
+ case WorkflowStatus.COMPLETED:
304
+ status = 'completed';
305
+ break;
306
+ case WorkflowStatus.FAILED:
307
+ status = 'failed';
308
+ break;
309
+ case WorkflowStatus.CANCELLED:
310
+ status = 'cancelled';
311
+ break;
312
+ case WorkflowStatus.RUNNING:
313
+ status = 'running';
314
+ break;
315
+ default:
316
+ status = 'not_found';
317
+ }
318
+ return {
319
+ runId: execution.runId,
320
+ workflowPath: execution.workflowPath,
321
+ workflowId: execution.workflowId,
322
+ status,
323
+ currentStep: execution.currentStep,
324
+ totalSteps: execution.totalSteps,
325
+ startedAt: execution.startedAt,
326
+ completedAt: execution.completedAt,
327
+ error: execution.error,
328
+ stepResults: this.getStepResults(runId),
329
+ };
330
+ }
331
+ /**
332
+ * Get step results for an execution
333
+ */
334
+ getStepResults(runId) {
335
+ const checkpoints = this.stateStore.getCheckpoints(runId);
336
+ return checkpoints.map(cp => ({
337
+ stepId: cp.stepName,
338
+ status: cp.status,
339
+ duration: cp.completedAt
340
+ ? cp.completedAt.getTime() - cp.startedAt.getTime()
341
+ : null,
342
+ output: cp.outputs,
343
+ error: cp.error || undefined,
344
+ }));
345
+ }
346
+ /**
347
+ * List recent executions
348
+ */
349
+ listExecutions(options = {}) {
350
+ const workflowStatus = options.status
351
+ ? options.status
352
+ : undefined;
353
+ const executions = this.stateStore.listExecutions({
354
+ status: workflowStatus,
355
+ limit: options.limit || 50,
356
+ });
357
+ return executions.map(exec => {
358
+ let status;
359
+ switch (exec.status) {
360
+ case WorkflowStatus.COMPLETED:
361
+ status = 'completed';
362
+ break;
363
+ case WorkflowStatus.FAILED:
364
+ status = 'failed';
365
+ break;
366
+ case WorkflowStatus.CANCELLED:
367
+ status = 'cancelled';
368
+ break;
369
+ case WorkflowStatus.RUNNING:
370
+ status = 'running';
371
+ break;
372
+ default:
373
+ status = 'not_found';
374
+ }
375
+ return {
376
+ runId: exec.runId,
377
+ workflowPath: exec.workflowPath,
378
+ workflowId: exec.workflowId,
379
+ status,
380
+ currentStep: exec.currentStep,
381
+ totalSteps: exec.totalSteps,
382
+ startedAt: exec.startedAt,
383
+ completedAt: exec.completedAt,
384
+ error: exec.error,
385
+ stepResults: [],
386
+ };
387
+ });
388
+ }
389
+ /**
390
+ * Get count of active executions
391
+ */
392
+ getActiveCount() {
393
+ return this.activeExecutions.size;
394
+ }
395
+ /**
396
+ * Check if an execution is currently active
397
+ */
398
+ isActive(runId) {
399
+ return this.activeExecutions.has(runId);
400
+ }
401
+ /**
402
+ * Wait for all active executions to complete
403
+ * Useful for testing cleanup to ensure DB isn't closed while executions are in progress
404
+ */
405
+ async waitForAll(timeoutMs = 10000) {
406
+ const startTime = Date.now();
407
+ while (this.hasRunningExecutions()) {
408
+ if (Date.now() - startTime > timeoutMs) {
409
+ // Timeout reached, force clear
410
+ this.activeExecutions.clear();
411
+ break;
412
+ }
413
+ await new Promise(resolve => setTimeout(resolve, 50));
414
+ }
415
+ }
416
+ /**
417
+ * Check if any executions are still running (not completed/failed/cancelled)
418
+ */
419
+ hasRunningExecutions() {
420
+ for (const execution of this.activeExecutions.values()) {
421
+ if (execution.status === 'running') {
422
+ return true;
423
+ }
424
+ }
425
+ return false;
426
+ }
427
+ }
428
+ //# sourceMappingURL=ExecutionManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionManager.js","sourceRoot":"","sources":["../../../../src/server/services/ExecutionManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,SAAS,EACT,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,UAAU,EAEV,eAAe,EACf,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AA2C1B,+EAA+E;AAC/E,kCAAkC;AAClC,+EAA+E;AAE/E,MAAM,OAAO,gBAAgB;IACnB,gBAAgB,GAAiC,IAAI,GAAG,EAAE,CAAC;IAC3D,UAAU,CAAa;IACvB,SAAS,CAAmB;IAEpC,YACE,UAAsB,EACtB,YAA8B,IAAI,EAClC,eAAuB,OAAO,CAAC,GAAG,EAAE,CAAC,wDAAwD;;QAE7F,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAClB,YAAoB,EACpB,SAAkC,EAAE;QAEpC,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5E,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;QAE9C,qBAAqB;QACrB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,CAAC;QAEnD,yCAAyC;QACzC,IAAI,CAAC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;;OAEG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,KAAa;QACpB,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CAAC,YAAoB,KAAK;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,oBAAoB,EAAE,EAAE,CAAC;YACnC,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC;gBACvC,+BAA+B;gBAC/B,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;gBAC9B,MAAM;YACR,CAAC;YACD,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED;;OAEG;IACK,oBAAoB;QAC1B,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,EAAE,CAAC;YACvD,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBACnC,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marktoflow/gui",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.15",
4
4
  "description": "Visual workflow designer for marktoflow - web UI",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",
@@ -36,7 +36,7 @@
36
36
  "@anthropic-ai/claude-agent-sdk": ">=0.1.0",
37
37
  "@anthropic-ai/sdk": "^0.52.0",
38
38
  "@github/copilot-sdk": "^0.1.18",
39
- "@marktoflow/core": "2.0.0-alpha.12",
39
+ "@marktoflow/core": "2.0.0-alpha.15",
40
40
  "@monaco-editor/react": "^4.6.0",
41
41
  "@radix-ui/react-context-menu": "^2.2.2",
42
42
  "@radix-ui/react-dialog": "^1.1.2",
@@ -103,6 +103,9 @@
103
103
  "react-flow",
104
104
  "automation"
105
105
  ],
106
- "author": "Scott Gilroy",
107
- "license": "Apache-2.0"
106
+ "author": "Scott Glover",
107
+ "license": "Apache-2.0",
108
+ "publishConfig": {
109
+ "registry": "https://registry.npmjs.org/"
110
+ }
108
111
  }
@@ -0,0 +1,6 @@
1
+ ---
2
+ workflow:
3
+ id: test-workflow
4
+ name: Test Workflow
5
+ ---
6
+ steps: []