@fluidgrids/workflows 2026.1027.0 → 2026.1028.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/README.md +170 -18
- package/dist/activation-BBh1p82z.d.cts +57 -0
- package/dist/activation-DnhG7SmF.d.ts +57 -0
- package/dist/assemble-BLqQ8lSu.d.cts +39 -0
- package/dist/assemble-DWgaXHd-.d.ts +39 -0
- package/dist/chunk-2DP2Y6EU.cjs +832 -0
- package/dist/chunk-2J6TF7YI.cjs +86 -0
- package/dist/chunk-3FOTFQ3J.js +1622 -0
- package/dist/chunk-4LYSEANA.js +199 -0
- package/dist/{chunk-KUTMY2IO.cjs → chunk-57MSZ24T.cjs} +162 -98
- package/dist/{chunk-BWSLWF2E.js → chunk-5HDSBTBX.js} +99 -32
- package/dist/chunk-623FVQSN.cjs +251 -0
- package/dist/{chunk-4DPEGDPW.js → chunk-6FSHT5IL.js} +4 -4
- package/dist/{chunk-REV7ZOA4.js → chunk-7AAZGVKD.js} +1 -35
- package/dist/chunk-7NQ37GZU.js +73 -0
- package/dist/chunk-ABFZWYHT.js +612 -0
- package/dist/{chunk-SS4LT2IP.js → chunk-BD7ZPG53.js} +5 -10
- package/dist/chunk-BO6OVILK.js +79 -0
- package/dist/chunk-C5OLWZ42.js +245 -0
- package/dist/chunk-CBL5JSCC.cjs +75 -0
- package/dist/{chunk-LSKSBVL4.cjs → chunk-CPDK3K5N.cjs} +6 -6
- package/dist/chunk-CSNWNFKU.cjs +1635 -0
- package/dist/chunk-DJYMDLV5.js +227 -0
- package/dist/{chunk-X4HKU3MX.js → chunk-E2VK7J2C.js} +3 -1
- package/dist/chunk-FMSW2HDF.cjs +267 -0
- package/dist/chunk-FQIHX7YI.cjs +80 -0
- package/dist/chunk-FR7KYWRO.cjs +41 -0
- package/dist/{chunk-AU3YW7FZ.cjs → chunk-GBQ33SIZ.cjs} +46 -51
- package/dist/{chunk-RRQ5HOBF.cjs → chunk-GVTZMA5C.cjs} +4 -4
- package/dist/chunk-H7KEVW2M.js +816 -0
- package/dist/chunk-HR3BN4C4.cjs +27 -0
- package/dist/chunk-IISBRUWJ.js +13 -0
- package/dist/chunk-JD2VQIDZ.cjs +15 -0
- package/dist/{chunk-PL73GJR4.js → chunk-JZ4TOOLN.js} +1 -1
- package/dist/chunk-L24YIZY7.cjs +207 -0
- package/dist/chunk-LNUQE6D6.js +39 -0
- package/dist/{chunk-BYJ7QTLY.cjs → chunk-NEIUQASE.cjs} +13 -13
- package/dist/chunk-P6TA5EZT.cjs +634 -0
- package/dist/chunk-PDHLTDZB.js +72 -0
- package/dist/chunk-PMCM2OH4.js +46 -0
- package/dist/chunk-PZCVF76Q.cjs +868 -0
- package/dist/{chunk-GO34UHSY.js → chunk-QAN5MZEM.js} +3 -3
- package/dist/{chunk-27HASETB.cjs → chunk-QKZL3ONM.cjs} +3 -1
- package/dist/chunk-SAENRNBJ.cjs +52 -0
- package/dist/{chunk-LMX35GNQ.js → chunk-SMCANK3F.js} +5 -4
- package/dist/{chunk-IZQNUNSU.cjs → chunk-SX2PNKKT.cjs} +18 -17
- package/dist/{chunk-LRM6JXJA.cjs → chunk-TBDXTV22.cjs} +0 -37
- package/dist/chunk-VOKMAAJP.js +848 -0
- package/dist/chunk-XB53G2DK.js +25 -0
- package/dist/chunk-Z2Y65YOY.cjs +7 -0
- package/dist/codegen/index.cjs +9 -7
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/codegen/index.js +6 -5
- package/dist/file-BOoHZgoQ.d.cts +1557 -0
- package/dist/file-yuPCFU5b.d.ts +1557 -0
- package/dist/history/index.cjs +287 -0
- package/dist/history/index.d.cts +157 -0
- package/dist/history/index.d.ts +157 -0
- package/dist/history/index.js +5 -0
- package/dist/index.cjs +134 -36
- package/dist/index.d.cts +137 -9
- package/dist/index.d.ts +137 -9
- package/dist/index.js +8 -3
- package/dist/ir/index.cjs +161 -165
- package/dist/ir/index.d.cts +32 -12
- package/dist/ir/index.d.ts +32 -12
- package/dist/ir/index.js +54 -61
- package/dist/lower-BuSvAFqi.d.cts +129 -0
- package/dist/lower-C_Qv_34S.d.ts +129 -0
- package/dist/lower-types-nofRXw9c.d.cts +15 -0
- package/dist/lower-types-nofRXw9c.d.ts +15 -0
- package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
- package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
- package/dist/node-evaluator-CJNP4GHX.js +12 -0
- package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
- package/dist/quickjs/index.cjs +256 -78
- package/dist/quickjs/index.d.cts +48 -7
- package/dist/quickjs/index.d.ts +48 -7
- package/dist/quickjs/index.js +254 -79
- package/dist/roundtrip/index.cjs +404 -129
- package/dist/roundtrip/index.d.cts +43 -8
- package/dist/roundtrip/index.d.ts +43 -8
- package/dist/roundtrip/index.js +260 -19
- package/dist/runtime/index.cjs +90 -0
- package/dist/runtime/index.d.cts +297 -0
- package/dist/runtime/index.d.ts +297 -0
- package/dist/runtime/index.js +8 -0
- package/dist/testing/index.cjs +1057 -0
- package/dist/testing/index.d.cts +305 -0
- package/dist/testing/index.d.ts +305 -0
- package/dist/testing/index.js +1037 -0
- package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
- package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
- package/dist/types-CpBBjaGX.d.cts +380 -0
- package/dist/types-DV-HX_Gt.d.ts +380 -0
- package/dist/{assemble-DMOuaxRI.d.ts → workflow-Bpr3vnA_.d.ts} +60 -162
- package/dist/workflow-C2a05WUJ.d.ts +444 -0
- package/dist/{assemble-BJo9TECS.d.cts → workflow-FXUkpIBc.d.cts} +60 -162
- package/dist/workflow-J-yYixny.d.cts +444 -0
- package/fixtures/README.md +128 -0
- package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
- package/fixtures/histories/activity-retry-then-success.history.json +147 -0
- package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
- package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
- package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
- package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
- package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
- package/fixtures/histories/cancel-during-timer.history.json +123 -0
- package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
- package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
- package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
- package/fixtures/histories/child-cancel-default.history.json +234 -0
- package/fixtures/histories/child-cancel-request.history.json +206 -0
- package/fixtures/histories/child-durable-child-side.history.json +124 -0
- package/fixtures/histories/child-durable-result.history.json +163 -0
- package/fixtures/histories/child-failure-caught.history.json +166 -0
- package/fixtures/histories/child-graph-by-key.history.json +138 -0
- package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
- package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
- package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
- package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
- package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
- package/fixtures/histories/details-and-context.history.json +176 -0
- package/fixtures/histories/deterministic-values.history.json +128 -0
- package/fixtures/histories/engine-builtins.history.json +172 -0
- package/fixtures/histories/gather-activities.history.json +291 -0
- package/fixtures/histories/gather-all-settled.history.json +219 -0
- package/fixtures/histories/gather-mixed.history.json +281 -0
- package/fixtures/histories/input-during-running-task.history.json +111 -0
- package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
- package/fixtures/histories/patched-deprecated.history.json +271 -0
- package/fixtures/histories/patched-new-run.history.json +270 -0
- package/fixtures/histories/patched-old-history.history.json +190 -0
- package/fixtures/histories/race-activity-wins.history.json +152 -0
- package/fixtures/histories/race-signal-beats-child.history.json +161 -0
- package/fixtures/histories/race-timeout-wins.history.json +118 -0
- package/fixtures/histories/side-effect-recorded.history.json +153 -0
- package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
- package/fixtures/histories/signal-default-handler.history.json +187 -0
- package/fixtures/histories/signal-handler.history.json +191 -0
- package/fixtures/histories/signal-parent-child-side.history.json +132 -0
- package/fixtures/histories/signal-parent.history.json +202 -0
- package/fixtures/histories/signal-run-delivered.history.json +128 -0
- package/fixtures/histories/signal-run-undelivered.history.json +134 -0
- package/fixtures/histories/signal-wait.history.json +111 -0
- package/fixtures/histories/task-failure-code-error.history.json +137 -0
- package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
- package/fixtures/histories/timer-condition-met.history.json +201 -0
- package/fixtures/histories/timer-condition-timeout.history.json +118 -0
- package/fixtures/histories/timer-sleep-once.history.json +118 -0
- package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
- package/fixtures/histories/update-accepted-completed.history.json +149 -0
- package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
- package/package.json +85 -20
- package/schema/history-file.schema.json +2544 -0
- package/schema/ir-v2.schema.json +16 -0
- package/schema/run-event.schema.json +2374 -0
- package/schema/workflow-command.schema.json +1095 -0
- package/schema/workflow-task.schema.json +3560 -0
- package/dist/chunk-265J2FCH.cjs +0 -33
- package/dist/chunk-LUXCXFOE.cjs +0 -269
- package/dist/chunk-S34NJE3A.js +0 -262
- package/dist/chunk-SRQRLWOS.js +0 -31
- package/dist/lower-DcOY8ux0.d.cts +0 -49
- package/dist/lower-Dw5grNrI.d.ts +0 -49
- package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
- package/dist/node-evaluator-RMYEWCXZ.js +0 -8
|
@@ -1,127 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Node operation descriptors: what a builder call needs to know about the node
|
|
5
|
-
* it emits. Generated clients (`.fluidgrids/nodes.ts`) are lists of these;
|
|
6
|
-
* the built-in internal nodes and triggers ship here so `nodes.internal.*` and
|
|
7
|
-
* `triggers.*` work without a registry.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/** A file reference in node inputs and outputs. */
|
|
11
|
-
interface FileRef {
|
|
12
|
-
fileId: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
mimeType?: string;
|
|
15
|
-
size?: number;
|
|
16
|
-
}
|
|
17
|
-
declare const OPERATION_TYPES: unique symbol;
|
|
18
|
-
/** One node operation. `In` and `Out` type the arguments and the output. */
|
|
19
|
-
interface Operation<In = Record<string, Json>, Out = Json> {
|
|
20
|
-
readonly kind: 'operation';
|
|
21
|
-
readonly nodeType: string;
|
|
22
|
-
/** Written as the node's `version` unless the call overrides it. */
|
|
23
|
-
readonly version?: string;
|
|
24
|
-
/** Written as the node's `operation_name` unless the call overrides it. */
|
|
25
|
-
readonly operation?: string;
|
|
26
|
-
readonly role?: 'trigger';
|
|
27
|
-
/** Type-level only; never present at run time. */
|
|
28
|
-
readonly [OPERATION_TYPES]?: {
|
|
29
|
-
input: In;
|
|
30
|
-
output: Out;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/** A trigger operation. */
|
|
34
|
-
type TriggerOperation<In = Record<string, Json>, Out = Json> = Operation<In, Out> & {
|
|
35
|
-
readonly role: 'trigger';
|
|
36
|
-
};
|
|
37
|
-
/** Describe a node operation (generated clients call this). */
|
|
38
|
-
declare function op<In = Record<string, Json>, Out = Json>(nodeType: string, version?: string, operation?: string): Operation<In, Out>;
|
|
39
|
-
/** Describe a trigger operation (generated clients call this). */
|
|
40
|
-
declare function trigger<In = Record<string, Json>, Out = Json>(nodeType: string, version?: string, operation?: string): TriggerOperation<In, Out>;
|
|
41
|
-
/** True for a value made by {@link op} or {@link trigger}. */
|
|
42
|
-
declare function isOperation(value: unknown): value is Operation<unknown, unknown>;
|
|
43
|
-
/** Built-in trigger nodes (`wspace-workflow-svc` `triggers/manifests`). */
|
|
44
|
-
declare const triggers: {
|
|
45
|
-
readonly api: TriggerOperation<Record<string, Json>, Json>;
|
|
46
|
-
readonly manual: TriggerOperation<Record<string, Json>, Json>;
|
|
47
|
-
readonly schedule: TriggerOperation<Record<string, Json>, Json>;
|
|
48
|
-
readonly webhook: TriggerOperation<Record<string, Json>, Json>;
|
|
49
|
-
readonly form: TriggerOperation<Record<string, Json>, Json>;
|
|
50
|
-
readonly errorTrigger: TriggerOperation<Record<string, Json>, Json>;
|
|
51
|
-
readonly workflowCall: TriggerOperation<Record<string, Json>, Json>;
|
|
52
|
-
readonly rssFeed: TriggerOperation<Record<string, Json>, Json>;
|
|
53
|
-
readonly httpPoll: TriggerOperation<Record<string, Json>, Json>;
|
|
54
|
-
readonly databasePoll: TriggerOperation<Record<string, Json>, Json>;
|
|
55
|
-
readonly emailImap: TriggerOperation<Record<string, Json>, Json>;
|
|
56
|
-
readonly fileUpload: TriggerOperation<Record<string, Json>, Json>;
|
|
57
|
-
readonly recordChange: TriggerOperation<Record<string, Json>, Json>;
|
|
58
|
-
readonly stateChange: TriggerOperation<Record<string, Json>, Json>;
|
|
59
|
-
};
|
|
60
|
-
/** Built-in internal nodes (`wspace-workflow-svc` `internalnodes/manifests`, plus the two IR v2 nodes). */
|
|
61
|
-
declare const internalNodes: {
|
|
62
|
-
readonly merge: Operation<Record<string, Json>, Json>;
|
|
63
|
-
readonly if: Operation<Record<string, Json>, Json>;
|
|
64
|
-
readonly switch: Operation<Record<string, Json>, Json>;
|
|
65
|
-
readonly loop: Operation<Record<string, Json>, Json>;
|
|
66
|
-
readonly set: Operation<Record<string, Json>, Json>;
|
|
67
|
-
readonly filter: Operation<Record<string, Json>, Json>;
|
|
68
|
-
readonly aggregate: Operation<Record<string, Json>, Json>;
|
|
69
|
-
readonly wait: Operation<Record<string, Json>, Json>;
|
|
70
|
-
readonly noop: Operation<Record<string, Json>, Json>;
|
|
71
|
-
readonly code: Operation<Record<string, Json>, Json>;
|
|
72
|
-
readonly http: Operation<Record<string, Json>, Json>;
|
|
73
|
-
readonly transform: Operation<Record<string, Json>, Json>;
|
|
74
|
-
readonly validate: Operation<Record<string, Json>, Json>;
|
|
75
|
-
readonly log: Operation<Record<string, Json>, Json>;
|
|
76
|
-
readonly error: Operation<Record<string, Json>, Json>;
|
|
77
|
-
readonly subworkflow: Operation<Record<string, Json>, Json>;
|
|
78
|
-
readonly compareDatasets: Operation<Record<string, Json>, Json>;
|
|
79
|
-
readonly splitOut: Operation<Record<string, Json>, Json>;
|
|
80
|
-
readonly limit: Operation<Record<string, Json>, Json>;
|
|
81
|
-
readonly dedupe: Operation<Record<string, Json>, Json>;
|
|
82
|
-
readonly sort: Operation<Record<string, Json>, Json>;
|
|
83
|
-
readonly dataTable: Operation<Record<string, Json>, Json>;
|
|
84
|
-
readonly respondToWebhook: Operation<Record<string, Json>, Json>;
|
|
85
|
-
readonly sendAndWait: Operation<Record<string, Json>, Json>;
|
|
86
|
-
readonly codeWorkflow: Operation<Record<string, Json>, Json>;
|
|
87
|
-
readonly waitForSignal: Operation<Record<string, Json>, Json>;
|
|
88
|
-
};
|
|
89
|
-
/** Node clients that need no registry: the internal nodes and `custom()`. */
|
|
90
|
-
declare const nodes: {
|
|
91
|
-
readonly internal: {
|
|
92
|
-
readonly merge: Operation<Record<string, Json>, Json>;
|
|
93
|
-
readonly if: Operation<Record<string, Json>, Json>;
|
|
94
|
-
readonly switch: Operation<Record<string, Json>, Json>;
|
|
95
|
-
readonly loop: Operation<Record<string, Json>, Json>;
|
|
96
|
-
readonly set: Operation<Record<string, Json>, Json>;
|
|
97
|
-
readonly filter: Operation<Record<string, Json>, Json>;
|
|
98
|
-
readonly aggregate: Operation<Record<string, Json>, Json>;
|
|
99
|
-
readonly wait: Operation<Record<string, Json>, Json>;
|
|
100
|
-
readonly noop: Operation<Record<string, Json>, Json>;
|
|
101
|
-
readonly code: Operation<Record<string, Json>, Json>;
|
|
102
|
-
readonly http: Operation<Record<string, Json>, Json>;
|
|
103
|
-
readonly transform: Operation<Record<string, Json>, Json>;
|
|
104
|
-
readonly validate: Operation<Record<string, Json>, Json>;
|
|
105
|
-
readonly log: Operation<Record<string, Json>, Json>;
|
|
106
|
-
readonly error: Operation<Record<string, Json>, Json>;
|
|
107
|
-
readonly subworkflow: Operation<Record<string, Json>, Json>;
|
|
108
|
-
readonly compareDatasets: Operation<Record<string, Json>, Json>;
|
|
109
|
-
readonly splitOut: Operation<Record<string, Json>, Json>;
|
|
110
|
-
readonly limit: Operation<Record<string, Json>, Json>;
|
|
111
|
-
readonly dedupe: Operation<Record<string, Json>, Json>;
|
|
112
|
-
readonly sort: Operation<Record<string, Json>, Json>;
|
|
113
|
-
readonly dataTable: Operation<Record<string, Json>, Json>;
|
|
114
|
-
readonly respondToWebhook: Operation<Record<string, Json>, Json>;
|
|
115
|
-
readonly sendAndWait: Operation<Record<string, Json>, Json>;
|
|
116
|
-
readonly codeWorkflow: Operation<Record<string, Json>, Json>;
|
|
117
|
-
readonly waitForSignal: Operation<Record<string, Json>, Json>;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Any node type, including ones the registry snapshot does not know. Typed
|
|
121
|
-
* as JSON in and out.
|
|
122
|
-
*/
|
|
123
|
-
readonly custom: (nodeType: string, operation?: string, version?: string) => Operation<Record<string, Json>, Json>;
|
|
124
|
-
};
|
|
1
|
+
import { a as Json, J as JsonObject, d as ConnectionRef, L as LegacyCredentialRef, R as RetryConfig, g as NodeTimeout, f as NodeErrorConfig, e as ExecutionSettings, m as WorkflowNode, l as WorkflowEdge, k as WorkflowConfig, W as WorkflowInterface, j as WorkflowCode } from './types-BGoPzgcl.cjs';
|
|
2
|
+
import { h as DurableWorkflow, O as Operation } from './workflow-J-yYixny.cjs';
|
|
125
3
|
|
|
126
4
|
/**
|
|
127
5
|
* Typed references and predicates for the tier-1 builder (spec 02 §3).
|
|
@@ -270,7 +148,11 @@ interface CompareRef extends NodeRef {
|
|
|
270
148
|
}
|
|
271
149
|
/** Options of an explicit edge, made with {@link edge}. */
|
|
272
150
|
interface EdgeOptions {
|
|
273
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Edge id. Default: `e-<source>-<target>[-<sourceHandle>][-<targetHandle>]`, with
|
|
153
|
+
* `-2`, `-3`, … added in declaration order when that id is already taken;
|
|
154
|
+
* `false` writes none.
|
|
155
|
+
*/
|
|
274
156
|
id?: string | false;
|
|
275
157
|
/** Edge type. Default `deletable` (what the canvas writes); `false` writes none. */
|
|
276
158
|
type?: string | false;
|
|
@@ -379,15 +261,26 @@ interface Tier1Recording {
|
|
|
379
261
|
edgeOrder?: Array<string | number>;
|
|
380
262
|
notes: RecordedNote[];
|
|
381
263
|
}
|
|
264
|
+
/** A `wf.codeWorkflow` node whose `workflowFn` is resolved to an export name at collection. */
|
|
265
|
+
interface DurableRef {
|
|
266
|
+
nodeId: string;
|
|
267
|
+
definition: DurableWorkflow<never, unknown>;
|
|
268
|
+
}
|
|
382
269
|
/** The value `defineWorkflow` returns. */
|
|
383
270
|
interface Tier1Workflow {
|
|
384
271
|
readonly __fluidgrids: typeof WORKFLOW_MARKER;
|
|
385
272
|
readonly key: string;
|
|
386
273
|
readonly recording: Tier1Recording;
|
|
274
|
+
/** `wf.codeWorkflow` calls given a function; not part of the recording JSON. */
|
|
275
|
+
readonly durableRefs?: readonly DurableRef[];
|
|
387
276
|
}
|
|
388
277
|
/** True for a value returned by {@link defineWorkflow}. */
|
|
389
278
|
declare function isTier1Workflow(value: unknown): value is Tier1Workflow;
|
|
390
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* Default edge id, the scheme the AI draft generator uses. Ids may contain `-`,
|
|
281
|
+
* so two edges can share a default id (`a` to `b-c` and `a-b` to `c`); the
|
|
282
|
+
* builder then gives the later edges `-2`, `-3`, … in declaration order.
|
|
283
|
+
*/
|
|
391
284
|
declare function defaultEdgeId(source: string, target: string, sourceHandle?: string, targetHandle?: string): string;
|
|
392
285
|
/** Options of `wf.if`. */
|
|
393
286
|
interface IfOptions extends NodeOptions {
|
|
@@ -422,6 +315,27 @@ interface WaitForSignalOptions extends NodeOptions {
|
|
|
422
315
|
amount: number;
|
|
423
316
|
unit: string;
|
|
424
317
|
};
|
|
318
|
+
/** `limitWaitUntil`: an absolute deadline (ISO 8601). Give `limit` or `until`, not both. */
|
|
319
|
+
until?: string | Date;
|
|
320
|
+
/** `first` (default) resumes with one signal; `all` collects every buffered one. */
|
|
321
|
+
consume?: 'first' | 'all';
|
|
322
|
+
}
|
|
323
|
+
/** Options of `wf.codeWorkflow`. */
|
|
324
|
+
interface CodeWorkflowOptions extends NodeOptions {
|
|
325
|
+
/** `inputMapping`; default passthrough. */
|
|
326
|
+
input?: ArgValue;
|
|
327
|
+
/** Default `managed` (the only queue in Phase B). */
|
|
328
|
+
taskQueue?: string;
|
|
329
|
+
/** Default true. */
|
|
330
|
+
waitForCompletion?: boolean;
|
|
331
|
+
/** Node-level timeout in seconds; 0 or absent means none. */
|
|
332
|
+
timeoutSeconds?: number;
|
|
333
|
+
failOnError?: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* Default (DB13, applied by the service when absent): `TERMINATE` when the
|
|
336
|
+
* node waits for completion, `ABANDON` when it does not.
|
|
337
|
+
*/
|
|
338
|
+
parentClosePolicy?: 'TERMINATE' | 'ABANDON' | 'REQUEST_CANCEL';
|
|
425
339
|
}
|
|
426
340
|
/** Options of `wf.subworkflow`. */
|
|
427
341
|
interface SubworkflowOptions extends NodeOptions {
|
|
@@ -447,8 +361,12 @@ declare class WorkflowBuilder {
|
|
|
447
361
|
private readonly edges;
|
|
448
362
|
private readonly notes;
|
|
449
363
|
private readonly ids;
|
|
364
|
+
/** Ids given explicitly; a second edge with the same explicit id is an error. */
|
|
450
365
|
private readonly edgeIds;
|
|
366
|
+
/** Edges whose id is the default, as indices into `edges`, with the unsuffixed default id. */
|
|
367
|
+
private readonly defaultIds;
|
|
451
368
|
private edgeOrder;
|
|
369
|
+
private readonly durableRefs;
|
|
452
370
|
constructor(autoIds: boolean);
|
|
453
371
|
/** A reference to a node by id, for nodes declared later in the source. */
|
|
454
372
|
ref(id: string): NodeRef;
|
|
@@ -476,6 +394,14 @@ declare class WorkflowBuilder {
|
|
|
476
394
|
sendAndWait(options: NodeOptions): ApprovalRef;
|
|
477
395
|
/** `internal:subworkflow`. */
|
|
478
396
|
subworkflow(options: SubworkflowOptions): NodeRef;
|
|
397
|
+
/**
|
|
398
|
+
* `internal:code-workflow`: run a tier-2 function of this project as a
|
|
399
|
+
* durable child run. `fn` is a `workflow()` value (its export name is
|
|
400
|
+
* resolved when the bundle is collected) or an export name.
|
|
401
|
+
*/
|
|
402
|
+
codeWorkflow(fn: DurableWorkflow<never, unknown> | string, options?: CodeWorkflowOptions): NodeRef;
|
|
403
|
+
/** The `wf.codeWorkflow` calls that named a function. */
|
|
404
|
+
durableReferences(): DurableRef[];
|
|
479
405
|
/** `internal:validate`. */
|
|
480
406
|
validate(options: NodeOptions): ValidateRef;
|
|
481
407
|
/** `internal:compare-datasets`. */
|
|
@@ -525,45 +451,17 @@ declare class WorkflowBuilder {
|
|
|
525
451
|
finish(key: string, document: JsonObject): Tier1Recording;
|
|
526
452
|
private claimId;
|
|
527
453
|
private resolveId;
|
|
454
|
+
/**
|
|
455
|
+
* Give every edge declared without an id its default id. Explicit ids are
|
|
456
|
+
* claimed first, so a default never takes an id the code names; a default that
|
|
457
|
+
* is taken gets `-2`, `-3`, … in declaration order. The result depends only on
|
|
458
|
+
* the builder calls.
|
|
459
|
+
*/
|
|
460
|
+
private assignDefaultEdgeIds;
|
|
528
461
|
private addEdge;
|
|
529
462
|
private add;
|
|
530
463
|
}
|
|
531
464
|
/** Define a tier-1 workflow. The callback runs once, immediately. */
|
|
532
465
|
declare function defineWorkflow(options: WorkflowOptions, build: (wf: WorkflowBuilder) => void): Tier1Workflow;
|
|
533
466
|
|
|
534
|
-
|
|
535
|
-
declare const LAYOUT_FORMAT_VERSION = 1;
|
|
536
|
-
/**
|
|
537
|
-
* The layout sidecar (`workflows/<key>.layout.json`): canvas positions, sticky
|
|
538
|
-
* notes and `meta.layout`, kept out of the code so it stays readable.
|
|
539
|
-
*/
|
|
540
|
-
interface LayoutSidecar {
|
|
541
|
-
format: typeof LAYOUT_FORMAT;
|
|
542
|
-
formatVersion: typeof LAYOUT_FORMAT_VERSION;
|
|
543
|
-
positions: Record<string, Position>;
|
|
544
|
-
stickyNotes?: JsonObject[];
|
|
545
|
-
metaLayout?: JsonObject;
|
|
546
|
-
}
|
|
547
|
-
/** How connection names in code resolve to connection references. */
|
|
548
|
-
type ConnectionResolver = Readonly<Record<string, ConnectionRef>> | ((name: string) => ConnectionRef | undefined);
|
|
549
|
-
interface AssembleOptions {
|
|
550
|
-
layout?: LayoutSidecar;
|
|
551
|
-
connections?: ConnectionResolver;
|
|
552
|
-
/** TEST-only pinned data (`workflows/<key>.pinned.json`). */
|
|
553
|
-
pinnedData?: JsonObject;
|
|
554
|
-
/** Provenance; defaults to `{ mode: 'canvas', generator: 'sdk-ts', generatorVersion }`. */
|
|
555
|
-
authoring?: WorkflowAuthoring;
|
|
556
|
-
}
|
|
557
|
-
/** Connection names used in code that the target workspace does not have. */
|
|
558
|
-
declare class UnresolvedConnectionsError extends Error {
|
|
559
|
-
readonly names: string[];
|
|
560
|
-
constructor(names: string[]);
|
|
561
|
-
}
|
|
562
|
-
/** Validate a parsed layout sidecar. */
|
|
563
|
-
declare function parseLayoutSidecar(value: unknown): LayoutSidecar;
|
|
564
|
-
/** Assemble IR v2 from a recording. */
|
|
565
|
-
declare function assembleRecording(recording: Tier1Recording, options?: AssembleOptions): WorkflowDefinition;
|
|
566
|
-
/** Lower a tier-1 workflow to IR v2 (spec 10 §1 `toIR`). */
|
|
567
|
-
declare function toIR(workflow: Tier1Workflow, options?: AssembleOptions): WorkflowDefinition;
|
|
568
|
-
|
|
569
|
-
export { defineWorkflow as $, type AfterInput as A, BuilderError as B, type CompareRef as C, type SwitchOptions as D, type EdgeOptions as E, type FileRef as F, type SwitchRef as G, type HandleRef as H, type IfOptions as I, type Tier1Workflow as J, type TriggerOperation as K, LAYOUT_FORMAT as L, type MergeOptions as M, type NodeOptions as N, type OnErrorOption as O, PREDICATE_OPERATORS as P, WorkflowBuilder as Q, RECORDING_FORMAT as R, type SignalWaitRef as S, type Tier1Recording as T, UnresolvedConnectionsError as U, type ValidateRef as V, type WaitForSignalOptions as W, type WorkflowOptions as X, and as Y, assembleRecording as Z, defaultEdgeId as _, type AnyRef as a, edge as a0, expr as a1, internalNodes as a2, isOperation as a3, isTier1Workflow as a4, nodes as a5, op as a6, or as a7, parseLayoutSidecar as a8, toIR as a9, trigger as aa, triggers as ab, type ApprovalRef as b, type ArgValue as c, type ArgsOf as d, type AssembleOptions as e, type ConditionGroup as f, type ConditionRule as g, type ConnectionResolver as h, type EdgeSource as i, type EdgeSpec as j, type IfRef as k, LAYOUT_FORMAT_VERSION as l, type LayoutSidecar as m, type LoopOptions as n, type LoopRef as o, type NodeRef as p, type NoteOptions as q, type Operation as r, type OutputRef as s, type Predicate as t, type PredicateMethods as u, RECORDING_FORMAT_VERSION as v, type RecordedNode as w, type RecordedNote as x, type RuleValue as y, type SubworkflowOptions as z };
|
|
467
|
+
export { type AfterInput as A, BuilderError as B, type CodeWorkflowOptions as C, type DurableRef as D, type EdgeOptions as E, and as F, defaultEdgeId as G, type HandleRef as H, type IfOptions as I, defineWorkflow as J, edge as K, type LoopOptions as L, type MergeOptions as M, type NodeOptions as N, type OnErrorOption as O, PREDICATE_OPERATORS as P, expr as Q, RECORDING_FORMAT as R, type SignalWaitRef as S, type Tier1Recording as T, isTier1Workflow as U, type ValidateRef as V, type WaitForSignalOptions as W, or as X, type AnyRef as a, type ApprovalRef as b, type ArgValue as c, type ArgsOf as d, type CompareRef as e, type ConditionGroup as f, type ConditionRule as g, type EdgeSource as h, type EdgeSpec as i, type IfRef as j, type LoopRef as k, type NodeRef as l, type NoteOptions as m, type OutputRef as n, type Predicate as o, type PredicateMethods as p, RECORDING_FORMAT_VERSION as q, type RecordedNode as r, type RecordedNote as s, type RuleValue as t, type SubworkflowOptions as u, type SwitchOptions as v, type SwitchRef as w, type Tier1Workflow as x, WorkflowBuilder as y, type WorkflowOptions as z };
|