@kylebegeman/pulse 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +1078 -0
  2. package/dist/cron.d.ts +16 -0
  3. package/dist/cron.d.ts.map +1 -0
  4. package/dist/cron.js +32 -0
  5. package/dist/cron.js.map +1 -0
  6. package/dist/executor.d.ts +43 -0
  7. package/dist/executor.d.ts.map +1 -0
  8. package/dist/executor.js +333 -0
  9. package/dist/executor.js.map +1 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +198 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/logs.d.ts +11 -0
  15. package/dist/logs.d.ts.map +1 -0
  16. package/dist/logs.js +25 -0
  17. package/dist/logs.js.map +1 -0
  18. package/dist/matcher.d.ts +23 -0
  19. package/dist/matcher.d.ts.map +1 -0
  20. package/dist/matcher.js +184 -0
  21. package/dist/matcher.js.map +1 -0
  22. package/dist/queue.d.ts +42 -0
  23. package/dist/queue.d.ts.map +1 -0
  24. package/dist/queue.js +85 -0
  25. package/dist/queue.js.map +1 -0
  26. package/dist/registry.d.ts +23 -0
  27. package/dist/registry.d.ts.map +1 -0
  28. package/dist/registry.js +33 -0
  29. package/dist/registry.js.map +1 -0
  30. package/dist/replay.d.ts +10 -0
  31. package/dist/replay.d.ts.map +1 -0
  32. package/dist/replay.js +24 -0
  33. package/dist/replay.js.map +1 -0
  34. package/dist/runs.d.ts +37 -0
  35. package/dist/runs.d.ts.map +1 -0
  36. package/dist/runs.js +296 -0
  37. package/dist/runs.js.map +1 -0
  38. package/dist/scheduler.d.ts +21 -0
  39. package/dist/scheduler.d.ts.map +1 -0
  40. package/dist/scheduler.js +67 -0
  41. package/dist/scheduler.js.map +1 -0
  42. package/dist/schema/migrate.d.ts +3 -0
  43. package/dist/schema/migrate.d.ts.map +1 -0
  44. package/dist/schema/migrate.js +56 -0
  45. package/dist/schema/migrate.js.map +1 -0
  46. package/dist/schema/tables.d.ts +10 -0
  47. package/dist/schema/tables.d.ts.map +1 -0
  48. package/dist/schema/tables.js +123 -0
  49. package/dist/schema/tables.js.map +1 -0
  50. package/dist/types.d.ts +186 -0
  51. package/dist/types.d.ts.map +1 -0
  52. package/dist/types.js +2 -0
  53. package/dist/types.js.map +1 -0
  54. package/dist/utils/errors.d.ts +30 -0
  55. package/dist/utils/errors.d.ts.map +1 -0
  56. package/dist/utils/errors.js +61 -0
  57. package/dist/utils/errors.js.map +1 -0
  58. package/dist/utils/ids.d.ts +2 -0
  59. package/dist/utils/ids.d.ts.map +1 -0
  60. package/dist/utils/ids.js +6 -0
  61. package/dist/utils/ids.js.map +1 -0
  62. package/package.json +45 -0
