@boboddy/sdk 0.4.3 → 0.5.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.
Files changed (39) hide show
  1. package/dist/boboddy-config-parser.js +2 -2
  2. package/dist/client.js +20 -43
  3. package/dist/contracts/artifacts.js +948 -948
  4. package/dist/defaults/index.js +11 -11
  5. package/dist/definitions/advancement-policies/define-advancement-policy.d.ts +30 -5
  6. package/dist/definitions/advancement-policies/index.js +21 -11
  7. package/dist/definitions/pipelines/bindings.d.ts +62 -0
  8. package/dist/definitions/pipelines/builder-helpers.d.ts +19 -106
  9. package/dist/definitions/pipelines/chain-graph.d.ts +15 -14
  10. package/dist/definitions/pipelines/compile-node-definitions.d.ts +27 -0
  11. package/dist/definitions/pipelines/define-pipeline.d.ts +101 -154
  12. package/dist/definitions/pipelines/index.d.ts +0 -2
  13. package/dist/definitions/pipelines/index.js +1457 -1602
  14. package/dist/definitions/pipelines/node-input-ctx.d.ts +31 -0
  15. package/dist/definitions/pipelines/pipeline-definitions-client.d.ts +18 -4
  16. package/dist/definitions/pipelines/pipeline-states.d.ts +104 -0
  17. package/dist/definitions/steps/define-code-step.d.ts +50 -0
  18. package/dist/definitions/steps/define-step.d.ts +22 -1
  19. package/dist/definitions/steps/index.d.ts +1 -0
  20. package/dist/definitions/steps/index.js +13782 -13765
  21. package/dist/definitions/steps/step-definitions-client.d.ts +29 -5
  22. package/dist/definitions/validation/index.js +15152 -98
  23. package/dist/definitions/validation/validate-definition-specs.d.ts +19 -1
  24. package/dist/generated/index.d.ts +1 -1
  25. package/dist/generated/sdk.gen.d.ts +1 -4
  26. package/dist/generated/types.gen.d.ts +296 -878
  27. package/dist/health-checks.js +950 -950
  28. package/dist/index.js +1624 -1729
  29. package/dist/jsonc.js +2 -2
  30. package/dist/opencode-mcp.js +946 -946
  31. package/dist/opencode-plugin.js +950 -950
  32. package/dist/push/collect-definitions.d.ts +40 -1
  33. package/dist/push/index.d.ts +2 -2
  34. package/dist/push/index.js +14595 -14545
  35. package/dist/step-execution-plane-client.d.ts +9 -4
  36. package/package.json +2 -2
  37. package/dist/definitions/pipelines/builder.d.ts +0 -80
  38. package/dist/definitions/pipelines/fan-out-builder.d.ts +0 -66
  39. package/dist/definitions/pipelines/input-accessor.d.ts +0 -25
