@inf-monkeys-tech/monkeys 1.0.45 → 1.0.47

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 (47) hide show
  1. package/lib/contracts/access.d.ts +60 -0
  2. package/lib/contracts/access.d.ts.map +1 -0
  3. package/lib/contracts/access.js +47 -0
  4. package/lib/contracts/access.js.map +1 -0
  5. package/lib/contracts/index.d.ts +1 -0
  6. package/lib/contracts/index.d.ts.map +1 -1
  7. package/lib/contracts/index.js +1 -0
  8. package/lib/contracts/index.js.map +1 -1
  9. package/lib/contracts/menu.d.ts +1 -1
  10. package/lib/contracts/page.d.ts +3 -3
  11. package/lib/contracts/render.d.ts +4 -4
  12. package/lib/contracts/semantic.d.ts +1 -1
  13. package/lib/contracts/tenant.d.ts +80 -5
  14. package/lib/contracts/tenant.d.ts.map +1 -1
  15. package/lib/contracts/tenant.js +10 -0
  16. package/lib/contracts/tenant.js.map +1 -1
  17. package/lib/esm/contracts/index.mjs +1445 -1399
  18. package/lib/esm/contracts/index.mjs.map +1 -1
  19. package/lib/esm/index.mjs +1503 -1401
  20. package/lib/esm/index.mjs.map +1 -1
  21. package/lib/esm/runtime/index.mjs +100 -2
  22. package/lib/esm/runtime/index.mjs.map +1 -1
  23. package/lib/esm/schemas/index.mjs +1445 -1399
  24. package/lib/esm/schemas/index.mjs.map +1 -1
  25. package/lib/index.d.ts +1 -0
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +3 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/json-schema/tenant-product-config.schema.json +58 -0
  30. package/lib/json-schema/tenant-runtime-config.schema.json +58 -0
  31. package/lib/runtime/access-compiler.d.ts +10 -0
  32. package/lib/runtime/access-compiler.d.ts.map +1 -0
  33. package/lib/runtime/access-compiler.js +63 -0
  34. package/lib/runtime/access-compiler.js.map +1 -0
  35. package/lib/runtime/index.d.ts +1 -0
  36. package/lib/runtime/index.d.ts.map +1 -1
  37. package/lib/runtime/index.js +1 -0
  38. package/lib/runtime/index.js.map +1 -1
  39. package/lib/runtime/menu-compiler.d.ts +0 -1
  40. package/lib/runtime/menu-compiler.d.ts.map +1 -1
  41. package/lib/runtime/menu-compiler.js +1 -2
  42. package/lib/runtime/menu-compiler.js.map +1 -1
  43. package/lib/schemas/index.d.ts +59 -8
  44. package/lib/schemas/index.d.ts.map +1 -1
  45. package/lib/schemas/index.js +10 -5
  46. package/lib/schemas/index.js.map +1 -1
  47. package/package.json +1 -1
@@ -6563,7 +6563,7 @@ var require_ajv = __commonJS({
6563
6563
  }
6564
6564
  });
6565
6565
 
6566
- // src/contracts/artifact.ts
6566
+ // src/contracts/access.ts
6567
6567
  import { z as z2 } from "zod";
6568
6568
 
6569
6569
  // src/contracts/common.ts
@@ -6604,59 +6604,94 @@ var EntityRefSchema = z.object({
6604
6604
  ownerRepo: ContractIdentifierSchema.optional()
6605
6605
  }).strict();
6606
6606
 
6607
+ // src/contracts/access.ts
6608
+ var PermissionDefinitionSchema = z2.object({
6609
+ code: ContractIdentifierSchema,
6610
+ name: LocalizedTextSchema,
6611
+ description: LocalizedTextSchema.optional(),
6612
+ resource: ContractIdentifierSchema,
6613
+ action: ContractIdentifierSchema,
6614
+ domain: ContractIdentifierSchema.optional()
6615
+ }).strict();
6616
+ var PermissionBundleSchema = z2.object({
6617
+ bundleId: ContractIdentifierSchema,
6618
+ name: LocalizedTextSchema,
6619
+ permissionCodes: z2.array(ContractIdentifierSchema).default([])
6620
+ }).strict();
6621
+ var SystemGroupDefinitionSchema = z2.object({
6622
+ groupCode: ContractIdentifierSchema,
6623
+ name: LocalizedTextSchema,
6624
+ description: LocalizedTextSchema.optional(),
6625
+ permissionPolicy: z2.enum(["bundles", "studio_current", "all_current"]).default("bundles"),
6626
+ permissionBundleIds: z2.array(ContractIdentifierSchema).default([])
6627
+ }).strict().refine((value) => value.permissionPolicy !== "bundles" || value.permissionBundleIds.length > 0, {
6628
+ message: "A bundles permission policy requires at least one permission bundle.",
6629
+ path: ["permissionBundleIds"]
6630
+ });
6631
+ var ProductAccessDeclarationSchema = z2.object({
6632
+ contract: z2.literal("ProductAccessDeclaration"),
6633
+ declarationId: ContractIdentifierSchema,
6634
+ version: ContractVersionSchema,
6635
+ ownerRepo: ContractIdentifierSchema,
6636
+ permissions: z2.array(PermissionDefinitionSchema).default([]),
6637
+ permissionBundles: z2.array(PermissionBundleSchema).default([]),
6638
+ systemGroups: z2.array(SystemGroupDefinitionSchema).min(1)
6639
+ }).strict();
6640
+
6607
6641
  // src/contracts/artifact.ts
