@fluidgrids/workflows 0.0.0-stage → 2026.1027.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/LICENSE +9 -0
- package/README.md +187 -2
- package/dist/assemble-BJo9TECS.d.cts +569 -0
- package/dist/assemble-DMOuaxRI.d.ts +569 -0
- package/dist/chunk-265J2FCH.cjs +33 -0
- package/dist/chunk-27HASETB.cjs +250 -0
- package/dist/chunk-4DPEGDPW.js +74 -0
- package/dist/chunk-5LUIDMF4.js +42 -0
- package/dist/chunk-AU3YW7FZ.cjs +279 -0
- package/dist/chunk-BWSLWF2E.js +722 -0
- package/dist/chunk-BYJ7QTLY.cjs +76 -0
- package/dist/chunk-G4UEPUGO.cjs +46 -0
- package/dist/chunk-GO34UHSY.js +95 -0
- package/dist/chunk-IZQNUNSU.cjs +931 -0
- package/dist/chunk-KUTMY2IO.cjs +745 -0
- package/dist/chunk-LMX35GNQ.js +893 -0
- package/dist/chunk-LRM6JXJA.cjs +181 -0
- package/dist/chunk-LSKSBVL4.cjs +102 -0
- package/dist/chunk-LUXCXFOE.cjs +269 -0
- package/dist/chunk-PL73GJR4.js +174 -0
- package/dist/chunk-REV7ZOA4.js +170 -0
- package/dist/chunk-RRQ5HOBF.cjs +185 -0
- package/dist/chunk-S34NJE3A.js +262 -0
- package/dist/chunk-SRQRLWOS.js +31 -0
- package/dist/chunk-SS4LT2IP.js +268 -0
- package/dist/chunk-X4HKU3MX.js +244 -0
- package/dist/codegen/index.cjs +18 -0
- package/dist/codegen/index.d.cts +15 -0
- package/dist/codegen/index.d.ts +15 -0
- package/dist/codegen/index.js +5 -0
- package/dist/expressions-DhHaqyar.d.cts +62 -0
- package/dist/expressions-DhHaqyar.d.ts +62 -0
- package/dist/hash-CZkTXPCX.d.cts +15 -0
- package/dist/hash-CZkTXPCX.d.ts +15 -0
- package/dist/index.cjs +117 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +4 -0
- package/dist/ir/index.cjs +1244 -0
- package/dist/ir/index.d.cts +828 -0
- package/dist/ir/index.d.ts +828 -0
- package/dist/ir/index.js +1120 -0
- package/dist/lower-DcOY8ux0.d.cts +49 -0
- package/dist/lower-Dw5grNrI.d.ts +49 -0
- package/dist/manifest-Bp9ZJlav.d.ts +60 -0
- package/dist/manifest-Duf-gHdO.d.cts +60 -0
- package/dist/node-evaluator-2GTUZVPK.cjs +17 -0
- package/dist/node-evaluator-RMYEWCXZ.js +8 -0
- package/dist/quickjs/index.cjs +92 -0
- package/dist/quickjs/index.d.cts +18 -0
- package/dist/quickjs/index.d.ts +18 -0
- package/dist/quickjs/index.js +90 -0
- package/dist/roundtrip/index.cjs +1375 -0
- package/dist/roundtrip/index.d.cts +287 -0
- package/dist/roundtrip/index.d.ts +287 -0
- package/dist/roundtrip/index.js +1328 -0
- package/dist/types-Dr2Fn1Ax.d.cts +225 -0
- package/dist/types-Dr2Fn1Ax.d.ts +225 -0
- package/package.json +117 -4
- package/schema/ir-v2.schema.json +655 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow IR, schema version 2 (spec 01).
|
|
3
|
+
*
|
|
4
|
+
* Version 2 is a strict superset of what the builder saves today: every stored
|
|
5
|
+
* definition (no `schemaVersion`, legacy mirrors under `data`, `config` on
|
|
6
|
+
* internal nodes) is a valid version-2 document. The canonical fields are typed
|
|
7
|
+
* here; anything else a stored definition carries is kept verbatim through the
|
|
8
|
+
* index signatures so a round trip never drops data.
|
|
9
|
+
*/
|
|
10
|
+
/** Any JSON value. */
|
|
11
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
12
|
+
[key: string]: Json;
|
|
13
|
+
};
|
|
14
|
+
/** A JSON object. */
|
|
15
|
+
type JsonObject = {
|
|
16
|
+
[key: string]: Json;
|
|
17
|
+
};
|
|
18
|
+
/** Error types shared by node error policies and code activities. */
|
|
19
|
+
type ErrorType = 'TIMEOUT' | 'TRANSIENT' | 'DEPENDENCY' | 'AUTHORIZATION' | 'VALIDATION' | 'PERMANENT' | 'UNKNOWN';
|
|
20
|
+
/** A node position on the canvas. */
|
|
21
|
+
interface Position {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}
|
|
25
|
+
/** Retry policy of a node (`errorConfig.retryConfig`). */
|
|
26
|
+
interface RetryConfig {
|
|
27
|
+
maxRetries: number;
|
|
28
|
+
retryDelay: number;
|
|
29
|
+
backoffMultiplier?: number;
|
|
30
|
+
maxDelay?: number;
|
|
31
|
+
retryOnErrorTypes?: ErrorType[];
|
|
32
|
+
nonRetryableErrorTypes?: string[];
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/** Per-node timeout (`errorConfig.timeout`). */
|
|
36
|
+
interface NodeTimeout {
|
|
37
|
+
duration: number;
|
|
38
|
+
onTimeout?: 'stop' | 'continue' | 'branch';
|
|
39
|
+
timeoutBranchId?: string;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/** Node error policy, read by the executor from `errorConfig`. */
|
|
43
|
+
interface NodeErrorConfig {
|
|
44
|
+
onError?: 'stop' | 'continue' | 'branch';
|
|
45
|
+
errorBranchId?: string;
|
|
46
|
+
retryConfig?: RetryConfig;
|
|
47
|
+
timeout?: NodeTimeout;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** Where a node runs: FluidGrids Cloud (absent) or a registered runner. */
|
|
51
|
+
interface RunOnSetting {
|
|
52
|
+
kind: string;
|
|
53
|
+
runnerId?: string;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/** Builder execution settings. */
|
|
57
|
+
interface ExecutionSettings {
|
|
58
|
+
alwaysOutputData?: boolean;
|
|
59
|
+
executeOnce?: boolean;
|
|
60
|
+
runOn?: RunOnSetting;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
/** A connection reference (connections are owned by wspace-integrations-svc). */
|
|
64
|
+
interface ConnectionRef {
|
|
65
|
+
connectionId: string;
|
|
66
|
+
adapter: string;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
/** A legacy credential reference (`args.credentials`, deprecated). */
|
|
70
|
+
interface LegacyCredentialRef {
|
|
71
|
+
id: string;
|
|
72
|
+
adapter: string;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
/** Node arguments. */
|
|
76
|
+
interface NodeArgs {
|
|
77
|
+
state?: JsonObject;
|
|
78
|
+
context?: JsonObject;
|
|
79
|
+
connections?: ConnectionRef[];
|
|
80
|
+
credentials?: LegacyCredentialRef[];
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
83
|
+
/** One workflow node. */
|
|
84
|
+
interface WorkflowNode {
|
|
85
|
+
id: string;
|
|
86
|
+
type: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
position?: Position;
|
|
89
|
+
operation_name?: string;
|
|
90
|
+
version?: string;
|
|
91
|
+
args?: NodeArgs;
|
|
92
|
+
errorConfig?: NodeErrorConfig;
|
|
93
|
+
executionSettings?: ExecutionSettings;
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
/** Builder UI bag. Legacy mirrors of the canonical fields may live here. */
|
|
96
|
+
data?: JsonObject;
|
|
97
|
+
/** Legacy parameter mirror (internal nodes read it below `args.state`). */
|
|
98
|
+
config?: JsonObject;
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}
|
|
101
|
+
/** One workflow edge. */
|
|
102
|
+
interface WorkflowEdge {
|
|
103
|
+
/** Absent on some API-created definitions; the builder and canvas always write one. */
|
|
104
|
+
id?: string;
|
|
105
|
+
source: string;
|
|
106
|
+
target: string;
|
|
107
|
+
sourceHandle?: string;
|
|
108
|
+
targetHandle?: string;
|
|
109
|
+
type?: string;
|
|
110
|
+
label?: string;
|
|
111
|
+
data?: JsonObject;
|
|
112
|
+
mapping?: JsonObject;
|
|
113
|
+
[key: string]: unknown;
|
|
114
|
+
}
|
|
115
|
+
/** The typed contract of a workflow (spec 01 §4). */
|
|
116
|
+
interface WorkflowInterface {
|
|
117
|
+
input?: JsonObject;
|
|
118
|
+
output?: JsonObject;
|
|
119
|
+
signals?: {
|
|
120
|
+
[name: string]: {
|
|
121
|
+
payload?: JsonObject;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
queries?: {
|
|
126
|
+
[name: string]: {
|
|
127
|
+
args?: JsonObject;
|
|
128
|
+
result?: JsonObject;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
updates?: {
|
|
133
|
+
[name: string]: {
|
|
134
|
+
args?: JsonObject;
|
|
135
|
+
result?: JsonObject;
|
|
136
|
+
[key: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
open?: {
|
|
140
|
+
signals?: boolean;
|
|
141
|
+
queries?: boolean;
|
|
142
|
+
updates?: boolean;
|
|
143
|
+
};
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
}
|
|
146
|
+
/** One export of a code bundle. */
|
|
147
|
+
interface CodeBundleWorkflowExport {
|
|
148
|
+
interface?: WorkflowInterface;
|
|
149
|
+
taskQueue?: string;
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
}
|
|
152
|
+
/** A user activity declared by a code bundle. */
|
|
153
|
+
interface CodeBundleActivityExport {
|
|
154
|
+
taskQueue?: string;
|
|
155
|
+
input?: JsonObject;
|
|
156
|
+
output?: JsonObject;
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
}
|
|
159
|
+
/** The code bundle attached to a version (spec 01 §5). */
|
|
160
|
+
interface WorkflowCode {
|
|
161
|
+
language: 'typescript' | 'python';
|
|
162
|
+
sdk?: string;
|
|
163
|
+
buildId: string;
|
|
164
|
+
bundleRef?: string;
|
|
165
|
+
sourceRef?: string;
|
|
166
|
+
entry?: string;
|
|
167
|
+
exports?: {
|
|
168
|
+
workflows?: {
|
|
169
|
+
[name: string]: CodeBundleWorkflowExport;
|
|
170
|
+
};
|
|
171
|
+
activities?: {
|
|
172
|
+
[name: string]: CodeBundleActivityExport;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
determinism?: 'isolate' | 'worker';
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
}
|
|
178
|
+
/** How a document was produced (spec 01 §6). Never affects execution. */
|
|
179
|
+
interface WorkflowAuthoring {
|
|
180
|
+
mode?: 'canvas' | 'code' | 'hybrid';
|
|
181
|
+
generator?: 'builder' | 'sdk-ts' | 'sdk-py' | 'ai' | 'import' | 'lift';
|
|
182
|
+
generatorVersion?: string;
|
|
183
|
+
sourceHash?: string;
|
|
184
|
+
liftedFrom?: {
|
|
185
|
+
workflowKey?: string;
|
|
186
|
+
version?: string;
|
|
187
|
+
fidelity?: 'lossless' | 'lossy';
|
|
188
|
+
};
|
|
189
|
+
[key: string]: unknown;
|
|
190
|
+
}
|
|
191
|
+
/** Run-level settings. */
|
|
192
|
+
interface WorkflowConfig {
|
|
193
|
+
maxParallelism?: number;
|
|
194
|
+
/** Run timeout in seconds. */
|
|
195
|
+
timeout?: number;
|
|
196
|
+
/** Chain deadline in seconds or a duration string (v2). */
|
|
197
|
+
executionTimeout?: number | string;
|
|
198
|
+
/** Workflow-task budget in seconds or a duration string (v2). */
|
|
199
|
+
workflowTaskTimeout?: number | string;
|
|
200
|
+
versioningBehavior?: 'PINNED' | 'AUTO_UPGRADE';
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}
|
|
203
|
+
/** The canonical workflow definition (`definitionJson`). */
|
|
204
|
+
interface WorkflowDefinition {
|
|
205
|
+
schemaVersion?: 1 | 2;
|
|
206
|
+
key?: string;
|
|
207
|
+
name?: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
interface?: WorkflowInterface;
|
|
210
|
+
code?: WorkflowCode;
|
|
211
|
+
authoring?: WorkflowAuthoring;
|
|
212
|
+
data: {
|
|
213
|
+
nodes: WorkflowNode[];
|
|
214
|
+
edges: WorkflowEdge[];
|
|
215
|
+
stickyNotes?: JsonObject[];
|
|
216
|
+
[key: string]: unknown;
|
|
217
|
+
};
|
|
218
|
+
config?: WorkflowConfig;
|
|
219
|
+
pinnedData?: JsonObject;
|
|
220
|
+
meta?: JsonObject;
|
|
221
|
+
tags?: Json[];
|
|
222
|
+
[key: string]: unknown;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type { CodeBundleActivityExport as C, ErrorType as E, Json as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowDefinition as W, JsonObject as a, WorkflowInterface as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m };
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow IR, schema version 2 (spec 01).
|
|
3
|
+
*
|
|
4
|
+
* Version 2 is a strict superset of what the builder saves today: every stored
|
|
5
|
+
* definition (no `schemaVersion`, legacy mirrors under `data`, `config` on
|
|
6
|
+
* internal nodes) is a valid version-2 document. The canonical fields are typed
|
|
7
|
+
* here; anything else a stored definition carries is kept verbatim through the
|
|
8
|
+
* index signatures so a round trip never drops data.
|
|
9
|
+
*/
|
|
10
|
+
/** Any JSON value. */
|
|
11
|
+
type Json = null | boolean | number | string | Json[] | {
|
|
12
|
+
[key: string]: Json;
|
|
13
|
+
};
|
|
14
|
+
/** A JSON object. */
|
|
15
|
+
type JsonObject = {
|
|
16
|
+
[key: string]: Json;
|
|
17
|
+
};
|
|
18
|
+
/** Error types shared by node error policies and code activities. */
|
|
19
|
+
type ErrorType = 'TIMEOUT' | 'TRANSIENT' | 'DEPENDENCY' | 'AUTHORIZATION' | 'VALIDATION' | 'PERMANENT' | 'UNKNOWN';
|
|
20
|
+
/** A node position on the canvas. */
|
|
21
|
+
interface Position {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}
|
|
25
|
+
/** Retry policy of a node (`errorConfig.retryConfig`). */
|
|
26
|
+
interface RetryConfig {
|
|
27
|
+
maxRetries: number;
|
|
28
|
+
retryDelay: number;
|
|
29
|
+
backoffMultiplier?: number;
|
|
30
|
+
maxDelay?: number;
|
|
31
|
+
retryOnErrorTypes?: ErrorType[];
|
|
32
|
+
nonRetryableErrorTypes?: string[];
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/** Per-node timeout (`errorConfig.timeout`). */
|
|
36
|
+
interface NodeTimeout {
|
|
37
|
+
duration: number;
|
|
38
|
+
onTimeout?: 'stop' | 'continue' | 'branch';
|
|
39
|
+
timeoutBranchId?: string;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
/** Node error policy, read by the executor from `errorConfig`. */
|
|
43
|
+
interface NodeErrorConfig {
|
|
44
|
+
onError?: 'stop' | 'continue' | 'branch';
|
|
45
|
+
errorBranchId?: string;
|
|
46
|
+
retryConfig?: RetryConfig;
|
|
47
|
+
timeout?: NodeTimeout;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** Where a node runs: FluidGrids Cloud (absent) or a registered runner. */
|
|
51
|
+
interface RunOnSetting {
|
|
52
|
+
kind: string;
|
|
53
|
+
runnerId?: string;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
/** Builder execution settings. */
|
|
57
|
+
interface ExecutionSettings {
|
|
58
|
+
alwaysOutputData?: boolean;
|
|
59
|
+
executeOnce?: boolean;
|
|
60
|
+
runOn?: RunOnSetting;
|
|
61
|
+
[key: string]: unknown;
|
|
62
|
+
}
|
|
63
|
+
/** A connection reference (connections are owned by wspace-integrations-svc). */
|
|
64
|
+
interface ConnectionRef {
|
|
65
|
+
connectionId: string;
|
|
66
|
+
adapter: string;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
/** A legacy credential reference (`args.credentials`, deprecated). */
|
|
70
|
+
interface LegacyCredentialRef {
|
|
71
|
+
id: string;
|
|
72
|
+
adapter: string;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
/** Node arguments. */
|
|
76
|
+
interface NodeArgs {
|
|
77
|
+
state?: JsonObject;
|
|
78
|
+
context?: JsonObject;
|
|
79
|
+
connections?: ConnectionRef[];
|
|
80
|
+
credentials?: LegacyCredentialRef[];
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
83
|
+
/** One workflow node. */
|
|
84
|
+
interface WorkflowNode {
|
|
85
|
+
id: string;
|
|
86
|
+
type: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
position?: Position;
|
|
89
|
+
operation_name?: string;
|
|
90
|
+
version?: string;
|
|
91
|
+
args?: NodeArgs;
|
|
92
|
+
errorConfig?: NodeErrorConfig;
|
|
93
|
+
executionSettings?: ExecutionSettings;
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
/** Builder UI bag. Legacy mirrors of the canonical fields may live here. */
|
|
96
|
+
data?: JsonObject;
|
|
97
|
+
/** Legacy parameter mirror (internal nodes read it below `args.state`). */
|
|
98
|
+
config?: JsonObject;
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}
|
|
101
|
+
/** One workflow edge. */
|
|
102
|
+
interface WorkflowEdge {
|
|
103
|
+
/** Absent on some API-created definitions; the builder and canvas always write one. */
|
|
104
|
+
id?: string;
|
|
105
|
+
source: string;
|
|
106
|
+
target: string;
|
|
107
|
+
sourceHandle?: string;
|
|
108
|
+
targetHandle?: string;
|
|
109
|
+
type?: string;
|
|
110
|
+
label?: string;
|
|
111
|
+
data?: JsonObject;
|
|
112
|
+
mapping?: JsonObject;
|
|
113
|
+
[key: string]: unknown;
|
|
114
|
+
}
|
|
115
|
+
/** The typed contract of a workflow (spec 01 §4). */
|
|
116
|
+
interface WorkflowInterface {
|
|
117
|
+
input?: JsonObject;
|
|
118
|
+
output?: JsonObject;
|
|
119
|
+
signals?: {
|
|
120
|
+
[name: string]: {
|
|
121
|
+
payload?: JsonObject;
|
|
122
|
+
[key: string]: unknown;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
queries?: {
|
|
126
|
+
[name: string]: {
|
|
127
|
+
args?: JsonObject;
|
|
128
|
+
result?: JsonObject;
|
|
129
|
+
[key: string]: unknown;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
updates?: {
|
|
133
|
+
[name: string]: {
|
|
134
|
+
args?: JsonObject;
|
|
135
|
+
result?: JsonObject;
|
|
136
|
+
[key: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
open?: {
|
|
140
|
+
signals?: boolean;
|
|
141
|
+
queries?: boolean;
|
|
142
|
+
updates?: boolean;
|
|
143
|
+
};
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
}
|
|
146
|
+
/** One export of a code bundle. */
|
|
147
|
+
interface CodeBundleWorkflowExport {
|
|
148
|
+
interface?: WorkflowInterface;
|
|
149
|
+
taskQueue?: string;
|
|
150
|
+
[key: string]: unknown;
|
|
151
|
+
}
|
|
152
|
+
/** A user activity declared by a code bundle. */
|
|
153
|
+
interface CodeBundleActivityExport {
|
|
154
|
+
taskQueue?: string;
|
|
155
|
+
input?: JsonObject;
|
|
156
|
+
output?: JsonObject;
|
|
157
|
+
[key: string]: unknown;
|
|
158
|
+
}
|
|
159
|
+
/** The code bundle attached to a version (spec 01 §5). */
|
|
160
|
+
interface WorkflowCode {
|
|
161
|
+
language: 'typescript' | 'python';
|
|
162
|
+
sdk?: string;
|
|
163
|
+
buildId: string;
|
|
164
|
+
bundleRef?: string;
|
|
165
|
+
sourceRef?: string;
|
|
166
|
+
entry?: string;
|
|
167
|
+
exports?: {
|
|
168
|
+
workflows?: {
|
|
169
|
+
[name: string]: CodeBundleWorkflowExport;
|
|
170
|
+
};
|
|
171
|
+
activities?: {
|
|
172
|
+
[name: string]: CodeBundleActivityExport;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
determinism?: 'isolate' | 'worker';
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
}
|
|
178
|
+
/** How a document was produced (spec 01 §6). Never affects execution. */
|
|
179
|
+
interface WorkflowAuthoring {
|
|
180
|
+
mode?: 'canvas' | 'code' | 'hybrid';
|
|
181
|
+
generator?: 'builder' | 'sdk-ts' | 'sdk-py' | 'ai' | 'import' | 'lift';
|
|
182
|
+
generatorVersion?: string;
|
|
183
|
+
sourceHash?: string;
|
|
184
|
+
liftedFrom?: {
|
|
185
|
+
workflowKey?: string;
|
|
186
|
+
version?: string;
|
|
187
|
+
fidelity?: 'lossless' | 'lossy';
|
|
188
|
+
};
|
|
189
|
+
[key: string]: unknown;
|
|
190
|
+
}
|
|
191
|
+
/** Run-level settings. */
|
|
192
|
+
interface WorkflowConfig {
|
|
193
|
+
maxParallelism?: number;
|
|
194
|
+
/** Run timeout in seconds. */
|
|
195
|
+
timeout?: number;
|
|
196
|
+
/** Chain deadline in seconds or a duration string (v2). */
|
|
197
|
+
executionTimeout?: number | string;
|
|
198
|
+
/** Workflow-task budget in seconds or a duration string (v2). */
|
|
199
|
+
workflowTaskTimeout?: number | string;
|
|
200
|
+
versioningBehavior?: 'PINNED' | 'AUTO_UPGRADE';
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
}
|
|
203
|
+
/** The canonical workflow definition (`definitionJson`). */
|
|
204
|
+
interface WorkflowDefinition {
|
|
205
|
+
schemaVersion?: 1 | 2;
|
|
206
|
+
key?: string;
|
|
207
|
+
name?: string;
|
|
208
|
+
description?: string;
|
|
209
|
+
interface?: WorkflowInterface;
|
|
210
|
+
code?: WorkflowCode;
|
|
211
|
+
authoring?: WorkflowAuthoring;
|
|
212
|
+
data: {
|
|
213
|
+
nodes: WorkflowNode[];
|
|
214
|
+
edges: WorkflowEdge[];
|
|
215
|
+
stickyNotes?: JsonObject[];
|
|
216
|
+
[key: string]: unknown;
|
|
217
|
+
};
|
|
218
|
+
config?: WorkflowConfig;
|
|
219
|
+
pinnedData?: JsonObject;
|
|
220
|
+
meta?: JsonObject;
|
|
221
|
+
tags?: Json[];
|
|
222
|
+
[key: string]: unknown;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type { CodeBundleActivityExport as C, ErrorType as E, Json as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowDefinition as W, JsonObject as a, WorkflowInterface as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m };
|
package/package.json
CHANGED
|
@@ -1,6 +1,119 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidgrids/workflows",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2026.1027.0",
|
|
4
|
+
"description": "Author FluidGrids workflows as code: the IR v2 schema and tools, the tier-1 graph builder, lift and lower between canvas JSON, TypeScript and Python, and typed node client generation.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./ir": {
|
|
16
|
+
"types": "./dist/ir/index.d.ts",
|
|
17
|
+
"import": "./dist/ir/index.js",
|
|
18
|
+
"require": "./dist/ir/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./roundtrip": {
|
|
21
|
+
"types": "./dist/roundtrip/index.d.ts",
|
|
22
|
+
"import": "./dist/roundtrip/index.js",
|
|
23
|
+
"require": "./dist/roundtrip/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./codegen": {
|
|
26
|
+
"types": "./dist/codegen/index.d.ts",
|
|
27
|
+
"import": "./dist/codegen/index.js",
|
|
28
|
+
"require": "./dist/codegen/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./quickjs": {
|
|
31
|
+
"types": "./dist/quickjs/index.d.ts",
|
|
32
|
+
"import": "./dist/quickjs/index.js",
|
|
33
|
+
"require": "./dist/quickjs/index.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./schema/ir-v2.schema.json": "./schema/ir-v2.schema.json",
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"schema",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"sideEffects": false,
|
|
45
|
+
"scripts": {
|
|
46
|
+
"generate": "bun scripts/generate.ts",
|
|
47
|
+
"build": "bun run generate && tsup",
|
|
48
|
+
"dev": "bun run generate && TSUP_DEV=1 tsup --watch",
|
|
49
|
+
"test": "bun run generate && bash scripts/build-limits.sh vitest run",
|
|
50
|
+
"test:watch": "vitest",
|
|
51
|
+
"test:coverage": "bun run generate && bash scripts/build-limits.sh vitest run --coverage",
|
|
52
|
+
"lint": "bun run generate && eslint src/ tests/ scripts/",
|
|
53
|
+
"lint:fix": "eslint src/ tests/ scripts/ --fix",
|
|
54
|
+
"lint:check": "bun run lint",
|
|
55
|
+
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" \"*.{json,md}\"",
|
|
56
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" \"*.{json,md}\"",
|
|
57
|
+
"typecheck": "bun run generate && bash scripts/build-limits.sh tsc --noEmit -p tsconfig.json && bash scripts/build-limits.sh tsc -p tsconfig.test.json && bash scripts/build-limits.sh tsc -p tsconfig.fixtures.json",
|
|
58
|
+
"check:fixtures": "bun scripts/check-fixtures.ts",
|
|
59
|
+
"sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run format:check && bun run lint:check && bun run typecheck && bun run test:coverage && bun run build && bun run check:fixtures'",
|
|
60
|
+
"prepublishOnly": "bun run build",
|
|
61
|
+
"clean": "rm -rf dist coverage src/generated"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"fluidgrids",
|
|
65
|
+
"workflow",
|
|
66
|
+
"workflow-as-code",
|
|
67
|
+
"automation",
|
|
68
|
+
"sdk",
|
|
69
|
+
"typescript"
|
|
70
|
+
],
|
|
71
|
+
"author": {
|
|
72
|
+
"name": "FluidGrids",
|
|
73
|
+
"email": "info@fluidgrids.ai",
|
|
74
|
+
"url": "https://fluidgrids.ai"
|
|
75
|
+
},
|
|
76
|
+
"license": "UNLICENSED",
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "https://github.com/Algoshred/fluidgrids-workflows-sdk-node.git"
|
|
80
|
+
},
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://github.com/Algoshred/fluidgrids-workflows-sdk-node/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": "https://github.com/Algoshred/fluidgrids-workflows-sdk-node#readme",
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">=22.0.0",
|
|
87
|
+
"bun": ">=1.3.10"
|
|
88
|
+
},
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"ajv": "8.20.0",
|
|
91
|
+
"cron-parser": "5.10.2",
|
|
92
|
+
"esbuild": "0.28.2",
|
|
93
|
+
"prettier": "3.8.3",
|
|
94
|
+
"quickjs-emscripten": "0.32.0"
|
|
95
|
+
},
|
|
96
|
+
"devDependencies": {
|
|
97
|
+
"@types/node": "^24.12.2",
|
|
98
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
99
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
100
|
+
"@vitest/coverage-v8": "5.0.4",
|
|
101
|
+
"esbuild-wasm": "0.28.2",
|
|
102
|
+
"eslint": "^9.39.4",
|
|
103
|
+
"eslint-config-prettier": "^10.1.8",
|
|
104
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
105
|
+
"tsup": "^8.5.1",
|
|
106
|
+
"typescript": "^5.9.3",
|
|
107
|
+
"vitest": "5.0.4"
|
|
108
|
+
},
|
|
109
|
+
"trustedDependencies": [
|
|
110
|
+
"esbuild"
|
|
111
|
+
],
|
|
112
|
+
"publishConfig": {
|
|
113
|
+
"access": "public",
|
|
114
|
+
"registry": "https://registry.npmjs.org/"
|
|
115
|
+
},
|
|
116
|
+
"overrides": {
|
|
117
|
+
"esbuild": "0.28.2"
|
|
118
|
+
}
|
|
119
|
+
}
|