@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,244 @@
|
|
|
1
|
+
// src/ir/canonical-json.ts
|
|
2
|
+
var CanonicalJsonError = class extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "CanonicalJsonError";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
function isPlainObject(value) {
|
|
9
|
+
const proto = Object.getPrototypeOf(value);
|
|
10
|
+
return proto === Object.prototype || proto === null;
|
|
11
|
+
}
|
|
12
|
+
function serialize(value, path, out) {
|
|
13
|
+
if (value === null) {
|
|
14
|
+
out.push("null");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
switch (typeof value) {
|
|
18
|
+
case "boolean":
|
|
19
|
+
out.push(value ? "true" : "false");
|
|
20
|
+
return;
|
|
21
|
+
case "number":
|
|
22
|
+
if (!Number.isFinite(value)) {
|
|
23
|
+
throw new CanonicalJsonError(`${path} is not a finite number`);
|
|
24
|
+
}
|
|
25
|
+
out.push(JSON.stringify(value));
|
|
26
|
+
return;
|
|
27
|
+
case "string":
|
|
28
|
+
out.push(JSON.stringify(value));
|
|
29
|
+
return;
|
|
30
|
+
case "object":
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
throw new CanonicalJsonError(`${path} is a ${typeof value}, which JSON cannot represent`);
|
|
34
|
+
}
|
|
35
|
+
if (Array.isArray(value)) {
|
|
36
|
+
out.push("[");
|
|
37
|
+
value.forEach((item, index) => {
|
|
38
|
+
if (item === void 0) {
|
|
39
|
+
throw new CanonicalJsonError(`${path}[${index}] is undefined`);
|
|
40
|
+
}
|
|
41
|
+
if (index > 0) out.push(",");
|
|
42
|
+
serialize(item, `${path}[${index}]`, out);
|
|
43
|
+
});
|
|
44
|
+
out.push("]");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (!isPlainObject(value)) {
|
|
48
|
+
throw new CanonicalJsonError(`${path} is not a plain JSON object`);
|
|
49
|
+
}
|
|
50
|
+
const record = value;
|
|
51
|
+
const keys = Object.keys(record).filter((key) => record[key] !== void 0).sort();
|
|
52
|
+
out.push("{");
|
|
53
|
+
keys.forEach((key, index) => {
|
|
54
|
+
if (index > 0) out.push(",");
|
|
55
|
+
out.push(JSON.stringify(key), ":");
|
|
56
|
+
serialize(record[key], `${path}.${key}`, out);
|
|
57
|
+
});
|
|
58
|
+
out.push("}");
|
|
59
|
+
}
|
|
60
|
+
function canonicalJson(value) {
|
|
61
|
+
const out = [];
|
|
62
|
+
serialize(value, "$", out);
|
|
63
|
+
return out.join("");
|
|
64
|
+
}
|
|
65
|
+
function sortKeysDeep(value) {
|
|
66
|
+
if (Array.isArray(value)) return value.map(sortKeysDeep);
|
|
67
|
+
if (value !== null && typeof value === "object") {
|
|
68
|
+
const record = value;
|
|
69
|
+
const sorted = {};
|
|
70
|
+
for (const key of Object.keys(record).sort()) {
|
|
71
|
+
if (record[key] !== void 0) sorted[key] = sortKeysDeep(record[key]);
|
|
72
|
+
}
|
|
73
|
+
return sorted;
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
function stableStringify(value) {
|
|
78
|
+
canonicalJson(value);
|
|
79
|
+
return `${JSON.stringify(sortKeysDeep(value), null, 2)}
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/ir/sha256.ts
|
|
84
|
+
var K = new Uint32Array([
|
|
85
|
+
1116352408,
|
|
86
|
+
1899447441,
|
|
87
|
+
3049323471,
|
|
88
|
+
3921009573,
|
|
89
|
+
961987163,
|
|
90
|
+
1508970993,
|
|
91
|
+
2453635748,
|
|
92
|
+
2870763221,
|
|
93
|
+
3624381080,
|
|
94
|
+
310598401,
|
|
95
|
+
607225278,
|
|
96
|
+
1426881987,
|
|
97
|
+
1925078388,
|
|
98
|
+
2162078206,
|
|
99
|
+
2614888103,
|
|
100
|
+
3248222580,
|
|
101
|
+
3835390401,
|
|
102
|
+
4022224774,
|
|
103
|
+
264347078,
|
|
104
|
+
604807628,
|
|
105
|
+
770255983,
|
|
106
|
+
1249150122,
|
|
107
|
+
1555081692,
|
|
108
|
+
1996064986,
|
|
109
|
+
2554220882,
|
|
110
|
+
2821834349,
|
|
111
|
+
2952996808,
|
|
112
|
+
3210313671,
|
|
113
|
+
3336571891,
|
|
114
|
+
3584528711,
|
|
115
|
+
113926993,
|
|
116
|
+
338241895,
|
|
117
|
+
666307205,
|
|
118
|
+
773529912,
|
|
119
|
+
1294757372,
|
|
120
|
+
1396182291,
|
|
121
|
+
1695183700,
|
|
122
|
+
1986661051,
|
|
123
|
+
2177026350,
|
|
124
|
+
2456956037,
|
|
125
|
+
2730485921,
|
|
126
|
+
2820302411,
|
|
127
|
+
3259730800,
|
|
128
|
+
3345764771,
|
|
129
|
+
3516065817,
|
|
130
|
+
3600352804,
|
|
131
|
+
4094571909,
|
|
132
|
+
275423344,
|
|
133
|
+
430227734,
|
|
134
|
+
506948616,
|
|
135
|
+
659060556,
|
|
136
|
+
883997877,
|
|
137
|
+
958139571,
|
|
138
|
+
1322822218,
|
|
139
|
+
1537002063,
|
|
140
|
+
1747873779,
|
|
141
|
+
1955562222,
|
|
142
|
+
2024104815,
|
|
143
|
+
2227730452,
|
|
144
|
+
2361852424,
|
|
145
|
+
2428436474,
|
|
146
|
+
2756734187,
|
|
147
|
+
3204031479,
|
|
148
|
+
3329325298
|
|
149
|
+
]);
|
|
150
|
+
function rotr(value, bits) {
|
|
151
|
+
return value >>> bits | value << 32 - bits;
|
|
152
|
+
}
|
|
153
|
+
function utf8(text) {
|
|
154
|
+
const bytes = [];
|
|
155
|
+
for (const char of text) {
|
|
156
|
+
let code = char.codePointAt(0) ?? 0;
|
|
157
|
+
if (code >= 55296 && code <= 57343) code = 65533;
|
|
158
|
+
if (code < 128) {
|
|
159
|
+
bytes.push(code);
|
|
160
|
+
} else if (code < 2048) {
|
|
161
|
+
bytes.push(192 | code >> 6, 128 | code & 63);
|
|
162
|
+
} else if (code < 65536) {
|
|
163
|
+
bytes.push(224 | code >> 12, 128 | code >> 6 & 63, 128 | code & 63);
|
|
164
|
+
} else {
|
|
165
|
+
bytes.push(
|
|
166
|
+
240 | code >> 18,
|
|
167
|
+
128 | code >> 12 & 63,
|
|
168
|
+
128 | code >> 6 & 63,
|
|
169
|
+
128 | code & 63
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return Uint8Array.from(bytes);
|
|
174
|
+
}
|
|
175
|
+
function sha256Hex(text) {
|
|
176
|
+
const message = utf8(text);
|
|
177
|
+
const bitLength = message.length * 8;
|
|
178
|
+
const paddedLength = Math.ceil((message.length + 9) / 64) * 64;
|
|
179
|
+
const padded = new Uint8Array(paddedLength);
|
|
180
|
+
padded.set(message);
|
|
181
|
+
padded[message.length] = 128;
|
|
182
|
+
const view = new DataView(padded.buffer);
|
|
183
|
+
view.setUint32(paddedLength - 8, Math.floor(bitLength / 4294967296));
|
|
184
|
+
view.setUint32(paddedLength - 4, bitLength >>> 0);
|
|
185
|
+
const hash = new Uint32Array([
|
|
186
|
+
1779033703,
|
|
187
|
+
3144134277,
|
|
188
|
+
1013904242,
|
|
189
|
+
2773480762,
|
|
190
|
+
1359893119,
|
|
191
|
+
2600822924,
|
|
192
|
+
528734635,
|
|
193
|
+
1541459225
|
|
194
|
+
]);
|
|
195
|
+
const w = new Uint32Array(64);
|
|
196
|
+
for (let offset = 0; offset < paddedLength; offset += 64) {
|
|
197
|
+
for (let i = 0; i < 16; i++) w[i] = view.getUint32(offset + i * 4);
|
|
198
|
+
for (let i = 16; i < 64; i++) {
|
|
199
|
+
const w15 = w[i - 15] ?? 0;
|
|
200
|
+
const w2 = w[i - 2] ?? 0;
|
|
201
|
+
const s0 = rotr(w15, 7) ^ rotr(w15, 18) ^ w15 >>> 3;
|
|
202
|
+
const s1 = rotr(w2, 17) ^ rotr(w2, 19) ^ w2 >>> 10;
|
|
203
|
+
w[i] = (w[i - 16] ?? 0) + s0 + (w[i - 7] ?? 0) + s1 >>> 0;
|
|
204
|
+
}
|
|
205
|
+
let a = hash[0] ?? 0;
|
|
206
|
+
let b = hash[1] ?? 0;
|
|
207
|
+
let c = hash[2] ?? 0;
|
|
208
|
+
let d = hash[3] ?? 0;
|
|
209
|
+
let e = hash[4] ?? 0;
|
|
210
|
+
let f = hash[5] ?? 0;
|
|
211
|
+
let g = hash[6] ?? 0;
|
|
212
|
+
let h = hash[7] ?? 0;
|
|
213
|
+
for (let i = 0; i < 64; i++) {
|
|
214
|
+
const s1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
|
|
215
|
+
const ch = e & f ^ ~e & g;
|
|
216
|
+
const t1 = h + s1 + ch + (K[i] ?? 0) + (w[i] ?? 0) >>> 0;
|
|
217
|
+
const s0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
|
|
218
|
+
const maj = a & b ^ a & c ^ b & c;
|
|
219
|
+
const t2 = s0 + maj >>> 0;
|
|
220
|
+
h = g;
|
|
221
|
+
g = f;
|
|
222
|
+
f = e;
|
|
223
|
+
e = d + t1 >>> 0;
|
|
224
|
+
d = c;
|
|
225
|
+
c = b;
|
|
226
|
+
b = a;
|
|
227
|
+
a = t1 + t2 >>> 0;
|
|
228
|
+
}
|
|
229
|
+
hash[0] = (hash[0] ?? 0) + a >>> 0;
|
|
230
|
+
hash[1] = (hash[1] ?? 0) + b >>> 0;
|
|
231
|
+
hash[2] = (hash[2] ?? 0) + c >>> 0;
|
|
232
|
+
hash[3] = (hash[3] ?? 0) + d >>> 0;
|
|
233
|
+
hash[4] = (hash[4] ?? 0) + e >>> 0;
|
|
234
|
+
hash[5] = (hash[5] ?? 0) + f >>> 0;
|
|
235
|
+
hash[6] = (hash[6] ?? 0) + g >>> 0;
|
|
236
|
+
hash[7] = (hash[7] ?? 0) + h >>> 0;
|
|
237
|
+
}
|
|
238
|
+
return Array.from(hash, (word) => word.toString(16).padStart(8, "0")).join("");
|
|
239
|
+
}
|
|
240
|
+
function sha256Tagged(text) {
|
|
241
|
+
return `sha256:${sha256Hex(text)}`;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export { CanonicalJsonError, canonicalJson, sha256Hex, sha256Tagged, stableStringify };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkIZQNUNSU_cjs = require('../chunk-IZQNUNSU.cjs');
|
|
4
|
+
require('../chunk-LSKSBVL4.cjs');
|
|
5
|
+
require('../chunk-RRQ5HOBF.cjs');
|
|
6
|
+
require('../chunk-27HASETB.cjs');
|
|
7
|
+
require('../chunk-LRM6JXJA.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "generateNodeClients", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkIZQNUNSU_cjs.generateNodeClients; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "registrySnapshotHash", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkIZQNUNSU_cjs.registrySnapshotHash; }
|
|
18
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { N as NodeManifest } from '../manifest-Duf-gHdO.cjs';
|
|
2
|
+
import '../types-Dr2Fn1Ax.cjs';
|
|
3
|
+
|
|
4
|
+
interface GeneratedClients {
|
|
5
|
+
path: string;
|
|
6
|
+
content: string;
|
|
7
|
+
/** `sha256:<hex>` of the registry snapshot the file was generated from. */
|
|
8
|
+
registrySnapshot: string;
|
|
9
|
+
}
|
|
10
|
+
/** The registry snapshot hash: canonical JSON of every node's type, version and operation contracts. */
|
|
11
|
+
declare function registrySnapshotHash(manifests: readonly NodeManifest[]): string;
|
|
12
|
+
/** Generate `.fluidgrids/nodes.ts` or `.fluidgrids/nodes.py` for a registry snapshot. */
|
|
13
|
+
declare function generateNodeClients(manifests: readonly NodeManifest[], lang: 'ts' | 'py'): Promise<GeneratedClients>;
|
|
14
|
+
|
|
15
|
+
export { type GeneratedClients, generateNodeClients, registrySnapshotHash };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { N as NodeManifest } from '../manifest-Bp9ZJlav.js';
|
|
2
|
+
import '../types-Dr2Fn1Ax.js';
|
|
3
|
+
|
|
4
|
+
interface GeneratedClients {
|
|
5
|
+
path: string;
|
|
6
|
+
content: string;
|
|
7
|
+
/** `sha256:<hex>` of the registry snapshot the file was generated from. */
|
|
8
|
+
registrySnapshot: string;
|
|
9
|
+
}
|
|
10
|
+
/** The registry snapshot hash: canonical JSON of every node's type, version and operation contracts. */
|
|
11
|
+
declare function registrySnapshotHash(manifests: readonly NodeManifest[]): string;
|
|
12
|
+
/** Generate `.fluidgrids/nodes.ts` or `.fluidgrids/nodes.py` for a registry snapshot. */
|
|
13
|
+
declare function generateNodeClients(manifests: readonly NodeManifest[], lang: 'ts' | 'py'): Promise<GeneratedClients>;
|
|
14
|
+
|
|
15
|
+
export { type GeneratedClients, generateNodeClients, registrySnapshotHash };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `{{ … }}` forms that typed references lower to, and their parser.
|
|
3
|
+
*
|
|
4
|
+
* Typed references lower to the expression language the workers evaluate
|
|
5
|
+
* (`fluidgrids-workers/src/executor/expression-language.service.ts`). A node's
|
|
6
|
+
* output is `$node["<id>"].item` there: the builtin exposes `item`, `all()`,
|
|
7
|
+
* `first()` and `last()`, and has no `.json` property, so the
|
|
8
|
+
* `$node["id"].json.…` form written in parts of the spec would evaluate to
|
|
9
|
+
* `undefined`. The canonical form is therefore `{{ $node["<id>"].item.<path> }}`,
|
|
10
|
+
* with exactly one space inside each brace pair.
|
|
11
|
+
*
|
|
12
|
+
* Parsing is strict: a string is read back as a reference only if formatting
|
|
13
|
+
* the parsed reference reproduces the string exactly, so lifting never changes
|
|
14
|
+
* the text of an expression.
|
|
15
|
+
*/
|
|
16
|
+
/** One path step: a property name or an array index. */
|
|
17
|
+
type PathSegment = {
|
|
18
|
+
kind: 'key';
|
|
19
|
+
key: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'index';
|
|
22
|
+
index: number;
|
|
23
|
+
};
|
|
24
|
+
/** The roots a typed reference can start from. */
|
|
25
|
+
type RefRoot = {
|
|
26
|
+
kind: 'node';
|
|
27
|
+
nodeId: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'json';
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'vars';
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'now';
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'execution';
|
|
36
|
+
};
|
|
37
|
+
interface ValueRefModel {
|
|
38
|
+
root: RefRoot;
|
|
39
|
+
path: PathSegment[];
|
|
40
|
+
}
|
|
41
|
+
/** The bare expression for a reference (no braces). */
|
|
42
|
+
declare function formatRefExpression(ref: ValueRefModel): string;
|
|
43
|
+
/** `{{ <expression> }}` for a reference. */
|
|
44
|
+
declare function formatRefTemplate(ref: ValueRefModel): string;
|
|
45
|
+
/** Parse a bare reference expression; undefined unless it formats back identically. */
|
|
46
|
+
declare function parseRefExpression(expression: string): ValueRefModel | undefined;
|
|
47
|
+
/** One part of a template string: literal text or a reference. */
|
|
48
|
+
type TemplatePart = {
|
|
49
|
+
kind: 'text';
|
|
50
|
+
text: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: 'ref';
|
|
53
|
+
ref: ValueRefModel;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Split a string into literal text and `{{ ref }}` parts. Returns undefined when
|
|
57
|
+
* the string contains a `{{ … }}` that is not a canonical reference, or no
|
|
58
|
+
* reference at all.
|
|
59
|
+
*/
|
|
60
|
+
declare function parseTemplate(text: string): TemplatePart[] | undefined;
|
|
61
|
+
|
|
62
|
+
export { type PathSegment as P, type RefRoot as R, type TemplatePart as T, type ValueRefModel as V, formatRefTemplate as a, parseTemplate as b, formatRefExpression as f, parseRefExpression as p };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `{{ … }}` forms that typed references lower to, and their parser.
|
|
3
|
+
*
|
|
4
|
+
* Typed references lower to the expression language the workers evaluate
|
|
5
|
+
* (`fluidgrids-workers/src/executor/expression-language.service.ts`). A node's
|
|
6
|
+
* output is `$node["<id>"].item` there: the builtin exposes `item`, `all()`,
|
|
7
|
+
* `first()` and `last()`, and has no `.json` property, so the
|
|
8
|
+
* `$node["id"].json.…` form written in parts of the spec would evaluate to
|
|
9
|
+
* `undefined`. The canonical form is therefore `{{ $node["<id>"].item.<path> }}`,
|
|
10
|
+
* with exactly one space inside each brace pair.
|
|
11
|
+
*
|
|
12
|
+
* Parsing is strict: a string is read back as a reference only if formatting
|
|
13
|
+
* the parsed reference reproduces the string exactly, so lifting never changes
|
|
14
|
+
* the text of an expression.
|
|
15
|
+
*/
|
|
16
|
+
/** One path step: a property name or an array index. */
|
|
17
|
+
type PathSegment = {
|
|
18
|
+
kind: 'key';
|
|
19
|
+
key: string;
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'index';
|
|
22
|
+
index: number;
|
|
23
|
+
};
|
|
24
|
+
/** The roots a typed reference can start from. */
|
|
25
|
+
type RefRoot = {
|
|
26
|
+
kind: 'node';
|
|
27
|
+
nodeId: string;
|
|
28
|
+
} | {
|
|
29
|
+
kind: 'json';
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'vars';
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'now';
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'execution';
|
|
36
|
+
};
|
|
37
|
+
interface ValueRefModel {
|
|
38
|
+
root: RefRoot;
|
|
39
|
+
path: PathSegment[];
|
|
40
|
+
}
|
|
41
|
+
/** The bare expression for a reference (no braces). */
|
|
42
|
+
declare function formatRefExpression(ref: ValueRefModel): string;
|
|
43
|
+
/** `{{ <expression> }}` for a reference. */
|
|
44
|
+
declare function formatRefTemplate(ref: ValueRefModel): string;
|
|
45
|
+
/** Parse a bare reference expression; undefined unless it formats back identically. */
|
|
46
|
+
declare function parseRefExpression(expression: string): ValueRefModel | undefined;
|
|
47
|
+
/** One part of a template string: literal text or a reference. */
|
|
48
|
+
type TemplatePart = {
|
|
49
|
+
kind: 'text';
|
|
50
|
+
text: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: 'ref';
|
|
53
|
+
ref: ValueRefModel;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Split a string into literal text and `{{ ref }}` parts. Returns undefined when
|
|
57
|
+
* the string contains a `{{ … }}` that is not a canonical reference, or no
|
|
58
|
+
* reference at all.
|
|
59
|
+
*/
|
|
60
|
+
declare function parseTemplate(text: string): TemplatePart[] | undefined;
|
|
61
|
+
|
|
62
|
+
export { type PathSegment as P, type RefRoot as R, type TemplatePart as T, type ValueRefModel as V, formatRefTemplate as a, parseTemplate as b, formatRefExpression as f, parseRefExpression as p };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The projection of a definition that `irHash` covers. */
|
|
2
|
+
declare function hashedProjection(definition: unknown): unknown;
|
|
3
|
+
/** `sha256:<hex>` over the canonical, normalised definition without `authoring`. */
|
|
4
|
+
declare function irHash(definition: unknown): string;
|
|
5
|
+
/** One authoring source file. */
|
|
6
|
+
interface SourceFile {
|
|
7
|
+
path: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
/** `sha256:<hex>` over the source files, independent of their order. */
|
|
11
|
+
declare function sourceHash(files: readonly SourceFile[]): string;
|
|
12
|
+
/** `sha256:<hex>` of a bundle. */
|
|
13
|
+
declare function buildIdOf(bundle: string): string;
|
|
14
|
+
|
|
15
|
+
export { type SourceFile as S, buildIdOf as b, hashedProjection as h, irHash as i, sourceHash as s };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The projection of a definition that `irHash` covers. */
|
|
2
|
+
declare function hashedProjection(definition: unknown): unknown;
|
|
3
|
+
/** `sha256:<hex>` over the canonical, normalised definition without `authoring`. */
|
|
4
|
+
declare function irHash(definition: unknown): string;
|
|
5
|
+
/** One authoring source file. */
|
|
6
|
+
interface SourceFile {
|
|
7
|
+
path: string;
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
/** `sha256:<hex>` over the source files, independent of their order. */
|
|
11
|
+
declare function sourceHash(files: readonly SourceFile[]): string;
|
|
12
|
+
/** `sha256:<hex>` of a bundle. */
|
|
13
|
+
declare function buildIdOf(bundle: string): string;
|
|
14
|
+
|
|
15
|
+
export { type SourceFile as S, buildIdOf as b, hashedProjection as h, irHash as i, sourceHash as s };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKUTMY2IO_cjs = require('./chunk-KUTMY2IO.cjs');
|
|
4
|
+
require('./chunk-G4UEPUGO.cjs');
|
|
5
|
+
var chunkRRQ5HOBF_cjs = require('./chunk-RRQ5HOBF.cjs');
|
|
6
|
+
require('./chunk-LRM6JXJA.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "COLLECTION_FORMAT", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkKUTMY2IO_cjs.COLLECTION_FORMAT; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "LAYOUT_FORMAT", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkKUTMY2IO_cjs.LAYOUT_FORMAT; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "LAYOUT_FORMAT_VERSION", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkKUTMY2IO_cjs.LAYOUT_FORMAT_VERSION; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "RECORDING_FORMAT", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkKUTMY2IO_cjs.RECORDING_FORMAT; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "RECORDING_FORMAT_VERSION", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkKUTMY2IO_cjs.RECORDING_FORMAT_VERSION; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "SDK_VERSION", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkKUTMY2IO_cjs.SDK_VERSION; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "UnresolvedConnectionsError", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkKUTMY2IO_cjs.UnresolvedConnectionsError; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "WorkflowBuilder", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return chunkKUTMY2IO_cjs.WorkflowBuilder; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "assembleRecording", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return chunkKUTMY2IO_cjs.assembleRecording; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "collectWorkflowExports", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkKUTMY2IO_cjs.collectWorkflowExports; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "defaultEdgeId", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return chunkKUTMY2IO_cjs.defaultEdgeId; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "defineWorkflow", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return chunkKUTMY2IO_cjs.defineWorkflow; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "edge", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return chunkKUTMY2IO_cjs.edge; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "internalNodes", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunkKUTMY2IO_cjs.internalNodes; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "isOperation", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return chunkKUTMY2IO_cjs.isOperation; }
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "isTier1Workflow", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () { return chunkKUTMY2IO_cjs.isTier1Workflow; }
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "nodes", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function () { return chunkKUTMY2IO_cjs.nodes; }
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "op", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () { return chunkKUTMY2IO_cjs.op; }
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "parseLayoutSidecar", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () { return chunkKUTMY2IO_cjs.parseLayoutSidecar; }
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "toIR", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return chunkKUTMY2IO_cjs.toIR; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "trigger", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return chunkKUTMY2IO_cjs.trigger; }
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "triggers", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () { return chunkKUTMY2IO_cjs.triggers; }
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "BuilderError", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () { return chunkRRQ5HOBF_cjs.BuilderError; }
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "PREDICATE_OPERATORS", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () { return chunkRRQ5HOBF_cjs.PREDICATE_OPERATORS; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "and", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunkRRQ5HOBF_cjs.and; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "expr", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return chunkRRQ5HOBF_cjs.expr; }
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "or", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () { return chunkRRQ5HOBF_cjs.or; }
|
|
117
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { T as Tier1Recording } from './assemble-BJo9TECS.cjs';
|
|
2
|
+
export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, e as AssembleOptions, B as BuilderError, C as CompareRef, f as ConditionGroup, g as ConditionRule, h as ConnectionResolver, E as EdgeOptions, i as EdgeSource, j as EdgeSpec, F as FileRef, H as HandleRef, I as IfOptions, k as IfRef, L as LAYOUT_FORMAT, l as LAYOUT_FORMAT_VERSION, m as LayoutSidecar, n as LoopOptions, o as LoopRef, M as MergeOptions, N as NodeOptions, p as NodeRef, q as NoteOptions, O as OnErrorOption, r as Operation, s as OutputRef, P as PREDICATE_OPERATORS, t as Predicate, u as PredicateMethods, R as RECORDING_FORMAT, v as RECORDING_FORMAT_VERSION, w as RecordedNode, x as RecordedNote, y as RuleValue, S as SignalWaitRef, z as SubworkflowOptions, D as SwitchOptions, G as SwitchRef, J as Tier1Workflow, K as TriggerOperation, U as UnresolvedConnectionsError, V as ValidateRef, W as WaitForSignalOptions, Q as WorkflowBuilder, X as WorkflowOptions, Y as and, Z as assembleRecording, _ as defaultEdgeId, $ as defineWorkflow, a0 as edge, a1 as expr, a2 as internalNodes, a3 as isOperation, a4 as isTier1Workflow, a5 as nodes, a6 as op, a7 as or, a8 as parseLayoutSidecar, a9 as toIR, aa as trigger, ab as triggers } from './assemble-BJo9TECS.cjs';
|
|
3
|
+
export { J as Json, a as JsonObject, W as WorkflowDefinition } from './types-Dr2Fn1Ax.cjs';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Runs inside the evaluation isolate at the end of a tier-1 bundle: gathers the
|
|
7
|
+
* recordings of every exported `defineWorkflow` value as one JSON string, the
|
|
8
|
+
* only thing that leaves the isolate.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare const COLLECTION_FORMAT = "fluidgrids.tier1-collection";
|
|
12
|
+
interface CollectedWorkflow {
|
|
13
|
+
module: string;
|
|
14
|
+
exportName: string;
|
|
15
|
+
recording: Tier1Recording;
|
|
16
|
+
}
|
|
17
|
+
interface Tier1Collection {
|
|
18
|
+
format: typeof COLLECTION_FORMAT;
|
|
19
|
+
workflows: CollectedWorkflow[];
|
|
20
|
+
}
|
|
21
|
+
/** Collect the tier-1 workflows exported by each module, as JSON. */
|
|
22
|
+
declare function collectWorkflowExports(modules: ReadonlyArray<readonly [string, Record<string, unknown>]>): string;
|
|
23
|
+
|
|
24
|
+
/** The version of @fluidgrids/workflows. */
|
|
25
|
+
declare const SDK_VERSION = "2026.1027.0";
|
|
26
|
+
|
|
27
|
+
export { COLLECTION_FORMAT, type CollectedWorkflow, SDK_VERSION, type Tier1Collection, Tier1Recording, collectWorkflowExports };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { T as Tier1Recording } from './assemble-DMOuaxRI.js';
|
|
2
|
+
export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, e as AssembleOptions, B as BuilderError, C as CompareRef, f as ConditionGroup, g as ConditionRule, h as ConnectionResolver, E as EdgeOptions, i as EdgeSource, j as EdgeSpec, F as FileRef, H as HandleRef, I as IfOptions, k as IfRef, L as LAYOUT_FORMAT, l as LAYOUT_FORMAT_VERSION, m as LayoutSidecar, n as LoopOptions, o as LoopRef, M as MergeOptions, N as NodeOptions, p as NodeRef, q as NoteOptions, O as OnErrorOption, r as Operation, s as OutputRef, P as PREDICATE_OPERATORS, t as Predicate, u as PredicateMethods, R as RECORDING_FORMAT, v as RECORDING_FORMAT_VERSION, w as RecordedNode, x as RecordedNote, y as RuleValue, S as SignalWaitRef, z as SubworkflowOptions, D as SwitchOptions, G as SwitchRef, J as Tier1Workflow, K as TriggerOperation, U as UnresolvedConnectionsError, V as ValidateRef, W as WaitForSignalOptions, Q as WorkflowBuilder, X as WorkflowOptions, Y as and, Z as assembleRecording, _ as defaultEdgeId, $ as defineWorkflow, a0 as edge, a1 as expr, a2 as internalNodes, a3 as isOperation, a4 as isTier1Workflow, a5 as nodes, a6 as op, a7 as or, a8 as parseLayoutSidecar, a9 as toIR, aa as trigger, ab as triggers } from './assemble-DMOuaxRI.js';
|
|
3
|
+
export { J as Json, a as JsonObject, W as WorkflowDefinition } from './types-Dr2Fn1Ax.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Runs inside the evaluation isolate at the end of a tier-1 bundle: gathers the
|
|
7
|
+
* recordings of every exported `defineWorkflow` value as one JSON string, the
|
|
8
|
+
* only thing that leaves the isolate.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare const COLLECTION_FORMAT = "fluidgrids.tier1-collection";
|
|
12
|
+
interface CollectedWorkflow {
|
|
13
|
+
module: string;
|
|
14
|
+
exportName: string;
|
|
15
|
+
recording: Tier1Recording;
|
|
16
|
+
}
|
|
17
|
+
interface Tier1Collection {
|
|
18
|
+
format: typeof COLLECTION_FORMAT;
|
|
19
|
+
workflows: CollectedWorkflow[];
|
|
20
|
+
}
|
|
21
|
+
/** Collect the tier-1 workflows exported by each module, as JSON. */
|
|
22
|
+
declare function collectWorkflowExports(modules: ReadonlyArray<readonly [string, Record<string, unknown>]>): string;
|
|
23
|
+
|
|
24
|
+
/** The version of @fluidgrids/workflows. */
|
|
25
|
+
declare const SDK_VERSION = "2026.1027.0";
|
|
26
|
+
|
|
27
|
+
export { COLLECTION_FORMAT, type CollectedWorkflow, SDK_VERSION, type Tier1Collection, Tier1Recording, collectWorkflowExports };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { COLLECTION_FORMAT, LAYOUT_FORMAT, LAYOUT_FORMAT_VERSION, RECORDING_FORMAT, RECORDING_FORMAT_VERSION, SDK_VERSION, UnresolvedConnectionsError, WorkflowBuilder, assembleRecording, collectWorkflowExports, defaultEdgeId, defineWorkflow, edge, internalNodes, isOperation, isTier1Workflow, nodes, op, parseLayoutSidecar, toIR, trigger, triggers } from './chunk-BWSLWF2E.js';
|
|
2
|
+
import './chunk-5LUIDMF4.js';
|
|
3
|
+
export { BuilderError, PREDICATE_OPERATORS, and, expr, or } from './chunk-PL73GJR4.js';
|
|
4
|
+
import './chunk-REV7ZOA4.js';
|