6608
- var StorageLocatorSchema = z2.object({
6642
+ import { z as z3 } from "zod";
6643
+ var StorageLocatorSchema = z3.object({
6609
6644
  provider: ContractIdentifierSchema,
6610
6645
  bucket: ContractIdentifierSchema.optional(),
6611
6646
  key: ContractIdentifierSchema,
6612
6647
  region: ContractIdentifierSchema.optional(),
6613
- url: z2.string().url().optional(),
6648
+ url: z3.string().url().optional(),
6614
6649
  expiresAt: IsoDateTimeSchema.optional()
6615
6650
  }).strict();
6616
- var ArtifactAccessSchema = z2.object({
6651
+ var ArtifactAccessSchema = z3.object({
6617
6652
  tenantId: ContractIdentifierSchema.optional(),
6618
6653
  teamId: ContractIdentifierSchema.optional(),
6619
6654
  ownerRef: EntityRefSchema.optional(),
6620
- visibility: z2.enum(["private", "team", "tenant", "public"])
6655
+ visibility: z3.enum(["private", "team", "tenant", "public"])
6621
6656
  }).strict();
6622
- var ArtifactManifestSchema = z2.object({
6623
- contract: z2.literal("ArtifactManifest"),
6657
+ var ArtifactManifestSchema = z3.object({
6658
+ contract: z3.literal("ArtifactManifest"),
6624
6659
  artifactId: ContractIdentifierSchema,
6625
6660
  kind: ContractIdentifierSchema,
6626
- mimeType: z2.string().trim().min(1),
6627
- byteSize: z2.number().int().nonnegative().optional(),
6661
+ mimeType: z3.string().trim().min(1),
6662
+ byteSize: z3.number().int().nonnegative().optional(),
6628
6663
  sha256: Sha256Schema,
6629
6664
  storage: StorageLocatorSchema,
6630
6665
  sourceRef: EntityRefSchema.optional(),
6631
6666
  runRef: EntityRefSchema,
6632
6667
  outputRef: EntityRefSchema,
6633
- producer: z2.object({
6668
+ producer: z3.object({
6634
6669
  service: ContractIdentifierSchema,
6635
6670
  version: ContractIdentifierSchema,
6636
6671
  capabilityRef: EntityRefSchema.optional()
6637
6672
  }).strict(),
6638
6673
  access: ArtifactAccessSchema,
6639
- metadata: z2.record(z2.string(), JsonValueSchema).default({}),
6674
+ metadata: z3.record(z3.string(), JsonValueSchema).default({}),
6640
6675
  createdAt: IsoDateTimeSchema
6641
6676
  }).strict();
6642
- var OutputRecordSchema = z2.object({
6643
- contract: z2.literal("OutputRecord"),
6677
+ var OutputRecordSchema = z3.object({
6678
+ contract: z3.literal("OutputRecord"),
6644
6679
  outputId: ContractIdentifierSchema,
6645
6680
  runRef: EntityRefSchema,
6646
6681
  outputPort: ContractIdentifierSchema,
6647
6682
  value: JsonValueSchema.optional(),
6648
- artifactRefs: z2.array(EntityRefSchema).default([]),
6683
+ artifactRefs: z3.array(EntityRefSchema).default([]),
6649
6684
  schemaRef: ContractIdentifierSchema.optional(),
6650
6685
  createdAt: IsoDateTimeSchema
6651
6686
  }).strict();
6652
6687
 
6653
6688
  // src/contracts/capability.ts
6654
- import { z as z4 } from "zod";
6689
+ import { z as z5 } from "zod";
6655
6690
 
6656
6691
  // src/contracts/render.ts
6657
- import { z as z3 } from "zod";
6658
- var ProductContextSchema = z3.enum(["studio", "kernel", "compute"]);
6659
- var RenderNodeStateSchema = z3.enum([
6692
+ import { z as z4 } from "zod";
6693
+ var ProductContextSchema = z4.enum(["studio", "kernel", "compute"]);
6694
+ var RenderNodeStateSchema = z4.enum([
6660
6695
  "idle",
6661
6696
  "loading",
6662
6697
  "empty",
@@ -6665,7 +6700,7 @@ var RenderNodeStateSchema = z3.enum([
6665
6700
  "disabled",
6666
6701
  "selected"
6667
6702
  ]);
6668
- var RenderNodeKindSchema = z3.enum([
6703
+ var RenderNodeKindSchema = z4.enum([
6669
6704
  "shell",
6670
6705
  "page",
6671
6706
  "navigation",
@@ -6677,16 +6712,16 @@ var RenderNodeKindSchema = z3.enum([
6677
6712
  "overlay",
6678
6713
  "professional-provider"
6679
6714
  ]);
6680
- var RenderSurfaceSchema = z3.object({
6681
- frameOwner: z3.enum(["host", "provider", "none"]),
6715
+ var RenderSurfaceSchema = z4.object({
6716
+ frameOwner: z4.enum(["host", "provider", "none"]),
6682
6717
  tone: ContractIdentifierSchema.optional(),
6683
- density: z3.enum(["compact", "default", "comfortable"])
6718
+ density: z4.enum(["compact", "default", "comfortable"])
6684
6719
  }).strict();
6685
- var RenderScrollSchema = z3.object({
6686
- owner: z3.enum(["page", "surface", "provider"]),
6687
- axis: z3.enum(["x", "y", "both", "none"]),
6720
+ var RenderScrollSchema = z4.object({
6721
+ owner: z4.enum(["page", "surface", "provider"]),
6722
+ axis: z4.enum(["x", "y", "both", "none"]),
6688
6723
  restoreKey: ContractIdentifierSchema.optional(),
6689
- virtualizationBoundary: z3.boolean()
6724
+ virtualizationBoundary: z4.boolean()
6690
6725
  }).strict().superRefine((scroll, context) => {
6691
6726
  if (scroll.owner === "provider" && scroll.restoreKey) {
6692
6727
  context.addIssue({
@@ -6703,11 +6738,11 @@ var RenderScrollSchema = z3.object({
6703
6738
  });
6704
6739
  }
6705
6740
  });
6706
- var RenderActivationSchema = z3.object({
6741
+ var RenderActivationSchema = z4.object({
6707
6742
  activationId: ContractIdentifierSchema,
6708
- mode: z3.enum(["navigate", "select", "drawer", "modal", "fullscreen", "inline"]),
6709
- targetPath: z3.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.").optional(),
6710
- history: z3.enum(["push", "replace"]).optional()
6743
+ mode: z4.enum(["navigate", "select", "drawer", "modal", "fullscreen", "inline"]),
6744
+ targetPath: z4.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.").optional(),
6745
+ history: z4.enum(["push", "replace"]).optional()
6711
6746
  }).strict().superRefine((activation, context) => {
6712
6747
  if (activation.mode === "navigate" && !activation.targetPath) {
6713
6748
  context.addIssue({ code: "custom", path: ["targetPath"], message: "Navigate activation requires an application-relative targetPath." });
@@ -6716,19 +6751,19 @@ var RenderActivationSchema = z3.object({
6716
6751
  context.addIssue({ code: "custom", path: ["targetPath"], message: "Only navigate activation may declare targetPath." });
6717
6752
  }
6718
6753
  });
6719
- var RenderLifecycleSchema = z3.object({
6720
- mountPolicy: z3.enum(["always", "when-visible", "when-active"]),
6721
- queryPolicy: z3.enum(["always", "when-visible", "when-active", "manual"]),
6722
- retainOnDeactivate: z3.boolean(),
6723
- deepLink: z3.boolean(),
6724
- focusReturn: z3.boolean()
6725
- }).strict();
6726
- var RenderLayoutSchema = z3.object({
6727
- mode: z3.enum(["contents", "block", "flex", "grid", "absolute"]),
6728
- direction: z3.enum(["row", "column"]).optional(),
6729
- columns: z3.number().int().positive().optional(),
6730
- align: z3.enum(["start", "center", "end", "stretch"]).optional(),
6731
- justify: z3.enum(["start", "center", "end", "between", "around"]).optional(),
6754
+ var RenderLifecycleSchema = z4.object({
6755
+ mountPolicy: z4.enum(["always", "when-visible", "when-active"]),
6756
+ queryPolicy: z4.enum(["always", "when-visible", "when-active", "manual"]),
6757
+ retainOnDeactivate: z4.boolean(),
6758
+ deepLink: z4.boolean(),
6759
+ focusReturn: z4.boolean()
6760
+ }).strict();
6761
+ var RenderLayoutSchema = z4.object({
6762
+ mode: z4.enum(["contents", "block", "flex", "grid", "absolute"]),
6763
+ direction: z4.enum(["row", "column"]).optional(),
6764
+ columns: z4.number().int().positive().optional(),
6765
+ align: z4.enum(["start", "center", "end", "stretch"]).optional(),
6766
+ justify: z4.enum(["start", "center", "end", "between", "around"]).optional(),
6732
6767
  gapTokenRef: EntityRefSchema.optional()
6733
6768
  }).strict().superRefine((layout, context) => {
6734
6769
  if (layout.direction && layout.mode !== "flex") {
@@ -6741,9 +6776,9 @@ var RenderLayoutSchema = z3.object({
6741
6776
  context.addIssue({ code: "custom", path: ["gapTokenRef", "kind"], message: "gapTokenRef must reference design-token." });
6742
6777
  }
6743
6778
  });
6744
- var RenderResponsiveRuleSchema = z3.object({
6745
- minWidthPx: z3.number().nonnegative().optional(),
6746
- maxWidthPx: z3.number().positive().optional(),
6779
+ var RenderResponsiveRuleSchema = z4.object({
6780
+ minWidthPx: z4.number().nonnegative().optional(),
6781
+ maxWidthPx: z4.number().positive().optional(),
6747
6782
  layout: RenderLayoutSchema
6748
6783
  }).strict().superRefine((rule, context) => {
6749
6784
  if (rule.minWidthPx === void 0 && rule.maxWidthPx === void 0) {
@@ -6781,14 +6816,14 @@ var requirePinnedOwnedRef = (reference, expectedKind, path, context) => {
6781
6816
  });
6782
6817
  }
6783
6818
  };
6784
- var RenderNodeSchema = z3.object({
6785
- contract: z3.literal("RenderNode"),
6819
+ var RenderNodeSchema = z4.object({
6820
+ contract: z4.literal("RenderNode"),
6786
6821
  nodeId: ContractIdentifierSchema,
6787
6822
  kind: RenderNodeKindSchema,
6788
6823
  version: ContractVersionSchema,
6789
6824
  ownerRepo: ContractIdentifierSchema,
6790
6825
  parentNodeId: ContractIdentifierSchema.optional(),
6791
- children: z3.array(ContractIdentifierSchema),
6826
+ children: z4.array(ContractIdentifierSchema),
6792
6827
  slot: ContractIdentifierSchema.optional(),
6793
6828
  pageRef: EntityRefSchema,
6794
6829
  semanticRef: EntityRefSchema.optional(),
@@ -6801,7 +6836,7 @@ var RenderNodeSchema = z3.object({
6801
6836
  activation: RenderActivationSchema,
6802
6837
  lifecycle: RenderLifecycleSchema,
6803
6838
  layout: RenderLayoutSchema,
6804
- responsive: z3.array(RenderResponsiveRuleSchema),
6839
+ responsive: z4.array(RenderResponsiveRuleSchema),
6805
6840
  accessRef: EntityRefSchema.optional(),
6806
6841
  evidenceRef: EntityRefSchema.optional(),
6807
6842
  state: RenderNodeStateSchema,
@@ -6833,39 +6868,39 @@ var RenderNodeSchema = z3.object({
6833
6868
  });
6834
6869
  }
6835
6870
  });
6836
- var RenderTreeSchema = z3.object({
6837
- contract: z3.literal("RenderTree"),
6871
+ var RenderTreeSchema = z4.object({
6872
+ contract: z4.literal("RenderTree"),
6838
6873
  treeId: ContractIdentifierSchema,
6839
6874
  product: ProductContextSchema,
6840
6875
  rootNodeId: ContractIdentifierSchema,
6841
- nodes: z3.array(RenderNodeSchema).min(1)
6876
+ nodes: z4.array(RenderNodeSchema).min(1)
6842
6877
  }).strict();
6843
- var OverlayZIndexLaneSchema = z3.enum([
6878
+ var OverlayZIndexLaneSchema = z4.enum([
6844
6879
  "popover",
6845
6880
  "drawer",
6846
6881
  "modal",
6847
6882
  "fullscreen",
6848
6883
  "system"
6849
6884
  ]);
6850
- var OverlayNodeSchema = z3.object({
6851
- contract: z3.literal("OverlayNode"),
6885
+ var OverlayNodeSchema = z4.object({
6886
+ contract: z4.literal("OverlayNode"),
6852
6887
  overlayId: ContractIdentifierSchema,
6853
6888
  renderNode: RenderNodeSchema,
6854
- presentation: z3.enum(["drawer", "modal", "fullscreen"]),
6889
+ presentation: z4.enum(["drawer", "modal", "fullscreen"]),
6855
6890
  zIndexLane: OverlayZIndexLaneSchema,
6856
- url: z3.object({
6891
+ url: z4.object({
6857
6892
  parameter: ContractIdentifierSchema,
6858
6893
  value: ContractIdentifierSchema,
6859
- openMode: z3.enum(["push", "replace"]),
6860
- closeMode: z3.enum(["back", "replace"])
6894
+ openMode: z4.enum(["push", "replace"]),
6895
+ closeMode: z4.enum(["back", "replace"])
6861
6896
  }).strict(),
6862
- focus: z3.object({
6863
- initial: z3.enum(["first-interactive", "container", "explicit"]),
6864
- trap: z3.boolean()
6897
+ focus: z4.object({
6898
+ initial: z4.enum(["first-interactive", "container", "explicit"]),
6899
+ trap: z4.boolean()
6865
6900
  }).strict(),
6866
- close: z3.object({
6867
- escape: z3.boolean(),
6868
- backdrop: z3.boolean()
6901
+ close: z4.object({
6902
+ escape: z4.boolean(),
6903
+ backdrop: z4.boolean()
6869
6904
  }).strict()
6870
6905
  }).strict().superRefine((value, context) => {
6871
6906
  if (value.renderNode.kind !== "overlay") {
@@ -6904,8 +6939,8 @@ var OverlayNodeSchema = z3.object({
6904
6939
  });
6905
6940
  }
6906
6941
  });
6907
- var ProductPathSchema = z3.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.");
6908
- var ApplicationHandoffEndpointSchema = z3.object({
6942
+ var ProductPathSchema = z4.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.");
6943
+ var ApplicationHandoffEndpointSchema = z4.object({
6909
6944
  product: ProductContextSchema,
6910
6945
  pageId: ContractIdentifierSchema,
6911
6946
  viewId: ContractIdentifierSchema.optional(),
@@ -6914,8 +6949,8 @@ var ApplicationHandoffEndpointSchema = z3.object({
6914
6949
  activationId: ContractIdentifierSchema.optional(),
6915
6950
  path: ProductPathSchema
6916
6951
  }).strict();
6917
- var ApplicationHandoffSchema = z3.object({
6918
- contract: z3.literal("ApplicationHandoff"),
6952
+ var ApplicationHandoffSchema = z4.object({
6953
+ contract: z4.literal("ApplicationHandoff"),
6919
6954
  handoffId: ContractIdentifierSchema,
6920
6955
  source: ApplicationHandoffEndpointSchema,
6921
6956
  target: ApplicationHandoffEndpointSchema,
@@ -6931,8 +6966,8 @@ var ApplicationHandoffSchema = z3.object({
6931
6966
  });
6932
6967
  }
6933
6968
  });
6934
- var ViewProviderDescriptorSchema = z3.object({
6935
- contract: z3.literal("ViewProviderDescriptor"),
6969
+ var ViewProviderDescriptorSchema = z4.object({
6970
+ contract: z4.literal("ViewProviderDescriptor"),
6936
6971
  providerId: ContractIdentifierSchema,
6937
6972
  providerVersion: ContractIdentifierSchema,
6938
6973
  ownerRepo: ContractIdentifierSchema,
@@ -6940,22 +6975,22 @@ var ViewProviderDescriptorSchema = z3.object({
6940
6975
  rendererKey: ContractIdentifierSchema,
6941
6976
  renderModelSchemaRef: ContractIdentifierSchema,
6942
6977
  intentSchemaRef: ContractIdentifierSchema.optional(),
6943
- loading: z3.enum(["eager", "lazy", "viewport", "on-activation"]),
6944
- stateOwner: z3.enum(["host", "provider", "external"]),
6945
- supportedPageTypes: z3.array(ContractIdentifierSchema).min(1),
6946
- supportedSurfaces: z3.array(z3.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"])).min(1),
6947
- frameOwner: z3.enum(["host", "provider", "none"]),
6948
- sideEffects: z3.array(z3.enum(["network", "storage", "navigation", "worker", "websocket"])),
6978
+ loading: z4.enum(["eager", "lazy", "viewport", "on-activation"]),
6979
+ stateOwner: z4.enum(["host", "provider", "external"]),
6980
+ supportedPageTypes: z4.array(ContractIdentifierSchema).min(1),
6981
+ supportedSurfaces: z4.array(z4.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"])).min(1),
6982
+ frameOwner: z4.enum(["host", "provider", "none"]),
6983
+ sideEffects: z4.array(z4.enum(["network", "storage", "navigation", "worker", "websocket"])),
6949
6984
  sideEffectAdapterRef: EntityRefSchema.optional(),
6950
- lifecycle: z3.object({
6951
- preserveMount: z3.boolean(),
6952
- preserveScroll: z3.boolean(),
6985
+ lifecycle: z4.object({
6986
+ preserveMount: z4.boolean(),
6987
+ preserveScroll: z4.boolean(),
6953
6988
  focusModel: ContractIdentifierSchema
6954
6989
  }).strict(),
6955
- performance: z3.object({
6956
- lazy: z3.boolean(),
6957
- virtualized: z3.boolean(),
6958
- budgetMs: z3.number().positive().optional()
6990
+ performance: z4.object({
6991
+ lazy: z4.boolean(),
6992
+ virtualized: z4.boolean(),
6993
+ budgetMs: z4.number().positive().optional()
6959
6994
  }).strict(),
6960
6995
  accessRef: EntityRefSchema.optional(),
6961
6996
  evidenceRef: EntityRefSchema.optional()
@@ -6987,54 +7022,54 @@ var ViewProviderDescriptorSchema = z3.object({
6987
7022
  });
6988
7023
 
6989
7024
  // src/contracts/capability.ts
6990
- var ContractPortSchema = z4.object({
7025
+ var ContractPortSchema = z5.object({
6991
7026
  name: ContractIdentifierSchema,
6992
7027
  schemaRef: ContractIdentifierSchema,
6993
- required: z4.boolean().default(false),
6994
- multiple: z4.boolean().default(false),
6995
- description: z4.string().optional()
7028
+ required: z5.boolean().default(false),
7029
+ multiple: z5.boolean().default(false),
7030
+ description: z5.string().optional()
6996
7031
  }).strict();
6997
- var CapabilityProviderBindingSchema = z4.object({
7032
+ var CapabilityProviderBindingSchema = z5.object({
6998
7033
  providerRef: EntityRefSchema,
6999
- productContexts: z4.array(ProductContextSchema).default([]),
7000
- priority: z4.number().int().default(0)
7034
+ productContexts: z5.array(ProductContextSchema).default([]),
7035
+ priority: z5.number().int().default(0)
7001
7036
  }).strict();
7002
- var CapabilityManifestSchema = z4.object({
7003
- contract: z4.literal("CapabilityManifest"),
7037
+ var CapabilityManifestSchema = z5.object({
7038
+ contract: z5.literal("CapabilityManifest"),
7004
7039
  id: ContractIdentifierSchema,
7005
7040
  capabilityVersion: ContractIdentifierSchema,
7006
7041
  ownerRepo: ContractIdentifierSchema,
7007
- kind: z4.enum(["primitive", "composite", "view", "professional-provider", "tool", "workflow"]),
7008
- displayName: z4.string().trim().min(1),
7009
- description: z4.string().optional(),
7010
- ports: z4.object({
7011
- inputs: z4.array(ContractPortSchema).default([]),
7012
- outputs: z4.array(ContractPortSchema).default([])
7042
+ kind: z5.enum(["primitive", "composite", "view", "professional-provider", "tool", "workflow"]),
7043
+ displayName: z5.string().trim().min(1),
7044
+ description: z5.string().optional(),
7045
+ ports: z5.object({
7046
+ inputs: z5.array(ContractPortSchema).default([]),
7047
+ outputs: z5.array(ContractPortSchema).default([])
7013
7048
  }).strict(),
7014
- runtime: z4.object({
7015
- providerBindings: z4.array(CapabilityProviderBindingSchema).min(1),
7016
- loading: z4.enum(["eager", "lazy", "viewport", "on-activation"]),
7049
+ runtime: z5.object({
7050
+ providerBindings: z5.array(CapabilityProviderBindingSchema).min(1),
7051
+ loading: z5.enum(["eager", "lazy", "viewport", "on-activation"]),
7017
7052
  fallbackCapabilityRef: EntityRefSchema.optional(),
7018
- stateOwner: z4.enum(["host", "provider", "external"]),
7053
+ stateOwner: z5.enum(["host", "provider", "external"]),
7019
7054
  stateSchemaRef: ContractIdentifierSchema.optional(),
7020
- sideEffects: z4.array(z4.enum(["network", "storage", "navigation", "worker", "websocket"])).default([])
7055
+ sideEffects: z5.array(z5.enum(["network", "storage", "navigation", "worker", "websocket"])).default([])
7021
7056
  }).strict(),
7022
- placement: z4.object({
7023
- surfaces: z4.array(ContractIdentifierSchema).min(1),
7024
- slots: z4.array(ContractIdentifierSchema).default([]),
7025
- variants: z4.array(ContractIdentifierSchema).default([]),
7026
- tokenRefs: z4.array(ContractIdentifierSchema).default([])
7057
+ placement: z5.object({
7058
+ surfaces: z5.array(ContractIdentifierSchema).min(1),
7059
+ slots: z5.array(ContractIdentifierSchema).default([]),
7060
+ variants: z5.array(ContractIdentifierSchema).default([]),
7061
+ tokenRefs: z5.array(ContractIdentifierSchema).default([])
7027
7062
  }).strict(),
7028
- accessibility: z4.object({
7063
+ accessibility: z5.object({
7029
7064
  keyboardModel: ContractIdentifierSchema,
7030
7065
  focusModel: ContractIdentifierSchema,
7031
7066
  labelContract: ContractIdentifierSchema
7032
7067
  }).strict(),
7033
- observability: z4.object({
7068
+ observability: z5.object({
7034
7069
  eventNamespace: ContractIdentifierSchema,
7035
- metrics: z4.array(ContractIdentifierSchema).default([]),
7036
- evidenceRefs: z4.array(ContractIdentifierSchema).default([]),
7037
- performanceBudgetMs: z4.number().positive().optional()
7070
+ metrics: z5.array(ContractIdentifierSchema).default([]),
7071
+ evidenceRefs: z5.array(ContractIdentifierSchema).default([]),
7072
+ performanceBudgetMs: z5.number().positive().optional()
7038
7073
  }).strict()
7039
7074
  }).strict().superRefine((manifest, context) => {
7040
7075
  const providerIds = /* @__PURE__ */ new Set();
@@ -7056,25 +7091,25 @@ var CapabilityManifestSchema = z4.object({
7056
7091
  }
7057
7092
  });
7058
7093
  });
7059
- var CapabilitySourceTypeSchema = z4.enum([
7094
+ var CapabilitySourceTypeSchema = z5.enum([
7060
7095
  "tool-manifest",
7061
7096
  "plugin-manifest",
7062
7097
  "openapi",
7063
7098
  "workflow",
7064
7099
  "comfyui"
7065
7100
  ]);
7066
- var CapabilityRegistrySourceSchema = z4.object({
7101
+ var CapabilityRegistrySourceSchema = z5.object({
7067
7102
  sourceType: CapabilitySourceTypeSchema,
7068
7103
  sourceId: ContractIdentifierSchema,
7069
7104
  ownerRepo: ContractIdentifierSchema
7070
7105
  }).strict();
7071
- var CapabilityRegistryEntrySchema = z4.object({
7106
+ var CapabilityRegistryEntrySchema = z5.object({
7072
7107
  manifest: CapabilityManifestSchema,
7073
- sources: z4.array(CapabilityRegistrySourceSchema).min(1)
7108
+ sources: z5.array(CapabilityRegistrySourceSchema).min(1)
7074
7109
  }).strict();
7075
- var CapabilityRegistryDocumentSchema = z4.object({
7076
- contract: z4.literal("CapabilityRegistry"),
7077
- entries: z4.array(CapabilityRegistryEntrySchema)
7110
+ var CapabilityRegistryDocumentSchema = z5.object({
7111
+ contract: z5.literal("CapabilityRegistry"),
7112
+ entries: z5.array(CapabilityRegistryEntrySchema)
7078
7113
  }).strict().superRefine((registry, context) => {
7079
7114
  const ids = /* @__PURE__ */ new Set();
7080
7115
  registry.entries.forEach((entry, index) => {
@@ -7090,25 +7125,25 @@ var CapabilityRegistryDocumentSchema = z4.object({
7090
7125
  });
7091
7126
 
7092
7127
  // src/contracts/agent.ts
7093
- import { z as z5 } from "zod";
7094
- var StudioAgentModeSchema = z5.enum(["chat", "work"]);
7128
+ import { z as z6 } from "zod";
7129
+ var StudioAgentModeSchema = z6.enum(["chat", "work"]);
7095
7130
  var AgentModeSchema = StudioAgentModeSchema;
7096
- var AgentConfigurationCapabilitySchema = z5.enum([
7131
+ var AgentConfigurationCapabilitySchema = z6.enum([
7097
7132
  "models",
7098
7133
  "skills",
7099
7134
  "tools",
7100
7135
  "mcp",
7101
7136
  "reasoning"
7102
7137
  ]);
7103
- var AgentModeCapabilitiesSchema = z5.object({
7104
- models: z5.boolean(),
7105
- skills: z5.boolean(),
7106
- tools: z5.boolean(),
7107
- mcp: z5.boolean(),
7108
- reasoning: z5.boolean()
7138
+ var AgentModeCapabilitiesSchema = z6.object({
7139
+ models: z6.boolean(),
7140
+ skills: z6.boolean(),
7141
+ tools: z6.boolean(),
7142
+ mcp: z6.boolean(),
7143
+ reasoning: z6.boolean()
7109
7144
  }).strict();
7110
- var AgentResourceModeSupportSchema = z5.object({
7111
- modes: z5.array(AgentModeSchema).min(1)
7145
+ var AgentResourceModeSupportSchema = z6.object({
7146
+ modes: z6.array(AgentModeSchema).min(1)
7112
7147
  }).strict();
7113
7148
  var AGENT_MODE_CAPABILITIES = Object.freeze({
7114
7149
  chat: AgentModeCapabilitiesSchema.parse({
@@ -7126,7 +7161,7 @@ var AGENT_MODE_CAPABILITIES = Object.freeze({
7126
7161
  reasoning: true
7127
7162
  })
7128
7163
  });
7129
- var AgentSessionCapabilitySchema = z5.enum([
7164
+ var AgentSessionCapabilitySchema = z6.enum([
7130
7165
  "text",
7131
7166
  "reasoning",
7132
7167
  "plan",
@@ -7149,30 +7184,30 @@ var AgentSessionCapabilitySchema = z5.enum([
7149
7184
  "steering",
7150
7185
  "summary"
7151
7186
  ]);
7152
- var AgentSessionCapabilitiesSchema = z5.object({
7153
- text: z5.boolean().default(true),
7154
- reasoning: z5.boolean().default(false),
7155
- plan: z5.boolean().default(false),
7156
- tasks: z5.boolean().default(false),
7157
- tools: z5.boolean().default(false),
7158
- mcp: z5.boolean().default(false),
7159
- shell: z5.boolean().default(false),
7160
- fileChange: z5.boolean().default(false),
7161
- skills: z5.boolean().default(false),
7162
- approval: z5.boolean().default(false),
7163
- artifacts: z5.boolean().default(false),
7164
- usage: z5.boolean().default(false),
7165
- resume: z5.boolean().default(false),
7166
- diff: z5.boolean().default(false),
7167
- workspaceFiles: z5.boolean().default(false),
7168
- terminal: z5.boolean().default(false),
7169
- testResults: z5.boolean().default(false),
7170
- threadForking: z5.boolean().default(false),
7171
- editAndRerun: z5.boolean().default(false),
7172
- steering: z5.boolean().default(false),
7173
- summary: z5.boolean().default(false)
7174
- }).strict();
7175
- var AgentSessionPermissionProfileSchema = z5.enum([
7187
+ var AgentSessionCapabilitiesSchema = z6.object({
7188
+ text: z6.boolean().default(true),
7189
+ reasoning: z6.boolean().default(false),
7190
+ plan: z6.boolean().default(false),
7191
+ tasks: z6.boolean().default(false),
7192
+ tools: z6.boolean().default(false),
7193
+ mcp: z6.boolean().default(false),
7194
+ shell: z6.boolean().default(false),
7195
+ fileChange: z6.boolean().default(false),
7196
+ skills: z6.boolean().default(false),
7197
+ approval: z6.boolean().default(false),
7198
+ artifacts: z6.boolean().default(false),
7199
+ usage: z6.boolean().default(false),
7200
+ resume: z6.boolean().default(false),
7201
+ diff: z6.boolean().default(false),
7202
+ workspaceFiles: z6.boolean().default(false),
7203
+ terminal: z6.boolean().default(false),
7204
+ testResults: z6.boolean().default(false),
7205
+ threadForking: z6.boolean().default(false),
7206
+ editAndRerun: z6.boolean().default(false),
7207
+ steering: z6.boolean().default(false),
7208
+ summary: z6.boolean().default(false)
7209
+ }).strict();
7210
+ var AgentSessionPermissionProfileSchema = z6.enum([
7176
7211
  "approval-required",
7177
7212
  "auto-approve",
7178
7213
  "full-access"
@@ -7204,13 +7239,13 @@ var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
7204
7239
  steering: { eventTypes: ["steer"], commandTypes: ["steer"] },
7205
7240
  summary: { eventTypes: ["summary"], commandTypes: ["retry-summary"] }
7206
7241
  });
7207
- var AgentSessionSnapshotSchema = z5.object({
7242
+ var AgentSessionSnapshotSchema = z6.object({
7208
7243
  mode: AgentModeSchema,
7209
- modelId: z5.string().trim().min(1),
7244
+ modelId: z6.string().trim().min(1),
7210
7245
  capabilities: AgentSessionCapabilitiesSchema,
7211
7246
  permissionProfile: AgentSessionPermissionProfileSchema.optional()
7212
7247
  }).strict();
7213
- var AgentSessionStatusSchema = z5.enum([
7248
+ var AgentSessionStatusSchema = z6.enum([
7214
7249
  "queued",
7215
7250
  "running",
7216
7251
  "waiting_approval",
@@ -7219,56 +7254,56 @@ var AgentSessionStatusSchema = z5.enum([
7219
7254
  "completed",
7220
7255
  "failed"
7221
7256
  ]);
7222
- var AgentSessionTerminalStatusSchema = z5.enum(["stopped", "completed", "failed"]);
7223
- var AgentSessionLineageSchema = z5.object({
7257
+ var AgentSessionTerminalStatusSchema = z6.enum(["stopped", "completed", "failed"]);
7258
+ var AgentSessionLineageSchema = z6.object({
7224
7259
  forkedFromThreadId: ContractIdentifierSchema,
7225
7260
  forkedFromMessageId: ContractIdentifierSchema,
7226
7261
  sourceRunId: ContractIdentifierSchema
7227
7262
  }).strict();
7228
- var AgentSessionContextInheritanceSchema = z5.object({
7229
- messages: z5.enum(["through-source-message", "exclude"]),
7230
- attachments: z5.enum(["inherit", "exclude"]),
7231
- summaries: z5.enum(["inherit", "exclude"]),
7232
- toolResults: z5.enum(["inherit", "exclude"]),
7233
- codeChanges: z5.enum(["inherit", "exclude"])
7263
+ var AgentSessionContextInheritanceSchema = z6.object({
7264
+ messages: z6.enum(["through-source-message", "exclude"]),
7265
+ attachments: z6.enum(["inherit", "exclude"]),
7266
+ summaries: z6.enum(["inherit", "exclude"]),
7267
+ toolResults: z6.enum(["inherit", "exclude"]),
7268
+ codeChanges: z6.enum(["inherit", "exclude"])
7234
7269
  }).strict();
7235
- var AgentSessionInheritedContextMessageSchema = z5.object({
7270
+ var AgentSessionInheritedContextMessageSchema = z6.object({
7236
7271
  messageId: ContractIdentifierSchema,
7237
- role: z5.enum(["user", "assistant"]),
7238
- parts: z5.array(JsonValueSchema).min(1)
7272
+ role: z6.enum(["user", "assistant"]),
7273
+ parts: z6.array(JsonValueSchema).min(1)
7239
7274
  }).strict();
7240
- var AgentSessionUnavailableResourceSchema = z5.object({
7275
+ var AgentSessionUnavailableResourceSchema = z6.object({
7241
7276
  messageId: ContractIdentifierSchema,
7242
- kind: z5.enum(["attachment", "tool-result", "code-change"]),
7243
- reason: z5.enum(["excluded", "unavailable", "unsupported"])
7277
+ kind: z6.enum(["attachment", "tool-result", "code-change"]),
7278
+ reason: z6.enum(["excluded", "unavailable", "unsupported"])
7244
7279
  }).strict();
7245
- var AgentSessionInheritedContextSchema = z5.object({
7280
+ var AgentSessionInheritedContextSchema = z6.object({
7246
7281
  sourceThreadId: ContractIdentifierSchema,
7247
7282
  sourceMessageId: ContractIdentifierSchema,
7248
7283
  sourceRunId: ContractIdentifierSchema,
7249
- messages: z5.array(AgentSessionInheritedContextMessageSchema).max(24),
7250
- summary: z5.string().trim().min(1).optional(),
7251
- unavailableResources: z5.array(AgentSessionUnavailableResourceSchema).default([]),
7284
+ messages: z6.array(AgentSessionInheritedContextMessageSchema).max(24),
7285
+ summary: z6.string().trim().min(1).optional(),
7286
+ unavailableResources: z6.array(AgentSessionUnavailableResourceSchema).default([]),
7252
7287
  capturedAt: IsoDateTimeSchema
7253
7288
  }).strict();
7254
- var AgentSessionContinuationRequestSchema = z5.object({
7255
- contract: z5.literal("AgentSessionContinuationRequest"),
7289
+ var AgentSessionContinuationRequestSchema = z6.object({
7290
+ contract: z6.literal("AgentSessionContinuationRequest"),
7256
7291
  idempotencyKey: ContractIdentifierSchema,
7257
7292
  sourceMessageId: ContractIdentifierSchema,
7258
7293
  sourceRunId: ContractIdentifierSchema,
7259
7294
  inheritance: AgentSessionContextInheritanceSchema
7260
7295
  }).strict();
7261
- var AgentSessionContinuationResultSchema = z5.object({
7262
- contract: z5.literal("AgentSessionContinuationResult"),
7296
+ var AgentSessionContinuationResultSchema = z6.object({
7297
+ contract: z6.literal("AgentSessionContinuationResult"),
7263
7298
  idempotencyKey: ContractIdentifierSchema,
7264
7299
  threadId: ContractIdentifierSchema,
7265
7300
  lineage: AgentSessionLineageSchema,
7266
7301
  inheritance: AgentSessionContextInheritanceSchema,
7267
- unavailableResources: z5.array(AgentSessionUnavailableResourceSchema).default([]),
7268
- duplicate: z5.boolean(),
7302
+ unavailableResources: z6.array(AgentSessionUnavailableResourceSchema).default([]),
7303
+ duplicate: z6.boolean(),
7269
7304
  createdAt: IsoDateTimeSchema
7270
7305
  }).strict();
7271
- var AgentSessionActiveBranchSchema = z5.object({
7306
+ var AgentSessionActiveBranchSchema = z6.object({
7272
7307
  branchId: ContractIdentifierSchema,
7273
7308
  threadId: ContractIdentifierSchema,
7274
7309
  sourceMessageId: ContractIdentifierSchema,
@@ -7276,7 +7311,7 @@ var AgentSessionActiveBranchSchema = z5.object({
7276
7311
  lineage: AgentSessionLineageSchema.optional(),
7277
7312
  createdAt: IsoDateTimeSchema
7278
7313
  }).strict();
7279
- var AgentSessionRunSchema = z5.object({
7314
+ var AgentSessionRunSchema = z6.object({
7280
7315
  runId: ContractIdentifierSchema,
7281
7316
  sessionId: ContractIdentifierSchema,
7282
7317
  sourceMessageId: ContractIdentifierSchema,
@@ -7286,7 +7321,7 @@ var AgentSessionRunSchema = z5.object({
7286
7321
  stoppedAt: IsoDateTimeSchema.optional(),
7287
7322
  completedAt: IsoDateTimeSchema.optional(),
7288
7323
  failedAt: IsoDateTimeSchema.optional(),
7289
- durationMs: z5.number().nonnegative().optional()
7324
+ durationMs: z6.number().nonnegative().optional()
7290
7325
  }).strict().superRefine((value, context) => {
7291
7326
  const terminalTimestamps = [value.stoppedAt, value.completedAt, value.failedAt].filter(Boolean);
7292
7327
  if (terminalTimestamps.length > 1) {
@@ -7333,7 +7368,7 @@ var AgentSessionRunSchema = z5.object({
7333
7368
  });
7334
7369
  }
7335
7370
  });
7336
- var AgentSessionCommandTypeSchema = z5.enum([
7371
+ var AgentSessionCommandTypeSchema = z6.enum([
7337
7372
  "stop",
7338
7373
  "resume",
7339
7374
  "retry",
@@ -7343,22 +7378,22 @@ var AgentSessionCommandTypeSchema = z5.enum([
7343
7378
  "edit-and-rerun",
7344
7379
  "steer"
7345
7380
  ]);
7346
- var AgentSessionCommandHeaderSchema = z5.object({
7347
- contract: z5.literal("AgentSessionCommand"),
7381
+ var AgentSessionCommandHeaderSchema = z6.object({
7382
+ contract: z6.literal("AgentSessionCommand"),
7348
7383
  commandId: ContractIdentifierSchema,
7349
7384
  sessionId: ContractIdentifierSchema,
7350
7385
  runId: ContractIdentifierSchema.optional(),
7351
7386
  idempotencyKey: ContractIdentifierSchema,
7352
- expectedSequence: z5.number().int().min(-1),
7387
+ expectedSequence: z6.number().int().min(-1),
7353
7388
  issuedAt: IsoDateTimeSchema
7354
7389
  }).strict();
7355
7390
  var sessionCommand = (commandType, payload) => AgentSessionCommandHeaderSchema.extend({
7356
- commandType: z5.literal(commandType),
7357
- payload: z5.object(payload).strict()
7391
+ commandType: z6.literal(commandType),
7392
+ payload: z6.object(payload).strict()
7358
7393
  }).strict();
7359
- var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7394
+ var AgentSessionCommandSchema = z6.discriminatedUnion("commandType", [
7360
7395
  sessionCommand("stop", {
7361
- reason: z5.string().trim().min(1).optional()
7396
+ reason: z6.string().trim().min(1).optional()
7362
7397
  }),
7363
7398
  sessionCommand("resume", {
7364
7399
  resumeEventId: ContractIdentifierSchema.optional()
@@ -7372,8 +7407,8 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7372
7407
  }),
7373
7408
  sessionCommand("approval", {
7374
7409
  approvalId: ContractIdentifierSchema,
7375
- decision: z5.enum(["approved", "rejected"]),
7376
- reason: z5.string().trim().min(1).optional()
7410
+ decision: z6.enum(["approved", "rejected"]),
7411
+ reason: z6.string().trim().min(1).optional()
7377
7412
  }),
7378
7413
  sessionCommand("fork", {
7379
7414
  sourceThreadId: ContractIdentifierSchema,
@@ -7385,12 +7420,12 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7385
7420
  sourceThreadId: ContractIdentifierSchema,
7386
7421
  sourceMessageId: ContractIdentifierSchema,
7387
7422
  sourceRunId: ContractIdentifierSchema,
7388
- replacementParts: z5.array(JsonValueSchema).min(1),
7423
+ replacementParts: z6.array(JsonValueSchema).min(1),
7389
7424
  inheritance: AgentSessionContextInheritanceSchema
7390
7425
  }),
7391
7426
  sessionCommand("steer", {
7392
7427
  targetRunId: ContractIdentifierSchema,
7393
- text: z5.string().trim().min(1)
7428
+ text: z6.string().trim().min(1)
7394
7429
  })
7395
7430
  ]).superRefine((value, context) => {
7396
7431
  if (value.commandType === "steer" && value.runId !== value.payload.targetRunId) {
@@ -7409,9 +7444,9 @@ var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
7409
7444
  }
7410
7445
  });
7411
7446
  var AgentSessionTargetedCommandSchema = AgentSessionCommandSchema.and(
7412
- z5.object({ runId: ContractIdentifierSchema })
7447
+ z6.object({ runId: ContractIdentifierSchema })
7413
7448
  );
7414
- var AgentSessionCommandErrorCodeSchema = z5.enum([
7449
+ var AgentSessionCommandErrorCodeSchema = z6.enum([
7415
7450
  "SESSION_NOT_FOUND",
7416
7451
  "RUN_NOT_FOUND",
7417
7452
  "ACTIVE_RUN_NOT_FOUND",
@@ -7432,25 +7467,25 @@ var AgentSessionCommandErrorCodeSchema = z5.enum([
7432
7467
  "ACTIVE_BRANCH_NOT_FOUND",
7433
7468
  "COMMAND_EXECUTION_FAILED"
7434
7469
  ]);
7435
- var AgentSessionCommandResultSchema = z5.object({
7436
- contract: z5.literal("AgentSessionCommandResult"),
7470
+ var AgentSessionCommandResultSchema = z6.object({
7471
+ contract: z6.literal("AgentSessionCommandResult"),
7437
7472
  commandId: ContractIdentifierSchema,
7438
7473
  sessionId: ContractIdentifierSchema,
7439
7474
  runId: ContractIdentifierSchema.optional(),
7440
7475
  idempotencyKey: ContractIdentifierSchema,
7441
- outcome: z5.enum(["accepted", "duplicate", "rejected", "failed"]),
7476
+ outcome: z6.enum(["accepted", "duplicate", "rejected", "failed"]),
7442
7477
  sessionStatus: AgentSessionStatusSchema,
7443
- acceptedSequence: z5.number().int().nonnegative().optional(),
7444
- resultEventIds: z5.array(ContractIdentifierSchema).default([]),
7445
- operation: z5.object({
7478
+ acceptedSequence: z6.number().int().nonnegative().optional(),
7479
+ resultEventIds: z6.array(ContractIdentifierSchema).default([]),
7480
+ operation: z6.object({
7446
7481
  lineage: AgentSessionLineageSchema,
7447
7482
  activeBranch: AgentSessionActiveBranchSchema
7448
7483
  }).strict().optional(),
7449
- termination: z5.enum(["requested", "confirmed"]).optional(),
7450
- error: z5.object({
7484
+ termination: z6.enum(["requested", "confirmed"]).optional(),
7485
+ error: z6.object({
7451
7486
  code: AgentSessionCommandErrorCodeSchema,
7452
- message: z5.string(),
7453
- retryable: z5.boolean()
7487
+ message: z6.string(),
7488
+ retryable: z6.boolean()
7454
7489
  }).strict().optional(),
7455
7490
  occurredAt: IsoDateTimeSchema
7456
7491
  }).strict().superRefine((value, context) => {
@@ -7503,13 +7538,13 @@ var AgentSessionCommandResultSchema = z5.object({
7503
7538
  });
7504
7539
  }
7505
7540
  });
7506
- var AgentSessionCommandPolicySchema = z5.object({
7541
+ var AgentSessionCommandPolicySchema = z6.object({
7507
7542
  capability: AgentSessionCapabilitySchema.optional(),
7508
- allowedStatuses: z5.array(AgentSessionStatusSchema).min(1),
7509
- requiresRunId: z5.boolean(),
7510
- sourceSessionEffect: z5.enum(["transition", "preserve"]),
7511
- idempotencyScope: z5.literal("session-command"),
7512
- sequenceRule: z5.enum(["match-current", "target-run"])
7543
+ allowedStatuses: z6.array(AgentSessionStatusSchema).min(1),
7544
+ requiresRunId: z6.boolean(),
7545
+ sourceSessionEffect: z6.enum(["transition", "preserve"]),
7546
+ idempotencyScope: z6.literal("session-command"),
7547
+ sequenceRule: z6.enum(["match-current", "target-run"])
7513
7548
  }).strict();
7514
7549
  var sessionCommandPolicy = (policy) => AgentSessionCommandPolicySchema.parse(policy);
7515
7550
  var AGENT_SESSION_COMMAND_POLICIES = Object.freeze({
@@ -7579,150 +7614,150 @@ var AGENT_SESSION_COMMAND_POLICIES = Object.freeze({
7579
7614
  function isAgentSessionTerminalStatus(status) {
7580
7615
  return AgentSessionTerminalStatusSchema.safeParse(status).success;
7581
7616
  }
7582
- var AgentSessionEventHeaderSchema = z5.object({
7583
- contract: z5.literal("AgentSessionEvent"),
7617
+ var AgentSessionEventHeaderSchema = z6.object({
7618
+ contract: z6.literal("AgentSessionEvent"),
7584
7619
  eventId: ContractIdentifierSchema,
7585
7620
  sessionId: ContractIdentifierSchema,
7586
7621
  runId: ContractIdentifierSchema.optional(),
7587
7622
  sourceMessageId: ContractIdentifierSchema.optional(),
7588
- sequence: z5.number().int().nonnegative(),
7623
+ sequence: z6.number().int().nonnegative(),
7589
7624
  idempotencyKey: ContractIdentifierSchema,
7590
7625
  occurredAt: IsoDateTimeSchema
7591
7626
  }).strict();
7592
7627
  var sessionEvent = (eventType, payload) => AgentSessionEventHeaderSchema.extend({
7593
- eventType: z5.literal(eventType),
7594
- payload: z5.object(payload).strict()
7628
+ eventType: z6.literal(eventType),
7629
+ payload: z6.object(payload).strict()
7595
7630
  }).strict();
7596
- var AgentSessionEventSchema = z5.discriminatedUnion("eventType", [
7631
+ var AgentSessionEventSchema = z6.discriminatedUnion("eventType", [
7597
7632
  sessionEvent("message", {
7598
7633
  messageId: ContractIdentifierSchema,
7599
- role: z5.enum(["user", "assistant", "system"]),
7600
- operation: z5.enum(["append", "replace"]).default("append"),
7601
- parts: z5.array(JsonValueSchema),
7602
- status: z5.enum(["streaming", "completed", "failed"]).optional()
7634
+ role: z6.enum(["user", "assistant", "system"]),
7635
+ operation: z6.enum(["append", "replace"]).default("append"),
7636
+ parts: z6.array(JsonValueSchema),
7637
+ status: z6.enum(["streaming", "completed", "failed"]).optional()
7603
7638
  }),
7604
7639
  sessionEvent("reasoning", {
7605
7640
  reasoningId: ContractIdentifierSchema,
7606
- text: z5.string(),
7607
- status: z5.enum(["streaming", "completed"])
7641
+ text: z6.string(),
7642
+ status: z6.enum(["streaming", "completed"])
7608
7643
  }),
7609
7644
  sessionEvent("plan", {
7610
7645
  planId: ContractIdentifierSchema,
7611
- title: z5.string().optional(),
7612
- status: z5.enum(["pending", "running", "completed", "failed"]),
7613
- steps: z5.array(
7614
- z5.object({
7646
+ title: z6.string().optional(),
7647
+ status: z6.enum(["pending", "running", "completed", "failed"]),
7648
+ steps: z6.array(
7649
+ z6.object({
7615
7650
  id: ContractIdentifierSchema,
7616
- title: z5.string(),
7617
- status: z5.enum(["pending", "running", "completed", "failed", "skipped"])
7651
+ title: z6.string(),
7652
+ status: z6.enum(["pending", "running", "completed", "failed", "skipped"])
7618
7653
  }).strict()
7619
7654
  )
7620
7655
  }),
7621
7656
  sessionEvent("task", {
7622
7657
  taskId: ContractIdentifierSchema,
7623
- title: z5.string(),
7624
- status: z5.enum(["pending", "running", "completed", "failed", "skipped"]),
7625
- detail: z5.string().optional()
7658
+ title: z6.string(),
7659
+ status: z6.enum(["pending", "running", "completed", "failed", "skipped"]),
7660
+ detail: z6.string().optional()
7626
7661
  }),
7627
7662
  sessionEvent("tool", {
7628
7663
  toolCallId: ContractIdentifierSchema,
7629
- toolName: z5.string().trim().min(1),
7630
- status: z5.enum(["pending", "running", "completed", "failed", "denied"]),
7664
+ toolName: z6.string().trim().min(1),
7665
+ status: z6.enum(["pending", "running", "completed", "failed", "denied"]),
7631
7666
  input: JsonValueSchema.optional(),
7632
7667
  output: JsonValueSchema.optional(),
7633
- error: z5.string().optional(),
7668
+ error: z6.string().optional(),
7634
7669
  startedAt: IsoDateTimeSchema.optional(),
7635
7670
  completedAt: IsoDateTimeSchema.optional()
7636
7671
  }),
7637
7672
  sessionEvent("approval", {
7638
7673
  approvalId: ContractIdentifierSchema,
7639
7674
  toolCallId: ContractIdentifierSchema.optional(),
7640
- status: z5.enum(["requested", "approved", "rejected", "expired"]),
7641
- title: z5.string(),
7642
- description: z5.string().optional(),
7675
+ status: z6.enum(["requested", "approved", "rejected", "expired"]),
7676
+ title: z6.string(),
7677
+ description: z6.string().optional(),
7643
7678
  requestedAction: JsonValueSchema.optional()
7644
7679
  }),
7645
7680
  sessionEvent("status", {
7646
7681
  status: AgentSessionStatusSchema,
7647
- detail: z5.string().optional(),
7682
+ detail: z6.string().optional(),
7648
7683
  startedAt: IsoDateTimeSchema.optional(),
7649
7684
  stoppingRequestedAt: IsoDateTimeSchema.optional(),
7650
7685
  stoppedAt: IsoDateTimeSchema.optional(),
7651
7686
  completedAt: IsoDateTimeSchema.optional(),
7652
7687
  failedAt: IsoDateTimeSchema.optional(),
7653
- durationMs: z5.number().nonnegative().optional()
7688
+ durationMs: z6.number().nonnegative().optional()
7654
7689
  }),
7655
7690
  sessionEvent("artifact", {
7656
7691
  artifactId: ContractIdentifierSchema,
7657
- name: z5.string().trim().min(1),
7658
- kind: z5.enum(["file", "image", "video", "audio", "web", "other"]),
7659
- status: z5.enum(["pending", "ready", "failed"]),
7660
- mimeType: z5.string().optional(),
7661
- url: z5.string().url().optional(),
7662
- size: z5.number().int().nonnegative().optional(),
7692
+ name: z6.string().trim().min(1),
7693
+ kind: z6.enum(["file", "image", "video", "audio", "web", "other"]),
7694
+ status: z6.enum(["pending", "ready", "failed"]),
7695
+ mimeType: z6.string().optional(),
7696
+ url: z6.string().url().optional(),
7697
+ size: z6.number().int().nonnegative().optional(),
7663
7698
  sourceEventId: ContractIdentifierSchema.optional()
7664
7699
  }),
7665
7700
  sessionEvent("usage", {
7666
- inputTokens: z5.number().int().nonnegative().optional(),
7667
- outputTokens: z5.number().int().nonnegative().optional(),
7668
- totalTokens: z5.number().int().nonnegative().optional(),
7669
- contextTokens: z5.number().int().nonnegative().optional(),
7670
- contextWindow: z5.number().int().positive().optional()
7701
+ inputTokens: z6.number().int().nonnegative().optional(),
7702
+ outputTokens: z6.number().int().nonnegative().optional(),
7703
+ totalTokens: z6.number().int().nonnegative().optional(),
7704
+ contextTokens: z6.number().int().nonnegative().optional(),
7705
+ contextWindow: z6.number().int().positive().optional()
7671
7706
  }),
7672
7707
  sessionEvent("resume", {
7673
- resumable: z5.boolean(),
7708
+ resumable: z6.boolean(),
7674
7709
  state: JsonObjectSchema.optional(),
7675
- reason: z5.string().optional()
7710
+ reason: z6.string().optional()
7676
7711
  }),
7677
7712
  sessionEvent("error", {
7678
- code: z5.string().trim().min(1),
7679
- message: z5.string(),
7680
- retryable: z5.boolean(),
7713
+ code: z6.string().trim().min(1),
7714
+ message: z6.string(),
7715
+ retryable: z6.boolean(),
7681
7716
  sourceEventId: ContractIdentifierSchema.optional(),
7682
7717
  details: JsonObjectSchema.optional()
7683
7718
  }),
7684
7719
  sessionEvent("diff", {
7685
- path: z5.string().trim().min(1),
7686
- status: z5.enum(["added", "modified", "deleted", "renamed"]),
7687
- patch: z5.string().optional()
7720
+ path: z6.string().trim().min(1),
7721
+ status: z6.enum(["added", "modified", "deleted", "renamed"]),
7722
+ patch: z6.string().optional()
7688
7723
  }),
7689
7724
  sessionEvent("workspace-file", {
7690
- path: z5.string().trim().min(1),
7691
- operation: z5.enum(["upsert", "delete"]),
7692
- mimeType: z5.string().optional(),
7693
- size: z5.number().int().nonnegative().optional()
7725
+ path: z6.string().trim().min(1),
7726
+ operation: z6.enum(["upsert", "delete"]),
7727
+ mimeType: z6.string().optional(),
7728
+ size: z6.number().int().nonnegative().optional()
7694
7729
  }),
7695
7730
  sessionEvent("terminal", {
7696
7731
  terminalId: ContractIdentifierSchema,
7697
- stream: z5.enum(["stdin", "stdout", "stderr", "status"]),
7698
- chunk: z5.string(),
7699
- exitCode: z5.number().int().optional()
7732
+ stream: z6.enum(["stdin", "stdout", "stderr", "status"]),
7733
+ chunk: z6.string(),
7734
+ exitCode: z6.number().int().optional()
7700
7735
  }),
7701
7736
  sessionEvent("test-result", {
7702
7737
  testId: ContractIdentifierSchema,
7703
- name: z5.string(),
7704
- status: z5.enum(["running", "passed", "failed", "skipped"]),
7705
- durationMs: z5.number().nonnegative().optional(),
7706
- output: z5.string().optional()
7738
+ name: z6.string(),
7739
+ status: z6.enum(["running", "passed", "failed", "skipped"]),
7740
+ durationMs: z6.number().nonnegative().optional(),
7741
+ output: z6.string().optional()
7707
7742
  }),
7708
7743
  sessionEvent("steer", {
7709
7744
  commandId: ContractIdentifierSchema,
7710
7745
  targetRunId: ContractIdentifierSchema,
7711
- text: z5.string().trim().min(1),
7712
- status: z5.enum(["accepted", "applied", "failed"]),
7713
- error: z5.object({
7746
+ text: z6.string().trim().min(1),
7747
+ status: z6.enum(["accepted", "applied", "failed"]),
7748
+ error: z6.object({
7714
7749
  code: AgentSessionCommandErrorCodeSchema,
7715
- message: z5.string(),
7716
- retryable: z5.boolean()
7750
+ message: z6.string(),
7751
+ retryable: z6.boolean()
7717
7752
  }).strict().optional()
7718
7753
  }),
7719
7754
  sessionEvent("summary", {
7720
7755
  summaryId: ContractIdentifierSchema,
7721
7756
  runId: ContractIdentifierSchema,
7722
- text: z5.string(),
7723
- highlights: z5.array(z5.string()),
7724
- pendingItems: z5.array(z5.string()),
7725
- status: z5.enum(["generating", "completed", "failed"])
7757
+ text: z6.string(),
7758
+ highlights: z6.array(z6.string()),
7759
+ pendingItems: z6.array(z6.string()),
7760
+ status: z6.enum(["generating", "completed", "failed"])
7726
7761
  })
7727
7762
  ]).superRefine((value, context) => {
7728
7763
  if (value.eventType === "steer") {
@@ -7778,14 +7813,14 @@ var AgentSessionRunEventSchema = AgentSessionEventSchema.superRefine((value, con
7778
7813
  });
7779
7814
  }
7780
7815
  });
7781
- var AgentSessionViewModelSchema = z5.object({
7782
- contract: z5.literal("AgentSessionViewModel"),
7816
+ var AgentSessionViewModelSchema = z6.object({
7817
+ contract: z6.literal("AgentSessionViewModel"),
7783
7818
  sessionId: ContractIdentifierSchema,
7784
7819
  snapshot: AgentSessionSnapshotSchema,
7785
7820
  status: AgentSessionStatusSchema,
7786
- events: z5.array(AgentSessionEventSchema),
7787
- lastSequence: z5.number().int().min(-1),
7788
- resumable: z5.boolean().default(false),
7821
+ events: z6.array(AgentSessionEventSchema),
7822
+ lastSequence: z6.number().int().min(-1),
7823
+ resumable: z6.boolean().default(false),
7789
7824
  lineage: AgentSessionLineageSchema.optional(),
7790
7825
  activeBranch: AgentSessionActiveBranchSchema.optional()
7791
7826
  }).strict().superRefine((value, context) => {
@@ -7834,55 +7869,55 @@ var AgentSessionViewModelSchema = z5.object({
7834
7869
  });
7835
7870
  }
7836
7871
  });
7837
- var AgentWorkbenchNavigationItemStatusSchema = z5.enum(["idle", "running", "completed", "error"]);
7838
- var AgentWorkbenchCollectionStatusSchema = z5.enum(["loading", "ready", "error"]);
7839
- var AgentWorkbenchAgentItemSchema = z5.object({
7872
+ var AgentWorkbenchNavigationItemStatusSchema = z6.enum(["idle", "running", "completed", "error"]);
7873
+ var AgentWorkbenchCollectionStatusSchema = z6.enum(["loading", "ready", "error"]);
7874
+ var AgentWorkbenchAgentItemSchema = z6.object({
7840
7875
  id: ContractIdentifierSchema,
7841
- name: z5.string().min(1),
7842
- description: z5.string().optional(),
7843
- iconUrl: z5.string().url().optional(),
7844
- builtIn: z5.boolean().default(false),
7845
- pinned: z5.boolean().default(false),
7846
- pinPending: z5.boolean().default(false)
7847
- }).strict();
7848
- var AgentWorkbenchSessionItemSchema = z5.object({
7876
+ name: z6.string().min(1),
7877
+ description: z6.string().optional(),
7878
+ iconUrl: z6.string().url().optional(),
7879
+ builtIn: z6.boolean().default(false),
7880
+ pinned: z6.boolean().default(false),
7881
+ pinPending: z6.boolean().default(false)
7882
+ }).strict();
7883
+ var AgentWorkbenchSessionItemSchema = z6.object({
7849
7884
  id: ContractIdentifierSchema,
7850
- title: z5.string().min(1),
7885
+ title: z6.string().min(1),
7851
7886
  updatedAt: IsoDateTimeSchema,
7852
- thumbnailUrl: z5.string().url().optional(),
7887
+ thumbnailUrl: z6.string().url().optional(),
7853
7888
  mode: AgentModeSchema.optional(),
7854
7889
  status: AgentWorkbenchNavigationItemStatusSchema.default("idle"),
7855
- pinned: z5.boolean().default(false),
7856
- contextUsage: z5.object({
7857
- usedTokens: z5.number().int().nonnegative(),
7858
- maxTokens: z5.number().int().positive()
7890
+ pinned: z6.boolean().default(false),
7891
+ contextUsage: z6.object({
7892
+ usedTokens: z6.number().int().nonnegative(),
7893
+ maxTokens: z6.number().int().positive()
7859
7894
  }).strict().optional()
7860
7895
  }).strict();
7861
- var AgentWorkbenchNavigationCapabilitiesSchema = z5.object({
7862
- createAgent: z5.boolean().default(false),
7863
- createSession: z5.boolean().default(true),
7864
- manageCapabilities: z5.boolean().default(false),
7865
- manageAgentSettings: z5.boolean().default(false),
7866
- pinAgents: z5.boolean().default(false),
7867
- pinSessions: z5.boolean().default(false),
7868
- renameSessions: z5.boolean().default(false),
7869
- deleteSessions: z5.boolean().default(false)
7870
- }).strict();
7871
- var AgentWorkbenchNavigationViewModelSchema = z5.object({
7872
- contract: z5.literal("AgentWorkbenchNavigationViewModel"),
7873
- activeTab: z5.enum(["agents", "sessions"]).default("sessions"),
7874
- searchQuery: z5.string().default(""),
7896
+ var AgentWorkbenchNavigationCapabilitiesSchema = z6.object({
7897
+ createAgent: z6.boolean().default(false),
7898
+ createSession: z6.boolean().default(true),
7899
+ manageCapabilities: z6.boolean().default(false),
7900
+ manageAgentSettings: z6.boolean().default(false),
7901
+ pinAgents: z6.boolean().default(false),
7902
+ pinSessions: z6.boolean().default(false),
7903
+ renameSessions: z6.boolean().default(false),
7904
+ deleteSessions: z6.boolean().default(false)
7905
+ }).strict();
7906
+ var AgentWorkbenchNavigationViewModelSchema = z6.object({
7907
+ contract: z6.literal("AgentWorkbenchNavigationViewModel"),
7908
+ activeTab: z6.enum(["agents", "sessions"]).default("sessions"),
7909
+ searchQuery: z6.string().default(""),
7875
7910
  selectedAgentItem: ContractIdentifierSchema.optional(),
7876
7911
  selectedSessionItem: ContractIdentifierSchema.optional(),
7877
- agents: z5.object({
7912
+ agents: z6.object({
7878
7913
  status: AgentWorkbenchCollectionStatusSchema,
7879
- items: z5.array(AgentWorkbenchAgentItemSchema),
7880
- error: z5.string().optional()
7914
+ items: z6.array(AgentWorkbenchAgentItemSchema),
7915
+ error: z6.string().optional()
7881
7916
  }).strict(),
7882
- sessions: z5.object({
7917
+ sessions: z6.object({
7883
7918
  status: AgentWorkbenchCollectionStatusSchema,
7884
- items: z5.array(AgentWorkbenchSessionItemSchema),
7885
- error: z5.string().optional()
7919
+ items: z6.array(AgentWorkbenchSessionItemSchema),
7920
+ error: z6.string().optional()
7886
7921
  }).strict(),
7887
7922
  capabilities: AgentWorkbenchNavigationCapabilitiesSchema
7888
7923
  }).strict().superRefine((value, context) => {
@@ -7898,44 +7933,44 @@ var AgentWorkbenchNavigationViewModelSchema = z5.object({
7898
7933
  validateCollection(value.agents, "agents");
7899
7934
  validateCollection(value.sessions, "sessions");
7900
7935
  });
7901
- var AgentWorkbenchComposerStatusSchema = z5.enum([
7936
+ var AgentWorkbenchComposerStatusSchema = z6.enum([
7902
7937
  "idle",
7903
7938
  "loading",
7904
7939
  "streaming",
7905
7940
  "stopping",
7906
7941
  "error"
7907
7942
  ]);
7908
- var AgentWorkbenchComposerAttachmentSchema = z5.object({
7943
+ var AgentWorkbenchComposerAttachmentSchema = z6.object({
7909
7944
  id: ContractIdentifierSchema,
7910
- name: z5.string().min(1),
7911
- mediaType: z5.string().min(1).optional(),
7912
- previewUrl: z5.string().min(1).optional(),
7913
- status: z5.enum(["uploading", "ready", "error"]).default("ready")
7945
+ name: z6.string().min(1),
7946
+ mediaType: z6.string().min(1).optional(),
7947
+ previewUrl: z6.string().min(1).optional(),
7948
+ status: z6.enum(["uploading", "ready", "error"]).default("ready")
7914
7949
  }).strict();
7915
- var AgentWorkbenchComposerQueueItemSchema = z5.object({
7950
+ var AgentWorkbenchComposerQueueItemSchema = z6.object({
7916
7951
  id: ContractIdentifierSchema,
7917
- text: z5.string(),
7918
- attachmentCount: z5.number().int().nonnegative().default(0),
7919
- status: z5.enum(["queued", "sending", "error"]).default("queued")
7952
+ text: z6.string(),
7953
+ attachmentCount: z6.number().int().nonnegative().default(0),
7954
+ status: z6.enum(["queued", "sending", "error"]).default("queued")
7920
7955
  }).strict();
7921
- var AgentWorkbenchComposerModelOptionSchema = z5.object({
7956
+ var AgentWorkbenchComposerModelOptionSchema = z6.object({
7922
7957
  id: ContractIdentifierSchema,
7923
- label: z5.string().min(1),
7924
- provider: z5.string().min(1).optional(),
7958
+ label: z6.string().min(1),
7959
+ provider: z6.string().min(1).optional(),
7925
7960
  mode: AgentModeSchema,
7926
- disabled: z5.boolean().default(false)
7927
- }).strict();
7928
- var AgentWorkbenchComposerCapabilitiesSchema = z5.object({
7929
- attachments: z5.boolean().default(false),
7930
- voiceInput: z5.boolean().default(false),
7931
- webSearch: z5.boolean().default(false),
7932
- modelSelection: z5.boolean().default(false),
7933
- reasoning: z5.boolean().default(false),
7934
- permissions: z5.boolean().default(false),
7935
- queue: z5.boolean().default(false),
7936
- stop: z5.boolean().default(false)
7937
- }).strict();
7938
- var AgentWorkbenchQuickStartIconSchema = z5.enum([
7961
+ disabled: z6.boolean().default(false)
7962
+ }).strict();
7963
+ var AgentWorkbenchComposerCapabilitiesSchema = z6.object({
7964
+ attachments: z6.boolean().default(false),
7965
+ voiceInput: z6.boolean().default(false),
7966
+ webSearch: z6.boolean().default(false),
7967
+ modelSelection: z6.boolean().default(false),
7968
+ reasoning: z6.boolean().default(false),
7969
+ permissions: z6.boolean().default(false),
7970
+ queue: z6.boolean().default(false),
7971
+ stop: z6.boolean().default(false)
7972
+ }).strict();
7973
+ var AgentWorkbenchQuickStartIconSchema = z6.enum([
7939
7974
  "sparkles",
7940
7975
  "palette",
7941
7976
  "search",
@@ -7943,55 +7978,55 @@ var AgentWorkbenchQuickStartIconSchema = z5.enum([
7943
7978
  "code",
7944
7979
  "shopping-bag"
7945
7980
  ]);
7946
- var AgentWorkbenchQuickStartTemplateActionSchema = z5.enum(["prompt", "upload"]);
7947
- var AgentWorkbenchQuickStartTemplateSchema = z5.object({
7981
+ var AgentWorkbenchQuickStartTemplateActionSchema = z6.enum(["prompt", "upload"]);
7982
+ var AgentWorkbenchQuickStartTemplateSchema = z6.object({
7948
7983
  id: ContractIdentifierSchema,
7949
- title: z5.string().min(1),
7950
- description: z5.string().min(1).optional(),
7951
- prompt: z5.string().min(1),
7984
+ title: z6.string().min(1),
7985
+ description: z6.string().min(1).optional(),
7986
+ prompt: z6.string().min(1),
7952
7987
  action: AgentWorkbenchQuickStartTemplateActionSchema.default("prompt"),
7953
7988
  icon: AgentWorkbenchQuickStartIconSchema.optional(),
7954
- coverImageUrl: z5.string().min(1).optional(),
7955
- accept: z5.string().min(1).default("*/*"),
7956
- multiple: z5.boolean().default(false),
7957
- modes: z5.array(AgentModeSchema).min(1).optional()
7989
+ coverImageUrl: z6.string().min(1).optional(),
7990
+ accept: z6.string().min(1).default("*/*"),
7991
+ multiple: z6.boolean().default(false),
7992
+ modes: z6.array(AgentModeSchema).min(1).optional()
7958
7993
  }).strict();
7959
- var AgentWorkbenchQuickStartSectionSchema = z5.object({
7994
+ var AgentWorkbenchQuickStartSectionSchema = z6.object({
7960
7995
  id: ContractIdentifierSchema,
7961
- label: z5.string().min(1),
7962
- templates: z5.array(AgentWorkbenchQuickStartTemplateSchema).min(1)
7996
+ label: z6.string().min(1),
7997
+ templates: z6.array(AgentWorkbenchQuickStartTemplateSchema).min(1)
7963
7998
  }).strict();
7964
- var AgentWorkbenchQuickStartCategorySchema = z5.object({
7999
+ var AgentWorkbenchQuickStartCategorySchema = z6.object({
7965
8000
  id: ContractIdentifierSchema,
7966
- label: z5.string().min(1),
8001
+ label: z6.string().min(1),
7967
8002
  icon: AgentWorkbenchQuickStartIconSchema.optional(),
7968
- sections: z5.array(AgentWorkbenchQuickStartSectionSchema).min(1)
8003
+ sections: z6.array(AgentWorkbenchQuickStartSectionSchema).min(1)
7969
8004
  }).strict();
7970
- var AgentWorkbenchQuickStartViewModelSchema = z5.object({
7971
- contract: z5.literal("AgentWorkbenchQuickStartViewModel"),
8005
+ var AgentWorkbenchQuickStartViewModelSchema = z6.object({
8006
+ contract: z6.literal("AgentWorkbenchQuickStartViewModel"),
7972
8007
  mode: AgentModeSchema,
7973
- categories: z5.array(AgentWorkbenchQuickStartCategorySchema).min(1),
7974
- disabled: z5.boolean().default(false)
8008
+ categories: z6.array(AgentWorkbenchQuickStartCategorySchema).min(1),
8009
+ disabled: z6.boolean().default(false)
7975
8010
  }).strict();
7976
- var AgentWorkbenchComposerViewModelSchema = z5.object({
7977
- contract: z5.literal("AgentWorkbenchComposerViewModel"),
7978
- value: z5.string().default(""),
8011
+ var AgentWorkbenchComposerViewModelSchema = z6.object({
8012
+ contract: z6.literal("AgentWorkbenchComposerViewModel"),
8013
+ value: z6.string().default(""),
7979
8014
  status: AgentWorkbenchComposerStatusSchema.default("idle"),
7980
8015
  mode: AgentModeSchema,
7981
- placeholder: z5.string().optional(),
7982
- attachments: z5.array(AgentWorkbenchComposerAttachmentSchema).default([]),
7983
- queuedDrafts: z5.array(AgentWorkbenchComposerQueueItemSchema).default([]),
7984
- model: z5.object({
8016
+ placeholder: z6.string().optional(),
8017
+ attachments: z6.array(AgentWorkbenchComposerAttachmentSchema).default([]),
8018
+ queuedDrafts: z6.array(AgentWorkbenchComposerQueueItemSchema).default([]),
8019
+ model: z6.object({
7985
8020
  selectedId: ContractIdentifierSchema.optional(),
7986
- options: z5.array(AgentWorkbenchComposerModelOptionSchema)
8021
+ options: z6.array(AgentWorkbenchComposerModelOptionSchema)
7987
8022
  }).strict(),
7988
- reasoning: z5.object({
7989
- value: z5.enum(["low", "medium", "high", "xhigh"]),
7990
- options: z5.array(z5.enum(["low", "medium", "high", "xhigh"])).min(1)
8023
+ reasoning: z6.object({
8024
+ value: z6.enum(["low", "medium", "high", "xhigh"]),
8025
+ options: z6.array(z6.enum(["low", "medium", "high", "xhigh"])).min(1)
7991
8026
  }).strict().optional(),
7992
8027
  permissionProfile: AgentSessionPermissionProfileSchema.optional(),
7993
- webSearchEnabled: z5.boolean().default(false),
7994
- error: z5.string().optional(),
8028
+ webSearchEnabled: z6.boolean().default(false),
8029
+ error: z6.string().optional(),
7995
8030
  capabilities: AgentWorkbenchComposerCapabilitiesSchema
7996
8031
  }).strict().superRefine((value, context) => {
7997
8032
  if (value.status === "error" && !value.error) {
@@ -8012,38 +8047,38 @@ var AgentWorkbenchComposerViewModelSchema = z5.object({
8012
8047
  var AgentExecutionModeSchema = AgentModeSchema;
8013
8048
 
8014
8049
  // src/contracts/context.ts
8015
- import { z as z6 } from "zod";
8016
- var ActorRefSchema = z6.object({
8017
- kind: z6.enum(["human", "agent", "service", "tenant", "public"]),
8050
+ import { z as z7 } from "zod";
8051
+ var ActorRefSchema = z7.object({
8052
+ kind: z7.enum(["human", "agent", "service", "tenant", "public"]),
8018
8053
  id: ContractIdentifierSchema.optional(),
8019
8054
  userId: ContractIdentifierSchema.optional(),
8020
8055
  agentId: ContractIdentifierSchema.optional(),
8021
8056
  serviceId: ContractIdentifierSchema.optional()
8022
8057
  }).strict();
8023
- var AuthorityScopeSchema = z6.object({
8058
+ var AuthorityScopeSchema = z7.object({
8024
8059
  resource: ContractIdentifierSchema,
8025
- actions: z6.array(ContractIdentifierSchema).min(1),
8026
- constraints: z6.record(z6.string(), JsonValueSchema).optional()
8060
+ actions: z7.array(ContractIdentifierSchema).min(1),
8061
+ constraints: z7.record(z7.string(), JsonValueSchema).optional()
8027
8062
  }).strict();
8028
- var RequestScopeSchema = z6.object({
8029
- contract: z6.literal("RequestScope"),
8063
+ var RequestScopeSchema = z7.object({
8064
+ contract: z7.literal("RequestScope"),
8030
8065
  requestId: ContractIdentifierSchema,
8031
8066
  traceId: ContractIdentifierSchema.optional(),
8032
8067
  appId: ContractIdentifierSchema,
8033
8068
  tenantId: ContractIdentifierSchema.optional(),
8034
8069
  teamId: ContractIdentifierSchema.optional(),
8035
8070
  actor: ActorRefSchema,
8036
- session: z6.object({
8071
+ session: z7.object({
8037
8072
  authType: ContractIdentifierSchema,
8038
- authenticated: z6.boolean(),
8039
- membershipVerified: z6.boolean()
8073
+ authenticated: z7.boolean(),
8074
+ membershipVerified: z7.boolean()
8040
8075
  }).strict(),
8041
- permissionCodes: z6.array(ContractIdentifierSchema).default([]),
8042
- authority: z6.array(AuthorityScopeSchema).default([]),
8076
+ permissionCodes: z7.array(ContractIdentifierSchema).default([]),
8077
+ authority: z7.array(AuthorityScopeSchema).default([]),
8043
8078
  issuedAt: IsoDateTimeSchema
8044
8079
  }).strict();
8045
- var ExecutionLinkSchema = z6.object({
8046
- contract: z6.literal("ExecutionLink"),
8080
+ var ExecutionLinkSchema = z7.object({
8081
+ contract: z7.literal("ExecutionLink"),
8047
8082
  requestId: ContractIdentifierSchema,
8048
8083
  traceId: ContractIdentifierSchema.optional(),
8049
8084
  correlationId: ContractIdentifierSchema.optional(),
@@ -8053,43 +8088,43 @@ var ExecutionLinkSchema = z6.object({
8053
8088
  taskRef: EntityRefSchema.optional(),
8054
8089
  parentRunRef: EntityRefSchema.optional()
8055
8090
  }).strict();
8056
- var CompletionHeaderSchema = z6.object({
8057
- contract: z6.literal("CompletionHeader"),
8091
+ var CompletionHeaderSchema = z7.object({
8092
+ contract: z7.literal("CompletionHeader"),
8058
8093
  eventId: ContractIdentifierSchema,
8059
8094
  runtimeEventId: ContractIdentifierSchema,
8060
8095
  idempotencyKey: ContractIdentifierSchema,
8061
- sequence: z6.number().int().nonnegative(),
8096
+ sequence: z7.number().int().nonnegative(),
8062
8097
  execution: ExecutionLinkSchema,
8063
- producer: z6.object({
8098
+ producer: z7.object({
8064
8099
  service: ContractIdentifierSchema,
8065
8100
  runtime: ContractIdentifierSchema,
8066
8101
  version: ContractIdentifierSchema
8067
8102
  }).strict(),
8068
- status: z6.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
8103
+ status: z7.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
8069
8104
  occurredAt: IsoDateTimeSchema,
8070
8105
  payloadSchemaRef: ContractIdentifierSchema.optional()
8071
8106
  }).strict();
8072
- var CompletionEventSchema = z6.object({
8107
+ var CompletionEventSchema = z7.object({
8073
8108
  header: CompletionHeaderSchema,
8074
8109
  payload: JsonValueSchema.optional()
8075
8110
  }).strict();
8076
- var AgentRuntimeEventSchema = z6.object({
8077
- contract: z6.literal("AgentRuntimeEvent"),
8111
+ var AgentRuntimeEventSchema = z7.object({
8112
+ contract: z7.literal("AgentRuntimeEvent"),
8078
8113
  runtimeEventId: ContractIdentifierSchema,
8079
8114
  streamId: ContractIdentifierSchema,
8080
- sequence: z6.number().int().nonnegative(),
8115
+ sequence: z7.number().int().nonnegative(),
8081
8116
  requestId: ContractIdentifierSchema,
8082
8117
  teamId: ContractIdentifierSchema,
8083
8118
  threadId: ContractIdentifierSchema.optional(),
8084
- eventType: z6.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert", "session:event"]),
8119
+ eventType: z7.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert", "session:event"]),
8085
8120
  payload: JsonValueSchema,
8086
8121
  occurredAt: IsoDateTimeSchema
8087
8122
  }).strict();
8088
8123
 
8089
8124
  // src/contracts/continuity.ts
8090
- import { z as z7 } from "zod";
8091
- var DataContinuityEnvelopeSchema = z7.object({
8092
- contract: z7.literal("DataContinuityEnvelope"),
8125
+ import { z as z8 } from "zod";
8126
+ var DataContinuityEnvelopeSchema = z8.object({
8127
+ contract: z8.literal("DataContinuityEnvelope"),
8093
8128
  tenantId: ContractIdentifierSchema,
8094
8129
  teamId: ContractIdentifierSchema,
8095
8130
  sourceRef: EntityRefSchema.optional(),
@@ -8104,28 +8139,28 @@ var DataContinuityEnvelopeSchema = z7.object({
8104
8139
  (value) => Boolean(value.sourceRef || value.bodyRef || value.runRef || value.outputRef || value.artifactRef),
8105
8140
  "At least one continuity ref is required."
8106
8141
  );
8107
- var BodyRelationRecordSchema = z7.object({
8108
- contract: z7.literal("BodyRelationRecord"),
8142
+ var BodyRelationRecordSchema = z8.object({
8143
+ contract: z8.literal("BodyRelationRecord"),
8109
8144
  relationId: ContractIdentifierSchema,
8110
8145
  relationKind: ContractIdentifierSchema,
8111
8146
  subjectRef: EntityRefSchema,
8112
8147
  objectRef: EntityRefSchema,
8113
8148
  ownerRepo: ContractIdentifierSchema,
8114
- authorityScope: z7.enum(["tenant", "team", "global"]),
8149
+ authorityScope: z8.enum(["tenant", "team", "global"]),
8115
8150
  properties: JsonObjectSchema.default({}),
8116
8151
  createdAt: IsoDateTimeSchema,
8117
8152
  updatedAt: IsoDateTimeSchema
8118
8153
  }).strict();
8119
- var ApplicationRunSchema = z7.object({
8120
- contract: z7.literal("ApplicationRun"),
8154
+ var ApplicationRunSchema = z8.object({
8155
+ contract: z8.literal("ApplicationRun"),
8121
8156
  runId: ContractIdentifierSchema,
8122
8157
  definitionRef: EntityRefSchema,
8123
8158
  runtimeLedgerRef: EntityRefSchema.optional(),
8124
8159
  requestId: ContractIdentifierSchema,
8125
8160
  actorRef: EntityRefSchema,
8126
- status: z7.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
8127
- inputRefs: z7.array(EntityRefSchema).default([]),
8128
- outputRefs: z7.array(EntityRefSchema).default([]),
8161
+ status: z8.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
8162
+ inputRefs: z8.array(EntityRefSchema).default([]),
8163
+ outputRefs: z8.array(EntityRefSchema).default([]),
8129
8164
  startedAt: IsoDateTimeSchema.optional(),
8130
8165
  completedAt: IsoDateTimeSchema.optional(),
8131
8166
  expiresAt: IsoDateTimeSchema.optional(),
@@ -8167,77 +8202,77 @@ var ApplicationRunSchema = z7.object({
8167
8202
  });
8168
8203
  }
8169
8204
  });
8170
- var ExpiringAccessGrantSchema = z7.object({
8171
- contract: z7.literal("ExpiringAccessGrant"),
8205
+ var ExpiringAccessGrantSchema = z8.object({
8206
+ contract: z8.literal("ExpiringAccessGrant"),
8172
8207
  grantId: ContractIdentifierSchema,
8173
8208
  subjectRef: EntityRefSchema,
8174
8209
  resourceRef: EntityRefSchema,
8175
- permissions: z7.array(ContractIdentifierSchema).min(1),
8210
+ permissions: z8.array(ContractIdentifierSchema).min(1),
8176
8211
  issuedAt: IsoDateTimeSchema,
8177
8212
  expiresAt: IsoDateTimeSchema,
8178
8213
  revokedAt: IsoDateTimeSchema.optional()
8179
8214
  }).strict().refine((value) => Date.parse(value.expiresAt) > Date.parse(value.issuedAt), "expiresAt must be after issuedAt");
8180
8215
 
8181
8216
  // src/contracts/data.ts
8182
- import { z as z8 } from "zod";
8183
- var SourceRecordRefSchema = z8.object({
8217
+ import { z as z9 } from "zod";
8218
+ var SourceRecordRefSchema = z9.object({
8184
8219
  sourceId: ContractIdentifierSchema,
8185
8220
  recordId: ContractIdentifierSchema,
8186
- recordVersion: z8.union([z8.number().int().nonnegative(), ContractIdentifierSchema]),
8221
+ recordVersion: z9.union([z9.number().int().nonnegative(), ContractIdentifierSchema]),
8187
8222
  hash: Sha256Schema
8188
8223
  }).strict();
8189
- var OntologyDefinitionSchema = z8.object({
8190
- contract: z8.literal("OntologyDefinition"),
8224
+ var OntologyDefinitionSchema = z9.object({
8225
+ contract: z9.literal("OntologyDefinition"),
8191
8226
  ontologyId: ContractIdentifierSchema,
8192
8227
  dataSpaceId: ContractIdentifierSchema,
8193
8228
  ownerRepo: ContractIdentifierSchema,
8194
8229
  bodySchemaRef: ContractIdentifierSchema,
8195
- authority: z8.object({
8230
+ authority: z9.object({
8196
8231
  service: ContractIdentifierSchema,
8197
8232
  storage: ContractIdentifierSchema,
8198
- scope: z8.enum(["tenant", "team", "user", "global"])
8233
+ scope: z9.enum(["tenant", "team", "user", "global"])
8199
8234
  }).strict(),
8200
- relationKinds: z8.array(ContractIdentifierSchema).default([]),
8201
- metricKinds: z8.array(ContractIdentifierSchema).default([])
8235
+ relationKinds: z9.array(ContractIdentifierSchema).default([]),
8236
+ metricKinds: z9.array(ContractIdentifierSchema).default([])
8202
8237
  }).strict();
8203
- var ProjectionSpecSchema = z8.object({
8204
- contract: z8.literal("ProjectionSpec"),
8238
+ var ProjectionSpecSchema = z9.object({
8239
+ contract: z9.literal("ProjectionSpec"),
8205
8240
  projectionId: ContractIdentifierSchema,
8206
- ontologyIds: z8.array(ContractIdentifierSchema).min(1),
8241
+ ontologyIds: z9.array(ContractIdentifierSchema).min(1),
8207
8242
  outputSchemaRef: ContractIdentifierSchema,
8208
- operator: z8.object({
8209
- kind: z8.enum(["query", "aggregate", "relationship", "search", "custom"]),
8210
- configuration: z8.record(z8.string(), JsonValueSchema).default({})
8243
+ operator: z9.object({
8244
+ kind: z9.enum(["query", "aggregate", "relationship", "search", "custom"]),
8245
+ configuration: z9.record(z9.string(), JsonValueSchema).default({})
8211
8246
  }).strict(),
8212
- materialization: z8.enum(["on-demand", "event-driven", "scheduled"]),
8213
- invalidationEvents: z8.array(ContractIdentifierSchema).default([]),
8214
- rebuildable: z8.literal(true),
8215
- lineagePolicy: z8.object({
8216
- sourceRecords: z8.boolean(),
8217
- bodyVersions: z8.boolean(),
8218
- runRefs: z8.boolean(),
8219
- actorRefs: z8.boolean()
8247
+ materialization: z9.enum(["on-demand", "event-driven", "scheduled"]),
8248
+ invalidationEvents: z9.array(ContractIdentifierSchema).default([]),
8249
+ rebuildable: z9.literal(true),
8250
+ lineagePolicy: z9.object({
8251
+ sourceRecords: z9.boolean(),
8252
+ bodyVersions: z9.boolean(),
8253
+ runRefs: z9.boolean(),
8254
+ actorRefs: z9.boolean()
8220
8255
  }).strict()
8221
8256
  }).strict();
8222
- var LineageRecordSchema = z8.object({
8223
- contract: z8.literal("LineageRecord"),
8257
+ var LineageRecordSchema = z9.object({
8258
+ contract: z9.literal("LineageRecord"),
8224
8259
  lineageId: ContractIdentifierSchema,
8225
8260
  subjectRef: EntityRefSchema,
8226
- sourceRecords: z8.array(SourceRecordRefSchema).default([]),
8227
- bodyRefs: z8.array(EntityRefSchema).default([]),
8228
- runRefs: z8.array(EntityRefSchema).default([]),
8229
- outputRefs: z8.array(EntityRefSchema).default([]),
8230
- artifactRefs: z8.array(EntityRefSchema).default([]),
8231
- actorRefs: z8.array(EntityRefSchema).default([]),
8232
- evidenceRefs: z8.array(EntityRefSchema).default([]),
8261
+ sourceRecords: z9.array(SourceRecordRefSchema).default([]),
8262
+ bodyRefs: z9.array(EntityRefSchema).default([]),
8263
+ runRefs: z9.array(EntityRefSchema).default([]),
8264
+ outputRefs: z9.array(EntityRefSchema).default([]),
8265
+ artifactRefs: z9.array(EntityRefSchema).default([]),
8266
+ actorRefs: z9.array(EntityRefSchema).default([]),
8267
+ evidenceRefs: z9.array(EntityRefSchema).default([]),
8233
8268
  recordedAt: IsoDateTimeSchema
8234
8269
  }).strict();
8235
- var DomainEventSchema = z8.object({
8236
- contract: z8.literal("DomainEvent"),
8270
+ var DomainEventSchema = z9.object({
8271
+ contract: z9.literal("DomainEvent"),
8237
8272
  eventId: ContractIdentifierSchema,
8238
8273
  eventType: ContractIdentifierSchema,
8239
8274
  aggregateRef: EntityRefSchema,
8240
- aggregateVersion: z8.number().int().nonnegative(),
8275
+ aggregateVersion: z9.number().int().nonnegative(),
8241
8276
  requestId: ContractIdentifierSchema,
8242
8277
  actorRef: EntityRefSchema,
8243
8278
  payload: JsonValueSchema,
@@ -8245,11 +8280,11 @@ var DomainEventSchema = z8.object({
8245
8280
  }).strict();
8246
8281
 
8247
8282
  // src/contracts/menu.ts
8248
- import { z as z10 } from "zod";
8283
+ import { z as z11 } from "zod";
8249
8284
 
8250
8285
  // src/contracts/page.ts
8251
- import { z as z9 } from "zod";
8252
- var PageTypeSchema = z9.enum([
8286
+ import { z as z10 } from "zod";
8287
+ var PageTypeSchema = z10.enum([
8253
8288
  "page",
8254
8289
  "workspace",
8255
8290
  "view",
@@ -8270,14 +8305,14 @@ var PageTypeSchema = z9.enum([
8270
8305
  "global-design-board",
8271
8306
  "iframe"
8272
8307
  ]);
8273
- var PageVisibilitySchema = z9.object({
8274
- authenticated: z9.boolean().default(true),
8275
- permissionAllOf: z9.array(ContractIdentifierSchema).default([]),
8276
- permissionAnyOf: z9.array(ContractIdentifierSchema).default([]),
8277
- featureFlags: z9.array(ContractIdentifierSchema).default([]),
8278
- productContexts: z9.array(z9.enum(["studio", "kernel", "compute"])).min(1)
8279
- }).strict();
8280
- var PageRoutePathSchema = z9.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
8308
+ var PageVisibilitySchema = z10.object({
8309
+ authenticated: z10.boolean().default(true),
8310
+ permissionAllOf: z10.array(ContractIdentifierSchema).default([]),
8311
+ permissionAnyOf: z10.array(ContractIdentifierSchema).default([]),
8312
+ featureFlags: z10.array(ContractIdentifierSchema).default([]),
8313
+ productContexts: z10.array(z10.enum(["studio", "kernel", "compute"])).min(1)
8314
+ }).strict();
8315
+ var PageRoutePathSchema = z10.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
8281
8316
  var requireCapabilityReference = (reference, path, context) => {
8282
8317
  if (reference.kind !== "capability") {
8283
8318
  context.addIssue({
@@ -8301,53 +8336,53 @@ var requireCapabilityReference = (reference, path, context) => {
8301
8336
  });
8302
8337
  }
8303
8338
  };
8304
- var PageDefinitionSchema = z9.object({
8305
- contract: z9.literal("PageDefinition"),
8339
+ var PageDefinitionSchema = z10.object({
8340
+ contract: z10.literal("PageDefinition"),
8306
8341
  pageId: ContractIdentifierSchema,
8307
8342
  ownerRepo: ContractIdentifierSchema,
8308
8343
  title: LocalizedTextSchema,
8309
8344
  pageType: PageTypeSchema,
8310
- ownership: z9.object({
8345
+ ownership: z10.object({
8311
8346
  teamId: ContractIdentifierSchema.optional(),
8312
8347
  creatorRef: EntityRefSchema.optional(),
8313
8348
  studioId: ContractIdentifierSchema.optional(),
8314
- builtIn: z9.boolean()
8349
+ builtIn: z10.boolean()
8315
8350
  }).strict(),
8316
- record: z9.object({
8317
- createdTimestamp: z9.number().int().nonnegative().optional(),
8318
- updatedTimestamp: z9.number().int().nonnegative().optional(),
8319
- deleted: z9.boolean().default(false)
8351
+ record: z10.object({
8352
+ createdTimestamp: z10.number().int().nonnegative().optional(),
8353
+ updatedTimestamp: z10.number().int().nonnegative().optional(),
8354
+ deleted: z10.boolean().default(false)
8320
8355
  }).strict(),
8321
- surface: z9.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
8356
+ surface: z10.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
8322
8357
  routeId: ContractIdentifierSchema,
8323
8358
  routePath: PageRoutePathSchema,
8324
8359
  rendererKey: ContractIdentifierSchema,
8325
8360
  capabilityRef: EntityRefSchema,
8326
- capabilityRefs: z9.array(EntityRefSchema).default([]),
8361
+ capabilityRefs: z10.array(EntityRefSchema).default([]),
8327
8362
  workflowRef: EntityRefSchema.optional(),
8328
- binding: z9.object({
8363
+ binding: z10.object({
8329
8364
  sourceRef: ContractIdentifierSchema.optional(),
8330
8365
  ontologyId: ContractIdentifierSchema.optional(),
8331
8366
  projectionRef: ContractIdentifierSchema.optional(),
8332
8367
  stateRef: ContractIdentifierSchema.optional()
8333
8368
  }).strict(),
8334
- access: z9.object({
8335
- actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"])).default([])
8369
+ access: z10.object({
8370
+ actions: z10.array(z10.enum(["read", "write", "execute", "manage-permissions"])).default([])
8336
8371
  }).strict(),
8337
- input: z9.object({
8372
+ input: z10.object({
8338
8373
  schemaRef: ContractIdentifierSchema
8339
8374
  }).strict().optional(),
8340
- rendererConfig: z9.object({
8375
+ rendererConfig: z10.object({
8341
8376
  schemaRef: ContractIdentifierSchema,
8342
8377
  value: JsonObjectSchema
8343
8378
  }).strict(),
8344
- navigation: z9.object({
8379
+ navigation: z10.object({
8345
8380
  label: LocalizedTextSchema,
8346
8381
  iconRef: ContractIdentifierSchema.optional(),
8347
8382
  parentPageId: ContractIdentifierSchema.optional(),
8348
- order: z9.number().int().optional(),
8349
- hidden: z9.boolean().default(false),
8350
- pinned: z9.boolean().default(false)
8383
+ order: z10.number().int().optional(),
8384
+ hidden: z10.boolean().default(false),
8385
+ pinned: z10.boolean().default(false)
8351
8386
  }).strict(),
8352
8387
  visibility: PageVisibilitySchema
8353
8388
  }).strict().superRefine((page, context) => {
@@ -8368,8 +8403,8 @@ var PageDefinitionSchema = z9.object({
8368
8403
  });
8369
8404
  if (page.workflowRef && page.workflowRef.kind !== "workflow") context.addIssue({ code: "custom", path: ["workflowRef", "kind"], message: "workflowRef must reference a workflow." });
8370
8405
  });
8371
- var PageRuntimeDescriptorSchema = z9.object({
8372
- contract: z9.literal("PageRuntimeDescriptor"),
8406
+ var PageRuntimeDescriptorSchema = z10.object({
8407
+ contract: z10.literal("PageRuntimeDescriptor"),
8373
8408
  page: PageDefinitionSchema,
8374
8409
  nodeId: ContractIdentifierSchema,
8375
8410
  parentNodeId: ContractIdentifierSchema.optional(),
@@ -8377,54 +8412,54 @@ var PageRuntimeDescriptorSchema = z9.object({
8377
8412
  semanticRef: ContractIdentifierSchema.optional(),
8378
8413
  dataContextRef: ContractIdentifierSchema.optional(),
8379
8414
  providerRef: EntityRefSchema.optional(),
8380
- surface: z9.object({
8415
+ surface: z10.object({
8381
8416
  frameOwner: ContractIdentifierSchema,
8382
8417
  tone: ContractIdentifierSchema.optional(),
8383
- density: z9.enum(["compact", "default", "comfortable"]).default("default")
8418
+ density: z10.enum(["compact", "default", "comfortable"]).default("default")
8384
8419
  }).strict(),
8385
- scroll: z9.object({
8386
- owner: z9.enum(["page", "surface", "provider"]),
8387
- axis: z9.enum(["x", "y", "both", "none"]),
8420
+ scroll: z10.object({
8421
+ owner: z10.enum(["page", "surface", "provider"]),
8422
+ axis: z10.enum(["x", "y", "both", "none"]),
8388
8423
  restoreKey: ContractIdentifierSchema.optional(),
8389
- virtualized: z9.boolean().default(false)
8424
+ virtualized: z10.boolean().default(false)
8390
8425
  }).strict(),
8391
- activation: z9.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
8392
- lifecycle: z9.object({
8393
- mountPolicy: z9.enum(["always", "when-visible", "when-active"]),
8394
- queryPolicy: z9.enum(["always", "when-visible", "when-active", "manual"]),
8395
- deepLink: z9.boolean(),
8396
- focusReturn: z9.boolean()
8426
+ activation: z10.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
8427
+ lifecycle: z10.object({
8428
+ mountPolicy: z10.enum(["always", "when-visible", "when-active"]),
8429
+ queryPolicy: z10.enum(["always", "when-visible", "when-active", "manual"]),
8430
+ deepLink: z10.boolean(),
8431
+ focusReturn: z10.boolean()
8397
8432
  }).strict()
8398
8433
  }).strict();
8399
- var PageRouteProjectionSchema = z9.object({
8434
+ var PageRouteProjectionSchema = z10.object({
8400
8435
  pageId: ContractIdentifierSchema,
8401
8436
  routeId: ContractIdentifierSchema,
8402
8437
  path: PageRoutePathSchema
8403
8438
  }).strict();
8404
- var PageNavigationProjectionSchema = z9.object({
8439
+ var PageNavigationProjectionSchema = z10.object({
8405
8440
  pageId: ContractIdentifierSchema,
8406
8441
  routeId: ContractIdentifierSchema,
8407
8442
  path: PageRoutePathSchema,
8408
8443
  label: LocalizedTextSchema,
8409
8444
  iconRef: ContractIdentifierSchema.optional(),
8410
8445
  parentPageId: ContractIdentifierSchema.optional(),
8411
- order: z9.number().int().optional(),
8412
- pinned: z9.boolean()
8446
+ order: z10.number().int().optional(),
8447
+ pinned: z10.boolean()
8413
8448
  }).strict();
8414
- var PageGuardProjectionSchema = z9.object({
8449
+ var PageGuardProjectionSchema = z10.object({
8415
8450
  pageId: ContractIdentifierSchema,
8416
- authenticated: z9.boolean(),
8417
- permissionAllOf: z9.array(ContractIdentifierSchema),
8418
- permissionAnyOf: z9.array(ContractIdentifierSchema),
8419
- featureFlags: z9.array(ContractIdentifierSchema),
8420
- actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"]))
8451
+ authenticated: z10.boolean(),
8452
+ permissionAllOf: z10.array(ContractIdentifierSchema),
8453
+ permissionAnyOf: z10.array(ContractIdentifierSchema),
8454
+ featureFlags: z10.array(ContractIdentifierSchema),
8455
+ actions: z10.array(z10.enum(["read", "write", "execute", "manage-permissions"]))
8421
8456
  }).strict();
8422
- var PageRendererProjectionSchema = z9.object({
8457
+ var PageRendererProjectionSchema = z10.object({
8423
8458
  pageId: ContractIdentifierSchema,
8424
- surface: z9.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
8459
+ surface: z10.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
8425
8460
  rendererKey: ContractIdentifierSchema,
8426
8461
  capabilityRef: EntityRefSchema,
8427
- capabilityRefs: z9.array(EntityRefSchema),
8462
+ capabilityRefs: z10.array(EntityRefSchema),
8428
8463
  providerRef: EntityRefSchema,
8429
8464
  binding: PageDefinitionSchema.shape.binding,
8430
8465
  rendererConfig: PageDefinitionSchema.shape.rendererConfig,
@@ -8465,13 +8500,13 @@ var duplicateProjectionIdentity = (values, identity) => {
8465
8500
  }
8466
8501
  return void 0;
8467
8502
  };
8468
- var PageRuntimeProjectionSchema = z9.object({
8469
- contract: z9.literal("PageRuntimeProjection"),
8470
- product: z9.enum(["studio", "kernel", "compute"]),
8471
- routes: z9.array(PageRouteProjectionSchema),
8472
- navigation: z9.array(PageNavigationProjectionSchema),
8473
- guards: z9.array(PageGuardProjectionSchema),
8474
- renderers: z9.array(PageRendererProjectionSchema)
8503
+ var PageRuntimeProjectionSchema = z10.object({
8504
+ contract: z10.literal("PageRuntimeProjection"),
8505
+ product: z10.enum(["studio", "kernel", "compute"]),
8506
+ routes: z10.array(PageRouteProjectionSchema),
8507
+ navigation: z10.array(PageNavigationProjectionSchema),
8508
+ guards: z10.array(PageGuardProjectionSchema),
8509
+ renderers: z10.array(PageRendererProjectionSchema)
8475
8510
  }).strict().superRefine((projection, context) => {
8476
8511
  const tables = [
8477
8512
  ["routes", projection.routes.map((value) => value.pageId)],
@@ -8533,7 +8568,7 @@ var MENU_MAX_NODES = 1024;
8533
8568
  var MENU_MAX_TREE_DEPTH = 16;
8534
8569
  var MENU_MAX_INPUT_BYTES = 64 * 1024;
8535
8570
  var MENU_MAX_INPUT_VALUES = 2048;
8536
- var MenuOrderSchema = z10.number().int().min(-1e6).max(1e6);
8571
+ var MenuOrderSchema = z11.number().int().min(-1e6).max(1e6);
8537
8572
  var inspectJsonValue = (value) => {
8538
8573
  let maxDepth = 0;
8539
8574
  let values = 0;
@@ -8576,30 +8611,30 @@ var MenuBoundedInputSchema = JsonObjectSchema.superRefine((value, context) => {
8576
8611
  });
8577
8612
  }
8578
8613
  });
8579
- var MenuPageRefSchema = z10.object({
8614
+ var MenuPageRefSchema = z11.object({
8580
8615
  applicationId: ContractIdentifierSchema,
8581
8616
  pageId: ContractIdentifierSchema
8582
8617
  }).strict();
8583
- var MenuSourceInputBindingSchema = z10.discriminatedUnion("exposure", [
8584
- z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
8585
- z10.object({ exposure: z10.literal("server"), value: MenuBoundedInputSchema }).strict()
8618
+ var MenuSourceInputBindingSchema = z11.discriminatedUnion("exposure", [
8619
+ z11.object({ exposure: z11.literal("client"), value: MenuBoundedInputSchema }).strict(),
8620
+ z11.object({ exposure: z11.literal("server"), value: MenuBoundedInputSchema }).strict()
8586
8621
  ]);
8587
- var MenuRuntimeInputBindingSchema = z10.discriminatedUnion("exposure", [
8588
- z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
8589
- z10.object({ exposure: z10.literal("server") }).strict()
8622
+ var MenuRuntimeInputBindingSchema = z11.discriminatedUnion("exposure", [
8623
+ z11.object({ exposure: z11.literal("client"), value: MenuBoundedInputSchema }).strict(),
8624
+ z11.object({ exposure: z11.literal("server") }).strict()
8590
8625
  ]);
8591
- var MenuNavigateBehaviorSchema = z10.object({
8592
- kind: z10.literal("navigate"),
8626
+ var MenuNavigateBehaviorSchema = z11.object({
8627
+ kind: z11.literal("navigate"),
8593
8628
  page: MenuPageRefSchema,
8594
8629
  activationId: ContractIdentifierSchema.optional(),
8595
8630
  input: MenuSourceInputBindingSchema.optional()
8596
8631
  }).strict();
8597
- var MenuActionBehaviorSchema = z10.object({
8598
- kind: z10.literal("action"),
8632
+ var MenuActionBehaviorSchema = z11.object({
8633
+ kind: z11.literal("action"),
8599
8634
  actionRef: ContractIdentifierSchema,
8600
8635
  input: MenuBoundedInputSchema.optional()
8601
8636
  }).strict();
8602
- var MenuBehaviorSchema = z10.discriminatedUnion("kind", [
8637
+ var MenuBehaviorSchema = z11.discriminatedUnion("kind", [
8603
8638
  MenuNavigateBehaviorSchema,
8604
8639
  MenuActionBehaviorSchema
8605
8640
  ]);
@@ -8608,33 +8643,33 @@ var MenuNodeBaseShape = {
8608
8643
  parentNodeId: ContractIdentifierSchema.optional(),
8609
8644
  order: MenuOrderSchema
8610
8645
  };
8611
- var MenuGroupNodeSchema = z10.object({
8646
+ var MenuGroupNodeSchema = z11.object({
8612
8647
  ...MenuNodeBaseShape,
8613
- kind: z10.literal("group"),
8648
+ kind: z11.literal("group"),
8614
8649
  label: LocalizedTextSchema.optional(),
8615
8650
  iconRef: ContractIdentifierSchema.optional(),
8616
- disabled: z10.boolean().optional()
8651
+ disabled: z11.boolean().optional()
8617
8652
  }).strict();
8618
- var MenuDividerNodeSchema = z10.object({
8653
+ var MenuDividerNodeSchema = z11.object({
8619
8654
  ...MenuNodeBaseShape,
8620
- kind: z10.literal("divider")
8655
+ kind: z11.literal("divider")
8621
8656
  }).strict();
8622
- var MenuItemNodeSchema = z10.object({
8657
+ var MenuItemNodeSchema = z11.object({
8623
8658
  ...MenuNodeBaseShape,
8624
- kind: z10.literal("item"),
8659
+ kind: z11.literal("item"),
8625
8660
  label: LocalizedTextSchema,
8626
8661
  iconRef: ContractIdentifierSchema.optional(),
8627
- tone: z10.enum(["default", "danger"]).optional(),
8628
- disabled: z10.boolean().optional(),
8662
+ tone: z11.enum(["default", "danger"]).optional(),
8663
+ disabled: z11.boolean().optional(),
8629
8664
  requiredPermission: ContractIdentifierSchema.optional(),
8630
8665
  behavior: MenuBehaviorSchema
8631
8666
  }).strict();
8632
- var MenuNodeSchema = z10.discriminatedUnion("kind", [
8667
+ var MenuNodeSchema = z11.discriminatedUnion("kind", [
8633
8668
  MenuGroupNodeSchema,
8634
8669
  MenuDividerNodeSchema,
8635
8670
  MenuItemNodeSchema
8636
8671
  ]);
8637
- var MenuContributionSchema = z10.object({
8672
+ var MenuContributionSchema = z11.object({
8638
8673
  providerId: ContractIdentifierSchema,
8639
8674
  parentNodeId: ContractIdentifierSchema.optional(),
8640
8675
  order: MenuOrderSchema
@@ -8704,55 +8739,55 @@ var validateMenuStructure = (menu, context) => {
8704
8739
  contributionKeys.add(key);
8705
8740
  });
8706
8741
  };
8707
- var MenuDefinitionSchema = z10.object({
8708
- contract: z10.literal("MenuDefinition"),
8709
- version: z10.literal(MENU_CONTRACT_VERSION),
8742
+ var MenuDefinitionSchema = z11.object({
8743
+ contract: z11.literal("MenuDefinition"),
8744
+ version: z11.literal(MENU_CONTRACT_VERSION),
8710
8745
  applicationId: ContractIdentifierSchema,
8711
8746
  surface: ContractIdentifierSchema,
8712
8747
  menuId: ContractIdentifierSchema,
8713
- nodes: z10.array(MenuNodeSchema).max(MENU_MAX_NODES),
8714
- contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES).default([])
8748
+ nodes: z11.array(MenuNodeSchema).max(MENU_MAX_NODES),
8749
+ contributions: z11.array(MenuContributionSchema).max(MENU_MAX_NODES).default([])
8715
8750
  }).strict().superRefine(validateMenuStructure);
8716
- var MenuDefinitionSetSchema = z10.union([
8717
- z10.literal("*"),
8718
- z10.object({
8719
- version: z10.literal(MENU_CONTRACT_VERSION),
8720
- definitions: z10.array(MenuDefinitionSchema).max(MENU_MAX_DEFINITIONS)
8751
+ var MenuDefinitionSetSchema = z11.union([
8752
+ z11.literal("*"),
8753
+ z11.object({
8754
+ version: z11.literal(MENU_CONTRACT_VERSION),
8755
+ definitions: z11.array(MenuDefinitionSchema).max(MENU_MAX_DEFINITIONS)
8721
8756
  }).strict()
8722
8757
  ]);
8723
- var MenuAccessRequirementSchema = z10.object({
8724
- authenticated: z10.boolean().default(true),
8725
- permissionAllOf: z10.array(ContractIdentifierSchema).default([]),
8726
- permissionAnyOf: z10.array(ContractIdentifierSchema).default([]),
8727
- featureFlags: z10.array(ContractIdentifierSchema).default([])
8758
+ var MenuAccessRequirementSchema = z11.object({
8759
+ authenticated: z11.boolean().default(true),
8760
+ permissionAllOf: z11.array(ContractIdentifierSchema).default([]),
8761
+ permissionAnyOf: z11.array(ContractIdentifierSchema).default([]),
8762
+ featureFlags: z11.array(ContractIdentifierSchema).default([])
8728
8763
  }).strict();
8729
- var MenuPageRegistrationSchema = z10.object({
8764
+ var MenuPageRegistrationSchema = z11.object({
8730
8765
  applicationId: ContractIdentifierSchema,
8731
8766
  page: PageDefinitionSchema
8732
8767
  }).strict();
8733
- var MenuActionRegistrationSchema = z10.object({
8768
+ var MenuActionRegistrationSchema = z11.object({
8734
8769
  applicationId: ContractIdentifierSchema,
8735
8770
  actionRef: ContractIdentifierSchema,
8736
8771
  inputSchemaRef: ContractIdentifierSchema.optional(),
8737
8772
  access: MenuAccessRequirementSchema
8738
8773
  }).strict();
8739
- var MenuContributionProviderRegistrationSchema = z10.object({
8774
+ var MenuContributionProviderRegistrationSchema = z11.object({
8740
8775
  applicationId: ContractIdentifierSchema,
8741
8776
  providerId: ContractIdentifierSchema,
8742
- surfaces: z10.array(ContractIdentifierSchema).min(1).optional()
8777
+ surfaces: z11.array(ContractIdentifierSchema).min(1).optional()
8743
8778
  }).strict();
8744
- var CompiledMenuNavigateBehaviorSchema = z10.object({
8745
- kind: z10.literal("navigate"),
8779
+ var CompiledMenuNavigateBehaviorSchema = z11.object({
8780
+ kind: z11.literal("navigate"),
8746
8781
  page: MenuPageRefSchema,
8747
8782
  activationId: ContractIdentifierSchema,
8748
8783
  input: MenuRuntimeInputBindingSchema.optional()
8749
8784
  }).strict();
8750
- var CompiledMenuActionBehaviorSchema = z10.object({
8751
- kind: z10.literal("action"),
8785
+ var CompiledMenuActionBehaviorSchema = z11.object({
8786
+ kind: z11.literal("action"),
8752
8787
  actionRef: ContractIdentifierSchema,
8753
8788
  input: MenuBoundedInputSchema.optional()
8754
8789
  }).strict();
8755
- var CompiledMenuBehaviorSchema = z10.discriminatedUnion("kind", [
8790
+ var CompiledMenuBehaviorSchema = z11.discriminatedUnion("kind", [
8756
8791
  CompiledMenuNavigateBehaviorSchema,
8757
8792
  CompiledMenuActionBehaviorSchema
8758
8793
  ]);
@@ -8765,76 +8800,76 @@ var CompiledMenuItemNodeSchema = MenuItemNodeSchema.omit({ behavior: true, requi
8765
8800
  behavior: CompiledMenuBehaviorSchema,
8766
8801
  access: CompiledMenuItemAccessSchema
8767
8802
  }).strict();
8768
- var CompiledMenuNodeSchema = z10.discriminatedUnion("kind", [
8803
+ var CompiledMenuNodeSchema = z11.discriminatedUnion("kind", [
8769
8804
  CompiledMenuGroupNodeSchema,
8770
8805
  CompiledMenuDividerNodeSchema,
8771
8806
  CompiledMenuItemNodeSchema
8772
8807
  ]);
8773
- var CompiledMenuProjectionSchema = z10.object({
8808
+ var CompiledMenuProjectionSchema = z11.object({
8774
8809
  applicationId: ContractIdentifierSchema,
8775
8810
  surface: ContractIdentifierSchema,
8776
8811
  menuId: ContractIdentifierSchema,
8777
- nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES),
8778
- contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES)
8812
+ nodes: z11.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES),
8813
+ contributions: z11.array(MenuContributionSchema).max(MENU_MAX_NODES)
8779
8814
  }).strict();
8780
- var MenuNavigationTargetSchema = z10.object({
8815
+ var MenuNavigationTargetSchema = z11.object({
8781
8816
  page: MenuPageRefSchema,
8782
8817
  activationId: ContractIdentifierSchema,
8783
8818
  input: MenuRuntimeInputBindingSchema.optional()
8784
8819
  }).strict();
8785
- var MenuRuntimeBundleSchema = z10.object({
8786
- contract: z10.literal("MenuRuntimeBundle"),
8787
- version: z10.literal(MENU_CONTRACT_VERSION),
8820
+ var MenuRuntimeBundleSchema = z11.object({
8821
+ contract: z11.literal("MenuRuntimeBundle"),
8822
+ version: z11.literal(MENU_CONTRACT_VERSION),
8788
8823
  applicationId: ContractIdentifierSchema,
8789
8824
  sourceVersion: ContractIdentifierSchema,
8790
8825
  contentHash: Sha256Schema,
8791
- menus: z10.array(CompiledMenuProjectionSchema).max(MENU_MAX_DEFINITIONS),
8792
- navigationTargets: z10.array(MenuNavigationTargetSchema),
8793
- sourceMap: z10.record(z10.string(), ContractIdentifierSchema).default({})
8826
+ menus: z11.array(CompiledMenuProjectionSchema).max(MENU_MAX_DEFINITIONS),
8827
+ navigationTargets: z11.array(MenuNavigationTargetSchema),
8828
+ sourceMap: z11.record(z11.string(), ContractIdentifierSchema).default({})
8794
8829
  }).strict();
8795
- var MenuContributionResultSchema = z10.object({
8796
- contract: z10.literal("MenuContributionResult"),
8830
+ var MenuContributionResultSchema = z11.object({
8831
+ contract: z11.literal("MenuContributionResult"),
8797
8832
  applicationId: ContractIdentifierSchema,
8798
8833
  surface: ContractIdentifierSchema,
8799
8834
  menuId: ContractIdentifierSchema,
8800
8835
  providerId: ContractIdentifierSchema,
8801
- nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES)
8836
+ nodes: z11.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES)
8802
8837
  }).strict();
8803
8838
 
8804
8839
  // src/contracts/semantic.ts
8805
- import { z as z11 } from "zod";
8806
- var ConceptRelationshipSchema = z11.object({
8840
+ import { z as z12 } from "zod";
8841
+ var ConceptRelationshipSchema = z12.object({
8807
8842
  kind: ContractIdentifierSchema,
8808
8843
  targetConceptId: ContractIdentifierSchema,
8809
- cardinality: z11.enum(["one", "optional", "many"])
8844
+ cardinality: z12.enum(["one", "optional", "many"])
8810
8845
  }).strict();
8811
- var ConceptDefinitionSchema = z11.object({
8812
- contract: z11.literal("ConceptDefinition"),
8846
+ var ConceptDefinitionSchema = z12.object({
8847
+ contract: z12.literal("ConceptDefinition"),
8813
8848
  conceptId: ContractIdentifierSchema,
8814
8849
  ownerRepo: ContractIdentifierSchema,
8815
- displayName: z11.string().trim().min(1),
8816
- description: z11.string().optional(),
8850
+ displayName: z12.string().trim().min(1),
8851
+ description: z12.string().optional(),
8817
8852
  schemaRef: ContractIdentifierSchema,
8818
8853
  ontologyId: ContractIdentifierSchema.optional(),
8819
- capabilityIds: z11.array(ContractIdentifierSchema).default([]),
8820
- commandNames: z11.array(ContractIdentifierSchema).default([]),
8821
- relationships: z11.array(ConceptRelationshipSchema).default([])
8854
+ capabilityIds: z12.array(ContractIdentifierSchema).default([]),
8855
+ commandNames: z12.array(ContractIdentifierSchema).default([]),
8856
+ relationships: z12.array(ConceptRelationshipSchema).default([])
8822
8857
  }).strict();
8823
- var DomainCommandDefinitionSchema = z11.object({
8824
- contract: z11.literal("DomainCommandDefinition"),
8858
+ var DomainCommandDefinitionSchema = z12.object({
8859
+ contract: z12.literal("DomainCommandDefinition"),
8825
8860
  commandName: ContractIdentifierSchema,
8826
8861
  ownerRepo: ContractIdentifierSchema,
8827
- displayName: z11.string().trim().min(1),
8828
- description: z11.string().optional(),
8829
- targetKinds: z11.array(ContractIdentifierSchema).min(1),
8862
+ displayName: z12.string().trim().min(1),
8863
+ description: z12.string().optional(),
8864
+ targetKinds: z12.array(ContractIdentifierSchema).min(1),
8830
8865
  inputSchemaRef: ContractIdentifierSchema,
8831
8866
  outputSchemaRef: ContractIdentifierSchema.optional(),
8832
- requiredPermissionCodes: z11.array(ContractIdentifierSchema).default([]),
8867
+ requiredPermissionCodes: z12.array(ContractIdentifierSchema).default([]),
8833
8868
  handlerRef: EntityRefSchema,
8834
- sideEffects: z11.array(z11.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
8869
+ sideEffects: z12.array(z12.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
8835
8870
  }).strict();
8836
- var DomainCommandSchema = z11.object({
8837
- contract: z11.literal("DomainCommand"),
8871
+ var DomainCommandSchema = z12.object({
8872
+ contract: z12.literal("DomainCommand"),
8838
8873
  commandId: ContractIdentifierSchema,
8839
8874
  commandName: ContractIdentifierSchema,
8840
8875
  requestId: ContractIdentifierSchema,
@@ -8842,30 +8877,30 @@ var DomainCommandSchema = z11.object({
8842
8877
  idempotencyKey: ContractIdentifierSchema,
8843
8878
  targetRef: EntityRefSchema,
8844
8879
  actorRef: EntityRefSchema,
8845
- source: z11.object({
8846
- product: z11.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
8880
+ source: z12.object({
8881
+ product: z12.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
8847
8882
  pageId: ContractIdentifierSchema.optional(),
8848
8883
  capabilityId: ContractIdentifierSchema.optional()
8849
8884
  }).strict(),
8850
8885
  payload: JsonObjectSchema,
8851
8886
  issuedAt: IsoDateTimeSchema
8852
8887
  }).strict();
8853
- var ProductDeclarationSchema = z11.object({
8854
- contract: z11.literal("ProductDeclaration"),
8888
+ var ProductDeclarationSchema = z12.object({
8889
+ contract: z12.literal("ProductDeclaration"),
8855
8890
  declarationId: ContractIdentifierSchema,
8856
8891
  ownerRepo: ContractIdentifierSchema,
8857
- concepts: z11.array(ConceptDefinitionSchema).default([]),
8858
- ontologies: z11.array(OntologyDefinitionSchema).default([]),
8859
- projections: z11.array(ProjectionSpecSchema).default([]),
8860
- commands: z11.array(DomainCommandDefinitionSchema).default([]),
8861
- capabilities: z11.array(CapabilityManifestSchema).default([]),
8862
- pages: z11.array(PageDefinitionSchema).default([]),
8863
- menus: z11.array(MenuDefinitionSchema).default([])
8864
- }).strict();
8865
- var DeclarationGraphEdgeSchema = z11.object({
8892
+ concepts: z12.array(ConceptDefinitionSchema).default([]),
8893
+ ontologies: z12.array(OntologyDefinitionSchema).default([]),
8894
+ projections: z12.array(ProjectionSpecSchema).default([]),
8895
+ commands: z12.array(DomainCommandDefinitionSchema).default([]),
8896
+ capabilities: z12.array(CapabilityManifestSchema).default([]),
8897
+ pages: z12.array(PageDefinitionSchema).default([]),
8898
+ menus: z12.array(MenuDefinitionSchema).default([])
8899
+ }).strict();
8900
+ var DeclarationGraphEdgeSchema = z12.object({
8866
8901
  from: EntityRefSchema,
8867
8902
  to: EntityRefSchema,
8868
- relation: z11.enum([
8903
+ relation: z12.enum([
8869
8904
  "uses-ontology",
8870
8905
  "uses-projection",
8871
8906
  "uses-capability",
@@ -8873,25 +8908,25 @@ var DeclarationGraphEdgeSchema = z11.object({
8873
8908
  "relates-to-concept"
8874
8909
  ])
8875
8910
  }).strict();
8876
- var ChangeImpactSchema = z11.object({
8911
+ var ChangeImpactSchema = z12.object({
8877
8912
  changedRef: EntityRefSchema,
8878
- affectedRefs: z11.array(EntityRefSchema),
8879
- reasons: z11.array(ContractIdentifierSchema).min(1)
8913
+ affectedRefs: z12.array(EntityRefSchema),
8914
+ reasons: z12.array(ContractIdentifierSchema).min(1)
8880
8915
  }).strict();
8881
- var ChangeImpactGraphSchema = z11.object({
8882
- contract: z11.literal("ChangeImpactGraph"),
8916
+ var ChangeImpactGraphSchema = z12.object({
8917
+ contract: z12.literal("ChangeImpactGraph"),
8883
8918
  declarationId: ContractIdentifierSchema,
8884
- nodes: z11.array(EntityRefSchema),
8885
- edges: z11.array(DeclarationGraphEdgeSchema),
8886
- impacts: z11.array(ChangeImpactSchema),
8919
+ nodes: z12.array(EntityRefSchema),
8920
+ edges: z12.array(DeclarationGraphEdgeSchema),
8921
+ impacts: z12.array(ChangeImpactSchema),
8887
8922
  generatedAt: IsoDateTimeSchema
8888
8923
  }).strict();
8889
8924
 
8890
8925
  // src/contracts/tenant.ts
8891
- import { z as z13 } from "zod";
8926
+ import { z as z14 } from "zod";
8892
8927
 
8893
8928
  // src/contracts/theme.ts
8894
- import { z as z12 } from "zod";
8929
+ import { z as z13 } from "zod";
8895
8930
 
8896
8931
  // src/theme-tokens/core.ts
8897
8932
  var import_ajv = __toESM(require_ajv());
@@ -11085,20 +11120,20 @@ var MONKEYS_REQUIRED_THEME_TOKEN_PATHS = Object.freeze({
11085
11120
  });
11086
11121
 
11087
11122
  // src/contracts/theme.ts
11088
- var ThemeTokenTypeSchema = z12.enum(THEME_TOKEN_TYPES);
11089
- var ThemeTokenSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
11123
+ var ThemeTokenTypeSchema = z13.enum(THEME_TOKEN_TYPES);
11124
+ var ThemeTokenSchema = z13.record(z13.string(), z13.unknown()).superRefine((input, context) => {
11090
11125
  const issues = validateThemeTokensDocumentStructure({ token: input });
11091
11126
  for (const issue of issues) {
11092
11127
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
11093
11128
  }
11094
11129
  });
11095
- var ThemeTokenGroupSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
11130
+ var ThemeTokenGroupSchema = z13.record(z13.string(), z13.unknown()).superRefine((input, context) => {
11096
11131
  const issues = validateThemeTokensDocumentStructure(input);
11097
11132
  for (const issue of issues) {
11098
11133
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
11099
11134
  }
11100
11135
  });
11101
- var ThemeTokensSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
11136
+ var ThemeTokensSchema = z13.record(z13.string(), z13.unknown()).superRefine((input, context) => {
11102
11137
  const issues = validateThemeTokensDocument(input);
11103
11138
  for (const issue of issues) {
11104
11139
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
@@ -11125,9 +11160,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
11125
11160
  });
11126
11161
 
11127
11162
  // src/contracts/tenant.ts
11128
- var DesignTokenFileSourceSchema = z13.object({
11129
- type: z13.literal("file"),
11130
- path: z13.string().trim().min(1).superRefine((source, context) => {
11163
+ var DesignTokenFileSourceSchema = z14.object({
11164
+ type: z14.literal("file"),
11165
+ path: z14.string().trim().min(1).superRefine((source, context) => {
11131
11166
  if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
11132
11167
  context.addIssue({
11133
11168
  code: "custom",
@@ -11136,9 +11171,9 @@ var DesignTokenFileSourceSchema = z13.object({
11136
11171
  }
11137
11172
  })
11138
11173
  }).strict();
11139
- var DesignTokenUrlSourceSchema = z13.object({
11140
- type: z13.literal("url"),
11141
- url: z13.string().trim().min(1).superRefine((source, context) => {
11174
+ var DesignTokenUrlSourceSchema = z14.object({
11175
+ type: z14.literal("url"),
11176
+ url: z14.string().trim().min(1).superRefine((source, context) => {
11142
11177
  if (!/^https?:\/\//i.test(source)) {
11143
11178
  context.addIssue({
11144
11179
  code: "custom",
@@ -11147,99 +11182,99 @@ var DesignTokenUrlSourceSchema = z13.object({
11147
11182
  }
11148
11183
  })
11149
11184
  }).strict();
11150
- var DesignTokenInlineSourceSchema = z13.object({
11151
- type: z13.literal("inline"),
11185
+ var DesignTokenInlineSourceSchema = z14.object({
11186
+ type: z14.literal("inline"),
11152
11187
  document: ThemeTokensSchema
11153
11188
  }).strict();
11154
- var DesignTokenSourceSchema = z13.discriminatedUnion("type", [
11189
+ var DesignTokenSourceSchema = z14.discriminatedUnion("type", [
11155
11190
  DesignTokenFileSourceSchema,
11156
11191
  DesignTokenUrlSourceSchema,
11157
11192
  DesignTokenInlineSourceSchema
11158
11193
  ]);
11159
- var TenantDesignTokensConfigSchema = z13.object({
11194
+ var TenantDesignTokensConfigSchema = z14.object({
11160
11195
  /** Ordered tenant overrides. The backend always applies the product default first. */
11161
- tokenSources: z13.array(DesignTokenSourceSchema)
11196
+ tokenSources: z14.array(DesignTokenSourceSchema)
11162
11197
  }).strict();
11163
- var TenantAuthBindingSchema = z13.object({
11164
- kind: z13.literal("auth-provider"),
11198
+ var TenantAuthBindingSchema = z14.object({
11199
+ kind: z14.literal("auth-provider"),
11165
11200
  providerId: ContractIdentifierSchema,
11166
11201
  policyRef: ContractIdentifierSchema.optional()
11167
11202
  }).strict();
11168
- var TenantDataBindingSchema = z13.discriminatedUnion("kind", [
11169
- z13.object({
11170
- kind: z13.literal("data-provider"),
11203
+ var TenantDataBindingSchema = z14.discriminatedUnion("kind", [
11204
+ z14.object({
11205
+ kind: z14.literal("data-provider"),
11171
11206
  providerId: ContractIdentifierSchema,
11172
11207
  domainRef: ContractIdentifierSchema.optional()
11173
11208
  }).strict(),
11174
- z13.object({
11175
- kind: z13.literal("projection"),
11209
+ z14.object({
11210
+ kind: z14.literal("projection"),
11176
11211
  projectionRef: ContractIdentifierSchema,
11177
11212
  domainRef: ContractIdentifierSchema.optional()
11178
11213
  }).strict()
11179
11214
  ]);
11180
- var TenantAuthBindingsSchema = z13.record(
11215
+ var TenantAuthBindingsSchema = z14.record(
11181
11216
  ContractIdentifierSchema,
11182
11217
  TenantAuthBindingSchema
11183
11218
  );
11184
- var TenantDataBindingsSchema = z13.record(
11219
+ var TenantDataBindingsSchema = z14.record(
11185
11220
  ContractIdentifierSchema,
11186
11221
  TenantDataBindingSchema
11187
11222
  );
11188
- var TenantTrendRadarSourceSchema = z13.object({
11223
+ var TenantTrendRadarSourceSchema = z14.object({
11189
11224
  ontologyId: ContractIdentifierSchema,
11190
11225
  viewId: ContractIdentifierSchema
11191
11226
  }).strict();
11192
- var TenantTrendRadarCollectionTargetSchema = z13.object({
11227
+ var TenantTrendRadarCollectionTargetSchema = z14.object({
11193
11228
  ontologyId: ContractIdentifierSchema
11194
11229
  }).strict();
11195
- var TenantTrendRadarSourcesSchema = z13.object({
11230
+ var TenantTrendRadarSourcesSchema = z14.object({
11196
11231
  products: TenantTrendRadarSourceSchema.optional(),
11197
11232
  hotwords: TenantTrendRadarSourceSchema.optional(),
11198
11233
  brands: TenantTrendRadarSourceSchema.optional(),
11199
11234
  collection: TenantTrendRadarCollectionTargetSchema.optional()
11200
11235
  }).strict();
11201
- var AssetVariantsSchema = z13.object({
11202
- light: z13.string().optional(),
11203
- dark: z13.string().optional()
11236
+ var AssetVariantsSchema = z14.object({
11237
+ light: z14.string().optional(),
11238
+ dark: z14.string().optional()
11204
11239
  }).strict();
11205
11240
  var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
11206
11241
  var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
11207
11242
  var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
11208
- var CurrentUserMenuIdentifierSchema = z13.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
11209
- var CurrentUserMenuDisplayTextSchema = z13.union([
11210
- z13.string().trim().min(1),
11211
- z13.record(z13.string().trim().min(1), z13.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
11243
+ var CurrentUserMenuIdentifierSchema = z14.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
11244
+ var CurrentUserMenuDisplayTextSchema = z14.union([
11245
+ z14.string().trim().min(1),
11246
+ z14.record(z14.string().trim().min(1), z14.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
11212
11247
  ]);
11213
- var CurrentUserMenuNavigationItemSchema = z13.object({
11248
+ var CurrentUserMenuNavigationItemSchema = z14.object({
11214
11249
  id: CurrentUserMenuIdentifierSchema,
11215
- kind: z13.literal("navigation"),
11250
+ kind: z14.literal("navigation"),
11216
11251
  ref: CurrentUserMenuIdentifierSchema
11217
11252
  }).strict();
11218
- var CurrentUserMenuControlItemSchema = z13.object({
11253
+ var CurrentUserMenuControlItemSchema = z14.object({
11219
11254
  id: CurrentUserMenuIdentifierSchema,
11220
- kind: z13.literal("control"),
11221
- ref: z13.enum(CURRENT_USER_MENU_CONTROL_REFS)
11255
+ kind: z14.literal("control"),
11256
+ ref: z14.enum(CURRENT_USER_MENU_CONTROL_REFS)
11222
11257
  }).strict();
11223
- var CurrentUserMenuActionItemSchema = z13.object({
11258
+ var CurrentUserMenuActionItemSchema = z14.object({
11224
11259
  id: CurrentUserMenuIdentifierSchema,
11225
- kind: z13.literal("action"),
11226
- ref: z13.enum(CURRENT_USER_MENU_ACTION_REFS),
11227
- tone: z13.enum(["default", "danger"]).optional()
11260
+ kind: z14.literal("action"),
11261
+ ref: z14.enum(CURRENT_USER_MENU_ACTION_REFS),
11262
+ tone: z14.enum(["default", "danger"]).optional()
11228
11263
  }).strict();
11229
- var CurrentUserMenuItemSchema = z13.discriminatedUnion("kind", [
11264
+ var CurrentUserMenuItemSchema = z14.discriminatedUnion("kind", [
11230
11265
  CurrentUserMenuNavigationItemSchema,
11231
11266
  CurrentUserMenuControlItemSchema,
11232
11267
  CurrentUserMenuActionItemSchema
11233
11268
  ]);
11234
- var CurrentUserMenuSectionSchema = z13.object({
11269
+ var CurrentUserMenuSectionSchema = z14.object({
11235
11270
  id: CurrentUserMenuIdentifierSchema,
11236
11271
  label: CurrentUserMenuDisplayTextSchema.optional(),
11237
- dividerBefore: z13.boolean().optional(),
11238
- items: z13.array(CurrentUserMenuItemSchema)
11272
+ dividerBefore: z14.boolean().optional(),
11273
+ items: z14.array(CurrentUserMenuItemSchema)
11239
11274
  }).strict();
11240
- var CurrentUserMenuConfigSchema = z13.object({
11241
- version: z13.literal(1),
11242
- sections: z13.array(CurrentUserMenuSectionSchema).max(20)
11275
+ var CurrentUserMenuConfigSchema = z14.object({
11276
+ version: z14.literal(1),
11277
+ sections: z14.array(CurrentUserMenuSectionSchema).max(20)
11243
11278
  }).strict().superRefine((value, context) => {
11244
11279
  const sectionIds = /* @__PURE__ */ new Set();
11245
11280
  const itemIds = /* @__PURE__ */ new Set();
@@ -11273,7 +11308,7 @@ var CurrentUserMenuConfigSchema = z13.object({
11273
11308
  });
11274
11309
  }
11275
11310
  });
11276
- var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
11311
+ var LegacyCurrentUserMenuProfileSchema = z14.array(z14.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
11277
11312
  const seen = /* @__PURE__ */ new Set();
11278
11313
  value.forEach((item, index) => {
11279
11314
  if (seen.has(item)) {
@@ -11286,73 +11321,73 @@ var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_
11286
11321
  seen.add(item);
11287
11322
  });
11288
11323
  });
11289
- var CurrentUserMenuProfileSchema = z13.union([
11290
- z13.literal("*"),
11324
+ var CurrentUserMenuProfileSchema = z14.union([
11325
+ z14.literal("*"),
11291
11326
  LegacyCurrentUserMenuProfileSchema,
11292
11327
  CurrentUserMenuConfigSchema
11293
11328
  ]);
11294
- var ThemeHeadbarSchema = z13.object({
11295
- theme: z13.enum(["card", "glassy", "ghost"]).optional(),
11296
- navPosition: z13.enum(["left", "center", "right"]).optional(),
11297
- actions: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
11329
+ var ThemeHeadbarSchema = z14.object({
11330
+ theme: z14.enum(["card", "glassy", "ghost"]).optional(),
11331
+ navPosition: z14.enum(["left", "center", "right"]).optional(),
11332
+ actions: z14.union([z14.literal("*"), z14.array(ContractIdentifierSchema)]).optional(),
11298
11333
  profile: CurrentUserMenuProfileSchema.optional(),
11299
- showTeamQuota: z13.boolean().optional()
11334
+ showTeamQuota: z14.boolean().optional()
11300
11335
  }).strict();
11301
- var TenantHeadbarModuleLeafSchema = z13.object({
11336
+ var TenantHeadbarModuleLeafSchema = z14.object({
11302
11337
  id: ContractIdentifierSchema,
11303
- extraInfo: z13.boolean().optional(),
11304
- displayName: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
11305
- visible: z13.boolean().optional(),
11306
- disabled: z13.boolean().optional(),
11307
- icon: z13.string().optional(),
11308
- showQuickSwitcher: z13.boolean().optional(),
11309
- showSidebar: z13.boolean().optional(),
11310
- showContentFrame: z13.boolean().optional()
11338
+ extraInfo: z14.boolean().optional(),
11339
+ displayName: z14.union([z14.string(), z14.record(LocaleIdentifierSchema, z14.string())]).optional(),
11340
+ visible: z14.boolean().optional(),
11341
+ disabled: z14.boolean().optional(),
11342
+ icon: z14.string().optional(),
11343
+ showQuickSwitcher: z14.boolean().optional(),
11344
+ showSidebar: z14.boolean().optional(),
11345
+ showContentFrame: z14.boolean().optional()
11311
11346
  }).strict();
11312
11347
  var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
11313
- children: z13.array(TenantHeadbarModuleLeafSchema).optional()
11314
- }).strict();
11315
- var KernelHeadbarSchema = z13.object({
11316
- theme: z13.literal("card").optional(),
11317
- layoutMode: z13.enum(["boxed", "full-bleed"]).optional(),
11318
- heightPx: z13.number().positive().optional(),
11319
- navPosition: z13.enum(["left", "center", "right"]).optional(),
11320
- brandTitle: z13.string().optional(),
11321
- menuRadius: z13.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
11322
- }).strict();
11323
- var CustomIconSchema = z13.object({
11324
- color: z13.string().optional(),
11325
- url: z13.string().optional(),
11326
- type: z13.enum(["svg", "image"]).optional(),
11327
- hintTextColor: z13.string().optional()
11328
- }).strict();
11329
- var WorkbenchCustomerToolSchema = z13.object({
11348
+ children: z14.array(TenantHeadbarModuleLeafSchema).optional()
11349
+ }).strict();
11350
+ var KernelHeadbarSchema = z14.object({
11351
+ theme: z14.literal("card").optional(),
11352
+ layoutMode: z14.enum(["boxed", "full-bleed"]).optional(),
11353
+ heightPx: z14.number().positive().optional(),
11354
+ navPosition: z14.enum(["left", "center", "right"]).optional(),
11355
+ brandTitle: z14.string().optional(),
11356
+ menuRadius: z14.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
11357
+ }).strict();
11358
+ var CustomIconSchema = z14.object({
11359
+ color: z14.string().optional(),
11360
+ url: z14.string().optional(),
11361
+ type: z14.enum(["svg", "image"]).optional(),
11362
+ hintTextColor: z14.string().optional()
11363
+ }).strict();
11364
+ var WorkbenchCustomerToolSchema = z14.object({
11330
11365
  id: ContractIdentifierSchema,
11331
- label: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
11332
- fixed: z13.boolean().optional()
11366
+ label: z14.union([z14.string(), z14.record(LocaleIdentifierSchema, z14.string())]).optional(),
11367
+ fixed: z14.boolean().optional()
11333
11368
  }).strict();
11334
- var WorkbenchStudioOverrideSchema = z13.object({
11335
- studioName: z13.string().trim().min(1),
11336
- dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
11337
- existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
11338
- historyColumnsDefault: z13.number().int().min(1).max(6).optional()
11369
+ var WorkbenchStudioOverrideSchema = z14.object({
11370
+ studioName: z14.string().trim().min(1),
11371
+ dropdownToolsDefault: z14.array(ContractIdentifierSchema).optional(),
11372
+ existingToolsDefault: z14.array(ContractIdentifierSchema).optional(),
11373
+ historyColumnsDefault: z14.number().int().min(1).max(6).optional()
11339
11374
  }).strict();
11340
- var TenantWorkbenchPageContextSchema = z13.object({
11375
+ var TenantWorkbenchPageContextSchema = z14.object({
11341
11376
  workflow: JsonObjectSchema.optional(),
11342
11377
  agent: JsonObjectSchema.optional(),
11343
11378
  agentId: ContractIdentifierSchema.optional(),
11344
11379
  designProject: JsonObjectSchema.optional(),
11345
11380
  designMetadataId: ContractIdentifierSchema.optional(),
11346
- iframeUrl: z13.string().trim().min(1).optional(),
11347
- info: z13.object({
11381
+ iframeUrl: z14.string().trim().min(1).optional(),
11382
+ info: z14.object({
11348
11383
  displayName: LocalizedTextSchema.optional(),
11349
11384
  description: LocalizedTextSchema.optional(),
11350
- iconUrl: z13.string().trim().min(1).optional()
11385
+ iconUrl: z14.string().trim().min(1).optional()
11351
11386
  }).strict().optional(),
11352
- isBuiltinPinned: z13.boolean().optional(),
11353
- isBuiltinReadonly: z13.boolean().optional()
11387
+ isBuiltinPinned: z14.boolean().optional(),
11388
+ isBuiltinReadonly: z14.boolean().optional()
11354
11389
  }).strict();
11355
- var TenantWorkbenchPageEnvelopeSchema = z13.object({
11390
+ var TenantWorkbenchPageEnvelopeSchema = z14.object({
11356
11391
  definition: PageDefinitionSchema,
11357
11392
  context: TenantWorkbenchPageContextSchema
11358
11393
  }).strict().superRefine(({ definition }, context) => {
@@ -11385,56 +11420,56 @@ var TenantWorkbenchPageEnvelopeSchema = z13.object({
11385
11420
  });
11386
11421
  }
11387
11422
  });
11388
- var TenantWorkbenchPageGroupSchema = z13.object({
11423
+ var TenantWorkbenchPageGroupSchema = z14.object({
11389
11424
  id: ContractIdentifierSchema,
11390
- pageIds: z13.array(ContractIdentifierSchema),
11425
+ pageIds: z14.array(ContractIdentifierSchema),
11391
11426
  displayName: LocalizedTextSchema,
11392
- isBuiltIn: z13.boolean(),
11393
- iconUrl: z13.string().optional(),
11394
- sortIndex: z13.number().int().nullable().optional(),
11427
+ isBuiltIn: z14.boolean(),
11428
+ iconUrl: z14.string().optional(),
11429
+ sortIndex: z14.number().int().nullable().optional(),
11395
11430
  presetRelationId: ContractIdentifierSchema.optional(),
11396
11431
  relationKey: ContractIdentifierSchema.nullable().optional(),
11397
11432
  studioId: ContractIdentifierSchema.optional()
11398
11433
  }).strict();
11399
- var TenantWorkbenchConfigSchema = z13.object({
11400
- pages: z13.array(TenantWorkbenchPageEnvelopeSchema),
11401
- pageGroups: z13.array(TenantWorkbenchPageGroupSchema),
11402
- catalog: z13.object({ enabled: z13.boolean().optional(), defaultEntry: z13.boolean().optional() }).strict().optional(),
11403
- quickSwitcherMaxItems: z13.number().int().nonnegative().optional(),
11404
- defaultOrder: z13.object({
11405
- groups: z13.array(ContractIdentifierSchema),
11406
- pages: z13.record(ContractIdentifierSchema, z13.array(ContractIdentifierSchema))
11434
+ var TenantWorkbenchConfigSchema = z14.object({
11435
+ pages: z14.array(TenantWorkbenchPageEnvelopeSchema),
11436
+ pageGroups: z14.array(TenantWorkbenchPageGroupSchema),
11437
+ catalog: z14.object({ enabled: z14.boolean().optional(), defaultEntry: z14.boolean().optional() }).strict().optional(),
11438
+ quickSwitcherMaxItems: z14.number().int().nonnegative().optional(),
11439
+ defaultOrder: z14.object({
11440
+ groups: z14.array(ContractIdentifierSchema),
11441
+ pages: z14.record(ContractIdentifierSchema, z14.array(ContractIdentifierSchema))
11407
11442
  }).strict().optional(),
11408
- customers: z13.object({
11409
- dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
11410
- layoutManagerTools: z13.array(WorkbenchCustomerToolSchema).optional(),
11411
- studioTabsMode: z13.enum(["dropdown", "tabs"]).optional(),
11412
- historyWatermark: z13.object({
11413
- svgUrl: z13.string().optional(),
11414
- coverage: z13.array(z13.enum(["list", "detail", "download"])).optional(),
11415
- maxLongEdgeRatio: z13.number().positive().optional(),
11416
- sizing: z13.object({
11443
+ customers: z14.object({
11444
+ dropdownToolsDefault: z14.array(ContractIdentifierSchema).optional(),
11445
+ layoutManagerTools: z14.array(WorkbenchCustomerToolSchema).optional(),
11446
+ studioTabsMode: z14.enum(["dropdown", "tabs"]).optional(),
11447
+ historyWatermark: z14.object({
11448
+ svgUrl: z14.string().optional(),
11449
+ coverage: z14.array(z14.enum(["list", "detail", "download"])).optional(),
11450
+ maxLongEdgeRatio: z14.number().positive().optional(),
11451
+ sizing: z14.object({
11417
11452
  mode: ContractIdentifierSchema,
11418
- heightRatio: z13.number().positive().optional(),
11419
- minHeightPx: z13.number().nonnegative().optional(),
11420
- maxHeightPx: z13.number().nonnegative().optional()
11453
+ heightRatio: z14.number().positive().optional(),
11454
+ minHeightPx: z14.number().nonnegative().optional(),
11455
+ maxHeightPx: z14.number().nonnegative().optional()
11421
11456
  }).strict().optional(),
11422
- enhance: z13.object({
11423
- enabled: z13.boolean().optional(),
11424
- backgroundLumaThreshold: z13.number().min(0).max(1).optional(),
11425
- stroke: z13.object({
11426
- color: z13.string().optional(),
11427
- opacity: z13.number().min(0).max(1).optional(),
11428
- widthRatio: z13.number().nonnegative().optional(),
11429
- blurRatio: z13.number().nonnegative().optional(),
11430
- steps: z13.number().int().positive().optional()
11457
+ enhance: z14.object({
11458
+ enabled: z14.boolean().optional(),
11459
+ backgroundLumaThreshold: z14.number().min(0).max(1).optional(),
11460
+ stroke: z14.object({
11461
+ color: z14.string().optional(),
11462
+ opacity: z14.number().min(0).max(1).optional(),
11463
+ widthRatio: z14.number().nonnegative().optional(),
11464
+ blurRatio: z14.number().nonnegative().optional(),
11465
+ steps: z14.number().int().positive().optional()
11431
11466
  }).strict().optional()
11432
11467
  }).strict().optional()
11433
11468
  }).strict().optional(),
11434
- layoutManagerEnabled: z13.boolean().optional(),
11435
- existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
11436
- historyColumnsDefault: z13.number().int().min(1).max(6).optional(),
11437
- studioOverrides: z13.array(WorkbenchStudioOverrideSchema).optional()
11469
+ layoutManagerEnabled: z14.boolean().optional(),
11470
+ existingToolsDefault: z14.array(ContractIdentifierSchema).optional(),
11471
+ historyColumnsDefault: z14.number().int().min(1).max(6).optional(),
11472
+ studioOverrides: z14.array(WorkbenchStudioOverrideSchema).optional()
11438
11473
  }).strict().optional()
11439
11474
  }).strict().superRefine(({ pages, pageGroups }, context) => {
11440
11475
  const pageIds = pages.map(({ definition }) => definition.pageId);
@@ -11458,38 +11493,38 @@ var TenantWorkbenchConfigSchema = z13.object({
11458
11493
  });
11459
11494
  });
11460
11495
  });
11461
- var LoginPageSchema = z13.object({
11462
- background: z13.object({ imageUrl: z13.string().optional(), gradient: z13.string().optional() }).strict().optional(),
11463
- logo: z13.object({
11464
- url: z13.string().optional(),
11465
- lightUrl: z13.string().optional(),
11466
- darkUrl: z13.string().optional(),
11467
- position: z13.enum(["top", "middle", "bottom"]).optional(),
11468
- scale: z13.number().positive().optional()
11496
+ var LoginPageSchema = z14.object({
11497
+ background: z14.object({ imageUrl: z14.string().optional(), gradient: z14.string().optional() }).strict().optional(),
11498
+ logo: z14.object({
11499
+ url: z14.string().optional(),
11500
+ lightUrl: z14.string().optional(),
11501
+ darkUrl: z14.string().optional(),
11502
+ position: z14.enum(["top", "middle", "bottom"]).optional(),
11503
+ scale: z14.number().positive().optional()
11469
11504
  }).strict().optional(),
11470
- customCss: z13.string().optional()
11505
+ customCss: z14.string().optional()
11471
11506
  }).strict();
11472
11507
  var LandingPageHeadbarConfigShape = {
11473
- headbarMode: z13.enum(["shared", "hidden"]).optional()
11508
+ headbarMode: z14.enum(["shared", "hidden"]).optional()
11474
11509
  };
11475
- var LandingPageDefaultConfigSchema = z13.object({
11476
- mode: z13.literal("default"),
11510
+ var LandingPageDefaultConfigSchema = z14.object({
11511
+ mode: z14.literal("default"),
11477
11512
  ...LandingPageHeadbarConfigShape
11478
11513
  }).strict();
11479
- var LandingPageMarkdownConfigSchema = z13.object({
11480
- mode: z13.literal("markdown"),
11481
- content: z13.string(),
11514
+ var LandingPageMarkdownConfigSchema = z14.object({
11515
+ mode: z14.literal("markdown"),
11516
+ content: z14.string(),
11482
11517
  ...LandingPageHeadbarConfigShape
11483
11518
  }).strict();
11484
- var LandingPageHtmlConfigSchema = z13.object({
11485
- mode: z13.literal("html"),
11486
- content: z13.string(),
11519
+ var LandingPageHtmlConfigSchema = z14.object({
11520
+ mode: z14.literal("html"),
11521
+ content: z14.string(),
11487
11522
  ...LandingPageHeadbarConfigShape
11488
11523
  }).strict();
11489
- var LandingPageIframeConfigSchema = z13.object({
11490
- mode: z13.literal("iframe"),
11524
+ var LandingPageIframeConfigSchema = z14.object({
11525
+ mode: z14.literal("iframe"),
11491
11526
  ...LandingPageHeadbarConfigShape,
11492
- url: z13.string().refine((value) => {
11527
+ url: z14.string().refine((value) => {
11493
11528
  if (/^\/(?!\/)/.test(value)) {
11494
11529
  return !value.includes("\\");
11495
11530
  }
@@ -11501,473 +11536,480 @@ var LandingPageIframeConfigSchema = z13.object({
11501
11536
  }
11502
11537
  }, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
11503
11538
  }).strict();
11504
- var TenantLandingPageConfigSchema = z13.discriminatedUnion("mode", [
11539
+ var TenantLandingPageConfigSchema = z14.discriminatedUnion("mode", [
11505
11540
  LandingPageDefaultConfigSchema,
11506
11541
  LandingPageMarkdownConfigSchema,
11507
11542
  LandingPageHtmlConfigSchema,
11508
11543
  LandingPageIframeConfigSchema
11509
11544
  ]);
11510
- var TenantApplicationConfigSchema = z13.object({
11511
- theme: z13.object({
11512
- id: z13.string().optional(),
11513
- name: z13.string().optional(),
11514
- title: z13.string().optional(),
11545
+ var TenantApplicationConfigSchema = z14.object({
11546
+ theme: z14.object({
11547
+ id: z14.string().optional(),
11548
+ name: z14.string().optional(),
11549
+ title: z14.string().optional(),
11515
11550
  favicon: AssetVariantsSchema.optional(),
11516
11551
  logo: AssetVariantsSchema.optional(),
11517
- pwaIcon: z13.string().optional(),
11518
- form: z13.object({ variant: z13.enum(["bento", "ghost"]) }).strict().optional(),
11519
- toast: z13.object({
11520
- position: z13.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
11552
+ pwaIcon: z14.string().optional(),
11553
+ form: z14.object({ variant: z14.enum(["bento", "ghost"]) }).strict().optional(),
11554
+ toast: z14.object({
11555
+ position: z14.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
11521
11556
  }).strict().optional(),
11522
- icons: z13.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
11523
- views: z13.object({
11524
- form: z13.object({
11525
- toast: z13.object({ afterCreate: z13.boolean(), afterDelete: z13.boolean() }).strict(),
11526
- progress: z13.enum(["estimate", "infinite"]),
11527
- onlyResult: z13.boolean(),
11528
- tabular: z13.object({ theme: z13.enum(["default", "tentiary", "primary"]) }).strict()
11557
+ icons: z14.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
11558
+ views: z14.object({
11559
+ form: z14.object({
11560
+ toast: z14.object({ afterCreate: z14.boolean(), afterDelete: z14.boolean() }).strict(),
11561
+ progress: z14.enum(["estimate", "infinite"]),
11562
+ onlyResult: z14.boolean(),
11563
+ tabular: z14.object({ theme: z14.enum(["default", "tentiary", "primary"]) }).strict()
11529
11564
  }).strict()
11530
11565
  }).strict().optional(),
11531
11566
  loginPage: LoginPageSchema.optional(),
11532
- extraLanguageURL: z13.record(z13.string(), z13.string()).optional(),
11533
- hideSpaceHeader: z13.boolean().optional(),
11534
- showSidebarTeamSelector: z13.boolean().optional(),
11535
- showWorkbenchSidebar: z13.boolean().optional(),
11536
- workbenchViewTheme: z13.enum(["default", "bsd-blue"]).optional(),
11537
- defaults: z13.object({
11538
- showFormInImageDetail: z13.boolean().optional(),
11539
- darkMode: z13.enum(["light", "dark", "auto"]).optional(),
11540
- language: z13.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
11541
- showDarkModeToggle: z13.boolean().optional(),
11542
- showLanguageToggle: z13.boolean().optional()
11567
+ extraLanguageURL: z14.record(z14.string(), z14.string()).optional(),
11568
+ hideSpaceHeader: z14.boolean().optional(),
11569
+ showSidebarTeamSelector: z14.boolean().optional(),
11570
+ showWorkbenchSidebar: z14.boolean().optional(),
11571
+ workbenchViewTheme: z14.enum(["default", "bsd-blue"]).optional(),
11572
+ defaults: z14.object({
11573
+ showFormInImageDetail: z14.boolean().optional(),
11574
+ darkMode: z14.enum(["light", "dark", "auto"]).optional(),
11575
+ language: z14.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
11576
+ showDarkModeToggle: z14.boolean().optional(),
11577
+ showLanguageToggle: z14.boolean().optional()
11543
11578
  }).strict().optional(),
11544
- modules: z13.object({
11545
- monkeysSpaceSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
11546
- monkeysSpaceHeadbar: z13.union([
11547
- z13.literal("*"),
11548
- z13.array(TenantHeadbarModuleItemSchema)
11579
+ modules: z14.object({
11580
+ monkeysSpaceSidebar: z14.union([z14.literal("*"), z14.array(ContractIdentifierSchema)]).optional(),
11581
+ monkeysSpaceHeadbar: z14.union([
11582
+ z14.literal("*"),
11583
+ z14.array(TenantHeadbarModuleItemSchema)
11549
11584
  ]).optional(),
11550
- settingsSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional()
11585
+ settingsSidebar: z14.union([z14.literal("*"), z14.array(ContractIdentifierSchema)]).optional()
11551
11586
  }).strict().optional(),
11552
11587
  headbar: ThemeHeadbarSchema.optional(),
11553
- kernelLayout: z13.object({
11554
- navigationMode: z13.enum(["sidebar", "topbar"]).optional(),
11555
- allowNavigationModeSwitch: z13.boolean().optional(),
11588
+ kernelLayout: z14.object({
11589
+ navigationMode: z14.enum(["sidebar", "topbar"]).optional(),
11590
+ allowNavigationModeSwitch: z14.boolean().optional(),
11556
11591
  headbar: KernelHeadbarSchema.optional()
11557
11592
  }).strict().optional(),
11558
- paginationPosition: z13.enum(["left", "right"]).optional(),
11559
- ugcViewIconOnlyMode: z13.boolean().optional(),
11560
- workflowPreviewExecutionGrid: z13.object({
11561
- selectionModeDisplayType: z13.enum(["operation-button", "dropdown-menu"]).optional(),
11562
- clickBehavior: z13.enum(["preview", "select", "fill-form", "none"]).optional(),
11563
- showErrorFilter: z13.boolean().optional(),
11564
- displayType: z13.enum(["grid", "masonry"]).optional(),
11565
- showDetailButton: z13.boolean().optional()
11593
+ paginationPosition: z14.enum(["left", "right"]).optional(),
11594
+ ugcViewIconOnlyMode: z14.boolean().optional(),
11595
+ workflowPreviewExecutionGrid: z14.object({
11596
+ selectionModeDisplayType: z14.enum(["operation-button", "dropdown-menu"]).optional(),
11597
+ clickBehavior: z14.enum(["preview", "select", "fill-form", "none"]).optional(),
11598
+ showErrorFilter: z14.boolean().optional(),
11599
+ displayType: z14.enum(["grid", "masonry"]).optional(),
11600
+ showDetailButton: z14.boolean().optional()
11601
+ }).strict().optional(),
11602
+ workbenchSidebarDefaultOpen: z14.boolean().optional(),
11603
+ workbenchSidebarMoreAction: z14.boolean().optional(),
11604
+ workbenchSidebarApart: z14.boolean().optional(),
11605
+ workbenchSidebarToggleGroupDetail: z14.boolean().optional(),
11606
+ workbenchSidebarViewType: z14.boolean().optional(),
11607
+ workbenchSidebarFormViewEmbed: z14.boolean().optional(),
11608
+ workbenchSidebarModernMode: z14.boolean().optional(),
11609
+ ugc: z14.object({ onItemClick: z14.boolean(), subtitle: z14.boolean().optional() }).strict().optional(),
11610
+ uniImagePreview: z14.boolean().optional(),
11611
+ imagePreviewStyle: z14.union([z14.literal(false), z14.enum(["simple", "normal", "uni"])]).optional(),
11612
+ teamAsUser: z14.boolean().optional(),
11613
+ themeMode: z14.enum(["shadow", "border"]).optional(),
11614
+ density: z14.enum(["compact", "default", "comfortable"]).optional(),
11615
+ statusStates: z14.object({
11616
+ loading: z14.object({ variant: z14.enum(["spinner", "skeleton"]).optional() }).strict().optional(),
11617
+ empty: z14.object({ variant: z14.enum(["default", "compact"]).optional() }).strict().optional(),
11618
+ error: z14.object({ showRetry: z14.boolean().optional() }).strict().optional(),
11619
+ permission: z14.object({ showRequestAccess: z14.boolean().optional() }).strict().optional(),
11620
+ density: z14.enum(["compact", "default", "comfortable"]).optional()
11566
11621
  }).strict().optional(),
11567
- workbenchSidebarDefaultOpen: z13.boolean().optional(),
11568
- workbenchSidebarMoreAction: z13.boolean().optional(),
11569
- workbenchSidebarApart: z13.boolean().optional(),
11570
- workbenchSidebarToggleGroupDetail: z13.boolean().optional(),
11571
- workbenchSidebarViewType: z13.boolean().optional(),
11572
- workbenchSidebarFormViewEmbed: z13.boolean().optional(),
11573
- workbenchSidebarModernMode: z13.boolean().optional(),
11574
- ugc: z13.object({ onItemClick: z13.boolean(), subtitle: z13.boolean().optional() }).strict().optional(),
11575
- uniImagePreview: z13.boolean().optional(),
11576
- imagePreviewStyle: z13.union([z13.literal(false), z13.enum(["simple", "normal", "uni"])]).optional(),
11577
- teamAsUser: z13.boolean().optional(),
11578
- themeMode: z13.enum(["shadow", "border"]).optional(),
11579
- density: z13.enum(["compact", "default", "comfortable"]).optional(),
11580
- pageZoom: z13.number().positive().optional(),
11581
- miniMode: z13.object({ showPreviewViewExecutionResultGrid: z13.boolean() }).strict().optional(),
11582
- workflow: z13.object({ allowConcurrentRuns: z13.boolean() }).strict().optional(),
11583
- historyResult: z13.object({ display: z13.boolean() }).strict().optional(),
11584
- uploader: z13.object({
11585
- orientation: z13.enum(["vertical", "horizontal"]),
11586
- pasteButton: z13.boolean(),
11587
- statusText: z13.boolean()
11622
+ pageZoom: z14.number().positive().optional(),
11623
+ miniMode: z14.object({ showPreviewViewExecutionResultGrid: z14.boolean() }).strict().optional(),
11624
+ workflow: z14.object({ allowConcurrentRuns: z14.boolean() }).strict().optional(),
11625
+ historyResult: z14.object({ display: z14.boolean() }).strict().optional(),
11626
+ uploader: z14.object({
11627
+ orientation: z14.enum(["vertical", "horizontal"]),
11628
+ pasteButton: z14.boolean(),
11629
+ statusText: z14.boolean()
11588
11630
  }).strict().optional(),
11589
- designProjects: z13.object({
11590
- oneOnOne: z13.boolean(),
11591
- newTabOpenBoard: z13.boolean(),
11592
- defaultShowGrid: z13.boolean().optional(),
11593
- createDefaultFrame: z13.boolean(),
11594
- showPageMenu: z13.boolean(),
11595
- showMainMenu: z13.boolean(),
11596
- showStylePanel: z13.boolean(),
11597
- showToolbar: z13.boolean(),
11598
- toolbarPosition: z13.enum(["bottom", "left"]).optional(),
11599
- showContextMenu: z13.boolean(),
11600
- showActionsMenu: z13.boolean(),
11601
- showPageAndLayerSidebar: z13.boolean().optional(),
11602
- showBoardOperationSidebar: z13.boolean().optional(),
11603
- showMiniToolsToolbar: z13.boolean().optional(),
11604
- showRightSidebar: z13.boolean().optional(),
11605
- showRealtimeDrawing: z13.boolean().optional(),
11606
- showWorkflow: z13.boolean().optional(),
11607
- showVersionManager: z13.boolean().optional(),
11608
- showAgent: z13.boolean().optional(),
11609
- AgentTools: z13.array(ContractIdentifierSchema).optional()
11631
+ designProjects: z14.object({
11632
+ oneOnOne: z14.boolean(),
11633
+ newTabOpenBoard: z14.boolean(),
11634
+ defaultShowGrid: z14.boolean().optional(),
11635
+ createDefaultFrame: z14.boolean(),
11636
+ showPageMenu: z14.boolean(),
11637
+ showMainMenu: z14.boolean(),
11638
+ showStylePanel: z14.boolean(),
11639
+ showToolbar: z14.boolean(),
11640
+ toolbarPosition: z14.enum(["bottom", "left"]).optional(),
11641
+ showContextMenu: z14.boolean(),
11642
+ showActionsMenu: z14.boolean(),
11643
+ showPageAndLayerSidebar: z14.boolean().optional(),
11644
+ showBoardOperationSidebar: z14.boolean().optional(),
11645
+ showMiniToolsToolbar: z14.boolean().optional(),
11646
+ showRightSidebar: z14.boolean().optional(),
11647
+ showRealtimeDrawing: z14.boolean().optional(),
11648
+ showWorkflow: z14.boolean().optional(),
11649
+ showVersionManager: z14.boolean().optional(),
11650
+ showAgent: z14.boolean().optional(),
11651
+ AgentTools: z14.array(ContractIdentifierSchema).optional()
11610
11652
  }).strict().optional(),
11611
11653
  workbench: TenantWorkbenchConfigSchema.optional(),
11612
- visionProWorkflows: z13.array(ContractIdentifierSchema).optional(),
11613
- initTeam: z13.boolean().optional(),
11614
- imageThumbnail: z13.boolean().optional(),
11615
- pages: z13.object({
11616
- allowPageKeys: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
11654
+ visionProWorkflows: z14.array(ContractIdentifierSchema).optional(),
11655
+ initTeam: z14.boolean().optional(),
11656
+ imageThumbnail: z14.boolean().optional(),
11657
+ pages: z14.object({
11658
+ allowPageKeys: z14.union([z14.literal("*"), z14.array(ContractIdentifierSchema)]),
11617
11659
  defaultPageKey: ContractIdentifierSchema.optional(),
11618
- homeEntryEnabled: z13.boolean().optional()
11660
+ homeEntryEnabled: z14.boolean().optional()
11619
11661
  }).strict().optional(),
11620
- agent: z13.object({
11662
+ agent: z14.object({
11621
11663
  logo: AssetVariantsSchema.optional(),
11622
- brandDisplayMode: z13.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
11623
- density: z13.enum(["compact", "default", "comfortable"]).optional(),
11624
- sessionCentric: z13.boolean().optional(),
11625
- quickStartEnabled: z13.boolean().optional()
11664
+ brandDisplayMode: z14.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
11665
+ density: z14.enum(["compact", "default", "comfortable"]).optional(),
11666
+ sessionCentric: z14.boolean().optional(),
11667
+ quickStartEnabled: z14.boolean().optional()
11626
11668
  }).strict().optional()
11627
11669
  }).strict(),
11628
11670
  landingPage: TenantLandingPageConfigSchema.optional(),
11629
- auth: z13.object({
11630
- enabled: z13.array(ContractIdentifierSchema).default([]),
11631
- oidc: z13.object({ buttonText: z13.string().optional(), autoSignin: z13.boolean().optional() }).strict().optional(),
11632
- password: z13.object({ disableAutoRegister: z13.boolean().optional() }).strict().optional(),
11633
- hideAuthToast: z13.boolean().optional(),
11634
- autoReload: z13.boolean().optional(),
11635
- defaultOtherTeam: z13.boolean().optional()
11671
+ auth: z14.object({
11672
+ enabled: z14.array(ContractIdentifierSchema).default([]),
11673
+ oidc: z14.object({ buttonText: z14.string().optional(), autoSignin: z14.boolean().optional() }).strict().optional(),
11674
+ password: z14.object({ disableAutoRegister: z14.boolean().optional() }).strict().optional(),
11675
+ hideAuthToast: z14.boolean().optional(),
11676
+ autoReload: z14.boolean().optional(),
11677
+ defaultOtherTeam: z14.boolean().optional()
11636
11678
  }).strict(),
11637
- endpoints: z13.record(ContractIdentifierSchema, z13.string()),
11638
- module: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
11639
- behavior: z13.object({
11640
- clearWorkflowFormStorageAfterUpdate: z13.boolean().optional(),
11641
- autoApproveOAuth: z13.boolean().optional(),
11642
- rememberWorkflowModelSelection: z13.boolean().optional()
11679
+ endpoints: z14.record(ContractIdentifierSchema, z14.string()),
11680
+ module: z14.union([z14.literal("*"), z14.array(ContractIdentifierSchema)]),
11681
+ behavior: z14.object({
11682
+ clearWorkflowFormStorageAfterUpdate: z14.boolean().optional(),
11683
+ autoApproveOAuth: z14.boolean().optional(),
11684
+ rememberWorkflowModelSelection: z14.boolean().optional()
11643
11685
  }).strict(),
11644
- dataManagement: z13.object({
11645
- favoriteOntologyId: z13.string().optional(),
11646
- pairedOntologyId: z13.string().optional(),
11647
- galleryOntologyIds: z13.array(ContractIdentifierSchema).max(20).optional(),
11648
- galleryOntologyId: z13.string().optional(),
11649
- dataBrowserDefaultOntologyId: z13.string().optional(),
11650
- workflowResultOntologyId: z13.string().optional(),
11651
- homeAdvertisement: z13.object({
11686
+ dataManagement: z14.object({
11687
+ favoriteOntologyId: z14.string().optional(),
11688
+ pairedOntologyId: z14.string().optional(),
11689
+ galleryOntologyIds: z14.array(ContractIdentifierSchema).max(20).optional(),
11690
+ galleryOntologyId: z14.string().optional(),
11691
+ dataBrowserDefaultOntologyId: z14.string().optional(),
11692
+ workflowResultOntologyId: z14.string().optional(),
11693
+ homeAdvertisement: z14.object({
11652
11694
  ontologyId: ContractIdentifierSchema,
11653
11695
  viewId: ContractIdentifierSchema.optional(),
11654
- viewType: z13.enum(["filter", "container", "share_link"]).optional(),
11696
+ viewType: z14.enum(["filter", "container", "share_link"]).optional(),
11655
11697
  teamId: ContractIdentifierSchema.optional(),
11656
- teamOnly: z13.boolean().optional(),
11657
- pageSize: z13.number().int().positive().optional(),
11658
- sortBy: z13.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
11659
- sortOrder: z13.enum(["asc", "desc"]).optional(),
11660
- fieldMap: z13.record(z13.string(), z13.string()).optional(),
11661
- columnIds: z13.record(z13.string(), z13.string()).optional()
11698
+ teamOnly: z14.boolean().optional(),
11699
+ pageSize: z14.number().int().positive().optional(),
11700
+ sortBy: z14.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
11701
+ sortOrder: z14.enum(["asc", "desc"]).optional(),
11702
+ fieldMap: z14.record(z14.string(), z14.string()).optional(),
11703
+ columnIds: z14.record(z14.string(), z14.string()).optional()
11662
11704
  }).strict().optional(),
11663
- homeTrendAssistant: z13.object({
11705
+ homeTrendAssistant: z14.object({
11664
11706
  ontologyId: ContractIdentifierSchema.optional(),
11665
11707
  viewId: ContractIdentifierSchema.optional(),
11666
11708
  viewInstanceId: ContractIdentifierSchema.optional(),
11667
- viewName: z13.string().optional(),
11709
+ viewName: z14.string().optional(),
11668
11710
  teamId: ContractIdentifierSchema.optional(),
11669
11711
  designOptionsWorkflowId: ContractIdentifierSchema.optional(),
11670
- tep: z13.object({ baseUrl: z13.string().optional(), timeoutMs: z13.number().int().positive().optional() }).strict().optional(),
11671
- runtime: z13.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z13.boolean(), tepAuthorizationConfigured: z13.boolean(), tepCookieConfigured: z13.boolean() }).strict().optional()
11712
+ tep: z14.object({ baseUrl: z14.string().optional(), timeoutMs: z14.number().int().positive().optional() }).strict().optional(),
11713
+ runtime: z14.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z14.boolean(), tepAuthorizationConfigured: z14.boolean(), tepCookieConfigured: z14.boolean() }).strict().optional()
11672
11714
  }).strict().optional(),
11673
11715
  trendRadar: TenantTrendRadarSourcesSchema.optional(),
11674
- sharing: z13.object({
11675
- silentViewLinks: z13.object({ enabled: z13.boolean().optional(), placement: z13.object({ mode: z13.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
11676
- shareAccess: z13.object({ publicLinksEnabled: z13.boolean().optional(), passwordGateEnabled: z13.boolean().optional(), passwordAccessTtlSeconds: z13.number().int().positive().optional(), defaultViewTreeDelivery: z13.enum(["manual", "auto"]).optional() }).strict().optional(),
11677
- shareDialog: z13.object({
11678
- audience: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["user", "team", "public"])).optional(), default: z13.enum(["user", "team", "public"]).optional() }).strict().optional(),
11679
- accessLevel: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["read", "write"])).optional(), default: z13.enum(["read", "write"]).optional() }).strict().optional(),
11680
- viewTreeDelivery: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["manual", "auto"])).optional(), default: z13.enum(["manual", "auto"]).optional() }).strict().optional()
11716
+ sharing: z14.object({
11717
+ silentViewLinks: z14.object({ enabled: z14.boolean().optional(), placement: z14.object({ mode: z14.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
11718
+ shareAccess: z14.object({ publicLinksEnabled: z14.boolean().optional(), passwordGateEnabled: z14.boolean().optional(), passwordAccessTtlSeconds: z14.number().int().positive().optional(), defaultViewTreeDelivery: z14.enum(["manual", "auto"]).optional() }).strict().optional(),
11719
+ shareDialog: z14.object({
11720
+ audience: z14.object({ enabled: z14.boolean().optional(), allowed: z14.array(z14.enum(["user", "team", "public"])).optional(), default: z14.enum(["user", "team", "public"]).optional() }).strict().optional(),
11721
+ accessLevel: z14.object({ enabled: z14.boolean().optional(), allowed: z14.array(z14.enum(["read", "write"])).optional(), default: z14.enum(["read", "write"]).optional() }).strict().optional(),
11722
+ viewTreeDelivery: z14.object({ enabled: z14.boolean().optional(), allowed: z14.array(z14.enum(["manual", "auto"])).optional(), default: z14.enum(["manual", "auto"]).optional() }).strict().optional()
11681
11723
  }).strict().optional()
11682
11724
  }).strict().optional()
11683
11725
  }).strict().optional(),
11684
- compute: z13.object({
11685
- integrations: z13.object({
11686
- harbor: z13.object({ endpoint: z13.string().optional(), projectScopes: z13.array(z13.string()).optional(), authMode: z13.string().optional(), principal: z13.string().optional(), autoSync: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional(),
11687
- gitlab: z13.object({ baseUrl: z13.string().optional(), groupScopes: z13.array(z13.string()).optional(), tokenMode: z13.string().optional(), deployProjectPath: z13.string().optional(), deploymentReportsEnabled: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional(),
11688
- kubernetes: z13.object({ accessMode: z13.string().optional(), clusterAlias: z13.string().optional(), agentProjectPath: z13.string().optional(), agentName: z13.string().optional(), namespaceScopes: z13.array(z13.string()).optional(), rolloutObserverEnabled: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional()
11726
+ compute: z14.object({
11727
+ integrations: z14.object({
11728
+ harbor: z14.object({ endpoint: z14.string().optional(), projectScopes: z14.array(z14.string()).optional(), authMode: z14.string().optional(), principal: z14.string().optional(), autoSync: z14.boolean().optional(), proxyUrl: z14.string().optional() }).strict().optional(),
11729
+ gitlab: z14.object({ baseUrl: z14.string().optional(), groupScopes: z14.array(z14.string()).optional(), tokenMode: z14.string().optional(), deployProjectPath: z14.string().optional(), deploymentReportsEnabled: z14.boolean().optional(), proxyUrl: z14.string().optional() }).strict().optional(),
11730
+ kubernetes: z14.object({ accessMode: z14.string().optional(), clusterAlias: z14.string().optional(), agentProjectPath: z14.string().optional(), agentName: z14.string().optional(), namespaceScopes: z14.array(z14.string()).optional(), rolloutObserverEnabled: z14.boolean().optional(), proxyUrl: z14.string().optional() }).strict().optional()
11689
11731
  }).strict().optional()
11690
11732
  }).strict().optional(),
11691
- data: z13.object({}).strict().optional(),
11692
- storage: z13.object({
11693
- presignMode: z13.enum(["frontend", "backend", "both"]).optional(),
11694
- presign: z13.object({
11695
- expiresInSeconds: z13.number().int().positive(),
11696
- buckets: z13.array(
11697
- z13.object({
11733
+ data: z14.object({}).strict().optional(),
11734
+ storage: z14.object({
11735
+ presignMode: z14.enum(["frontend", "backend", "both"]).optional(),
11736
+ presign: z14.object({
11737
+ expiresInSeconds: z14.number().int().positive(),
11738
+ buckets: z14.array(
11739
+ z14.object({
11698
11740
  id: ContractIdentifierSchema,
11699
11741
  provider: ContractIdentifierSchema,
11700
11742
  preferredUrlPatternId: ContractIdentifierSchema,
11701
- urlPatterns: z13.array(
11702
- z13.object({
11743
+ urlPatterns: z14.array(
11744
+ z14.object({
11703
11745
  id: ContractIdentifierSchema,
11704
- type: z13.enum(["bucket-hostname", "provider-hostname"]),
11705
- hostname: z13.string().trim().min(1),
11706
- preferred: z13.boolean().optional(),
11707
- bucketSegment: z13.string().optional()
11746
+ type: z14.enum(["bucket-hostname", "provider-hostname"]),
11747
+ hostname: z14.string().trim().min(1),
11748
+ preferred: z14.boolean().optional(),
11749
+ bucketSegment: z14.string().optional()
11708
11750
  }).strict()
11709
11751
  )
11710
11752
  }).strict()
11711
11753
  )
11712
11754
  }).strict().optional()
11713
11755
  }).strict().optional(),
11714
- monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
11756
+ monkeyData: z14.object({ baseUrl: z14.string().optional() }).strict().optional()
11715
11757
  }).strict();
11716
- var TenantProductConfigSchema = z13.object({
11717
- contract: z13.literal("TenantProductConfig"),
11758
+ var TenantProductConfigSchema = z14.object({
11759
+ contract: z14.literal("TenantProductConfig"),
11718
11760
  tenantId: ContractIdentifierSchema,
11719
11761
  appId: ContractIdentifierSchema,
11720
11762
  environment: ContractIdentifierSchema,
11721
11763
  designTokens: TenantDesignTokensConfigSchema,
11722
- moduleRefs: z13.array(ContractIdentifierSchema).default([]),
11723
- pageRefs: z13.array(ContractIdentifierSchema).default([]),
11724
- featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
11764
+ moduleRefs: z14.array(ContractIdentifierSchema).default([]),
11765
+ pageRefs: z14.array(ContractIdentifierSchema).default([]),
11766
+ featureFlags: z14.record(z14.string(), z14.boolean()).default({}),
11725
11767
  authBinding: TenantAuthBindingsSchema,
11726
11768
  dataBinding: TenantDataBindingsSchema,
11727
- sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
11728
- warnings: z13.array(z13.string()).default([]),
11769
+ sourceMap: z14.record(z14.string(), ContractIdentifierSchema),
11770
+ warnings: z14.array(z14.string()).default([]),
11729
11771
  menus: MenuDefinitionSetSchema.optional(),
11730
11772
  applicationConfig: TenantApplicationConfigSchema
11731
11773
  }).strict();
11732
- var TenantRuntimeConfigSchema = z13.object({
11733
- contract: z13.literal("TenantRuntimeConfig"),
11774
+ var TenantRuntimeConfigSchema = z14.object({
11775
+ contract: z14.literal("TenantRuntimeConfig"),
11734
11776
  tenantId: ContractIdentifierSchema,
11735
11777
  appId: ContractIdentifierSchema,
11736
11778
  environment: ContractIdentifierSchema,
11737
11779
  designTokens: ResolvedThemeTokensSchema,
11738
- moduleRefs: z13.array(ContractIdentifierSchema).default([]),
11739
- pageRefs: z13.array(ContractIdentifierSchema).default([]),
11740
- featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
11780
+ moduleRefs: z14.array(ContractIdentifierSchema).default([]),
11781
+ pageRefs: z14.array(ContractIdentifierSchema).default([]),
11782
+ featureFlags: z14.record(z14.string(), z14.boolean()).default({}),
11741
11783
  authBinding: TenantAuthBindingsSchema,
11742
11784
  dataBinding: TenantDataBindingsSchema,
11743
- sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
11744
- warnings: z13.array(z13.string()).default([]),
11785
+ sourceMap: z14.record(z14.string(), ContractIdentifierSchema),
11786
+ warnings: z14.array(z14.string()).default([]),
11745
11787
  menuBundle: MenuRuntimeBundleSchema.optional(),
11746
11788
  applicationConfig: TenantApplicationConfigSchema
11747
11789
  }).strict();
11748
11790
 
11749
11791
  // src/contracts/trend.ts
11750
- import { z as z14 } from "zod";
11751
- var RadarDecisionMetricsSchema = z14.object({
11752
- currentSales: z14.number().finite(),
11753
- forecastSales: z14.number().finite(),
11754
- searchHeat: z14.number().finite(),
11755
- socialHeat: z14.number().finite(),
11756
- confidence: z14.number().min(0).max(1)
11757
- }).strict();
11758
- var TrendSourceSchema = z14.object({
11792
+ import { z as z15 } from "zod";
11793
+ var RadarDecisionMetricsSchema = z15.object({
11794
+ currentSales: z15.number().finite(),
11795
+ forecastSales: z15.number().finite(),
11796
+ searchHeat: z15.number().finite(),
11797
+ socialHeat: z15.number().finite(),
11798
+ confidence: z15.number().min(0).max(1)
11799
+ }).strict();
11800
+ var TrendSourceSchema = z15.object({
11759
11801
  sourceId: ContractIdentifierSchema,
11760
11802
  provider: ContractIdentifierSchema,
11761
- channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
11803
+ channel: z15.enum(["trend", "ecommerce", "social", "search", "internal"]),
11762
11804
  collectedAt: IsoDateTimeSchema,
11763
- sourceUrl: z14.string().url().optional(),
11764
- evidenceRefs: z14.array(EntityRefSchema).default([])
11805
+ sourceUrl: z15.string().url().optional(),
11806
+ evidenceRefs: z15.array(EntityRefSchema).default([])
11765
11807
  }).strict();
11766
- var TrendIngestRunSchema = z14.object({
11767
- contract: z14.literal("TrendIngestRun"),
11808
+ var TrendIngestRunSchema = z15.object({
11809
+ contract: z15.literal("TrendIngestRun"),
11768
11810
  ingestRunId: ContractIdentifierSchema,
11769
11811
  sourceId: ContractIdentifierSchema,
11770
11812
  requestId: ContractIdentifierSchema,
11771
11813
  idempotencyKey: ContractIdentifierSchema,
11772
- status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
11773
- recordCount: z14.number().int().nonnegative(),
11774
- errorCount: z14.number().int().nonnegative(),
11814
+ status: z15.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
11815
+ recordCount: z15.number().int().nonnegative(),
11816
+ errorCount: z15.number().int().nonnegative(),
11775
11817
  startedAt: IsoDateTimeSchema,
11776
11818
  completedAt: IsoDateTimeSchema.optional()
11777
11819
  }).strict();
11778
- var TrendSourceRecordSchema = z14.object({
11779
- contract: z14.literal("TrendSourceRecord"),
11820
+ var TrendSourceRecordSchema = z15.object({
11821
+ contract: z15.literal("TrendSourceRecord"),
11780
11822
  sourceRecordId: ContractIdentifierSchema,
11781
11823
  source: TrendSourceSchema,
11782
11824
  ingestRunRef: EntityRefSchema,
11783
- recordVersion: z14.number().int().positive(),
11825
+ recordVersion: z15.number().int().positive(),
11784
11826
  contentHash: Sha256Schema,
11785
11827
  payload: JsonValueSchema,
11786
11828
  idempotencyKey: ContractIdentifierSchema,
11787
11829
  collectedAt: IsoDateTimeSchema
11788
11830
  }).strict();
11789
- var HotwordBodySchema = z14.object({
11790
- contract: z14.literal("HotwordBody"),
11831
+ var HotwordBodySchema = z15.object({
11832
+ contract: z15.literal("HotwordBody"),
11791
11833
  hotwordId: ContractIdentifierSchema,
11792
- label: z14.string().trim().min(1),
11793
- normalizedLabel: z14.string().trim().min(1),
11794
- categories: z14.array(ContractIdentifierSchema).default([]),
11795
- sourceRefs: z14.array(TrendSourceSchema).min(1),
11796
- relationRefs: z14.array(EntityRefSchema).default([]),
11834
+ label: z15.string().trim().min(1),
11835
+ normalizedLabel: z15.string().trim().min(1),
11836
+ categories: z15.array(ContractIdentifierSchema).default([]),
11837
+ sourceRefs: z15.array(TrendSourceSchema).min(1),
11838
+ relationRefs: z15.array(EntityRefSchema).default([]),
11797
11839
  createdAt: IsoDateTimeSchema,
11798
11840
  updatedAt: IsoDateTimeSchema
11799
11841
  }).strict();
11800
11842
  var CommerceBodyFieldsSchema = {
11801
- displayName: z14.string().trim().min(1),
11802
- normalizedName: z14.string().trim().min(1),
11803
- categories: z14.array(ContractIdentifierSchema).default([]),
11804
- sourceRefs: z14.array(EntityRefSchema).min(1),
11805
- relationRefs: z14.array(EntityRefSchema).default([]),
11843
+ displayName: z15.string().trim().min(1),
11844
+ normalizedName: z15.string().trim().min(1),
11845
+ categories: z15.array(ContractIdentifierSchema).default([]),
11846
+ sourceRefs: z15.array(EntityRefSchema).min(1),
11847
+ relationRefs: z15.array(EntityRefSchema).default([]),
11806
11848
  createdAt: IsoDateTimeSchema,
11807
11849
  updatedAt: IsoDateTimeSchema
11808
11850
  };
11809
- var BrandBodySchema = z14.object({
11810
- contract: z14.literal("BrandBody"),
11851
+ var BrandBodySchema = z15.object({
11852
+ contract: z15.literal("BrandBody"),
11811
11853
  brandId: ContractIdentifierSchema,
11812
11854
  ...CommerceBodyFieldsSchema
11813
11855
  }).strict();
11814
- var ProductBodySchema = z14.object({
11815
- contract: z14.literal("ProductBody"),
11856
+ var ProductBodySchema = z15.object({
11857
+ contract: z15.literal("ProductBody"),
11816
11858
  productId: ContractIdentifierSchema,
11817
11859
  brandRef: EntityRefSchema.optional(),
11818
11860
  ...CommerceBodyFieldsSchema
11819
11861
  }).strict();
11820
- var TrendMetricSnapshotSchema = z14.object({
11821
- contract: z14.literal("TrendMetricSnapshot"),
11862
+ var TrendMetricSnapshotSchema = z15.object({
11863
+ contract: z15.literal("TrendMetricSnapshot"),
11822
11864
  snapshotId: ContractIdentifierSchema,
11823
11865
  subjectRef: EntityRefSchema,
11824
11866
  observedAt: IsoDateTimeSchema,
11825
- metrics: z14.record(z14.string(), z14.number().finite()),
11826
- confidence: z14.number().min(0).max(1),
11827
- evidenceRefs: z14.array(EntityRefSchema).min(1)
11867
+ metrics: z15.record(z15.string(), z15.number().finite()),
11868
+ confidence: z15.number().min(0).max(1),
11869
+ evidenceRefs: z15.array(EntityRefSchema).min(1)
11828
11870
  }).strict();
11829
- var RadarScoreModelBodySchema = z14.object({
11830
- contract: z14.literal("RadarScoreModelBody"),
11871
+ var RadarScoreModelBodySchema = z15.object({
11872
+ contract: z15.literal("RadarScoreModelBody"),
11831
11873
  modelId: ContractIdentifierSchema,
11832
- version: z14.number().int().positive(),
11874
+ version: z15.number().int().positive(),
11833
11875
  weights: RadarDecisionMetricsSchema,
11834
- thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
11835
- explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
11876
+ thresholds: z15.record(z15.string(), z15.number().finite()).default({}),
11877
+ explanationRules: z15.record(z15.string(), z15.string().trim().min(1)).default({}),
11836
11878
  createdAt: IsoDateTimeSchema
11837
11879
  }).strict();
11838
- var RadarScoreProjectionSchema = z14.object({
11839
- contract: z14.literal("RadarScoreProjection"),
11880
+ var RadarScoreProjectionSchema = z15.object({
11881
+ contract: z15.literal("RadarScoreProjection"),
11840
11882
  projectionId: ContractIdentifierSchema,
11841
11883
  subjectRef: EntityRefSchema,
11842
11884
  modelRef: EntityRefSchema,
11843
- totalScore: z14.number().finite(),
11885
+ totalScore: z15.number().finite(),
11844
11886
  dimensions: RadarDecisionMetricsSchema,
11845
- evidenceRefs: z14.array(EntityRefSchema).min(1),
11887
+ evidenceRefs: z15.array(EntityRefSchema).min(1),
11846
11888
  freshnessAt: IsoDateTimeSchema
11847
11889
  }).strict();
11848
- var RadarPanoramaNodeSchema = z14.object({
11890
+ var RadarPanoramaNodeSchema = z15.object({
11849
11891
  ref: EntityRefSchema,
11850
- label: z14.string().trim().min(1),
11851
- categories: z14.array(ContractIdentifierSchema).default([]),
11852
- score: z14.number().finite().optional(),
11892
+ label: z15.string().trim().min(1),
11893
+ categories: z15.array(ContractIdentifierSchema).default([]),
11894
+ score: z15.number().finite().optional(),
11853
11895
  freshnessAt: IsoDateTimeSchema.optional()
11854
11896
  }).strict();
11855
- var RadarPanoramaEdgeSchema = z14.object({
11897
+ var RadarPanoramaEdgeSchema = z15.object({
11856
11898
  sourceRef: EntityRefSchema,
11857
11899
  targetRef: EntityRefSchema,
11858
11900
  relation: ContractIdentifierSchema,
11859
- evidenceRefs: z14.array(EntityRefSchema).default([])
11901
+ evidenceRefs: z15.array(EntityRefSchema).default([])
11860
11902
  }).strict();
11861
- var RadarPanoramaSchema = z14.object({
11862
- contract: z14.literal("RadarPanorama"),
11863
- nodes: z14.array(RadarPanoramaNodeSchema),
11864
- edges: z14.array(RadarPanoramaEdgeSchema),
11903
+ var RadarPanoramaSchema = z15.object({
11904
+ contract: z15.literal("RadarPanorama"),
11905
+ nodes: z15.array(RadarPanoramaNodeSchema),
11906
+ edges: z15.array(RadarPanoramaEdgeSchema),
11865
11907
  generatedAt: IsoDateTimeSchema
11866
11908
  }).strict();
11867
- var BrandGeneticsProfileSchema = z14.object({
11868
- contract: z14.literal("BrandGeneticsProfile"),
11909
+ var BrandGeneticsProfileSchema = z15.object({
11910
+ contract: z15.literal("BrandGeneticsProfile"),
11869
11911
  brandRef: EntityRefSchema,
11870
- categories: z14.array(ContractIdentifierSchema).default([]),
11871
- signature: z14.record(ContractIdentifierSchema, z14.number().finite()),
11872
- relatedRefs: z14.array(EntityRefSchema).default([]),
11873
- evidenceRefs: z14.array(EntityRefSchema).default([]),
11912
+ categories: z15.array(ContractIdentifierSchema).default([]),
11913
+ signature: z15.record(ContractIdentifierSchema, z15.number().finite()),
11914
+ relatedRefs: z15.array(EntityRefSchema).default([]),
11915
+ evidenceRefs: z15.array(EntityRefSchema).default([]),
11874
11916
  computedAt: IsoDateTimeSchema
11875
11917
  }).strict();
11876
- var RadarOpportunityMatrixPointSchema = z14.object({
11918
+ var RadarOpportunityMatrixPointSchema = z15.object({
11877
11919
  subjectRef: EntityRefSchema,
11878
- label: z14.string().trim().min(1),
11879
- x: z14.number().finite(),
11880
- y: z14.number().finite(),
11881
- score: z14.number().finite(),
11882
- evidenceRefs: z14.array(EntityRefSchema).default([])
11883
- }).strict();
11884
- var RadarOpportunityMatrixSchema = z14.object({
11885
- contract: z14.literal("RadarOpportunityMatrix"),
11886
- xMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
11887
- yMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
11888
- points: z14.array(RadarOpportunityMatrixPointSchema),
11920
+ label: z15.string().trim().min(1),
11921
+ x: z15.number().finite(),
11922
+ y: z15.number().finite(),
11923
+ score: z15.number().finite(),
11924
+ evidenceRefs: z15.array(EntityRefSchema).default([])
11925
+ }).strict();
11926
+ var RadarOpportunityMatrixSchema = z15.object({
11927
+ contract: z15.literal("RadarOpportunityMatrix"),
11928
+ xMetric: z15.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
11929
+ yMetric: z15.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
11930
+ points: z15.array(RadarOpportunityMatrixPointSchema),
11889
11931
  computedAt: IsoDateTimeSchema
11890
11932
  }).strict();
11891
- var RadarQueryBodySchema = z14.object({
11892
- contract: z14.literal("RadarQueryBody"),
11933
+ var RadarQueryBodySchema = z15.object({
11934
+ contract: z15.literal("RadarQueryBody"),
11893
11935
  queryId: ContractIdentifierSchema,
11894
- filters: z14.record(z14.string(), JsonValueSchema).default({}),
11895
- sort: z14.object({
11936
+ filters: z15.record(z15.string(), JsonValueSchema).default({}),
11937
+ sort: z15.object({
11896
11938
  field: ContractIdentifierSchema,
11897
- direction: z14.enum(["asc", "desc"])
11939
+ direction: z15.enum(["asc", "desc"])
11898
11940
  }).strict(),
11899
- pageSize: z14.number().int().min(1).max(200),
11941
+ pageSize: z15.number().int().min(1).max(200),
11900
11942
  updatedAt: IsoDateTimeSchema
11901
11943
  }).strict();
11902
- var SavedRadarQuerySchema = z14.object({
11903
- contract: z14.literal("SavedRadarQuery"),
11944
+ var SavedRadarQuerySchema = z15.object({
11945
+ contract: z15.literal("SavedRadarQuery"),
11904
11946
  savedQueryId: ContractIdentifierSchema,
11905
11947
  teamId: ContractIdentifierSchema,
11906
11948
  ownerRef: EntityRefSchema,
11907
- name: z14.string().trim().min(1),
11949
+ name: z15.string().trim().min(1),
11908
11950
  queryRef: EntityRefSchema,
11909
- expectedVersion: z14.number().int().nonnegative(),
11951
+ expectedVersion: z15.number().int().nonnegative(),
11910
11952
  updatedAt: IsoDateTimeSchema
11911
11953
  }).strict();
11912
- var RadarSelectionSchema = z14.object({
11913
- contract: z14.literal("RadarSelection"),
11954
+ var RadarSelectionSchema = z15.object({
11955
+ contract: z15.literal("RadarSelection"),
11914
11956
  selectionId: ContractIdentifierSchema,
11915
11957
  teamId: ContractIdentifierSchema,
11916
11958
  ownerRef: EntityRefSchema,
11917
- subjectRefs: z14.array(EntityRefSchema),
11918
- status: z14.enum(["stashed", "selected", "rejected", "archived"]),
11919
- note: z14.string().optional(),
11920
- expectedVersion: z14.number().int().nonnegative(),
11959
+ subjectRefs: z15.array(EntityRefSchema),
11960
+ status: z15.enum(["stashed", "selected", "rejected", "archived"]),
11961
+ note: z15.string().optional(),
11962
+ expectedVersion: z15.number().int().nonnegative(),
11921
11963
  updatedAt: IsoDateTimeSchema
11922
11964
  }).strict();
11923
11965
  var versionedRefFields = {
11924
11966
  id: ContractIdentifierSchema,
11925
- version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
11967
+ version: z15.union([z15.number().int().positive(), z15.string().trim().min(1)]).optional(),
11926
11968
  ownerRepo: ContractIdentifierSchema.optional()
11927
11969
  };
11928
- var TrendRadarCollectionAssetRefSchema = z14.object({
11929
- kind: z14.literal("asset"),
11970
+ var TrendRadarCollectionAssetRefSchema = z15.object({
11971
+ kind: z15.literal("asset"),
11930
11972
  ...versionedRefFields
11931
11973
  }).strict();
11932
- var TrendRadarCollectionSelectionRefSchema = z14.object({
11933
- kind: z14.literal("radar-selection"),
11974
+ var TrendRadarCollectionSelectionRefSchema = z15.object({
11975
+ kind: z15.literal("radar-selection"),
11934
11976
  ...versionedRefFields
11935
11977
  }).strict();
11936
- var TrendRadarCollectionRunRefSchema = z14.object({
11937
- kind: z14.literal("radar-analysis-run"),
11978
+ var TrendRadarCollectionRunRefSchema = z15.object({
11979
+ kind: z15.literal("radar-analysis-run"),
11938
11980
  ...versionedRefFields
11939
11981
  }).strict();
11940
- var TrendRadarCollectionSubjectRefSchema = z14.object({
11941
- kind: z14.literal("hotword"),
11982
+ var TrendRadarCollectionSubjectRefSchema = z15.object({
11983
+ kind: z15.literal("hotword"),
11942
11984
  ...versionedRefFields
11943
11985
  }).strict();
11944
- var TrendRadarCollectionArtifactRefSchema = z14.object({
11945
- kind: z14.literal("artifact"),
11986
+ var TrendRadarCollectionArtifactRefSchema = z15.object({
11987
+ kind: z15.literal("artifact"),
11946
11988
  ...versionedRefFields
11947
11989
  }).strict();
11948
- var TrendRadarCollectionRecipeEntrySchema = z14.object({
11990
+ var TrendRadarCollectionRecipeEntrySchema = z15.object({
11949
11991
  subjectRef: TrendRadarCollectionSubjectRefSchema,
11950
- label: z14.string().trim().min(1).max(200)
11992
+ label: z15.string().trim().min(1).max(200)
11951
11993
  }).strict();
11952
- var TrendRadarCollectionRecipeSchema = z14.object({
11953
- category: z14.array(TrendRadarCollectionRecipeEntrySchema),
11954
- design: z14.array(TrendRadarCollectionRecipeEntrySchema),
11955
- audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
11994
+ var TrendRadarCollectionRecipeSchema = z15.object({
11995
+ category: z15.array(TrendRadarCollectionRecipeEntrySchema),
11996
+ design: z15.array(TrendRadarCollectionRecipeEntrySchema),
11997
+ audience: z15.array(TrendRadarCollectionRecipeEntrySchema)
11956
11998
  }).strict().refine(
11957
11999
  (recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
11958
12000
  "A Trend Radar collection recipe must contain at least one subject."
11959
12001
  );
11960
- var TrendRadarCollectionDecisionAxisSchema = z14.object({
12002
+ var TrendRadarCollectionDecisionAxisSchema = z15.object({
11961
12003
  key: ContractIdentifierSchema,
11962
- label: z14.string().trim().min(1).max(200).optional(),
11963
- value: z14.number().finite()
11964
- }).strict();
11965
- var TrendRadarCollectionDecisionProjectionSchema = z14.object({
11966
- axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
11967
- overallScore: z14.number().finite().optional(),
11968
- itemRank: z14.number().finite().optional(),
11969
- sourceRefs: z14.array(EntityRefSchema).optional(),
11970
- outputRefs: z14.array(EntityRefSchema).optional()
12004
+ label: z15.string().trim().min(1).max(200).optional(),
12005
+ value: z15.number().finite()
12006
+ }).strict();
12007
+ var TrendRadarCollectionDecisionProjectionSchema = z15.object({
12008
+ axes: z15.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
12009
+ overallScore: z15.number().finite().optional(),
12010
+ itemRank: z15.number().finite().optional(),
12011
+ sourceRefs: z15.array(EntityRefSchema).optional(),
12012
+ outputRefs: z15.array(EntityRefSchema).optional()
11971
12013
  }).strict().superRefine((projection, context) => {
11972
12014
  const hasProjection = Boolean(
11973
12015
  projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
@@ -11990,20 +12032,20 @@ var TrendRadarCollectionDecisionProjectionSchema = z14.object({
11990
12032
  seenAxisKeys.add(axis.key);
11991
12033
  });
11992
12034
  });
11993
- var TrendRadarCollectionArtifactProjectionSchema = z14.object({
12035
+ var TrendRadarCollectionArtifactProjectionSchema = z15.object({
11994
12036
  artifactRef: TrendRadarCollectionArtifactRefSchema,
11995
- url: z14.string().url().optional(),
11996
- thumbnailUrl: z14.string().url().optional(),
11997
- mimeType: z14.string().trim().min(1).optional(),
12037
+ url: z15.string().url().optional(),
12038
+ thumbnailUrl: z15.string().url().optional(),
12039
+ mimeType: z15.string().trim().min(1).optional(),
11998
12040
  metadata: JsonObjectSchema.optional()
11999
12041
  }).strict();
12000
- var TrendRadarCollectionProjectionWritebackSchema = z14.object({
12001
- status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
12042
+ var TrendRadarCollectionProjectionWritebackSchema = z15.object({
12043
+ status: z15.enum(["PENDING", "APPLIED", "FAILED"]),
12002
12044
  updatedAt: IsoDateTimeSchema,
12003
- error: z14.object({
12045
+ error: z15.object({
12004
12046
  code: ContractIdentifierSchema,
12005
- message: z14.string().trim().min(1),
12006
- retryable: z14.boolean()
12047
+ message: z15.string().trim().min(1),
12048
+ retryable: z15.boolean()
12007
12049
  }).strict().optional()
12008
12050
  }).strict().superRefine((writeback, context) => {
12009
12051
  if (writeback.status === "FAILED" && !writeback.error) {
@@ -12021,12 +12063,12 @@ var TrendRadarCollectionProjectionWritebackSchema = z14.object({
12021
12063
  });
12022
12064
  }
12023
12065
  });
12024
- var TrendRadarCollectionItemSchema = z14.object({
12025
- contract: z14.literal("TrendRadarCollectionItem"),
12026
- schemaVersion: z14.literal(1),
12066
+ var TrendRadarCollectionItemSchema = z15.object({
12067
+ contract: z15.literal("TrendRadarCollectionItem"),
12068
+ schemaVersion: z15.literal(1),
12027
12069
  selectionRef: TrendRadarCollectionSelectionRefSchema,
12028
12070
  recipe: TrendRadarCollectionRecipeSchema,
12029
- status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
12071
+ status: z15.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
12030
12072
  latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
12031
12073
  decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
12032
12074
  artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
@@ -12034,8 +12076,8 @@ var TrendRadarCollectionItemSchema = z14.object({
12034
12076
  updatedAt: IsoDateTimeSchema,
12035
12077
  generatedAt: IsoDateTimeSchema.optional()
12036
12078
  }).strict();
12037
- var RadarAnalysisRunSchema = z14.object({
12038
- contract: z14.literal("RadarAnalysisRun"),
12079
+ var RadarAnalysisRunSchema = z15.object({
12080
+ contract: z15.literal("RadarAnalysisRun"),
12039
12081
  runId: ContractIdentifierSchema,
12040
12082
  teamId: ContractIdentifierSchema,
12041
12083
  selectionRef: EntityRefSchema,
@@ -12046,66 +12088,66 @@ var RadarAnalysisRunSchema = z14.object({
12046
12088
  collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
12047
12089
  collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
12048
12090
  workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
12049
- workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
12050
- createDesignProject: z14.boolean().default(true),
12051
- designProjectName: z14.string().trim().min(1).max(200).optional(),
12091
+ workflowInput: z15.record(z15.string(), JsonValueSchema).default({}),
12092
+ createDesignProject: z15.boolean().default(true),
12093
+ designProjectName: z15.string().trim().min(1).max(200).optional(),
12052
12094
  modelRef: EntityRefSchema,
12053
12095
  requestId: ContractIdentifierSchema,
12054
12096
  idempotencyKey: ContractIdentifierSchema,
12055
- status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
12056
- outputRefs: z14.array(EntityRefSchema).default([]),
12057
- error: z14.object({
12097
+ status: z15.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
12098
+ outputRefs: z15.array(EntityRefSchema).default([]),
12099
+ error: z15.object({
12058
12100
  code: ContractIdentifierSchema,
12059
- message: z14.string().trim().min(1),
12060
- retryable: z14.boolean()
12101
+ message: z15.string().trim().min(1),
12102
+ retryable: z15.boolean()
12061
12103
  }).strict().optional(),
12062
12104
  startedAt: IsoDateTimeSchema.optional(),
12063
12105
  completedAt: IsoDateTimeSchema.optional(),
12064
12106
  createdAt: IsoDateTimeSchema
12065
12107
  }).strict();
12066
- var RadarAnalysisAssetSchema = z14.object({
12108
+ var RadarAnalysisAssetSchema = z15.object({
12067
12109
  artifactRef: EntityRefSchema,
12068
12110
  kind: ContractIdentifierSchema,
12069
- mimeType: z14.string().trim().min(1).optional(),
12070
- url: z14.string().url(),
12071
- metadata: z14.record(z14.string(), JsonValueSchema).default({}),
12111
+ mimeType: z15.string().trim().min(1).optional(),
12112
+ url: z15.string().url(),
12113
+ metadata: z15.record(z15.string(), JsonValueSchema).default({}),
12072
12114
  createdAt: IsoDateTimeSchema
12073
12115
  }).strict();
12074
- var RadarAnalysisDetailSchema = z14.object({
12075
- contract: z14.literal("RadarAnalysisDetail"),
12116
+ var RadarAnalysisDetailSchema = z15.object({
12117
+ contract: z15.literal("RadarAnalysisDetail"),
12076
12118
  run: RadarAnalysisRunSchema,
12077
- runVersion: z14.number().int().positive(),
12119
+ runVersion: z15.number().int().positive(),
12078
12120
  selection: RadarSelectionSchema,
12079
- outputs: z14.array(OutputRecordSchema),
12080
- assets: z14.array(RadarAnalysisAssetSchema),
12081
- lineage: z14.array(LineageRecordSchema)
12121
+ outputs: z15.array(OutputRecordSchema),
12122
+ assets: z15.array(RadarAnalysisAssetSchema),
12123
+ lineage: z15.array(LineageRecordSchema)
12082
12124
  }).strict();
12083
- var RadarActionRecordSchema = z14.object({
12084
- contract: z14.literal("RadarActionRecord"),
12125
+ var RadarActionRecordSchema = z15.object({
12126
+ contract: z15.literal("RadarActionRecord"),
12085
12127
  actionId: ContractIdentifierSchema,
12086
12128
  teamId: ContractIdentifierSchema,
12087
12129
  actorRef: EntityRefSchema,
12088
- action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
12130
+ action: z15.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
12089
12131
  targetRef: EntityRefSchema,
12090
12132
  requestId: ContractIdentifierSchema,
12091
12133
  idempotencyKey: ContractIdentifierSchema,
12092
- expectedVersion: z14.number().int().nonnegative(),
12134
+ expectedVersion: z15.number().int().nonnegative(),
12093
12135
  occurredAt: IsoDateTimeSchema
12094
12136
  }).strict();
12095
- var RadarWritebackRecordSchema = z14.object({
12096
- contract: z14.literal("RadarWritebackRecord"),
12137
+ var RadarWritebackRecordSchema = z15.object({
12138
+ contract: z15.literal("RadarWritebackRecord"),
12097
12139
  writebackId: ContractIdentifierSchema,
12098
12140
  actionRef: EntityRefSchema,
12099
12141
  targetRef: EntityRefSchema,
12100
- status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
12101
- resultingVersion: z14.number().int().nonnegative().optional(),
12102
- error: z14.string().trim().min(1).optional(),
12142
+ status: z15.enum(["PENDING", "APPLIED", "FAILED"]),
12143
+ resultingVersion: z15.number().int().nonnegative().optional(),
12144
+ error: z15.string().trim().min(1).optional(),
12103
12145
  recordedAt: IsoDateTimeSchema
12104
12146
  }).strict();
12105
12147
 
12106
12148
  // src/contracts/workflow-definition.ts
12107
- import { z as z15 } from "zod";
12108
- var ConductorTaskTypeSchema = z15.enum([
12149
+ import { z as z16 } from "zod";
12150
+ var ConductorTaskTypeSchema = z16.enum([
12109
12151
  "SIMPLE",
12110
12152
  "DYNAMIC",
12111
12153
  "FORK_JOIN",
@@ -12154,46 +12196,46 @@ var requiredTaskFields = {
12154
12196
  WAIT: ["inputParameters"],
12155
12197
  TERMINATE: ["inputParameters"]
12156
12198
  };
12157
- var ConductorTaskDefinitionSchema = z15.lazy(
12158
- () => z15.object({
12199
+ var ConductorTaskDefinitionSchema = z16.lazy(
12200
+ () => z16.object({
12159
12201
  name: ContractIdentifierSchema,
12160
12202
  taskReferenceName: ContractIdentifierSchema,
12161
12203
  type: ConductorTaskTypeSchema,
12162
- inputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
12163
- startDelay: z15.number().int().nonnegative().optional(),
12164
- optional: z15.boolean().optional(),
12165
- asyncComplete: z15.boolean().optional(),
12166
- rateLimited: z15.boolean().optional(),
12167
- retryCount: z15.number().int().nonnegative().optional(),
12168
- taskDefinition: z15.record(z15.string(), JsonValueSchema).optional(),
12169
- loopCondition: z15.string().optional(),
12170
- loopOver: z15.array(ConductorTaskDefinitionSchema).optional(),
12171
- sink: z15.string().optional(),
12172
- forkTasks: z15.array(z15.array(ConductorTaskDefinitionSchema)).optional(),
12173
- joinOn: z15.array(ContractIdentifierSchema).optional(),
12174
- defaultExclusiveJoinTask: z15.array(ContractIdentifierSchema).optional(),
12175
- dynamicForkTasksParam: z15.string().optional(),
12176
- dynamicForkTasksInputParamName: z15.string().optional(),
12177
- subWorkflowParam: z15.object({
12178
- $ref: z15.string().optional(),
12204
+ inputParameters: z16.record(z16.string(), JsonValueSchema).optional(),
12205
+ startDelay: z16.number().int().nonnegative().optional(),
12206
+ optional: z16.boolean().optional(),
12207
+ asyncComplete: z16.boolean().optional(),
12208
+ rateLimited: z16.boolean().optional(),
12209
+ retryCount: z16.number().int().nonnegative().optional(),
12210
+ taskDefinition: z16.record(z16.string(), JsonValueSchema).optional(),
12211
+ loopCondition: z16.string().optional(),
12212
+ loopOver: z16.array(ConductorTaskDefinitionSchema).optional(),
12213
+ sink: z16.string().optional(),
12214
+ forkTasks: z16.array(z16.array(ConductorTaskDefinitionSchema)).optional(),
12215
+ joinOn: z16.array(ContractIdentifierSchema).optional(),
12216
+ defaultExclusiveJoinTask: z16.array(ContractIdentifierSchema).optional(),
12217
+ dynamicForkTasksParam: z16.string().optional(),
12218
+ dynamicForkTasksInputParamName: z16.string().optional(),
12219
+ subWorkflowParam: z16.object({
12220
+ $ref: z16.string().optional(),
12179
12221
  name: ContractIdentifierSchema,
12180
- version: z15.number().int().positive().optional(),
12181
- taskToDomain: z15.record(z15.string(), z15.string()).optional(),
12182
- workflowDefinition: z15.record(z15.string(), JsonValueSchema).optional()
12222
+ version: z16.number().int().positive().optional(),
12223
+ taskToDomain: z16.record(z16.string(), z16.string()).optional(),
12224
+ workflowDefinition: z16.record(z16.string(), JsonValueSchema).optional()
12183
12225
  }).strict().optional(),
12184
- decisionCases: z15.record(z15.string(), z15.array(ConductorTaskDefinitionSchema)).optional(),
12185
- defaultCase: z15.array(ConductorTaskDefinitionSchema).optional(),
12186
- evaluatorType: z15.enum(["value-param", "javascript", "graaljs"]).optional(),
12187
- expression: z15.string().optional(),
12226
+ decisionCases: z16.record(z16.string(), z16.array(ConductorTaskDefinitionSchema)).optional(),
12227
+ defaultCase: z16.array(ConductorTaskDefinitionSchema).optional(),
12228
+ evaluatorType: z16.enum(["value-param", "javascript", "graaljs"]).optional(),
12229
+ expression: z16.string().optional(),
12188
12230
  __alias: JsonValueSchema.optional(),
12189
- callbackFromWorker: z15.boolean().optional(),
12231
+ callbackFromWorker: z16.boolean().optional(),
12190
12232
  caseExpression: JsonValueSchema.optional(),
12191
- caseValueParam: z15.string().optional(),
12192
- dependencies: z15.array(JsonValueSchema).optional(),
12193
- description: z15.string().optional(),
12194
- dynamicTaskNameParam: z15.string().optional(),
12195
- joinMode: z15.string().optional(),
12196
- permissive: z15.boolean().optional(),
12233
+ caseValueParam: z16.string().optional(),
12234
+ dependencies: z16.array(JsonValueSchema).optional(),
12235
+ description: z16.string().optional(),
12236
+ dynamicTaskNameParam: z16.string().optional(),
12237
+ joinMode: z16.string().optional(),
12238
+ permissive: z16.boolean().optional(),
12197
12239
  joinTaskRef: ContractIdentifierSchema.optional(),
12198
12240
  forkTaskRef: ContractIdentifierSchema.optional()
12199
12241
  }).strict().superRefine((task, context) => {
@@ -12207,29 +12249,29 @@ var ConductorTaskDefinitionSchema = z15.lazy(
12207
12249
  }
12208
12250
  })
12209
12251
  );
12210
- var ConductorWorkflowDefinitionSchema = z15.object({
12211
- ownerApp: z15.string().optional(),
12212
- createTime: z15.number().int().nonnegative().optional(),
12213
- updateTime: z15.number().int().nonnegative().optional(),
12214
- createdBy: z15.string().optional(),
12215
- updatedBy: z15.string().optional(),
12252
+ var ConductorWorkflowDefinitionSchema = z16.object({
12253
+ ownerApp: z16.string().optional(),
12254
+ createTime: z16.number().int().nonnegative().optional(),
12255
+ updateTime: z16.number().int().nonnegative().optional(),
12256
+ createdBy: z16.string().optional(),
12257
+ updatedBy: z16.string().optional(),
12216
12258
  name: ContractIdentifierSchema,
12217
- description: z15.string().optional(),
12218
- version: z15.number().int().positive(),
12219
- tasks: z15.array(ConductorTaskDefinitionSchema),
12220
- inputParameters: z15.array(ContractIdentifierSchema),
12221
- outputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
12259
+ description: z16.string().optional(),
12260
+ version: z16.number().int().positive(),
12261
+ tasks: z16.array(ConductorTaskDefinitionSchema),
12262
+ inputParameters: z16.array(ContractIdentifierSchema),
12263
+ outputParameters: z16.record(z16.string(), JsonValueSchema).optional(),
12222
12264
  failureWorkflow: ContractIdentifierSchema.optional(),
12223
- schemaVersion: z15.number().int().positive().optional(),
12224
- restartable: z15.boolean().optional(),
12225
- workflowStatusListenerEnabled: z15.boolean().optional(),
12226
- ownerEmail: z15.string().email().optional(),
12227
- timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
12228
- timeoutSeconds: z15.number().int().nonnegative(),
12229
- variables: z15.record(z15.string(), JsonValueSchema).optional(),
12230
- inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
12231
- }).strict();
12232
- var WorkflowParameterTypeSchema = z15.enum([
12265
+ schemaVersion: z16.number().int().positive().optional(),
12266
+ restartable: z16.boolean().optional(),
12267
+ workflowStatusListenerEnabled: z16.boolean().optional(),
12268
+ ownerEmail: z16.string().email().optional(),
12269
+ timeoutPolicy: z16.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
12270
+ timeoutSeconds: z16.number().int().nonnegative(),
12271
+ variables: z16.record(z16.string(), JsonValueSchema).optional(),
12272
+ inputTemplate: z16.record(z16.string(), JsonValueSchema).optional()
12273
+ }).strict();
12274
+ var WorkflowParameterTypeSchema = z16.enum([
12233
12275
  "string",
12234
12276
  "file",
12235
12277
  "number",
@@ -12239,213 +12281,213 @@ var WorkflowParameterTypeSchema = z15.enum([
12239
12281
  "notice",
12240
12282
  "canvas-assist"
12241
12283
  ]);
12242
- var WorkflowConditionalStateSchema = z15.object({
12243
- conditions: z15.array(
12244
- z15.object({
12245
- field: z15.string(),
12246
- operator: z15.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
12284
+ var WorkflowConditionalStateSchema = z16.object({
12285
+ conditions: z16.array(
12286
+ z16.object({
12287
+ field: z16.string(),
12288
+ operator: z16.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
12247
12289
  value: JsonValueSchema
12248
12290
  }).strict()
12249
12291
  ),
12250
- logic: z15.enum(["AND", "OR"]).optional()
12251
- }).strict();
12252
- var ImageSelectMappingAppearanceSchema = z15.object({
12253
- columns: z15.number().int().min(1).max(4).optional(),
12254
- cardSize: z15.enum(["sm", "md", "lg"]).optional(),
12255
- imageAspectRatio: z15.enum(["square", "4:5", "3:4", "16:9"]).optional(),
12256
- gap: z15.enum(["sm", "md", "lg"]).optional(),
12257
- radius: z15.enum(["sm", "md", "lg", "xl"]).optional(),
12258
- borderStyle: z15.enum(["none", "soft", "strong"]).optional(),
12259
- borderWidth: z15.union([z15.literal(0), z15.literal(1), z15.literal(2)]).optional(),
12260
- enableScroll: z15.boolean().optional(),
12261
- maxHeight: z15.number().int().min(160).max(1200).optional(),
12262
- enableCollapse: z15.boolean().optional(),
12263
- visibleRows: z15.number().int().min(1).max(6).optional(),
12264
- hideLabel: z15.boolean().optional(),
12265
- hideDescription: z15.boolean().optional(),
12266
- hideValue: z15.boolean().optional()
12267
- }).strict();
12268
- var ComfyWorkflowPortBindingSchema = z15.object({
12269
- node: z15.union([z15.string(), z15.number()]),
12270
- key: z15.string().optional()
12271
- }).strict();
12272
- var WorkflowParameterTypeOptionsSchema = z15.object({
12273
- editor: z15.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
12274
- editorLanguage: z15.enum(["javaScript", "json", "python", "sql"]).optional(),
12275
- maxValue: z15.number().optional(),
12276
- minValue: z15.number().optional(),
12277
- max: z15.number().optional(),
12278
- min: z15.number().optional(),
12279
- multipleValues: z15.boolean().optional(),
12280
- numberPrecision: z15.number().nonnegative().optional(),
12281
- password: z15.boolean().optional(),
12282
- rows: z15.number().int().positive().optional(),
12283
- assetType: z15.string().optional(),
12284
- accept: z15.string().optional(),
12285
- maxSize: z15.number().positive().optional(),
12286
- fileType: z15.string().optional(),
12287
- aiMultiShotMainImageField: z15.string().optional(),
12288
- aiMultiShotWorkflowAppId: z15.string().optional(),
12289
- aiMultiShotWorkflowId: z15.string().optional(),
12290
- allowCustomInput: z15.boolean().optional(),
12291
- allowUploadVideo: z15.boolean().optional(),
12292
- aspectRatioField: z15.string().optional(),
12293
- assemblyValueType: z15.string().optional(),
12294
- autoAnalyzeDesignImage: z15.boolean().optional(),
12295
- autoDetectAspectRatio: z15.boolean().optional(),
12296
- autoIncrementId: z15.boolean().optional(),
12292
+ logic: z16.enum(["AND", "OR"]).optional()
12293
+ }).strict();
12294
+ var ImageSelectMappingAppearanceSchema = z16.object({
12295
+ columns: z16.number().int().min(1).max(4).optional(),
12296
+ cardSize: z16.enum(["sm", "md", "lg"]).optional(),
12297
+ imageAspectRatio: z16.enum(["square", "4:5", "3:4", "16:9"]).optional(),
12298
+ gap: z16.enum(["sm", "md", "lg"]).optional(),
12299
+ radius: z16.enum(["sm", "md", "lg", "xl"]).optional(),
12300
+ borderStyle: z16.enum(["none", "soft", "strong"]).optional(),
12301
+ borderWidth: z16.union([z16.literal(0), z16.literal(1), z16.literal(2)]).optional(),
12302
+ enableScroll: z16.boolean().optional(),
12303
+ maxHeight: z16.number().int().min(160).max(1200).optional(),
12304
+ enableCollapse: z16.boolean().optional(),
12305
+ visibleRows: z16.number().int().min(1).max(6).optional(),
12306
+ hideLabel: z16.boolean().optional(),
12307
+ hideDescription: z16.boolean().optional(),
12308
+ hideValue: z16.boolean().optional()
12309
+ }).strict();
12310
+ var ComfyWorkflowPortBindingSchema = z16.object({
12311
+ node: z16.union([z16.string(), z16.number()]),
12312
+ key: z16.string().optional()
12313
+ }).strict();
12314
+ var WorkflowParameterTypeOptionsSchema = z16.object({
12315
+ editor: z16.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
12316
+ editorLanguage: z16.enum(["javaScript", "json", "python", "sql"]).optional(),
12317
+ maxValue: z16.number().optional(),
12318
+ minValue: z16.number().optional(),
12319
+ max: z16.number().optional(),
12320
+ min: z16.number().optional(),
12321
+ multipleValues: z16.boolean().optional(),
12322
+ numberPrecision: z16.number().nonnegative().optional(),
12323
+ password: z16.boolean().optional(),
12324
+ rows: z16.number().int().positive().optional(),
12325
+ assetType: z16.string().optional(),
12326
+ accept: z16.string().optional(),
12327
+ maxSize: z16.number().positive().optional(),
12328
+ fileType: z16.string().optional(),
12329
+ aiMultiShotMainImageField: z16.string().optional(),
12330
+ aiMultiShotWorkflowAppId: z16.string().optional(),
12331
+ aiMultiShotWorkflowId: z16.string().optional(),
12332
+ allowCustomInput: z16.boolean().optional(),
12333
+ allowUploadVideo: z16.boolean().optional(),
12334
+ aspectRatioField: z16.string().optional(),
12335
+ assemblyValueType: z16.string().optional(),
12336
+ autoAnalyzeDesignImage: z16.boolean().optional(),
12337
+ autoDetectAspectRatio: z16.boolean().optional(),
12338
+ autoIncrementId: z16.boolean().optional(),
12297
12339
  comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
12298
- comfyuiModelServerId: z15.string().optional(),
12299
- comfyuiModelTypeName: z15.string().optional(),
12340
+ comfyuiModelServerId: z16.string().optional(),
12341
+ comfyuiModelTypeName: z16.string().optional(),
12300
12342
  defaultCustomInput: JsonValueSchema.optional(),
12301
- descriptionAlert: z15.boolean().optional(),
12302
- disabled: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
12303
- editable: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
12304
- enableAiMultiShot: z15.boolean().optional(),
12305
- enableBooleanSwitchMode: z15.boolean().optional(),
12306
- enableClear: z15.boolean().optional(),
12307
- enableExpand: z15.boolean().optional(),
12308
- enableImageMask: z15.boolean().optional(),
12309
- enableImageOverlay: z15.boolean().optional(),
12310
- enablePopupEditor: z15.boolean().optional(),
12311
- enablePromptFontSize: z15.boolean().optional(),
12312
- enableReset: z15.boolean().optional(),
12313
- enableSelectItemIcon: z15.boolean().optional(),
12314
- enableSelectList: z15.boolean().optional(),
12315
- enableSelectSearch: z15.boolean().optional(),
12316
- enableSliderEnterMode: z15.boolean().optional(),
12317
- enableVoice: z15.boolean().optional(),
12318
- expandButtonText: z15.string().optional(),
12319
- foldUp: z15.boolean().optional(),
12320
- hidden: z15.boolean().optional(),
12321
- hideRequiredDot: z15.boolean().optional(),
12322
- inlineTitleWithSelect: z15.boolean().optional(),
12323
- knowledgeGraphButtonText: z15.string().optional(),
12324
- identifyAttributeCount: z15.union([z15.number().nonnegative(), z15.string().min(1), z15.object({ min: z15.number().nonnegative().optional(), max: z15.number().nonnegative().optional() }).strict()]).optional(),
12325
- identifyAttributes: z15.array(JsonValueSchema).optional(),
12326
- identifyMaxVariants: z15.number().int().nonnegative().optional(),
12327
- identifySourceField: z15.string().optional(),
12328
- imageOverlayBaseField: z15.string().optional(),
12329
- imageOverlayOverlayField: z15.string().optional(),
12343
+ descriptionAlert: z16.boolean().optional(),
12344
+ disabled: z16.union([z16.boolean(), WorkflowConditionalStateSchema]).optional(),
12345
+ editable: z16.union([z16.boolean(), WorkflowConditionalStateSchema]).optional(),
12346
+ enableAiMultiShot: z16.boolean().optional(),
12347
+ enableBooleanSwitchMode: z16.boolean().optional(),
12348
+ enableClear: z16.boolean().optional(),
12349
+ enableExpand: z16.boolean().optional(),
12350
+ enableImageMask: z16.boolean().optional(),
12351
+ enableImageOverlay: z16.boolean().optional(),
12352
+ enablePopupEditor: z16.boolean().optional(),
12353
+ enablePromptFontSize: z16.boolean().optional(),
12354
+ enableReset: z16.boolean().optional(),
12355
+ enableSelectItemIcon: z16.boolean().optional(),
12356
+ enableSelectList: z16.boolean().optional(),
12357
+ enableSelectSearch: z16.boolean().optional(),
12358
+ enableSliderEnterMode: z16.boolean().optional(),
12359
+ enableVoice: z16.boolean().optional(),
12360
+ expandButtonText: z16.string().optional(),
12361
+ foldUp: z16.boolean().optional(),
12362
+ hidden: z16.boolean().optional(),
12363
+ hideRequiredDot: z16.boolean().optional(),
12364
+ inlineTitleWithSelect: z16.boolean().optional(),
12365
+ knowledgeGraphButtonText: z16.string().optional(),
12366
+ identifyAttributeCount: z16.union([z16.number().nonnegative(), z16.string().min(1), z16.object({ min: z16.number().nonnegative().optional(), max: z16.number().nonnegative().optional() }).strict()]).optional(),
12367
+ identifyAttributes: z16.array(JsonValueSchema).optional(),
12368
+ identifyMaxVariants: z16.number().int().nonnegative().optional(),
12369
+ identifySourceField: z16.string().optional(),
12370
+ imageOverlayBaseField: z16.string().optional(),
12371
+ imageOverlayOverlayField: z16.string().optional(),
12330
12372
  imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
12331
- imageSelectMappingColumns: z15.number().int().min(1).max(4).optional(),
12332
- imageSelectMappingEnableCustomUpload: z15.boolean().optional(),
12333
- imageSelectMappingHideLabel: z15.boolean().optional(),
12334
- imageSelectMappingHideLink: z15.boolean().optional(),
12335
- imageSelectMappingHideMeta: z15.boolean().optional(),
12336
- imageSelectMappingInlineUseLargeUploadBox: z15.boolean().optional(),
12337
- imageSelectMappingPromptField: z15.string().optional(),
12338
- imageSelectMappingTabOrder: z15.enum(["template-first", "upload-first"]).optional(),
12339
- imageSelectMappingTabWidthMode: z15.enum(["content", "fill"]).optional(),
12373
+ imageSelectMappingColumns: z16.number().int().min(1).max(4).optional(),
12374
+ imageSelectMappingEnableCustomUpload: z16.boolean().optional(),
12375
+ imageSelectMappingHideLabel: z16.boolean().optional(),
12376
+ imageSelectMappingHideLink: z16.boolean().optional(),
12377
+ imageSelectMappingHideMeta: z16.boolean().optional(),
12378
+ imageSelectMappingInlineUseLargeUploadBox: z16.boolean().optional(),
12379
+ imageSelectMappingPromptField: z16.string().optional(),
12380
+ imageSelectMappingTabOrder: z16.enum(["template-first", "upload-first"]).optional(),
12381
+ imageSelectMappingTabWidthMode: z16.enum(["content", "fill"]).optional(),
12340
12382
  imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
12341
12383
  imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
12342
- imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
12384
+ imageSelectMappingUploadMode: z16.enum(["tabs", "inline"]).optional(),
12343
12385
  imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
12344
12386
  imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
12345
- endpoints: z15.array(JsonValueSchema).optional(),
12346
- examples: z15.array(JsonValueSchema).optional(),
12387
+ endpoints: z16.array(JsonValueSchema).optional(),
12388
+ examples: z16.array(JsonValueSchema).optional(),
12347
12389
  extraData: JsonValueSchema.optional(),
12348
12390
  layer: JsonValueSchema.optional(),
12349
12391
  map: JsonValueSchema.optional(),
12350
- multiline: z15.boolean().optional(),
12351
- options: z15.array(JsonValueSchema).optional(),
12352
- originalFiles: z15.array(JsonValueSchema).optional(),
12392
+ multiline: z16.boolean().optional(),
12393
+ options: z16.array(JsonValueSchema).optional(),
12394
+ originalFiles: z16.array(JsonValueSchema).optional(),
12353
12395
  placeholder: LocalizedTextSchema.optional(),
12354
- preserveSelectListOrder: z15.boolean().optional(),
12396
+ preserveSelectListOrder: z16.boolean().optional(),
12355
12397
  promptDictionary: JsonValueSchema.optional(),
12356
- promptFontSize: z15.number().optional(),
12398
+ promptFontSize: z16.number().optional(),
12357
12399
  promptModeToggle: JsonValueSchema.optional(),
12358
- requireActiveSelectFilter: z15.boolean().optional(),
12359
- restoreDefaultOnEmptyEnter: z15.boolean().optional(),
12360
- search: z15.boolean().optional(),
12361
- selectButtonEnableCollapse: z15.boolean().optional(),
12362
- selectButtonVisibleRows: z15.number().int().positive().optional(),
12363
- selectList: z15.array(JsonValueSchema).optional(),
12364
- selectListDisplayMode: z15.string().optional(),
12365
- selectPromptField: z15.string().optional(),
12366
- showAddLocalFileButton: z15.boolean().optional(),
12367
- singleColumn: z15.boolean().optional(),
12368
- singleFrameForMultiple: z15.boolean().optional(),
12369
- textSingleLine: z15.boolean().optional(),
12370
- textareaMiniHeight: z15.number().nonnegative().optional(),
12400
+ requireActiveSelectFilter: z16.boolean().optional(),
12401
+ restoreDefaultOnEmptyEnter: z16.boolean().optional(),
12402
+ search: z16.boolean().optional(),
12403
+ selectButtonEnableCollapse: z16.boolean().optional(),
12404
+ selectButtonVisibleRows: z16.number().int().positive().optional(),
12405
+ selectList: z16.array(JsonValueSchema).optional(),
12406
+ selectListDisplayMode: z16.string().optional(),
12407
+ selectPromptField: z16.string().optional(),
12408
+ showAddLocalFileButton: z16.boolean().optional(),
12409
+ singleColumn: z16.boolean().optional(),
12410
+ singleFrameForMultiple: z16.boolean().optional(),
12411
+ textSingleLine: z16.boolean().optional(),
12412
+ textareaMiniHeight: z16.number().nonnegative().optional(),
12371
12413
  tips: LocalizedTextSchema.optional(),
12372
12414
  visibility: JsonValueSchema.optional(),
12373
- voiceButtonText: z15.string().optional(),
12374
- designAnalysisFields: z15.array(JsonValueSchema).optional(),
12375
- designAnalysisFillStrategy: z15.string().optional(),
12376
- designAnalysisMaxFields: z15.number().int().nonnegative().optional(),
12377
- designAnalysisType: z15.string().optional(),
12378
- designAnalysisFieldPrefix: z15.string().optional()
12379
- }).strict();
12380
- var WorkflowParameterSchema = z15.lazy(
12381
- () => z15.object({
12415
+ voiceButtonText: z16.string().optional(),
12416
+ designAnalysisFields: z16.array(JsonValueSchema).optional(),
12417
+ designAnalysisFillStrategy: z16.string().optional(),
12418
+ designAnalysisMaxFields: z16.number().int().nonnegative().optional(),
12419
+ designAnalysisType: z16.string().optional(),
12420
+ designAnalysisFieldPrefix: z16.string().optional()
12421
+ }).strict();
12422
+ var WorkflowParameterSchema = z16.lazy(
12423
+ () => z16.object({
12382
12424
  displayName: LocalizedTextSchema,
12383
12425
  name: ContractIdentifierSchema,
12384
12426
  type: WorkflowParameterTypeSchema,
12385
12427
  typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
12386
12428
  default: JsonValueSchema.optional(),
12387
12429
  description: LocalizedTextSchema.optional(),
12388
- hint: z15.string().optional(),
12389
- displayOptions: z15.object({
12390
- hide: z15.record(z15.string(), z15.array(JsonValueSchema)).optional(),
12391
- show: z15.record(z15.string(), z15.array(JsonValueSchema)).optional()
12430
+ hint: z16.string().optional(),
12431
+ displayOptions: z16.object({
12432
+ hide: z16.record(z16.string(), z16.array(JsonValueSchema)).optional(),
12433
+ show: z16.record(z16.string(), z16.array(JsonValueSchema)).optional()
12392
12434
  }).strict().optional(),
12393
- options: z15.array(z15.union([
12394
- z15.object({ name: LocalizedTextSchema, value: z15.union([z15.string(), z15.number(), z15.boolean()]), action: z15.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
12435
+ options: z16.array(z16.union([
12436
+ z16.object({ name: LocalizedTextSchema, value: z16.union([z16.string(), z16.number(), z16.boolean()]), action: z16.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
12395
12437
  WorkflowParameterSchema,
12396
- z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
12438
+ z16.object({ displayName: z16.string(), name: ContractIdentifierSchema, values: z16.array(WorkflowParameterSchema) }).strict()
12397
12439
  ])).optional(),
12398
12440
  placeholder: LocalizedTextSchema.optional(),
12399
- isNodeSetting: z15.boolean().optional(),
12400
- noDataExpression: z15.boolean().optional(),
12401
- required: z15.boolean().optional(),
12402
- example: z15.string().optional(),
12403
- extractValue: z15.object({ type: z15.literal("regex"), regex: z15.string() }).strict().optional(),
12404
- properties: z15.array(WorkflowParameterSchema).optional(),
12405
- assetType: z15.string().optional(),
12406
- flag: z15.boolean().optional(),
12407
- enableExpand: z15.boolean().optional(),
12408
- enableVoice: z15.boolean().optional(),
12409
- expandButtonText: z15.string().optional(),
12410
- knowledgeGraphButtonText: z15.string().optional(),
12411
- selectListDisplayMode: z15.string().optional(),
12412
- voiceButtonText: z15.string().optional()
12441
+ isNodeSetting: z16.boolean().optional(),
12442
+ noDataExpression: z16.boolean().optional(),
12443
+ required: z16.boolean().optional(),
12444
+ example: z16.string().optional(),
12445
+ extractValue: z16.object({ type: z16.literal("regex"), regex: z16.string() }).strict().optional(),
12446
+ properties: z16.array(WorkflowParameterSchema).optional(),
12447
+ assetType: z16.string().optional(),
12448
+ flag: z16.boolean().optional(),
12449
+ enableExpand: z16.boolean().optional(),
12450
+ enableVoice: z16.boolean().optional(),
12451
+ expandButtonText: z16.string().optional(),
12452
+ knowledgeGraphButtonText: z16.string().optional(),
12453
+ selectListDisplayMode: z16.string().optional(),
12454
+ voiceButtonText: z16.string().optional()
12413
12455
  }).strict()
12414
12456
  );
12415
- var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
12416
- var WorkflowNodeSchema = z15.object({
12457
+ var WorkflowOutputBindingSchema = z16.object({ key: ContractIdentifierSchema, value: z16.string() }).strict();
12458
+ var WorkflowNodeSchema = z16.object({
12417
12459
  id: ContractIdentifierSchema,
12418
12460
  referenceName: ContractIdentifierSchema,
12419
12461
  capabilityRef: ContractIdentifierSchema,
12420
12462
  capabilityVersion: ContractIdentifierSchema.optional(),
12421
- inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
12422
- configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
12463
+ inputBindings: z16.record(z16.string(), JsonValueSchema).default({}),
12464
+ configuration: z16.object({ executor: z16.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
12423
12465
  }).strict().superRefine((node, context) => {
12424
12466
  if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
12425
12467
  if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
12426
12468
  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." });
12427
12469
  });
12428
- var WorkflowEdgeSchema = z15.object({
12470
+ var WorkflowEdgeSchema = z16.object({
12429
12471
  from: ContractIdentifierSchema,
12430
12472
  to: ContractIdentifierSchema,
12431
12473
  outputPort: ContractIdentifierSchema.optional(),
12432
12474
  inputPort: ContractIdentifierSchema.optional(),
12433
- condition: z15.string().optional()
12475
+ condition: z16.string().optional()
12434
12476
  }).strict();
12435
- var WorkflowTriggerSchema = z15.object({
12477
+ var WorkflowTriggerSchema = z16.object({
12436
12478
  id: ContractIdentifierSchema,
12437
- type: z15.enum(["manual", "schedule", "webhook", "event", "api"]),
12438
- enabled: z15.boolean(),
12439
- schedule: z15.object({ cron: z15.string().trim().min(1) }).strict().optional(),
12440
- webhook: z15.object({
12441
- path: z15.string().trim().min(1).optional(),
12442
- method: z15.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
12443
- auth: z15.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
12444
- basicAuth: z15.object({ username: z15.string(), password: z15.string() }).strict().optional(),
12445
- headerAuth: z15.object({ name: z15.string().trim().min(1), value: z15.string() }).strict().optional(),
12446
- responseUntil: z15.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
12479
+ type: z16.enum(["manual", "schedule", "webhook", "event", "api"]),
12480
+ enabled: z16.boolean(),
12481
+ schedule: z16.object({ cron: z16.string().trim().min(1) }).strict().optional(),
12482
+ webhook: z16.object({
12483
+ path: z16.string().trim().min(1).optional(),
12484
+ method: z16.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
12485
+ auth: z16.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
12486
+ basicAuth: z16.object({ username: z16.string(), password: z16.string() }).strict().optional(),
12487
+ headerAuth: z16.object({ name: z16.string().trim().min(1), value: z16.string() }).strict().optional(),
12488
+ responseUntil: z16.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
12447
12489
  }).strict().optional(),
12448
- event: z15.object({
12490
+ event: z16.object({
12449
12491
  eventType: ContractIdentifierSchema,
12450
12492
  configuration: JsonValueSchema.optional()
12451
12493
  }).strict().optional()
@@ -12454,63 +12496,63 @@ var WorkflowTriggerSchema = z15.object({
12454
12496
  if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
12455
12497
  if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
12456
12498
  });
12457
- var WorkflowValidationIssueSchema = z15.object({
12499
+ var WorkflowValidationIssueSchema = z16.object({
12458
12500
  taskReferenceName: ContractIdentifierSchema,
12459
- issueType: z15.enum(["ERROR", "WARNING"]),
12460
- detailReason: z15.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
12461
- humanMessage: z15.object({ en: z15.string(), zh: z15.string() }).strict()
12501
+ issueType: z16.enum(["ERROR", "WARNING"]),
12502
+ detailReason: z16.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
12503
+ humanMessage: z16.object({ en: z16.string(), zh: z16.string() }).strict()
12462
12504
  }).strict();
12463
- var WorkflowDefinitionSchema = z15.object({
12464
- contract: z15.literal("WorkflowDefinition"),
12505
+ var WorkflowDefinitionSchema = z16.object({
12506
+ contract: z16.literal("WorkflowDefinition"),
12465
12507
  metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
12466
12508
  name: LocalizedTextSchema,
12467
12509
  description: LocalizedTextSchema.optional(),
12468
- role: z15.enum(["workflow", "template"]),
12510
+ role: z16.enum(["workflow", "template"]),
12469
12511
  teamId: ContractIdentifierSchema,
12470
12512
  creatorRef: EntityRefSchema,
12471
- tags: z15.array(ContractIdentifierSchema).default([])
12513
+ tags: z16.array(ContractIdentifierSchema).default([])
12472
12514
  }).strict(),
12473
- revision: z15.object({
12474
- kind: z15.enum(["release", "backup"]),
12475
- recordVersion: z15.number().int().positive(),
12476
- sourceVersion: z15.number().int().positive().optional()
12515
+ revision: z16.object({
12516
+ kind: z16.enum(["release", "backup"]),
12517
+ recordVersion: z16.number().int().positive(),
12518
+ sourceVersion: z16.number().int().positive().optional()
12477
12519
  }).strict().superRefine((revision, context) => {
12478
12520
  if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
12479
12521
  }),
12480
- presentation: z15.object({ iconUrl: z15.string().optional(), thumbnail: z15.string().optional() }).strict(),
12481
- ports: z15.object({ inputs: z15.array(ContractPortSchema).default([]), outputs: z15.array(ContractPortSchema).default([]) }).strict(),
12482
- parameters: z15.object({ variables: z15.array(WorkflowParameterSchema).default([]), outputs: z15.array(WorkflowOutputBindingSchema).default([]) }).strict(),
12483
- graph: z15.object({ nodes: z15.array(WorkflowNodeSchema), edges: z15.array(WorkflowEdgeSchema).default([]) }).strict(),
12484
- execution: z15.object({
12485
- timeoutMs: z15.number().int().positive().optional(),
12486
- retries: z15.number().int().nonnegative().default(0),
12487
- concurrencyLimit: z15.number().int().positive().optional(),
12488
- idempotency: z15.enum(["required", "supported", "none"]),
12489
- rateLimit: z15.object({ enabled: z15.boolean(), max: z15.number().int().nonnegative(), windowMs: z15.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
12522
+ presentation: z16.object({ iconUrl: z16.string().optional(), thumbnail: z16.string().optional() }).strict(),
12523
+ ports: z16.object({ inputs: z16.array(ContractPortSchema).default([]), outputs: z16.array(ContractPortSchema).default([]) }).strict(),
12524
+ parameters: z16.object({ variables: z16.array(WorkflowParameterSchema).default([]), outputs: z16.array(WorkflowOutputBindingSchema).default([]) }).strict(),
12525
+ graph: z16.object({ nodes: z16.array(WorkflowNodeSchema), edges: z16.array(WorkflowEdgeSchema).default([]) }).strict(),
12526
+ execution: z16.object({
12527
+ timeoutMs: z16.number().int().positive().optional(),
12528
+ retries: z16.number().int().nonnegative().default(0),
12529
+ concurrencyLimit: z16.number().int().positive().optional(),
12530
+ idempotency: z16.enum(["required", "supported", "none"]),
12531
+ rateLimit: z16.object({ enabled: z16.boolean(), max: z16.number().int().nonnegative(), windowMs: z16.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
12490
12532
  if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
12491
12533
  }).optional(),
12492
- conductor: z15.object({
12493
- ownerApp: z15.string().optional(),
12494
- createTime: z15.number().int().nonnegative().optional(),
12495
- updateTime: z15.number().int().nonnegative().optional(),
12496
- createdBy: z15.string().optional(),
12497
- updatedBy: z15.string().optional(),
12534
+ conductor: z16.object({
12535
+ ownerApp: z16.string().optional(),
12536
+ createTime: z16.number().int().nonnegative().optional(),
12537
+ updateTime: z16.number().int().nonnegative().optional(),
12538
+ createdBy: z16.string().optional(),
12539
+ updatedBy: z16.string().optional(),
12498
12540
  failureWorkflow: ContractIdentifierSchema.optional(),
12499
- schemaVersion: z15.number().int().positive().optional(),
12500
- restartable: z15.boolean().optional(),
12501
- workflowStatusListenerEnabled: z15.boolean().optional(),
12502
- ownerEmail: z15.string().email().optional(),
12503
- timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
12504
- variables: z15.record(z15.string(), JsonValueSchema).optional(),
12505
- inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
12541
+ schemaVersion: z16.number().int().positive().optional(),
12542
+ restartable: z16.boolean().optional(),
12543
+ workflowStatusListenerEnabled: z16.boolean().optional(),
12544
+ ownerEmail: z16.string().email().optional(),
12545
+ timeoutPolicy: z16.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
12546
+ variables: z16.record(z16.string(), JsonValueSchema).optional(),
12547
+ inputTemplate: z16.record(z16.string(), JsonValueSchema).optional()
12506
12548
  }).strict()
12507
12549
  }).strict(),
12508
- triggers: z15.array(WorkflowTriggerSchema).default([]),
12509
- views: z15.array(z15.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
12510
- dataContracts: z15.object({ reads: z15.array(ContractIdentifierSchema).default([]), writes: z15.array(ContractIdentifierSchema).default([]), emits: z15.array(ContractIdentifierSchema).default([]) }).strict(),
12511
- governance: z15.object({ activated: z15.boolean(), validated: z15.boolean(), validationIssues: z15.array(WorkflowValidationIssueSchema).default([]), hidden: z15.boolean().optional() }).strict(),
12512
- interfaces: z15.object({
12513
- openai: z15.object({ enabled: z15.boolean(), modelName: z15.string().trim().min(1).optional() }).strict(),
12550
+ triggers: z16.array(WorkflowTriggerSchema).default([]),
12551
+ views: z16.array(z16.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
12552
+ dataContracts: z16.object({ reads: z16.array(ContractIdentifierSchema).default([]), writes: z16.array(ContractIdentifierSchema).default([]), emits: z16.array(ContractIdentifierSchema).default([]) }).strict(),
12553
+ governance: z16.object({ activated: z16.boolean(), validated: z16.boolean(), validationIssues: z16.array(WorkflowValidationIssueSchema).default([]), hidden: z16.boolean().optional() }).strict(),
12554
+ interfaces: z16.object({
12555
+ openai: z16.object({ enabled: z16.boolean(), modelName: z16.string().trim().min(1).optional() }).strict(),
12514
12556
  shortcutRef: EntityRefSchema.optional(),
12515
12557
  preferredAppId: ContractIdentifierSchema.optional()
12516
12558
  }).strict().superRefine((interfaces, context) => {
@@ -12529,21 +12571,21 @@ var WorkflowDefinitionSchema = z15.object({
12529
12571
  });
12530
12572
 
12531
12573
  // src/contracts/workflow-runtime.ts
12532
- import { z as z16 } from "zod";
12533
- var WorkflowCatalogEntrySchema = z16.object({
12534
- contract: z16.literal("WorkflowCatalogEntry"),
12574
+ import { z as z17 } from "zod";
12575
+ var WorkflowCatalogEntrySchema = z17.object({
12576
+ contract: z17.literal("WorkflowCatalogEntry"),
12535
12577
  workflowId: ContractIdentifierSchema,
12536
12578
  teamId: ContractIdentifierSchema,
12537
12579
  creatorRef: EntityRefSchema,
12538
12580
  currentDefinitionRef: EntityRefSchema,
12539
- lifecycle: z16.enum(["ACTIVE", "DELETED"]),
12540
- asset: z16.object({
12541
- preset: z16.boolean(),
12542
- marketplacePublished: z16.boolean(),
12581
+ lifecycle: z17.enum(["ACTIVE", "DELETED"]),
12582
+ asset: z17.object({
12583
+ preset: z17.boolean(),
12584
+ marketplacePublished: z17.boolean(),
12543
12585
  publishConfig: JsonObjectSchema.optional(),
12544
- sort: z16.number().int(),
12586
+ sort: z17.number().int(),
12545
12587
  forkFromRef: EntityRefSchema.optional(),
12546
- notAuthorized: z16.boolean()
12588
+ notAuthorized: z17.boolean()
12547
12589
  }).strict(),
12548
12590
  createdAt: IsoDateTimeSchema,
12549
12591
  updatedAt: IsoDateTimeSchema,
@@ -12578,17 +12620,17 @@ var WorkflowCatalogEntrySchema = z16.object({
12578
12620
  });
12579
12621
  }
12580
12622
  });
12581
- var WorkflowPublicationSchema = z16.object({
12582
- contract: z16.literal("WorkflowPublication"),
12623
+ var WorkflowPublicationSchema = z17.object({
12624
+ contract: z17.literal("WorkflowPublication"),
12583
12625
  publicationId: ContractIdentifierSchema,
12584
12626
  definitionRef: EntityRefSchema,
12585
12627
  runtimeDefinitionRef: EntityRefSchema,
12586
12628
  sourceHash: Sha256Schema,
12587
12629
  compiledHash: Sha256Schema,
12588
- status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
12630
+ status: z17.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
12589
12631
  publisherRef: EntityRefSchema,
12590
12632
  publishedAt: IsoDateTimeSchema.optional(),
12591
- failureReason: z16.string().trim().min(1).optional()
12633
+ failureReason: z17.string().trim().min(1).optional()
12592
12634
  }).strict().superRefine((publication, context) => {
12593
12635
  if (publication.definitionRef.kind !== "workflow-definition") {
12594
12636
  context.addIssue({
@@ -12619,12 +12661,12 @@ var WorkflowPublicationSchema = z16.object({
12619
12661
  });
12620
12662
  }
12621
12663
  });
12622
- var WorkflowCompletionCommitSchema = z16.object({
12623
- contract: z16.literal("WorkflowCompletionCommit"),
12664
+ var WorkflowCompletionCommitSchema = z17.object({
12665
+ contract: z17.literal("WorkflowCompletionCommit"),
12624
12666
  commitId: ContractIdentifierSchema,
12625
12667
  run: ApplicationRunSchema,
12626
- outputs: z16.array(OutputRecordSchema),
12627
- artifacts: z16.array(ArtifactManifestSchema),
12668
+ outputs: z17.array(OutputRecordSchema),
12669
+ artifacts: z17.array(ArtifactManifestSchema),
12628
12670
  lineage: LineageRecordSchema,
12629
12671
  completedAt: IsoDateTimeSchema
12630
12672
  }).strict().superRefine((commit, context) => {
@@ -12666,15 +12708,15 @@ var WorkflowCompletionCommitSchema = z16.object({
12666
12708
  }
12667
12709
  });
12668
12710
  });
12669
- var WorkflowCompletionReceiptSchema = z16.object({
12670
- contract: z16.literal("WorkflowCompletionReceipt"),
12711
+ var WorkflowCompletionReceiptSchema = z17.object({
12712
+ contract: z17.literal("WorkflowCompletionReceipt"),
12671
12713
  commitId: ContractIdentifierSchema,
12672
12714
  runRef: EntityRefSchema,
12673
- outputRefs: z16.array(EntityRefSchema),
12674
- artifactRefs: z16.array(EntityRefSchema),
12715
+ outputRefs: z17.array(EntityRefSchema),
12716
+ artifactRefs: z17.array(EntityRefSchema),
12675
12717
  contentHash: Sha256Schema,
12676
12718
  committedAt: IsoDateTimeSchema,
12677
- idempotentReplay: z16.boolean()
12719
+ idempotentReplay: z17.boolean()
12678
12720
  }).strict().superRefine((receipt, context) => {
12679
12721
  if (receipt.runRef.kind !== "application-run") {
12680
12722
  context.addIssue({
@@ -12908,6 +12950,9 @@ export {
12908
12950
  PageRuntimeProjectionSchema,
12909
12951
  PageTypeSchema,
12910
12952
  PageVisibilitySchema,
12953
+ PermissionBundleSchema,
12954
+ PermissionDefinitionSchema,
12955
+ ProductAccessDeclarationSchema,
12911
12956
  ProductBodySchema,
12912
12957
  ProductContextSchema,
12913
12958
  ProductDeclarationSchema,
@@ -12943,6 +12988,7 @@ export {
12943
12988
  SourceRecordRefSchema,
12944
12989
  StorageLocatorSchema,
12945
12990
  StudioAgentModeSchema,
12991
+ SystemGroupDefinitionSchema,
12946
12992
  TenantApplicationConfigSchema,
12947
12993
  TenantLandingPageConfigSchema,
12948
12994
  TenantProductConfigSchema,