openworkflow 0.3.0 → 0.4.1

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 (131) hide show
  1. package/README.md +54 -18
  2. package/dist/backend-sqlite/backend.d.ts +38 -0
  3. package/dist/backend-sqlite/backend.d.ts.map +1 -0
  4. package/dist/backend-sqlite/backend.js +628 -0
  5. package/dist/backend-sqlite/backend.js.map +1 -0
  6. package/dist/backend-sqlite/index.d.ts +2 -0
  7. package/dist/backend-sqlite/index.d.ts.map +1 -0
  8. package/dist/backend-sqlite/index.js +2 -0
  9. package/dist/backend-sqlite/index.js.map +1 -0
  10. package/dist/backend-sqlite/sqlite.d.ts +45 -0
  11. package/dist/backend-sqlite/sqlite.d.ts.map +1 -0
  12. package/dist/backend-sqlite/sqlite.js +229 -0
  13. package/dist/backend-sqlite/sqlite.js.map +1 -0
  14. package/dist/config/config.d.ts +102 -0
  15. package/dist/config/config.d.ts.map +1 -0
  16. package/dist/config/config.js +29 -0
  17. package/dist/config/config.js.map +1 -0
  18. package/dist/config/index.d.ts +3 -0
  19. package/dist/config/index.d.ts.map +1 -0
  20. package/dist/config/index.js +2 -0
  21. package/dist/config/index.js.map +1 -0
  22. package/dist/config.d.ts +28 -0
  23. package/dist/config.d.ts.map +1 -0
  24. package/dist/config.js +41 -0
  25. package/dist/config.js.map +1 -0
  26. package/dist/core/backend-test-suite.d.ts +22 -0
  27. package/dist/core/backend-test-suite.d.ts.map +1 -0
  28. package/dist/core/backend-test-suite.js +960 -0
  29. package/dist/core/backend-test-suite.js.map +1 -0
  30. package/dist/core/backend.d.ts +103 -0
  31. package/dist/core/backend.d.ts.map +1 -0
  32. package/dist/core/backend.js +2 -0
  33. package/dist/core/backend.js.map +1 -0
  34. package/dist/core/backend.testsuite.d.ts +21 -0
  35. package/dist/core/backend.testsuite.d.ts.map +1 -0
  36. package/dist/core/backend.testsuite.js +958 -0
  37. package/dist/core/backend.testsuite.js.map +1 -0
  38. package/dist/{duration.d.ts → core/duration.d.ts} +2 -1
  39. package/dist/core/duration.d.ts.map +1 -0
  40. package/dist/{duration.js → core/duration.js} +6 -5
  41. package/dist/core/duration.js.map +1 -0
  42. package/dist/core/duration.test.d.ts +2 -0
  43. package/dist/core/duration.test.d.ts.map +1 -0
  44. package/dist/core/duration.test.js +264 -0
  45. package/dist/core/duration.test.js.map +1 -0
  46. package/dist/core/json.d.ts +5 -0
  47. package/dist/core/json.d.ts.map +1 -0
  48. package/dist/core/json.js +2 -0
  49. package/dist/core/json.js.map +1 -0
  50. package/dist/core/result.d.ts +12 -0
  51. package/dist/core/result.d.ts.map +1 -0
  52. package/dist/core/result.js +7 -0
  53. package/dist/core/result.js.map +1 -0
  54. package/dist/core/result.test.d.ts +2 -0
  55. package/dist/core/result.test.d.ts.map +1 -0
  56. package/dist/core/result.test.js +11 -0
  57. package/dist/core/result.test.js.map +1 -0
  58. package/dist/core/retry.d.ts +16 -0
  59. package/dist/core/retry.d.ts.map +1 -0
  60. package/dist/{backend.js → core/retry.js} +1 -3
  61. package/dist/core/retry.js.map +1 -0
  62. package/dist/core/retry.test.d.ts +2 -0
  63. package/dist/core/retry.test.d.ts.map +1 -0
  64. package/dist/core/retry.test.js +36 -0
  65. package/dist/core/retry.test.js.map +1 -0
  66. package/dist/core/schema.d.ts +57 -0
  67. package/dist/core/schema.d.ts.map +1 -0
  68. package/dist/core/schema.js +2 -0
  69. package/dist/core/schema.js.map +1 -0
  70. package/dist/core/step.d.ts +120 -0
  71. package/dist/core/step.d.ts.map +1 -0
  72. package/dist/core/step.js +101 -0
  73. package/dist/core/step.js.map +1 -0
  74. package/dist/core/step.test.d.ts +2 -0
  75. package/dist/core/step.test.d.ts.map +1 -0
  76. package/dist/core/step.test.js +340 -0
  77. package/dist/core/step.test.js.map +1 -0
  78. package/dist/core/workflow.d.ts +108 -0
  79. package/dist/core/workflow.d.ts.map +1 -0
  80. package/dist/core/workflow.js +79 -0
  81. package/dist/core/workflow.js.map +1 -0
  82. package/dist/core/workflow.test.d.ts +2 -0
  83. package/dist/core/workflow.test.d.ts.map +1 -0
  84. package/dist/core/workflow.test.js +216 -0
  85. package/dist/core/workflow.test.js.map +1 -0
  86. package/dist/execution/execution.d.ts +91 -0
  87. package/dist/execution/execution.d.ts.map +1 -0
  88. package/dist/execution/execution.js +188 -0
  89. package/dist/execution/execution.js.map +1 -0
  90. package/dist/execution/execution.test.d.ts +2 -0
  91. package/dist/execution/execution.test.d.ts.map +1 -0
  92. package/dist/execution/execution.test.js +382 -0
  93. package/dist/execution/execution.test.js.map +1 -0
  94. package/dist/global.d.ts +62 -0
  95. package/dist/global.d.ts.map +1 -0
  96. package/dist/global.js +78 -0
  97. package/dist/global.js.map +1 -0
  98. package/dist/index.d.ts +9 -5
  99. package/dist/index.d.ts.map +1 -1
  100. package/dist/index.js +4 -3
  101. package/dist/index.js.map +1 -1
  102. package/dist/sdk/sdk.d.ts +182 -0
  103. package/dist/sdk/sdk.d.ts.map +1 -0
  104. package/dist/sdk/sdk.js +208 -0
  105. package/dist/sdk/sdk.js.map +1 -0
  106. package/dist/sdk/sdk.test.d.ts +2 -0
  107. package/dist/sdk/sdk.test.d.ts.map +1 -0
  108. package/dist/sdk/sdk.test.js +195 -0
  109. package/dist/sdk/sdk.test.js.map +1 -0
  110. package/dist/tsconfig.tsbuildinfo +1 -1
  111. package/dist/{worker.d.ts → worker/worker.d.ts} +4 -4
  112. package/dist/worker/worker.d.ts.map +1 -0
  113. package/dist/worker/worker.js +208 -0
  114. package/dist/worker/worker.js.map +1 -0
  115. package/dist/worker/worker.test.d.ts +2 -0
  116. package/dist/worker/worker.test.d.ts.map +1 -0
  117. package/dist/worker/worker.test.js +786 -0
  118. package/dist/worker/worker.test.js.map +1 -0
  119. package/package.json +9 -3
  120. package/dist/backend.d.ts +0 -159
  121. package/dist/backend.d.ts.map +0 -1
  122. package/dist/backend.js.map +0 -1
  123. package/dist/client.d.ts +0 -141
  124. package/dist/client.d.ts.map +0 -1
  125. package/dist/client.js +0 -135
  126. package/dist/client.js.map +0 -1
  127. package/dist/duration.d.ts.map +0 -1
  128. package/dist/duration.js.map +0 -1
  129. package/dist/worker.d.ts.map +0 -1
  130. package/dist/worker.js +0 -375
  131. package/dist/worker.js.map +0 -1