@@ -17,523 +17,523 @@ var __export = (target, all) => {
17
17
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
18
18
  var exports_external = {};
19
19
  __export(exports_external, {
20
- xor: () => xor,
21
- xid: () => xid2,
22
- void: () => _void2,
23
- uuidv7: () => uuidv7,
24
- uuidv6: () => uuidv6,
25
- uuidv4: () => uuidv4,
26
- uuid: () => uuid2,
27
- util: () => exports_util,
28
- url: () => url,
29
- uppercase: () => _uppercase,
30
- unknown: () => unknown,
31
- union: () => union,
32
- undefined: () => _undefined3,
33
- ulid: () => ulid2,
34
- uint64: () => uint64,
35
- uint32: () => uint32,
36
- tuple: () => tuple,
37
- trim: () => _trim,
38
- treeifyError: () => treeifyError,
39
- transform: () => transform,
40
- toUpperCase: () => _toUpperCase,
41
- toLowerCase: () => _toLowerCase,
42
- toJSONSchema: () => toJSONSchema,
43
- templateLiteral: () => templateLiteral,
44
- symbol: () => symbol,
45
- superRefine: () => superRefine,
46
- success: () => success,
47
- stringbool: () => stringbool,
48
- stringFormat: () => stringFormat,
49
- string: () => string2,
50
- strictObject: () => strictObject,
51
- startsWith: () => _startsWith,
52
- slugify: () => _slugify,
53
- size: () => _size,
54
- setErrorMap: () => setErrorMap,
55
- set: () => set,
56
- safeParseAsync: () => safeParseAsync2,
57
- safeParse: () => safeParse2,
58
- safeEncodeAsync: () => safeEncodeAsync2,
59
- safeEncode: () => safeEncode2,
60
- safeDecodeAsync: () => safeDecodeAsync2,
61
- safeDecode: () => safeDecode2,
62
- registry: () => registry,
63
- regexes: () => exports_regexes,
64
- regex: () => _regex,
65
- refine: () => refine,
66
- record: () => record,
67
- readonly: () => readonly,
68
- property: () => _property,
69
- promise: () => promise,
70
- prettifyError: () => prettifyError,
71
- preprocess: () => preprocess,
72
- prefault: () => prefault,
73
- positive: () => _positive,
74
- pipe: () => pipe,
75
- partialRecord: () => partialRecord,
76
- parseAsync: () => parseAsync2,
77
- parse: () => parse3,
78
- overwrite: () => _overwrite,
79
- optional: () => optional,
80
- object: () => object,
81
- number: () => number2,
82
- nullish: () => nullish2,
83
- nullable: () => nullable,
84
- null: () => _null3,
85
- normalize: () => _normalize,
86
- nonpositive: () => _nonpositive,
87
- nonoptional: () => nonoptional,
88
- nonnegative: () => _nonnegative,
89
- never: () => never,
90
- negative: () => _negative,
91
- nativeEnum: () => nativeEnum,
92
- nanoid: () => nanoid2,
93
- nan: () => nan,
94
- multipleOf: () => _multipleOf,
95
- minSize: () => _minSize,
96
- minLength: () => _minLength,
97
- mime: () => _mime,
98
- meta: () => meta2,
99
- maxSize: () => _maxSize,
100
- maxLength: () => _maxLength,
101
- map: () => map,
102
- mac: () => mac2,
103
- lte: () => _lte,
104
- lt: () => _lt,
105
- lowercase: () => _lowercase,
106
- looseRecord: () => looseRecord,
107
- looseObject: () => looseObject,
108
- locales: () => exports_locales,
109
- literal: () => literal,
110
- length: () => _length,
111
- lazy: () => lazy,
112
- ksuid: () => ksuid2,
113
- keyof: () => keyof,
114
- jwt: () => jwt,
115
- json: () => json,
116
- iso: () => exports_iso,
117
- ipv6: () => ipv62,
118
- ipv4: () => ipv42,
119
- invertCodec: () => invertCodec,
120
- intersection: () => intersection,
121
- int64: () => int64,
122
- int32: () => int32,
123
- int: () => int,
124
- instanceof: () => _instanceof,
125
- includes: () => _includes,
126
- httpUrl: () => httpUrl,
127
- hostname: () => hostname2,
128
- hex: () => hex2,
129
- hash: () => hash,
130
- guid: () => guid2,
131
- gte: () => _gte,
132
- gt: () => _gt,
133
- globalRegistry: () => globalRegistry,
134
- getErrorMap: () => getErrorMap,
135
- function: () => _function,
136
- fromJSONSchema: () => fromJSONSchema,
137
- formatError: () => formatError,
138
- float64: () => float64,
139
- float32: () => float32,
140
- flattenError: () => flattenError,
141
- file: () => file,
142
- exactOptional: () => exactOptional,
143
- enum: () => _enum2,
144
- endsWith: () => _endsWith,
145
- encodeAsync: () => encodeAsync2,
146
- encode: () => encode2,
147
- emoji: () => emoji2,
148
- email: () => email2,
149
- e164: () => e1642,
150
- discriminatedUnion: () => discriminatedUnion,
151
- describe: () => describe2,
152
- decodeAsync: () => decodeAsync2,
153
- decode: () => decode2,
154
- date: () => date3,
155
- custom: () => custom,
156
- cuid2: () => cuid22,
157
- cuid: () => cuid3,
158
- core: () => exports_core2,
159
- config: () => config,
160
- coerce: () => exports_coerce,
161
- codec: () => codec,
162
- clone: () => clone,
163
- cidrv6: () => cidrv62,
164
- cidrv4: () => cidrv42,
165
- check: () => check,
166
- catch: () => _catch2,
167
- boolean: () => boolean2,
168
- bigint: () => bigint2,
169
- base64url: () => base64url2,
170
- base64: () => base642,
171
- array: () => array,
172
- any: () => any,
173
- _function: () => _function,
174
- _default: () => _default2,
175
- _ZodString: () => _ZodString,
176
- ZodXor: () => ZodXor,
177
- ZodXID: () => ZodXID,
178
- ZodVoid: () => ZodVoid,
179
- ZodUnknown: () => ZodUnknown,
180
- ZodUnion: () => ZodUnion,
181
- ZodUndefined: () => ZodUndefined,
182
- ZodUUID: () => ZodUUID,
183
- ZodURL: () => ZodURL,
184
- ZodULID: () => ZodULID,
185
- ZodType: () => ZodType,
186
- ZodTuple: () => ZodTuple,
187
- ZodTransform: () => ZodTransform,
188
- ZodTemplateLiteral: () => ZodTemplateLiteral,
189
- ZodSymbol: () => ZodSymbol,
190
- ZodSuccess: () => ZodSuccess,
191
- ZodStringFormat: () => ZodStringFormat,
192
- ZodString: () => ZodString,
193
- ZodSet: () => ZodSet,
194
- ZodRecord: () => ZodRecord,
195
- ZodRealError: () => ZodRealError,
196
- ZodReadonly: () => ZodReadonly,
197
- ZodPromise: () => ZodPromise,
198
- ZodPreprocess: () => ZodPreprocess,
199
- ZodPrefault: () => ZodPrefault,
200
- ZodPipe: () => ZodPipe,
201
- ZodOptional: () => ZodOptional,
202
- ZodObject: () => ZodObject,
203
- ZodNumberFormat: () => ZodNumberFormat,
204
- ZodNumber: () => ZodNumber,
205
- ZodNullable: () => ZodNullable,
206
- ZodNull: () => ZodNull,
207
- ZodNonOptional: () => ZodNonOptional,
208
- ZodNever: () => ZodNever,
209
- ZodNanoID: () => ZodNanoID,
210
- ZodNaN: () => ZodNaN,
211
- ZodMap: () => ZodMap,
212
- ZodMAC: () => ZodMAC,
213
- ZodLiteral: () => ZodLiteral,
214
- ZodLazy: () => ZodLazy,
215
- ZodKSUID: () => ZodKSUID,
216
- ZodJWT: () => ZodJWT,
217
- ZodIssueCode: () => ZodIssueCode,
218
- ZodIntersection: () => ZodIntersection,
219
- ZodISOTime: () => ZodISOTime,
220
- ZodISODuration: () => ZodISODuration,
221
- ZodISODateTime: () => ZodISODateTime,
222
- ZodISODate: () => ZodISODate,
223
- ZodIPv6: () => ZodIPv6,
224
- ZodIPv4: () => ZodIPv4,
225
- ZodGUID: () => ZodGUID,
226
- ZodFunction: () => ZodFunction,
227
- ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
228
- ZodFile: () => ZodFile,
229
- ZodExactOptional: () => ZodExactOptional,
230
- ZodError: () => ZodError,
231
- ZodEnum: () => ZodEnum,
232
- ZodEmoji: () => ZodEmoji,
233
- ZodEmail: () => ZodEmail,
234
- ZodE164: () => ZodE164,
235
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
236
- ZodDefault: () => ZodDefault,
237
- ZodDate: () => ZodDate,
238
- ZodCustomStringFormat: () => ZodCustomStringFormat,
239
- ZodCustom: () => ZodCustom,
240
- ZodCodec: () => ZodCodec,
241
- ZodCatch: () => ZodCatch,
242
- ZodCUID2: () => ZodCUID2,
243
- ZodCUID: () => ZodCUID,
244
- ZodCIDRv6: () => ZodCIDRv6,
245
- ZodCIDRv4: () => ZodCIDRv4,
246
- ZodBoolean: () => ZodBoolean,
247
- ZodBigIntFormat: () => ZodBigIntFormat,
248
- ZodBigInt: () => ZodBigInt,
249
- ZodBase64URL: () => ZodBase64URL,
250
- ZodBase64: () => ZodBase64,
251
- ZodArray: () => ZodArray,
252
- ZodAny: () => ZodAny,
253
- TimePrecision: () => TimePrecision,
254
- NEVER: () => NEVER,
255
- $output: () => $output,
256
- $input: () => $input,
257
- $brand: () => $brand
258
- });
259
-
260
- // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
261
- var exports_core2 = {};
262
- __export(exports_core2, {
263
- version: () => version,
264
- util: () => exports_util,
265
- treeifyError: () => treeifyError,
266
- toJSONSchema: () => toJSONSchema,
267
- toDotPath: () => toDotPath,
268
- safeParseAsync: () => safeParseAsync,
269
- safeParse: () => safeParse,
270
- safeEncodeAsync: () => safeEncodeAsync,
271
- safeEncode: () => safeEncode,
272
- safeDecodeAsync: () => safeDecodeAsync,
273
- safeDecode: () => safeDecode,
274
- registry: () => registry,
275
- regexes: () => exports_regexes,
276
- process: () => process,
277
- prettifyError: () => prettifyError,
278
- parseAsync: () => parseAsync,
279
- parse: () => parse,
280
- meta: () => meta,
281
- locales: () => exports_locales,
282
- isValidJWT: () => isValidJWT,
283
- isValidBase64URL: () => isValidBase64URL,
284
- isValidBase64: () => isValidBase64,
285
- initializeContext: () => initializeContext,
286
- globalRegistry: () => globalRegistry,
287
- globalConfig: () => globalConfig,
288
- formatError: () => formatError,
289
- flattenError: () => flattenError,
290
- finalize: () => finalize,
291
- extractDefs: () => extractDefs,
292
- encodeAsync: () => encodeAsync,
293
- encode: () => encode,
294
- describe: () => describe,
295
- decodeAsync: () => decodeAsync,
296
- decode: () => decode,
297
- createToJSONSchemaMethod: () => createToJSONSchemaMethod,
298
- createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
299
- config: () => config,
300
- clone: () => clone,
301
- _xor: () => _xor,
302
- _xid: () => _xid,
303
- _void: () => _void,
304
- _uuidv7: () => _uuidv7,
305
- _uuidv6: () => _uuidv6,
306
- _uuidv4: () => _uuidv4,
307
- _uuid: () => _uuid,
308
- _url: () => _url,
309
- _uppercase: () => _uppercase,
310
- _unknown: () => _unknown,
311
- _union: () => _union,
312
- _undefined: () => _undefined2,
313
- _ulid: () => _ulid,
314
- _uint64: () => _uint64,
315
- _uint32: () => _uint32,
316
- _tuple: () => _tuple,
317
- _trim: () => _trim,
318
- _transform: () => _transform,
319
- _toUpperCase: () => _toUpperCase,
320
- _toLowerCase: () => _toLowerCase,
321
- _templateLiteral: () => _templateLiteral,
322
- _symbol: () => _symbol,
323
- _superRefine: () => _superRefine,
324
- _success: () => _success,
325
- _stringbool: () => _stringbool,
326
- _stringFormat: () => _stringFormat,
327
- _string: () => _string,
328
- _startsWith: () => _startsWith,
329
- _slugify: () => _slugify,
330
- _size: () => _size,
331
- _set: () => _set,
332
- _safeParseAsync: () => _safeParseAsync,
333
- _safeParse: () => _safeParse,
334
- _safeEncodeAsync: () => _safeEncodeAsync,
335
- _safeEncode: () => _safeEncode,
336
- _safeDecodeAsync: () => _safeDecodeAsync,
337
- _safeDecode: () => _safeDecode,
338
- _regex: () => _regex,
339
- _refine: () => _refine,
340
- _record: () => _record,
341
- _readonly: () => _readonly,
342
- _property: () => _property,
343
- _promise: () => _promise,
344
- _positive: () => _positive,
345
- _pipe: () => _pipe,
346
- _parseAsync: () => _parseAsync,
347
- _parse: () => _parse,
348
- _overwrite: () => _overwrite,
349
- _optional: () => _optional,
350
- _number: () => _number,
351
- _nullable: () => _nullable,
352
- _null: () => _null2,
353
- _normalize: () => _normalize,
354
- _nonpositive: () => _nonpositive,
355
- _nonoptional: () => _nonoptional,
356
- _nonnegative: () => _nonnegative,
357
- _never: () => _never,
358
- _negative: () => _negative,
359
- _nativeEnum: () => _nativeEnum,
360
- _nanoid: () => _nanoid,
361
- _nan: () => _nan,
362
- _multipleOf: () => _multipleOf,
363
- _minSize: () => _minSize,
364
- _minLength: () => _minLength,
365
- _min: () => _gte,
366
- _mime: () => _mime,
367
- _maxSize: () => _maxSize,
368
- _maxLength: () => _maxLength,
369
- _max: () => _lte,
370
- _map: () => _map,
371
- _mac: () => _mac,
372
- _lte: () => _lte,
373
- _lt: () => _lt,
374
- _lowercase: () => _lowercase,
375
- _literal: () => _literal,
376
- _length: () => _length,
377
- _lazy: () => _lazy,
378
- _ksuid: () => _ksuid,
379
- _jwt: () => _jwt,
380
- _isoTime: () => _isoTime,
381
- _isoDuration: () => _isoDuration,
382
- _isoDateTime: () => _isoDateTime,
383
- _isoDate: () => _isoDate,
384
- _ipv6: () => _ipv6,
385
- _ipv4: () => _ipv4,
386
- _intersection: () => _intersection,
387
- _int64: () => _int64,
388
- _int32: () => _int32,
389
- _int: () => _int,
390
- _includes: () => _includes,
391
- _guid: () => _guid,
392
- _gte: () => _gte,
393
- _gt: () => _gt,
394
- _float64: () => _float64,
395
- _float32: () => _float32,
396
- _file: () => _file,
397
- _enum: () => _enum,
398
- _endsWith: () => _endsWith,
399
- _encodeAsync: () => _encodeAsync,
400
- _encode: () => _encode,
401
- _emoji: () => _emoji2,
402
- _email: () => _email,
403
- _e164: () => _e164,
404
- _discriminatedUnion: () => _discriminatedUnion,
405
- _default: () => _default,
406
- _decodeAsync: () => _decodeAsync,
407
- _decode: () => _decode,
408
- _date: () => _date,
409
- _custom: () => _custom,
410
- _cuid2: () => _cuid2,
411
- _cuid: () => _cuid,
412
- _coercedString: () => _coercedString,
413
- _coercedNumber: () => _coercedNumber,
414
- _coercedDate: () => _coercedDate,
415
- _coercedBoolean: () => _coercedBoolean,
416
- _coercedBigint: () => _coercedBigint,
417
- _cidrv6: () => _cidrv6,
418
- _cidrv4: () => _cidrv4,
419
- _check: () => _check,
420
- _catch: () => _catch,
421
- _boolean: () => _boolean,
422
- _bigint: () => _bigint,
423
- _base64url: () => _base64url,
424
- _base64: () => _base64,
425
- _array: () => _array,
426
- _any: () => _any,
427
- TimePrecision: () => TimePrecision,
428
- NEVER: () => NEVER,
429
- JSONSchemaGenerator: () => JSONSchemaGenerator,
430
- JSONSchema: () => exports_json_schema,
431
- Doc: () => Doc,
432
- $output: () => $output,
433
- $input: () => $input,
434
- $constructor: () => $constructor,
435
20
  $brand: () => $brand,
436
- $ZodXor: () => $ZodXor,
437
- $ZodXID: () => $ZodXID,
438
- $ZodVoid: () => $ZodVoid,
439
- $ZodUnknown: () => $ZodUnknown,
440
- $ZodUnion: () => $ZodUnion,
441
- $ZodUndefined: () => $ZodUndefined,
442
- $ZodUUID: () => $ZodUUID,
443
- $ZodURL: () => $ZodURL,
444
- $ZodULID: () => $ZodULID,
445
- $ZodType: () => $ZodType,
446
- $ZodTuple: () => $ZodTuple,
447
- $ZodTransform: () => $ZodTransform,
448
- $ZodTemplateLiteral: () => $ZodTemplateLiteral,
449
- $ZodSymbol: () => $ZodSymbol,
450
- $ZodSuccess: () => $ZodSuccess,
451
- $ZodStringFormat: () => $ZodStringFormat,
452
- $ZodString: () => $ZodString,
453
- $ZodSet: () => $ZodSet,
454
- $ZodRegistry: () => $ZodRegistry,
455
- $ZodRecord: () => $ZodRecord,
456
- $ZodRealError: () => $ZodRealError,
457
- $ZodReadonly: () => $ZodReadonly,
458
- $ZodPromise: () => $ZodPromise,
459
- $ZodPreprocess: () => $ZodPreprocess,
460
- $ZodPrefault: () => $ZodPrefault,
461
- $ZodPipe: () => $ZodPipe,
462
- $ZodOptional: () => $ZodOptional,
463
- $ZodObjectJIT: () => $ZodObjectJIT,
464
- $ZodObject: () => $ZodObject,
465
- $ZodNumberFormat: () => $ZodNumberFormat,
466
- $ZodNumber: () => $ZodNumber,
467
- $ZodNullable: () => $ZodNullable,
468
- $ZodNull: () => $ZodNull,
469
- $ZodNonOptional: () => $ZodNonOptional,
470
- $ZodNever: () => $ZodNever,
471
- $ZodNanoID: () => $ZodNanoID,
472
- $ZodNaN: () => $ZodNaN,
473
- $ZodMap: () => $ZodMap,
474
- $ZodMAC: () => $ZodMAC,
475
- $ZodLiteral: () => $ZodLiteral,
476
- $ZodLazy: () => $ZodLazy,
477
- $ZodKSUID: () => $ZodKSUID,
478
- $ZodJWT: () => $ZodJWT,
479
- $ZodIntersection: () => $ZodIntersection,
480
- $ZodISOTime: () => $ZodISOTime,
481
- $ZodISODuration: () => $ZodISODuration,
482
- $ZodISODateTime: () => $ZodISODateTime,
483
- $ZodISODate: () => $ZodISODate,
484
- $ZodIPv6: () => $ZodIPv6,
485
- $ZodIPv4: () => $ZodIPv4,
486
- $ZodGUID: () => $ZodGUID,
487
- $ZodFunction: () => $ZodFunction,
488
- $ZodFile: () => $ZodFile,
489
- $ZodExactOptional: () => $ZodExactOptional,
490
- $ZodError: () => $ZodError,
491
- $ZodEnum: () => $ZodEnum,
492
- $ZodEncodeError: () => $ZodEncodeError,
493
- $ZodEmoji: () => $ZodEmoji,
494
- $ZodEmail: () => $ZodEmail,
495
- $ZodE164: () => $ZodE164,
496
- $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
497
- $ZodDefault: () => $ZodDefault,
498
- $ZodDate: () => $ZodDate,
499
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
500
- $ZodCustom: () => $ZodCustom,
501
- $ZodCodec: () => $ZodCodec,
502
- $ZodCheckUpperCase: () => $ZodCheckUpperCase,
503
- $ZodCheckStringFormat: () => $ZodCheckStringFormat,
504
- $ZodCheckStartsWith: () => $ZodCheckStartsWith,
505
- $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
506
- $ZodCheckRegex: () => $ZodCheckRegex,
507
- $ZodCheckProperty: () => $ZodCheckProperty,
508
- $ZodCheckOverwrite: () => $ZodCheckOverwrite,
509
- $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
510
- $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
511
- $ZodCheckMinSize: () => $ZodCheckMinSize,
512
- $ZodCheckMinLength: () => $ZodCheckMinLength,
513
- $ZodCheckMimeType: () => $ZodCheckMimeType,
514
- $ZodCheckMaxSize: () => $ZodCheckMaxSize,
515
- $ZodCheckMaxLength: () => $ZodCheckMaxLength,
516
- $ZodCheckLowerCase: () => $ZodCheckLowerCase,
517
- $ZodCheckLessThan: () => $ZodCheckLessThan,
518
- $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
519
- $ZodCheckIncludes: () => $ZodCheckIncludes,
520
- $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
521
- $ZodCheckEndsWith: () => $ZodCheckEndsWith,
522
- $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
523
- $ZodCheck: () => $ZodCheck,
524
- $ZodCatch: () => $ZodCatch,
525
- $ZodCUID2: () => $ZodCUID2,
526
- $ZodCUID: () => $ZodCUID,
527
- $ZodCIDRv6: () => $ZodCIDRv6,
528
- $ZodCIDRv4: () => $ZodCIDRv4,
529
- $ZodBoolean: () => $ZodBoolean,
530
- $ZodBigIntFormat: () => $ZodBigIntFormat,
531
- $ZodBigInt: () => $ZodBigInt,
532
- $ZodBase64URL: () => $ZodBase64URL,
533
- $ZodBase64: () => $ZodBase64,
534
- $ZodAsyncError: () => $ZodAsyncError,
21
+ $input: () => $input,
22
+ $output: () => $output,
23
+ NEVER: () => NEVER,
24
+ TimePrecision: () => TimePrecision,
25
+ ZodAny: () => ZodAny,
26
+ ZodArray: () => ZodArray,
27
+ ZodBase64: () => ZodBase64,
28
+ ZodBase64URL: () => ZodBase64URL,
29
+ ZodBigInt: () => ZodBigInt,
30
+ ZodBigIntFormat: () => ZodBigIntFormat,
31
+ ZodBoolean: () => ZodBoolean,
32
+ ZodCIDRv4: () => ZodCIDRv4,
33
+ ZodCIDRv6: () => ZodCIDRv6,
34
+ ZodCUID: () => ZodCUID,
35
+ ZodCUID2: () => ZodCUID2,
36
+ ZodCatch: () => ZodCatch,
37
+ ZodCodec: () => ZodCodec,
38
+ ZodCustom: () => ZodCustom,
39
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
40
+ ZodDate: () => ZodDate,
41
+ ZodDefault: () => ZodDefault,
42
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
43
+ ZodE164: () => ZodE164,
44
+ ZodEmail: () => ZodEmail,
45
+ ZodEmoji: () => ZodEmoji,
46
+ ZodEnum: () => ZodEnum,
47
+ ZodError: () => ZodError,
48
+ ZodExactOptional: () => ZodExactOptional,
49
+ ZodFile: () => ZodFile,
50
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
51
+ ZodFunction: () => ZodFunction,
52
+ ZodGUID: () => ZodGUID,
53
+ ZodIPv4: () => ZodIPv4,
54
+ ZodIPv6: () => ZodIPv6,
55
+ ZodISODate: () => ZodISODate,
56
+ ZodISODateTime: () => ZodISODateTime,
57
+ ZodISODuration: () => ZodISODuration,
58
+ ZodISOTime: () => ZodISOTime,
59
+ ZodIntersection: () => ZodIntersection,
60
+ ZodIssueCode: () => ZodIssueCode,
61
+ ZodJWT: () => ZodJWT,
62
+ ZodKSUID: () => ZodKSUID,
63
+ ZodLazy: () => ZodLazy,
64
+ ZodLiteral: () => ZodLiteral,
65
+ ZodMAC: () => ZodMAC,
66
+ ZodMap: () => ZodMap,
67
+ ZodNaN: () => ZodNaN,
68
+ ZodNanoID: () => ZodNanoID,
69
+ ZodNever: () => ZodNever,
70
+ ZodNonOptional: () => ZodNonOptional,
71
+ ZodNull: () => ZodNull,
72
+ ZodNullable: () => ZodNullable,
73
+ ZodNumber: () => ZodNumber,
74
+ ZodNumberFormat: () => ZodNumberFormat,
75
+ ZodObject: () => ZodObject,
76
+ ZodOptional: () => ZodOptional,
77
+ ZodPipe: () => ZodPipe,
78
+ ZodPrefault: () => ZodPrefault,
79
+ ZodPreprocess: () => ZodPreprocess,
80
+ ZodPromise: () => ZodPromise,
81
+ ZodReadonly: () => ZodReadonly,
82
+ ZodRealError: () => ZodRealError,
83
+ ZodRecord: () => ZodRecord,
84
+ ZodSet: () => ZodSet,
85
+ ZodString: () => ZodString,
86
+ ZodStringFormat: () => ZodStringFormat,
87
+ ZodSuccess: () => ZodSuccess,
88
+ ZodSymbol: () => ZodSymbol,
89
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
90
+ ZodTransform: () => ZodTransform,
91
+ ZodTuple: () => ZodTuple,
92
+ ZodType: () => ZodType,
93
+ ZodULID: () => ZodULID,
94
+ ZodURL: () => ZodURL,
95
+ ZodUUID: () => ZodUUID,
96
+ ZodUndefined: () => ZodUndefined,
97
+ ZodUnion: () => ZodUnion,
98
+ ZodUnknown: () => ZodUnknown,
99
+ ZodVoid: () => ZodVoid,
100
+ ZodXID: () => ZodXID,
101
+ ZodXor: () => ZodXor,
102
+ _ZodString: () => _ZodString,
103
+ _default: () => _default2,
104
+ _function: () => _function,
105
+ any: () => any,
106
+ array: () => array,
107
+ base64: () => base642,
108
+ base64url: () => base64url2,
109
+ bigint: () => bigint2,
110
+ boolean: () => boolean2,
111
+ catch: () => _catch2,
112
+ check: () => check,
113
+ cidrv4: () => cidrv42,
114
+ cidrv6: () => cidrv62,
115
+ clone: () => clone,
116
+ codec: () => codec,
117
+ coerce: () => exports_coerce,
118
+ config: () => config,
119
+ core: () => exports_core2,
120
+ cuid: () => cuid3,
121
+ cuid2: () => cuid22,
122
+ custom: () => custom,
123
+ date: () => date3,
124
+ decode: () => decode2,
125
+ decodeAsync: () => decodeAsync2,
126
+ describe: () => describe2,
127
+ discriminatedUnion: () => discriminatedUnion,
128
+ e164: () => e1642,
129
+ email: () => email2,
130
+ emoji: () => emoji2,
131
+ encode: () => encode2,
132
+ encodeAsync: () => encodeAsync2,
133
+ endsWith: () => _endsWith,
134
+ enum: () => _enum2,
135
+ exactOptional: () => exactOptional,
136
+ file: () => file,
137
+ flattenError: () => flattenError,
138
+ float32: () => float32,
139
+ float64: () => float64,
140
+ formatError: () => formatError,
141
+ fromJSONSchema: () => fromJSONSchema,
142
+ function: () => _function,
143
+ getErrorMap: () => getErrorMap,
144
+ globalRegistry: () => globalRegistry,
145
+ gt: () => _gt,
146
+ gte: () => _gte,
147
+ guid: () => guid2,
148
+ hash: () => hash,
149
+ hex: () => hex2,
150
+ hostname: () => hostname2,
151
+ httpUrl: () => httpUrl,
152
+ includes: () => _includes,
153
+ instanceof: () => _instanceof,
154
+ int: () => int,
155
+ int32: () => int32,
156
+ int64: () => int64,
157
+ intersection: () => intersection,
158
+ invertCodec: () => invertCodec,
159
+ ipv4: () => ipv42,
160
+ ipv6: () => ipv62,
161
+ iso: () => exports_iso,
162
+ json: () => json,
163
+ jwt: () => jwt,
164
+ keyof: () => keyof,
165
+ ksuid: () => ksuid2,
166
+ lazy: () => lazy,
167
+ length: () => _length,
168
+ literal: () => literal,
169
+ locales: () => exports_locales,
170
+ looseObject: () => looseObject,
171
+ looseRecord: () => looseRecord,
172
+ lowercase: () => _lowercase,
173
+ lt: () => _lt,
174
+ lte: () => _lte,
175
+ mac: () => mac2,
176
+ map: () => map,
177
+ maxLength: () => _maxLength,
178
+ maxSize: () => _maxSize,
179
+ meta: () => meta2,
180
+ mime: () => _mime,
181
+ minLength: () => _minLength,
182
+ minSize: () => _minSize,
183
+ multipleOf: () => _multipleOf,
184
+ nan: () => nan,
185
+ nanoid: () => nanoid2,
186
+ nativeEnum: () => nativeEnum,
187
+ negative: () => _negative,
188
+ never: () => never,
189
+ nonnegative: () => _nonnegative,
190
+ nonoptional: () => nonoptional,
191
+ nonpositive: () => _nonpositive,
192
+ normalize: () => _normalize,
193
+ null: () => _null3,
194
+ nullable: () => nullable,
195
+ nullish: () => nullish2,
196
+ number: () => number2,
197
+ object: () => object,
198
+ optional: () => optional,
199
+ overwrite: () => _overwrite,
200
+ parse: () => parse3,
201
+ parseAsync: () => parseAsync2,
202
+ partialRecord: () => partialRecord,
203
+ pipe: () => pipe,
204
+ positive: () => _positive,
205
+ prefault: () => prefault,
206
+ preprocess: () => preprocess,
207
+ prettifyError: () => prettifyError,
208
+ promise: () => promise,
209
+ property: () => _property,
210
+ readonly: () => readonly,
211
+ record: () => record,
212
+ refine: () => refine,
213
+ regex: () => _regex,
214
+ regexes: () => exports_regexes,
215
+ registry: () => registry,
216
+ safeDecode: () => safeDecode2,
217
+ safeDecodeAsync: () => safeDecodeAsync2,
218
+ safeEncode: () => safeEncode2,
219
+ safeEncodeAsync: () => safeEncodeAsync2,
220
+ safeParse: () => safeParse2,
221
+ safeParseAsync: () => safeParseAsync2,
222
+ set: () => set,
223
+ setErrorMap: () => setErrorMap,
224
+ size: () => _size,
225
+ slugify: () => _slugify,
226
+ startsWith: () => _startsWith,
227
+ strictObject: () => strictObject,
228
+ string: () => string2,
229
+ stringFormat: () => stringFormat,
230
+ stringbool: () => stringbool,
231
+ success: () => success,
232
+ superRefine: () => superRefine,
233
+ symbol: () => symbol,
234
+ templateLiteral: () => templateLiteral,
235
+ toJSONSchema: () => toJSONSchema,
236
+ toLowerCase: () => _toLowerCase,
237
+ toUpperCase: () => _toUpperCase,
238
+ transform: () => transform,
239
+ treeifyError: () => treeifyError,
240
+ trim: () => _trim,
241
+ tuple: () => tuple,
242
+ uint32: () => uint32,
243
+ uint64: () => uint64,
244
+ ulid: () => ulid2,
245
+ undefined: () => _undefined3,
246
+ union: () => union,
247
+ unknown: () => unknown,
248
+ uppercase: () => _uppercase,
249
+ url: () => url,
250
+ util: () => exports_util,
251
+ uuid: () => uuid2,
252
+ uuidv4: () => uuidv4,
253
+ uuidv6: () => uuidv6,
254
+ uuidv7: () => uuidv7,
255
+ void: () => _void2,
256
+ xid: () => xid2,
257
+ xor: () => xor
258
+ });
259
+
260
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
261
+ var exports_core2 = {};
262
+ __export(exports_core2, {
263
+ $ZodAny: () => $ZodAny,
535
264
  $ZodArray: () => $ZodArray,
536
- $ZodAny: () => $ZodAny
265
+ $ZodAsyncError: () => $ZodAsyncError,
266
+ $ZodBase64: () => $ZodBase64,
267
+ $ZodBase64URL: () => $ZodBase64URL,
268
+ $ZodBigInt: () => $ZodBigInt,
269
+ $ZodBigIntFormat: () => $ZodBigIntFormat,
270
+ $ZodBoolean: () => $ZodBoolean,
271
+ $ZodCIDRv4: () => $ZodCIDRv4,
272
+ $ZodCIDRv6: () => $ZodCIDRv6,
273
+ $ZodCUID: () => $ZodCUID,
274
+ $ZodCUID2: () => $ZodCUID2,
275
+ $ZodCatch: () => $ZodCatch,
276
+ $ZodCheck: () => $ZodCheck,
277
+ $ZodCheckBigIntFormat: () => $ZodCheckBigIntFormat,
278
+ $ZodCheckEndsWith: () => $ZodCheckEndsWith,
279
+ $ZodCheckGreaterThan: () => $ZodCheckGreaterThan,
280
+ $ZodCheckIncludes: () => $ZodCheckIncludes,
281
+ $ZodCheckLengthEquals: () => $ZodCheckLengthEquals,
282
+ $ZodCheckLessThan: () => $ZodCheckLessThan,
283
+ $ZodCheckLowerCase: () => $ZodCheckLowerCase,
284
+ $ZodCheckMaxLength: () => $ZodCheckMaxLength,
285
+ $ZodCheckMaxSize: () => $ZodCheckMaxSize,
286
+ $ZodCheckMimeType: () => $ZodCheckMimeType,
287
+ $ZodCheckMinLength: () => $ZodCheckMinLength,
288
+ $ZodCheckMinSize: () => $ZodCheckMinSize,
289
+ $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
290
+ $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
291
+ $ZodCheckOverwrite: () => $ZodCheckOverwrite,
292
+ $ZodCheckProperty: () => $ZodCheckProperty,
293
+ $ZodCheckRegex: () => $ZodCheckRegex,
294
+ $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
295
+ $ZodCheckStartsWith: () => $ZodCheckStartsWith,
296
+ $ZodCheckStringFormat: () => $ZodCheckStringFormat,
297
+ $ZodCheckUpperCase: () => $ZodCheckUpperCase,
298
+ $ZodCodec: () => $ZodCodec,
299
+ $ZodCustom: () => $ZodCustom,
300
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
301
+ $ZodDate: () => $ZodDate,
302
+ $ZodDefault: () => $ZodDefault,
303
+ $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
304
+ $ZodE164: () => $ZodE164,
305
+ $ZodEmail: () => $ZodEmail,
306
+ $ZodEmoji: () => $ZodEmoji,
307
+ $ZodEncodeError: () => $ZodEncodeError,
308
+ $ZodEnum: () => $ZodEnum,
309
+ $ZodError: () => $ZodError,
310
+ $ZodExactOptional: () => $ZodExactOptional,
311
+ $ZodFile: () => $ZodFile,
312
+ $ZodFunction: () => $ZodFunction,
313
+ $ZodGUID: () => $ZodGUID,
314
+ $ZodIPv4: () => $ZodIPv4,
315
+ $ZodIPv6: () => $ZodIPv6,
316
+ $ZodISODate: () => $ZodISODate,
317
+ $ZodISODateTime: () => $ZodISODateTime,
318
+ $ZodISODuration: () => $ZodISODuration,
319
+ $ZodISOTime: () => $ZodISOTime,
320
+ $ZodIntersection: () => $ZodIntersection,
321
+ $ZodJWT: () => $ZodJWT,
322
+ $ZodKSUID: () => $ZodKSUID,
323
+ $ZodLazy: () => $ZodLazy,
324
+ $ZodLiteral: () => $ZodLiteral,
325
+ $ZodMAC: () => $ZodMAC,
326
+ $ZodMap: () => $ZodMap,
327
+ $ZodNaN: () => $ZodNaN,
328
+ $ZodNanoID: () => $ZodNanoID,
329
+ $ZodNever: () => $ZodNever,
330
+ $ZodNonOptional: () => $ZodNonOptional,
331
+ $ZodNull: () => $ZodNull,
332
+ $ZodNullable: () => $ZodNullable,
333
+ $ZodNumber: () => $ZodNumber,
334
+ $ZodNumberFormat: () => $ZodNumberFormat,
335
+ $ZodObject: () => $ZodObject,
336
+ $ZodObjectJIT: () => $ZodObjectJIT,
337
+ $ZodOptional: () => $ZodOptional,
338
+ $ZodPipe: () => $ZodPipe,
339
+ $ZodPrefault: () => $ZodPrefault,
340
+ $ZodPreprocess: () => $ZodPreprocess,
341
+ $ZodPromise: () => $ZodPromise,
342
+ $ZodReadonly: () => $ZodReadonly,
343
+ $ZodRealError: () => $ZodRealError,
344
+ $ZodRecord: () => $ZodRecord,
345
+ $ZodRegistry: () => $ZodRegistry,
346
+ $ZodSet: () => $ZodSet,
347
+ $ZodString: () => $ZodString,
348
+ $ZodStringFormat: () => $ZodStringFormat,
349
+ $ZodSuccess: () => $ZodSuccess,
350
+ $ZodSymbol: () => $ZodSymbol,
351
+ $ZodTemplateLiteral: () => $ZodTemplateLiteral,
352
+ $ZodTransform: () => $ZodTransform,
353
+ $ZodTuple: () => $ZodTuple,
354
+ $ZodType: () => $ZodType,
355
+ $ZodULID: () => $ZodULID,
356
+ $ZodURL: () => $ZodURL,
357
+ $ZodUUID: () => $ZodUUID,
358
+ $ZodUndefined: () => $ZodUndefined,
359
+ $ZodUnion: () => $ZodUnion,
360
+ $ZodUnknown: () => $ZodUnknown,
361
+ $ZodVoid: () => $ZodVoid,
362
+ $ZodXID: () => $ZodXID,
363
+ $ZodXor: () => $ZodXor,
364
+ $brand: () => $brand,
365
+ $constructor: () => $constructor,
366
+ $input: () => $input,
367
+ $output: () => $output,
368
+ Doc: () => Doc,
369
+ JSONSchema: () => exports_json_schema,
370
+ JSONSchemaGenerator: () => JSONSchemaGenerator,
371
+ NEVER: () => NEVER,
372
+ TimePrecision: () => TimePrecision,
373
+ _any: () => _any,
374
+ _array: () => _array,
375
+ _base64: () => _base64,
376
+ _base64url: () => _base64url,
377
+ _bigint: () => _bigint,
378
+ _boolean: () => _boolean,
379
+ _catch: () => _catch,
380
+ _check: () => _check,
381
+ _cidrv4: () => _cidrv4,
382
+ _cidrv6: () => _cidrv6,
383
+ _coercedBigint: () => _coercedBigint,
384
+ _coercedBoolean: () => _coercedBoolean,
385
+ _coercedDate: () => _coercedDate,
386
+ _coercedNumber: () => _coercedNumber,
387
+ _coercedString: () => _coercedString,
388
+ _cuid: () => _cuid,
389
+ _cuid2: () => _cuid2,
390
+ _custom: () => _custom,
391
+ _date: () => _date,
392
+ _decode: () => _decode,
393
+ _decodeAsync: () => _decodeAsync,
394
+ _default: () => _default,
395
+ _discriminatedUnion: () => _discriminatedUnion,
396
+ _e164: () => _e164,
397
+ _email: () => _email,
398
+ _emoji: () => _emoji2,
399
+ _encode: () => _encode,
400
+ _encodeAsync: () => _encodeAsync,
401
+ _endsWith: () => _endsWith,
402
+ _enum: () => _enum,
403
+ _file: () => _file,
404
+ _float32: () => _float32,
405
+ _float64: () => _float64,
406
+ _gt: () => _gt,
407
+ _gte: () => _gte,
408
+ _guid: () => _guid,
409
+ _includes: () => _includes,
410
+ _int: () => _int,
411
+ _int32: () => _int32,
412
+ _int64: () => _int64,
413
+ _intersection: () => _intersection,
414
+ _ipv4: () => _ipv4,
415
+ _ipv6: () => _ipv6,
416
+ _isoDate: () => _isoDate,
417
+ _isoDateTime: () => _isoDateTime,
418
+ _isoDuration: () => _isoDuration,
419
+ _isoTime: () => _isoTime,
420
+ _jwt: () => _jwt,
421
+ _ksuid: () => _ksuid,
422
+ _lazy: () => _lazy,
423
+ _length: () => _length,
424
+ _literal: () => _literal,
425
+ _lowercase: () => _lowercase,
426
+ _lt: () => _lt,
427
+ _lte: () => _lte,
428
+ _mac: () => _mac,
429
+ _map: () => _map,
430
+ _max: () => _lte,
431
+ _maxLength: () => _maxLength,
432
+ _maxSize: () => _maxSize,
433
+ _mime: () => _mime,
434
+ _min: () => _gte,
435
+ _minLength: () => _minLength,
436
+ _minSize: () => _minSize,
437
+ _multipleOf: () => _multipleOf,
438
+ _nan: () => _nan,
439
+ _nanoid: () => _nanoid,
440
+ _nativeEnum: () => _nativeEnum,
441
+ _negative: () => _negative,
442
+ _never: () => _never,
443
+ _nonnegative: () => _nonnegative,
444
+ _nonoptional: () => _nonoptional,
445
+ _nonpositive: () => _nonpositive,
446
+ _normalize: () => _normalize,
447
+ _null: () => _null2,
448
+ _nullable: () => _nullable,
449
+ _number: () => _number,
450
+ _optional: () => _optional,
451
+ _overwrite: () => _overwrite,
452
+ _parse: () => _parse,
453
+ _parseAsync: () => _parseAsync,
454
+ _pipe: () => _pipe,
455
+ _positive: () => _positive,
456
+ _promise: () => _promise,
457
+ _property: () => _property,
458
+ _readonly: () => _readonly,
459
+ _record: () => _record,
460
+ _refine: () => _refine,
461
+ _regex: () => _regex,
462
+ _safeDecode: () => _safeDecode,
463
+ _safeDecodeAsync: () => _safeDecodeAsync,
464
+ _safeEncode: () => _safeEncode,
465
+ _safeEncodeAsync: () => _safeEncodeAsync,
466
+ _safeParse: () => _safeParse,
467
+ _safeParseAsync: () => _safeParseAsync,
468
+ _set: () => _set,
469
+ _size: () => _size,
470
+ _slugify: () => _slugify,
471
+ _startsWith: () => _startsWith,
472
+ _string: () => _string,
473
+ _stringFormat: () => _stringFormat,
474
+ _stringbool: () => _stringbool,
475
+ _success: () => _success,
476
+ _superRefine: () => _superRefine,
477
+ _symbol: () => _symbol,
478
+ _templateLiteral: () => _templateLiteral,
479
+ _toLowerCase: () => _toLowerCase,
480
+ _toUpperCase: () => _toUpperCase,
481
+ _transform: () => _transform,
482
+ _trim: () => _trim,
483
+ _tuple: () => _tuple,
484
+ _uint32: () => _uint32,
485
+ _uint64: () => _uint64,
486
+ _ulid: () => _ulid,
487
+ _undefined: () => _undefined2,
488
+ _union: () => _union,
489
+ _unknown: () => _unknown,
490
+ _uppercase: () => _uppercase,
491
+ _url: () => _url,
492
+ _uuid: () => _uuid,
493
+ _uuidv4: () => _uuidv4,
494
+ _uuidv6: () => _uuidv6,
495
+ _uuidv7: () => _uuidv7,
496
+ _void: () => _void,
497
+ _xid: () => _xid,
498
+ _xor: () => _xor,
499
+ clone: () => clone,
500
+ config: () => config,
501
+ createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod,
502
+ createToJSONSchemaMethod: () => createToJSONSchemaMethod,
503
+ decode: () => decode,
504
+ decodeAsync: () => decodeAsync,
505
+ describe: () => describe,
506
+ encode: () => encode,
507
+ encodeAsync: () => encodeAsync,
508
+ extractDefs: () => extractDefs,
509
+ finalize: () => finalize,
510
+ flattenError: () => flattenError,
511
+ formatError: () => formatError,
512
+ globalConfig: () => globalConfig,
513
+ globalRegistry: () => globalRegistry,
514
+ initializeContext: () => initializeContext,
515
+ isValidBase64: () => isValidBase64,
516
+ isValidBase64URL: () => isValidBase64URL,
517
+ isValidJWT: () => isValidJWT,
518
+ locales: () => exports_locales,
519
+ meta: () => meta,
520
+ parse: () => parse,
521
+ parseAsync: () => parseAsync,
522
+ prettifyError: () => prettifyError,
523
+ process: () => process,
524
+ regexes: () => exports_regexes,
525
+ registry: () => registry,
526
+ safeDecode: () => safeDecode,
527
+ safeDecodeAsync: () => safeDecodeAsync,
528
+ safeEncode: () => safeEncode,
529
+ safeEncodeAsync: () => safeEncodeAsync,
530
+ safeParse: () => safeParse,
531
+ safeParseAsync: () => safeParseAsync,
532
+ toDotPath: () => toDotPath,
533
+ toJSONSchema: () => toJSONSchema,
534
+ treeifyError: () => treeifyError,
535
+ util: () => exports_util,
536
+ version: () => version
537
537
  });
538
538
 
539
539
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
@@ -600,86 +600,86 @@ class $ZodAsyncError extends Error {
600
600
  super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
601
601
  }
602
602
  }
