@multiplier-labs/stepflow 0.3.4 → 0.3.6

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 (99) hide show
  1. package/README.md +9 -0
  2. package/dist/{chunk-U3PCVK6O.js → chunk-D5HW7VEG.js} +4 -2
  3. package/dist/chunk-D5HW7VEG.js.map +1 -0
  4. package/dist/{chunk-5XJBAPXF.js → chunk-JUPZEBR3.js} +3 -1
  5. package/dist/{chunk-5XJBAPXF.js.map → chunk-JUPZEBR3.js.map} +1 -1
  6. package/dist/events/index.d.ts +2 -0
  7. package/dist/events/index.js +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/storage/index.js +1 -1
  10. package/package.json +23 -12
  11. package/.codekin/reports/code-review/2026-04-11_code-review-daily.md +0 -146
  12. package/.codekin/reports/code-review/2026-04-13_code-review-daily.md +0 -74
  13. package/.codekin/reports/comments/2026-04-04_comment-assessment.md +0 -179
  14. package/.codekin/reports/comments/2026-04-11_comment-assessment.md +0 -161
  15. package/.codekin/reports/comments/2026-04-14_comment-assessment.md +0 -34
  16. package/.codekin/reports/complexity/2026-04-03_complexity-report.md +0 -152
  17. package/.codekin/reports/complexity/2026-04-11_complexity-report.md +0 -152
  18. package/.codekin/reports/complexity/2026-04-14_complexity-report.md +0 -34
  19. package/.codekin/reports/dependencies/2026-04-04_dependency-health.md +0 -94
  20. package/.codekin/reports/dependencies/2026-04-11_dependency-health.md +0 -93
  21. package/.codekin/reports/docs-audit/2026-04-04_docs-audit.md +0 -10
  22. package/.codekin/reports/docs-audit/2026-04-11_docs-audit.md +0 -138
  23. package/.codekin/reports/docs-audit/2026-04-13_docs-audit.md +0 -121
  24. package/.codekin/reports/security/2026-04-03_security-audit.md +0 -208
  25. package/.codekin/reports/security/2026-04-11_security-audit.md +0 -297
  26. package/.github/CODEOWNERS +0 -15
  27. package/.github/dependabot.yml +0 -23
  28. package/.github/workflows/ci.yml +0 -38
  29. package/.github/workflows/publish.yml +0 -42
  30. package/.github/workflows/security.yml +0 -29
  31. package/CHANGELOG.md +0 -34
  32. package/SECURITY.md +0 -40
  33. package/dist/chunk-U3PCVK6O.js.map +0 -1
  34. package/docs/github-packages-setup.md +0 -97
  35. package/docs/stepflow-api-reference.md +0 -1663
  36. package/src/core/engine/concurrency.ts +0 -229
  37. package/src/core/engine/lifecycle.ts +0 -176
  38. package/src/core/engine.test.ts +0 -1435
  39. package/src/core/engine.ts +0 -598
  40. package/src/core/index.ts +0 -7
  41. package/src/core/orchestrator/persistence.ts +0 -165
  42. package/src/core/orchestrator/plan-resolution.ts +0 -140
  43. package/src/core/orchestrator/state-transitions.ts +0 -109
  44. package/src/core/orchestrator/step-runner.ts +0 -427
  45. package/src/core/orchestrator.ts +0 -252
  46. package/src/core/types.ts +0 -220
  47. package/src/events/index.ts +0 -8
  48. package/src/events/memory.test.ts +0 -107
  49. package/src/events/memory.ts +0 -92
  50. package/src/events/socketio.test.ts +0 -378
  51. package/src/events/socketio.ts +0 -262
  52. package/src/events/types.ts +0 -118
  53. package/src/events/webhook.test.ts +0 -949
  54. package/src/events/webhook.ts +0 -807
  55. package/src/index.ts +0 -270
  56. package/src/planning/evaluate-condition.test.ts +0 -153
  57. package/src/planning/evaluate-condition.ts +0 -105
  58. package/src/planning/index.ts +0 -55
  59. package/src/planning/planner.ts +0 -494
  60. package/src/planning/planning.test.ts +0 -727
  61. package/src/planning/registry.test.ts +0 -398
  62. package/src/planning/registry.ts +0 -283
  63. package/src/planning/types.ts +0 -566
  64. package/src/scheduler/cron.test.ts +0 -479
  65. package/src/scheduler/cron.ts +0 -438
  66. package/src/scheduler/index.ts +0 -8
  67. package/src/scheduler/postgres-persistence.ts +0 -530
  68. package/src/scheduler/sqlite-persistence.test.ts +0 -235
  69. package/src/scheduler/sqlite-persistence.ts +0 -286
  70. package/src/scheduler/types.ts +0 -73
  71. package/src/storage/index.ts +0 -27
  72. package/src/storage/memory.test.ts +0 -349
  73. package/src/storage/memory.ts +0 -227
  74. package/src/storage/postgres-core.ts +0 -550
  75. package/src/storage/postgres-migration.test.ts +0 -69
  76. package/src/storage/postgres-transaction-pagination.test.ts +0 -107
  77. package/src/storage/postgres.ts +0 -835
  78. package/src/storage/sqlite-core.ts +0 -151
  79. package/src/storage/sqlite.test.ts +0 -642
  80. package/src/storage/sqlite.ts +0 -717
  81. package/src/storage/types.ts +0 -343
  82. package/src/utils/errors.test.ts +0 -150
  83. package/src/utils/errors.ts +0 -161
  84. package/src/utils/id.ts +0 -21
  85. package/src/utils/index.ts +0 -10
  86. package/src/utils/logger.test.ts +0 -121
  87. package/src/utils/logger.ts +0 -96
  88. package/src/utils/pinned-fetch.test.ts +0 -84
  89. package/src/utils/pinned-fetch.ts +0 -118
  90. package/src/utils/postgres-deps.ts +0 -79
  91. package/src/utils/retry.test.ts +0 -177
  92. package/src/utils/retry.ts +0 -121
  93. package/src/utils/safe-json.test.ts +0 -166
  94. package/src/utils/safe-json.ts +0 -107
  95. package/src/utils/webhook-signature.test.ts +0 -111
  96. package/src/utils/webhook-signature.ts +0 -74
  97. package/tsconfig.json +0 -21
  98. package/tsup.config.ts +0 -14
  99. package/vitest.config.ts +0 -9
