@inf-monkeys-tech/monkeys 1.1.32 → 1.1.34

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 (51) hide show
  1. package/README.md +19 -0
  2. package/lib/contracts/index.d.ts +1 -0
  3. package/lib/contracts/index.d.ts.map +1 -1
  4. package/lib/contracts/index.js +1 -0
  5. package/lib/contracts/index.js.map +1 -1
  6. package/lib/contracts/page-expression.d.ts +7 -0
  7. package/lib/contracts/page-expression.d.ts.map +1 -1
  8. package/lib/contracts/page-expression.js +13 -6
  9. package/lib/contracts/page-expression.js.map +1 -1
  10. package/lib/contracts/tenant.d.ts +3 -0
  11. package/lib/contracts/tenant.d.ts.map +1 -1
  12. package/lib/contracts/tenant.js +1 -0
  13. package/lib/contracts/tenant.js.map +1 -1
  14. package/lib/contracts/workflow-canvas.d.ts +73 -0
  15. package/lib/contracts/workflow-canvas.d.ts.map +1 -0
  16. package/lib/contracts/workflow-canvas.js +33 -0
  17. package/lib/contracts/workflow-canvas.js.map +1 -0
  18. package/lib/contracts/workflow-definition.d.ts +537 -0
  19. package/lib/contracts/workflow-definition.d.ts.map +1 -1
  20. package/lib/contracts/workflow-definition.js +12 -2
  21. package/lib/contracts/workflow-definition.js.map +1 -1
  22. package/lib/esm/{chunk-COMJDE7H.mjs → chunk-DDEMQXTP.mjs} +3 -3
  23. package/lib/esm/{chunk-DMDJCNPT.mjs → chunk-EKT45BA4.mjs} +2 -2
  24. package/lib/esm/{chunk-O5YP4QQ7.mjs → chunk-IJ2W77NR.mjs} +2 -2
  25. package/lib/esm/{chunk-BQ77E4VU.mjs → chunk-L5CYU6K4.mjs} +390 -339
  26. package/lib/esm/chunk-L5CYU6K4.mjs.map +1 -0
  27. package/lib/esm/{chunk-HLCW3N47.mjs → chunk-UWGXMF6O.mjs} +2 -2
  28. package/lib/esm/{chunk-OL3X34S6.mjs → chunk-ZN3TO3U7.mjs} +17 -10
  29. package/lib/esm/{chunk-OL3X34S6.mjs.map → chunk-ZN3TO3U7.mjs.map} +1 -1
  30. package/lib/esm/contracts/index.mjs +16 -4
  31. package/lib/esm/index.mjs +18 -6
  32. package/lib/esm/index.mjs.map +1 -1
  33. package/lib/esm/runtime/index.mjs +3 -3
  34. package/lib/esm/schemas/index.mjs +3 -3
  35. package/lib/json-schema/tenant-product-config.schema.json +4 -0
  36. package/lib/json-schema/tenant-runtime-config.schema.json +4 -0
  37. package/lib/json-schema/workflow-definition.schema.json +195 -65
  38. package/lib/runtime/action-program-author.d.ts +7 -1
  39. package/lib/runtime/action-program-author.d.ts.map +1 -1
  40. package/lib/runtime/action-program-author.js.map +1 -1
  41. package/lib/runtime/page-expression.d.ts.map +1 -1
  42. package/lib/runtime/page-expression.js +16 -7
  43. package/lib/runtime/page-expression.js.map +1 -1
  44. package/lib/schemas/index.d.ts +44 -0
  45. package/lib/schemas/index.d.ts.map +1 -1
  46. package/package.json +1 -1
  47. package/lib/esm/chunk-BQ77E4VU.mjs.map +0 -1
  48. /package/lib/esm/{chunk-COMJDE7H.mjs.map → chunk-DDEMQXTP.mjs.map} +0 -0
  49. /package/lib/esm/{chunk-DMDJCNPT.mjs.map → chunk-EKT45BA4.mjs.map} +0 -0
  50. /package/lib/esm/{chunk-O5YP4QQ7.mjs.map → chunk-IJ2W77NR.mjs.map} +0 -0
  51. /package/lib/esm/{chunk-HLCW3N47.mjs.map → chunk-UWGXMF6O.mjs.map} +0 -0
@@ -7767,9 +7767,10 @@ var RecursivePageExpressionSchema = z4.lazy(() => z4.discriminatedUnion("kind",
7767
7767
  ...["map", "filter", "sum"].map((kind) => z4.object({ kind: z4.literal(kind), source: RecursivePageExpressionSchema, value: RecursivePageExpressionSchema }).strict())
7768
7768
  ]));
7769
7769
  var PAGE_EXPRESSION_LIMITS = Object.freeze({ depth: 32, nodes: 4096, operations: 2e4, collection: 1e3, bytes: 1048576 });