603
-
604
- class $ZodEncodeError extends Error {
605
- constructor(name) {
606
- super(`Encountered unidirectional transform during encode: ${name}`);
607
- this.name = "ZodEncodeError";
608
- }
609
- }
610
- (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
611
- var globalConfig = globalThis.__zod_globalConfig;
612
- function config(newConfig) {
613
- if (newConfig)
614
- Object.assign(globalConfig, newConfig);
615
- return globalConfig;
616
- }
617
- // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.js
618
- var exports_util = {};
619
- __export(exports_util, {
620
- unwrapMessage: () => unwrapMessage,
621
- uint8ArrayToHex: () => uint8ArrayToHex,
622
- uint8ArrayToBase64url: () => uint8ArrayToBase64url,
623
- uint8ArrayToBase64: () => uint8ArrayToBase64,
624
- stringifyPrimitive: () => stringifyPrimitive,
625
- slugify: () => slugify,
626
- shallowClone: () => shallowClone,
627
- safeExtend: () => safeExtend,
628
- required: () => required,
629
- randomString: () => randomString,
630
- propertyKeyTypes: () => propertyKeyTypes,
631
- promiseAllObject: () => promiseAllObject,
632
- primitiveTypes: () => primitiveTypes,
633
- prefixIssues: () => prefixIssues,
634
- pick: () => pick,
635
- partial: () => partial,
636
- parsedType: () => parsedType,
637
- optionalKeys: () => optionalKeys,
638
- omit: () => omit,
639
- objectClone: () => objectClone,
640
- numKeys: () => numKeys,
641
- nullish: () => nullish,
642
- normalizeParams: () => normalizeParams,
643
- mergeDefs: () => mergeDefs,
644
- merge: () => merge,
645
- jsonStringifyReplacer: () => jsonStringifyReplacer,
646
- joinValues: () => joinValues,
647
- issue: () => issue,
648
- isPlainObject: () => isPlainObject,
649
- isObject: () => isObject,
650
- hexToUint8Array: () => hexToUint8Array,
651
- getSizableOrigin: () => getSizableOrigin,
652
- getParsedType: () => getParsedType,
653
- getLengthableOrigin: () => getLengthableOrigin,
654
- getEnumValues: () => getEnumValues,
655
- getElementAtPath: () => getElementAtPath,
656
- floatSafeRemainder: () => floatSafeRemainder,
657
- finalizeIssue: () => finalizeIssue,
658
- extend: () => extend,
659
- explicitlyAborted: () => explicitlyAborted,
660
- escapeRegex: () => escapeRegex,
661
- esc: () => esc,
662
- defineLazy: () => defineLazy,
663
- createTransparentProxy: () => createTransparentProxy,
664
- cloneDef: () => cloneDef,
665
- clone: () => clone,
666
- cleanRegex: () => cleanRegex,
667
- cleanEnum: () => cleanEnum,
668
- captureStackTrace: () => captureStackTrace,
669
- cached: () => cached,
670
- base64urlToUint8Array: () => base64urlToUint8Array,
671
- base64ToUint8Array: () => base64ToUint8Array,
672
- assignProp: () => assignProp,
673
- assertNotEqual: () => assertNotEqual,
674
- assertNever: () => assertNever,
675
- assertIs: () => assertIs,
676
- assertEqual: () => assertEqual,
677
- assert: () => assert,
678
- allowsEval: () => allowsEval,
679
- aborted: () => aborted,
680
- NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
603
+
604
+ class $ZodEncodeError extends Error {
605
+ constructor(name) {
606
+ super(`Encountered unidirectional transform during encode: ${name}`);
607
+ this.name = "ZodEncodeError";
608
+ }
609
+ }
610
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
611
+ var globalConfig = globalThis.__zod_globalConfig;
612
+ function config(newConfig) {
613
+ if (newConfig)
614
+ Object.assign(globalConfig, newConfig);
615
+ return globalConfig;
616
+ }
617
+ // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.js
618
+ var exports_util = {};
619
+ __export(exports_util, {
620
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
681
621
  Class: () => Class,
682
- BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES
622
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
623
+ aborted: () => aborted,
624
+ allowsEval: () => allowsEval,
625
+ assert: () => assert,
626
+ assertEqual: () => assertEqual,
627
+ assertIs: () => assertIs,
628
+ assertNever: () => assertNever,
629
+ assertNotEqual: () => assertNotEqual,
630
+ assignProp: () => assignProp,
631
+ base64ToUint8Array: () => base64ToUint8Array,
632
+ base64urlToUint8Array: () => base64urlToUint8Array,
633
+ cached: () => cached,
634
+ captureStackTrace: () => captureStackTrace,
635
+ cleanEnum: () => cleanEnum,
636
+ cleanRegex: () => cleanRegex,
637
+ clone: () => clone,
638
+ cloneDef: () => cloneDef,
639
+ createTransparentProxy: () => createTransparentProxy,
640
+ defineLazy: () => defineLazy,
641
+ esc: () => esc,
642
+ escapeRegex: () => escapeRegex,
643
+ explicitlyAborted: () => explicitlyAborted,
644
+ extend: () => extend,
645
+ finalizeIssue: () => finalizeIssue,
646
+ floatSafeRemainder: () => floatSafeRemainder,
647
+ getElementAtPath: () => getElementAtPath,
648
+ getEnumValues: () => getEnumValues,
649
+ getLengthableOrigin: () => getLengthableOrigin,
650
+ getParsedType: () => getParsedType,
651
+ getSizableOrigin: () => getSizableOrigin,
652
+ hexToUint8Array: () => hexToUint8Array,
653
+ isObject: () => isObject,
654
+ isPlainObject: () => isPlainObject,
655
+ issue: () => issue,
656
+ joinValues: () => joinValues,
657
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
658
+ merge: () => merge,
659
+ mergeDefs: () => mergeDefs,
660
+ normalizeParams: () => normalizeParams,
661
+ nullish: () => nullish,
662
+ numKeys: () => numKeys,
663
+ objectClone: () => objectClone,
664
+ omit: () => omit,
665
+ optionalKeys: () => optionalKeys,
666
+ parsedType: () => parsedType,
667
+ partial: () => partial,
668
+ pick: () => pick,
669
+ prefixIssues: () => prefixIssues,
670
+ primitiveTypes: () => primitiveTypes,
671
+ promiseAllObject: () => promiseAllObject,
672
+ propertyKeyTypes: () => propertyKeyTypes,
673
+ randomString: () => randomString,
674
+ required: () => required,
675
+ safeExtend: () => safeExtend,
676
+ shallowClone: () => shallowClone,
677
+ slugify: () => slugify,
678
+ stringifyPrimitive: () => stringifyPrimitive,
679
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
680
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
681
+ uint8ArrayToHex: () => uint8ArrayToHex,
682
+ unwrapMessage: () => unwrapMessage
683
683
  });
684
684
  function assertEqual(val) {
685
685
  return val;
@@ -1536,65 +1536,65 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1536
1536
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/regexes.js
1537
1537
  var exports_regexes = {};
1538
1538
  __export(exports_regexes, {
1539
- xid: () => xid,
1540
- uuid7: () => uuid7,
1541
- uuid6: () => uuid6,
1542
- uuid4: () => uuid4,
1543
- uuid: () => uuid,
1544
- uppercase: () => uppercase,
1545
- unicodeEmail: () => unicodeEmail,
1546
- undefined: () => _undefined,
1547
- ulid: () => ulid,
1548
- time: () => time,
1549
- string: () => string,
1550
- sha512_hex: () => sha512_hex,
1551
- sha512_base64url: () => sha512_base64url,
1552
- sha512_base64: () => sha512_base64,
1553
- sha384_hex: () => sha384_hex,
1554
- sha384_base64url: () => sha384_base64url,
1555
- sha384_base64: () => sha384_base64,
1556
- sha256_hex: () => sha256_hex,
1557
- sha256_base64url: () => sha256_base64url,
1558
- sha256_base64: () => sha256_base64,
1559
- sha1_hex: () => sha1_hex,
1560
- sha1_base64url: () => sha1_base64url,
1561
- sha1_base64: () => sha1_base64,
1562
- rfc5322Email: () => rfc5322Email,
1563
- number: () => number,
1564
- null: () => _null,
1565
- nanoid: () => nanoid,
1566
- md5_hex: () => md5_hex,
1567
- md5_base64url: () => md5_base64url,
1568
- md5_base64: () => md5_base64,
1569
- mac: () => mac,
1570
- lowercase: () => lowercase,
1571
- ksuid: () => ksuid,
1572
- ipv6: () => ipv6,
1573
- ipv4: () => ipv4,
1574
- integer: () => integer,
1575
- idnEmail: () => idnEmail,
1576
- httpProtocol: () => httpProtocol,
1577
- html5Email: () => html5Email,
1578
- hostname: () => hostname,
1579
- hex: () => hex,
1580
- guid: () => guid,
1581
- extendedDuration: () => extendedDuration,
1582
- emoji: () => emoji,
1583
- email: () => email,
1584
- e164: () => e164,
1585
- duration: () => duration,
1586
- domain: () => domain,
1587
- datetime: () => datetime,
1588
- date: () => date,
1589
- cuid2: () => cuid2,
1590
- cuid: () => cuid,
1591
- cidrv6: () => cidrv6,
1592
- cidrv4: () => cidrv4,
1593
- browserEmail: () => browserEmail,
1594
- boolean: () => boolean,
1595
- bigint: () => bigint,
1539
+ base64: () => base64,
1596
1540
  base64url: () => base64url,
1597
- base64: () => base64
1541
+ bigint: () => bigint,
1542
+ boolean: () => boolean,
1543
+ browserEmail: () => browserEmail,
1544
+ cidrv4: () => cidrv4,
1545
+ cidrv6: () => cidrv6,
1546
+ cuid: () => cuid,
1547
+ cuid2: () => cuid2,
1548
+ date: () => date,
1549
+ datetime: () => datetime,
1550
+ domain: () => domain,
1551
+ duration: () => duration,
1552
+ e164: () => e164,
1553
+ email: () => email,
1554
+ emoji: () => emoji,
1555
+ extendedDuration: () => extendedDuration,
1556
+ guid: () => guid,
1557
+ hex: () => hex,
1558
+ hostname: () => hostname,
1559
+ html5Email: () => html5Email,
1560
+ httpProtocol: () => httpProtocol,
1561
+ idnEmail: () => idnEmail,
1562
+ integer: () => integer,
1563
+ ipv4: () => ipv4,
1564
+ ipv6: () => ipv6,
1565
+ ksuid: () => ksuid,
1566
+ lowercase: () => lowercase,
1567
+ mac: () => mac,
1568
+ md5_base64: () => md5_base64,
1569
+ md5_base64url: () => md5_base64url,
1570
+ md5_hex: () => md5_hex,
1571
+ nanoid: () => nanoid,
1572
+ null: () => _null,
1573
+ number: () => number,
1574
+ rfc5322Email: () => rfc5322Email,
1575
+ sha1_base64: () => sha1_base64,
1576
+ sha1_base64url: () => sha1_base64url,
1577
+ sha1_hex: () => sha1_hex,
1578
+ sha256_base64: () => sha256_base64,
1579
+ sha256_base64url: () => sha256_base64url,
1580
+ sha256_hex: () => sha256_hex,
1581
+ sha384_base64: () => sha384_base64,
1582
+ sha384_base64url: () => sha384_base64url,
1583
+ sha384_hex: () => sha384_hex,
1584
+ sha512_base64: () => sha512_base64,
1585
+ sha512_base64url: () => sha512_base64url,
1586
+ sha512_hex: () => sha512_hex,
1587
+ string: () => string,
1588
+ time: () => time,
1589
+ ulid: () => ulid,
1590
+ undefined: () => _undefined,
1591
+ unicodeEmail: () => unicodeEmail,
1592
+ uppercase: () => uppercase,
1593
+ uuid: () => uuid,
1594
+ uuid4: () => uuid4,
1595
+ uuid6: () => uuid6,
1596
+ uuid7: () => uuid7,
1597
+ xid: () => xid
1598
1598
  });
1599
1599
  var cuid = /^[cC][0-9a-z]{6,}$/;
1600
1600
  var cuid2 = /^[0-9a-z]+$/;
@@ -4371,58 +4371,58 @@ function handleRefineResult(result, payload, input, inst) {
4371
4371
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/index.js
4372
4372
  var exports_locales = {};
4373
4373
  __export(exports_locales, {
4374
- zhTW: () => zh_TW_default,
4375
- zhCN: () => zh_CN_default,
4376
- yo: () => yo_default,
4377
- vi: () => vi_default,
4378
- uz: () => uz_default,
4379
- ur: () => ur_default,
4380
- uk: () => uk_default,
4381
- ua: () => ua_default,
4382
- tr: () => tr_default,
4383
- th: () => th_default,
4384
- ta: () => ta_default,
4385
- sv: () => sv_default,
4386
- sl: () => sl_default,
4387
- ru: () => ru_default,
4388
- ro: () => ro_default,
4389
- pt: () => pt_default,
4390
- ps: () => ps_default,
4391
- pl: () => pl_default,
4392
- ota: () => ota_default,
4393
- no: () => no_default,
4394
- nl: () => nl_default,
4395
- ms: () => ms_default,
4396
- mk: () => mk_default,
4397
- lt: () => lt_default,
4398
- ko: () => ko_default,
4399
- km: () => km_default,
4400
- kh: () => kh_default,
4401
- ka: () => ka_default,
4402
- ja: () => ja_default,
4403
- it: () => it_default,
4404
- is: () => is_default,
4405
- id: () => id_default,
4406
- hy: () => hy_default,
4407
- hu: () => hu_default,
4408
- hr: () => hr_default,
4409
- he: () => he_default,
4410
- frCA: () => fr_CA_default,
4411
- fr: () => fr_default,
4412
- fi: () => fi_default,
4413
- fa: () => fa_default,
4414
- es: () => es_default,
4415
- eo: () => eo_default,
4416
- en: () => en_default,
4417
- el: () => el_default,
4418
- de: () => de_default,
4419
- da: () => da_default,
4420
- cs: () => cs_default,
4421
- ca: () => ca_default,
4422
- bg: () => bg_default,
4423
- be: () => be_default,
4374
+ ar: () => ar_default,
4424
4375
  az: () => az_default,
4425
- ar: () => ar_default
4376
+ be: () => be_default,
4377
+ bg: () => bg_default,
4378
+ ca: () => ca_default,
4379
+ cs: () => cs_default,
4380
+ da: () => da_default,
4381
+ de: () => de_default,
4382
+ el: () => el_default,
4383
+ en: () => en_default,
4384
+ eo: () => eo_default,
4385
+ es: () => es_default,
4386
+ fa: () => fa_default,
4387
+ fi: () => fi_default,
4388
+ fr: () => fr_default,
4389
+ frCA: () => fr_CA_default,
4390
+ he: () => he_default,
4391
+ hr: () => hr_default,
4392
+ hu: () => hu_default,
4393
+ hy: () => hy_default,
4394
+ id: () => id_default,
4395
+ is: () => is_default,
4396
+ it: () => it_default,
4397
+ ja: () => ja_default,
4398
+ ka: () => ka_default,
4399
+ kh: () => kh_default,
4400
+ km: () => km_default,
4401
+ ko: () => ko_default,
4402
+ lt: () => lt_default,
4403
+ mk: () => mk_default,
4404
+ ms: () => ms_default,
4405
+ nl: () => nl_default,
4406
+ no: () => no_default,
4407
+ ota: () => ota_default,
4408
+ pl: () => pl_default,
4409
+ ps: () => ps_default,
4410
+ pt: () => pt_default,
4411
+ ro: () => ro_default,
4412
+ ru: () => ru_default,
4413
+ sl: () => sl_default,
4414
+ sv: () => sv_default,
4415
+ ta: () => ta_default,
4416
+ th: () => th_default,
4417
+ tr: () => tr_default,
4418
+ ua: () => ua_default,
4419
+ uk: () => uk_default,
4420
+ ur: () => ur_default,
4421
+ uz: () => uz_default,
4422
+ vi: () => vi_default,
4423
+ yo: () => yo_default,
4424
+ zhCN: () => zh_CN_default,
4425
+ zhTW: () => zh_TW_default
4426
4426
  });
4427
4427
 
4428
4428
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ar.js
@@ -12193,219 +12193,219 @@ var exports_json_schema = {};
12193
12193
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
12194
12194
  var exports_schemas2 = {};
12195
12195
  __export(exports_schemas2, {
12196
- xor: () => xor,
12197
- xid: () => xid2,
12198
- void: () => _void2,
12199
- uuidv7: () => uuidv7,
12200
- uuidv6: () => uuidv6,
12201
- uuidv4: () => uuidv4,
12202
- uuid: () => uuid2,
12203
- url: () => url,
12204
- unknown: () => unknown,
12205
- union: () => union,
12206
- undefined: () => _undefined3,
12207
- ulid: () => ulid2,
12208
- uint64: () => uint64,
12209
- uint32: () => uint32,
12210
- tuple: () => tuple,
12211
- transform: () => transform,
12212
- templateLiteral: () => templateLiteral,
12213
- symbol: () => symbol,
12214
- superRefine: () => superRefine,
12215
- success: () => success,
12216
- stringbool: () => stringbool,
12217
- stringFormat: () => stringFormat,
12218
- string: () => string2,
12219
- strictObject: () => strictObject,
12220
- set: () => set,
12221
- refine: () => refine,
12222
- record: () => record,
12223
- readonly: () => readonly,
12224
- promise: () => promise,
12225
- preprocess: () => preprocess,
12226
- prefault: () => prefault,
12227
- pipe: () => pipe,
12228
- partialRecord: () => partialRecord,
12229
- optional: () => optional,
12230
- object: () => object,
12231
- number: () => number2,
12232
- nullish: () => nullish2,
12233
- nullable: () => nullable,
12234
- null: () => _null3,
12235
- nonoptional: () => nonoptional,
12236
- never: () => never,
12237
- nativeEnum: () => nativeEnum,
12238
- nanoid: () => nanoid2,
12239
- nan: () => nan,
12240
- meta: () => meta2,
12241
- map: () => map,
12242
- mac: () => mac2,
12243
- looseRecord: () => looseRecord,
12244
- looseObject: () => looseObject,
12245
- literal: () => literal,
12246
- lazy: () => lazy,
12247
- ksuid: () => ksuid2,
12248
- keyof: () => keyof,
12249
- jwt: () => jwt,
12250
- json: () => json,
12251
- ipv6: () => ipv62,
12252
- ipv4: () => ipv42,
12253
- invertCodec: () => invertCodec,
12254
- intersection: () => intersection,
12255
- int64: () => int64,
12256
- int32: () => int32,
12257
- int: () => int,
12258
- instanceof: () => _instanceof,
12259
- httpUrl: () => httpUrl,
12260
- hostname: () => hostname2,
12261
- hex: () => hex2,
12262
- hash: () => hash,
12263
- guid: () => guid2,
12264
- function: () => _function,
12265
- float64: () => float64,
12266
- float32: () => float32,
12267
- file: () => file,
12268
- exactOptional: () => exactOptional,
12269
- enum: () => _enum2,
12270
- emoji: () => emoji2,
12271
- email: () => email2,
12272
- e164: () => e1642,
12273
- discriminatedUnion: () => discriminatedUnion,
12274
- describe: () => describe2,
12275
- date: () => date3,
12276
- custom: () => custom,
12277
- cuid2: () => cuid22,
12278
- cuid: () => cuid3,
12279
- codec: () => codec,
12280
- cidrv6: () => cidrv62,
12281
- cidrv4: () => cidrv42,
12282
- check: () => check,
12283
- catch: () => _catch2,
12284
- boolean: () => boolean2,
12285
- bigint: () => bigint2,
12286
- base64url: () => base64url2,
12287
- base64: () => base642,
12288
- array: () => array,
12289
- any: () => any,
12290
- _function: () => _function,
12291
- _default: () => _default2,
12292
- _ZodString: () => _ZodString,
12293
- ZodXor: () => ZodXor,
12294
- ZodXID: () => ZodXID,
12295
- ZodVoid: () => ZodVoid,
12296
- ZodUnknown: () => ZodUnknown,
12297
- ZodUnion: () => ZodUnion,
12298
- ZodUndefined: () => ZodUndefined,
12299
- ZodUUID: () => ZodUUID,
12300
- ZodURL: () => ZodURL,
12301
- ZodULID: () => ZodULID,
12302
- ZodType: () => ZodType,
12303
- ZodTuple: () => ZodTuple,
12304
- ZodTransform: () => ZodTransform,
12305
- ZodTemplateLiteral: () => ZodTemplateLiteral,
12306
- ZodSymbol: () => ZodSymbol,
12307
- ZodSuccess: () => ZodSuccess,
12308
- ZodStringFormat: () => ZodStringFormat,
12309
- ZodString: () => ZodString,
12310
- ZodSet: () => ZodSet,
12311
- ZodRecord: () => ZodRecord,
12312
- ZodReadonly: () => ZodReadonly,
12313
- ZodPromise: () => ZodPromise,
12314
- ZodPreprocess: () => ZodPreprocess,
12315
- ZodPrefault: () => ZodPrefault,
12316
- ZodPipe: () => ZodPipe,
12317
- ZodOptional: () => ZodOptional,
12318
- ZodObject: () => ZodObject,
12319
- ZodNumberFormat: () => ZodNumberFormat,
12320
- ZodNumber: () => ZodNumber,
12321
- ZodNullable: () => ZodNullable,
12322
- ZodNull: () => ZodNull,
12323
- ZodNonOptional: () => ZodNonOptional,
12324
- ZodNever: () => ZodNever,
12325
- ZodNanoID: () => ZodNanoID,
12326
- ZodNaN: () => ZodNaN,
12327
- ZodMap: () => ZodMap,
12328
- ZodMAC: () => ZodMAC,
12329
- ZodLiteral: () => ZodLiteral,
12330
- ZodLazy: () => ZodLazy,
12331
- ZodKSUID: () => ZodKSUID,
12332
- ZodJWT: () => ZodJWT,
12333
- ZodIntersection: () => ZodIntersection,
12334
- ZodIPv6: () => ZodIPv6,
12335
- ZodIPv4: () => ZodIPv4,
12336
- ZodGUID: () => ZodGUID,
12337
- ZodFunction: () => ZodFunction,
12338
- ZodFile: () => ZodFile,
12339
- ZodExactOptional: () => ZodExactOptional,
12340
- ZodEnum: () => ZodEnum,
12341
- ZodEmoji: () => ZodEmoji,
12342
- ZodEmail: () => ZodEmail,
12343
- ZodE164: () => ZodE164,
12344
- ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
12345
- ZodDefault: () => ZodDefault,
12346
- ZodDate: () => ZodDate,
12347
- ZodCustomStringFormat: () => ZodCustomStringFormat,
12348
- ZodCustom: () => ZodCustom,
12349
- ZodCodec: () => ZodCodec,
12350
- ZodCatch: () => ZodCatch,
12351
- ZodCUID2: () => ZodCUID2,
12352
- ZodCUID: () => ZodCUID,
12353
- ZodCIDRv6: () => ZodCIDRv6,
12354
- ZodCIDRv4: () => ZodCIDRv4,
12355
- ZodBoolean: () => ZodBoolean,
12356
- ZodBigIntFormat: () => ZodBigIntFormat,
12357
- ZodBigInt: () => ZodBigInt,
12358
- ZodBase64URL: () => ZodBase64URL,
12359
- ZodBase64: () => ZodBase64,
12196
+ ZodAny: () => ZodAny,
12360
12197
  ZodArray: () => ZodArray,
12361
- ZodAny: () => ZodAny
12198
+ ZodBase64: () => ZodBase64,
12199
+ ZodBase64URL: () => ZodBase64URL,
12200
+ ZodBigInt: () => ZodBigInt,
12201
+ ZodBigIntFormat: () => ZodBigIntFormat,
12202
+ ZodBoolean: () => ZodBoolean,
12203
+ ZodCIDRv4: () => ZodCIDRv4,
12204
+ ZodCIDRv6: () => ZodCIDRv6,
12205
+ ZodCUID: () => ZodCUID,
12206
+ ZodCUID2: () => ZodCUID2,
12207
+ ZodCatch: () => ZodCatch,
12208
+ ZodCodec: () => ZodCodec,
12209
+ ZodCustom: () => ZodCustom,
12210
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
12211
+ ZodDate: () => ZodDate,
12212
+ ZodDefault: () => ZodDefault,
12213
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
12214
+ ZodE164: () => ZodE164,
12215
+ ZodEmail: () => ZodEmail,
12216
+ ZodEmoji: () => ZodEmoji,
12217
+ ZodEnum: () => ZodEnum,
12218
+ ZodExactOptional: () => ZodExactOptional,
12219
+ ZodFile: () => ZodFile,
12220
+ ZodFunction: () => ZodFunction,
12221
+ ZodGUID: () => ZodGUID,
12222
+ ZodIPv4: () => ZodIPv4,
12223
+ ZodIPv6: () => ZodIPv6,
12224
+ ZodIntersection: () => ZodIntersection,
12225
+ ZodJWT: () => ZodJWT,
12226
+ ZodKSUID: () => ZodKSUID,
12227
+ ZodLazy: () => ZodLazy,
12228
+ ZodLiteral: () => ZodLiteral,
12229
+ ZodMAC: () => ZodMAC,
12230
+ ZodMap: () => ZodMap,
12231
+ ZodNaN: () => ZodNaN,
12232
+ ZodNanoID: () => ZodNanoID,
12233
+ ZodNever: () => ZodNever,
12234
+ ZodNonOptional: () => ZodNonOptional,
12235
+ ZodNull: () => ZodNull,
12236
+ ZodNullable: () => ZodNullable,
12237
+ ZodNumber: () => ZodNumber,
12238
+ ZodNumberFormat: () => ZodNumberFormat,
12239
+ ZodObject: () => ZodObject,
12240
+ ZodOptional: () => ZodOptional,
12241
+ ZodPipe: () => ZodPipe,
12242
+ ZodPrefault: () => ZodPrefault,
12243
+ ZodPreprocess: () => ZodPreprocess,
12244
+ ZodPromise: () => ZodPromise,
12245
+ ZodReadonly: () => ZodReadonly,
12246
+ ZodRecord: () => ZodRecord,
12247
+ ZodSet: () => ZodSet,
12248
+ ZodString: () => ZodString,
12249
+ ZodStringFormat: () => ZodStringFormat,
12250
+ ZodSuccess: () => ZodSuccess,
12251
+ ZodSymbol: () => ZodSymbol,
12252
+ ZodTemplateLiteral: () => ZodTemplateLiteral,
12253
+ ZodTransform: () => ZodTransform,
12254
+ ZodTuple: () => ZodTuple,
12255
+ ZodType: () => ZodType,
12256
+ ZodULID: () => ZodULID,
12257
+ ZodURL: () => ZodURL,
12258
+ ZodUUID: () => ZodUUID,
12259
+ ZodUndefined: () => ZodUndefined,
12260
+ ZodUnion: () => ZodUnion,
12261
+ ZodUnknown: () => ZodUnknown,
12262
+ ZodVoid: () => ZodVoid,
12263
+ ZodXID: () => ZodXID,
12264
+ ZodXor: () => ZodXor,
12265
+ _ZodString: () => _ZodString,
12266
+ _default: () => _default2,
12267
+ _function: () => _function,
12268
+ any: () => any,
12269
+ array: () => array,
12270
+ base64: () => base642,
12271
+ base64url: () => base64url2,
12272
+ bigint: () => bigint2,
12273
+ boolean: () => boolean2,
12274
+ catch: () => _catch2,
12275
+ check: () => check,
12276
+ cidrv4: () => cidrv42,
12277
+ cidrv6: () => cidrv62,
12278
+ codec: () => codec,
12279
+ cuid: () => cuid3,
12280
+ cuid2: () => cuid22,
12281
+ custom: () => custom,
12282
+ date: () => date3,
12283
+ describe: () => describe2,
12284
+ discriminatedUnion: () => discriminatedUnion,
12285
+ e164: () => e1642,
12286
+ email: () => email2,
12287
+ emoji: () => emoji2,
12288
+ enum: () => _enum2,
12289
+ exactOptional: () => exactOptional,
12290
+ file: () => file,
12291
+ float32: () => float32,
12292
+ float64: () => float64,
12293
+ function: () => _function,
12294
+ guid: () => guid2,
12295
+ hash: () => hash,
12296
+ hex: () => hex2,
12297
+ hostname: () => hostname2,
12298
+ httpUrl: () => httpUrl,
12299
+ instanceof: () => _instanceof,
12300
+ int: () => int,
12301
+ int32: () => int32,
12302
+ int64: () => int64,
12303
+ intersection: () => intersection,
12304
+ invertCodec: () => invertCodec,
12305
+ ipv4: () => ipv42,
12306
+ ipv6: () => ipv62,
12307
+ json: () => json,
12308
+ jwt: () => jwt,
12309
+ keyof: () => keyof,
12310
+ ksuid: () => ksuid2,
12311
+ lazy: () => lazy,
12312
+ literal: () => literal,
12313
+ looseObject: () => looseObject,
12314
+ looseRecord: () => looseRecord,
12315
+ mac: () => mac2,
12316
+ map: () => map,
12317
+ meta: () => meta2,
12318
+ nan: () => nan,
12319
+ nanoid: () => nanoid2,
12320
+ nativeEnum: () => nativeEnum,
12321
+ never: () => never,
12322
+ nonoptional: () => nonoptional,
12323
+ null: () => _null3,
12324
+ nullable: () => nullable,
12325
+ nullish: () => nullish2,
12326
+ number: () => number2,
12327
+ object: () => object,
12328
+ optional: () => optional,
12329
+ partialRecord: () => partialRecord,
12330
+ pipe: () => pipe,
12331
+ prefault: () => prefault,
12332
+ preprocess: () => preprocess,
12333
+ promise: () => promise,
12334
+ readonly: () => readonly,
12335
+ record: () => record,
12336
+ refine: () => refine,
12337
+ set: () => set,
12338
+ strictObject: () => strictObject,
12339
+ string: () => string2,
12340
+ stringFormat: () => stringFormat,
12341
+ stringbool: () => stringbool,
12342
+ success: () => success,
12343
+ superRefine: () => superRefine,
12344
+ symbol: () => symbol,
12345
+ templateLiteral: () => templateLiteral,
12346
+ transform: () => transform,
12347
+ tuple: () => tuple,
12348
+ uint32: () => uint32,
12349
+ uint64: () => uint64,
12350
+ ulid: () => ulid2,
12351
+ undefined: () => _undefined3,
12352
+ union: () => union,
12353
+ unknown: () => unknown,
12354
+ url: () => url,
12355
+ uuid: () => uuid2,
12356
+ uuidv4: () => uuidv4,
12357
+ uuidv6: () => uuidv6,
12358
+ uuidv7: () => uuidv7,
12359
+ void: () => _void2,
12360
+ xid: () => xid2,
12361
+ xor: () => xor
12362
12362
  });
12363
12363
 
12364
12364
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/checks.js
12365
12365
  var exports_checks2 = {};
12366
12366
  __export(exports_checks2, {
12367
- uppercase: () => _uppercase,
12368
- trim: () => _trim,
12369
- toUpperCase: () => _toUpperCase,
12370
- toLowerCase: () => _toLowerCase,
12371
- startsWith: () => _startsWith,
12372
- slugify: () => _slugify,
12373
- size: () => _size,
12374
- regex: () => _regex,
12375
- property: () => _property,
12376
- positive: () => _positive,
12377
- overwrite: () => _overwrite,
12378
- normalize: () => _normalize,
12379
- nonpositive: () => _nonpositive,
12380
- nonnegative: () => _nonnegative,
12381
- negative: () => _negative,
12382
- multipleOf: () => _multipleOf,
12383
- minSize: () => _minSize,
12384
- minLength: () => _minLength,
12385
- mime: () => _mime,
12386
- maxSize: () => _maxSize,
12387
- maxLength: () => _maxLength,
12388
- lte: () => _lte,
12389
- lt: () => _lt,
12390
- lowercase: () => _lowercase,
12391
- length: () => _length,
12392
- includes: () => _includes,
12393
- gte: () => _gte,
12367
+ endsWith: () => _endsWith,
12394
12368
  gt: () => _gt,
12395
- endsWith: () => _endsWith
12369
+ gte: () => _gte,
12370
+ includes: () => _includes,
12371
+ length: () => _length,
12372
+ lowercase: () => _lowercase,
12373
+ lt: () => _lt,
12374
+ lte: () => _lte,
12375
+ maxLength: () => _maxLength,
12376
+ maxSize: () => _maxSize,
12377
+ mime: () => _mime,
12378
+ minLength: () => _minLength,
12379
+ minSize: () => _minSize,
12380
+ multipleOf: () => _multipleOf,
12381
+ negative: () => _negative,
12382
+ nonnegative: () => _nonnegative,
12383
+ nonpositive: () => _nonpositive,
12384
+ normalize: () => _normalize,
12385
+ overwrite: () => _overwrite,
12386
+ positive: () => _positive,
12387
+ property: () => _property,
12388
+ regex: () => _regex,
12389
+ size: () => _size,
12390
+ slugify: () => _slugify,
12391
+ startsWith: () => _startsWith,
12392
+ toLowerCase: () => _toLowerCase,
12393
+ toUpperCase: () => _toUpperCase,
12394
+ trim: () => _trim,
12395
+ uppercase: () => _uppercase
12396
12396
  });
12397
12397
 
12398
12398
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/iso.js
12399
12399
  var exports_iso = {};
12400
12400
  __export(exports_iso, {
12401
- time: () => time2,
12402
- duration: () => duration2,
12403
- datetime: () => datetime2,
12404
- date: () => date2,
12405
- ZodISOTime: () => ZodISOTime,
12406
- ZodISODuration: () => ZodISODuration,
12401
+ ZodISODate: () => ZodISODate,
12407
12402
  ZodISODateTime: () => ZodISODateTime,
12408
- ZodISODate: () => ZodISODate
12403
+ ZodISODuration: () => ZodISODuration,
12404
+ ZodISOTime: () => ZodISOTime,
12405
+ date: () => date2,
12406
+ datetime: () => datetime2,
12407
+ duration: () => duration2,
12408
+ time: () => time2
12409
12409
  });
12410
12410
  var ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
12411
12411
  $ZodISODateTime.init(inst, def);
@@ -14266,11 +14266,11 @@ function fromJSONSchema(schema, params) {
14266
14266
  // ../../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
14267
14267
  var exports_coerce = {};
14268
14268
  __export(exports_coerce, {
14269
- string: () => string3,
14270
- number: () => number3,
14271
- date: () => date4,
14269
+ bigint: () => bigint3,
14272
14270
  boolean: () => boolean3,
14273
- bigint: () => bigint3
14271
+ date: () => date4,
14272
+ number: () => number3,
14273
+ string: () => string3
14274
14274
  });
14275
14275
  function string3(params) {
14276
14276
  return _coercedString(ZodString, params);
@@ -14328,10 +14328,19 @@ function any2(conditions, outcome) {
14328
14328
  return { _tag: "rule", mode: "any", conditions, outcome };
14329
14329
  }
14330
14330
  function when(signal2, operator, value, outcome) {
14331
+ const condition = {
14332
+ _tag: "signal",
14333
+ signal: signal2,
14334
+ operator,
14335
+ value
14336
+ };
14337
+ if (outcome === undefined) {
14338
+ return condition;
14339
+ }
14331
14340
  return {
14332
14341
  _tag: "rule",
14333
14342
  mode: "all",
14334
- conditions: [{ _tag: "signal", signal: signal2, operator, value }],
14343
+ conditions: [condition],
14335
14344
  outcome
14336
14345
  };
14337
14346
  }
@@ -14387,117 +14396,44 @@ function serializeAdvancementPolicy(policy) {
14387
14396
  return serializeRule(rule);
14388
14397
  });
14389
14398
  return {
14390
- rulesJson: { rules: serializedRules },
14391
- defaultEventType: defaultResolved.type,
14392
- defaultEventParamsJson: defaultResolved.params,
14393
- allowedEventTypes: [...outcomeSet]
14394
- };
14395
- }
14396
- function visitSignalConditions(conditions, visit) {
14397
- for (const c of conditions) {
14398
- if (c._tag === "signal") {
14399
- visit(c);
14400
- } else {
14401
- visitSignalConditions(c.conditions, visit);
14402
- }
14403
- }
14404
- }
14405
- function isSameComputedDefinition(a, b) {
14406
- return a.type === b.type && a.inputSignalKeys.length === b.inputSignalKeys.length && a.inputSignalKeys.every((k, i) => k === b.inputSignalKeys[i]) && JSON.stringify(a.configJson) === JSON.stringify(b.configJson) && JSON.stringify(a.availableWhenResultStatusIn) === JSON.stringify(b.availableWhenResultStatusIn);
14407
- }
14408
- function extractInlineComputedSignals(policy) {
14409
- if (!policy?.rules)
14410
- return [];
14411
- const byKey = new Map;
14412
- for (const rule of policy.rules) {
14413
- visitSignalConditions(rule.conditions, (cond) => {
14414
- if (typeof cond.signal === "string")
14415
- return;
14416
- const inline = cond.signal;
14417
- const def = {
14418
- key: inline.key,
14419
- type: inline.type,
14420
- inputSignalKeys: [...inline.inputSignalKeys],
14421
- configJson: inline.configJson,
14422
- availableWhenResultStatusIn: inline.availableWhenResultStatusIn ? [...inline.availableWhenResultStatusIn] : null
14423
- };
14424
- const existing = byKey.get(def.key);
14425
- if (existing) {
14426
- if (!isSameComputedDefinition(existing, def)) {
14427
- throw new Error(`Conflicting inline computed signal definitions for key "${def.key}"`);
14428
- }
14429
- return;
14430
- }
14431
- byKey.set(def.key, def);
14432
- });
14433
- }
14434
- return [...byKey.values()];
14435
- }
14436
-
14437
- // src/definitions/advancement-policies/cohort-advancement-policy.ts
14438
- var cohortAdvancementEventTypeValues = ["continue", "block"];
14439
- function serializeCohortCondition(condition) {
14440
- if (condition._tag === "signal") {
14441
- return {
14442
- fact: typeof condition.signal === "string" ? condition.signal : condition.signal.key,
14443
- operator: condition.operator,
14444
- value: condition.value
14445
- };
14446
- }
14447
- if (condition._tag === "all") {
14448
- return { all: condition.conditions.map(serializeCohortCondition) };
14449
- }
14450
- return { any: condition.conditions.map(serializeCohortCondition) };
14451
- }
14452
- function serializeCohortRule(rule) {
14453
- return {
14454
- conditions: { [rule.mode]: rule.conditions.map(serializeCohortCondition) },
14455
- event: {
14456
- type: rule.outcome,
14457
- ...rule.outcomeJson ? { params: rule.outcomeJson } : {}
14458
- }
14459
- };
14460
- }
14461
- function serializeCohortAdvancementPolicy(policy) {
14462
- if (!policy) {
14463
- return { rules: [], defaultEventType: "continue", defaultEventParamsJson: null };
14464
- }
14465
- return {
14466
- rules: (policy.rules ?? []).map(serializeCohortRule),
14467
- defaultEventType: policy.default,
14468
- defaultEventParamsJson: policy.defaultParamsJson ?? null
14399
+ rulesJson: { rules: serializedRules },
14400
+ defaultEventType: defaultResolved.type,
14401
+ defaultEventParamsJson: defaultResolved.params,
14402
+ allowedEventTypes: [...outcomeSet]
14469
14403
  };
14470
14404
  }
14471
- function visitCohortSignalConditions(conditions, visit) {
14405
+ function visitSignalConditions(conditions, visit) {
14472
14406
  for (const c of conditions) {
14473
14407
  if (c._tag === "signal") {
14474
14408
  visit(c);
14475
14409
  } else {
14476
- visitCohortSignalConditions(c.conditions, visit);
14410
+ visitSignalConditions(c.conditions, visit);
14477
14411
  }
14478
14412
  }
14479
14413
  }
14480
- function isSameStepSignalsListDefinition(a, b) {
14481
- return JSON.stringify(a.ops) === JSON.stringify(b.ops) && JSON.stringify(a.reducer) === JSON.stringify(b.reducer);
14414
+ function isSameComputedDefinition(a, b) {
14415
+ return a.type === b.type && a.inputSignalKeys.length === b.inputSignalKeys.length && a.inputSignalKeys.every((k, i) => k === b.inputSignalKeys[i]) && JSON.stringify(a.configJson) === JSON.stringify(b.configJson) && JSON.stringify(a.availableWhenResultStatusIn) === JSON.stringify(b.availableWhenResultStatusIn);
14482
14416
  }
14483
- function extractInlineStepSignalsListDefinitions(policy) {
14417
+ function extractInlineComputedSignals(policy) {
14484
14418
  if (!policy?.rules)
14485
14419
  return [];
14486
14420
  const byKey = new Map;
14487
14421
  for (const rule of policy.rules) {
14488
- visitCohortSignalConditions(rule.conditions, (cond) => {
14422
+ visitSignalConditions(rule.conditions, (cond) => {
14489
14423
  if (typeof cond.signal === "string")
14490
14424
  return;
14491
14425
  const inline = cond.signal;
14492
14426
  const def = {
14493
14427
  key: inline.key,
14494
- ops: inline.ops,
14495
- reducer: inline.reducer
14428
+ type: inline.type,
14429
+ inputSignalKeys: [...inline.inputSignalKeys],
14430
+ configJson: inline.configJson,
14431
+ availableWhenResultStatusIn: inline.availableWhenResultStatusIn ? [...inline.availableWhenResultStatusIn] : null
14496
14432
  };
14497
14433
  const existing = byKey.get(def.key);
14498
14434
  if (existing) {
14499
- if (!isSameStepSignalsListDefinition(existing, def)) {
14500
- throw new Error(`Conflicting inline stepSignalsList definitions for key "${def.key}"`);
14435
+ if (!isSameComputedDefinition(existing, def)) {
14436
+ throw new Error(`Conflicting inline computed signal definitions for key "${def.key}"`);
14501
14437
  }
14502
14438
  return;
14503
14439
  }
@@ -14507,436 +14443,82 @@ function extractInlineStepSignalsListDefinitions(policy) {
14507
14443
  return [...byKey.values()];
14508
14444
  }
14509
14445
 
14510
- // src/definitions/pipelines/chain-graph.ts
14511
- function tryOrderChainNodeDefinitions(nodeDefinitions, dependencyEdges) {
14512
- const nodesByKey = new Map;
14513
- for (const nodeDefinition of nodeDefinitions) {
14514
- nodesByKey.set(nodeDefinition.nodeKey, nodeDefinition);
14515
- }
14516
- const outgoing = new Map;
14517
- const incomingCount = new Map;
14518
- for (const nodeDefinition of nodeDefinitions) {
14519
- incomingCount.set(nodeDefinition.nodeKey, 0);
14520
- }
14521
- for (const edge of dependencyEdges) {
14522
- if (!nodesByKey.has(edge.fromNodeKey) || !nodesByKey.has(edge.toNodeKey)) {
14523
- return null;
14524
- }
14525
- if (outgoing.has(edge.fromNodeKey))
14526
- return null;
14527
- outgoing.set(edge.fromNodeKey, edge.toNodeKey);
14528
- incomingCount.set(edge.toNodeKey, (incomingCount.get(edge.toNodeKey) ?? 0) + 1);
14529
- }
14530
- for (const count of incomingCount.values()) {
14531
- if (count > 1)
14532
- return null;
14533
- }
14534
- if (nodeDefinitions.length === 0)
14535
- return [];
14536
- const roots = nodeDefinitions.filter((nodeDefinition) => (incomingCount.get(nodeDefinition.nodeKey) ?? 0) === 0);
14537
- if (roots.length !== 1)
14538
- return null;
14539
- const rootNode = roots[0];
14540
- if (!rootNode)
14541
- return null;
14542
- const ordered = [];
14543
- const visited = new Set;
14544
- let currentKey = rootNode.nodeKey;
14545
- while (currentKey !== undefined) {
14546
- if (visited.has(currentKey))
14547
- return null;
14548
- visited.add(currentKey);
14549
- const currentNode = nodesByKey.get(currentKey);
14550
- if (!currentNode)
14551
- return null;
14552
- ordered.push(currentNode);
14553
- currentKey = outgoing.get(currentKey);
14554
- }
14555
- if (ordered.length !== nodeDefinitions.length)
14556
- return null;
14557
- return ordered;
14558
- }
14559
- function buildChainDependencyEdges(orderedNodes) {
14560
- const dependencyEdges = [];
14561
- for (let index = 0;index < orderedNodes.length - 1; index += 1) {
14562
- const from = orderedNodes[index];
14563
- const to = orderedNodes[index + 1];
14564
- if (!from || !to)
14565
- continue;
14566
- dependencyEdges.push({ fromNodeKey: from.nodeKey, toNodeKey: to.nodeKey });
14567
- }
14568
- return dependencyEdges;
14569
- }
14570
-
14571
- // src/definitions/pipelines/define-pipeline.ts
14572
- function serializeBinding(binding) {
14573
- if (binding.source === "pipeline_input") {
14574
- return { source: "pipeline_input", path: binding.path };
14575
- }
14576
- if (binding.source === "work_item") {
14577
- return { source: "work_item", field: binding.field };
14578
- }
14579
- if (binding.source === "step_signal") {
14446
+ // src/definitions/advancement-policies/cohort-advancement-policy.ts
14447
+ var cohortAdvancementEventTypeValues = ["continue", "block"];
14448
+ function serializeCohortCondition(condition) {
14449
+ if (condition._tag === "signal") {
14580
14450
  return {
14581
- source: "step_signal",
14582
- stepKey: binding.step.key,
14583
- signalKey: binding.signalKey
14451
+ fact: typeof condition.signal === "string" ? condition.signal : condition.signal.key,
14452
+ operator: condition.operator,
14453
+ value: condition.value
14584
14454
  };
14585
14455
  }
14586
- if (binding.source === "literal") {
14587
- return { source: "literal", value: binding.value };
14588
- }
14589
- if (binding.source === "signals_list") {
14590
- return { source: "signals_list", stepKey: binding.fanOutStep.key };
14591
- }
14592
- if (binding.source === "fan_out_item") {
14593
- return { source: "fan_out_item" };
14594
- }
14595
- return { source: "step_output", stepKey: binding.step.key };
14596
- }
14597
- var isFanOutConfig = (node) => ("nodeType" in node) && node.nodeType === "fanOut";
14598
- var isCohortGateConfig = (node) => ("nodeType" in node) && node.nodeType === "cohortGate";
14599
- function serializeInputBindings(input, pipelineInputBindings) {
14600
- const autoBindings = {
14601
- workItemTitle: { source: "work_item", field: "title" },
14602
- workItemDescription: { source: "work_item", field: "description" }
14603
- };
14604
- const pipelineBindings = {};
14605
- for (const [key, binding] of Object.entries(pipelineInputBindings ?? {})) {
14606
- pipelineBindings[key] = serializeBinding(binding);
14607
- }
14608
- const explicitBindings = Object.fromEntries(Object.entries(input ?? {}).filter((entry) => entry[1] !== undefined).map(([key, binding]) => [key, serializeBinding(binding)]));
14609
- return { ...autoBindings, ...pipelineBindings, ...explicitBindings };
14610
- }
14611
- function buildPipelineSpec(config2) {
14612
- const nodes = config2.nodes;
14613
- const stepDefMap = new Map;
14614
- const registerStepDef = (step) => {
14615
- const mapKey = `${step.key}@v${String(step.version)}`;
14616
- if (!stepDefMap.has(mapKey)) {
14617
- stepDefMap.set(mapKey, step);
14618
- }
14619
- };
14620
- for (const node of nodes) {
14621
- if (isFanOutConfig(node)) {
14622
- registerStepDef(node.fanOutStep);
14623
- } else if (!isCohortGateConfig(node)) {
14624
- registerStepDef(node.step);
14625
- }
14626
- }
14627
- let inputSchemaJson = null;
14628
- if (config2.input) {
14629
- try {
14630
- inputSchemaJson = exports_external.toJSONSchema(config2.input);
14631
- } catch {
14632
- inputSchemaJson = null;
14633
- }
14456
+ if (condition._tag === "all") {
14457
+ return { all: condition.conditions.map(serializeCohortCondition) };
14634
14458
  }
14635
- const nodeDefinitions = nodes.map((node) => {
14636
- if (isCohortGateConfig(node)) {
14637
- const serializedPolicy = serializeCohortAdvancementPolicy(node.advanceAll);
14638
- const inlineStepSignalsListDefinitions = extractInlineStepSignalsListDefinitions(node.advanceAll);
14639
- return {
14640
- nodeKey: node.nodeKey,
14641
- kind: "cohortGate",
14642
- advanceAllPolicyDefinition: serializedPolicy,
14643
- stepSignalsListDefinitions: [
14644
- ...inlineStepSignalsListDefinitions,
14645
- ...node.stepSignalsListDefinitions ?? []
14646
- ]
14647
- };
14648
- }
14649
- if (isFanOutConfig(node)) {
14650
- return {
14651
- nodeKey: node.fanOutStep.key,
14652
- kind: "fanOut",
14653
- stepKey: node.fanOutStep.key,
14654
- stepName: node.fanOutStep.name,
14655
- stepDescription: node.fanOutStep.description,
14656
- inputBindingsJson: serializeInputBindings(node.input, config2.pipelineInputBindings),
14657
- timeoutSeconds: node.timeout ?? null,
14658
- overSignalKey: node.overSignalKey,
14659
- advanceEachPolicyDefinition: serializeCohortAdvancementPolicy(node.advanceEach)
14660
- };
14661
- }
14662
- return {
14663
- nodeKey: node.step.key,
14664
- kind: "step",
14665
- stepKey: node.step.key,
14666
- stepName: node.step.name,
14667
- stepDescription: node.step.description,
14668
- inputBindingsJson: serializeInputBindings(node.input, config2.pipelineInputBindings),
14669
- timeoutSeconds: node.timeout ?? null,
14670
- advancementPolicyDefinition: serializeAdvancementPolicy(node.advancement),
14671
- computedSignalDefinitions: extractInlineComputedSignals(node.advancement)
14672
- };
14673
- });
14674
- const dependencyEdges = buildChainDependencyEdges(nodeDefinitions);
14675
- return {
14676
- key: config2.key,
14677
- name: config2.name,
14678
- description: config2.description ?? null,
14679
- version: config2.version ?? 1,
14680
- status: config2.status ?? "active",
14681
- inputSchemaJson,
14682
- _stepDefinitions: [...stepDefMap.values()],
14683
- nodeDefinitions,
14684
- dependencyEdges
14685
- };
14686
- }
14687
- // src/definitions/advancement-policies/fluent-rules.ts
14688
- var LEAF_BRAND = Symbol.for("boboddy.fluentRule.leaf");
14689
- var GROUP_BRAND = Symbol.for("boboddy.fluentRule.group");
14690
- var SIGNAL_KEY = Symbol.for("boboddy.fluentRule.signalKey");
14691
- function createSignalRef(signal2) {
14692
- const leaf = (operator, value) => {
14693
- const condition = {
14694
- _tag: "signal",
14695
- signal: signal2,
14696
- operator,
14697
- value
14698
- };
14699
- return {
14700
- [LEAF_BRAND]: condition,
14701
- then(outcome) {
14702
- return {
14703
- _tag: "rule",
14704
- mode: "all",
14705
- conditions: [condition],
14706
- outcome
14707
- };
14708
- }
14709
- };
14710
- };
14711
- return {
14712
- eq: (v) => leaf("equal", v),
14713
- ne: (v) => leaf("notEqual", v),
14714
- gt: (v) => leaf("greaterThan", v),
14715
- gte: (v) => leaf("greaterThanInclusive", v),
14716
- lt: (v) => leaf("lessThan", v),
14717
- lte: (v) => leaf("lessThanInclusive", v),
14718
- in: (vs) => leaf("in", vs),
14719
- notIn: (vs) => leaf("notIn", vs),
14720
- contains: (v) => leaf("contains", v),
14721
- doesNotContain: (v) => leaf("doesNotContain", v)
14722
- };
14723
- }
14724
- function extractCondition(ref) {
14725
- if (LEAF_BRAND in ref)
14726
- return ref[LEAF_BRAND];
14727
- const group = ref[GROUP_BRAND];
14728
- return group.mode === "all" ? { _tag: "all", conditions: group.conditions } : { _tag: "any", conditions: group.conditions };
14729
- }
14730
- function createGroup(mode, refs) {
14731
- const conditions = refs.map(extractCondition);
14732
- return {
14733
- [GROUP_BRAND]: { mode, conditions },
14734
- then(outcome) {
14735
- return { _tag: "rule", mode, conditions, outcome };
14736
- }
14737
- };
14738
- }
14739
- function resolveComputedArg(arg) {
14740
- return arg[SIGNAL_KEY];
14741
- }
14742
- function makeKeyedSignalRef(key) {
14743
- const ref = createSignalRef(key);
14744
- return Object.assign(ref, {
14745
- [SIGNAL_KEY]: key
14746
- });
14459
+ return { any: condition.conditions.map(serializeCohortCondition) };
14747
14460
  }
14748
- function makeAdvanceCtx() {
14749
- const wrapComputed = (token) => createSignalRef(token);
14461
+ function serializeCohortRule(rule) {
14750
14462
  return {
14751
- signal: (key) => makeKeyedSignalRef(key),
14752
- stepSignals: new Proxy({}, {
14753
- get(_, key) {
14754
- if (typeof key === "string")
14755
- return makeKeyedSignalRef(key);
14756
- return;
14757
- }
14758
- }),
14759
- avg: (...args) => wrapComputed(Computed.average(args.map(resolveComputedArg))),
14760
- weightedAvg: (...args) => wrapComputed(Computed.weightedAverage(args.map(resolveComputedArg))),
14761
- sum: (...args) => wrapComputed(Computed.sum(args.map(resolveComputedArg))),
14762
- min: (...args) => wrapComputed(Computed.min(args.map(resolveComputedArg))),
14763
- max: (...args) => wrapComputed(Computed.max(args.map(resolveComputedArg))),
14764
- count: (...args) => wrapComputed(Computed.count(args.map(resolveComputedArg))),
14765
- booleanAny: (...args) => wrapComputed(Computed.booleanAny(args.map(resolveComputedArg))),
14766
- booleanAll: (...args) => wrapComputed(Computed.booleanAll(args.map(resolveComputedArg))),
14767
- all: (...refs) => createGroup("all", refs),
14768
- any: (...refs) => createGroup("any", refs),
14769
- route: (pipelineKey, inputJson) => inputJson !== undefined ? { outcome: "route", pipelineKey, inputJson } : { outcome: "route", pipelineKey }
14770
- };
14771
- }
14772
-
14773
- // src/definitions/pipelines/input-accessor.ts
14774
- var ACCESSOR_BRAND = Symbol.for("boboddy.inputAccessor.brand");
14775
- var ACCESSOR_PATH = Symbol.for("boboddy.inputAccessor.path");
14776
- function createInputAccessor(_schema) {
14777
- return createProxy([]);
14778
- }
14779
- function createProxy(path) {
14780
- const pathStr = path.join(".");
14781
- const target = Object.freeze({});
14782
- return new Proxy(target, {
14783
- get(_t, prop) {
14784
- if (prop === ACCESSOR_BRAND)
14785
- return true;
14786
- if (prop === ACCESSOR_PATH)
14787
- return pathStr;
14788
- if (prop === "toJSON") {
14789
- return () => ({
14790
- source: "pipeline_input",
14791
- path: pathStr
14792
- });
14793
- }
14794
- if (prop === Symbol.toPrimitive) {
14795
- return () => {
14796
- throw new Error(`Pipeline input accessor at path "${pathStr || "<root>"}" cannot be coerced to a primitive. ` + `Pass it to a step input field instead of using it in a string/number expression.`);
14797
- };
14798
- }
14799
- if (typeof prop === "symbol")
14800
- return;
14801
- return createProxy([...path, prop]);
14802
- },
14803
- has(_t, prop) {
14804
- return prop === ACCESSOR_BRAND || prop === ACCESSOR_PATH;
14805
- },
14806
- ownKeys() {
14807
- throw new Error(`Pipeline input accessor at path "${pathStr || "<root>"}" cannot be enumerated. ` + `Drill into specific fields instead of spreading the input.`);
14808
- },
14809
- set() {
14810
- throw new Error(`Pipeline input accessor at path "${pathStr || "<root>"}" is read-only.`);
14463
+ conditions: { [rule.mode]: rule.conditions.map(serializeCohortCondition) },
14464
+ event: {
14465
+ type: rule.outcome,
14466
+ ...rule.outcomeJson ? { params: rule.outcomeJson } : {}
14811
14467
  }
14812
- });
14813
- }
14814
- function isInputAccessor(value) {
14815
- return typeof value === "object" && value !== null && value[ACCESSOR_BRAND] === true;
14816
- }
14817
- function materializeAccessor(accessor) {
14818
- return {
14819
- source: "pipeline_input",
14820
- path: accessor[ACCESSOR_PATH]
14821
14468
  };
14822
14469
  }
14823
-
14824
- // src/definitions/pipelines/work-item-fields.ts
14825
- var WORK_ITEM_TOP_LEVEL_FIELDS = [
14826
- "id",
14827
- "projectId",
14828
- "platform",
14829
- "platformId",
14830
- "platformKey",
14831
- "url",
14832
- "title",
14833
- "description",
14834
- "sourceCreatedAt",
14835
- "sourceUpdatedAt",
14836
- "createdByUserId",
14837
- "parentWorkItemId",
14838
- "createdAt",
14839
- "updatedAt"
14840
- ];
14841
- var WORK_ITEM_FIELDS_PATH_PREFIX = "fields.";
14842
- function resolveWorkItemFieldPath(record2, path) {
14843
- if (typeof record2 !== "object" || record2 === null)
14844
- return;
14845
- const asRecord = record2;
14846
- if (path.startsWith(WORK_ITEM_FIELDS_PATH_PREFIX)) {
14847
- const fieldName = path.slice(WORK_ITEM_FIELDS_PATH_PREFIX.length);
14848
- const fields = asRecord["fields"];
14849
- if (typeof fields !== "object" || fields === null)
14850
- return;
14851
- return fields[fieldName];
14470
+ function serializeCohortAdvancementPolicy(policy) {
14471
+ if (!policy) {
14472
+ return { rules: [], defaultEventType: "continue", defaultEventParamsJson: null };
14852
14473
  }
14853
- return asRecord[path];
14854
- }
14855
-
14856
- // src/definitions/pipelines/builder-helpers.ts
14857
- var WORK_ITEM_ACCESSOR = Object.freeze({
14858
- ...Object.fromEntries(WORK_ITEM_TOP_LEVEL_FIELDS.map((field) => [
14859
- field,
14860
- Object.freeze({ source: "work_item", field })
14861
- ])),
14862
- field: (fieldName) => Object.freeze({
14863
- source: "work_item",
14864
- field: `${WORK_ITEM_FIELDS_PATH_PREFIX}${fieldName}`
14865
- })
14866
- });
14867
- var WORK_ITEM_FIELD_BINDINGS = {
14868
- workItemTitle: { source: "work_item", field: "title" },
14869
- workItemDescription: { source: "work_item", field: "description" }
14870
- };
14871
- function makeStepInputCtx(inputSchema) {
14872
- const baseAccessor = createInputAccessor(inputSchema);
14873
- const input = new Proxy(baseAccessor, {
14874
- get(target, prop) {
14875
- if (typeof prop === "string" && prop in WORK_ITEM_FIELD_BINDINGS) {
14876
- return WORK_ITEM_FIELD_BINDINGS[prop];
14877
- }
14878
- return target[prop];
14879
- }
14880
- });
14881
14474
  return {
14882
- input,
14883
- signal(step, key) {
14884
- return { source: "step_signal", step, signalKey: key };
14885
- },
14886
- output(step) {
14887
- return { source: "step_output", step };
14888
- },
14889
- literal: literal2,
14890
- signalsList(fanOutStep) {
14891
- return { source: "signals_list", fanOutStep };
14892
- }
14475
+ rules: (policy.rules ?? []).map(serializeCohortRule),
14476
+ defaultEventType: policy.default,
14477
+ defaultEventParamsJson: policy.defaultParamsJson ?? null
14893
14478
  };
14894
14479
  }
14895
- function literal2(value) {
14896
- return { source: "literal", value };
14897
- }
14898
- function normalizeInputMapping(mapping) {
14899
- if (!mapping)
14900
- return;
14901
- const out = {};
14902
- for (const [key, value] of Object.entries(mapping)) {
14903
- if (value === undefined)
14904
- continue;
14905
- out[key] = isInputAccessor(value) ? materializeAccessor(value) : value;
14906
- }
14907
- return out;
14908
- }
14909
- function resolveAdditionalStepInputBindings(label, definition) {
14910
- if (!definition) {
14911
- return {};
14912
- }
14913
- const raw = definition.bindings({
14914
- workItemField: (fieldName) => ({
14915
- source: "work_item",
14916
- field: `${WORK_ITEM_FIELDS_PATH_PREFIX}${fieldName}`
14917
- }),
14918
- literal: literal2
14919
- });
14920
- if (definition.schema instanceof exports_external.ZodObject) {
14921
- const validKeys = new Set(Object.keys(definition.schema.shape));
14922
- const unknown2 = Object.keys(raw).filter((key) => !validKeys.has(key));
14923
- if (unknown2.length > 0) {
14924
- throw new Error(`${label}.bindings returned key${unknown2.length > 1 ? "s" : ""} not in schema: ${unknown2.map((key) => `"${key}"`).join(", ")}`);
14480
+ function visitCohortSignalConditions(conditions, visit) {
14481
+ for (const c of conditions) {
14482
+ if (c._tag === "signal") {
14483
+ visit(c);
14484
+ } else {
14485
+ visitCohortSignalConditions(c.conditions, visit);
14925
14486
  }
14926
14487
  }
14927
- return normalizeInputMapping(raw) ?? {};
14928
14488
  }
14929
- function mergeStepBindings(pipelineBindings, explicitBindings) {
14930
- const merged = {
14931
- ...pipelineBindings,
14932
- ...explicitBindings ?? {}
14933
- };
14934
- return Object.keys(merged).length > 0 ? merged : undefined;
14489
+ function isSameStepSignalsListDefinition(a, b) {
14490
+ return JSON.stringify(a.ops) === JSON.stringify(b.ops) && JSON.stringify(a.reducer) === JSON.stringify(b.reducer);
14491
+ }
14492
+ function extractInlineStepSignalsListDefinitions(policy) {
14493
+ if (!policy?.rules)
14494
+ return [];
14495
+ const byKey = new Map;
14496
+ for (const rule of policy.rules) {
14497
+ visitCohortSignalConditions(rule.conditions, (cond) => {
14498
+ if (typeof cond.signal === "string")
14499
+ return;
14500
+ const inline = cond.signal;
14501
+ const def = {
14502
+ key: inline.key,
14503
+ ops: inline.ops,
14504
+ reducer: inline.reducer
14505
+ };
14506
+ const existing = byKey.get(def.key);
14507
+ if (existing) {
14508
+ if (!isSameStepSignalsListDefinition(existing, def)) {
14509
+ throw new Error(`Conflicting inline stepSignalsList definitions for key "${def.key}"`);
14510
+ }
14511
+ return;
14512
+ }
14513
+ byKey.set(def.key, def);
14514
+ });
14515
+ }
14516
+ return [...byKey.values()];
14935
14517
  }
14936
14518
 
14937
14519
  // src/definitions/advancement-policies/cohort-fluent-rules.ts
14938
- var LEAF_BRAND2 = Symbol("boboddy.cohortRule.leaf");
14939
- var GROUP_BRAND2 = Symbol("boboddy.cohortRule.group");
14520
+ var LEAF_BRAND = Symbol("boboddy.cohortRule.leaf");
14521
+ var GROUP_BRAND = Symbol("boboddy.cohortRule.group");
14940
14522
  function createCohortSignalRef(signal2) {
14941
14523
  const leaf = (operator, value) => {
14942
14524
  const condition = {
@@ -14946,7 +14528,7 @@ function createCohortSignalRef(signal2) {
14946
14528
  value
14947
14529
  };
14948
14530
  return {
14949
- [LEAF_BRAND2]: condition,
14531
+ [LEAF_BRAND]: condition,
14950
14532
  then(outcome, paramsJson) {
14951
14533
  return {
14952
14534
  _tag: "rule",
@@ -14973,7 +14555,7 @@ function createCohortSignalRef(signal2) {
14973
14555
  }
14974
14556
  function createCohortLeafFromCondition(condition) {
14975
14557
  return {
14976
- [LEAF_BRAND2]: condition,
14558
+ [LEAF_BRAND]: condition,
14977
14559
  then(outcome, paramsJson) {
14978
14560
  return {
14979
14561
  _tag: "rule",
@@ -14986,15 +14568,15 @@ function createCohortLeafFromCondition(condition) {
14986
14568
  };
14987
14569
  }
14988
14570
  function extractCohortCondition(ref) {
14989
- if (LEAF_BRAND2 in ref)
14990
- return ref[LEAF_BRAND2];
14991
- const group = ref[GROUP_BRAND2];
14571
+ if (LEAF_BRAND in ref)
14572
+ return ref[LEAF_BRAND];
14573
+ const group = ref[GROUP_BRAND];
14992
14574
  return group.mode === "all" ? { _tag: "all", conditions: group.conditions } : { _tag: "any", conditions: group.conditions };
14993
14575
  }
14994
14576
  function createCohortGroup(mode, refs) {
14995
14577
  const conditions = refs.map(extractCohortCondition);
14996
14578
  return {
14997
- [GROUP_BRAND2]: { mode, conditions },
14579
+ [GROUP_BRAND]: { mode, conditions },
14998
14580
  then(outcome, paramsJson) {
14999
14581
  return {
15000
14582
  _tag: "rule",
@@ -15099,132 +14681,385 @@ function makeAdvanceAllCtx() {
15099
14681
  };
15100
14682
  }
15101
14683
 
15102
- // src/definitions/pipelines/fan-out-builder.ts
15103
- function beginFanOut(inputSchema, meta3, nodes, pipelineInputBindings, pipelineStepInputBindings, step, config2) {
15104
- const baseCtx = makeStepInputCtx(inputSchema);
15105
- const ctx = {
15106
- ...baseCtx,
14684
+ // src/definitions/pipelines/bindings.ts
14685
+ function serializeBinding(binding) {
14686
+ if (binding.source === "pipeline_input") {
14687
+ return { source: "pipeline_input", path: binding.path };
14688
+ }
14689
+ if (binding.source === "work_item") {
14690
+ return { source: "work_item", field: binding.field };
14691
+ }
14692
+ if (binding.source === "step_signal") {
14693
+ return {
14694
+ source: "step_signal",
14695
+ stepKey: binding.nodeKey,
14696
+ signalKey: binding.signalKey
14697
+ };
14698
+ }
14699
+ if (binding.source === "literal") {
14700
+ return { source: "literal", value: binding.value };
14701
+ }
14702
+ if (binding.source === "signals_list") {
14703
+ return { source: "signals_list", stepKey: binding.nodeKey };
14704
+ }
14705
+ if (binding.source === "fan_out_item") {
14706
+ return { source: "fan_out_item" };
14707
+ }
14708
+ return { source: "step_output", stepKey: binding.nodeKey };
14709
+ }
14710
+ function serializeInputBindings(input) {
14711
+ const autoBindings = {
14712
+ workItemTitle: { source: "work_item", field: "title" },
14713
+ workItemDescription: { source: "work_item", field: "description" }
14714
+ };
14715
+ const explicitBindings = Object.fromEntries(Object.entries(input).filter((entry) => entry[1] !== undefined).map(([key, binding]) => [key, serializeBinding(binding)]));
14716
+ return { ...autoBindings, ...explicitBindings };
14717
+ }
14718
+
14719
+ // src/definitions/pipelines/work-item-fields.ts
14720
+ var WORK_ITEM_TOP_LEVEL_FIELDS = [
14721
+ "id",
14722
+ "projectId",
14723
+ "platform",
14724
+ "platformId",
14725
+ "platformKey",
14726
+ "url",
14727
+ "title",
14728
+ "description",
14729
+ "sourceCreatedAt",
14730
+ "sourceUpdatedAt",
14731
+ "createdByUserId",
14732
+ "parentWorkItemId",
14733
+ "createdAt",
14734
+ "updatedAt"
14735
+ ];
14736
+ var WORK_ITEM_FIELDS_PATH_PREFIX = "fields.";
14737
+ function resolveWorkItemFieldPath(record2, path) {
14738
+ if (typeof record2 !== "object" || record2 === null)
14739
+ return;
14740
+ const asRecord = record2;
14741
+ if (path.startsWith(WORK_ITEM_FIELDS_PATH_PREFIX)) {
14742
+ const fieldName = path.slice(WORK_ITEM_FIELDS_PATH_PREFIX.length);
14743
+ const fields = asRecord["fields"];
14744
+ if (typeof fields !== "object" || fields === null)
14745
+ return;
14746
+ return fields[fieldName];
14747
+ }
14748
+ return asRecord[path];
14749
+ }
14750
+
14751
+ // src/definitions/pipelines/builder-helpers.ts
14752
+ var WORK_ITEM_ACCESSOR = Object.freeze({
14753
+ ...Object.fromEntries(WORK_ITEM_TOP_LEVEL_FIELDS.map((field) => [
14754
+ field,
14755
+ Object.freeze({ source: "work_item", field })
14756
+ ])),
14757
+ field: (fieldName) => Object.freeze({
14758
+ source: "work_item",
14759
+ field: `${WORK_ITEM_FIELDS_PATH_PREFIX}${fieldName}`
14760
+ })
14761
+ });
14762
+ function literal2(value) {
14763
+ return { source: "literal", value };
14764
+ }
14765
+
14766
+ // src/definitions/pipelines/node-input-ctx.ts
14767
+ function makeBaseNodeInputCtx() {
14768
+ return {
14769
+ pipelineInput: (path) => ({ source: "pipeline_input", path }),
14770
+ workItem: WORK_ITEM_ACCESSOR,
14771
+ signal: (nodeKey, signalKey) => ({
14772
+ source: "step_signal",
14773
+ nodeKey,
14774
+ signalKey
14775
+ }),
14776
+ output: (nodeKey) => ({ source: "step_output", nodeKey }),
14777
+ signalsList: (nodeKey) => ({ source: "signals_list", nodeKey }),
14778
+ literal: literal2
14779
+ };
14780
+ }
14781
+ function makeNodeInputCtx() {
14782
+ return makeBaseNodeInputCtx();
14783
+ }
14784
+ function makeFanOutNodeInputCtx() {
14785
+ return {
14786
+ ...makeBaseNodeInputCtx(),
15107
14787
  item: { source: "fan_out_item" }
15108
14788
  };
15109
- const rawInput = config2.input ? config2.input(ctx) : {};
15110
- const input = mergeStepBindings(pipelineStepInputBindings, normalizeInputMapping(rawInput));
15111
- const fanOutNodeConfig = {
15112
- nodeType: "fanOut",
15113
- fanOutStep: step,
15114
- overSignalKey: config2.over,
15115
- ...input ? { input } : {},
15116
- ...config2.timeout !== undefined ? { timeout: config2.timeout } : {}
15117
- };
15118
- const advanceEachCtx = makeAdvanceEachCtx();
15119
- const advanceEachResult = config2.advance(advanceEachCtx);
14789
+ }
14790
+
14791
+ // src/definitions/pipelines/compile-node-definitions.ts
14792
+ function assertTargetExists(ctx, fromKey, toKey) {
14793
+ if (!ctx.stateKeys.has(toKey)) {
14794
+ throw new Error(`Pipeline "${ctx.pipelineKey}": state "${fromKey}" targets unknown state "${toKey}"`);
14795
+ }
14796
+ }
14797
+ function overSignalKeyOf(over) {
14798
+ const lastDot = over.lastIndexOf(".");
14799
+ return lastDot === -1 ? over : over.slice(lastDot + 1);
14800
+ }
14801
+ function compileStepState(stateKey, state, ctx) {
14802
+ ctx.registerStep(state.step);
14803
+ const inputCtx = makeNodeInputCtx();
14804
+ const rawInput = state.input ? state.input(inputCtx) : {};
14805
+ const inputBindingsJson = serializeInputBindings(rawInput);
14806
+ const routeTarget = typeof state.next === "object" ? state.next : null;
14807
+ const defaultOutcome = routeTarget ? {
14808
+ outcome: "route",
14809
+ pipelineKey: routeTarget.routeToPipeline,
14810
+ ...routeTarget.input ? { inputJson: routeTarget.input } : {}
14811
+ } : "continue";
14812
+ const rules = state.blockWhen ? [{ _tag: "rule", mode: "all", conditions: [state.blockWhen], outcome: "block" }] : [];
14813
+ const policy = { defaultOutcome, rules };
14814
+ const nodeDefinitions = [
14815
+ {
14816
+ nodeKey: stateKey,
14817
+ kind: "step",
14818
+ stepKey: state.step.key,
14819
+ stepName: state.step.name,
14820
+ stepDescription: state.step.description,
14821
+ inputBindingsJson,
14822
+ timeoutSeconds: state.timeout ?? null,
14823
+ advancementPolicyDefinition: serializeAdvancementPolicy(policy),
14824
+ computedSignalDefinitions: extractInlineComputedSignals(policy)
14825
+ }
14826
+ ];
14827
+ const edges = [];
14828
+ if (!routeTarget) {
14829
+ const nextKey = state.next;
14830
+ assertTargetExists(ctx, stateKey, nextKey);
14831
+ edges.push({ fromNodeKey: stateKey, toNodeKey: nextKey });
14832
+ }
14833
+ return { nodeDefinitions, edges };
14834
+ }
14835
+ function compileChoiceState(stateKey, state, ctx) {
14836
+ const stateChoices = state.choices ?? [];
14837
+ if (stateChoices.length === 0 && !state.default) {
14838
+ throw new Error(`Pipeline "${ctx.pipelineKey}": choice state "${stateKey}" requires at least one entry in choices or a default target`);
14839
+ }
14840
+ const choices = stateChoices.map((choiceCase) => {
14841
+ assertTargetExists(ctx, stateKey, choiceCase.next);
14842
+ return {
14843
+ conditionJson: serializeCondition(choiceCase.when),
14844
+ targetNodeKey: choiceCase.next
14845
+ };
14846
+ });
14847
+ if (state.default)
14848
+ assertTargetExists(ctx, stateKey, state.default);
14849
+ const edges = stateChoices.map((choiceCase) => ({
14850
+ fromNodeKey: stateKey,
14851
+ toNodeKey: choiceCase.next,
14852
+ discriminantJson: { conditionSummary: serializeCondition(choiceCase.when) }
14853
+ }));
14854
+ if (state.default) {
14855
+ edges.push({
14856
+ fromNodeKey: stateKey,
14857
+ toNodeKey: state.default,
14858
+ discriminantJson: { default: true }
14859
+ });
14860
+ }
14861
+ return {
14862
+ nodeDefinitions: [
14863
+ { nodeKey: stateKey, kind: "choice", choices, default: state.default ?? null }
14864
+ ],
14865
+ edges
14866
+ };
14867
+ }
14868
+ function compileFanOutState(stateKey, state, ctx) {
14869
+ ctx.registerStep(state.step);
14870
+ const inputCtx = makeFanOutNodeInputCtx();
14871
+ const rawInput = state.input ? state.input(inputCtx) : {};
14872
+ const inputBindingsJson = serializeInputBindings(rawInput);
14873
+ const advanceEachResult = state.advanceEach(makeAdvanceEachCtx());
15120
14874
  const advanceEachPolicy = {
15121
14875
  default: advanceEachResult.default,
15122
14876
  ...advanceEachResult.rules !== undefined ? { rules: advanceEachResult.rules } : {}
15123
14877
  };
15124
- fanOutNodeConfig.advanceEach = advanceEachPolicy;
15125
- const cohortGateNodeConfig = {
15126
- nodeType: "cohortGate",
15127
- nodeKey: `${step.key}__cohortGate`
15128
- };
15129
- const advanceAllCtx = makeAdvanceAllCtx();
15130
- const advanceAllResult = config2.advanceAll(advanceAllCtx);
14878
+ const advanceAllResult = state.advanceAll(makeAdvanceAllCtx());
15131
14879
  const advanceAllPolicy = {
15132
14880
  default: advanceAllResult.default,
15133
14881
  ...advanceAllResult.rules !== undefined ? { rules: advanceAllResult.rules } : {}
15134
14882
  };
15135
- cohortGateNodeConfig.advanceAll = advanceAllPolicy;
15136
- nodes.push(fanOutNodeConfig, cohortGateNodeConfig);
15137
- return new PipelineStepBuilder(inputSchema, meta3, nodes, pipelineInputBindings, pipelineStepInputBindings);
15138
- }
15139
-
15140
- // src/definitions/pipelines/builder.ts
15141
- function pushStep(inputSchema, meta3, nodes, pipelineInputBindings, pipelineStepInputBindings, step, rawOptions) {
15142
- const options = rawOptions;
15143
- const ctx = makeStepInputCtx(inputSchema);
15144
- const rawInput = options.input ? options.input(ctx) : {};
15145
- const input = mergeStepBindings(pipelineStepInputBindings, normalizeInputMapping(rawInput));
15146
- const stepConfig = { step, input };
15147
- if (options.timeout !== undefined)
15148
- stepConfig.timeout = options.timeout;
15149
- const advanceCtx = makeAdvanceCtx();
15150
- const result = options.advance(advanceCtx);
15151
- const policy = {
15152
- defaultOutcome: result.default,
15153
- ...result.rules !== undefined ? { rules: result.rules } : {}
15154
- };
15155
- stepConfig.advancement = policy;
15156
- nodes.push(stepConfig);
15157
- return new PipelineStepBuilder(inputSchema, meta3, nodes, pipelineInputBindings, pipelineStepInputBindings);
15158
- }
15159
-
15160
- class PipelineStepBuilder {
15161
- inputSchema;
15162
- meta;
15163
- nodes;
15164
- pipelineInputBindings;
15165
- pipelineStepInputBindings;
15166
- constructor(inputSchema, meta3, nodes, pipelineInputBindings = {}, pipelineStepInputBindings = {}) {
15167
- this.inputSchema = inputSchema;
15168
- this.meta = meta3;
15169
- this.nodes = nodes;
15170
- this.pipelineInputBindings = pipelineInputBindings;
15171
- this.pipelineStepInputBindings = pipelineStepInputBindings;
15172
- }
15173
- step(step, options) {
15174
- return pushStep(this.inputSchema, this.meta, this.nodes, this.pipelineInputBindings, this.pipelineStepInputBindings, step, options);
15175
- }
15176
- fanOutStep(step, config2) {
15177
- return beginFanOut(this.inputSchema, this.meta, this.nodes, this.pipelineInputBindings, this.pipelineStepInputBindings, step, config2);
15178
- }
15179
- build() {
15180
- const config2 = {
15181
- key: this.meta.key,
15182
- name: this.meta.name,
15183
- description: this.meta.description,
15184
- version: this.meta.version,
15185
- status: this.meta.status,
15186
- input: this.inputSchema,
15187
- nodes: this.nodes,
15188
- pipelineInputBindings: this.pipelineInputBindings
14883
+ const gateKey = `${stateKey}__cohortGate`;
14884
+ if (ctx.stateKeys.has(gateKey)) {
14885
+ throw new Error(`Pipeline "${ctx.pipelineKey}": synthesized cohortGate key "${gateKey}" collides with an author-declared state \u2014 rename state "${stateKey}"`);
14886
+ }
14887
+ assertTargetExists(ctx, stateKey, state.next);
14888
+ return {
14889
+ nodeDefinitions: [
14890
+ {
14891
+ nodeKey: stateKey,
14892
+ kind: "fanOut",
14893
+ stepKey: state.step.key,
14894
+ stepName: state.step.name,
14895
+ stepDescription: state.step.description,
14896
+ inputBindingsJson,
14897
+ timeoutSeconds: state.timeout ?? null,
14898
+ overSignalKey: overSignalKeyOf(state.over),
14899
+ advanceEachPolicyDefinition: serializeCohortAdvancementPolicy(advanceEachPolicy),
14900
+ maxConcurrency: state.maxConcurrency ?? null
14901
+ },
14902
+ {
14903
+ nodeKey: gateKey,
14904
+ kind: "cohortGate",
14905
+ advanceAllPolicyDefinition: serializeCohortAdvancementPolicy(advanceAllPolicy),
14906
+ stepSignalsListDefinitions: extractInlineStepSignalsListDefinitions(advanceAllPolicy)
14907
+ }
14908
+ ],
14909
+ edges: [
14910
+ { fromNodeKey: stateKey, toNodeKey: gateKey },
14911
+ { fromNodeKey: gateKey, toNodeKey: state.next }
14912
+ ]
14913
+ };
14914
+ }
14915
+ function compileParallelState(stateKey, state, ctx) {
14916
+ const branchEntries = Object.entries(state.branches);
14917
+ if (branchEntries.length === 0) {
14918
+ throw new Error(`Pipeline "${ctx.pipelineKey}": parallel state "${stateKey}" requires at least one branch`);
14919
+ }
14920
+ const branches = {};
14921
+ for (const [branchKey, branchConfig] of branchEntries) {
14922
+ ctx.registerStep(branchConfig.step);
14923
+ const inputCtx = makeNodeInputCtx();
14924
+ const rawInput = branchConfig.input ? branchConfig.input(inputCtx) : {};
14925
+ branches[branchKey] = {
14926
+ stepKey: branchConfig.step.key,
14927
+ stepName: branchConfig.step.name,
14928
+ stepDescription: branchConfig.step.description,
14929
+ inputBindingsJson: serializeInputBindings(rawInput)
14930
+ };
14931
+ }
14932
+ let advanceAllPolicyDefinition;
14933
+ if (state.advanceAll) {
14934
+ const advanceAllResult = state.advanceAll(makeAdvanceAllCtx());
14935
+ const advanceAllPolicy = {
14936
+ default: advanceAllResult.default,
14937
+ ...advanceAllResult.rules !== undefined ? { rules: advanceAllResult.rules } : {}
15189
14938
  };
15190
- return buildPipelineSpec(config2);
14939
+ advanceAllPolicyDefinition = serializeCohortAdvancementPolicy(advanceAllPolicy);
14940
+ }
14941
+ assertTargetExists(ctx, stateKey, state.next);
14942
+ return {
14943
+ nodeDefinitions: [
14944
+ {
14945
+ nodeKey: stateKey,
14946
+ kind: "parallel",
14947
+ branches,
14948
+ ...advanceAllPolicyDefinition ? { advanceAllPolicyDefinition } : {}
14949
+ }
14950
+ ],
14951
+ edges: [{ fromNodeKey: stateKey, toNodeKey: state.next }]
14952
+ };
14953
+ }
14954
+ function compileLoopState(stateKey, state, ctx) {
14955
+ ctx.registerStep(state.step);
14956
+ const inputCtx = makeNodeInputCtx();
14957
+ const rawInput = state.input ? state.input(inputCtx) : {};
14958
+ assertTargetExists(ctx, stateKey, state.next);
14959
+ assertTargetExists(ctx, stateKey, state.onExhausted);
14960
+ return {
14961
+ nodeDefinitions: [
14962
+ {
14963
+ nodeKey: stateKey,
14964
+ kind: "loop",
14965
+ stepKey: state.step.key,
14966
+ stepName: state.step.name,
14967
+ stepDescription: state.step.description,
14968
+ inputBindingsJson: serializeInputBindings(rawInput),
14969
+ timeoutSeconds: state.timeout ?? null,
14970
+ maxIterations: state.maxIterations,
14971
+ untilConditionJson: serializeCondition(state.until)
14972
+ }
14973
+ ],
14974
+ edges: [
14975
+ { fromNodeKey: stateKey, toNodeKey: state.next, discriminantJson: { loopExit: "next" } },
14976
+ {
14977
+ fromNodeKey: stateKey,
14978
+ toNodeKey: state.onExhausted,
14979
+ discriminantJson: { loopExit: "onExhausted" }
14980
+ }
14981
+ ]
14982
+ };
14983
+ }
14984
+ function compileTerminalState(stateKey, kind) {
14985
+ return { nodeDefinitions: [{ nodeKey: stateKey, kind }], edges: [] };
14986
+ }
14987
+ function assertNoIllegalConvergentEdges(pipelineKey, nodeKindByKey, edges) {
14988
+ const incoming = new Map;
14989
+ for (const edge of edges) {
14990
+ const list = incoming.get(edge.toNodeKey) ?? [];
14991
+ list.push(edge);
14992
+ incoming.set(edge.toNodeKey, list);
14993
+ }
14994
+ for (const [targetKey, incomingEdges] of incoming) {
14995
+ if (incomingEdges.length <= 1)
14996
+ continue;
14997
+ const hasInvalidSource = incomingEdges.some((edge) => {
14998
+ const kind = nodeKindByKey.get(edge.fromNodeKey);
14999
+ return kind !== "choice" && kind !== "loop";
15000
+ });
15001
+ if (hasInvalidSource) {
15002
+ throw new Error(`Pipeline "${pipelineKey}": state "${targetKey}" has more than one incoming edge, but not every source is a 'choice'/'loop' state (unconditional convergent edges are not allowed \u2014 see docs/research/flat-pipeline-sdk-and-visual-designer.md \xA76).`);
15003
+ }
15191
15004
  }
15192
15005
  }
15193
15006
 
15194
- class PipelineBuilder {
15195
- inputSchema;
15196
- meta;
15197
- nodes = [];
15198
- pipelineInputBindings;
15199
- pipelineStepInputBindings;
15200
- constructor(meta3) {
15201
- const { additionalPipelineInput, additionalStepInput, ...rest } = meta3;
15202
- this.inputSchema = additionalPipelineInput?.schema ?? exports_external.unknown();
15203
- this.meta = rest;
15204
- if (additionalPipelineInput) {
15205
- const raw = additionalPipelineInput.bindings({
15206
- workItem: WORK_ITEM_ACCESSOR,
15207
- literal: literal2
15208
- });
15209
- if (additionalPipelineInput.schema instanceof exports_external.ZodObject) {
15210
- const validKeys = new Set(Object.keys(additionalPipelineInput.schema.shape));
15211
- const unknown2 = Object.keys(raw).filter((k) => !validKeys.has(k));
15212
- if (unknown2.length > 0) {
15213
- throw new Error(`additionalPipelineInput.bindings returned key${unknown2.length > 1 ? "s" : ""} not in schema: ${unknown2.map((k) => `"${k}"`).join(", ")}`);
15214
- }
15215
- }
15216
- this.pipelineInputBindings = normalizeInputMapping(raw) ?? {};
15217
- } else {
15218
- this.pipelineInputBindings = {};
15219
- }
15220
- this.pipelineStepInputBindings = resolveAdditionalStepInputBindings("additionalStepInput", additionalStepInput);
15007
+ // src/definitions/pipelines/define-pipeline.ts
15008
+ function isWorkingNodeDefinition(node) {
15009
+ return node.kind === "step" || node.kind === "fanOut" || node.kind === "loop";
15010
+ }
15011
+ function definePipeline(config2) {
15012
+ const stateEntries = Object.entries(config2.states);
15013
+ if (stateEntries.length === 0) {
15014
+ throw new Error(`Pipeline "${config2.key}" must declare at least one state`);
15221
15015
  }
15222
- step(step, options) {
15223
- return pushStep(this.inputSchema, this.meta, this.nodes, this.pipelineInputBindings, this.pipelineStepInputBindings, step, options);
15016
+ const startState = config2.states[config2.startAt];
15017
+ if (!startState) {
15018
+ throw new Error(`Pipeline "${config2.key}"'s startAt "${config2.startAt}" does not name a declared state`);
15224
15019
  }
15225
- }
15226
- function pipeline(meta3) {
15227
- return new PipelineBuilder(meta3);
15020
+ if (startState.kind === "choice" || startState.kind === "succeed" || startState.kind === "fail") {
15021
+ throw new Error(`Pipeline "${config2.key}"'s startAt "${config2.startAt}" names a '${startState.kind}' state, which cannot be an entry point`);
15022
+ }
15023
+ const stateKeys = new Set(Object.keys(config2.states));
15024
+ const stepDefMap = new Map;
15025
+ const registerStep = (step) => {
15026
+ const mapKey = `${step.key}@v${String(step.version)}`;
15027
+ if (!stepDefMap.has(mapKey))
15028
+ stepDefMap.set(mapKey, step);
15029
+ };
15030
+ const compileContext = {
15031
+ pipelineKey: config2.key,
15032
+ stateKeys,
15033
+ registerStep
15034
+ };
15035
+ const nodeDefinitions = [];
15036
+ const dependencyEdges = [];
15037
+ for (const [stateKey, state] of stateEntries) {
15038
+ const compiled = state.kind === "step" ? compileStepState(stateKey, state, compileContext) : state.kind === "choice" ? compileChoiceState(stateKey, state, compileContext) : state.kind === "fanOut" ? compileFanOutState(stateKey, state, compileContext) : state.kind === "parallel" ? compileParallelState(stateKey, state, compileContext) : state.kind === "loop" ? compileLoopState(stateKey, state, compileContext) : compileTerminalState(stateKey, state.kind);
15039
+ nodeDefinitions.push(...compiled.nodeDefinitions);
15040
+ dependencyEdges.push(...compiled.edges);
15041
+ }
15042
+ const nodeKindByKey = new Map(nodeDefinitions.map((node) => [node.nodeKey, node.kind]));
15043
+ assertNoIllegalConvergentEdges(config2.key, nodeKindByKey, dependencyEdges);
15044
+ let inputSchemaJson = null;
15045
+ if (config2.input) {
15046
+ try {
15047
+ inputSchemaJson = exports_external.toJSONSchema(config2.input);
15048
+ } catch {
15049
+ inputSchemaJson = null;
15050
+ }
15051
+ }
15052
+ return {
15053
+ key: config2.key,
15054
+ name: config2.name ?? config2.key,
15055
+ description: config2.description ?? null,
15056
+ version: config2.version ?? 1,
15057
+ status: config2.status ?? "active",
15058
+ inputSchemaJson,
15059
+ _stepDefinitions: [...stepDefMap.values()],
15060
+ nodeDefinitions,
15061
+ dependencyEdges
15062
+ };
15228
15063
  }
15229
15064
  // src/generated/core/bodySerializer.gen.ts
15230
15065
  var jsonBodySerializer = {
@@ -16305,29 +16140,6 @@ class PipelineDefinitions extends HeyApiClient {
16305
16140
  unarchivePipelineDefinition(options) {
16306
16141
  return (options.client ?? this.client).put({ url: "/api/pipeline-definitions/{pipelineDefinitionId}/unarchive", ...options });
16307
16142
  }
16308
- addPipelineStep(options) {
16309
- return (options.client ?? this.client).post({
16310
- url: "/api/pipeline-definitions/{pipelineDefinitionId}/steps",
16311
- ...options,
16312
- headers: {
16313
- "Content-Type": "application/json",
16314
- ...options.headers
16315
- }
16316
- });
16317
- }
16318
- removePipelineStep(options) {
16319
- return (options.client ?? this.client).delete({ url: "/api/pipeline-definitions/{pipelineDefinitionId}/steps/{pipelineStepDefinitionId}", ...options });
16320
- }
16321
- updatePipelineStep(options) {
16322
- return (options.client ?? this.client).put({
16323
- url: "/api/pipeline-definitions/{pipelineDefinitionId}/steps/{pipelineStepDefinitionId}",
16324
- ...options,
16325
- headers: {
16326
- "Content-Type": "application/json",
16327
- ...options.headers
16328
- }
16329
- });
16330
- }
16331
16143
  setPipelineStepAdvancementPolicy(options) {
16332
16144
  return (options.client ?? this.client).put({
16333
16145
  url: "/api/pipeline-definitions/{pipelineDefinitionId}/steps/{pipelineStepDefinitionId}/advancement-policy",
@@ -16834,6 +16646,76 @@ function createPipelineDefinitionsClient(baseUrl) {
16834
16646
  const client2 = createClient({ baseUrl });
16835
16647
  return buildPipelineDefinitionsClient(new PipelineDefinitions({ client: client2 }));
16836
16648
  }
16649
+ function resolveStepRef(pipelineKey, nodeKey, stepKey, stepDefMap) {
16650
+ const stepDef = stepDefMap.get(stepKey);
16651
+ if (!stepDef) {
16652
+ throw new Error(`Step "${stepKey}" referenced by node "${nodeKey}" in pipeline "${pipelineKey}" was not found on ` + `the server. Run \`boboddy steps push\` first to push your step definitions.`);
16653
+ }
16654
+ return {
16655
+ stepDefinitionId: stepDef.id,
16656
+ stepDefinitionVersion: stepDef.version
16657
+ };
16658
+ }
16659
+ function buildConfigJson(pipelineKey, node, stepDefMap) {
16660
+ if (node.kind === "choice") {
16661
+ return { choices: node.choices, default: node.default };
16662
+ }
16663
+ if (node.kind === "loop") {
16664
+ return {
16665
+ maxIterations: node.maxIterations,
16666
+ untilConditionJson: node.untilConditionJson
16667
+ };
16668
+ }
16669
+ if (node.kind === "parallel") {
16670
+ const branches = {};
16671
+ for (const [branchKey, branch] of Object.entries(node.branches)) {
16672
+ branches[branchKey] = {
16673
+ ...resolveStepRef(pipelineKey, node.nodeKey, branch.stepKey, stepDefMap),
16674
+ inputBindingsJson: branch.inputBindingsJson
16675
+ };
16676
+ }
16677
+ return {
16678
+ branches,
16679
+ ...node.advanceAllPolicyDefinition ? { advanceAllPolicyDefinition: node.advanceAllPolicyDefinition } : {}
16680
+ };
16681
+ }
16682
+ if (node.kind === "fanOut") {
16683
+ return {
16684
+ overSignalKey: node.overSignalKey,
16685
+ advanceEachPolicyDefinition: node.advanceEachPolicyDefinition,
16686
+ maxConcurrency: node.maxConcurrency
16687
+ };
16688
+ }
16689
+ if (node.kind === "cohortGate") {
16690
+ return {
16691
+ advanceAllPolicyDefinition: node.advanceAllPolicyDefinition,
16692
+ stepSignalsListDefinitions: node.stepSignalsListDefinitions
16693
+ };
16694
+ }
16695
+ return null;
16696
+ }
16697
+ function buildGraphNodeInput(pipelineKey, node, stepDefMap) {
16698
+ const working = isWorkingNodeDefinition(node) ? node : null;
16699
+ const stepRef = working ? resolveStepRef(pipelineKey, node.nodeKey, working.stepKey, stepDefMap) : null;
16700
+ const policy = node.kind === "step" ? node.advancementPolicyDefinition : undefined;
16701
+ return {
16702
+ key: node.nodeKey,
16703
+ kind: node.kind,
16704
+ name: working?.stepName ?? node.nodeKey,
16705
+ ...stepRef ?? {},
16706
+ description: working?.stepDescription ?? null,
16707
+ inputBindingsJson: working ? working.inputBindingsJson : null,
16708
+ timeoutSeconds: working?.timeoutSeconds ?? null,
16709
+ ...policy ? {
16710
+ advancementPolicyRulesJson: policy.rulesJson,
16711
+ advancementPolicyDefaultEventType: policy.defaultEventType,
16712
+ advancementPolicyDefaultEventParamsJson: policy.defaultEventParamsJson,
16713
+ advancementPolicyAllowedEventTypes: policy.allowedEventTypes
16714
+ } : {},
16715
+ configJson: buildConfigJson(pipelineKey, node, stepDefMap),
16716
+ computedSignalDefinitions: node.kind === "step" ? node.computedSignalDefinitions : []
16717
+ };
16718
+ }
16837
16719
  var buildPipelineDefinitionsClient = (pipelineDefinitions) => {
16838
16720
  return {
16839
16721
  listByProjectId: async (projectId, options) => {
@@ -16853,37 +16735,12 @@ var buildPipelineDefinitionsClient = (pipelineDefinitions) => {
16853
16735
  stepDefMap.set(s.key, s);
16854
16736
  }
16855
16737
  }
16856
- const nonStepNode = spec.nodeDefinitions.find((node) => node.kind !== "step");
16857
- if (nonStepNode) {
16858
- throw new Error(`Pipeline "${spec.key}" contains a "${nonStepNode.kind}" node ("${nonStepNode.nodeKey}"), ` + `but fan-out pipelines cannot be pushed via the current wire contract yet. ` + `Only "step"-only (chain) pipelines can be pushed with \`upsertFromSpec\` today.`);
16859
- }
16860
- const ordered = tryOrderChainNodeDefinitions(spec.nodeDefinitions, spec.dependencyEdges);
16861
- if (ordered === null) {
16862
- throw new Error(`Pipeline "${spec.key}" has a malformed step graph: its node and ` + `dependency-edge definitions do not form a single connected, ` + `acyclic chain. This should not happen from the \`pipeline()\` ` + `builder \u2014 check for hand-edited or generated pipeline specs.`);
16863
- }
16864
- const stepDefinitions = ordered.map((node, index) => {
16865
- const stepKey = node.stepKey;
16866
- if (!stepKey) {
16867
- throw new Error(`Node "${node.nodeKey}" in pipeline "${spec.key}" has no stepKey.`);
16868
- }
16869
- const stepDef = stepDefMap.get(stepKey);
16870
- if (!stepDef) {
16871
- throw new Error(`Step "${stepKey}" referenced in pipeline "${spec.key}" was not found on the server. ` + `Run \`boboddy steps push\` first to push your step definitions.`);
16872
- }
16873
- return {
16874
- stepDefinitionId: stepDef.id,
16875
- stepDefinitionVersion: stepDef.version,
16876
- key: node.nodeKey,
16877
- name: node.stepName ?? "",
16878
- description: node.stepDescription ?? null,
16879
- position: index + 1,
16880
- inputBindingsJson: node.inputBindingsJson ?? {},
16881
- timeoutSeconds: node.timeoutSeconds ?? null,
16882
- retryPolicyJson: null,
16883
- advancementPolicyDefinition: node.advancementPolicyDefinition,
16884
- computedSignalDefinitions: node.computedSignalDefinitions ?? []
16885
- };
16886
- });
16738
+ const nodeDefinitions = spec.nodeDefinitions.map((node) => buildGraphNodeInput(spec.key, node, stepDefMap));
16739
+ const dependencyEdges = spec.dependencyEdges.map((edge) => ({
16740
+ fromNodeKey: edge.fromNodeKey,
16741
+ toNodeKey: edge.toNodeKey,
16742
+ discriminantJson: edge.discriminantJson ?? null
16743
+ }));
16887
16744
  const body = {
16888
16745
  projectId,
16889
16746
  key: spec.key,
@@ -16891,7 +16748,8 @@ var buildPipelineDefinitionsClient = (pipelineDefinitions) => {
16891
16748
  description: spec.description,
16892
16749
  status: spec.status,
16893
16750
  inputSchemaJson: spec.inputSchemaJson,
16894
- stepDefinitions
16751
+ nodeDefinitions,
16752
+ dependencyEdges
16895
16753
  };
16896
16754
  const result = await pipelineDefinitions.upsertPipelineDefinition({
16897
16755
  body,
@@ -16949,17 +16807,17 @@ function buildWorkItemAccessor() {
16949
16807
  }
16950
16808
  return accessor;
16951
16809
  }
16952
- function makeAssign(pipeline2) {
16953
- if (typeof pipeline2 !== "object" || typeof pipeline2["key"] !== "string" || !Array.isArray(pipeline2["nodeDefinitions"])) {
16954
- throw new Error("assign() requires a pipeline spec produced by pipeline().build(). " + "Pass the default-exported value from a pipeline definition file.");
16810
+ function makeAssign(pipeline) {
16811
+ if (typeof pipeline !== "object" || typeof pipeline["key"] !== "string" || !Array.isArray(pipeline["nodeDefinitions"])) {
16812
+ throw new Error("assign() requires a pipeline spec produced by definePipeline(). " + "Pass the default-exported value from a pipeline definition file.");
16955
16813
  }
16956
- return { _tag: "assign", pipeline: pipeline2 };
16814
+ return { _tag: "assign", pipeline };
16957
16815
  }
16958
- function extractCondition2(ref) {
16816
+ function extractCondition(ref) {
16959
16817
  return ref._condition;
16960
16818
  }
16961
16819
  function makeGroup(mode, refs) {
16962
- const conditions = refs.map(extractCondition2);
16820
+ const conditions = refs.map(extractCondition);
16963
16821
  const condition = { _tag: "group", mode, conditions };
16964
16822
  return {
16965
16823
  _condition: condition,
@@ -17049,22 +16907,19 @@ function isDefaultPipelineAssignmentSpec(value) {
17049
16907
  return value["_tag"] === "default_pipeline_assignment";
17050
16908
  }
17051
16909
  export {
17052
- serializeDefaultPipelineAssignment,
17053
- resolveWorkItemFieldPath,
17054
- pipeline,
17055
- materializeAccessor,
17056
- literal2 as literal,
17057
- isInputAccessor,
17058
- isDefaultPipelineAssignmentSpec,
17059
- defaultPipelineAssignment,
17060
- createPipelineDefinitionsClient,
17061
- createInputAccessor,
17062
- buildPipelineSpec,
17063
- WORK_ITEM_TOP_LEVEL_FIELDS,
17064
- WORK_ITEM_FIELDS_PATH_PREFIX,
17065
- Rule,
17066
- PipelineStepBuilder,
17067
- PipelineBuilder,
16910
+ Computed,
17068
16911
  DEFAULT_PIPELINE_ASSIGNMENT_FILENAME,
17069
- Computed
16912
+ Rule,
16913
+ WORK_ITEM_FIELDS_PATH_PREFIX,
16914
+ WORK_ITEM_TOP_LEVEL_FIELDS,
16915
+ createPipelineDefinitionsClient,
16916
+ defaultPipelineAssignment,
16917
+ definePipeline,
16918
+ isDefaultPipelineAssignmentSpec,
16919
+ isWorkingNodeDefinition,
16920
+ makeFanOutNodeInputCtx,
16921
+ makeNodeInputCtx,
16922
+ resolveWorkItemFieldPath,
16923
+ serializeDefaultPipelineAssignment,
16924
+ serializeInputBindings
17070
16925
  };