@sayiir/flow-js 0.5.0-rc1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sayiir
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @sayiir/flow-js
2
+
3
+ Pure TypeScript workflow builder DSL for [Sayiir](https://docs.sayiir.dev) — no native dependencies.
4
+
5
+ This package contains the type-safe flow builder, task definitions, and core types used to **define** workflows. It does not include execution or persistence — those are provided by binding packages:
6
+
7
+ - **[sayiir](https://www.npmjs.com/package/sayiir)** — Node.js (NAPI-RS native bindings)
8
+ - **[@sayiir/cloudflare](https://www.npmjs.com/package/@sayiir/cloudflare)** — Cloudflare Workers (WASM)
9
+
10
+ ## When to use this package directly
11
+
12
+ Most users should install `sayiir` (Node.js) or `sayiir-cloudflare` instead. Use `@sayiir/flow-js` directly if you are:
13
+
14
+ - Building a new Sayiir binding package for another runtime
15
+ - Writing shared workflow definitions that must be runtime-agnostic
16
+
17
+ ## Usage
18
+
19
+ ```ts
20
+ import { Flow, task, createFlowFactory, type FlowBuilderBackend } from "@sayiir/flow-js";
21
+
22
+ // Define tasks (pure — no runtime dependency)
23
+ const greet = task("greet", (name: string) => `Hello, ${name}!`);
24
+
25
+ // Build a flow with an injected backend
26
+ const myFlow = new Flow<string>(myBuilderBackend)
27
+ .then(greet)
28
+ .build();
29
+ ```
30
+
31
+ ### `createFlowFactory`
32
+
33
+ Binding packages use `createFlowFactory` to wire up their backend:
34
+
35
+ ```ts
36
+ import { createFlowFactory } from "@sayiir/flow-js";
37
+
38
+ // Each binding provides its own builder constructor
39
+ export const flow = createFlowFactory((name) => new NativeFlowBuilder(name));
40
+ ```
41
+
42
+ ## License
43
+
44
+ MIT
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Duration parsing utility.
3
+ *
4
+ * Converts human-readable duration strings (via `ms` library) or numeric
5
+ * milliseconds to milliseconds.
6
+ */
7
+ import type { Duration } from "./types.js";
8
+ /**
9
+ * Parse a Duration value to milliseconds.
10
+ *
11
+ * - Numbers are returned as-is (assumed to be ms).
12
+ * - Strings are parsed via the `ms` library (e.g. "30s", "5m", "1h").
13
+ */
14
+ export declare function parseDuration(d: Duration): number;
15
+ //# sourceMappingURL=duration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,QAAQ,GAAG,MAAM,CAOjD"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * Duration parsing utility.
4
+ *
5
+ * Converts human-readable duration strings (via `ms` library) or numeric
6
+ * milliseconds to milliseconds.
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.parseDuration = parseDuration;
13
+ const ms_1 = __importDefault(require("ms"));
14
+ /**
15
+ * Parse a Duration value to milliseconds.
16
+ *
17
+ * - Numbers are returned as-is (assumed to be ms).
18
+ * - Strings are parsed via the `ms` library (e.g. "30s", "5m", "1h").
19
+ */
20
+ function parseDuration(d) {
21
+ if (typeof d === "number")
22
+ return d;
23
+ const result = (0, ms_1.default)(d);
24
+ if (result == null) {
25
+ throw new Error(`Invalid duration: "${d}"`);
26
+ }
27
+ return result;
28
+ }
29
+ //# sourceMappingURL=duration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duration.js","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAWH,sCAOC;AAfD,4CAAoB;AAEpB;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,CAAW;IACvC,IAAI,OAAO,CAAC,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,YAAE,EAAC,CAAmB,CAAC,CAAC;IACvC,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/dist/flow.d.ts ADDED
@@ -0,0 +1,231 @@
1
+ /**
2
+ * Type-safe flow builder for constructing workflows.
3
+ *
4
+ * The builder tracks input/output types through the chain using generics,
5
+ * providing full type inference without manual annotations.
6
+ *
7
+ * ```ts
8
+ * const wf = flow<number>("welcome")
9
+ * .then("load", (id) => getUser(id)) // id: number -> User
10
+ * .then("greet", (user) => `Hi ${user.name}`) // user: User -> string
11
+ * .build(); // Workflow<number, string>
12
+ * ```
13
+ */
14
+ import type { Duration, LoopOptions, LoopResult, StepOptions, TaskCallback } from "./types.js";
15
+ import type { TaskFn } from "./task.js";
16
+ import type { CompiledWorkflow, FlowBuilderBackend, NodeInfo, TaskMetadata } from "./interfaces.js";
17
+ /** A compiled workflow ready for execution. */
18
+ export declare class Workflow<TIn, TOut> {
19
+ /** @internal */
20
+ readonly _inner: CompiledWorkflow;
21
+ /** @internal */
22
+ readonly _taskRegistry: Record<string, TaskCallback>;
23
+ /** @internal — kept for child workflow composition via `thenFlow`. */
24
+ readonly _builder: FlowBuilderBackend;
25
+ constructor(inner: CompiledWorkflow, taskRegistry: Record<string, TaskCallback>, builder: FlowBuilderBackend);
26
+ get workflowId(): string;
27
+ get definitionHash(): string;
28
+ /** Workflow-level metadata, or `undefined` if none was provided. */
29
+ get metadata(): Record<string, unknown> | undefined;
30
+ /**
31
+ * Return all nodes in topological (execution) order.
32
+ *
33
+ * Each {@link NodeInfo} carries the node's ID, kind, predecessor,
34
+ * and any configured timeout / retry / priority metadata.
35
+ * Useful for introspection, UI visualisation, and documentation.
36
+ */
37
+ iterNodes(): NodeInfo[];
38
+ }
39
+ /** A branch definition for fork/join. */
40
+ export interface BranchDef<TIn, TOut> {
41
+ readonly name: string;
42
+ readonly steps: readonly BranchStep[];
43
+ /** @internal — phantom type marker */
44
+ readonly _in?: TIn;
45
+ readonly _out?: TOut;
46
+ }
47
+ interface BranchStep {
48
+ taskId: string;
49
+ fn: TaskCallback;
50
+ metadata?: TaskMetadata;
51
+ }
52
+ /** Infer the output types from a tuple of branch definitions. */
53
+ export type InferBranchOutputs<T extends readonly BranchDef<any, any>[]> = {
54
+ [K in keyof T]: T[K] extends BranchDef<any, infer O> ? O : never;
55
+ };
56
+ /**
57
+ * Create a branch for use with `.fork()`.
58
+ *
59
+ * ```ts
60
+ * flow<Order>("process")
61
+ * .then(chargePayment)
62
+ * .fork([
63
+ * branch("email", sendConfirmation),
64
+ * branch("ship", shipOrder),
65
+ * ])
66
+ * .join("finalize", ([email, ship]) => ({ email, ship }))
67
+ * .build();
68
+ * ```
69
+ */
70
+ export declare function branch<TIn, TOut>(name: string, fn: TaskFn<TIn, TOut> | ((input: TIn) => TOut | Promise<TOut>)): BranchDef<TIn, Awaited<TOut>>;
71
+ /** Options for creating a flow. */
72
+ export interface FlowOptions {
73
+ /** Workflow-level metadata (opaque to the engine). */
74
+ metadata?: Record<string, unknown>;
75
+ }
76
+ /** Factory type for creating FlowBuilderBackend instances. */
77
+ export type BuilderFactory = (name: string) => FlowBuilderBackend;
78
+ /**
79
+ * Create a `flow()` factory function bound to a specific builder backend.
80
+ *
81
+ * Each binding package (sayiir-nodejs, sayiir-cloudflare, etc.) calls this
82
+ * once with their native builder constructor.
83
+ */
84
+ export declare function createFlowFactory(factory: BuilderFactory): <TInput>(name: string, opts?: FlowOptions) => Flow<TInput>;
85
+ /** Type-safe workflow builder. */
86
+ export declare class Flow<TInput, TLast = TInput> {
87
+ /** @internal */
88
+ readonly _builder: FlowBuilderBackend;
89
+ /** @internal */
90
+ readonly _taskRegistry: Record<string, TaskCallback>;
91
+ /** @internal */
92
+ private _childCounter;
93
+ constructor(builder: FlowBuilderBackend, opts?: FlowOptions);
94
+ /**
95
+ * Add a sequential task step.
96
+ *
97
+ * Accepts either a `TaskFn` (created by `task()`) or an inline function with an id.
98
+ */
99
+ then<TOut>(fn: TaskFn<TLast, TOut>): Flow<TInput, Awaited<TOut>>;
100
+ then<TOut>(id: string, fn: ((input: TLast) => TOut | Promise<TOut>) | TaskFn<TLast, TOut>, opts?: StepOptions): Flow<TInput, Awaited<TOut>>;
101
+ /**
102
+ * Start a fork for parallel execution.
103
+ *
104
+ * ```ts
105
+ * .fork([
106
+ * branch("email", sendEmail),
107
+ * branch("sms", sendSms),
108
+ * ])
109
+ * .join("merge", ([email, sms]) => ({ email, sms }))
110
+ * ```
111
+ */
112
+ fork<TBranches extends readonly BranchDef<TLast, any>[]>(branches: [...TBranches]): ForkBuilder<TInput, TLast, TBranches>;
113
+ /**
114
+ * Add a durable delay. No workers are held during the delay.
115
+ *
116
+ * Duration can be a number (ms) or a string like "30s", "5m", "1h".
117
+ */
118
+ delay(id: string, duration: Duration): Flow<TInput, TLast>;
119
+ /**
120
+ * Wait for an external signal before continuing.
121
+ *
122
+ * The workflow parks and releases the worker until the signal arrives.
123
+ */
124
+ waitForSignal<TSignal = unknown>(id: string, signalName: string, opts?: {
125
+ timeout?: Duration;
126
+ }): Flow<TInput, TSignal>;
127
+ /**
128
+ * Start a conditional branch based on a routing key.
129
+ *
130
+ * The `keys` array declares all valid routing keys up front, providing
131
+ * type-level safety: the key function's return type and `.branch()` key
132
+ * parameter are constrained to the declared set.
133
+ *
134
+ * ```ts
135
+ * flow<Ticket>("classify")
136
+ * .then("classify", classify)
137
+ * .route((result) => result.intent, ["billing", "tech"] as const)
138
+ * .branch("billing", handleBilling)
139
+ * .branch("tech", handleTech)
140
+ * .done()
141
+ * .then("finalize", finalizeStep)
142
+ * .build();
143
+ * ```
144
+ */
145
+ route<const TKeys extends readonly string[]>(keyFn: TaskFn<TLast, TKeys[number]> | ((input: TLast) => TKeys[number] | Promise<TKeys[number]>), keys: TKeys): RouteBuilder<TInput, TLast, never, TKeys[number]>;
146
+ /**
147
+ * Add a loop step whose body repeats until it returns `LoopResult.done()`.
148
+ *
149
+ * The body task receives the current value and must return a `LoopResult<T>`.
150
+ * `LoopResult.again(newValue)` continues the loop; `LoopResult.done(finalValue)` exits.
151
+ *
152
+ * ```ts
153
+ * flow<string>("refine")
154
+ * .loop("refine", (draft) => {
155
+ * const improved = improve(draft);
156
+ * return isGood(improved) ? LoopResult.done(improved) : LoopResult.again(improved);
157
+ * }, { maxIterations: 5 })
158
+ * .build();
159
+ * ```
160
+ */
161
+ loop<TOut>(fn: TaskFn<TLast, LoopResult<TOut>>, opts?: LoopOptions): Flow<TInput, TOut>;
162
+ loop<TOut>(id: string, fn: ((input: TLast) => LoopResult<TOut> | Promise<LoopResult<TOut>>) | TaskFn<TLast, LoopResult<TOut>>, opts?: LoopOptions): Flow<TInput, TOut>;
163
+ /**
164
+ * Compose another workflow inline as a child.
165
+ *
166
+ * The child workflow's tasks execute as a sub-pipeline: the current
167
+ * step's output feeds into the child's first task, and the child's
168
+ * final output continues to the next step.
169
+ *
170
+ * ```ts
171
+ * const child = flow<number>("double").then("x2", (n) => n * 2).build();
172
+ * const parent = flow<number>("pipeline").then("inc", (n) => n + 1).thenFlow(child).build();
173
+ * ```
174
+ */
175
+ thenFlow<TOut>(workflow: Workflow<TLast, TOut>): Flow<TInput, Awaited<TOut>>;
176
+ /** Build the workflow definition. */
177
+ build(): Workflow<TInput, TLast>;
178
+ }
179
+ /** Builder for fork/join parallel branches. */
180
+ export declare class ForkBuilder<TInput, TLast, TBranches extends readonly BranchDef<TLast, any>[]> {
181
+ private readonly flow;
182
+ private readonly branches;
183
+ constructor(flow: Flow<TInput, TLast>, branches: TBranches);
184
+ /**
185
+ * Join branches with a combining function.
186
+ *
187
+ * The join function receives a tuple of branch outputs.
188
+ */
189
+ join<TOut>(id: string, fn: (branches: InferBranchOutputs<TBranches>) => TOut | Promise<TOut>): Flow<TInput, Awaited<TOut>>;
190
+ }
191
+ /** Discriminated envelope wrapping a branch result. */
192
+ export interface BranchEnvelope<T> {
193
+ branch: string;
194
+ result: T;
195
+ }
196
+ /** Builder for conditional branching (route). */
197
+ export declare class RouteBuilder<TInput, TLast, TBranchOut = never, TKey extends string = string> {
198
+ private readonly flow;
199
+ private readonly keyFn;
200
+ private readonly declaredKeys;
201
+ private readonly branches;
202
+ private defaultSteps;
203
+ constructor(flow: Flow<TInput, TLast>, keyFn: TaskCallback, declaredKeys: string[]);
204
+ /**
205
+ * Add a named branch.
206
+ *
207
+ * The key must be one of the keys declared in the `route()` call.
208
+ *
209
+ * ```ts
210
+ * .route((r) => r.intent, ["billing", "tech"] as const)
211
+ * .branch("billing", handleBilling)
212
+ * .branch("tech", handleTech)
213
+ * .done()
214
+ * ```
215
+ */
216
+ branch<TOut>(key: TKey, fn: TaskFn<TLast, TOut> | ((input: TLast) => TOut | Promise<TOut>)): RouteBuilder<TInput, TLast, TBranchOut | Awaited<TOut>, TKey>;
217
+ branch<TOut>(key: TKey, id: string, fn: ((input: TLast) => TOut | Promise<TOut>) | TaskFn<TLast, TOut>): RouteBuilder<TInput, TLast, TBranchOut | Awaited<TOut>, TKey>;
218
+ /** Add a default branch for unmatched keys. */
219
+ defaultBranch<TOut>(fn: TaskFn<TLast, TOut> | ((input: TLast) => TOut | Promise<TOut>)): RouteBuilder<TInput, TLast, TBranchOut | Awaited<TOut>, TKey>;
220
+ defaultBranch<TOut>(id: string, fn: ((input: TLast) => TOut | Promise<TOut>) | TaskFn<TLast, TOut>): RouteBuilder<TInput, TLast, TBranchOut | Awaited<TOut>, TKey>;
221
+ /**
222
+ * Finish the route and return to the Flow builder.
223
+ *
224
+ * Performs exhaustiveness checks:
225
+ * - Throws if a declared key has no `.branch()` call and no `.defaultBranch()`.
226
+ * - Throws if a `.branch()` key is not in the declared set.
227
+ */
228
+ done(): Flow<TInput, BranchEnvelope<TBranchOut>>;
229
+ }
230
+ export {};
231
+ //# sourceMappingURL=flow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAGV,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,YAAY,EACb,MAAM,iBAAiB,CAAC;AAQzB,+CAA+C;AAE/C,qBAAa,QAAQ,CAAC,GAAG,EAAE,IAAI;IAC7B,gBAAgB;IAChB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,gBAAgB;I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