@lotiai/composer 0.2.0 → 0.2.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.
- package/dist/build-config/index.d.ts +52 -0
- package/dist/build-config/index.d.ts.map +1 -0
- package/dist/build-config/index.js +66 -0
- package/dist/build-config/index.js.map +1 -0
- package/dist/build-config/loader.d.ts +80 -0
- package/dist/build-config/loader.d.ts.map +1 -0
- package/dist/build-config/loader.js +238 -0
- package/dist/build-config/loader.js.map +1 -0
- package/dist/build-config/schema.d.ts +101 -0
- package/dist/build-config/schema.d.ts.map +1 -0
- package/dist/build-config/schema.js +94 -0
- package/dist/build-config/schema.js.map +1 -0
- package/dist/cli/commands/dev-temporal.d.ts +15 -0
- package/dist/cli/commands/dev-temporal.d.ts.map +1 -0
- package/dist/cli/commands/dev-temporal.js +68 -0
- package/dist/cli/commands/dev-temporal.js.map +1 -0
- package/dist/cli/commands/dev.d.ts +21 -0
- package/dist/cli/commands/dev.d.ts.map +1 -0
- package/dist/cli/commands/dev.js +421 -0
- package/dist/cli/commands/dev.js.map +1 -0
- package/dist/cli/commands/profiles.d.ts +15 -0
- package/dist/cli/commands/profiles.d.ts.map +1 -0
- package/dist/cli/commands/profiles.js +69 -0
- package/dist/cli/commands/profiles.js.map +1 -0
- package/dist/cli/index.d.ts +21 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +44 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/async/build/workflow-factory.d.ts +212 -0
- package/dist/internal/async/build/workflow-factory.d.ts.map +1 -0
- package/dist/internal/async/build/workflow-factory.js +533 -0
- package/dist/internal/async/build/workflow-factory.js.map +1 -0
- package/dist/internal/async/build-scripts/utils/common.d.ts +28 -0
- package/dist/internal/async/build-scripts/utils/common.d.ts.map +1 -0
- package/dist/internal/async/build-scripts/utils/common.js +50 -0
- package/dist/internal/async/build-scripts/utils/common.js.map +1 -0
- package/dist/internal/async/build-scripts/utils/import-module.d.ts +19 -0
- package/dist/internal/async/build-scripts/utils/import-module.d.ts.map +1 -0
- package/dist/internal/async/build-scripts/utils/import-module.js +80 -0
- package/dist/internal/async/build-scripts/utils/import-module.js.map +1 -0
- package/dist/internal/async/build-scripts/utils/type-guards.d.ts +123 -0
- package/dist/internal/async/build-scripts/utils/type-guards.d.ts.map +1 -0
- package/dist/internal/async/build-scripts/utils/type-guards.js +145 -0
- package/dist/internal/async/build-scripts/utils/type-guards.js.map +1 -0
- package/dist/internal/async/config/cleanup-policy.d.ts +50 -0
- package/dist/internal/async/config/cleanup-policy.d.ts.map +1 -0
- package/dist/internal/async/config/cleanup-policy.js +20 -0
- package/dist/internal/async/config/cleanup-policy.js.map +1 -0
- package/dist/internal/async/config/worker-profiles.d.ts +172 -0
- package/dist/internal/async/config/worker-profiles.d.ts.map +1 -0
- package/dist/internal/async/config/worker-profiles.js +275 -0
- package/dist/internal/async/config/worker-profiles.js.map +1 -0
- package/dist/internal/async/execute/temporal-client.d.ts +182 -0
- package/dist/internal/async/execute/temporal-client.d.ts.map +1 -0
- package/dist/internal/async/execute/temporal-client.js +190 -0
- package/dist/internal/async/execute/temporal-client.js.map +1 -0
- package/dist/internal/async/execute/workflow-execution.d.ts +98 -0
- package/dist/internal/async/execute/workflow-execution.d.ts.map +1 -0
- package/dist/internal/async/execute/workflow-execution.js +191 -0
- package/dist/internal/async/execute/workflow-execution.js.map +1 -0
- package/dist/internal/async/metrics/task-queue-metrics.d.ts +74 -0
- package/dist/internal/async/metrics/task-queue-metrics.d.ts.map +1 -0
- package/dist/internal/async/metrics/task-queue-metrics.js +155 -0
- package/dist/internal/async/metrics/task-queue-metrics.js.map +1 -0
- package/dist/internal/async/register/activity-worker.d.ts +123 -0
- package/dist/internal/async/register/activity-worker.d.ts.map +1 -0
- package/dist/internal/async/register/activity-worker.js +355 -0
- package/dist/internal/async/register/activity-worker.js.map +1 -0
- package/dist/internal/async/register/generate-workflow-source.d.ts +43 -0
- package/dist/internal/async/register/generate-workflow-source.d.ts.map +1 -0
- package/dist/internal/async/register/generate-workflow-source.js +193 -0
- package/dist/internal/async/register/generate-workflow-source.js.map +1 -0
- package/dist/internal/async/register/workflow-worker.d.ts +125 -0
- package/dist/internal/async/register/workflow-worker.d.ts.map +1 -0
- package/dist/internal/async/register/workflow-worker.js +215 -0
- package/dist/internal/async/register/workflow-worker.js.map +1 -0
- package/dist/internal/async/register-scripts/start-activity-worker.d.ts +70 -0
- package/dist/internal/async/register-scripts/start-activity-worker.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/start-activity-worker.js +75 -0
- package/dist/internal/async/register-scripts/start-activity-worker.js.map +1 -0
- package/dist/internal/async/register-scripts/start-all-workers.d.ts +81 -0
- package/dist/internal/async/register-scripts/start-all-workers.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/start-all-workers.js +84 -0
- package/dist/internal/async/register-scripts/start-all-workers.js.map +1 -0
- package/dist/internal/async/register-scripts/start-workflow-worker.d.ts +69 -0
- package/dist/internal/async/register-scripts/start-workflow-worker.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/start-workflow-worker.js +74 -0
- package/dist/internal/async/register-scripts/start-workflow-worker.js.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules-cli.d.ts +28 -0
- package/dist/internal/async/register-scripts/sync-schedules-cli.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules-cli.js +124 -0
- package/dist/internal/async/register-scripts/sync-schedules-cli.js.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.d.ts +55 -0
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.js +146 -0
- package/dist/internal/async/register-scripts/sync-schedules-via-lambda.js.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules.d.ts +68 -0
- package/dist/internal/async/register-scripts/sync-schedules.d.ts.map +1 -0
- package/dist/internal/async/register-scripts/sync-schedules.js +83 -0
- package/dist/internal/async/register-scripts/sync-schedules.js.map +1 -0
- package/dist/internal/async/schedule/constants.d.ts +10 -0
- package/dist/internal/async/schedule/constants.d.ts.map +1 -0
- package/dist/internal/async/schedule/constants.js +13 -0
- package/dist/internal/async/schedule/constants.js.map +1 -0
- package/dist/internal/async/schedule/define-schedule.d.ts +192 -0
- package/dist/internal/async/schedule/define-schedule.d.ts.map +1 -0
- package/dist/internal/async/schedule/define-schedule.js +79 -0
- package/dist/internal/async/schedule/define-schedule.js.map +1 -0
- package/dist/internal/async/schedule/index.d.ts +3 -0
- package/dist/internal/async/schedule/index.d.ts.map +1 -0
- package/dist/internal/async/schedule/index.js +9 -0
- package/dist/internal/async/schedule/index.js.map +1 -0
- package/dist/internal/async/schedule/schedule-definition-schema.d.ts +64 -0
- package/dist/internal/async/schedule/schedule-definition-schema.d.ts.map +1 -0
- package/dist/internal/async/schedule/schedule-definition-schema.js +77 -0
- package/dist/internal/async/schedule/schedule-definition-schema.js.map +1 -0
- package/dist/internal/async/schedule/sync-schedules.d.ts +71 -0
- package/dist/internal/async/schedule/sync-schedules.d.ts.map +1 -0
- package/dist/internal/async/schedule/sync-schedules.js +231 -0
- package/dist/internal/async/schedule/sync-schedules.js.map +1 -0
- package/dist/internal/async/utils/ensure-namespace.d.ts +16 -0
- package/dist/internal/async/utils/ensure-namespace.d.ts.map +1 -0
- package/dist/internal/async/utils/ensure-namespace.js +64 -0
- package/dist/internal/async/utils/ensure-namespace.js.map +1 -0
- package/dist/internal/async/utils/find-package-root.d.ts +9 -0
- package/dist/internal/async/utils/find-package-root.d.ts.map +1 -0
- package/dist/internal/async/utils/find-package-root.js +28 -0
- package/dist/internal/async/utils/find-package-root.js.map +1 -0
- package/dist/internal/async/utils/is-composer-error.d.ts +14 -0
- package/dist/internal/async/utils/is-composer-error.d.ts.map +1 -0
- package/dist/internal/async/utils/is-composer-error.js +17 -0
- package/dist/internal/async/utils/is-composer-error.js.map +1 -0
- package/dist/internal/context-provider.d.ts +316 -0
- package/dist/internal/context-provider.d.ts.map +1 -0
- package/dist/internal/context-provider.js +12 -0
- package/dist/internal/context-provider.js.map +1 -0
- package/dist/internal/create-composer.d.ts +57 -0
- package/dist/internal/create-composer.d.ts.map +1 -0
- package/dist/internal/create-composer.js +125 -0
- package/dist/internal/create-composer.js.map +1 -0
- package/dist/internal/dag-sync-fanout.d.ts +79 -0
- package/dist/internal/dag-sync-fanout.d.ts.map +1 -0
- package/dist/internal/dag-sync-fanout.js +59 -0
- package/dist/internal/dag-sync-fanout.js.map +1 -0
- package/dist/internal/dag-sync-step.d.ts +230 -0
- package/dist/internal/dag-sync-step.d.ts.map +1 -0
- package/dist/internal/dag-sync-step.js +159 -0
- package/dist/internal/dag-sync-step.js.map +1 -0
- package/dist/internal/dag-sync-workflow.d.ts +535 -0
- package/dist/internal/dag-sync-workflow.d.ts.map +1 -0
- package/dist/internal/dag-sync-workflow.js +843 -0
- package/dist/internal/dag-sync-workflow.js.map +1 -0
- package/dist/internal/defaults.d.ts +24 -0
- package/dist/internal/defaults.d.ts.map +1 -0
- package/dist/internal/defaults.js +102 -0
- package/dist/internal/defaults.js.map +1 -0
- package/dist/internal/errors.d.ts +109 -0
- package/dist/internal/errors.d.ts.map +1 -0
- package/dist/internal/errors.js +212 -0
- package/dist/internal/errors.js.map +1 -0
- package/dist/internal/index.d.ts +9 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/index.js +22 -0
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/observability.d.ts +63 -0
- package/dist/internal/observability.d.ts.map +1 -0
- package/dist/internal/observability.js +323 -0
- package/dist/internal/observability.js.map +1 -0
- package/dist/internal/types.d.ts +80 -0
- package/dist/internal/types.d.ts.map +1 -0
- package/dist/internal/types.js +9 -0
- package/dist/internal/types.js.map +1 -0
- package/dist/internal/workflow-planning.d.ts +107 -0
- package/dist/internal/workflow-planning.d.ts.map +1 -0
- package/dist/internal/workflow-planning.js +216 -0
- package/dist/internal/workflow-planning.js.map +1 -0
- package/dist/schedule-sync.d.ts +17 -0
- package/dist/schedule-sync.d.ts.map +1 -0
- package/dist/schedule-sync.js +22 -0
- package/dist/schedule-sync.js.map +1 -0
- package/dist/temporal-naming.d.ts +27 -0
- package/dist/temporal-naming.d.ts.map +1 -0
- package/dist/temporal-naming.js +33 -0
- package/dist/temporal-naming.js.map +1 -0
- package/package.json +16 -17
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow Planning Logic for DAG Execution
|
|
4
|
+
*
|
|
5
|
+
* This module extracts the topological sort and batch planning logic from the
|
|
6
|
+
* synchronous workflow engine, making it reusable for both sync and async (Temporal)
|
|
7
|
+
* execution strategies.
|
|
8
|
+
*
|
|
9
|
+
* ## Execution Model
|
|
10
|
+
*
|
|
11
|
+
* The planner performs dependency analysis to determine which steps can run in parallel:
|
|
12
|
+
*
|
|
13
|
+
* 1. **Dependency Analysis**: Build a directed acyclic graph (DAG) of step dependencies
|
|
14
|
+
* 2. **Topological Sort**: Use Kahn's algorithm to find valid execution order
|
|
15
|
+
* 3. **Batch Formation**: Group steps with no dependencies into parallel "batches"
|
|
16
|
+
* 4. **Validation**: Detect cycles, missing dependencies, and conflicts
|
|
17
|
+
*
|
|
18
|
+
* ## Example
|
|
19
|
+
*
|
|
20
|
+
* Given workflow:
|
|
21
|
+
* - stepA: needs [] → provides ["x"]
|
|
22
|
+
* - stepB: needs ["x"] → provides ["y"]
|
|
23
|
+
* - stepC: needs ["x"] → provides ["z"]
|
|
24
|
+
* - stepD: needs ["y", "z"] → provides ["result"]
|
|
25
|
+
*
|
|
26
|
+
* Planning output:
|
|
27
|
+
* ```
|
|
28
|
+
* [
|
|
29
|
+
* [stepA], // Batch 0: No dependencies
|
|
30
|
+
* [stepB, stepC], // Batch 1: Both need "x" (parallel)
|
|
31
|
+
* [stepD] // Batch 2: Needs both "y" and "z"
|
|
32
|
+
* ]
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ## Usage
|
|
36
|
+
*
|
|
37
|
+
* For Temporal workflows:
|
|
38
|
+
* ```ts
|
|
39
|
+
* const plan = planWorkflowBatches(workflow.steps, initialFields);
|
|
40
|
+
* // Convert each batch to Temporal activities that can run in parallel
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* For synchronous workflows:
|
|
44
|
+
* ```ts
|
|
45
|
+
* const plan = planWorkflowBatches(workflow.steps, initialFields);
|
|
46
|
+
* for (const batch of plan.batches) {
|
|
47
|
+
* await Promise.all(batch.map(step => step.run(ctx, bag)));
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.planWorkflowBatches = planWorkflowBatches;
|
|
53
|
+
exports.validateWorkflowPlan = validateWorkflowPlan;
|
|
54
|
+
/**
|
|
55
|
+
* Plans the execution of a workflow by performing topological sort with batch grouping.
|
|
56
|
+
*
|
|
57
|
+
* This function:
|
|
58
|
+
* 1. Validates that all dependencies can be satisfied
|
|
59
|
+
* 2. Detects duplicate providers and cycles
|
|
60
|
+
* 3. Groups steps into parallel execution batches using Kahn's algorithm
|
|
61
|
+
* 4. Returns an execution plan optimized for maximum parallelism
|
|
62
|
+
*
|
|
63
|
+
* @param steps - Array of steps in the workflow
|
|
64
|
+
* @param initialFields - Fields provided as initial data (satisfy dependencies without producers)
|
|
65
|
+
* @returns Workflow execution plan with steps organized into parallel batches
|
|
66
|
+
* @throws Error if dependencies cannot be satisfied, cycles exist, or duplicate providers found
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const plan = planWorkflowBatches(
|
|
71
|
+
* [stepA, stepB, stepC, stepD],
|
|
72
|
+
* new Set(["userId"])
|
|
73
|
+
* );
|
|
74
|
+
*
|
|
75
|
+
* // Execute each batch in sequence, steps within a batch in parallel
|
|
76
|
+
* for (const batch of plan.batches) {
|
|
77
|
+
* await Promise.all(batch.map(step => executeStep(step)));
|
|
78
|
+
* }
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
function planWorkflowBatches(steps, initialFields = new Set()) {
|
|
82
|
+
// Build a map of which step produces each field (detect duplicates)
|
|
83
|
+
const producers = new Map();
|
|
84
|
+
for (const step of steps) {
|
|
85
|
+
for (const fieldKey of step.provides) {
|
|
86
|
+
if (producers.has(fieldKey)) {
|
|
87
|
+
throw new Error(`Duplicate producer for field "${String(fieldKey)}": ` +
|
|
88
|
+
`${producers.get(fieldKey)} and ${step.name}. ` +
|
|
89
|
+
`Each field can only be produced by one step.`);
|
|
90
|
+
}
|
|
91
|
+
producers.set(fieldKey, step.name);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// Validate that steps don't try to overwrite initial fields
|
|
95
|
+
for (const step of steps) {
|
|
96
|
+
for (const fieldKey of step.provides) {
|
|
97
|
+
if (initialFields.has(fieldKey)) {
|
|
98
|
+
throw new Error(`Step "${step.name}" cannot overwrite initial field "${String(fieldKey)}". ` +
|
|
99
|
+
`Initial data is protected from modification.`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Validate that all dependencies can be satisfied
|
|
104
|
+
const allProvidedFields = new Set(initialFields);
|
|
105
|
+
for (const step of steps) {
|
|
106
|
+
for (const fieldKey of step.provides) {
|
|
107
|
+
allProvidedFields.add(fieldKey);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
for (const step of steps) {
|
|
111
|
+
for (const neededField of step.needs) {
|
|
112
|
+
if (!allProvidedFields.has(neededField)) {
|
|
113
|
+
throw new Error(`Step "${step.name}" requires field "${String(neededField)}" but no previous step provides it. ` +
|
|
114
|
+
`Available fields: [${Array.from(allProvidedFields).map(String).join(", ")}]. ` +
|
|
115
|
+
`Make sure a previous step provides "${String(neededField)}" or include it in initial data.`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Build dependency graph using adjacency lists
|
|
120
|
+
const stepsByName = new Map(steps.map((step) => [step.name, step]));
|
|
121
|
+
// children[stepName] = list of steps that depend on this step's outputs
|
|
122
|
+
const children = new Map();
|
|
123
|
+
// indegree[stepName] = number of unmet dependencies
|
|
124
|
+
const indegree = new Map(steps.map((step) => [step.name, 0]));
|
|
125
|
+
// Build the graph by connecting producers to consumers
|
|
126
|
+
for (const step of steps) {
|
|
127
|
+
let unmetDependencies = 0;
|
|
128
|
+
for (const neededField of step.needs) {
|
|
129
|
+
// Skip fields provided in initial data
|
|
130
|
+
if (initialFields.has(neededField))
|
|
131
|
+
continue;
|
|
132
|
+
const providerStep = producers.get(neededField);
|
|
133
|
+
if (!providerStep) {
|
|
134
|
+
throw new Error(`No producer for required field "${String(neededField)}" used by step "${step.name}"`);
|
|
135
|
+
}
|
|
136
|
+
// Add this step as a dependent of the provider
|
|
137
|
+
children.set(providerStep, [...(children.get(providerStep) ?? []), step.name]);
|
|
138
|
+
unmetDependencies++;
|
|
139
|
+
}
|
|
140
|
+
indegree.set(step.name, unmetDependencies);
|
|
141
|
+
}
|
|
142
|
+
// Perform topological sort with batch grouping (Kahn's algorithm)
|
|
143
|
+
// Each iteration processes one "batch" of steps that can run in parallel
|
|
144
|
+
const batches = [];
|
|
145
|
+
let readySteps = steps
|
|
146
|
+
.filter((step) => (indegree.get(step.name) ?? 0) === 0)
|
|
147
|
+
.map((step) => step.name);
|
|
148
|
+
while (readySteps.length > 0) {
|
|
149
|
+
// Validate that no two steps in the same batch produce the same field
|
|
150
|
+
// This prevents race conditions in parallel execution
|
|
151
|
+
const fieldsProducedInBatch = new Set();
|
|
152
|
+
for (const stepName of readySteps) {
|
|
153
|
+
const step = stepsByName.get(stepName);
|
|
154
|
+
for (const fieldKey of step.provides) {
|
|
155
|
+
const fieldName = String(fieldKey);
|
|
156
|
+
if (fieldsProducedInBatch.has(fieldName)) {
|
|
157
|
+
throw new Error(`Conflict: Multiple steps in the same execution batch produce field "${fieldName}". ` +
|
|
158
|
+
`This would cause non-deterministic behavior. ` +
|
|
159
|
+
`Steps in batch: [${readySteps.join(", ")}]`);
|
|
160
|
+
}
|
|
161
|
+
fieldsProducedInBatch.add(fieldName);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Add this batch to the plan
|
|
165
|
+
const batchSteps = readySteps.map((stepName) => stepsByName.get(stepName));
|
|
166
|
+
batches.push(batchSteps);
|
|
167
|
+
// Update dependency graph: reduce indegree for dependent steps
|
|
168
|
+
const nextReadySteps = [];
|
|
169
|
+
for (const completedStepName of readySteps) {
|
|
170
|
+
for (const dependentStepName of children.get(completedStepName) ?? []) {
|
|
171
|
+
const newIndegree = (indegree.get(dependentStepName) ?? 0) - 1;
|
|
172
|
+
indegree.set(dependentStepName, newIndegree);
|
|
173
|
+
// If this step now has no unmet dependencies, it's ready for the next batch
|
|
174
|
+
if (newIndegree === 0) {
|
|
175
|
+
nextReadySteps.push(dependentStepName);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
readySteps = nextReadySteps;
|
|
180
|
+
}
|
|
181
|
+
// Validate that all steps were processed (detect cycles)
|
|
182
|
+
const unfinishedSteps = [...indegree.entries()].filter(([, degree]) => (degree ?? 0) > 0);
|
|
183
|
+
if (unfinishedSteps.length > 0) {
|
|
184
|
+
const unfinishedNames = unfinishedSteps.map(([stepName]) => stepName);
|
|
185
|
+
throw new Error(`Unable to resolve dependencies for steps: [${unfinishedNames.join(", ")}]. ` +
|
|
186
|
+
`This indicates a circular dependency in the workflow.`);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
batches,
|
|
190
|
+
producers,
|
|
191
|
+
providedFields: allProvidedFields,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Validates a workflow plan for common issues.
|
|
196
|
+
*
|
|
197
|
+
* This is a convenience function that runs the planner and returns
|
|
198
|
+
* validation errors without throwing.
|
|
199
|
+
*
|
|
200
|
+
* @param steps - Array of steps in the workflow
|
|
201
|
+
* @param initialFields - Fields provided as initial data
|
|
202
|
+
* @returns Validation result with success flag and optional error message
|
|
203
|
+
*/
|
|
204
|
+
function validateWorkflowPlan(steps, initialFields = new Set()) {
|
|
205
|
+
try {
|
|
206
|
+
const plan = planWorkflowBatches(steps, initialFields);
|
|
207
|
+
return { success: true, plan };
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
return {
|
|
211
|
+
success: false,
|
|
212
|
+
error: error instanceof Error ? error.message : String(error),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=workflow-planning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-planning.js","sourceRoot":"","sources":["../../src/internal/workflow-planning.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;;AA6CH,kDA6IC;AAYD,oDAaC;AAjMD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,SAAgB,mBAAmB,CACjC,KAAsC,EACtC,gBAAgC,IAAI,GAAG,EAAE;IAEzC,oEAAoE;IACpE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC/C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CACb,iCAAiC,MAAM,CAAC,QAAQ,CAAC,KAAK;oBACpD,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,IAAI,IAAI;oBAC/C,8CAA8C,CACjD,CAAC;YACJ,CAAC;Y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,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;SAC9D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedule sync entry point.
|
|
3
|
+
*
|
|
4
|
+
* Exposed as a dedicated subpath export (@lotiai/composer/schedule-sync) so
|
|
5
|
+
* infrastructure Lambdas can import the reconciler and its payload schema
|
|
6
|
+
* without pulling in the full Composer framework surface (worker runtime,
|
|
7
|
+
* webpack, swc native bindings, chokidar, jiti, etc.) that the root barrel
|
|
8
|
+
* and ./internal both drag in via create-composer + register helpers.
|
|
9
|
+
*
|
|
10
|
+
* We import directly from leaf modules here -- NOT via ./internal -- so
|
|
11
|
+
* esbuild never traces through create-composer.ts and its worker imports.
|
|
12
|
+
* Keep this module narrowly focused on server-side reconciliation.
|
|
13
|
+
*/
|
|
14
|
+
export type { ScheduleDefinition } from "./internal/async/schedule/define-schedule";
|
|
15
|
+
export { scheduleDefinitionSchema, scheduleOverlapPolicySchema, } from "./internal/async/schedule/schedule-definition-schema";
|
|
16
|
+
export { type SyncSchedulesResult, syncSchedules, } from "./internal/async/schedule/sync-schedules";
|
|
17
|
+
//# sourceMappingURL=schedule-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-sync.d.ts","sourceRoot":"","sources":["../src/schedule-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,YAAY,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EACL,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EACL,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Schedule sync entry point.
|
|
4
|
+
*
|
|
5
|
+
* Exposed as a dedicated subpath export (@lotiai/composer/schedule-sync) so
|
|
6
|
+
* infrastructure Lambdas can import the reconciler and its payload schema
|
|
7
|
+
* without pulling in the full Composer framework surface (worker runtime,
|
|
8
|
+
* webpack, swc native bindings, chokidar, jiti, etc.) that the root barrel
|
|
9
|
+
* and ./internal both drag in via create-composer + register helpers.
|
|
10
|
+
*
|
|
11
|
+
* We import directly from leaf modules here -- NOT via ./internal -- so
|
|
12
|
+
* esbuild never traces through create-composer.ts and its worker imports.
|
|
13
|
+
* Keep this module narrowly focused on server-side reconciliation.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.syncSchedules = exports.scheduleOverlapPolicySchema = exports.scheduleDefinitionSchema = void 0;
|
|
17
|
+
var schedule_definition_schema_1 = require("./internal/async/schedule/schedule-definition-schema");
|
|
18
|
+
Object.defineProperty(exports, "scheduleDefinitionSchema", { enumerable: true, get: function () { return schedule_definition_schema_1.scheduleDefinitionSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "scheduleOverlapPolicySchema", { enumerable: true, get: function () { return schedule_definition_schema_1.scheduleOverlapPolicySchema; } });
|
|
20
|
+
var sync_schedules_1 = require("./internal/async/schedule/sync-schedules");
|
|
21
|
+
Object.defineProperty(exports, "syncSchedules", { enumerable: true, get: function () { return sync_schedules_1.syncSchedules; } });
|
|
22
|
+
//# sourceMappingURL=schedule-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-sync.js","sourceRoot":"","sources":["../src/schedule-sync.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAGH,mGAG8D;AAF5D,sIAAA,wBAAwB,OAAA;AACxB,yIAAA,2BAA2B,OAAA;AAE7B,2EAGkD;AADhD,+GAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal Worker Versioning deployment series naming conventions.
|
|
3
|
+
*
|
|
4
|
+
* Exposed as a dedicated subpath export (@lotiai/composer/temporal-naming) so
|
|
5
|
+
* infrastructure Lambdas can import these lightweight constants without pulling
|
|
6
|
+
* in the full Composer framework or Temporal SDK.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WORKER_DEPLOYMENT_SUFFIXES: {
|
|
9
|
+
readonly ACTIVITIES: "activities";
|
|
10
|
+
readonly WORKFLOWS: "workflows";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Derives the Temporal Worker Versioning deployment series names from a service name.
|
|
14
|
+
*
|
|
15
|
+
* Each service runs two worker types (activity and workflow), each with its own
|
|
16
|
+
* deployment series for independent versioning. CI uses these same names when
|
|
17
|
+
* calling setCurrentDeployment after a deploy.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* getDeploymentSeriesNames("orders-service")
|
|
21
|
+
* // => { activities: "orders-service-activities", workflows: "orders-service-workflows" }
|
|
22
|
+
*/
|
|
23
|
+
export declare function getDeploymentSeriesNames(serviceName: string): {
|
|
24
|
+
activities: string;
|
|
25
|
+
workflows: string;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=temporal-naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-naming.d.ts","sourceRoot":"","sources":["../src/temporal-naming.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,0BAA0B;;;CAG7B,CAAC;AAEX;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM;;;EAK3D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Temporal Worker Versioning deployment series naming conventions.
|
|
4
|
+
*
|
|
5
|
+
* Exposed as a dedicated subpath export (@lotiai/composer/temporal-naming) so
|
|
6
|
+
* infrastructure Lambdas can import these lightweight constants without pulling
|
|
7
|
+
* in the full Composer framework or Temporal SDK.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.WORKER_DEPLOYMENT_SUFFIXES = void 0;
|
|
11
|
+
exports.getDeploymentSeriesNames = getDeploymentSeriesNames;
|
|
12
|
+
exports.WORKER_DEPLOYMENT_SUFFIXES = {
|
|
13
|
+
ACTIVITIES: "activities",
|
|
14
|
+
WORKFLOWS: "workflows",
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Derives the Temporal Worker Versioning deployment series names from a service name.
|
|
18
|
+
*
|
|
19
|
+
* Each service runs two worker types (activity and workflow), each with its own
|
|
20
|
+
* deployment series for independent versioning. CI uses these same names when
|
|
21
|
+
* calling setCurrentDeployment after a deploy.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* getDeploymentSeriesNames("orders-service")
|
|
25
|
+
* // => { activities: "orders-service-activities", workflows: "orders-service-workflows" }
|
|
26
|
+
*/
|
|
27
|
+
function getDeploymentSeriesNames(serviceName) {
|
|
28
|
+
return {
|
|
29
|
+
activities: `${serviceName}-${exports.WORKER_DEPLOYMENT_SUFFIXES.ACTIVITIES}`,
|
|
30
|
+
workflows: `${serviceName}-${exports.WORKER_DEPLOYMENT_SUFFIXES.WORKFLOWS}`,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=temporal-naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporal-naming.js","sourceRoot":"","sources":["../src/temporal-naming.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAkBH,4DAKC;AArBY,QAAA,0BAA0B,GAAG;IACxC,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;CACd,CAAC;AAEX;;;;;;;;;;GAUG;AACH,SAAgB,wBAAwB,CAAC,WAAmB;IAC1D,OAAO;QACL,UAAU,EAAE,GAAG,WAAW,IAAI,kCAA0B,CAAC,UAAU,EAAE;QACrE,SAAS,EAAE,GAAG,WAAW,IAAI,kCAA0B,CAAC,SAAS,EAAE;KACpE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lotiai/composer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A framework for building type-safe, DAG-based workflows with optional Temporal integration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -53,20 +53,6 @@
|
|
|
53
53
|
"access": "public",
|
|
54
54
|
"registry": "https://registry.npmjs.org"
|
|
55
55
|
},
|
|
56
|
-
"scripts": {
|
|
57
|
-
"compile": "tsc --build",
|
|
58
|
-
"clean": "rm -rf dist *.tsbuildinfo",
|
|
59
|
-
"test": "pnpm test:vitest",
|
|
60
|
-
"test:vitest": "vitest run --config vitest.config.mts --typecheck",
|
|
61
|
-
"test:vitest:watch": "vitest --config vitest.config.mts",
|
|
62
|
-
"test:watch": "pnpm test:vitest:watch",
|
|
63
|
-
"test:coverage": "vitest run --config vitest.config.mts --coverage",
|
|
64
|
-
"dev:temporal:up": "docker-compose -f docker-compose.temporal.yml up -d",
|
|
65
|
-
"dev:temporal:down": "docker-compose -f docker-compose.temporal.yml down",
|
|
66
|
-
"dev:temporal:logs": "docker-compose -f docker-compose.temporal.yml logs -f",
|
|
67
|
-
"cli": "node dist/cli/index.js",
|
|
68
|
-
"cli:dev": "node dist/cli/index.js dev"
|
|
69
|
-
},
|
|
70
56
|
"dependencies": {
|
|
71
57
|
"@aws-sdk/client-cloudwatch": "^3.946.0",
|
|
72
58
|
"@aws-sdk/client-lambda": "^3.658.1",
|
|
@@ -95,5 +81,18 @@
|
|
|
95
81
|
"engines": {
|
|
96
82
|
"node": ">=22"
|
|
97
83
|
},
|
|
98
|
-
"
|
|
99
|
-
|
|
84
|
+
"scripts": {
|
|
85
|
+
"compile": "tsc --build",
|
|
86
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
87
|
+
"test": "pnpm test:vitest",
|
|
88
|
+
"test:vitest": "vitest run --config vitest.config.mts --typecheck",
|
|
89
|
+
"test:vitest:watch": "vitest --config vitest.config.mts",
|
|
90
|
+
"test:watch": "pnpm test:vitest:watch",
|
|
91
|
+
"test:coverage": "vitest run --config vitest.config.mts --coverage",
|
|
92
|
+
"dev:temporal:up": "docker-compose -f docker-compose.temporal.yml up -d",
|
|
93
|
+
"dev:temporal:down": "docker-compose -f docker-compose.temporal.yml down",
|
|
94
|
+
"dev:temporal:logs": "docker-compose -f docker-compose.temporal.yml logs -f",
|
|
95
|
+
"cli": "node dist/cli/index.js",
|
|
96
|
+
"cli:dev": "node dist/cli/index.js dev"
|
|
97
|
+
}
|
|
98
|
+
}
|