7770
- var assertPageValueBudget = (value) => {
7770
+ var PAGE_EXPRESSION_VALUE_LIMITS = Object.freeze({ depth: 32, nodes: 262144, collection: 1e3, bytes: 16777216 });
7771
+ var assertValueBudget = (value, limits) => {
7771
7772
  if (value === null || typeof value !== "object") {
7772
- if (typeof value === "string" && value.length * 2 > PAGE_EXPRESSION_LIMITS.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
7773
+ if (typeof value === "string" && value.length * 2 > limits.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
7773
7774
  return;
7774
7775
  }
7775
7776
  const queue = [{ value, depth: 0 }];
@@ -7777,19 +7778,22 @@ var assertPageValueBudget = (value) => {
7777
7778
  let bytes = 0;
7778
7779
  while (queue.length) {
7779
7780
  const item = queue.pop();
7780
- if (++nodes > PAGE_EXPRESSION_LIMITS.nodes || item.depth > PAGE_EXPRESSION_LIMITS.depth) throw new Error("PAGE_EXPRESSION_BUDGET");
7781
+ if (++nodes > limits.nodes || item.depth > limits.depth) throw new Error("PAGE_EXPRESSION_BUDGET");
7782
+ if (limits === PAGE_EXPRESSION_VALUE_LIMITS && Array.isArray(item.value) && item.value.length > limits.collection) throw new Error("PAGE_EXPRESSION_BUDGET");
7781
7783
  if (typeof item.value === "string") bytes += item.value.length * 2;
7782
7784
  if (item.value && typeof item.value === "object") {
7783
7785
  for (const [key, child] of Object.entries(item.value)) {
7784
7786
  bytes += key.length * 2;
7785
7787
  if (["__proto__", "prototype", "constructor"].includes(key)) throw new Error("PAGE_EXPRESSION_UNSAFE_PATH");
7786
- if (queue.length >= PAGE_EXPRESSION_LIMITS.nodes) throw new Error("PAGE_EXPRESSION_BUDGET");
7788
+ if (queue.length >= limits.nodes) throw new Error("PAGE_EXPRESSION_BUDGET");
7787
7789
  queue.push({ value: child, depth: item.depth + 1 });
7788
7790
  }
7789
7791
  }
7790
- if (bytes > PAGE_EXPRESSION_LIMITS.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
7792
+ if (bytes > limits.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
7791
7793
  }
7792
7794
  };
7795
+ var assertPageValueBudget = (value) => assertValueBudget(value, PAGE_EXPRESSION_LIMITS);
7796
+ var assertPageExpressionValueBudget = (value) => assertValueBudget(value, PAGE_EXPRESSION_VALUE_LIMITS);
7793
7797
  var PageExpressionSchema = z4.unknown().superRefine((value, context) => {
7794
7798
  try {
7795
7799
  assertPageValueBudget(value);
@@ -19019,6 +19023,7 @@ var TenantApplicationConfigSchema = z17.object({
19019
19023
  landingPage: TenantLandingPageConfigSchema.optional(),
19020
19024
  auth: z17.object({
19021
19025
  enabled: z17.array(ContractIdentifierSchema).default([]),
19026
+ defaultLoginMethod: z17.string().max(128).optional(),
19022
19027
  oidc: z17.object({
19023
19028
  buttonText: z17.string().optional(),
19024
19029
  autoSignin: z17.boolean().optional()
@@ -19231,9 +19236,40 @@ var TenantRuntimeConfigSchema = z17.object({
19231
19236
  declarativeRuntime: DeclarativeRuntimeRolloutCapabilitySchema.optional()
19232
19237
  }).strict();
19233
19238
 
19234
- // src/contracts/workflow-definition.ts
19239
+ // src/contracts/workflow-canvas.ts
19235
19240
  import { z as z18 } from "zod";
19236
- var ConductorTaskTypeSchema = z18.enum([
19241
+ var WorkflowCanvasElementSchema = z18.object({
19242
+ id: z18.string().min(1),
19243
+ type: z18.enum(["rectangle", "diamond", "ellipse", "text", "arrow", "line", "freedraw", "image", "frame", "magicframe", "embeddable", "iframe"]),
19244
+ x: z18.number().finite(),
19245
+ y: z18.number().finite(),
19246
+ width: z18.number().finite().nonnegative(),
19247
+ height: z18.number().finite().nonnegative(),
19248
+ customData: z18.object({
19249
+ workflow: z18.object({
19250
+ nodeRef: z18.string().min(1).optional(),
19251
+ edgeRef: z18.string().min(1).optional()
19252
+ }).strict().optional()
19253
+ }).strict().optional()
19254
+ }).catchall(JsonValueSchema);
19255
+ var WorkflowCanvasSchema = z18.object({
19256
+ engine: z18.literal("excalidraw"),
19257
+ schemaVersion: z18.literal(1),
19258
+ elements: z18.array(WorkflowCanvasElementSchema).max(2e4),
19259
+ files: z18.record(z18.string(), z18.object({
19260
+ reference: z18.string().regex(/^file:\/\/[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/),
19261
+ mimeType: z18.enum(["image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml"]),
19262
+ created: z18.number().finite().nonnegative()
19263
+ }).strict())
19264
+ }).strict().superRefine((canvas, context) => {
19265
+ if (new Set(canvas.elements.map((element) => element.id)).size !== canvas.elements.length) {
19266
+ context.addIssue({ code: "custom", path: ["elements"], message: "Canvas element identities must be unique." });
19267
+ }
19268
+ });
19269
+
19270
+ // src/contracts/workflow-definition.ts
19271
+ import { z as z19 } from "zod";
19272
+ var ConductorTaskTypeSchema = z19.enum([
19237
19273
  "SIMPLE",
19238
19274
  "DYNAMIC",
19239
19275
  "FORK_JOIN",
@@ -19282,46 +19318,46 @@ var requiredTaskFields = {
19282
19318
  WAIT: ["inputParameters"],
19283
19319
  TERMINATE: ["inputParameters"]
19284
19320
  };
19285
- var ConductorTaskDefinitionSchema = z18.lazy(
19286
- () => z18.object({
19321
+ var ConductorTaskDefinitionSchema = z19.lazy(
19322
+ () => z19.object({
19287
19323
  name: ContractIdentifierSchema,
19288
19324
  taskReferenceName: ContractIdentifierSchema,
19289
19325
  type: ConductorTaskTypeSchema,
19290
- inputParameters: z18.record(z18.string(), JsonValueSchema).optional(),
19291
- startDelay: z18.number().int().nonnegative().optional(),
19292
- optional: z18.boolean().optional(),
19293
- asyncComplete: z18.boolean().optional(),
19294
- rateLimited: z18.boolean().optional(),
19295
- retryCount: z18.number().int().nonnegative().optional(),
19296
- taskDefinition: z18.record(z18.string(), JsonValueSchema).optional(),
19297
- loopCondition: z18.string().optional(),
19298
- loopOver: z18.array(ConductorTaskDefinitionSchema).optional(),
19299
- sink: z18.string().optional(),
19300
- forkTasks: z18.array(z18.array(ConductorTaskDefinitionSchema)).optional(),
19301
- joinOn: z18.array(ContractIdentifierSchema).optional(),
19302
- defaultExclusiveJoinTask: z18.array(ContractIdentifierSchema).optional(),
19303
- dynamicForkTasksParam: z18.string().optional(),
19304
- dynamicForkTasksInputParamName: z18.string().optional(),
19305
- subWorkflowParam: z18.object({
19306
- $ref: z18.string().optional(),
19326
+ inputParameters: z19.record(z19.string(), JsonValueSchema).optional(),
19327
+ startDelay: z19.number().int().nonnegative().optional(),
19328
+ optional: z19.boolean().optional(),
19329
+ asyncComplete: z19.boolean().optional(),
19330
+ rateLimited: z19.boolean().optional(),
19331
+ retryCount: z19.number().int().nonnegative().optional(),
19332
+ taskDefinition: z19.record(z19.string(), JsonValueSchema).optional(),
19333
+ loopCondition: z19.string().optional(),
19334
+ loopOver: z19.array(ConductorTaskDefinitionSchema).optional(),
19335
+ sink: z19.string().optional(),
19336
+ forkTasks: z19.array(z19.array(ConductorTaskDefinitionSchema)).optional(),
19337
+ joinOn: z19.array(ContractIdentifierSchema).optional(),
19338
+ defaultExclusiveJoinTask: z19.array(ContractIdentifierSchema).optional(),
19339
+ dynamicForkTasksParam: z19.string().optional(),
19340
+ dynamicForkTasksInputParamName: z19.string().optional(),
19341
+ subWorkflowParam: z19.object({
19342
+ $ref: z19.string().optional(),
19307
19343
  name: ContractIdentifierSchema,
19308
- version: z18.number().int().positive().optional(),
19309
- taskToDomain: z18.record(z18.string(), z18.string()).optional(),
19310
- workflowDefinition: z18.record(z18.string(), JsonValueSchema).optional()
19344
+ version: z19.number().int().positive().optional(),
19345
+ taskToDomain: z19.record(z19.string(), z19.string()).optional(),
19346
+ workflowDefinition: z19.record(z19.string(), JsonValueSchema).optional()
19311
19347
  }).strict().optional(),
19312
- decisionCases: z18.record(z18.string(), z18.array(ConductorTaskDefinitionSchema)).optional(),
19313
- defaultCase: z18.array(ConductorTaskDefinitionSchema).optional(),
19314
- evaluatorType: z18.enum(["value-param", "javascript", "graaljs"]).optional(),
19315
- expression: z18.string().optional(),
19348
+ decisionCases: z19.record(z19.string(), z19.array(ConductorTaskDefinitionSchema)).optional(),
19349
+ defaultCase: z19.array(ConductorTaskDefinitionSchema).optional(),
19350
+ evaluatorType: z19.enum(["value-param", "javascript", "graaljs"]).optional(),
19351
+ expression: z19.string().optional(),
19316
19352
  __alias: JsonValueSchema.optional(),
19317
- callbackFromWorker: z18.boolean().optional(),
19353
+ callbackFromWorker: z19.boolean().optional(),
19318
19354
  caseExpression: JsonValueSchema.optional(),
19319
- caseValueParam: z18.string().optional(),
19320
- dependencies: z18.array(JsonValueSchema).optional(),
19321
- description: z18.string().optional(),
19322
- dynamicTaskNameParam: z18.string().optional(),
19323
- joinMode: z18.string().optional(),
19324
- permissive: z18.boolean().optional(),
19355
+ caseValueParam: z19.string().optional(),
19356
+ dependencies: z19.array(JsonValueSchema).optional(),
19357
+ description: z19.string().optional(),
19358
+ dynamicTaskNameParam: z19.string().optional(),
19359
+ joinMode: z19.string().optional(),
19360
+ permissive: z19.boolean().optional(),
19325
19361
  joinTaskRef: ContractIdentifierSchema.optional(),
19326
19362
  forkTaskRef: ContractIdentifierSchema.optional()
19327
19363
  }).strict().superRefine((task, context) => {
@@ -19335,29 +19371,29 @@ var ConductorTaskDefinitionSchema = z18.lazy(
19335
19371
  }
19336
19372
  })
19337
19373
  );
19338
- var ConductorWorkflowDefinitionSchema = z18.object({
19339
- ownerApp: z18.string().optional(),
19340
- createTime: z18.number().int().nonnegative().optional(),
19341
- updateTime: z18.number().int().nonnegative().optional(),
19342
- createdBy: z18.string().optional(),
19343
- updatedBy: z18.string().optional(),
19374
+ var ConductorWorkflowDefinitionSchema = z19.object({
19375
+ ownerApp: z19.string().optional(),
19376
+ createTime: z19.number().int().nonnegative().optional(),
19377
+ updateTime: z19.number().int().nonnegative().optional(),
19378
+ createdBy: z19.string().optional(),
19379
+ updatedBy: z19.string().optional(),
19344
19380
  name: ContractIdentifierSchema,
19345
- description: z18.string().optional(),
19346
- version: z18.number().int().positive(),
19347
- tasks: z18.array(ConductorTaskDefinitionSchema),
19348
- inputParameters: z18.array(ContractIdentifierSchema),
19349
- outputParameters: z18.record(z18.string(), JsonValueSchema).optional(),
19381
+ description: z19.string().optional(),
19382
+ version: z19.number().int().positive(),
19383
+ tasks: z19.array(ConductorTaskDefinitionSchema),
19384
+ inputParameters: z19.array(ContractIdentifierSchema),
19385
+ outputParameters: z19.record(z19.string(), JsonValueSchema).optional(),
19350
19386
  failureWorkflow: ContractIdentifierSchema.optional(),
19351
- schemaVersion: z18.number().int().positive().optional(),
19352
- restartable: z18.boolean().optional(),
19353
- workflowStatusListenerEnabled: z18.boolean().optional(),
19354
- ownerEmail: z18.string().email().optional(),
19355
- timeoutPolicy: z18.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
19356
- timeoutSeconds: z18.number().int().nonnegative(),
19357
- variables: z18.record(z18.string(), JsonValueSchema).optional(),
19358
- inputTemplate: z18.record(z18.string(), JsonValueSchema).optional()
19387
+ schemaVersion: z19.number().int().positive().optional(),
19388
+ restartable: z19.boolean().optional(),
19389
+ workflowStatusListenerEnabled: z19.boolean().optional(),
19390
+ ownerEmail: z19.string().email().optional(),
19391
+ timeoutPolicy: z19.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
19392
+ timeoutSeconds: z19.number().int().nonnegative(),
19393
+ variables: z19.record(z19.string(), JsonValueSchema).optional(),
19394
+ inputTemplate: z19.record(z19.string(), JsonValueSchema).optional()
19359
19395
  }).strict();
19360
- var WorkflowParameterTypeSchema = z18.enum([
19396
+ var WorkflowParameterTypeSchema = z19.enum([
19361
19397
  "string",
19362
19398
  "file",
19363
19399
  "number",
@@ -19367,214 +19403,214 @@ var WorkflowParameterTypeSchema = z18.enum([
19367
19403
  "notice",
19368
19404
  "canvas-assist"
19369
19405
  ]);
19370
- var WorkflowConditionalStateSchema = z18.object({
19371
- conditions: z18.array(
19372
- z18.object({
19373
- field: z18.string(),
19374
- operator: z18.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
19406
+ var WorkflowConditionalStateSchema = z19.object({
19407
+ conditions: z19.array(
19408
+ z19.object({
19409
+ field: z19.string(),
19410
+ operator: z19.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
19375
19411
  value: JsonValueSchema
19376
19412
  }).strict()
19377
19413
  ),
19378
- logic: z18.enum(["AND", "OR"]).optional()
19414
+ logic: z19.enum(["AND", "OR"]).optional()
19379
19415
  }).strict();
19380
- var ImageSelectMappingAppearanceSchema = z18.object({
19381
- columns: z18.number().int().min(1).max(4).optional(),
19382
- cardSize: z18.enum(["sm", "md", "lg"]).optional(),
19383
- imageAspectRatio: z18.enum(["square", "4:5", "3:4", "16:9"]).optional(),
19384
- gap: z18.enum(["sm", "md", "lg"]).optional(),
19385
- radius: z18.enum(["sm", "md", "lg", "xl"]).optional(),
19386
- borderStyle: z18.enum(["none", "soft", "strong"]).optional(),
19387
- borderWidth: z18.union([z18.literal(0), z18.literal(1), z18.literal(2)]).optional(),
19388
- enableScroll: z18.boolean().optional(),
19389
- maxHeight: z18.number().int().min(160).max(1200).optional(),
19390
- enableCollapse: z18.boolean().optional(),
19391
- visibleRows: z18.number().int().min(1).max(6).optional(),
19392
- hideLabel: z18.boolean().optional(),
19393
- hideDescription: z18.boolean().optional(),
19394
- hideValue: z18.boolean().optional()
19416
+ var ImageSelectMappingAppearanceSchema = z19.object({
19417
+ columns: z19.number().int().min(1).max(4).optional(),
19418
+ cardSize: z19.enum(["sm", "md", "lg"]).optional(),
19419
+ imageAspectRatio: z19.enum(["square", "4:5", "3:4", "16:9"]).optional(),
19420
+ gap: z19.enum(["sm", "md", "lg"]).optional(),
19421
+ radius: z19.enum(["sm", "md", "lg", "xl"]).optional(),
19422
+ borderStyle: z19.enum(["none", "soft", "strong"]).optional(),
19423
+ borderWidth: z19.union([z19.literal(0), z19.literal(1), z19.literal(2)]).optional(),
19424
+ enableScroll: z19.boolean().optional(),
19425
+ maxHeight: z19.number().int().min(160).max(1200).optional(),
19426
+ enableCollapse: z19.boolean().optional(),
19427
+ visibleRows: z19.number().int().min(1).max(6).optional(),
19428
+ hideLabel: z19.boolean().optional(),
19429
+ hideDescription: z19.boolean().optional(),
19430
+ hideValue: z19.boolean().optional()
19395
19431
  }).strict();
19396
- var ComfyWorkflowPortBindingSchema = z18.object({
19397
- node: z18.union([z18.string(), z18.number()]),
19398
- key: z18.string().optional()
19432
+ var ComfyWorkflowPortBindingSchema = z19.object({
19433
+ node: z19.union([z19.string(), z19.number()]),
19434
+ key: z19.string().optional()
19399
19435
  }).strict();
19400
- var WorkflowParameterTypeOptionsSchema = z18.object({
19401
- editor: z18.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
19402
- editorLanguage: z18.enum(["javaScript", "json", "python", "sql"]).optional(),
19403
- maxValue: z18.number().optional(),
19404
- minValue: z18.number().optional(),
19405
- max: z18.number().optional(),
19406
- min: z18.number().optional(),
19407
- multipleValues: z18.boolean().optional(),
19408
- numberPrecision: z18.number().nonnegative().optional(),
19409
- password: z18.boolean().optional(),
19410
- rows: z18.number().int().positive().optional(),
19411
- assetType: z18.string().optional(),
19412
- accept: z18.string().optional(),
19413
- maxSize: z18.number().positive().optional(),
19414
- fileType: z18.string().optional(),
19415
- aiMultiShotMainImageField: z18.string().optional(),
19416
- aiMultiShotWorkflowAppId: z18.string().optional(),
19417
- aiMultiShotWorkflowId: z18.string().optional(),
19418
- allowCustomInput: z18.boolean().optional(),
19419
- allowUploadVideo: z18.boolean().optional(),
19420
- aspectRatioField: z18.string().optional(),
19421
- assemblyValueType: z18.string().optional(),
19422
- autoAnalyzeDesignImage: z18.boolean().optional(),
19423
- autoDetectAspectRatio: z18.boolean().optional(),
19424
- autoIncrementId: z18.boolean().optional(),
19436
+ var WorkflowParameterTypeOptionsSchema = z19.object({
19437
+ editor: z19.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
19438
+ editorLanguage: z19.enum(["javaScript", "json", "python", "sql"]).optional(),
19439
+ maxValue: z19.number().optional(),
19440
+ minValue: z19.number().optional(),
19441
+ max: z19.number().optional(),
19442
+ min: z19.number().optional(),
19443
+ multipleValues: z19.boolean().optional(),
19444
+ numberPrecision: z19.number().nonnegative().optional(),
19445
+ password: z19.boolean().optional(),
19446
+ rows: z19.number().int().positive().optional(),
19447
+ assetType: z19.string().optional(),
19448
+ accept: z19.string().optional(),
19449
+ maxSize: z19.number().positive().optional(),
19450
+ fileType: z19.string().optional(),
19451
+ aiMultiShotMainImageField: z19.string().optional(),
19452
+ aiMultiShotWorkflowAppId: z19.string().optional(),
19453
+ aiMultiShotWorkflowId: z19.string().optional(),
19454
+ allowCustomInput: z19.boolean().optional(),
19455
+ allowUploadVideo: z19.boolean().optional(),
19456
+ aspectRatioField: z19.string().optional(),
19457
+ assemblyValueType: z19.string().optional(),
19458
+ autoAnalyzeDesignImage: z19.boolean().optional(),
19459
+ autoDetectAspectRatio: z19.boolean().optional(),
19460
+ autoIncrementId: z19.boolean().optional(),
19425
19461
  comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
19426
- comfyuiModelServerId: z18.string().optional(),
19427
- comfyuiModelTypeName: z18.string().optional(),
19462
+ comfyuiModelServerId: z19.string().optional(),
19463
+ comfyuiModelTypeName: z19.string().optional(),
19428
19464
  defaultCustomInput: JsonValueSchema.optional(),
19429
- descriptionAlert: z18.boolean().optional(),
19430
- disabled: z18.union([z18.boolean(), WorkflowConditionalStateSchema]).optional(),
19431
- editable: z18.union([z18.boolean(), WorkflowConditionalStateSchema]).optional(),
19432
- enableAiMultiShot: z18.boolean().optional(),
19433
- enableBooleanSwitchMode: z18.boolean().optional(),
19434
- enableClear: z18.boolean().optional(),
19435
- enableExpand: z18.boolean().optional(),
19436
- enableImageCrop: z18.boolean().optional(),
19437
- enableImageMask: z18.boolean().optional(),
19438
- enableImageOverlay: z18.boolean().optional(),
19439
- enablePopupEditor: z18.boolean().optional(),
19440
- enablePromptFontSize: z18.boolean().optional(),
19441
- enableReset: z18.boolean().optional(),
19442
- enableSelectItemIcon: z18.boolean().optional(),
19443
- enableSelectList: z18.boolean().optional(),
19444
- enableSelectSearch: z18.boolean().optional(),
19445
- enableSliderEnterMode: z18.boolean().optional(),
19446
- enableVoice: z18.boolean().optional(),
19447
- expandButtonText: z18.string().optional(),
19448
- foldUp: z18.boolean().optional(),
19449
- hidden: z18.boolean().optional(),
19450
- hideRequiredDot: z18.boolean().optional(),
19451
- inlineTitleWithSelect: z18.boolean().optional(),
19452
- knowledgeGraphButtonText: z18.string().optional(),
19453
- identifyAttributeCount: z18.union([z18.number().nonnegative(), z18.string().min(1), z18.object({ min: z18.number().nonnegative().optional(), max: z18.number().nonnegative().optional() }).strict()]).optional(),
19454
- identifyAttributes: z18.array(JsonValueSchema).optional(),
19455
- identifyMaxVariants: z18.number().int().nonnegative().optional(),
19456
- identifySourceField: z18.string().optional(),
19457
- imageOverlayBaseField: z18.string().optional(),
19458
- imageOverlayOverlayField: z18.string().optional(),
19465
+ descriptionAlert: z19.boolean().optional(),
19466
+ disabled: z19.union([z19.boolean(), WorkflowConditionalStateSchema]).optional(),
19467
+ editable: z19.union([z19.boolean(), WorkflowConditionalStateSchema]).optional(),
19468
+ enableAiMultiShot: z19.boolean().optional(),
19469
+ enableBooleanSwitchMode: z19.boolean().optional(),
19470
+ enableClear: z19.boolean().optional(),
19471
+ enableExpand: z19.boolean().optional(),
19472
+ enableImageCrop: z19.boolean().optional(),
19473
+ enableImageMask: z19.boolean().optional(),
19474
+ enableImageOverlay: z19.boolean().optional(),
19475
+ enablePopupEditor: z19.boolean().optional(),
19476
+ enablePromptFontSize: z19.boolean().optional(),
19477
+ enableReset: z19.boolean().optional(),
19478
+ enableSelectItemIcon: z19.boolean().optional(),
19479
+ enableSelectList: z19.boolean().optional(),
19480
+ enableSelectSearch: z19.boolean().optional(),
19481
+ enableSliderEnterMode: z19.boolean().optional(),
19482
+ enableVoice: z19.boolean().optional(),
19483
+ expandButtonText: z19.string().optional(),
19484
+ foldUp: z19.boolean().optional(),
19485
+ hidden: z19.boolean().optional(),
19486
+ hideRequiredDot: z19.boolean().optional(),
19487
+ inlineTitleWithSelect: z19.boolean().optional(),
19488
+ knowledgeGraphButtonText: z19.string().optional(),
19489
+ identifyAttributeCount: z19.union([z19.number().nonnegative(), z19.string().min(1), z19.object({ min: z19.number().nonnegative().optional(), max: z19.number().nonnegative().optional() }).strict()]).optional(),
19490
+ identifyAttributes: z19.array(JsonValueSchema).optional(),
19491
+ identifyMaxVariants: z19.number().int().nonnegative().optional(),
19492
+ identifySourceField: z19.string().optional(),
19493
+ imageOverlayBaseField: z19.string().optional(),
19494
+ imageOverlayOverlayField: z19.string().optional(),
19459
19495
  imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
19460
- imageSelectMappingColumns: z18.number().int().min(1).max(4).optional(),
19461
- imageSelectMappingEnableCustomUpload: z18.boolean().optional(),
19462
- imageSelectMappingHideLabel: z18.boolean().optional(),
19463
- imageSelectMappingHideLink: z18.boolean().optional(),
19464
- imageSelectMappingHideMeta: z18.boolean().optional(),
19465
- imageSelectMappingInlineUseLargeUploadBox: z18.boolean().optional(),
19466
- imageSelectMappingPromptField: z18.string().optional(),
19467
- imageSelectMappingTabOrder: z18.enum(["template-first", "upload-first"]).optional(),
19468
- imageSelectMappingTabWidthMode: z18.enum(["content", "fill"]).optional(),
19496
+ imageSelectMappingColumns: z19.number().int().min(1).max(4).optional(),
19497
+ imageSelectMappingEnableCustomUpload: z19.boolean().optional(),
19498
+ imageSelectMappingHideLabel: z19.boolean().optional(),
19499
+ imageSelectMappingHideLink: z19.boolean().optional(),
19500
+ imageSelectMappingHideMeta: z19.boolean().optional(),
19501
+ imageSelectMappingInlineUseLargeUploadBox: z19.boolean().optional(),
19502
+ imageSelectMappingPromptField: z19.string().optional(),
19503
+ imageSelectMappingTabOrder: z19.enum(["template-first", "upload-first"]).optional(),
19504
+ imageSelectMappingTabWidthMode: z19.enum(["content", "fill"]).optional(),
19469
19505
  imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
19470
19506
  imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
19471
- imageSelectMappingUploadMode: z18.enum(["tabs", "inline"]).optional(),
19507
+ imageSelectMappingUploadMode: z19.enum(["tabs", "inline"]).optional(),
19472
19508
  imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
19473
19509
  imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
19474
- endpoints: z18.array(JsonValueSchema).optional(),
19475
- examples: z18.array(JsonValueSchema).optional(),
19510
+ endpoints: z19.array(JsonValueSchema).optional(),
19511
+ examples: z19.array(JsonValueSchema).optional(),
19476
19512
  extraData: JsonValueSchema.optional(),
19477
19513
  layer: JsonValueSchema.optional(),
19478
19514
  map: JsonValueSchema.optional(),
19479
- multiline: z18.boolean().optional(),
19480
- options: z18.array(JsonValueSchema).optional(),
19481
- originalFiles: z18.array(JsonValueSchema).optional(),
19515
+ multiline: z19.boolean().optional(),
19516
+ options: z19.array(JsonValueSchema).optional(),
19517
+ originalFiles: z19.array(JsonValueSchema).optional(),
19482
19518
  placeholder: LocalizedTextSchema.optional(),
19483
- preserveSelectListOrder: z18.boolean().optional(),
19519
+ preserveSelectListOrder: z19.boolean().optional(),
19484
19520
  promptDictionary: JsonValueSchema.optional(),
19485
- promptFontSize: z18.number().optional(),
19521
+ promptFontSize: z19.number().optional(),
19486
19522
  promptModeToggle: JsonValueSchema.optional(),
19487
- requireActiveSelectFilter: z18.boolean().optional(),
19488
- restoreDefaultOnEmptyEnter: z18.boolean().optional(),
19489
- search: z18.boolean().optional(),
19490
- selectButtonEnableCollapse: z18.boolean().optional(),
19491
- selectButtonVisibleRows: z18.number().int().positive().optional(),
19492
- selectList: z18.array(JsonValueSchema).optional(),
19493
- selectListDisplayMode: z18.string().optional(),
19494
- selectPromptField: z18.string().optional(),
19495
- showAddLocalFileButton: z18.boolean().optional(),
19496
- singleColumn: z18.boolean().optional(),
19497
- singleFrameForMultiple: z18.boolean().optional(),
19498
- textSingleLine: z18.boolean().optional(),
19499
- textareaMiniHeight: z18.number().nonnegative().optional(),
19523
+ requireActiveSelectFilter: z19.boolean().optional(),
19524
+ restoreDefaultOnEmptyEnter: z19.boolean().optional(),
19525
+ search: z19.boolean().optional(),
19526
+ selectButtonEnableCollapse: z19.boolean().optional(),
19527
+ selectButtonVisibleRows: z19.number().int().positive().optional(),
19528
+ selectList: z19.array(JsonValueSchema).optional(),
19529
+ selectListDisplayMode: z19.string().optional(),
19530
+ selectPromptField: z19.string().optional(),
19531
+ showAddLocalFileButton: z19.boolean().optional(),
19532
+ singleColumn: z19.boolean().optional(),
19533
+ singleFrameForMultiple: z19.boolean().optional(),
19534
+ textSingleLine: z19.boolean().optional(),
19535
+ textareaMiniHeight: z19.number().nonnegative().optional(),
19500
19536
  tips: LocalizedTextSchema.optional(),
19501
19537
  visibility: JsonValueSchema.optional(),
19502
- voiceButtonText: z18.string().optional(),
19503
- designAnalysisFields: z18.array(JsonValueSchema).optional(),
19504
- designAnalysisFillStrategy: z18.string().optional(),
19505
- designAnalysisMaxFields: z18.number().int().nonnegative().optional(),
19506
- designAnalysisType: z18.string().optional(),
19507
- designAnalysisFieldPrefix: z18.string().optional()
19538
+ voiceButtonText: z19.string().optional(),
19539
+ designAnalysisFields: z19.array(JsonValueSchema).optional(),
19540
+ designAnalysisFillStrategy: z19.string().optional(),
19541
+ designAnalysisMaxFields: z19.number().int().nonnegative().optional(),
19542
+ designAnalysisType: z19.string().optional(),
19543
+ designAnalysisFieldPrefix: z19.string().optional()
19508
19544
  }).strict();
19509
- var WorkflowParameterSchema = z18.lazy(
19510
- () => z18.object({
19545
+ var WorkflowParameterSchema = z19.lazy(
19546
+ () => z19.object({
19511
19547
  displayName: LocalizedTextSchema,
19512
19548
  name: ContractIdentifierSchema,
19513
19549
  type: WorkflowParameterTypeSchema,
19514
19550
  typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
19515
19551
  default: JsonValueSchema.optional(),
19516
19552
  description: LocalizedTextSchema.optional(),
19517
- hint: z18.string().optional(),
19518
- displayOptions: z18.object({
19519
- hide: z18.record(z18.string(), z18.array(JsonValueSchema)).optional(),
19520
- show: z18.record(z18.string(), z18.array(JsonValueSchema)).optional()
19553
+ hint: z19.string().optional(),
19554
+ displayOptions: z19.object({
19555
+ hide: z19.record(z19.string(), z19.array(JsonValueSchema)).optional(),
19556
+ show: z19.record(z19.string(), z19.array(JsonValueSchema)).optional()
19521
19557
  }).strict().optional(),
19522
- options: z18.array(z18.union([
19523
- z18.object({ name: LocalizedTextSchema, value: z18.union([z18.string(), z18.number(), z18.boolean()]), action: z18.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
19558
+ options: z19.array(z19.union([
19559
+ z19.object({ name: LocalizedTextSchema, value: z19.union([z19.string(), z19.number(), z19.boolean()]), action: z19.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
19524
19560
  WorkflowParameterSchema,
19525
- z18.object({ displayName: z18.string(), name: ContractIdentifierSchema, values: z18.array(WorkflowParameterSchema) }).strict()
19561
+ z19.object({ displayName: z19.string(), name: ContractIdentifierSchema, values: z19.array(WorkflowParameterSchema) }).strict()
19526
19562
  ])).optional(),
19527
19563
  placeholder: LocalizedTextSchema.optional(),
19528
- isNodeSetting: z18.boolean().optional(),
19529
- noDataExpression: z18.boolean().optional(),
19530
- required: z18.boolean().optional(),
19531
- example: z18.string().optional(),
19532
- extractValue: z18.object({ type: z18.literal("regex"), regex: z18.string() }).strict().optional(),
19533
- properties: z18.array(WorkflowParameterSchema).optional(),
19534
- assetType: z18.string().optional(),
19535
- flag: z18.boolean().optional(),
19536
- enableExpand: z18.boolean().optional(),
19537
- enableVoice: z18.boolean().optional(),
19538
- expandButtonText: z18.string().optional(),
19539
- knowledgeGraphButtonText: z18.string().optional(),
19540
- selectListDisplayMode: z18.string().optional(),
19541
- voiceButtonText: z18.string().optional()
19564
+ isNodeSetting: z19.boolean().optional(),
19565
+ noDataExpression: z19.boolean().optional(),
19566
+ required: z19.boolean().optional(),
19567
+ example: z19.string().optional(),
19568
+ extractValue: z19.object({ type: z19.literal("regex"), regex: z19.string() }).strict().optional(),
19569
+ properties: z19.array(WorkflowParameterSchema).optional(),
19570
+ assetType: z19.string().optional(),
19571
+ flag: z19.boolean().optional(),
19572
+ enableExpand: z19.boolean().optional(),
19573
+ enableVoice: z19.boolean().optional(),
19574
+ expandButtonText: z19.string().optional(),
19575
+ knowledgeGraphButtonText: z19.string().optional(),
19576
+ selectListDisplayMode: z19.string().optional(),
19577
+ voiceButtonText: z19.string().optional()
19542
19578
  }).strict()
19543
19579
  );
19544
- var WorkflowOutputBindingSchema = z18.object({ key: ContractIdentifierSchema, value: z18.string() }).strict();
19545
- var WorkflowNodeSchema = z18.object({
19580
+ var WorkflowOutputBindingSchema = z19.object({ key: ContractIdentifierSchema, value: z19.string() }).strict();
19581
+ var WorkflowNodeSchema = z19.object({
19546
19582
  id: ContractIdentifierSchema,
19547
19583
  referenceName: ContractIdentifierSchema,
19548
19584
  capabilityRef: ContractIdentifierSchema,
19549
19585
  capabilityVersion: ContractIdentifierSchema.optional(),
19550
- inputBindings: z18.record(z18.string(), JsonValueSchema).default({}),
19551
- configuration: z18.object({ executor: z18.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
19586
+ inputBindings: z19.record(z19.string(), JsonValueSchema).default({}),
19587
+ configuration: z19.object({ executor: z19.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
19552
19588
  }).strict().superRefine((node, context) => {
19553
19589
  if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
19554
19590
  if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
19555
19591
  if (JSON.stringify(node.configuration.task.inputParameters ?? {}) !== JSON.stringify(node.inputBindings)) context.addIssue({ code: "custom", path: ["configuration", "task", "inputParameters"], message: "Conductor task inputs must match node inputBindings." });
19556
19592
  });
19557
- var WorkflowEdgeSchema = z18.object({
19593
+ var WorkflowEdgeSchema = z19.object({
19558
19594
  from: ContractIdentifierSchema,
19559
19595
  to: ContractIdentifierSchema,
19560
19596
  outputPort: ContractIdentifierSchema.optional(),
19561
19597
  inputPort: ContractIdentifierSchema.optional(),
19562
- condition: z18.string().optional()
19598
+ condition: z19.string().optional()
19563
19599
  }).strict();
19564
- var WorkflowTriggerSchema = z18.object({
19600
+ var WorkflowTriggerSchema = z19.object({
19565
19601
  id: ContractIdentifierSchema,
19566
- type: z18.enum(["manual", "schedule", "webhook", "event", "api"]),
19567
- enabled: z18.boolean(),
19568
- schedule: z18.object({ cron: z18.string().trim().min(1) }).strict().optional(),
19569
- webhook: z18.object({
19570
- path: z18.string().trim().min(1).optional(),
19571
- method: z18.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
19572
- auth: z18.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
19573
- basicAuth: z18.object({ username: z18.string(), password: z18.string() }).strict().optional(),
19574
- headerAuth: z18.object({ name: z18.string().trim().min(1), value: z18.string() }).strict().optional(),
19575
- responseUntil: z18.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
19602
+ type: z19.enum(["manual", "schedule", "webhook", "event", "api"]),
19603
+ enabled: z19.boolean(),
19604
+ schedule: z19.object({ cron: z19.string().trim().min(1) }).strict().optional(),
19605
+ webhook: z19.object({
19606
+ path: z19.string().trim().min(1).optional(),
19607
+ method: z19.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
19608
+ auth: z19.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
19609
+ basicAuth: z19.object({ username: z19.string(), password: z19.string() }).strict().optional(),
19610
+ headerAuth: z19.object({ name: z19.string().trim().min(1), value: z19.string() }).strict().optional(),
19611
+ responseUntil: z19.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
19576
19612
  }).strict().optional(),
19577
- event: z18.object({
19613
+ event: z19.object({
19578
19614
  eventType: ContractIdentifierSchema,
19579
19615
  configuration: JsonValueSchema.optional()
19580
19616
  }).strict().optional()
@@ -19583,63 +19619,63 @@ var WorkflowTriggerSchema = z18.object({
19583
19619
  if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
19584
19620
  if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
19585
19621
  });
19586
- var WorkflowValidationIssueSchema = z18.object({
19622
+ var WorkflowValidationIssueSchema = z19.object({
19587
19623
  taskReferenceName: ContractIdentifierSchema,
19588
- issueType: z18.enum(["ERROR", "WARNING"]),
19589
- detailReason: z18.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
19590
- humanMessage: z18.object({ en: z18.string(), zh: z18.string() }).strict()
19624
+ issueType: z19.enum(["ERROR", "WARNING"]),
19625
+ detailReason: z19.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
19626
+ humanMessage: z19.object({ en: z19.string(), zh: z19.string() }).strict()
19591
19627
  }).strict();
19592
- var WorkflowDefinitionSchema = z18.object({
19593
- contract: z18.literal("WorkflowDefinition"),
19628
+ var WorkflowDefinitionSchema = z19.object({
19629
+ contract: z19.literal("WorkflowDefinition"),
19594
19630
  metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
19595
19631
  name: LocalizedTextSchema,
19596
19632
  description: LocalizedTextSchema.optional(),
19597
- role: z18.enum(["workflow", "template"]),
19633
+ role: z19.enum(["workflow", "template"]),
19598
19634
  teamId: ContractIdentifierSchema,
19599
19635
  creatorRef: EntityRefSchema,
19600
- tags: z18.array(ContractIdentifierSchema).default([])
19636
+ tags: z19.array(ContractIdentifierSchema).default([])
19601
19637
  }).strict(),
19602
- revision: z18.object({
19603
- kind: z18.enum(["release", "backup"]),
19604
- recordVersion: z18.number().int().positive(),
19605
- sourceVersion: z18.number().int().positive().optional()
19638
+ revision: z19.object({
19639
+ kind: z19.enum(["release", "backup"]),
19640
+ recordVersion: z19.number().int().positive(),
19641
+ sourceVersion: z19.number().int().positive().optional()
19606
19642
  }).strict().superRefine((revision, context) => {
19607
19643
  if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
19608
19644
  }),
19609
- presentation: z18.object({ iconUrl: z18.string().optional(), thumbnail: z18.string().optional() }).strict(),
19610
- ports: z18.object({ inputs: z18.array(ContractPortSchema).default([]), outputs: z18.array(ContractPortSchema).default([]) }).strict(),
19611
- parameters: z18.object({ variables: z18.array(WorkflowParameterSchema).default([]), outputs: z18.array(WorkflowOutputBindingSchema).default([]) }).strict(),
19612
- graph: z18.object({ nodes: z18.array(WorkflowNodeSchema), edges: z18.array(WorkflowEdgeSchema).default([]) }).strict(),
19613
- execution: z18.object({
19614
- timeoutMs: z18.number().int().positive().optional(),
19615
- retries: z18.number().int().nonnegative().default(0),
19616
- concurrencyLimit: z18.number().int().positive().optional(),
19617
- idempotency: z18.enum(["required", "supported", "none"]),
19618
- rateLimit: z18.object({ enabled: z18.boolean(), max: z18.number().int().nonnegative(), windowMs: z18.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
19645
+ presentation: z19.object({ iconUrl: z19.string().optional(), thumbnail: z19.string().optional(), canvas: WorkflowCanvasSchema.optional() }).strict(),
19646
+ ports: z19.object({ inputs: z19.array(ContractPortSchema).default([]), outputs: z19.array(ContractPortSchema).default([]) }).strict(),
19647
+ parameters: z19.object({ variables: z19.array(WorkflowParameterSchema).default([]), outputs: z19.array(WorkflowOutputBindingSchema).default([]) }).strict(),
19648
+ graph: z19.object({ nodes: z19.array(WorkflowNodeSchema), edges: z19.array(WorkflowEdgeSchema).default([]) }).strict(),
19649
+ execution: z19.object({
19650
+ timeoutMs: z19.number().int().positive().optional(),
19651
+ retries: z19.number().int().nonnegative().default(0),
19652
+ concurrencyLimit: z19.number().int().positive().optional(),
19653
+ idempotency: z19.enum(["required", "supported", "none"]),
19654
+ rateLimit: z19.object({ enabled: z19.boolean(), max: z19.number().int().nonnegative(), windowMs: z19.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
19619
19655
  if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
19620
19656
  }).optional(),
19621
- conductor: z18.object({
19622
- ownerApp: z18.string().optional(),
19623
- createTime: z18.number().int().nonnegative().optional(),
19624
- updateTime: z18.number().int().nonnegative().optional(),
19625
- createdBy: z18.string().optional(),
19626
- updatedBy: z18.string().optional(),
19657
+ conductor: z19.object({
19658
+ ownerApp: z19.string().optional(),
19659
+ createTime: z19.number().int().nonnegative().optional(),
19660
+ updateTime: z19.number().int().nonnegative().optional(),
19661
+ createdBy: z19.string().optional(),
19662
+ updatedBy: z19.string().optional(),
19627
19663
  failureWorkflow: ContractIdentifierSchema.optional(),
19628
- schemaVersion: z18.number().int().positive().optional(),
19629
- restartable: z18.boolean().optional(),
19630
- workflowStatusListenerEnabled: z18.boolean().optional(),
19631
- ownerEmail: z18.string().email().optional(),
19632
- timeoutPolicy: z18.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
19633
- variables: z18.record(z18.string(), JsonValueSchema).optional(),
19634
- inputTemplate: z18.record(z18.string(), JsonValueSchema).optional()
19664
+ schemaVersion: z19.number().int().positive().optional(),
19665
+ restartable: z19.boolean().optional(),
19666
+ workflowStatusListenerEnabled: z19.boolean().optional(),
19667
+ ownerEmail: z19.string().email().optional(),
19668
+ timeoutPolicy: z19.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
19669
+ variables: z19.record(z19.string(), JsonValueSchema).optional(),
19670
+ inputTemplate: z19.record(z19.string(), JsonValueSchema).optional()
19635
19671
  }).strict()
19636
19672
  }).strict(),
19637
- triggers: z18.array(WorkflowTriggerSchema).default([]),
19638
- views: z18.array(z18.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
19639
- dataContracts: z18.object({ reads: z18.array(ContractIdentifierSchema).default([]), writes: z18.array(ContractIdentifierSchema).default([]), emits: z18.array(ContractIdentifierSchema).default([]) }).strict(),
19640
- governance: z18.object({ activated: z18.boolean(), validated: z18.boolean(), validationIssues: z18.array(WorkflowValidationIssueSchema).default([]), hidden: z18.boolean().optional() }).strict(),
19641
- interfaces: z18.object({
19642
- openai: z18.object({ enabled: z18.boolean(), modelName: z18.string().trim().min(1).optional() }).strict(),
19673
+ triggers: z19.array(WorkflowTriggerSchema).default([]),
19674
+ views: z19.array(z19.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
19675
+ dataContracts: z19.object({ reads: z19.array(ContractIdentifierSchema).default([]), writes: z19.array(ContractIdentifierSchema).default([]), emits: z19.array(ContractIdentifierSchema).default([]) }).strict(),
19676
+ governance: z19.object({ activated: z19.boolean(), validated: z19.boolean(), validationIssues: z19.array(WorkflowValidationIssueSchema).default([]), hidden: z19.boolean().optional() }).strict(),
19677
+ interfaces: z19.object({
19678
+ openai: z19.object({ enabled: z19.boolean(), modelName: z19.string().trim().min(1).optional() }).strict(),
19643
19679
  shortcutRef: EntityRefSchema.optional(),
19644
19680
  preferredAppId: ContractIdentifierSchema.optional()
19645
19681
  }).strict().superRefine((interfaces, context) => {
@@ -19656,101 +19692,110 @@ var WorkflowDefinitionSchema = z18.object({
19656
19692
  });
19657
19693
  if (definition.revision.kind === "release" && definition.metadata.version !== definition.revision.recordVersion) context.addIssue({ code: "custom", path: ["revision", "recordVersion"], message: "Release recordVersion must equal metadata.version." });
19658
19694
  });
19695
+ var WorkflowEditorCommandSchema = z19.object({
19696
+ expectedRecordVersion: z19.number().int().positive(),
19697
+ requestId: z19.string().min(1).max(128),
19698
+ definition: WorkflowDefinitionSchema
19699
+ }).strict();
19700
+ var WorkflowEditorDocumentSchema = z19.object({
19701
+ recordVersion: z19.number().int().positive(),
19702
+ definition: WorkflowDefinitionSchema
19703
+ }).strict();
19659
19704
 
19660
19705
  // src/contracts/workflow-column.ts
19661
- import { z as z19 } from "zod";
19662
- var WorkflowColumnFieldRefSchema = z19.object({
19706
+ import { z as z20 } from "zod";
19707
+ var WorkflowColumnFieldRefSchema = z20.object({
19663
19708
  ontologyId: ContractIdentifierSchema,
19664
19709
  fieldKey: ContractIdentifierSchema
19665
19710
  }).strict();
19666
- var WorkflowColumnInputSchema = z19.discriminatedUnion("kind", [
19667
- z19.object({ kind: z19.literal("default") }).strict(),
19668
- z19.object({ kind: z19.literal("constant"), value: JsonValueSchema }).strict(),
19669
- z19.object({ kind: z19.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
19670
- z19.object({
19671
- kind: z19.literal("context"),
19672
- field: z19.enum(["assetId", "teamId", "ontologyId", "columnId"])
19711
+ var WorkflowColumnInputSchema = z20.discriminatedUnion("kind", [
19712
+ z20.object({ kind: z20.literal("default") }).strict(),
19713
+ z20.object({ kind: z20.literal("constant"), value: JsonValueSchema }).strict(),
19714
+ z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
19715
+ z20.object({
19716
+ kind: z20.literal("context"),
19717
+ field: z20.enum(["assetId", "teamId", "ontologyId", "columnId"])
19673
19718
  }).strict()
19674
19719
  ]);
19675
- var WorkflowColumnDependencySchema = z19.discriminatedUnion("kind", [
19676
- z19.object({ kind: z19.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
19677
- z19.object({
19678
- kind: z19.literal("relation"),
19720
+ var WorkflowColumnDependencySchema = z20.discriminatedUnion("kind", [
19721
+ z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
19722
+ z20.object({
19723
+ kind: z20.literal("relation"),
19679
19724
  relation: WorkflowColumnFieldRefSchema,
19680
- direction: z19.enum(["incoming", "outgoing"]),
19681
- fields: z19.array(WorkflowColumnFieldRefSchema).max(100)
19725
+ direction: z20.enum(["incoming", "outgoing"]),
19726
+ fields: z20.array(WorkflowColumnFieldRefSchema).max(100)
19682
19727
  }).strict()
19683
19728
  ]);
19684
- var WorkflowColumnOutputPathSchema = z19.array(z19.string().min(1).max(256)).max(20);
19685
- var WorkflowColumnOutputSchema = z19.object({
19686
- type: z19.enum(["number", "text", "json"]),
19729
+ var WorkflowColumnOutputPathSchema = z20.array(z20.string().min(1).max(256)).max(20);
19730
+ var WorkflowColumnOutputSchema = z20.object({
19731
+ type: z20.enum(["number", "text", "json"]),
19687
19732
  path: WorkflowColumnOutputPathSchema,
19688
- nullable: z19.boolean().default(false)
19733
+ nullable: z20.boolean().default(false)
19689
19734
  }).strict();
19690
- var WorkflowColumnBindingSchema = z19.object({
19691
- contract: z19.literal("WorkflowColumnBinding"),
19692
- version: z19.literal(1),
19693
- enabled: z19.boolean(),
19694
- paused: z19.boolean().default(false),
19695
- workflow: z19.object({
19735
+ var WorkflowColumnBindingSchema = z20.object({
19736
+ contract: z20.literal("WorkflowColumnBinding"),
19737
+ version: z20.literal(1),
19738
+ enabled: z20.boolean(),
19739
+ paused: z20.boolean().default(false),
19740
+ workflow: z20.object({
19696
19741
  id: ContractIdentifierSchema,
19697
- version: z19.number().int().positive(),
19742
+ version: z20.number().int().positive(),
19698
19743
  inputSchemaHash: Sha256Schema
19699
19744
  }).strict(),
19700
- inputs: z19.record(z19.string().min(1).max(128), WorkflowColumnInputSchema),
19701
- dependencies: z19.array(WorkflowColumnDependencySchema).max(100).default([]),
19745
+ inputs: z20.record(z20.string().min(1).max(128), WorkflowColumnInputSchema),
19746
+ dependencies: z20.array(WorkflowColumnDependencySchema).max(100).default([]),
19702
19747
  output: WorkflowColumnOutputSchema,
19703
- policy: z19.object({
19704
- debounceMs: z19.number().int().min(0).max(3e4).default(5e3),
19705
- maxDelayMs: z19.number().int().min(0).max(3e4).default(3e4),
19706
- concurrency: z19.number().int().min(1).max(32).default(2),
19748
+ policy: z20.object({
19749
+ debounceMs: z20.number().int().min(0).max(3e4).default(5e3),
19750
+ maxDelayMs: z20.number().int().min(0).max(3e4).default(3e4),
19751
+ concurrency: z20.number().int().min(1).max(32).default(2),
19707
19752
  // Indexed queries need visible projections of their declared sources before execution.
19708
- requireSearchProjection: z19.boolean().optional()
19753
+ requireSearchProjection: z20.boolean().optional()
19709
19754
  }).strict().default({ debounceMs: 5e3, maxDelayMs: 3e4, concurrency: 2 }),
19710
19755
  // The workflow supplies an ISO datetime with offset for one future expiry.
19711
19756
  // Scheduling infrastructure needs no knowledge of months or business periods.
19712
- expiry: z19.object({ path: WorkflowColumnOutputPathSchema }).strict().optional()
19757
+ expiry: z20.object({ path: WorkflowColumnOutputPathSchema }).strict().optional()
19713
19758
  }).strict();
19714
19759
 
19715
19760
  // src/contracts/component-assembly.ts
19716
- import { z as z20 } from "zod";
19717
- var member = z20.string().min(1).max(256).refine(
19761
+ import { z as z21 } from "zod";
19762
+ var member = z21.string().min(1).max(256).refine(
19718
19763
  (value) => !["__proto__", "prototype", "constructor"].includes(value),
19719
19764
  "Unsafe component member."
19720
19765
  );
19721
- var ComponentEventArgumentSchema = z20.object({
19722
- argument: z20.number().int().min(0).max(31),
19723
- path: z20.array(member).max(16).default([])
19766
+ var ComponentEventArgumentSchema = z21.object({
19767
+ argument: z21.number().int().min(0).max(31),
19768
+ path: z21.array(member).max(16).default([])
19724
19769
  }).strict();
19725
- var ComponentEventBindingSchema = z20.object({
19770
+ var ComponentEventBindingSchema = z21.object({
19726
19771
  port: ContractIdentifierSchema,
19727
- arguments: z20.array(ComponentEventArgumentSchema).max(32).default([]),
19728
- preventDefault: z20.boolean().default(false),
19729
- stopPropagation: z20.boolean().default(false)
19772
+ arguments: z21.array(ComponentEventArgumentSchema).max(32).default([]),
19773
+ preventDefault: z21.boolean().default(false),
19774
+ stopPropagation: z21.boolean().default(false)
19730
19775
  }).strict();
19731
- var ComponentMessageSchema = z20.union([
19776
+ var ComponentMessageSchema = z21.union([
19732
19777
  ContractIdentifierSchema,
19733
- z20.object({ textI18n: I18nTextSchema }).strict(),
19734
- z20.object({ key: ContractIdentifierSchema, values: z20.record(member, z20.union([z20.string(), z20.number().finite(), z20.boolean()])).default({}) }).strict()
19778
+ z21.object({ textI18n: I18nTextSchema }).strict(),
19779
+ z21.object({ key: ContractIdentifierSchema, values: z21.record(member, z21.union([z21.string(), z21.number().finite(), z21.boolean()])).default({}) }).strict()
19735
19780
  ]);
19736
- var ComponentMessageBindingSchema = z20.object({
19737
- path: z20.array(z20.union([
19781
+ var ComponentMessageBindingSchema = z21.object({
19782
+ path: z21.array(z21.union([
19738
19783
  member.refine((value) => !/[\u0000-\u001f\u007f-\u009f]/.test(value), "Invalid component path member."),
19739
- z20.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
19784
+ z21.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
19740
19785
  ])).min(1).max(16),
19741
19786
  message: ComponentMessageSchema
19742
19787
  }).strict();
19743
- var ComponentAssemblySchema = z20.object({
19744
- contract: z20.literal("ComponentAssembly"),
19745
- schemaVersion: z20.literal(1),
19788
+ var ComponentAssemblySchema = z21.object({
19789
+ contract: z21.literal("ComponentAssembly"),
19790
+ schemaVersion: z21.literal(1),
19746
19791
  props: JsonObjectSchema.default({}),
19747
- events: z20.record(member, ComponentEventBindingSchema).default({}),
19792
+ events: z21.record(member, ComponentEventBindingSchema).default({}),
19748
19793
  // Each name remains an explicit RenderTree slot; array order controls composition.
19749
- slots: z20.record(member, z20.union([ContractIdentifierSchema, z20.array(ContractIdentifierSchema).min(1).max(256).refine((names) => new Set(names).size === names.length, "Component slot names must be unique.")])).default({}),
19750
- renderers: z20.record(member, ContractIdentifierSchema).default({}),
19751
- hosts: z20.record(member, ContractIdentifierSchema).default({}),
19752
- messages: z20.record(member, ComponentMessageSchema).default({}),
19753
- messageBindings: z20.array(ComponentMessageBindingSchema).max(256).optional()
19794
+ slots: z21.record(member, z21.union([ContractIdentifierSchema, z21.array(ContractIdentifierSchema).min(1).max(256).refine((names) => new Set(names).size === names.length, "Component slot names must be unique.")])).default({}),
19795
+ renderers: z21.record(member, ContractIdentifierSchema).default({}),
19796
+ hosts: z21.record(member, ContractIdentifierSchema).default({}),
19797
+ messages: z21.record(member, ComponentMessageSchema).default({}),
19798
+ messageBindings: z21.array(ComponentMessageBindingSchema).max(256).optional()
19754
19799
  }).strict().superRefine((value, context) => {
19755
19800
  const paths = value.messageBindings?.map((binding) => binding.path) ?? [];
19756
19801
  for (const [index, path] of paths.entries()) {
@@ -19770,32 +19815,32 @@ var ComponentAssemblySchema = z20.object({
19770
19815
  });
19771
19816
 
19772
19817
  // src/contracts/record-editor-draft.ts
19773
- import { z as z21 } from "zod";
19774
- var member2 = z21.string().min(1).max(256).refine((value) => !["__proto__", "prototype", "constructor"].includes(value), "Unsafe editor path.");
19775
- var RecordEditorPathSchema = z21.array(z21.union([member2, z21.object({ itemId: z21.string().min(1).max(256), idKey: member2.default("id") }).strict()])).max(32);
19776
- var RecordEditorFieldErrorSchema = z21.object({ path: RecordEditorPathSchema, code: z21.string().min(1).max(256) }).strict();
19777
- var RecordEditorDraftSchema = z21.object({
19778
- revision: z21.string().min(1).max(256),
19818
+ import { z as z22 } from "zod";
19819
+ var member2 = z22.string().min(1).max(256).refine((value) => !["__proto__", "prototype", "constructor"].includes(value), "Unsafe editor path.");
19820
+ var RecordEditorPathSchema = z22.array(z22.union([member2, z22.object({ itemId: z22.string().min(1).max(256), idKey: member2.default("id") }).strict()])).max(32);
19821
+ var RecordEditorFieldErrorSchema = z22.object({ path: RecordEditorPathSchema, code: z22.string().min(1).max(256) }).strict();
19822
+ var RecordEditorDraftSchema = z22.object({
19823
+ revision: z22.string().min(1).max(256),
19779
19824
  original: JsonObjectSchema,
19780
19825
  value: JsonObjectSchema,
19781
- touched: z21.array(RecordEditorPathSchema).max(4096),
19782
- errors: z21.array(RecordEditorFieldErrorSchema).max(4096)
19826
+ touched: z22.array(RecordEditorPathSchema).max(4096),
19827
+ errors: z22.array(RecordEditorFieldErrorSchema).max(4096)
19783
19828
  }).strict();
19784
- var RecordEditorDraftOperationSchema = z21.discriminatedUnion("kind", [
19785
- z21.object({ kind: z21.literal("set"), path: RecordEditorPathSchema, value: JsonValueSchema }).strict(),
19786
- z21.object({ kind: z21.literal("touch"), path: RecordEditorPathSchema }).strict(),
19787
- z21.object({ kind: z21.literal("reset"), revision: z21.string().min(1).max(256), value: JsonObjectSchema }).strict(),
19788
- z21.object({ kind: z21.literal("insert"), path: RecordEditorPathSchema, idKey: member2.default("id"), value: JsonObjectSchema, beforeId: z21.string().min(1).optional() }).strict(),
19789
- z21.object({ kind: z21.literal("remove"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z21.string().min(1) }).strict(),
19790
- z21.object({ kind: z21.literal("move"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z21.string().min(1), beforeId: z21.string().min(1).optional() }).strict()
19829
+ var RecordEditorDraftOperationSchema = z22.discriminatedUnion("kind", [
19830
+ z22.object({ kind: z22.literal("set"), path: RecordEditorPathSchema, value: JsonValueSchema }).strict(),
19831
+ z22.object({ kind: z22.literal("touch"), path: RecordEditorPathSchema }).strict(),
19832
+ z22.object({ kind: z22.literal("reset"), revision: z22.string().min(1).max(256), value: JsonObjectSchema }).strict(),
19833
+ z22.object({ kind: z22.literal("insert"), path: RecordEditorPathSchema, idKey: member2.default("id"), value: JsonObjectSchema, beforeId: z22.string().min(1).optional() }).strict(),
19834
+ z22.object({ kind: z22.literal("remove"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z22.string().min(1) }).strict(),
19835
+ z22.object({ kind: z22.literal("move"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z22.string().min(1), beforeId: z22.string().min(1).optional() }).strict()
19791
19836
  ]);
19792
- var RecordEditorValidationDetailsSchema = z21.object({
19793
- contract: z21.literal("RecordEditorValidation"),
19794
- schemaVersion: z21.literal(1),
19795
- errors: z21.array(RecordEditorFieldErrorSchema).min(1).max(256)
19837
+ var RecordEditorValidationDetailsSchema = z22.object({
19838
+ contract: z22.literal("RecordEditorValidation"),
19839
+ schemaVersion: z22.literal(1),
19840
+ errors: z22.array(RecordEditorFieldErrorSchema).min(1).max(256)
19796
19841
  }).strict();
19797
- var RecordEditorSubmissionSnapshotSchema = z21.object({
19798
- revision: z21.string().min(1).max(256),
19842
+ var RecordEditorSubmissionSnapshotSchema = z22.object({
19843
+ revision: z22.string().min(1).max(256),
19799
19844
  value: JsonObjectSchema
19800
19845
  }).strict();
19801
19846
 
@@ -19895,7 +19940,9 @@ export {
19895
19940
  PageExpressionRootSchema,
19896
19941
  PageOperatorSchema,
19897
19942
  PAGE_EXPRESSION_LIMITS,
19943
+ PAGE_EXPRESSION_VALUE_LIMITS,
19898
19944
  assertPageValueBudget,
19945
+ assertPageExpressionValueBudget,
19899
19946
  PageExpressionSchema,
19900
19947
  PagePropertyBindingSchema,
19901
19948
  visitPageExpression,
@@ -20277,6 +20324,8 @@ export {
20277
20324
  DeclarativeRuntimeRolloutCapabilitySchema,
20278
20325
  TenantProductConfigSchema,
20279
20326
  TenantRuntimeConfigSchema,
20327
+ WorkflowCanvasElementSchema,
20328
+ WorkflowCanvasSchema,
20280
20329
  ConductorTaskTypeSchema,
20281
20330
  ConductorTaskDefinitionSchema,
20282
20331
  ConductorWorkflowDefinitionSchema,
@@ -20288,6 +20337,8 @@ export {
20288
20337
  WorkflowTriggerSchema,
20289
20338
  WorkflowValidationIssueSchema,
20290
20339
  WorkflowDefinitionSchema,
20340
+ WorkflowEditorCommandSchema,
20341
+ WorkflowEditorDocumentSchema,
20291
20342
  WorkflowColumnFieldRefSchema,
20292
20343
  WorkflowColumnInputSchema,
20293
20344
  WorkflowColumnDependencySchema,
@@ -20306,4 +20357,4 @@ export {
20306
20357
  RecordEditorValidationDetailsSchema,
20307
20358
  RecordEditorSubmissionSnapshotSchema
20308
20359
  };
20309
- //# sourceMappingURL=chunk-BQ77E4VU.mjs.map
20360
+ //# sourceMappingURL=chunk-L5CYU6K4.mjs.map