@blokjs/helper 0.2.0 → 0.4.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.
- package/dist/components/AddElse.d.ts +20 -0
- package/dist/components/AddIf.d.ts +20 -0
- package/dist/components/StepNode.d.ts +6 -0
- package/dist/components/StepNode.js +9 -0
- package/dist/components/StepNode.js.map +1 -1
- package/dist/components/Trigger.d.ts +10 -2
- package/dist/components/Trigger.js +16 -5
- package/dist/components/Trigger.js.map +1 -1
- package/dist/components/branch.d.ts +44 -0
- package/dist/components/branch.js +57 -0
- package/dist/components/branch.js.map +1 -0
- package/dist/components/workflowV2.d.ts +83 -0
- package/dist/components/workflowV2.js +84 -0
- package/dist/components/workflowV2.js.map +1 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/dist/proxy/$.d.ts +95 -0
- package/dist/proxy/$.js +130 -0
- package/dist/proxy/$.js.map +1 -0
- package/dist/types/StepOpts.d.ts +456 -3
- package/dist/types/StepOpts.js +456 -3
- package/dist/types/StepOpts.js.map +1 -1
- package/dist/types/TriggerOpts.d.ts +1196 -19
- package/dist/types/TriggerOpts.js +395 -19
- package/dist/types/TriggerOpts.js.map +1 -1
- package/dist/types/WorkflowOpts.d.ts +312 -28
- package/dist/types/WorkflowOpts.js +55 -3
- package/dist/types/WorkflowOpts.js.map +1 -1
- package/dist/utils/parseDuration.d.ts +33 -0
- package/dist/utils/parseDuration.js +78 -0
- package/dist/utils/parseDuration.js.map +1 -0
- package/dist/workflow.schema.json +426 -0
- package/package.json +6 -6
package/dist/types/StepOpts.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { DurationSchema } from "./TriggerOpts";
|
|
2
3
|
/**
|
|
3
|
-
* RuntimeKind represents all supported runtime environments
|
|
4
|
-
*
|
|
4
|
+
* RuntimeKind represents all supported runtime environments.
|
|
5
|
+
*
|
|
6
|
+
* Synced with `@blokjs/runner` `RuntimeKind` type.
|
|
5
7
|
*/
|
|
6
8
|
export const RuntimeKindSchema = z.enum([
|
|
7
9
|
"nodejs",
|
|
@@ -17,7 +19,7 @@ export const RuntimeKindSchema = z.enum([
|
|
|
17
19
|
"wasm",
|
|
18
20
|
]);
|
|
19
21
|
/**
|
|
20
|
-
* Node type enum
|
|
22
|
+
* Node type enum — includes both legacy types and new runtime types.
|
|
21
23
|
*/
|
|
22
24
|
export const NodeTypeSchema = z.enum([
|
|
23
25
|
"local",
|
|
@@ -36,6 +38,19 @@ export const NodeTypeSchema = z.enum([
|
|
|
36
38
|
"runtime.docker",
|
|
37
39
|
"runtime.wasm",
|
|
38
40
|
]);
|
|
41
|
+
// =============================================================================
|
|
42
|
+
// V1 — Legacy step shape. Kept for backward compatibility.
|
|
43
|
+
// New workflows should use `StepV2Schema` via the `workflow()` factory.
|
|
44
|
+
// =============================================================================
|
|
45
|
+
/**
|
|
46
|
+
* Validation schema for a single workflow step (v1 — legacy).
|
|
47
|
+
*
|
|
48
|
+
* Mirrors the JSON workflow step shape so the TypeScript DSL produces
|
|
49
|
+
* structurally-identical output to JSON workflows.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated Prefer {@link StepV2Schema}. v1 shapes are still accepted and
|
|
52
|
+
* normalized at workflow load time.
|
|
53
|
+
*/
|
|
39
54
|
export const StepOptsSchema = z.object({
|
|
40
55
|
name: z
|
|
41
56
|
.string({
|
|
@@ -52,6 +67,15 @@ export const StepOptsSchema = z.object({
|
|
|
52
67
|
type: NodeTypeSchema,
|
|
53
68
|
inputs: z.object({}).optional(),
|
|
54
69
|
runtime: RuntimeKindSchema.optional(),
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated v2 default-stores every step's output. Set `ephemeral: true`
|
|
72
|
+
* to opt out. `set_var: true` is now a no-op (default behaviour);
|
|
73
|
+
* `set_var: false` is normalized to `ephemeral: true` at load time.
|
|
74
|
+
*/
|
|
75
|
+
set_var: z.boolean().optional(),
|
|
76
|
+
active: z.boolean().optional(),
|
|
77
|
+
stop: z.boolean().optional(),
|
|
78
|
+
stream_logs: z.boolean().optional(),
|
|
55
79
|
});
|
|
56
80
|
// It is used globally in the project
|
|
57
81
|
export const StepInputsSchema = z.object({}, { message: "Inputs required" });
|
|
@@ -59,4 +83,433 @@ export const StepConditionSchema = z.object({
|
|
|
59
83
|
node: StepOptsSchema,
|
|
60
84
|
conditions: z.function().optional(),
|
|
61
85
|
});
|
|
86
|
+
// =============================================================================
|
|
87
|
+
// V2 — Canonical step shape. LLM- and human-friendly.
|
|
88
|
+
// =============================================================================
|
|
89
|
+
/**
|
|
90
|
+
* Retry configuration for a v2 step.
|
|
91
|
+
*
|
|
92
|
+
* Wraps `step.process(ctx, step)` in a retry loop with capped exponential
|
|
93
|
+
* backoff. Per-attempt failures emit `NODE_ATTEMPT_FAILED` trace events.
|
|
94
|
+
*
|
|
95
|
+
* Defaults applied by the runner when fields are omitted:
|
|
96
|
+
* - `minTimeoutInMs`: 1000
|
|
97
|
+
* - `maxTimeoutInMs`: 30000
|
|
98
|
+
* - `factor`: 2
|
|
99
|
+
*
|
|
100
|
+
* Shape mirrors Trigger.dev's `retry` config so authors moving between
|
|
101
|
+
* platforms read familiar semantics. No jitter is added — matches
|
|
102
|
+
* Trigger.dev's default.
|
|
103
|
+
*/
|
|
104
|
+
export const RetryConfigSchema = z
|
|
105
|
+
.object({
|
|
106
|
+
maxAttempts: z
|
|
107
|
+
.number()
|
|
108
|
+
.int()
|
|
109
|
+
.min(1)
|
|
110
|
+
.max(20)
|
|
111
|
+
.describe("Total attempts including the first run. 1 = no retry. Capped at 20."),
|
|
112
|
+
minTimeoutInMs: z
|
|
113
|
+
.number()
|
|
114
|
+
.int()
|
|
115
|
+
.min(0)
|
|
116
|
+
.optional()
|
|
117
|
+
.describe("Initial backoff delay in ms before the second attempt. Default 1000."),
|
|
118
|
+
maxTimeoutInMs: z
|
|
119
|
+
.number()
|
|
120
|
+
.int()
|
|
121
|
+
.min(0)
|
|
122
|
+
.optional()
|
|
123
|
+
.describe("Cap on the backoff delay between attempts. Default 30000."),
|
|
124
|
+
factor: z
|
|
125
|
+
.number()
|
|
126
|
+
.min(1)
|
|
127
|
+
.optional()
|
|
128
|
+
.describe("Exponential backoff factor: delay = min(maxTimeout, minTimeout * factor^(attempt-1)). Default 2."),
|
|
129
|
+
})
|
|
130
|
+
.refine((r) => r.minTimeoutInMs === undefined || r.maxTimeoutInMs === undefined || r.minTimeoutInMs <= r.maxTimeoutInMs, {
|
|
131
|
+
message: "`minTimeoutInMs` must be <= `maxTimeoutInMs`.",
|
|
132
|
+
path: ["maxTimeoutInMs"],
|
|
133
|
+
});
|
|
134
|
+
/**
|
|
135
|
+
* V2 regular step — invokes a node with inputs.
|
|
136
|
+
*
|
|
137
|
+
* **Identity**
|
|
138
|
+
* - `id` is the step's stable identifier. Other steps reference this step's
|
|
139
|
+
* output as `$.state[id]`.
|
|
140
|
+
* - `use` is the node reference (e.g. `@blokjs/api-call`).
|
|
141
|
+
*
|
|
142
|
+
* **Persistence (default-store rule)**
|
|
143
|
+
* Every step's `result.data` is automatically stored in `ctx.state[id]`
|
|
144
|
+
* after execution. This is the 95% case. The four declarative knobs:
|
|
145
|
+
* - `as: "<name>"` — store at `state[name]` instead of `state[id]`.
|
|
146
|
+
* - `spread: true` — shallow-merge keys of `result.data` into `state`
|
|
147
|
+
* (data-pipeline pattern). Mutually exclusive with `as`.
|
|
148
|
+
* - `ephemeral: true` — skip storage; only `ctx.prev` carries the result
|
|
149
|
+
* to the next step.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* { id: "fetch-users", use: "postgres-query", inputs: { sql: "..." } }
|
|
153
|
+
* // state["fetch-users"] = result.data
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* { id: "step-1", use: "...", as: "users" }
|
|
157
|
+
* // state.users = result.data
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* { id: "load", use: "fetch-user-and-profile", spread: true }
|
|
161
|
+
* // result.data = { user, profile } -> state.user + state.profile
|
|
162
|
+
*/
|
|
163
|
+
export const V2RegularStepSchema = z
|
|
164
|
+
.object({
|
|
165
|
+
id: z
|
|
166
|
+
.string({
|
|
167
|
+
required_error: "Step id is required",
|
|
168
|
+
invalid_type_error: "Step id must be a string",
|
|
169
|
+
})
|
|
170
|
+
.min(1)
|
|
171
|
+
.describe("Stable identifier. Other steps reference this step's output as $.state[id]. Required."),
|
|
172
|
+
use: z
|
|
173
|
+
.string({
|
|
174
|
+
required_error: "Step `use` is required",
|
|
175
|
+
invalid_type_error: "Step `use` must be a string",
|
|
176
|
+
})
|
|
177
|
+
.min(1)
|
|
178
|
+
.describe("Node reference. Examples: '@blokjs/api-call', 'my-custom-node'. " +
|
|
179
|
+
"Type is inferred from this value when `type` is not set."),
|
|
180
|
+
type: NodeTypeSchema.optional().describe("Node type (module/local/runtime.*). When omitted, inferred from `use`: " +
|
|
181
|
+
"runtime.* prefixes are explicit; @blokjs/* and most others default to 'module'."),
|
|
182
|
+
inputs: z
|
|
183
|
+
.record(z.unknown())
|
|
184
|
+
.optional()
|
|
185
|
+
.describe("Inputs passed to the node. May contain $ proxy references " +
|
|
186
|
+
"(e.g. $.state.foo, $.req.body.id) or 'js/...' expressions for runtime evaluation."),
|
|
187
|
+
as: z
|
|
188
|
+
.string()
|
|
189
|
+
.min(1)
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("Alternative name for this step's output in state. " +
|
|
192
|
+
"Defaults to `id`. Useful when the id is implementation-detail-y " +
|
|
193
|
+
"and the output is referenced by a domain term."),
|
|
194
|
+
spread: z
|
|
195
|
+
.boolean()
|
|
196
|
+
.optional()
|
|
197
|
+
.describe("If true, the result.data object's top-level keys are shallow-merged into state. " +
|
|
198
|
+
"Use for multi-output nodes in data-pipeline workflows. " +
|
|
199
|
+
"Mutually exclusive with `as`."),
|
|
200
|
+
ephemeral: z
|
|
201
|
+
.boolean()
|
|
202
|
+
.optional()
|
|
203
|
+
.describe("If true, this step's output is NOT stored in state. " +
|
|
204
|
+
"Only ctx.prev carries it to the immediately next step. " +
|
|
205
|
+
"Use for side-effects (logging, audit, telemetry)."),
|
|
206
|
+
runtime: RuntimeKindSchema.optional().describe("Optional runtime hint. Most authors don't need this; the type already encodes it."),
|
|
207
|
+
active: z.boolean().optional().describe("If false, the step is skipped at runtime. Default true."),
|
|
208
|
+
stop: z.boolean().optional().describe("If true, the workflow halts after this step completes. Default false."),
|
|
209
|
+
stream_logs: z
|
|
210
|
+
.boolean()
|
|
211
|
+
.optional()
|
|
212
|
+
.describe("Per-step opt-in for live log streaming. Inherits from BLOK_STREAM_LOGS env when unset."),
|
|
213
|
+
idempotencyKey: z
|
|
214
|
+
.string()
|
|
215
|
+
.min(1)
|
|
216
|
+
.optional()
|
|
217
|
+
.describe("When set, the step's result is cached against the triple " +
|
|
218
|
+
"(workflowName, step.id, idempotencyKey). On a subsequent run with the " +
|
|
219
|
+
"same triple, execution is skipped and the cached result populates state " +
|
|
220
|
+
"through the same persistence rules (ephemeral / spread / as). " +
|
|
221
|
+
"Accepts a literal string or a $ proxy expression that compiles to " +
|
|
222
|
+
"`js/ctx....` (e.g. $.req.body.requestId)."),
|
|
223
|
+
idempotencyKeyTTL: z
|
|
224
|
+
.number()
|
|
225
|
+
.int()
|
|
226
|
+
.min(0)
|
|
227
|
+
.optional()
|
|
228
|
+
.describe("Cache lifetime in milliseconds. Defaults to 24h (86_400_000) when omitted. " +
|
|
229
|
+
"Pass 0 to mark a cached result as immediately expired (effectively disables caching)."),
|
|
230
|
+
retry: RetryConfigSchema.optional().describe("Retry configuration with capped exponential backoff. " +
|
|
231
|
+
"When omitted, the step runs at most once (no retry) — matches pre-v0.3.x behavior."),
|
|
232
|
+
maxDuration: DurationSchema.optional().describe("OPTIONAL. Per-attempt execution timeout. Number (ms) or duration " +
|
|
233
|
+
"string ('30s', '5m', '500ms'). When the step's `step.process()` " +
|
|
234
|
+
"exceeds this duration, the attempt fails with a StepTimeoutError. " +
|
|
235
|
+
"Pairs with `retry` — each attempt gets its own timeout (total " +
|
|
236
|
+
"budget = maxDuration × maxAttempts). On final-attempt timeout, the " +
|
|
237
|
+
'run auto-flips to `"timedOut"` status (distinct from `"failed"` ' +
|
|
238
|
+
"so SLA dashboards can separate timeouts from logic failures)."),
|
|
239
|
+
// Legacy aliases — accepted for v1 → v2 migration but discouraged.
|
|
240
|
+
set_var: z
|
|
241
|
+
.boolean()
|
|
242
|
+
.optional()
|
|
243
|
+
.describe("@deprecated v2 default-stores every step's output. " +
|
|
244
|
+
"`set_var: true` is a no-op; `set_var: false` is normalized to `ephemeral: true`."),
|
|
245
|
+
})
|
|
246
|
+
.refine((step) => !(step.as && step.spread), {
|
|
247
|
+
message: "`as` and `spread` are mutually exclusive — pick one.",
|
|
248
|
+
path: ["spread"],
|
|
249
|
+
});
|
|
250
|
+
/**
|
|
251
|
+
* V2 branch step — `branch({when, then, else})`.
|
|
252
|
+
*
|
|
253
|
+
* Replaces the legacy `addCondition + new AddIf().addStep().build()` pattern.
|
|
254
|
+
* Compiles down to the existing `@blokjs/if-else` flow node at workflow
|
|
255
|
+
* load time, so the runner core needs no change.
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* {
|
|
259
|
+
* id: "route-by-method",
|
|
260
|
+
* branch: {
|
|
261
|
+
* when: '$.req.method === "POST"',
|
|
262
|
+
* then: [{ id: "create", use: "...", inputs: {...} }],
|
|
263
|
+
* else: [{ id: "read", use: "...", inputs: {...} }]
|
|
264
|
+
* }
|
|
265
|
+
* }
|
|
266
|
+
*/
|
|
267
|
+
export const V2BranchStepSchema = z.lazy(() => z.object({
|
|
268
|
+
id: z.string().min(1).describe("Stable identifier for the branch step. Visible in traces."),
|
|
269
|
+
branch: z
|
|
270
|
+
.object({
|
|
271
|
+
when: z
|
|
272
|
+
.string()
|
|
273
|
+
.min(1)
|
|
274
|
+
.describe("JavaScript expression. Truthy → run `then` branch; falsy → run `else` branch. " +
|
|
275
|
+
"$ proxy expressions compile to strings at the call site (e.g. $.req.query.kind === 'true')."),
|
|
276
|
+
then: z.array(z.unknown()).describe("Steps to execute when `when` is truthy."),
|
|
277
|
+
else: z.array(z.unknown()).optional().describe("Steps to execute when `when` is falsy. Optional."),
|
|
278
|
+
})
|
|
279
|
+
.describe("Conditional sub-pipeline."),
|
|
280
|
+
active: z.boolean().optional(),
|
|
281
|
+
stop: z.boolean().optional(),
|
|
282
|
+
}));
|
|
283
|
+
/**
|
|
284
|
+
* V2 sub-workflow step — invoke another named workflow inline.
|
|
285
|
+
*
|
|
286
|
+
* The parent step blocks until the child workflow completes (`wait: true`,
|
|
287
|
+
* the default). The child gets its own `ctx`, its own trace run record,
|
|
288
|
+
* and runs through the same `RunnerSteps` machinery as a top-level run.
|
|
289
|
+
* The child's `ctx.response` becomes the parent step's output, so it
|
|
290
|
+
* lands on `state[<id>]` like any other step (mirrors HTTP semantics:
|
|
291
|
+
* sub-workflow looks like a function call).
|
|
292
|
+
*
|
|
293
|
+
* Inputs flow from parent → child as `ctx.request.body` — the child
|
|
294
|
+
* reads them via `$.req.body.<key>` exactly as if it had been
|
|
295
|
+
* HTTP-triggered.
|
|
296
|
+
*
|
|
297
|
+
* **Composition with Tier 1**:
|
|
298
|
+
* - `idempotencyKey` on this step caches the entire sub-workflow's
|
|
299
|
+
* result. Cache hit = child workflow is NEVER invoked (no side
|
|
300
|
+
* effects fire on rerun). Documented footgun + headline pattern.
|
|
301
|
+
* - `retry` retries the whole sub-workflow on failure.
|
|
302
|
+
* - Replay re-creates fresh sub-run lineage automatically.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* {
|
|
306
|
+
* id: "send-receipt",
|
|
307
|
+
* subworkflow: "send-receipt-email",
|
|
308
|
+
* inputs: { user: $.state.user, order: $.state.order },
|
|
309
|
+
* wait: true, // default; `wait: false` deferred to a follow-up
|
|
310
|
+
* idempotencyKey: $.req.body.requestId,
|
|
311
|
+
* }
|
|
312
|
+
*/
|
|
313
|
+
export const V2SubworkflowStepSchema = z.lazy(() => z
|
|
314
|
+
.object({
|
|
315
|
+
id: z
|
|
316
|
+
.string()
|
|
317
|
+
.min(1)
|
|
318
|
+
.describe("Stable identifier. The sub-workflow's output lands on $.state[id] " + "after the child completes. Required."),
|
|
319
|
+
subworkflow: z
|
|
320
|
+
.string()
|
|
321
|
+
.min(1)
|
|
322
|
+
.describe("Name of the workflow to invoke. Looked up in the WorkflowRegistry " +
|
|
323
|
+
"at run time — must match the `name:` field of an HTTP-loaded or " +
|
|
324
|
+
"manually-registered workflow."),
|
|
325
|
+
inputs: z
|
|
326
|
+
.record(z.unknown())
|
|
327
|
+
.optional()
|
|
328
|
+
.describe("Inputs passed to the child as `ctx.request.body`. The child reads " +
|
|
329
|
+
"them via `$.req.body.<key>` exactly as if HTTP-triggered. " +
|
|
330
|
+
"May contain $ proxy refs."),
|
|
331
|
+
wait: z
|
|
332
|
+
.boolean()
|
|
333
|
+
.optional()
|
|
334
|
+
.describe("If true (default), parent step blocks until child completes and " +
|
|
335
|
+
"the child's ctx.response becomes the parent step's output. " +
|
|
336
|
+
"If false, dispatch is fire-and-forget — the parent step returns " +
|
|
337
|
+
"immediately with `{runId, workflowName, scheduledAt}` and the " +
|
|
338
|
+
"child runs asynchronously via setImmediate. The child still " +
|
|
339
|
+
"appears in Studio's Sub-runs strip and the parentRunId/parentNodeRunId " +
|
|
340
|
+
"lineage is preserved. Combine with `idempotencyKey` for " +
|
|
341
|
+
"at-most-once dispatch (Trigger.dev / Stripe semantics: the runId " +
|
|
342
|
+
"is cached against the key regardless of child outcome; new key " +
|
|
343
|
+
"needed to retry on failure)."),
|
|
344
|
+
as: z
|
|
345
|
+
.string()
|
|
346
|
+
.min(1)
|
|
347
|
+
.optional()
|
|
348
|
+
.describe("Alternative state key (defaults to id). Mutually exclusive with spread."),
|
|
349
|
+
spread: z
|
|
350
|
+
.boolean()
|
|
351
|
+
.optional()
|
|
352
|
+
.describe("Shallow-merge child's response keys into state. Mutually exclusive with as."),
|
|
353
|
+
ephemeral: z
|
|
354
|
+
.boolean()
|
|
355
|
+
.optional()
|
|
356
|
+
.describe("If true, child output is NOT stored in state. Only ctx.prev carries it."),
|
|
357
|
+
active: z.boolean().optional().describe("If false, the step is skipped at runtime. Default true."),
|
|
358
|
+
stop: z.boolean().optional().describe("If true, the workflow halts after this step completes."),
|
|
359
|
+
idempotencyKey: z
|
|
360
|
+
.string()
|
|
361
|
+
.min(1)
|
|
362
|
+
.optional()
|
|
363
|
+
.describe("When set, the sub-workflow's parent step output is cached against " +
|
|
364
|
+
"the triple (parentWorkflow, step.id, key). Cache semantics depend " +
|
|
365
|
+
"on `wait`: with `wait: true` (default), cache HIT means the child " +
|
|
366
|
+
"workflow is NEVER invoked — including any side effects (use with " +
|
|
367
|
+
"care for sub-workflows that send emails, charge cards, etc.). With " +
|
|
368
|
+
"`wait: false`, cache HIT returns the SAME `{runId, workflowName, " +
|
|
369
|
+
"scheduledAt}` for the lifetime of the cache entry — at-most-once " +
|
|
370
|
+
"dispatch deduplication. To retry on child failure, use a new key."),
|
|
371
|
+
idempotencyKeyTTL: z
|
|
372
|
+
.number()
|
|
373
|
+
.int()
|
|
374
|
+
.min(0)
|
|
375
|
+
.optional()
|
|
376
|
+
.describe("Cache lifetime in milliseconds. Defaults to 24h. Pass 0 to immediately expire."),
|
|
377
|
+
retry: RetryConfigSchema.optional().describe("Retry the WHOLE sub-workflow on failure. Each retry creates a fresh " +
|
|
378
|
+
"child run record under the same parent."),
|
|
379
|
+
maxDuration: DurationSchema.optional().describe("OPTIONAL. Per-attempt execution timeout. Caps the synchronous wait for " +
|
|
380
|
+
"`wait: true` sub-workflows. No-op for `wait: false` (parent returns " +
|
|
381
|
+
"immediately; the child's max-duration is the child's concern). Number " +
|
|
382
|
+
"(ms) or duration string. On final-attempt timeout, the run auto-flips " +
|
|
383
|
+
'to `"timedOut"`.'),
|
|
384
|
+
})
|
|
385
|
+
.refine((step) => !(step.as && step.spread), {
|
|
386
|
+
message: "`as` and `spread` are mutually exclusive — pick one.",
|
|
387
|
+
path: ["spread"],
|
|
388
|
+
}));
|
|
389
|
+
/**
|
|
390
|
+
* V2 wait step (PR 4 · `wait.for(duration)` / `wait.until(date)`).
|
|
391
|
+
*
|
|
392
|
+
* Pauses workflow execution mid-run for the specified duration (or until
|
|
393
|
+
* the absolute deadline). Composes with the durable scheduler — long
|
|
394
|
+
* waits survive process restart via the existing
|
|
395
|
+
* `scheduled_dispatches` infrastructure (PR 4 P3 adds
|
|
396
|
+
* `last_completed_step_index` so the runner skips past completed
|
|
397
|
+
* pre-wait steps on resume).
|
|
398
|
+
*
|
|
399
|
+
* Author surface:
|
|
400
|
+
* ```ts
|
|
401
|
+
* { id: "wait-3d", wait: { for: "3d" } }
|
|
402
|
+
* { id: "wait-deadline", wait: { until: $.req.body.scheduledAt } }
|
|
403
|
+
* ```
|
|
404
|
+
*
|
|
405
|
+
* Cannot combine with `idempotencyKey` (the wait IS the checkpoint) or
|
|
406
|
+
* `retry` (waits don't fail in a retryable way).
|
|
407
|
+
*/
|
|
408
|
+
export const V2WaitStepSchema = z
|
|
409
|
+
.object({
|
|
410
|
+
id: z.string().min(1).describe("Stable identifier."),
|
|
411
|
+
wait: z
|
|
412
|
+
.object({
|
|
413
|
+
for: DurationSchema.optional().describe("Wait this long. Mutually exclusive with `until`. " +
|
|
414
|
+
"Number (ms) or duration string (`500ms`, `30s`, `5m`, `2h`, `1d`)."),
|
|
415
|
+
until: z
|
|
416
|
+
.union([z.number(), z.string()])
|
|
417
|
+
.optional()
|
|
418
|
+
.describe("Wait until this absolute time. Number is ms-since-epoch; " +
|
|
419
|
+
"string is an ISO date or a $-proxy expression. Mutually exclusive with `for`."),
|
|
420
|
+
})
|
|
421
|
+
.strict(),
|
|
422
|
+
as: z.string().min(1).optional().describe("Alternative state key (defaults to `id`)."),
|
|
423
|
+
ephemeral: z.boolean().optional().describe("If true, no state entry is recorded."),
|
|
424
|
+
active: z.boolean().optional(),
|
|
425
|
+
stop: z.boolean().optional(),
|
|
426
|
+
// PR 1-5 polish + review fix-up — explicit rejection of fields that
|
|
427
|
+
// are meaningless on wait steps. `.strict()` below would reject
|
|
428
|
+
// these as "unrecognized key" with a generic message; `.never()`
|
|
429
|
+
// lets us produce a feature-specific error explaining WHY the
|
|
430
|
+
// field is rejected so authors don't have to guess. `.optional()`
|
|
431
|
+
// permits undefined (the normal case for wait steps that don't
|
|
432
|
+
// pass any of these fields).
|
|
433
|
+
idempotencyKey: z
|
|
434
|
+
.never({
|
|
435
|
+
errorMap: () => ({
|
|
436
|
+
message: "`idempotencyKey` is not supported on wait steps — the wait itself is the checkpoint.",
|
|
437
|
+
}),
|
|
438
|
+
})
|
|
439
|
+
.optional(),
|
|
440
|
+
retry: z
|
|
441
|
+
.never({
|
|
442
|
+
errorMap: () => ({
|
|
443
|
+
message: "`retry` is not supported on wait steps — waits don't fail in a retryable way.",
|
|
444
|
+
}),
|
|
445
|
+
})
|
|
446
|
+
.optional(),
|
|
447
|
+
// Review fix-up — three more rejections the original polish PR
|
|
448
|
+
// missed. All three could appear plausible to an author coming
|
|
449
|
+
// from regular steps; the helpful message saves them a
|
|
450
|
+
// debugging session.
|
|
451
|
+
maxDuration: z
|
|
452
|
+
.never({
|
|
453
|
+
errorMap: () => ({
|
|
454
|
+
message: "`maxDuration` is not supported on wait steps — the wait IS the duration.",
|
|
455
|
+
}),
|
|
456
|
+
})
|
|
457
|
+
.optional(),
|
|
458
|
+
concurrencyKey: z
|
|
459
|
+
.never({
|
|
460
|
+
errorMap: () => ({
|
|
461
|
+
message: "`concurrencyKey` is not supported on wait steps — concurrency gating lives on the trigger config, not on per-step waits.",
|
|
462
|
+
}),
|
|
463
|
+
})
|
|
464
|
+
.optional(),
|
|
465
|
+
spread: z
|
|
466
|
+
.never({
|
|
467
|
+
errorMap: () => ({
|
|
468
|
+
message: "`spread` is not supported on wait steps — wait steps produce no data to spread.",
|
|
469
|
+
}),
|
|
470
|
+
})
|
|
471
|
+
.optional(),
|
|
472
|
+
})
|
|
473
|
+
.strict()
|
|
474
|
+
.refine((s) => (s.wait.for !== undefined) !== (s.wait.until !== undefined), {
|
|
475
|
+
message: "`wait.for` and `wait.until` are mutually exclusive — pick one.",
|
|
476
|
+
path: ["wait"],
|
|
477
|
+
});
|
|
478
|
+
/**
|
|
479
|
+
* Discriminated v2 step — regular, branch, sub-workflow, or wait.
|
|
480
|
+
*
|
|
481
|
+
* Discriminators (no `kind` field needed):
|
|
482
|
+
* - presence of `branch` → branch step
|
|
483
|
+
* - presence of `subworkflow` → sub-workflow step
|
|
484
|
+
* - presence of `wait` (object) → wait step
|
|
485
|
+
* - otherwise → regular step
|
|
486
|
+
*/
|
|
487
|
+
export const V2StepSchema = z.lazy(() => z.union([V2BranchStepSchema, V2SubworkflowStepSchema, V2WaitStepSchema, V2RegularStepSchema]));
|
|
488
|
+
/**
|
|
489
|
+
* Type guard — true when the step is a branch.
|
|
490
|
+
*/
|
|
491
|
+
export function isBranchStep(step) {
|
|
492
|
+
return typeof step === "object" && step !== null && "branch" in step;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Type guard — true when the step is a wait (PR 4 `wait.for` / `wait.until`).
|
|
496
|
+
*/
|
|
497
|
+
export function isWaitStep(step) {
|
|
498
|
+
return (typeof step === "object" &&
|
|
499
|
+
step !== null &&
|
|
500
|
+
"wait" in step &&
|
|
501
|
+
typeof step.wait === "object" &&
|
|
502
|
+
step.wait !== null &&
|
|
503
|
+
(step.wait?.for !== undefined ||
|
|
504
|
+
step.wait?.until !== undefined));
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Type guard — true when the step is a sub-workflow invocation.
|
|
508
|
+
*/
|
|
509
|
+
export function isSubworkflowStep(step) {
|
|
510
|
+
return (typeof step === "object" &&
|
|
511
|
+
step !== null &&
|
|
512
|
+
"subworkflow" in step &&
|
|
513
|
+
typeof step.subworkflow === "string");
|
|
514
|
+
}
|
|
62
515
|
//# sourceMappingURL=StepOpts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepOpts.js","sourceRoot":"","sources":["../../src/types/StepOpts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"StepOpts.js","sourceRoot":"","sources":["../../src/types/StepOpts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,QAAQ;IACR,KAAK;IACL,SAAS;IACT,IAAI;IACJ,MAAM;IACN,MAAM;IACN,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,MAAM;CACN,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC;IACpC,OAAO;IACP,QAAQ;IACR,6CAA6C;IAC7C,iBAAiB;IACjB,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,cAAc;IACd,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,cAAc;CACd,CAAC,CAAC;AAIH,gFAAgF;AAChF,2DAA2D;AAC3D,wEAAwE;AACxE,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC;SACL,MAAM,CAAC;QACP,cAAc,EAAE,kBAAkB;QAClC,kBAAkB,EAAE,uBAAuB;KAC3C,CAAC;SACD,GAAG,CAAC,CAAC,CAAC;IACR,IAAI,EAAE,CAAC;SACL,MAAM,CAAC;QACP,cAAc,EAAE,kBAAkB;QAClC,kBAAkB,EAAE,uBAAuB;KAC3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