@@ -0,0 +1,208 @@
1
+ import { executeWorkflow } from "../execution/execution.js";
2
+ import { getWorkflowKey } from "../sdk/sdk.js";
3
+ import { randomUUID } from "node:crypto";
4
+ const DEFAULT_LEASE_DURATION_MS = 30 * 1000; // 30s
5
+ const DEFAULT_POLL_INTERVAL_MS = 100; // 100ms
6
+ const DEFAULT_CONCURRENCY = 1;
7
+ /**
8
+ * Runs workflows by polling the backend, dispatching runs across a concurrency
9
+ * pool, and heartbeating/extending leases.
10
+ */
11
+ export class Worker {
12
+ backend;
13
+ workerIds;
14
+ registeredWorkflows = new Map();
15
+ activeExecutions = new Set();
16
+ running = false;
17
+ loopPromise = null;
18
+ constructor(options) {
19
+ this.backend = options.backend;
20
+ const concurrency = Math.max(DEFAULT_CONCURRENCY, options.concurrency ?? DEFAULT_CONCURRENCY);
21
+ // generate worker IDs for every concurrency slot
22
+ this.workerIds = Array.from({ length: concurrency }, () => randomUUID());
23
+ // register workflows
24
+ for (const [name, workflow] of options.workflows) {
25
+ this.registeredWorkflows.set(name, workflow);
26
+ }
27
+ }
28
+ /**
29
+ * Start the worker. It will begin polling for and executing workflows.
30
+ */
31
+ async start() {
32
+ if (this.running)
33
+ return;
34
+ this.running = true;
35
+ this.loopPromise = this.runLoop();
36
+ await Promise.resolve();
37
+ }
38
+ /**
39
+ * Stop the worker gracefully. Waits for all active workflow runs to complete
40
+ * before returning.
41
+ */
42
+ async stop() {
43
+ this.running = false;
44
+ // wait for the poll loop to stop
45
+ if (this.loopPromise)
46
+ await this.loopPromise;
47
+ // wait for all active executions to finish
48
+ while (this.activeExecutions.size > 0)
49
+ await sleep(100);
50
+ }
51
+ /**
52
+ * Processes one round of work claims and execution. Exposed for testing.
53
+ * Returns the number of workflow runs claimed.
54
+ */
55
+ async tick() {
56
+ const availableSlots = this.concurrency - this.activeExecutions.size;
57
+ if (availableSlots <= 0)
58
+ return 0;
59
+ // claim work for each available slot
60
+ const claims = Array.from({ length: availableSlots }, (_, i) => {
61
+ const availableWorkerId = this.workerIds[i % this.workerIds.length];
62
+ return availableWorkerId
63
+ ? this.claimAndProcessWorkflowRunInBackground(availableWorkerId)
64
+ : Promise.resolve(null);
65
+ });
66
+ const claimed = await Promise.all(claims);
67
+ return claimed.filter((run) => run !== null).length;
68
+ }
69
+ /**
70
+ * Get the configured concurrency limit.
71
+ */
72
+ get concurrency() {
73
+ return this.workerIds.length;
74
+ }
75
+ /*
76
+ * Main run loop that continuously ticks while the worker is running.
77
+ * Only sleeps when no work was claimed to avoid busy-waiting.
78
+ */
79
+ async runLoop() {
80
+ while (this.running) {
81
+ try {
82
+ const claimedCount = await this.tick();
83
+ // only sleep if we didn't claim any work
84
+ if (claimedCount === 0) {
85
+ await sleep(DEFAULT_POLL_INTERVAL_MS);
86
+ }
87
+ }
88
+ catch (error) {
89
+ console.error("Worker tick failed:", error);
90
+ await sleep(DEFAULT_POLL_INTERVAL_MS);
91
+ }
92
+ }
93
+ }
94
+ /*
95
+ * Cclaim and process a workflow run for the given worker ID. Do not await the
96
+ * processing here to avoid blocking the caller.
97
+ * Returns the claimed workflow run, or null if none was available.
98
+ */
99
+ async claimAndProcessWorkflowRunInBackground(workerId) {
100
+ // claim workflow run
101
+ const workflowRun = await this.backend.claimWorkflowRun({
102
+ workerId,
103
+ leaseDurationMs: DEFAULT_LEASE_DURATION_MS,
104
+ });
105
+ if (!workflowRun)
106
+ return null;
107
+ const key = getWorkflowKey(workflowRun.workflowName, workflowRun.version);
108
+ const workflow = this.registeredWorkflows.get(key);
109
+ if (!workflow) {
110
+ const versionStr = workflowRun.version
111
+ ? ` (version: ${workflowRun.version})`
112
+ : "";
113
+ await this.backend.failWorkflowRun({
114
+ workflowRunId: workflowRun.id,
115
+ workerId,
116
+ error: {
117
+ message: `Workflow "${workflowRun.workflowName}"${versionStr} is not registered`,
118
+ },
119
+ });
120
+ return null;
121
+ }
122
+ // create execution and start processing *async* w/o blocking
123
+ const execution = new WorkflowExecution({
124
+ backend: this.backend,
125
+ workflowRun,
126
+ workerId,
127
+ });
128
+ this.activeExecutions.add(execution);
129
+ this.processExecutionInBackground(execution, workflow)
130
+ .catch(() => {
131
+ // errors are already handled in processExecution
132
+ })
133
+ .finally(() => {
134
+ execution.stopHeartbeat();
135
+ this.activeExecutions.delete(execution);
136
+ });
137
+ return workflowRun;
138
+ }
139
+ /**
140
+ * Process a workflow execution, handling heartbeats, step execution, and
141
+ * marking success or failure.
142
+ */
143
+ async processExecutionInBackground(execution, workflow) {
144
+ // start heartbeating
145
+ execution.startHeartbeat();
146
+ try {
147
+ await executeWorkflow({
148
+ backend: this.backend,
149
+ workflowRun: execution.workflowRun,
150
+ workflowFn: workflow.fn,
151
+ workflowVersion: execution.workflowRun.version,
152
+ workerId: execution.workerId,
153
+ });
154
+ }
155
+ catch (error) {
156
+ // specifically for unexpected errors in the execution wrapper itself, not
157
+ // for business logic errors (those are handled inside executeWorkflow)
158
+ console.error(`Critical error during workflow execution for run ${execution.workflowRun.id}:`, error);
159
+ }
160
+ }
161
+ }
162
+ /**
163
+ * Tracks a claimed workflow run and maintains its heartbeat lease for the
164
+ * worker.
165
+ */
166
+ class WorkflowExecution {
167
+ backend;
168
+ workflowRun;
169
+ workerId;
170
+ heartbeatTimer = null;
171
+ constructor(options) {
172
+ this.backend = options.backend;
173
+ this.workflowRun = options.workflowRun;
174
+ this.workerId = options.workerId;
175
+ }
176
+ /**
177
+ * Start the heartbeat loop for this execution, heartbeating at half the lease
178
+ * duration.
179
+ */
180
+ startHeartbeat() {
181
+ const leaseDurationMs = DEFAULT_LEASE_DURATION_MS;
182
+ const heartbeatIntervalMs = leaseDurationMs / 2;
183
+ this.heartbeatTimer = setInterval(() => {
184
+ this.backend
185
+ .extendWorkflowRunLease({
186
+ workflowRunId: this.workflowRun.id,
187
+ workerId: this.workerId,
188
+ leaseDurationMs,
189
+ })
190
+ .catch((error) => {
191
+ console.error("Heartbeat failed:", error);
192
+ });
193
+ }, heartbeatIntervalMs);
194
+ }
195
+ /**
196
+ * Stop the heartbeat loop.
197
+ */
198
+ stopHeartbeat() {
199
+ if (this.heartbeatTimer) {
200
+ clearInterval(this.heartbeatTimer);
201
+ this.heartbeatTimer = null;
202
+ }
203
+ }
204
+ }
205
+ function sleep(ms) {
206
+ return new Promise((resolve) => setTimeout(resolve, ms));
207
+ }
208
+ //# sourceMappingURL=worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.js","sourceRoot":"","sources":["../../worker/worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,yBAAyB,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM;AACnD,MAAM,wBAAwB,GAAG,GAAG,CAAC,CAAC,QAAQ;AAC9C,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAY9B;;;GAGG;AACH,MAAM,OAAO,MAAM;IACA,OAAO,CAAU;IACjB,SAAS,CAAW;IACpB,mBAAmB,GAAG,IAAI,GAAG,EAG3C,CAAC;IACa,gBAAgB,GAAG,IAAI,GAAG,EAAqB,CAAC;IACzD,OAAO,GAAG,KAAK,CAAC;IAChB,WAAW,GAAyB,IAAI,CAAC;IAEjD,YAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAE/B,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAC1B,mBAAmB,EACnB,OAAO,CAAC,WAAW,IAAI,mBAAmB,CAC3C,CAAC;QAEF,iDAAiD;QACjD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IA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AAa,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7B,CAAC;IACH,CAAC;CACF;AAED,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.test.d.ts","sourceRoot":"","sources":["../../worker/worker.test.ts"],"names":[],"mappings":""}