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