@@ -1,118 +0,0 @@
1
- /**
2
- * Event system types for the workflow engine.
3
- */
4
-
5
- import type { WorkflowKind } from '../core/types';
6
-
7
- // ============================================================================
8
- // Event Types
9
- // ============================================================================
10
-
11
- /**
12
- * Built-in event types emitted by the workflow engine.
13
- */
14
- export type BuiltInEventType =
15
- | 'run.created'
16
- | 'run.queued'
17
- | 'run.dequeued'
18
- | 'run.started'
19
- | 'run.resumed'
20
- | 'run.completed'
21
- | 'run.failed'
22
- | 'run.canceled'
23
- | 'run.timeout'
24
- | 'step.started'
25
- | 'step.completed'
26
- | 'step.failed'
27
- | 'step.skipped'
28
- | 'step.retry';
29
-
30
- /**
31
- * Event types emitted by the workflow engine.
32
- * Includes built-in types and allows custom events via string.
33
- */
34
- export type WorkflowEventType = BuiltInEventType | (string & {});
35
-
36
- // ============================================================================
37
- // Event Payload
38
- // ============================================================================
39
-
40
- /**
41
- * Workflow event payload structure.
42
- */
43
- export interface WorkflowEvent {
44
- /** Unique run identifier */
45
- runId: string;
46
-
47
- /** Workflow type */
48
- kind: WorkflowKind;
49
-
50
- /** Type of event */
51
- eventType: WorkflowEventType;
52
-
53
- /** Step key (for step-related events) */
54
- stepKey?: string;
55
-
56
- /** When the event occurred */
57
- timestamp: Date;
58
-
59
- /** Event-specific data */
60
- payload?: unknown;
61
- }
62
-
63
- // ============================================================================
64
- // Event Callback Types
65
- // ============================================================================
66
-
67
- /**
68
- * Callback function for handling workflow events.
69
- */
70
- export type EventCallback = (event: WorkflowEvent) => void;
71
-
72
- /**
73
- * Unsubscribe function returned when subscribing to events.
74
- */
75
- export type Unsubscribe = () => void;
76
-
77
- // ============================================================================
78
- // Event Transport Interface
79
- // ============================================================================
80
-
81
- /**
82
- * Event transport interface.
83
- * Implement this to customize how events are delivered.
84
- */
85
- export interface EventTransport {
86
- /**
87
- * Emit an event to all subscribers.
88
- */
89
- emit(event: WorkflowEvent): void;
90
-
91
- /**
92
- * Subscribe to events for a specific run.
93
- * @returns Unsubscribe function
94
- */
95
- subscribe(runId: string, callback: EventCallback): Unsubscribe;
96
-
97
- /**
98
- * Subscribe to all events.
99
- * @returns Unsubscribe function
100
- */
101
- subscribeAll(callback: EventCallback): Unsubscribe;
102
-
103
- /**
104
- * Optional: Filter events by type.
105
- * @returns Unsubscribe function
106
- */
107
- subscribeToType?(eventType: WorkflowEventType, callback: EventCallback): Unsubscribe;
108
-
109
- /**
110
- * Optional: Persist event for later retrieval.
111
- */
112
- persist?(event: WorkflowEvent): Promise<void>;
113
-
114
- /**
115
- * Optional: Close/cleanup the transport.
116
- */
117
- close?(): void;
118
- }