package/dist/cron.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ import type { WorkflowDefinition, TriggerInput } from './types.js';
2
+ import type { QueueManager } from './queue.js';
3
+ export declare class CronManager {
4
+ private queueManager;
5
+ private emitFn;
6
+ constructor(queueManager: QueueManager, emitFn: (input: TriggerInput) => Promise<unknown>);
7
+ scheduleCron(def: WorkflowDefinition): Promise<void>;
8
+ removeCron(definitionId: string): Promise<void>;
9
+ restoreAll(definitions: WorkflowDefinition[]): Promise<void>;
10
+ handleCronFire(data: {
11
+ definitionId: string;
12
+ tenantId: string;
13
+ triggerType: string;
14
+ }): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=cron.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../src/cron.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,qBAAa,WAAW;IAEpB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,MAAM;gBADN,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,OAAO,CAAC;IAGrD,YAAY,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAUpD,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C,UAAU,CAAC,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D,cAAc,CAAC,IAAI,EAAE;QACzB,YAAY,EAAE,MAAM,CAAA;QACpB,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;KACpB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQlB"}
package/dist/cron.js ADDED
@@ -0,0 +1,32 @@
1
+ export class CronManager {
2
+ queueManager;
3
+ emitFn;
4
+ constructor(queueManager, emitFn) {
5
+ this.queueManager = queueManager;
6
+ this.emitFn = emitFn;
7
+ }
8
+ async scheduleCron(def) {
9
+ if (!def.cronExpression)
10
+ return;
11
+ await this.queueManager.addCronJob(def.id, def.tenantId, def.triggerType, def.cronExpression);
12
+ }
13
+ async removeCron(definitionId) {
14
+ await this.queueManager.removeCronJob(definitionId);
15
+ }
16
+ async restoreAll(definitions) {
17
+ for (const def of definitions) {
18
+ if (def.cronExpression && def.isEnabled) {
19
+ await this.scheduleCron(def);
20
+ }
21
+ }
22
+ }
23
+ async handleCronFire(data) {
24
+ await this.emitFn({
25
+ tenantId: data.tenantId,
26
+ source: 'cron',
27
+ type: data.triggerType,
28
+ payload: { definitionId: data.definitionId },
29
+ });
30
+ }
31
+ }
32
+ //# sourceMappingURL=cron.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cron.js","sourceRoot":"","sources":["../src/cron.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,WAAW;IAEZ;IACA;IAFV,YACU,YAA0B,EAC1B,MAAiD;QADjD,iBAAY,GAAZ,YAAY,CAAc;QAC1B,WAAM,GAAN,MAAM,CAA2C;IACxD,CAAC;IAEJ,KAAK,CAAC,YAAY,CAAC,GAAuB;QACxC,IAAI,CAAC,GAAG,CAAC,cAAc;YAAE,OAAM;QAC/B,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAChC,GAAG,CAAC,EAAE,EACN,GAAG,CAAC,QAAQ,EACZ,GAAG,CAAC,WAAW,EACf,GAAG,CAAC,cAAc,CACnB,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,YAAoB;QACnC,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IACrD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,WAAiC;QAChD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,IAAI,GAAG,CAAC,cAAc,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;gBACxC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAIpB;QACC,MAAM,IAAI,CAAC,MAAM,CAAC;YAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,WAAW;YACtB,OAAO,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE;SAC7C,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,43 @@
1
+ import type { TriggerInput, TriggerEnvelope, LifecycleHook, StepCompleteEvent, RunCompleteEvent } from './types.js';
2
+ import type { Registry } from './registry.js';
3
+ import type { RunManager } from './runs.js';
4
+ import type { Scheduler } from './scheduler.js';
5
+ import type { LogStore } from './logs.js';
6
+ import type { Matcher } from './matcher.js';
7
+ import type { QueueManager } from './queue.js';
8
+ export type InternalEmitFn = (trigger: TriggerInput, emitDepth?: number) => Promise<TriggerEnvelope>;
9
+ export interface ExecutorHooks {
10
+ onStepComplete?: LifecycleHook<StepCompleteEvent>;
11
+ onRunComplete?: LifecycleHook<RunCompleteEvent>;
12
+ }
13
+ export declare class Executor {
14
+ private registry;
15
+ private runManager;
16
+ private scheduler;
17
+ private logStore;
18
+ private matcher;
19
+ private emitFn;
20
+ private queueManager;
21
+ private hooks;
22
+ constructor(registry: Registry, runManager: RunManager, scheduler: Scheduler, logStore: LogStore, matcher: Matcher, emitFn: InternalEmitFn, queueManager: QueueManager, hooks?: ExecutorHooks);
23
+ executeStep(stepRunId: string, runId: string, emitDepth?: number, isLastAttempt?: boolean): Promise<void>;
24
+ /**
25
+ * Execute a branch step (within a parallel step's branch).
26
+ * Returns true if more branch steps remain.
27
+ */
28
+ executeBranchStep(stepRunId: string, runId: string, emitDepth?: number, isLastAttempt?: boolean): Promise<void>;
29
+ private checkParallelCompletion;
30
+ private executeDelay;
31
+ private executeCondition;
32
+ private executeAction;
33
+ private executeParallel;
34
+ /**
35
+ * Cancel any pending/scheduled sibling branch steps when a branch fails.
36
+ */
37
+ private cancelPendingBranchSteps;
38
+ private withTimeout;
39
+ private buildContext;
40
+ private fireStepComplete;
41
+ private fireRunComplete;
42
+ }
43
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAMZ,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CA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isteredActionError, UnregisteredConditionError, WorkflowRunError, } from './utils/errors.js';
2
+ export class Executor {
3
+ registry;
4
+ runManager;
5
+ scheduler;
6
+ logStore;
7
+ matcher;
8
+ emitFn;
9
+ queueManager;
10
+ hooks;
11
+ constructor(registry, runManager, scheduler, logStore, matcher, emitFn, queueManager, hooks = {}) {
12
+ this.registry = registry;
13
+ this.runManager = runManager;
14
+ this.scheduler = scheduler;
15
+ this.logStore = logStore;
16
+ this.matcher = matcher;
17
+ this.emitFn = emitFn;
18
+ this.queueManager = queueManager;
19
+ this.hooks = hooks;
20
+ }
21
+ async executeStep(stepRunId, runId, emitDepth = 0, isLastAttempt = true) {
22
+ const run = await this.runManager.getRun(runId);
23
+ if (!run)
24
+ throw new WorkflowRunError(runId, 'Run not found');
25
+ if (run.status === 'canceled' || run.status === 'failed')
26
+ return;
27
+ // Atomically claim the step — if another worker already claimed it, no-op
28
+ const stepRun = await this.runManager.claimStep(stepRunId);
29
+ if (!stepRun)
30
+ return;
31
+ const snapshot = run.definitionSnapshot;
32
+ if (!snapshot?.steps?.length)
33
+ throw new WorkflowRunError(runId, 'Run has no definition snapshot');
34
+ const step = snapshot.steps[stepRun.stepIndex];
35
+ if (!step)
36
+ throw new WorkflowRunError(runId, `Step at index ${stepRun.stepIndex} not found`);
37
+ const trigger = await this.matcher.getTrigger(run.triggerId);
38
+ if (!trigger)
39
+ throw new WorkflowRunError(runId, 'Trigger not found');
40
+ try {
41
+ const ctx = this.buildContext(run, stepRun, trigger, snapshot, emitDepth);
42
+ switch (step.type) {
43
+ case 'delay':
44
+ await this.executeDelay(stepRunId, run, snapshot, stepRun.stepIndex);
45
+ break;
46
+ case 'condition':
47
+ await this.executeCondition(step, ctx, stepRunId, run, snapshot, stepRun.stepIndex);
48
+ break;
49
+ case 'action':
50
+ await this.executeAction(step.name, ctx, stepRunId, run, snapshot, stepRun.stepIndex);
51
+ break;
52
+ case 'parallel':
53
+ await this.executeParallel(step, stepRunId, run, snapshot, stepRun.stepIndex, emitDepth);
54
+ break;
55
+ }
56
+ this.fireStepComplete(run, stepRun);
57
+ }
58
+ catch (error) {
59
+ const message = error instanceof Error ? error.message : String(error);
60
+ if (!isLastAttempt) {
61
+ await this.logStore.write(runId, run.tenantId, 'warn', `Step failed (will retry): ${message}`, undefined, stepRunId);
62
+ throw error; // re-throw so BullMQ retries the job
63
+ }
64
+ await this.runManager.updateStepStatus(stepRunId, 'failed', undefined, message);
65
+ await this.runManager.updateStatus(runId, 'failed', undefined, 'running');
66
+ await this.logStore.write(runId, run.tenantId, 'error', `Step failed: ${message}`, undefined, stepRunId);
67
+ this.fireStepComplete(run, stepRun);
68
+ this.fireRunComplete(run, 'failed');
69
+ }
70
+ }
71
+ /**
72
+ * Execute a branch step (within a parallel step's branch).
73
+ * Returns true if more branch steps remain.
74
+ */
75
+ async executeBranchStep(stepRunId, runId, emitDepth = 0, isLastAttempt = true) {
76
+ const run = await this.runManager.getRun(runId);
77
+ if (!run)
78
+ throw new WorkflowRunError(runId, 'Run not found');
79
+ if (run.status === 'canceled' || run.status === 'failed')
80
+ return;
81
+ // Atomically claim the step — if another worker already claimed it, no-op
82
+ const stepRun = await this.runManager.claimStep(stepRunId);
83
+ if (!stepRun)
84
+ return;
85
+ if (stepRun.branchIndex === undefined || !stepRun.parentStepRunId) {
86
+ throw new WorkflowRunError(runId, `Step ${stepRunId} is not a branch step`);
87
+ }
88
+ const snapshot = run.definitionSnapshot;
89
+ if (!snapshot?.steps?.length)
90
+ throw new WorkflowRunError(runId, 'Run has no definition snapshot');
91
+ const parentStep = snapshot.steps[stepRun.stepIndex];
92
+ if (!parentStep || parentStep.type !== 'parallel' || !parentStep.branches) {
93
+ throw new WorkflowRunError(runId, `Parent step at index ${stepRun.stepIndex} is not a parallel step`);
94
+ }
95
+ const branch = parentStep.branches[stepRun.branchIndex];
96
+ if (!branch)
97
+ throw new WorkflowRunError(runId, `Branch ${stepRun.branchIndex} not found`);
98
+ // Find which step within the branch this is
99
+ const allBranchSteps = await this.runManager.getBranchStepRuns(stepRun.parentStepRunId);
100
+ const branchSteps = allBranchSteps.filter((s) => s.branchIndex === stepRun.branchIndex);
101
+ const branchStepIdx = branchSteps.findIndex((s) => s.id === stepRunId);
102
+ const branchStep = branch[branchStepIdx];
103
+ if (!branchStep)
104
+ throw new WorkflowRunError(runId, `Branch step definition not found`);
105
+ const trigger = await this.matcher.getTrigger(run.triggerId);
106
+ if (!trigger)
107
+ throw new WorkflowRunError(runId, 'Trigger not found');
108
+ try {
109
+ const ctx = this.buildContext(run, stepRun, trigger, snapshot, emitDepth);
110
+ if (branchStep.type === 'action') {
111
+ const registered = this.registry.getAction(branchStep.name);
112
+ if (!registered)
113
+ throw new UnregisteredActionError(branchStep.name, runId, stepRun.stepIndex);
114
+ if (run.isReplay && !registered.options.replaySafe) {
115
+ await this.runManager.updateStepStatus(stepRunId, 'skipped', { skippedReason: 'not replay-safe' });
116
+ }
117
+ else {
118
+ const handlerPromise = registered.handler(ctx);
119
+ const result = branchStep.timeoutMs
120
+ ? await this.withTimeout(handlerPromise, branchStep.timeoutMs, branchStep.name)
121
+ : await handlerPromise;
122
+ if (!result.success) {
123
+ throw new Error(result.error ?? `Action "${branchStep.name}" failed`);
124
+ }
125
+ await this.runManager.updateStepStatus(stepRunId, 'completed', result.data);
126
+ if (result.data) {
127
+ const updatedContext = { ...run.context, [branchStep.name]: result.data };
128
+ await this.runManager.updateContext(run.id, updatedContext);
129
+ }
130
+ }
131
+ }
132
+ else if (branchStep.type === 'condition') {
133
+ const registered = this.registry.getCondition(branchStep.name);
134
+ if (!registered)
135
+ throw new UnregisteredConditionError(branchStep.name, runId, stepRun.stepIndex);
136
+ const passed = branchStep.timeoutMs
137
+ ? await this.withTimeout(registered.handler(ctx), branchStep.timeoutMs, branchStep.name)
138
+ : await registered.handler(ctx);
139
+ await this.runManager.updateStepStatus(stepRunId, 'completed', { passed });
140
+ }
141
+ else if (branchStep.type === 'delay') {
142
+ await this.runManager.updateStepStatus(stepRunId, 'completed');
143
+ }
144
+ // Schedule next step in branch if any
145
+ const nextBranchStep = await this.scheduler.scheduleNextBranchStep(run, branch, stepRun.branchIndex, stepRun.parentStepRunId, branchStepIdx, stepRun.stepIndex);
146
+ if (nextBranchStep) {
147
+ const nextDef = branch[branchStepIdx + 1];
148
+ const delay = nextDef?.type === 'delay' && nextDef.delayMs ? nextDef.delayMs : undefined;
149
+ await this.queueManager.enqueueStep(nextBranchStep.id, runId, delay, emitDepth, nextDef?.retryPolicy);
150
+ }
151
+ else {
152
+ // Branch complete — check if all branches done
153
+ await this.checkParallelCompletion(run, stepRun.parentStepRunId, snapshot, stepRun.stepIndex, emitDepth);
154
+ }
155
+ }
156
+ catch (error) {
157
+ const message = error instanceof Error ? error.message : String(error);
158
+ if (!isLastAttempt) {
159
+ await this.logStore.write(runId, run.tenantId, 'warn', `Branch step failed (will retry): ${message}`, undefined, stepRunId);
160
+ throw error;
161
+ }
162
+ await this.runManager.updateStepStatus(stepRunId, 'failed', undefined, message);
163
+ // Mark parent parallel step as failed too
164
+ await this.runManager.updateStepStatus(stepRun.parentStepRunId, 'failed', undefined, `Branch ${stepRun.branchIndex} failed: ${message}`);
165
+ // Cancel any pending sibling branch steps
166
+ await this.cancelPendingBranchSteps(stepRun.parentStepRunId, stepRunId);
167
+ await this.runManager.updateStatus(runId, 'failed', undefined, 'running');
168
+ await this.logStore.write(runId, run.tenantId, 'error', `Branch step failed: ${message}`, undefined, stepRunId);
169
+ this.fireRunComplete(run, 'failed');
170
+ }
171
+ }
172
+ async checkParallelCompletion(run, parentStepRunId, snapshot, parentStepIndex, emitDepth) {
173
+ const allBranchSteps = await this.runManager.getBranchStepRuns(parentStepRunId);
174
+ const parentStep = snapshot.steps[parentStepIndex];
175
+ if (!parentStep || !parentStep.branches)
176
+ return;
177
+ // Check if every branch has completed its last step
178
+ for (let branchIdx = 0; branchIdx < parentStep.branches.length; branchIdx++) {
179
+ const branch = parentStep.branches[branchIdx];
180
+ const branchSteps = allBranchSteps.filter((s) => s.branchIndex === branchIdx);
181
+ // Branch isn't done if it has fewer completed steps than branch length
182
+ if (branchSteps.length < branch.length)
183
+ return;
184
+ const lastStep = branchSteps[branchSteps.length - 1];
185
+ if (lastStep.status !== 'completed' && lastStep.status !== 'skipped')
186
+ return;
187
+ }
188
+ // All branches complete — mark parallel step as completed
189
+ await this.runManager.updateStepStatus(parentStepRunId, 'completed');
190
+ // Schedule next top-level step
191
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, parentStepIndex);
192
+ if (hasNext) {
193
+ const steps = await this.runManager.getStepRuns(run.id);
194
+ const nextStep = steps.find((s) => (s.status === 'scheduled' || s.status === 'pending') && s.branchIndex === undefined);
195
+ if (nextStep) {
196
+ const step = snapshot.steps[nextStep.stepIndex];
197
+ const delay = step?.type === 'delay' && step.delayMs ? step.delayMs : undefined;
198
+ await this.queueManager.enqueueStep(nextStep.id, run.id, delay, emitDepth, step?.retryPolicy);
199
+ }
200
+ }
201
+ else {
202
+ this.fireRunComplete(run, 'completed');
203
+ }
204
+ }
205
+ async executeDelay(stepRunId, run, snapshot, stepIndex) {
206
+ await this.runManager.updateStepStatus(stepRunId, 'completed');
207
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, stepIndex);
208
+ if (!hasNext)
209
+ this.fireRunComplete(run, 'completed');
210
+ }
211
+ async executeCondition(step, ctx, stepRunId, run, snapshot, stepIndex) {
212
+ const registered = this.registry.getCondition(step.name);
213
+ if (!registered)
214
+ throw new UnregisteredConditionError(step.name, run.id, stepIndex);
215
+ const handlerPromise = registered.handler(ctx);
216
+ const passed = step.timeoutMs
217
+ ? await this.withTimeout(handlerPromise, step.timeoutMs, step.name)
218
+ : await handlerPromise;
219
+ await this.logStore.write(run.id, run.tenantId, 'info', `Condition "${step.name}" evaluated: ${passed}`, { passed }, stepRunId);
220
+ await this.runManager.updateStepStatus(stepRunId, 'completed', { passed });
221
+ if (passed) {
222
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, stepIndex);
223
+ if (!hasNext)
224
+ this.fireRunComplete(run, 'completed');
225
+ }
226
+ else {
227
+ const onFalse = step.onFalse ?? 'complete';
228
+ if (onFalse === 'complete') {
229
+ await this.runManager.updateStatus(run.id, 'completed', undefined, 'running');
230
+ this.fireRunComplete(run, 'completed');
231
+ }
232
+ else {
233
+ const skipCount = onFalse === 'skip' ? 1 : onFalse;
234
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, stepIndex, skipCount);
235
+ if (!hasNext)
236
+ this.fireRunComplete(run, 'completed');
237
+ }
238
+ }
239
+ }
240
+ async executeAction(name, ctx, stepRunId, run, snapshot, stepIndex) {
241
+ const registered = this.registry.getAction(name);
242
+ if (!registered)
243
+ throw new UnregisteredActionError(name, run.id, stepIndex);
244
+ if (run.isReplay && !registered.options.replaySafe) {
245
+ await this.logStore.write(run.id, run.tenantId, 'info', `Action "${name}" skipped (not replay-safe)`, undefined, stepRunId);
246
+ await this.runManager.updateStepStatus(stepRunId, 'skipped', { skippedReason: 'not replay-safe' });
247
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, stepIndex);
248
+ if (!hasNext)
249
+ this.fireRunComplete(run, 'completed');
250
+ return;
251
+ }
252
+ const step = snapshot.steps[stepIndex];
253
+ const handlerPromise = registered.handler(ctx);
254
+ const result = step?.timeoutMs
255
+ ? await this.withTimeout(handlerPromise, step.timeoutMs, name)
256
+ : await handlerPromise;
257
+ await this.logStore.write(run.id, run.tenantId, result.success ? 'info' : 'error', `Action "${name}" ${result.success ? 'completed' : 'failed'}`, result.data, stepRunId);
258
+ if (result.success) {
259
+ await this.runManager.updateStepStatus(stepRunId, 'completed', result.data);
260
+ // Accumulate action result into run context
261
+ if (result.data) {
262
+ const updatedContext = { ...run.context, [name]: result.data };
263
+ await this.runManager.updateContext(run.id, updatedContext);
264
+ }
265
+ const hasNext = await this.scheduler.scheduleNextStep(run, snapshot, stepIndex);
266
+ if (!hasNext)
267
+ this.fireRunComplete(run, 'completed');
268
+ }
269
+ else {
270
+ await this.runManager.updateStepStatus(stepRunId, 'failed', result.data, result.error);
271
+ await this.runManager.updateStatus(run.id, 'failed', undefined, 'running');
272
+ this.fireRunComplete(run, 'failed');
273
+ }
274
+ }
275
+ async executeParallel(step, stepRunId, run, _snapshot, stepIndex, emitDepth) {
276
+ if (!step.branches || step.branches.length === 0) {
277
+ await this.runManager.updateStepStatus(stepRunId, 'completed');
278
+ return;
279
+ }
280
+ await this.logStore.write(run.id, run.tenantId, 'info', `Parallel step "${step.name}" starting ${step.branches.length} branches`, undefined, stepRunId);
281
+ // Schedule first step of each branch
282
+ const branchStepRuns = await this.scheduler.scheduleParallelBranches(run, stepRunId, step.branches, stepIndex);
283
+ // Enqueue all branch first-steps concurrently
284
+ for (const branchStepRun of branchStepRuns) {
285
+ const branchIdx = branchStepRun.branchIndex;
286
+ const branchDef = step.branches[branchIdx][0];
287
+ const delay = branchDef?.type === 'delay' && branchDef.delayMs ? branchDef.delayMs : undefined;
288
+ await this.queueManager.enqueueStep(branchStepRun.id, run.id, delay, emitDepth, branchDef?.retryPolicy);
289
+ }
290
+ }
291
+ /**
292
+ * Cancel any pending/scheduled sibling branch steps when a branch fails.
293
+ */
294
+ async cancelPendingBranchSteps(parentStepRunId, excludeStepRunId) {
295
+ const allBranchSteps = await this.runManager.getBranchStepRuns(parentStepRunId);
296
+ for (const step of allBranchSteps) {
297
+ if (step.id !== excludeStepRunId && (step.status === 'pending' || step.status === 'scheduled')) {
298
+ await this.runManager.updateStepStatus(step.id, 'skipped', { skippedReason: 'sibling branch failed' });
299
+ }
300
+ }
301
+ }
302
+ withTimeout(promise, timeoutMs, stepName) {
303
+ return Promise.race([
304
+ promise,
305
+ new Promise((_, reject) => setTimeout(() => reject(new Error(`Step "${stepName}" timed out after ${timeoutMs}ms`)), timeoutMs)),
306
+ ]);
307
+ }
308
+ buildContext(run, stepRun, trigger, snapshot, emitDepth) {
309
+ return Object.freeze({
310
+ tenantId: run.tenantId,
311
+ trigger: Object.freeze({ ...trigger }),
312
+ run: Object.freeze({ ...run }),
313
+ step: Object.freeze({ ...stepRun }),
314
+ config: Object.freeze({ ...snapshot.config }),
315
+ isReplay: run.isReplay,
316
+ emit: (input) => this.emitFn(input, emitDepth + 1),
317
+ log: (message, data) => {
318
+ void this.logStore.write(run.id, run.tenantId, 'info', message, data, stepRun.id);
319
+ },
320
+ });
321
+ }
322
+ fireStepComplete(run, step) {
323
+ if (this.hooks.onStepComplete) {
324
+ void Promise.resolve(this.hooks.onStepComplete({ run, step })).catch(() => { });
325
+ }
326
+ }
327
+ fireRunComplete(run, status) {
328
+ if (this.hooks.onRunComplete) {
329
+ void Promise.resolve(this.hooks.onRunComplete({ run, status })).catch(() => { });
330
+ }
331
+ }
332
+ }
333
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,mBAAmB,CAAA;AAS1B,MAAM,OAAO,QAAQ;IAIT;IACA;IACA;IACA;IACA;IACA;IACA;IATF,KAAK,CAAe;IAE5B,YACU,QAAkB,EAClB,UAAsB,EACtB,SAAoB,EACpB,QAAkB,EAClB,OAAgB,EAChB,MAAsB,EACtB,YAA0B,EAClC,QAAuB,EAAE;QAPjB,aAAQ,GAAR,QAAQ,CAAU;QAClB,eAAU,GAAV,UAAU,CAAY;QACtB,cAAS,GAAT,SAAS,CAAW;QACpB,aAAQ,GAAR,QAAQ,CAAU;QAClB,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,iBAAY,GAAZ,YAAY,CAAc;QAGlC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,SAAiB,EAAE,KAAa,EAAE,YAAoB,CAAC,EAAE,gBAAyB,IAAI;QACtG,MAAM,GAAG,GAA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,KAAK,CAAC,cAAc,EAAE,CAAC;YAC9B,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QAChF,CAAC;IACH,CAAC;IAEO,eAAe,CAAC,GAAgB,EAAE,MAA2C;QACnF,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;YAC7B,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QACjF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ import type { EngineConfig, EngineInstance } from './types.js';
2
+ export declare function createEngine(config: EngineConfig): EngineInstance;
3
+ export type { EngineConfig, EngineInstance, TriggerInput, TriggerEnvelope, TriggerRegistration, WorkflowDefinition, WorkflowStep, WorkflowRun, WorkflowStepRun, WorkflowContext, WorkflowStatus, StepStatus, StepType, ActionHandler, ActionResult, ConditionHandler, ActionOptions, ReplayOptions, ExecutionLog, RetryPolicy, DefinitionSnapshot, LifecycleHook, StepCompleteEvent, RunCompleteEvent, RunTimelineEntry, } from './types.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EAYf,MAAM,YAAY,CAAA;AAgBnB,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAyQjE;AAGD,YAAY,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,eAAe,EACf,cAAc,EACd,UAAU,EACV,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,YAAY,CAAA"}